I am trying to loop through the following json array:
{
"id": "1",
"msg": "hi",
"tid": "2013-05-05 23:35",
"fromWho": "[email protected]"
}, {
"id": "2",
"msg": "there",
"tid": "2013-05-0..
I wanted to know how to represent a whitespace character in C#. I found the empty string representation string.Empty. Is there anything like that that represents a whitespace character?
I would like ..
I have a question about creating vectors. If I do a <- 1:10, "a" has the values 1,2,3,4,5,6,7,8,9,10.
My question is how do you create a vector with specific intervals between its elements. For ex..
I want to install a file using the Windows command line. First I want to build after compiling all the .jar files to create an .apk file for an Android application without using Eclipse.
Does anyone ..
This question is mostly to solicit opinions on the best way to handle my app. I have three fragments being handled by one activity. Fragment A has one clickable element the photo and Fragment B has ..
How does collision detection work in JavaScript?
I can't use jQuery or gameQuery - already using prototype - so, I'm looking for something very simple. I am not asking for complete solution, just poin..
I am trying to write a filter that can retrieve the request URL, but I'm not sure how to do so.
Here is what I have so far:
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
impo..
All the examples I look at for reflection show creating a new instance of an unknown implementation, and casting that implementation to it's interface. The issue with this is that now you can't call a..
I want to have a place to store my image files to use in my Java project (a really simple class that just loads an image onto a panel). I have looked everywhere and cannot find how to do this. How do ..
The SRC and HREF attributes are used to include some external entities like an image, a CSS file, a HTML file, any other web page or a JavaScript file.
Is there a clear differentiation between SRC an..
I have an API call for which I need to be able to run some checks and potentially return various status codes. I don't need custom views or anything, I just need to return the proper code. If the user..
I am trying to trigger an action method for onchange event for dropdownlist, how can I do this without using jquery onchange.
@Html.DropDownList("Sortby",
new SelectListItem[]
..
How do I move Elasticsearch data from one server to another?
I have server A running Elasticsearch 1.1.1 on one local node with multiple indices.
I would like to copy that data to server B running El..
I was testing my app on the simulator when it crashed on clicking a button of a UIAlertView. I stopped debugging there, made some changes to the code and built the app again. Now when I run the applic..
Why I can't do something like this? mkdir folder/subfolder/ in order to achive this I have to do:
mkdir folder
cd folder
mkdir subfolder
Is there a better way to do it?..
I'm writing a bash script that needs to delete old files.
It's currently implemented using :
find $LOCATION -name $REQUIRED_FILES -type f -mtime +1 -delete
This will delete of the files older than..
I have a Symfony2 Twig template. I want to output the value of a config parameter in this twig template (a version number). Therefore I defined the config parameter like this:
parameters:
app.ver..
I'm trying to start playing an embedded youtube video by clicking an image. The idea is to have an image on top of a video, and when the image is clicked it fades out and starts playing the video.
I'..
I have an array a which is constantly being updated. Let's say a = [1,2,3,4,5]. I need to make an exact duplicate copy of a and call it b. If a were to change to [6,7,8,9,10], b should still be [1,2,3..
I have the following code:
Dim i As Integer = dtResult.Rows.Count
For i = 0 To dtResult.Rows.Count Step 1
strVerse = blHelper.Highlight(dtResult.Rows(i).ToString, s)
' syntax error here
..
I want to plot multiple data sets on the same scatter plot:
cases = scatter(x[:4], y[:4], s=10, c='b', marker="s")
controls = scatter(x[4:], y[4:], s=10, c='r', marker="o")
show()
The above only s..
I am using pandas/python and I have two date time series s1 and s2, that have been generated using the 'to_datetime' function on a field of the df containing dates/times.
When I subtract s1 from s2
..
I'm using Websphere Portal 7.0 and creating a portlet with RAD 8.0. My portlet is trying to make a db2 connection to a remote server. I wrote a java program locally to do a basic JDBC connection to th..
I'm using eSpeak on Ubuntu and have a Python 2.7 script that prints and speaks a message:
import subprocess
text = 'Hello World.'
print text
subprocess.call(['espeak', text])
eSpeak produces the de..
Does the 'gaussian' filter in MATLAB convolve the image with the Gaussian kernel? Also, how do you choose the parameters hsize (size of filter) and sigma? What do you base it on?..
I want to test that one of my ES6 modules calls another ES6 module in a particular way. With Jasmine this is super easy --
The application code:
// myModule.js
import dependency from './dependency';
..
I am trying to test to see whether a Javascript variable is undefined.
You will see that I am not expecting the value of predQuery[preId] to be 'undefined' if I don't first get an alert saying "its u..
What is the method for redirecting the user to a completely external URL in Angular 2. For example, if I need to redirect the user to an OAuth2 server in order to authenticate, how would I do that?
..
I have a spreadsheet that i use to determine when/what clients to contact when an issue arises. in the first workbook i insert a column every day and paste in information about any questionable habits..
Hi I want to set table height 100% to its parent div without define height in div. My code is not working. I dont know what I am missing. Fiddle link
<div style="overflow:hidden">
<div style..
What am I missing?
This query is returning duplicate data over and over again. The count is correct for a complete total, but I am expecting one row, and yet I am getting the value repeated about 40..
I have a MacBook Pro that I'm trying to do some development on.
I have a program I want to build, and when I went to use make to build it, I got a "command not found" error. I did some googling and S..
I modified a lot of options in IIS, and would like to reset its settings to default.
I already tried installing/reinstalling it. After the reinstall, it still had the site I created. It was still br..
What's the most reliable way to have Javascript communicate between tabs/windows of the same browser? For example, when Tab 2 starts audio playback, Tab 1 somehow knows about this and can pause it's p..
I'm trying to pull code from my GitHub repo onto my server, but the pull keeps failing because of merge conflicts. I don't want to keep any of the changes that may have occurred on my local server sin..
I already have a project which is ready to build. Currently, I am using visual studio 2013.
But, I don't know how to create an MSI setup in visual studio 2013, but for visual studio 2010 there are pl..
I'm trying to process incoming JSON/Ajax requests with Django/Python.
request.is_ajax() is True on the request, but I have no idea where the payload is with the JSON data.
request.POST.dir contains ..
I have tried very hard but cannot find a solution on how to set session timeout value for in-process session for an ASP.Net web application.
I am using VSTS 2008 + .Net 3.5 + C#. Here is what I wrote..
How to disable a textbox in CSS?
Currently we are having a textbox in our view which can be enabled/disabled depending on a property in the model.
We are having asp.net MVC view; depending on the valu..
I have application A defined as below:
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name="com.example.MyExampleActivity"
a..
I have a model which has a date time field:
date = models.DateField(_("Date"), default=datetime.now())
When I check the app in the built in django admin, the DateField also has the time appended to..
I'm creating a jquery plugin and I want to verify an external script is loaded. This is for an internal web app and I can keep the script name/location consistent(mysscript.js). This is also an ajaxy ..
I'm creating a basic PHP calculator that lets you enter two values and chose your operator then displays the answer. Everything is working fine except it's not outputting the answer to the browser.
H..
I would like to know how to view special characters while using 'less' command. For instance I want to see the non-printable characters with a special notation. For instance in 'vi' editor I use "se..
I have this error when trying to browse php files locally
[Fri Apr 13 19:16:40 2012] [alert] [client 127.0.0.1] C:/AppServ/www/hr-website/.htaccess: Invalid command 'RewriteEngine', perhaps misspelle..
I was trying to figure out how to unit test if my the URLs of my controllers are properly secured. Just in case someone changes things around and accidentally removes security settings.
My controlle..
I try to validate array POST in Laravel:
$validator = Validator::make($request->all(), [
"name.*" => 'required|distinct|min:3',
"amount.*" => 'required|integer|min:1'..
I was calculating eigenvectors and eigenvalues of a matrix in NumPy and just wanted to check the results via assert(). This would throw a ValueError that I don't quite understand, since printing those..
I need to know if a Date is between a DateRange. I have three dates:
// The date range
DateTime startDate;
DateTime endDate;
DateTime dateToCheck;
The easy solution is doing a comparison, but is t..
How can I get a string after a specific substring?
For example, I want to get the string after "world" in my_string="hello python world , I'm a beginner " (which in this case it is..
Unlike check boxes, it is impossible for the user to deselect radio buttons once they are clicked. Is there any way so that they can be toggled programmatically using Javascript? This would be prefe..
I'm using the dompdf plugin for codeigniter: http://codeigniter.com/wiki/PDF_generation_using_dompdf/
to generate pdfs from a form. This works on localhost, but on the live server I get this in the e..
I want to use some buttons to show/hide multiple divs using jquery.
The page will initially show all divs. The idea then is that there will be a button to reset (show all) and then separate buttons t..
I have this code:
ALTER TABLE `settings`
ADD COLUMN `multi_user` TINYINT(1) NOT NULL DEFAULT 1
And I want to alter this table only if this column doesn't exist.
I'm trying a lot of different ways,..
I am using Python 3.5.2 version on Windows 7 and tried using python3 app.py. I am getting this error message:
'python3' is not recognized as an internal or external command,
operable program or batch ..
I have a java.util.Date in the format yyyy-mm-dd. I want it to be in the format mm-dd-yyyy
Below is the sample util I tried out for this conversion:
// Setting the pattern
SimpleDateFormat sm = new Si..
I am try to build an app with the integration of JPA and Struts. to do it need to access tomcat manager. But when I access URL http://localhost:8080/manager/html it gives 404 Error to me.
My tomcat-..
I'm using PHP. I have an array of objects, and would like to add an object to the end of it.
$myArray[] = null; //adds an element
$myArray[count($myArray) - 1]->name = "my name"; //modifies the el..
I see this a lot in tutorials, with navigation properties as ICollection<T>.
Is this a mandatory requirement for Entity Framework? Can I use IEnumerable?
What's the main purpose of using IColl..
I am using below command in Unix environment to connect to Oracle database:
sqlplus test/test@'(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname.com )(PORT=1521)))(CONNECT_DATA=(SID=my..
What is the best way to set the href attribute of the <a> tag at run time using jQuery?
Also, how do you get the value of the href attribute of the <a> tag using jQuery?..
I am new to Google Script.
I have a Google Sheet with 5 columns, on each column I need a button (with text 1,2,3,4,5).
And on each button click I need to set text of button to corresponding cell a..
I am working on a large project involving creating a worldwide hotel database with rich data such as Addresses, Images, Descriptions, Policies, Coordinates, Facilities, Reviews, Local area description..
I am trying to create an alert dialog with an EditText object. I need to set the initial text of the EditText programmatically. Here's what I have.
AlertDialog.Builder dialogBuilder = new AlertDialog..
I have set up PHP, MySQL, and Apache. localhost() for PHP and it is working well. But after I downloaded MySQL, it reports:
Fatal error: Call to undefined function mysql_connect()
How can I fix ..
I am playing with fragments in Android.
I know I can change a fragment by using the following code:
FragmentManager fragMgr = getSupportFragmentManager();
FragmentTransaction fragTrans = fragMgr.beg..
i want to seting paper size in fpdf to a half of letter size, it's approximately 8.5x5.5 inc. How can i do that?
My fpdf function in php language is
$pdf = new FPDF('P','mm','?????');
is..
I need to create an array of object literals like this:
var myColumnDefs = [
{key:"label", sortable:true, resizeable:true},
{key:"notes", sortable:true,resizeable:true},......
In a loop lik..
In my app I have a WebBrowser element.
I would like to load a local file in it.
I have some questions:
Where to place the HTML file (so that it will also be installed if a user executes the setup)..
I have a div <div id="masterdiv"> which has several child <div>s.
Example:
<div id="masterdiv">
<div id="childdiv1" />
<div id="childdiv2" />
<div id="childdiv..
I'm recently playing with bootsrap3. I compiled it from sources and included distr js and css to my project. The thing is, I see in GH dev tools, that it's trying to get .map.css file. Why does it wan..
I have a foreach loop and I want to see if there is a next element in the loop so I can compare the current element with the next. How can I do this? I've read about the current and next functions but..
I have a table that looks like this:
id count
1 100
2 50
3 10
I want to add a new column called cumulative_sum, so the table would look like this:
id count cumulative_sum
1 100 ..
I am using S3 to host a javascript app that will use HTML5 pushStates. The problem is if the user bookmarks any of the URLs, it will not resolve to anything. What I need is the ability to take all url..
I have some Javascript code that communicates with an XML-RPC backend.
The XML-RPC returns strings of the form:
<img src='myimage.jpg'>
However, when I use the Javascript to insert the string..
I have the following classes:
namespace Bla.Bla
{
public abstract class ClassA
{
public virtual void Setup(string thing)
{
}
public abstract bool IsThingVa..
I'm trying to set up a Spring JPA Hibernate simple example WAR for deployment to Glassfish.
I see some examples use a persistence.xml file, and other examples do not.
Some examples use a dataSource, a..
I need to create a script that automatically inputs a password to OpenSSH ssh client.
Let's say I need to SSH into myname@somehost with the password a1234b.
I've already tried...
#~/bin/myssh.sh
ss..
I have these definition in my function which work
class MyClass {
func myFunc() {
let testStr = "test"
let testStrLen = countElements(testStr)
}
}
But if I move 'testStr' an..
I'm experienced with PHP, JavaScript and a lot of other scripting languages, but I don't have a lot of experience with Java or Android.
I'm looking for a way to send POST data to a PHP script and dis..
How can I create a dotted or any type of hr line (double, dashed etc.) using CSS?
<hr style="...what should I write?..." />
or is there any other trick?..
Guys here's what I want to do and I have a little trouble doing it.
I have 1 Workbook where I want to collect data from different files doing something like this.
Do While THAT_DIFFERENT_FILE_SOMEWH..
I'm trying the following function in VBA/Excel:
Sub function_name()
button.enabled=false
Call Long_Function ' duration: 10sec
button.enabled=true
End Sub
For some reason, this button di..
If you have a java.io.InputStream object, how should you process that object and produce a String?
Suppose I have an InputStream that contains text data, and I want to convert it to a String, so fo..
I am trying to create an JSON object out of a PHP array. The array looks like this:
$post_data = array('item_type_id' => $item_type,
'string_key' => $string_key,
'string_value' => $s..
I have the source of a program (taken from cvs/svn/git/...) and I'd like to build a Debian/Ubuntu package for it. The package is present in the repositories, but:
It is an older version (lacking fea..
I'm not clear on what the following means (from the Git submodule update documentation):
...will make the submodules HEAD be detached, unless --rebase or --merge is specified...
How does --rebas..
I have .Net service that listens on single port over TCP protocol. Clients connect and then transmit data for some time (from few minutes to several hours).
Is there any limit on number of connectio..
I am using pandas as a db substitute as I have multiple databases (oracle, mssql, etc) and I am unable to make a sequence of commands to a SQL equivalent.
I have a table loaded in a DataFrame with so..
I have successfully downloaded and installed Genymotion and Virtualbox as well as a Virtual Device Image but I am unable to create a virtual device.I get an error message stating
Unable to create..
I just installed the Sublime Text under Windows Vista, and even following the advice given in this post, namely to explicitly set View > Syntax > JavaScript > JavaScript, I only see suggestio..
I have the following table schema;
CREATE TABLE `db1`.`sms_queue` (
`Id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`Message` VARCHAR(160) NOT NULL DEFAULT 'Unknown Message Error',
`CurrentState..
Is there any way that I can check if an element is visible in pure JS (no jQuery) ?
So, for example, in this page: Performance Bikes, if you hover over Deals (on the top menu), a window of deals appe..
Suppose you have a simple block of code like this:
app.get('/', function(req, res){
res.send('Hello World');
});
This function has two parameters, req and res, which represent the request and r..
I have a series of scripts running in parallel as a nohup on an AIX server hosting oracle 10g. These scripts are written by somebody else and are meant to be executed concurrently. All the scripts are..
I read "https://stackoverflow.com/questions/826734/when-do-ruby-instance-variables-get-set" but I'm of two minds when to use class instance variables.
Class variables are shared by all objec..
I'm trying to install Imagemagick on OSX Lion but something is not working as expected.
-> brew install imagemagick
/usr/local/git/bin/git
==> Cloning https://github.com/adamv/ImageMagick.git
..
The situation:
master is at X
quickfix1 is at X + 2 commits
Such that:
o-o-X (master HEAD)
\
q1a--q1b (quickfix1 HEAD)
Then I started working on quickfix2, but by accident took quick..
Can someone explain to me what is the exact difference between modal and push segue?
I know that when we use push the segue gets added to a stack, so when we keep using push it keeps occupying memory..
I have the following query which uses a date variable, which is generated inside the stored procedure:
DECLARE @sp_Date DATETIME
SET @sp_Date = DateAdd(m, -6, GETDATE())
SELECT DISTINCT pat.Publicati..
I have a very similar problem as described here.
I also upgraded a mixed solution of C++/CLI and C# projects from Visual Studio 2008 to Visual Studio 2010. And now in Visual ..
Please help me to translate this pseudo-code to real php code:
foreach ($arr as $k => $v)
if ( THIS IS NOT THE LAST ELEMENT IN THE ARRAY)
doSomething();
Edit: the array may have num..
My associative array:
$arr = array(
1 => "Value1",
2 => "Value2",
10 => "Value10"
);
Using the following code, $v is filled with $arr's values
foreach($arr as $v){
echo($v)..
What is a good way to find the index of an element in a list in Python?
Note that the list may not be sorted.
Is there a way to specify what comparison operator to use?..
I have a Table in SQL Server 2000 with BitValue Column. But, it is being displayed as True/False in SQL Server Management Studio. When I do a Select * from Tablename it returns the BitValue Column val..
If I have an array like this:
var arr = ['one','two','three'];
I can access different parts by doing this:
console.log(arr[1]);
How can I access object properties by their order rather than by k..
I'm setting an ad to my Android application using DoubleClick and can't manage to show the final ad, can someone help me?
When I test an ad by adding ".addTestDevice("xxx...")" I g..
I know this is very easy question, but I couldn't find the answer anywhere. Only answers are the ones using jQuery, not pure JS. I've tried the code below and it doesn't work. I don't know why.
var ..
I've been reading on this for a while and found that you can call a controller action by using:
$.ajax("MyController/MyAction", function(data) {
alert(data);
});
Does this mean I should add the..
I'm finding tons of good, crossbrowser anwers on how to SET the cursor or caret index position in a contentEditable element, but none on how to GET or find its index...
What I want to do is know the ..
I recently was introduced to a large codebase and noticed all string comparisons are done using String.Equals() instead of ==
What's the reason for this, do you think?..
I'm sending a request to server in the following form:
http://localhost:12345/api/controller/par1/par2
The request is correctly resolved to a method like:
[HttpPost]
public void object Post(string..
I have this regex:
if($string =~ m/^(Clinton|[^Bush]|Reagan)/i)
{print "$string\n"};
I want to match with Clinton and Reagan, but not Bush.
It's not working...
I have an input:
<input type="text" id="name" class="form-control" name="name" v-model="form.name" :disabled="validated ? '' : disabled">
and in my Vue.js component, I have:
..
..
ready() {..
How does passing a statically allocated array by reference work?
void foo(int (&myArray)[100])
{
}
int main()
{
int a[100];
foo(a);
}
Does (&myArray)[100] have any meaning or its j..
I want to select the formatted range of an Excel sheet.
To define the last and first row I use the following functions:
lastColumn = ActiveSheet.UsedRange.Column - 1 + ActiveSheet.UsedRange.Columns.C..
I'm trying to read a text from a text file, read lines, delete lines that contain specific string (in this case 'bad' and 'naughty').
The code I wrote goes like this:
infile = file('./oldfile.txt')
..
I develop web applications, which use a number of third party applications/code/services. As part of the job, we regularly check with the Full Disclosure mailing list http://seclists.org/fulldisclosu..
I installed a windows service using installUtil.exe.
After updating the code I used installUtil.exe again to install the service w/o uninstalling the original version first.
When I now try to unins..
Consider:
$ cat bla.py
u = unicode('d…')
s = u.encode('utf-8')
print s
$ python bla.py
File "bla.py", line 1
SyntaxError: Non-ASCII character '\xe2' in file bla.py on line 1, but no encoding de..
Ok,
I know all about array_pop(), but that deletes the last element. What's the best way to get the last element of an array without deleting it?
EDIT: Here's a bonus:
$array = array('a' => 'a'..
I have an anonymous type object that I receive as a dynamic from a method
I would like to check in a property exists on that object.
....
var settings = new {
Filename="temp.txt",
..
When one wants to refer to some part of a webpage with the "http://example.com/#foo" method, should one use
<h1><a name="foo"/>Foo Title</h1>
or
<h1 id="foo">Foo Title</..
I want to fill out a string with spaces. I know that the following works for zero's:
>>> print "'%06d'"%4
'000004'
But what should I do when I want this?:
'hi '
of course I can meas..
I run a query select @id=table.id from table and I need to loop over the results so I can exec a store procedure for each row exec stored_proc @varName=@id,@otherVarName='test'
How can I do this in a..
What difference is there between the WebClient and the HttpWebRequest classes in .NET? They both do very similar things. In fact, why weren't they merged into one class (too many methods/variables etc..
I have problem with IF statement inside MVC View. I am trying to use it for creating row for every three items.
<div class="content">
<div class="container">
@if (ViewBag.Articles !..
I couldn't find a straight answer to my question and need to know it from the real experts.
I had a website which urls were generated by Joomla. I believe that tons of urls are around in the search e..
Can someone post a simple example of starting two (Object Oriented) threads in C++.
I'm looking for actual C++ thread objects that I can extend run methods on (or something similar) as opposed to ca..
Hey I am new to python and am using tkinter for my gui. I am having trouble using the "after" method.
The goal is to make a random letter appear every 5 seconds.
Here is my code:
import random
impor..
I am doing some bash script and now I got one variable call source and one array called samples, like this:
source='country'
samples=(US Canada Mexico...)
as I want to expand the number of sources ..
I have data in a DataReader which I want to be converted to a List<T>.
What is a possible simple solution for this?
For e.g. in CustomerEntity class, I have CustomerId and CustomerName properti..
I have tried to different ways to clear a form:
<form action="service.php" id="addRunner" name="addRunner" method="post">
First Name: <input type="text" name="txtFirstName" id="txtFirstName"..
I am curious to know, is it true that it is better to assign a class name to the <img> tag in the html file instead of writing it down directly into css file?
<div class="column">
<..
I am trying to download mongodb and I am following the steps on this link.
But when I get to the step:
sudo apt-get install -y mongodb-org
I get the following error:
Reading package lists... Done..
Is there a way to get the previous state of the current state?
For example I would like to know what the previous state was before current state B (where previous state would have been state A).
I..
I'm attempting to capture arrow key presses in jQuery, but no events are being triggered.
$(function(){
$('html').keypress(function(e){
console.log(e);
});
});
This generates events..
If I want to use the BatchNormalization function in Keras, then do I need to call it once only at the beginning?
I read this documentation for it: http://keras.io/layers/normalization/
I don't see w..
I am developing an app and I know my database *.db will appear in data/data/com.****.***
I can access this file from AVD in Eclipse with help of sqlite manager
But I can't access this file in my Andro..
I have incorporate SpatialIite into a Xcode project which uses a header file from Proj.4, just one header. Both are Xcode projects and have static targets.
I'm trying to migrate from git submodule to..
This is a general question, but particularly I am interested in it's use for Android. What is a keystore file, and what is it used for?
Can multiple Android applications use the same keystore to sign..
I have written a batch script to replace a string in text file.
Following is the script.
@echo off &setlocal
set "search=%1"
set "replace=%2"
set "textfile=Input.txt"
set "newfile=Output.txt"
(f..
In Python I'm getting the following error:
UnboundLocalError: local variable 'total' referenced before assignment
At the start of the file (before the function where the error comes from), I declar..
I am working on a new Android project (Java), and created an Object with a large number of variables. Since I am planning to add getters and setters for all of them, I was wondering: is there a shortc..
I have this string:
Dim stringToCleanUp As String = "bon;jour"
Dim characterToRemove As String = ";"
I want a function who removes the ';' character like this:
Function RemoveCharacter(ByVal strin..
Is it possible to add a file (not necessarily a jar file) to java classpath at runtime.
Specifically, the file already is present in the classpath, what I want is whether I can add a modified copy of ..
I know there is a hr (horizontal rule) in html, but I don't believe there is a vr (vertical rule). Am I wrong and if not, why isn't there a vertical rule?..
I'm trying to run example from Celery documentation.
I run: celeryd --loglevel=INFO
/usr/local/lib/python2.7/dist-packages/celery/loaders/default.py:64: NotConfigured: No 'celeryconfig' module found..
How do I check if a column is empty or null using a SQL select statement?
For instance, if I want to check:
select * from UserProfile WHERE PropertydefinitionID in (40, 53) and PropertyValue is null..
I am using ajax call to perform functionality in a service file and if the response is successful, I want to redirect the page to another url. Currently, I am doing this by plain JS code window.locati..
How do you underline html text so that the line beneath the text is dotted rather than the standard underline? Preferably, I would like to do this without using a separate CSS file. I'm a novice at ht..
Is it possible to forward-declare a function in Python? I want to sort a list using my own cmp function before it is declared.
print "\n".join([str(bla) for bla in sorted(mylist, cmp = cmp_configs..
What is the difference between ref and out parameters in .NET? What are the situations where one can be more useful than the other? What would be a code snippet where one can be used and another can't..
I have several places with their latitude and longitude. I want to display them in google map. Thats ok, what i can't is to display the marker at the specific lat,long position.
e.g. if i've the foll..
I'm trying to setup an environment for a Node.js app. but I'm getting this error every time.
"NODE_ENV" is not recognized as an internal or external command,
operable command or batch file.
W..
I have written a small program that interacts with a server on a specific port. The program works fine, but:
Once the program terminated unexpectedly, and ever since that socket connection is shown i..
The following PowerShell code
#Get a server object which corresponds to the default instance
$srv = New-Object -TypeName Microsoft.SqlServer.Management.SMO.Server
... rest of the script ...
Gives t..
How do I declare a variable for use in a PostgreSQL 8.3 query?
In MS SQL Server I can do this:
DECLARE @myvar INT
SET @myvar = 5
SELECT *
FROM somewhere
WHERE something = @myvar
How do I do the s..
To working my static file (CSS, JS) I have to write absolute path like /AppName/templates/style/main.css. Is there any solution, that I could write relative path like style/main.css?..
In javadoc for ConcurrentHashMap is the following:
Retrieval operations (including get) generally do not block, so may overlap with update operations (including put and remove). Retrievals reflect..
I want to create unit tests easily by just selecting method. Is there a tool in eclipse that does that. It should support templates. I should be able to create positive test as well as negative tests...
The title is my question. I googled and try something like
mysql> !\ clear
mysql> !\ cls
mysql> system cls
mysql> system clear
blah blah ...
but none of them works.
anyone show me how..
In my app, I have a requirement to format 12 hours time to 24 hours time. What is the method I have to use?
For example, time like 10:30 AM. How can I convert to 24 hours time in java?..
I have a JavaScript file (extension .js, not .html) containing several JavaScript functions.
I want to call one of the PHP functions in a PHP file containing only several PHP functions from within on..
I have several input checkboxes, (they name is same for send array on server).
So, I need get each value this checkboxes and I want use as selector checkbox names, this not works, help please.
<f..
In Windows, JAVA_HOME must point to the JDK installation folder (so that JAVA_HOME/bin contains all executables and JAVA_HOME/libs contains all default jar libraries).
If I download Sun's JDK bundle ..
I'm using Tortoise SVN to update and commit changes to the repository in the server whenever I make changes to my working copy. But from a few days I'm not able to commit the changes and I get the fol..
what is the easiest way to convert a Blob into a byte array?I am using MYSQL and i want to convert a Blob datatype into a byte array.
Iam using java programming language:)..
I've got a sproc (MSSQL 2k5) that will take a variable for a LIKE claus like so:
DECLARE @SearchLetter2 char(1)
SET @SearchLetter = 't'
SET @SearchLetter2 = @SearchLetter + '%'
SELECT *
FROM Bran..
Just wondering - how using jQuery - I can get an elements formatted total padding and margin etc ? i.e. 30px 30px 30px 30px or 30px 5px 15px 30px etc
I tried
var margT = jQuery('img').css('margin')..
Possible Duplicate:
What is dependency injection?
Spring is the framework from where the concept Dependency Injection came to picture.
What is purpose of DI ? How does it benefit ? How is ..
I have a file that can contain from 3 to 4 columns of numerical values which are separated by comma. Empty fields are defined with the exception when they are at the end of the row:
1,2,3,4,5
1,2,3,,..
Is there a nicer way of converting a number to its alphabetic equivalent than this?
private String getCharForNumber(int i) {
char[] alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray();
if (..
I want to convert a String to Date in SAS, I tried:
data _null_;
monyy = '05May2013';
date = input(substr(strip(monyy),1,9),yymmdd.);;
put date=date9.;
run;
But it did not work. Can..
I am making a Windows Forms application. I have a form. I want to open a new form at run time from the original form on a button click. And then close this new form (after 2,3 sec) programatically but..
I have reached the end of my rope with CMake; it has so much potential, but I cannot seem to make it find the basic system tools (i.e. make) in order to function.
SYMPTOMS
CMake and the CMake GUI pr..