I have a .key file, when I do
openssl rsa -text -in file.key
I get
unable to load Private Key
140000419358368:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:703:Expecting: ANY PRI..
I am working on a business application using angularJS. One of my service method returning me a byte[] (inclding PDF file content) now i need to download this file as PDF to client machine using JavaS..
I want a function that tells me which element the mouse cursor is over.
So, for example, if the user's mouse is over this textarea (with id wmd-input), calling window.which_element_is_the_mouse_on() w..
I have the following piece of base64 encoded data, and I want to use python base64 module to extract information from it. It seems that module does not work. Can anyone tell me how?
Q5YACgAAAABDlgA..
I wrote a web service project using netbeans 6.7.1 with glassfish v2.1, put log4j.properties to the root dir of project and use:
static Logger logger = Logger.getLogger(MyClass.class);
in Construct..
I am making a site that publishes articles in issues each month. It is straightforward, and I think using a Markdown editor (like the WMD one here in Stack Overflow) would be perfect.
However, t..
First time I work with jQuery.inArray() and it acts kinda strange.
If the object is in the array, it will return 0, but 0 is false in Javascript. So the following will output: "is NOT in array"
var ..
I understand that Android's developer site provides information on this topic. I have already read the following three pages:
Supporting Multiple Screens
Screen Sizes and Densites
Icon Design Guidel..
Let's say I have the following query.
SELECT ID, Email, ProductName, ProductModel FROM Products
How can I modify it so that it returns no duplicate Emails?
In other words, when several rows contai..
I get the following exception:
Exception in thread "main" org.hibernate.LazyInitializationException: could not initialize proxy - no Session
at org.hibernate.proxy.AbstractLazyInitializer.initial..
Edited:
I need to change the values of several variables as they run several times thorugh a timer. I need to keep updating the values with every iteration through the timer. I cannot set the values t..
There is a phrase that I want to look for in Vim. When found, I want to delete that occurrence of the phrase. What is the easiest way to cycle through all the occurrences (via n), and delete a match..
Given:
<img src="..."/>
<img src="..."/>
The result is two images with a single space between them. It seems that the normal behavior is to show any number of spaces, newlines, and tabs..
My react webApp give this Error in Browser Console
Refused to load the font 'data:font/woff;base64,d09........' because it`
`violates the following Content Security Policy directive: "default-src` `..
So I have recently installed Python Version 2.7.5 and I have made a little loop thing with it but the problem is, when I go to cmd and type python testloop.py I get the error:
'python' is not rec..
I have a large report I am running on sql server. It takes several minutes to run. I don't want users clicking run twice. Since i wrap the whole procedure in a transaction, how do I check to see if th..
From all the material I used to learn C++, auto has always been a weird storage duration specifier that didn't serve any purpose. But just recently, I encountered code that used it as a type name in ..
When I try creating a button and setting a background image in Swift:
let button = UIButton.buttonWithType(UIButtonType.System) as UIButton
button.frame = CGRectMake(100, 100, 100, 100)
but..
I have a link like this:
<a href="/index2.php?option=com_jumi&fileid=3&Itemid=11" onclick="window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollb..
When I clear caches in my Laravel 5.2 project, I see this error message:
[LogicException]
Unable to prepare route [panel] for serialization. Uses Closure.
I think that it's related with a route
..
Usually when I write anything in C++ and I need to convert a char into an int I simply make a new int equal to the char.
I used the code(snippet)
string word;
openfile >> word;
double l..
I have gone through configuration documentation on ASP.NET core. Documentation says you can access configuration from anywhere in the application.
Below is Startup.cs created by template
public clas..
I have an email address and want to find out if there is a Facebook user linked to this address. If there is, then I want to retrieve the url to this users profile page and save it somewhere.
I do not..
I have a spring boot application and I want to read some variable from my application.properties file. In fact below codes do that. But I think there is a good method for this alternative.
Properties..
The man page says that case statements use "filename expansion pattern matching".
I usually want to have short names for some parameters, so I go:
case $1 in
req|reqs|requirements) TASK="Function..
This is quite a common question, but none of the solutions appear to work for me. First time asker, so apologies if I get the conventions wrong.
I am trying to connect my Galaxy S5 to my computer run..
How would I get the key name for the follow? E.g I want "button1" and "button2"?
var buttons = {
button1: {
text: 'Close',
onclick: function(){
}
},
button2: {
..
For example, right now I'm using the following to change a couple of files whose Unix paths I wrote to a file:
cat file.txt | while read in; do chmod 755 "$in"; done
Is there a more elegant, safer ..
I have developed a PowerShell function that performs a number of actions involving provisioning SharePoint Team sites. Ultimately, I want the function to return the URL of the provisioned site as a St..
How do I call the showDialog from a asp.net button click event. My page is a contentpage that has a masterpage associated with it.
I have tried the following
<asp:Button ID="ButtonAdd" runat="s..
I have 2 Java Web Projects. One runs on JDK 1.5 and the other runs on JDK 1.6. I want to run both of them on the same computer, but the JAVA_HOME environment variable can only have one value. I want t..
Disregarding performance, will I get the same result from query A and B below? How about C and D?
-- A
select *
from a left join b
on <blahblah>
left join c
on &l..
I'm trying to make Selenium wait for an element that is dynamically added to the DOM after page load. Tried this:
fluentWait.until(ExpectedConditions.presenceOfElement(By.id("elementId"));
In case ..
I have strange thing when I try to modify Spring project inside my Spring Tool Suite. On the first load (deploy) everything is fine, application compiles and runs on localhost:8080
When I change som..
I try to write a script in .py for oracle connectivity:
#!/usr/bin/python
import cx_Oracle
connstr='username/pwd@database'
conn = cx_Oracle.connect(connstr)
curs = conn.cursor()
curs.execute('sele..
I'm trying to represent a simplified chromosome, which consists of N bases, each of which can only be one of {A, C, T, G}.
I'd like to formalize the constraints with an enum, but I'm wondering what t..
<a href="#">Alink</a>
All i need is while i hover the color should change for the link, But it should be completely using only inline CSS
*No Scripting or external CSS
Please he..
For the life of me I am unable to get these twitter bootstrap buttons to text wrap onto multiple lines, they appearing like so.
I cannot post images, so this is what it is doing...
[This is the bu] ..
A Pandas DataFrame contains column named "date" that contains non-unique datetime values.
I can group the lines in this frame using:
data.groupby(data['date'])
However, this splits the data by the..
I need to add proper index to my tables and need some help.
I'm confused and need to clarify a few points:
Should I use index for non-int columns? Why/why not
I've read a lot about clustered and no..
I have a VBScript file which I am trying to call from a Batch file. The following code I coped to a notepad and saved as MyScript.vbs
(http://gallery.technet.microsoft.com/scriptcenter/8bbed56f-a7aa-..
I work on my wamp for localhost backend development everyday.
I feel annoyed by phpmyadmin auto log out out quickly. Is there any way I could get rid of this or extend the timeout?
Where can I set..
I have a script that is to be run by a person that logs in to the server with SSH.
Is there a way to find out automatically what IP address the user is connecting from?
Of course, I could ask the us..
I'm setting up basic authentication on a php site and found this page on the php manual showing the set up. What does "realm" mean here in the header?
header('WWW-Authenticate: Basic realm="My Real..
I'm working on a project that may have to change the same content on all html pages. So I figured I would create a php file and only have to change that so it changes on all pages over the web.
The f..
I am trying to use this method without a closure
def copyAndReplaceText(source, dest, targetText, replaceText){
dest.write(source.text.replaceAll(targetText, replaceText))
}
def source = new Fi..
is there a way to configure bower not only to use a proxy but ignore the proxy configuration for some domains?
I have the problem, that I will run an internal bower registry for our own developed com..
When uninstalling an android application, or do some configuration, there will show such a horizontal progress bar, like following picture:
It's not the same style like @android:style/Widget.Progre..
I have a form upload that works but I would like to pass model information for my database to save the file with a different name of course.
Here is my Razor view:
@model CertispecWeb.Models.Contain..
@Path("/hello")
public class Hello {
@POST
@Path("{id}")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public JSONObject sayPlainTextHello(@PathParam..
I'm adding this table:
CREATE TABLE contenttype (
contenttypeid INT UNSIGNED NOT NULL AUTO_INCREMENT,
class VARBINARY(50) NOT NULL,
packageid INT UNSIGNED NOT NULL,
ca..
I'm having trouble with a data frame and couldn't really resolve that issue myself:
The dataframe has arbitrary properties as columns and each row represents one data set.
The question is:
How to get ..
I'm trying to backup/restore a PostgreSQL database as is explained on the Docker website, but the data is not restored.
The volumes used by the database image are:
VOLUME ["/etc/postgresql", "/var/..
I read this previous post. Can any one say what the exact difference between CharSequence and String is, other than the fact that String implements CharSequence and that String is a sequence of charac..
I am using the jQuery validation plugin for client side validation.
Function editUser() is called on click of 'Edit User' button, which displays error messages.
But I want to clear error messages on ..
What is the difference between these headers?
Content-Type: application/javascript
Content-Type: application/x-javascript
Content-Type: text/javascript
Which one is best and why?
Please do not say..
I have a table with 2 rows and variable columns. I tried width = 100% for the column. So the first content in the view will fit. But suppose if i am changing the contents dynamically then it is not dy..
I know this is achievable with boost as per:
Using boost::accumulators, how can I reset a rolling window size, does it keep extra history?
But I really would like to avoid using boost. I have google..
I am new to MongoDB. After installing MongoDB in Windows I am trying to insert a simple json file using the following command:
C:\>mongodb\bin\mongoimport --db test --collection docs < example2..
I just got started with Markdown. I love it, but there is one thing bugging me: How can I change the size of an image using Markdown?
The documentation only gives the following suggestion for an imag..
What's the difference between
var A = function () {
this.x = function () {
//do something
};
};
and
var A = function () { };
A.prototype.x = function () {
//do something
};
..
What is the difference between Parse() and TryParse()?
int number = int.Parse(textBoxNumber.Text);
// The Try-Parse Method
int.TryParse(textBoxNumber.Text, out number);
Is there some form of error..
I am trying to get the selected option from a dropdown and populate another item with that text, as follows. IE is barking up a storm and it doesn't work in Firefox:
$('#ddlCodes').change(function() ..
What is the location of mysql client .my.cnf using XAMPP in Windows?
Clarification: This file does not exist by default, so when you create it, where should you place it, in order for the command lin..
I would like to explain threading deadlocks to newbies. I have seen many examples for deadlocks in the past, some using code and some using illustrations (like the famous 4 cars). There are also class..
I am having a String str = 12,12
I want to replace the ,(comma) with .(Dot) for decimal number calculation,
Currently i am trying this :
if( str.indexOf(",") != -1 )
{
str.replaceAll(",","\\..
I was trying to do a svn cleanup because I can't commit the changes in my working copy, and I got the following error:
sqllite: database disk image is malformed
What can I do right now?..
I have a bunch of high quality PNG files. I want to use PHP to convert them to JPG because of it's smaller file sizes while maintaining quality. I want to display the JPG files on the web.
Does PHP..
I have a part of HTML source file that contains strings that I want to select and copy at once, using the regex functionality of Notepad++.
Here is a part of the text source:
<option value="Perfo..
I am trying to use pip behind a proxy at work.
One of the answers from this post suggested using CNTLM. I installed and configured it per this other post, but running cntlm.exe -c cntlm.ini -I -M htt..
I receive following error when I save the object using Hibernate
object references an unsaved transient instance - save the transient instance before flushing
..
I am working with a query which contains "IF" statements within a "WHERE" clause. But PL\SQL Developer is giving some errors while executing it. Can anyone please help me with the correct query? Here ..
What is the technical difference between a process and a thread?
I get the feeling a word like 'process' is overused and there are also hardware and software threads. How about light-weight processes..
I want to count the no of lines in a text file and then the value has to be stored into a environment variable. The command to count the no of lines is
findstr /R /N "^" file.txt | find /C ":"
I r..
(SELECT COUNT(motorbike.`owner_id`) as count,owner.`name`,transport.`type` FROM transport,owner,motorbike WHERE transport.type='motobike'
AND owner.`owner_id`=motorbike.`owner_id`
AND transport.`type_..
I have developed a User Control in Visual Studio (WinForms C#) and have a question.
I need the user of my User Control to be able to change certain string values and I would like them to be able to a..
I can not get a powershell script to execute a bat file directly. For example, this works on the command line:
.\\my-app\my-fle.bat
When I add this command to a script, it outputs:
The term '.\\my..
I have a VARCHAR column in a SQL Server 2000 database that can contain either letters or numbers. It depends on how the application is configured on the front-end for the customer.
When it does cont..
Possible Duplicate:
What and where are the stack and heap
I am programming in C++ and I am always wondering what exactly is stack memory vs heap memory. All I know is when I call new, I wou..
I have recently started to use Android Studio v0.1.1, And i can't seem to find LogCat... Is it gone? Or if not, how can I enable it?
If it is gone, is there any way to enable something similar to log..
EDIT2: Thank you all for your help!
EDIT: on adding @staticmethod, it works. However I am still wondering why i am getting a type error here.
I have just started OOPS and am completely new to it. I ..
I need to collect the standard output and error log from several processes into one single log file.
So every output must append to this log file.
I want to call all the jobs with lines like this:
..
I'm going through a configuration file with a RandomAccessFile reader. I have a configuration option which is one (1) tab away from the start of the line. When my reader gets this line, would I be abl..
Is it possible to use external image URLs for CSS custom cursors? The following example doesn't work:
HTML:
<div class="test">TEST</div>
CSS:
.test {
background:gray;
width:200px;..
I'm trying to get the position of an element within the window like so:
var link = $(element);
var offset = link.offset();
var top = offset.top;
var left = offset.left;
var bottom = $(window).height..
Traceback (most recent call last):
File "/run-1341144766-1067082874/solution.py", line 27, in
main()
File "/run-1341144766-1067082874/solution.py", line 11, in main
if len(s[i:j+1]) > 0:
MemoryErr..
r = {'is_claimed': 'True', 'rating': 3.5}
r = json.dumps(r)
file.write(str(r['rating']))
I am not able to access my data in the JSON. What am I doing wrong?
TypeError: string indices must be intege..
I am using Mac OS in VMWare for iOS app development.
After updating the OS and Xcode, the iOS device isn't available so I cannot test it.
When the device is plugged in to the PC, the device appears ..
This is a past exam question and I was wondering what a primitive type and reference type are first off?
With an array I know the a reference type is where the array is composed of objects or variable..
Given the following HQL Query:
FROM
Foo
WHERE
Id = :id AND
Bar IN (:barList)
I set :id using the Query object's setInteger() method.
I would like to set :barList using a List of objec..
I found the following way hex to binary conversion:
String binAddr = Integer.toBinaryString(Integer.parseInt(hexAddr, 16));
While this approach works for small hex numbers, a hex number such as th..
I need your help in order to refresh a div id="mytable" in my html once the function is called from a method. Currently, I am loading the full page once it is called using the below lines.
In my java..
Paint.setColor is expecting an integer. But what I have is a Color object. I don't see a color.getIntValue() in Java? So how do I do that? What I want is something like
public Something myMethod(Colo..
I am trying to get response from the following Api :
https://api.github.com/users/username
But I don't know how to get response as String so that I can use the String to parse and get the JSONObject..
I'm a beginner in python,
I have this error :
Error :
def on_data(self,data):
^
IdentationError : unindent does not match any outer indentation level
I code with notepad++ ..
I am having a tough time with this javascript code to change the background color of a text input if the input is empty.
Here is the code:
function checkFilled() {
var inputVal = document.getEle..
I have not yet been able to figure out how to get a substring of a String in Swift:
var str = “Hello, playground”
func test(str: String) -> String {
return str.substringWithRange( /* What goe..
I don't use ggplot2 that much, but today I thought I'd give it a go on some graphs. But I can't figure out how to manually control colors in geom_line()
I'm sure I'm overlooking something simple, but..
Flexbox has this behaviour where it stretches images to their natural height. In other words, if I have a flexbox container with a child image, and I resize the width of that image, the height doesn't..
Hi I just started learning Python but I'm sort of stuck right now.
I have hash.txt file containing thousands of malware hashes in MD5, Sha1 and Sha5 respectively separated by delimiters in each line..
I want to download an image accessible from this link: https://www.python.org/static/apple-touch-icon-144x144-precomposed.png into my local system. Now, I'm aware that the curl command can be used to ..
I am trying to edit sources.list using vi editor but getting the following error while saving the file:
/etc/apt/sources.list" E212: Can't open file for writing
..
How do I pass a connection string to entity framework's code-first DbContext? My database generation works correctly when both DbContext and the connection string in web.config is in the same project ..
I have below java code.
List<SomePojo> list = new ArrayList<SomePojo>();
//add 100 SomePojo objects to list.
Now list has 100 objects.
If i create one more instance as below:
List<Some..
I am using Oracle SQL (in SQLDeveloper, using the SQL Worksheet). I would like to print a statement before my select, such as
PRINT 'Querying Table1';
SELECT * from Table1;
What do I use to Print ..
If you have an interesting story to
share, please post an answer, but
do not abuse this question for bashing
a language.
We are programmers, and our primary tool is the programming langua..
I am trying to transform my menu items by rotating them 10 degrees. My CSS works in Firefox but I've failed to replicate the effect in Chrome and Safari. I know IE doesn't support this CSS3 property s..
What I want is..
If culture is en-US then
string dateFormat="MM/dd/yyyy";
string timeFormat="24.00 hrs";
If culture is en-GB then
string dateFormat="dd/mmyyyy";
string timeFormat="24.00 hrs";
..
I'm new in Oracle and I've - maybe trivial - a problem in a select. (I'm using Oracle 10g Express Edition).
I've a DB with a field CLOB: mytab.xml
This column have an XML like this:
<?xml version..
Short question here:
In .Net 4.0 Winforms, how do I use the PasswordChar property of a Textbox to show a common black dot as a character? Is there perhaps some font I can use that has this as a chara..
When discussing performance with colleagues, teaching, sending a bug report or searching for guidance on mailing lists and here on Stack Overflow, a reproducible example is often asked and always..
I was wondering if it was possible, in a console application, to write characters like ? using .NET. When I try to write this character, the console outputs a question mark...
I have this code:
public static String SelectRandomFromTemplate(String template,int count) {
String[] split = template.split("|");
List<String> list=Arrays.asList(split);
Random r = ne..
I'm currently building a test app using React Native. The Image module, thus far has been working fine.
For example, if I had an image named avatar, the below code snippet works fine.
<Image sour..
I would like to handle errors from Guzzle when the server returns 4xx and 5xx status codes. I make a request like this:
$client = $this->getGuzzleClient();
$request = $client->post($url, $heade..
Is there any way to select, for example, first 10 rows of a table in T-SQL (working MSSQL)?
I think I saw something in Oracle defined as rownum meta variable, used in a following way
select * from Us..
Code will explain more:
$var = 0;
if (!empty($var)){
echo "Its not empty";
} else {
echo "Its empty";
}
The result returns "Its empty". I thought empty() will check if I already set the variable a..
I want to capture the screen in my code to get an image - like using the 'print screen' button on the keyboard .
Does anyone have an idea how to do this? I have no starting point...
I'm trying to create a log of hibernate statements.
I perform my sql statements using JPA where Hibernate 2.0 is the persistence provider (my application server is JBoss AS 6.0).
I call my CRUD method..
I want to reverse the changes from one of my checkins. In the right-click context menu of the particular changelist, there are these two options:
Rollback...
Back Out Submitted Changelist
What is..
I have a Class called AuctionItem. The AuctionItem Class has a method called getName() that returns a String. If I have an ArrayList of type AuctionItem, what is the best way to return the index of an..
I basically want a python equivalent of this in C:
int a[x];
but in python I declare an array like:
a = []
and the problem is I want to assign random slots with values like:
a[4] = 1
but I ca..
Is use of string.IsNullOrEmpty(string) when checking a string considered as bad practice when there is string.IsNullOrWhiteSpace(string) in .NET 4.0 and above?..
I'm trying to create a Regex test in JavaScript that will test a string to contain any of these characters:
!$%^&*()_+|~-=`{}[]:";'<>?,./
More Info If You're Interested :)
It's for a pre..
Is there a way to have keyup, keypress, blur, and change events call the same function in one line or do I have to do them separately?
The problem I have is that I need to validate some data with a d..
Is there a way I can run a php function through a JS function?
something like this:
<script type="text/javascript">
function test(){
document.getElementById("php_code").innerHTML="<?php
qu..
I understand that it is not possible to tell what the user is doing inside an iframe if it is cross domain. What I would like to do is track if the user clicked at all in the iframe. I imagine a sce..
I made this with help from
Android download binary file problems
and Install Application programmatically on Android.
I want to make auto-update and auto-install at once. It is local so it's non-ma..
If I have a JavaScript object such as:
var list = {
"you": 100,
"me": 75,
"foo": 116,
"bar": 15
};
Is there a way to sort the properties based on value? So that I end up with
list = {
..
I am trying to update a record in oracle SQL developer by using Joins.
Following is my query-
UPDATE system_info set field_value = 'NewValue'
FROM system_users users
JOIN system_info info ON users...
I'm playing around with templates. I'm not trying to reinvent the std::vector, I'm trying to get a grasp of templateting in C++.
Can I do the following?
template <typename T>
typedef struct{
..
Does anybody know how Python manage internally int and long types?
Does it choose the right type dynamically?
What is the limit for an int?
I am using Python 2.6, Is is different with previous ver..
Recently I ran into this error in my web application:
java.lang.OutOfMemoryError: PermGen space
It's a typical Hibernate/JPA + IceFaces/JSF application running on Tomcat 6 and JDK 1.6.
Apparentl..
Is there a Pool class for worker threads, similar to the multiprocessing module's Pool class?
I like for example the easy way to parallelize a map function
def long_running_func(p):
c_func_no_gi..
So I got know this is a popular question and already found the solution. But when I try this it doesn't work properly.
My JTextField is empty and the button isn't enabled. When I write something in m..
How do I read an embedded resource (text file) using StreamReader and return it as a string? My current script uses a Windows form and textbox that allows the user to find and replace text in a text ..
I would like to simply limit the size of a file that a user can upload.
I thought maxlength = 20000 = 20k but that doesn't seem to work at all.
I am running on Rails, not PHP, but was thinking it'..
I just started developing PHP projects on my mac (using PDT) and was wondering where localhost is located? How does Mac OS X serve websites, I haven't changed any settings during the installation of P..
I'm able to upload images fine, but when when I change the types from image/jpg, image/gif to application/msword and application/pdf, it doesn't work. Here's my code. The exact same code works for ima..
I want to open the image upload file dialogue box if i click the button tag.is it possible.if so how can i do it in php
while{
echo "<td><button><img src='".$cfet['productimage']...
How does the ASP.NET MVC's ViewBag work? MSDN says it is just an Object, which intrigues me, how does "Magic" properties such as ViewBag.Foo and magic strings ViewBag["Hello"] actually work?
Also, ho..
How can I convert the output of PHP's filesize() function to a nice format with MegaBytes, KiloBytes etc?
like:
if the size is less than 1 MB, show the size in KB
if it's between 1 MB - 1 GB show i..
I have a table customer that stores a customer_id, email and reference. There is an additional table customer_data that stores a historical record of the changes made to the customer, i.e. when there'..
What is the best way to convert a JSON code as this:
{
"data" :
{
"field1" : "value1",
"field2" : "value2"
}
}
in a Java Map in which one the keys are (field1, field..
How can multiple scales can be implemented in Matplotlib? I am not talking about the primary and secondary axis plotted against the same x-axis, but something like many trends which have different sca..
html
<img src="logo.svg" alt="Logo" class="logo-img">
css
.logo-img path {
fill: #000;
}
The above svg loads and is natively fill: #fff but when I use the above css to try change it to b..
I need to change background color of single cell in table using java script.
During document i need style of all cell should be same ( so used style sheet to add this. ) , but on button click i need..
When I try running my java .jar on another machine I get the error
Unsupported major.minor version 52.0
I compiled my program using the jdk 1.6 and my machine (separate one) has java 7 installed..
My database is about 25 MB, and I've verified that the username accessing it, as well as the file permissions haven't changed in months. I'm having a problem where queries are failing due to a "databa..
How to get the currently logged-in user's id?
in models.py:
class Game(models.model):
name = models.CharField(max_length=255)
owner = models.ForeignKey(User, related_name='game_user', verbos..
I have a git repository hosted on Github. After committing many files, I am realizing that I need to create .gitignore and exclude .exe, .obj files.
However, will it automatically remove these commit..
I have a div that I want to style based on a condition.
If styleOne is true I want a background colour of red. If StyleTwo is true, I want the background colour to be blue. I've got half of it working..
How does the annotation @param work?
If I had something like this:
/*
*@param testNumber;
*/
int testNumber = 5;
if (testNumber < 6) {
//Something
}
How would the @param affect the testNum..
I'm trying to work with fractions in Java.
I want to implement arithmetic functions. For this, I will first require a way to normalize the functions. I know I can't add 1/6 and 1/2 until I have a ..
I have a UILabel that displays some chars. Like "x", "y" or "rpm". How can I calculate the width of the text in the label (it does not ues the whole available space)? This is for automatic layouting, ..
I have a set of video frames saved as images in a directory, and I'm trying to encode these to a good quality video, however every setting and every format I try produces very noticeable artifacts.
T..
can I import,use class from other package?
In Eclipse I made 2 packages
one is main other is second
main
-main (class)
second
-second (class)
and I wanted the main function of main class to call..
I'm experimenting in connecting a C# app to an MDF database for the first time, and I need a little help ..
I made a small MDF database file in Visual Studio 2010, then created another project and im..
Is it possible to change the height of UIPickerView? Some applications seem to have shorter PickerViews but setting a smaller frame doesn't seem to work and the frame is locked in Interface Builder...
I would like to clear all inputs,
selects and also all hidden fields in a form.
Using jQuery is an option if best suited.
What is the easiest way to do this... I mean easy to understand and maintain...
I want to build a blade view from 3 tables:
"inputs_details" - fields: article_type (values: 'p' for product,'s' for service), article_id, ....
"products" - fields: id, name
"services" - fields: id,..
I have an image converted in a CvMat Matrix say CVMat source. Once I get a region of interest from source I want the rest of the algorithm to be applied to that region of interest only. For that I thi..
How can I make div 'left' and 'right' look like columns side by side?
I know I can use float:left on them and that will work... but on step 5 and 6 in here http://www.barelyfitz.com/screencast...s/p..
I want to run my application from IIS on my local machine. I created the virtual directory and added the application to it and in the properties folder of the application I checked the radio button 'U..
I am new to android development and keep coming across references to Inflating views from a layout xml file. I googled and searched the development guide but still wasn't able to pick up a sense for ..
I notice my VBA script doesn't work when there's an autofilter already on. Any idea why this is?
wbk.Activate
Set Criteria = Sheets("Sheet1").Cells(i, 1)
Set rng = Sheets("Sheet1").Range..
I have the following:
> date1
Timestamp('2014-01-23 00:00:00', tz=None)
> date2
datetime.date(2014, 3, 26)
and I read on this answer that I could use pandas.to_datetime() to convert from Tim..
How to I print information from a map that has the object as the value?
I have created the following map:
Map<String, Object> objectSet = new HashMap<>();
The object has its own class ..
I'm trying to figure out how to use PowerShell V2's Send-MailMessage with Gmail.
Here's what I have so far.
$ss = New-Object Security.SecureString
foreach ($ch in "password".ToCharArray())
{
$ss..
I'm scanning through a file looking for lines that match a certain regex pattern, and then I want to print out the lines that match but in alphabetical order. I'm sure this is trivial but vbscript isn..
Before you post this as a duplicate; I've tried many of the suggestions I found around SO.
So far I've been using postman to post data to a Java web service. That works great as follows:
I now wan..
I am generating a image on client side and I display it with HTML like this:
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgM...."/>
I want to offer the possibilit..
I'm using Eclipse to develop applications for android, and I want to integrate Admob to make money.
The tutorial says I should watch the LogCat to find ID, but where is it?
When I run in either the ..
All I want to do is, how can I auto hide alert box within specific seconds after showing it?
All I know is,
setTimeout(function() {
alert('close');
}, 5000);
// This will appear alert afte..
What is the difference between @RequestParam and @PathVariable while handling special characters?
+ was accepted by @RequestParam as space.
In the case of @PathVariable, + was accepted as +...
Basically I have an ArrayList of locations:
ArrayList<WorldLocation> locations = new ArrayList<WorldLocation>();
below this I call the following method:
.getMap();
the parameters in ..
I'm going to create an invoice system, I am preparing for that now.
I'm gonna use Codeigniter.
The thing is that I want to create invoice in PDF so I can send it through email.
What is your guys advi..
I need to add leading zeros to integer to make a string with defined quantity of digits ($cnt).
What the best way to translate this simple function from PHP to Python:
function add_nulls($int, $cnt=2..
I have a MySQL table with an auto increment primary key. I deleted some rows in the middle of the table. Now I have, for example, something like this in the ID column: 12, 13, 14, 19, 20. I deleted th..
I am creating a vertical divider, that works fine. But the CSS is cumbersome.
The CSS is:
.headerDivider1 {
border-left:1px solid #38546d;height:80px;position:absolute;right:250px;top:10px;
}
.head..
I'm trying to do a query like so...
query.Where(x => !string.IsNullOrEmpty(x.PropertyName));
but it fails...
so for now I have implemented the following, which works...
query.Where(x => (x...