When do we use AtomicReference?
Is it needed to create objects in all multithreaded programs?
Provide a simple example where AtomicReference should be used...
I am using the following setup
macOS v10.14 (Mojave)
Python 3.7.1
Visual Studio Code 1.30
Pylint 2.2.2
Django 2.1.4
I want to use linting to make my life a bit easier in Visual Studio Code. However,..
When I create a graph after using range.copy and range.paste it leaves the paste range selected, and then when I create a graph a few lines later, it uses the selection as the first series in the plot..
I am attempting to work through a tutorial from Programmer Bruce that is supposed to allow the deserialization of polymorphic JSON.
The complete list can be found here
Programmer Bruce tutorials (Gr..
I want to insert a .jpg image(that is in my current folder, where the .tex file is) after a paragraph. How can I do it in Latex? What should I include / what commands should I use?..
I'm not that great with maths and C# doesn't seem to provide a power-of function
so I was wondering if anyone knows how I would run a calculation like this:
var dimensions = ((100*100) / (100.00^3.00..
I am trying to change font family and font size of the text that appears in a textarea and a container by choosing the font from the list, font size should be fixed. I am also trying to change color o..
Why in this millennium should Python PEP-8 specify a maximum line length of 79 characters?
Pretty much every code editor under the sun can handle longer lines. What to do with wrapping should be the ..
After updating to Android Studio 2 when I try to run my application and choose an emulator, I wait for the emulator to start and it suddenly gets killed. I can see emulator process for some minutes bu..
I need to branch my T-SQL stored procedure (MS SQL 2008) control flow to a number of directions:
CREATE PROCEDURE [fooBar]
@inputParam INT
AS
BEGIN
IF @inputParam = 1
BEGIN
...
END
ELS..
I have a list of countries, some with a very long name:
<select name=countries>
<option value=af>Afghanistan</option>
<option value=ax>Ă…land Islands</option>
...
&l..
Possible Duplicate:
Why should the interface for a Java class be prefered?
When should I use
List<Object> list = new ArrayList<Object>();
ArrayList inherits from List, so if..
So I have a table that has the month and year broken down, for example field called Month has the number 7 in it (this month) and the Year field has 2011. Theres also additional months years, etc. How..
Currently I have an input box which will detect the URL and parse the data.
So right now, I am using:
var urlR = /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)
(?::(\d+))?(?:\/([^?#]*))?(?..
I write
<string name="magazine">Newspaper & Magazines</string>
in strings.xml
But the Compiler says:
The entity name must immediately follow the '&' in the entity refere..
I need to load an animated Gif image from a URL in UIImageview.
When I used the normal code, the image didn't load.
Is there any other way to load animated Gif images?..
I'm very new to C++ and struggling to figure out how I should iterate through a list of objects and access there members.
I've been trying this where data is the list and student a class.
std::list&..
LIST = ['Python','problem','whatever']
print(LIST)
When I run this program I get
[Python, problem, whatever]
Is it possible to remove that square brackets from output?..
I am trying to install django-heroku using pip, but it keeps running into an error.
I have seen suggestions telling me to make sure my Python version in Heroku is up to date. I have already done that...
I want to make sure I'm not inserting a duplicate row into my table (e.g. only primary key different). All my fields allow NULLS as I've decided null to mean "all values". Because of nulls, the foll..
I have the following logback.xml file:
<configuration debug="true">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SS..
How can I trigger a $watch variable in an Angular directive when manipulating the data inside (e.g., inserting or removing data), but not assign a new object to that variable?
I have a simple dataset..
I wanted to test if a key exists in a dictionary before updating the value for the key.
I wrote the following code:
if 'key1' in dict.keys():
print "blah"
else:
print "boo"
I think this is not ..
I am trying to compile software on Blue Gene Q using IBM XL compilers and I got this error message:
"iostreams/zlib.cpp", line 19.10: 1540-0836 (S) The #include file "zlib.h" is not found.
make[3]: *..
I am trying to do some deep learning work. For this, I first installed all the packages for deep learning in my Python environment.
Here is what I did.
In Anaconda, I created an environment called..
hello i am new to phpexcel,
and i was wondering if there is some way send the excel i have created to the clients download without saving it on my server or to delete it right after he downloads it
..
I am trying to compare two Ruby Hashes using the following code:
#!/usr/bin/env ruby
require "yaml"
require "active_support"
file1 = YAML::load(File.open('./en_20110207.yml'))
file2 = YAML::load(Fi..
Theory question here:
Why does specifying table.field IS NULL or table.field IS NOT NULL not work on a join condition (left or right join for instance) but only in the where condition?
Non working E..
I work on a somewhat large web application, and the backend is mostly in PHP. There are several places in the code where I need to complete some task, but I don't want to make the user wait for the re..
Possible Duplicate:
How to add number of days to today's date?
I'm confused, I found so many different approaches, and which of them is actually correct?
So what is the correct way to..
I used a cocoa static library in my application. When I compile my library I got the following error:
Shell Script invocation error:can't open input file:
/Users/sijuthomas/Library/Developer/Xcode/De..
Recently, when I compile my scss files I get an error. The error message says:
Browserslist: caniuse-lite is outdated. Please run next command npm update caniuse-lite browserslist
First, as the ..
I am trying to make a view in android with rounded edges. The solution I found so far is to define a shape with rounded corners and use it as the background of that view.
Here is what I did, define a..
I have a batch script that executes a task and sends the output to a text file. Is there a way to have the output show on the console window as well?
For Example:
c:\Windows>dir > windows-dir..
I'm trying to get my head around MySQli and I'm confused by the error reporting.
I am using the return value of the MySQLi 'prepare' statement to detect errors when executing SQL, like this:
$stmt_te..
When I use Git Bash (on Windows), I cannot run any executable without specifying its full path, although it is located in a folder which is in my PATH variable. Looks like bash doesn't recognize it. W..
Below are the sample code block i use.
I have two set of css, and want to apply onto two UL component.
however, the result come out, the inner "UL" will hold some of the css which defined for its pare..
In Swift, how does one call Objective-C code?
Apple mentioned that they could co-exist in one application, but does this mean that one could technically re-use old classes made in Objective-C whilst ..
I have two controllers and share data between them with an app.factory function.
The first controller adds a widget in the model array (pluginsDisplayed) when a link is clicked. The widget is pushed ..
I C# we do it through reflection. In Javascript it is simple as:
for(var propertyName in objectName)
var currentPropertyValue = objectName[propertyName];
How to do it in Python?..
I am getting expected notices and warnings and would like to turn them off in my PHP file. The error is:
Warning: fsockopen()
And the notice are:
Notice: A non well formed numeric value encountere..
So I have this query working (where signal_data is a column) in Sybase but it doesn't work in Microsoft SQL Server:
HEXTOINT(SUBSTRING((INTTOHEX(signal_data)),5,2)) as Signal
I also have it in Exce..
I'm trying to find a short way to see if any of the following items is in a list, but my first attempt does not work. Besides writing a function to accomplish this, is the any short way to check if on..
Today I was teaching a couple of friends how to use C structs. One of them asked if you could return a struct from a function, to which I replied: "No! You'd return pointers to dynamically malloc..
I have this search in Rails 3:
Note.where(:user_id => current_user.id, :notetype => p[:note_type], :date => p[:date]).order('date ASC, created_at ASC')
But I need the :date => p[:date] ..
In Python, I'm trying to run a method in a class and I get an error:
Traceback (most recent call last):
File "C:\Users\domenico\Desktop\py\main.py", line 8, in <module>
fibo.f()
TypeErr..
I was wondering if there is a way to save my Subversion password when doing svn operations from the console. The console is the only option that I have. When I try to do any Subversion action, e.g. sv..
I am using Visual Studio Code on my Windows 10 PC. I want to change my default terminal from Windows PowerShell to Bash on Ubuntu (on Windows).
How can I do that?..
In Java, we can use indexOf and lastIndexOf. Since those functions don't exist in PHP, what would be the PHP equivalent of this Java code?
if(req_type.equals("RMT"))
pt_password = message.substri..
I'm wondering if this is actually a bug in the Android API:
I have a setup like so:
+--------------+
| | |
| 1 | 2 |
| |+-------+|
| || ||
| || 3 ||
+-----------..
I want to take runtime input from user in Oracle 10g PL/SQL blocks (i.e. interactive communication with user). Is it possible?
declare
x number;
begin
x=&x;
end
this code gives error as
& ca..
I am writing a program in java which would execute winrar and unzip a jar file for me placed in h:\myjar.jar into the folder h:\new. My java code goes something like this
import java.io.File;
import ..
How can I check if any of the strings in an array exists in another string?
Like:
a = ['a', 'b', 'c']
str = "a123"
if a in str:
print "some of the strings found in str"
else:
print "no strings f..
I have a Dictionary below:
colors = {
"blue" : "5",
"red" : "6",
"yellow" : "8",
}
How do I index the first entry in the dictionary?
colors[0] will return a KeyError for obvious reason..
I am currently working on a slide with an animation of sunrise to sunset as a background.
Then there are some pictures fade in and fade out.
Now, I am having difficult to loop the series of animation..
I am trying to incorporate Spring-Data-JPA into my project.
One thing that confuses me is how do I achieve setMaxResults(n) by annotation ?
for example, my code:
public interface UserRepository extend..
In jQuery, is there a simple way to test if ANY of a form's elements have changed?
EDIT: I should have added that I only need to check on a click() event.
EDIT: Sorry I really should have been more ..
I understand that hardware will limit the amount of memory allocated during program execution. However, my question is without regard to hardware. Assuming that there was no limit to the amount of mem..
I'm creating a web service using Web API. I implemented a simple class
public class ActivityResult
{
public String code;
public int indexValue;
public int primaryCodeReference;
}
And th..
I am downloading a file using the wget command. But when it downloads to my local machine, I want it to be saved as a different filename.
For example: I am downloading a file from www.examplesite.com..
I learned from books that you should write for loop like this:
for(var i=0, len=arr.length; i < len; i++){
// blah blah
}
so the arr.length will not be calculated each time.
Others say th..
I'm trying to add/delete table rows following this example and this example.
Here's my code:
HTML Form
<div id="POItablediv">
<input type="button" id="addPOIbutton" value="Add P..
I have two vectors, one with values and one with class labels like 1,2,3 etc.
I would like to plot all the points that belong to class 1 in red, to class 2 in blue, to class 3 in green etc. How can ..
I have a function (tointarray) to convert a string into an array of ints, but I am not very satisfied with it. It does the job, but there must be a more elegant way to do this, and perhaps LINQ could ..
I've got this error:
A connection was successfully established with the server, but then an error occurred
during the login process. (provider: Shared Memory Provider, error: 0 - No process is
on the..
Well first of all I found couple of answers while googling but most of the forums are blocked in my Office Network hence asking this question here! One more intention is to get an answer in plain Engl..
Whenever I start up Eclipse Juno, it gives me an error saying:
An error had occured. Please see the log file:
C:\Program Files\eclipse\configuration\1362989254411.log.
Some websites say to ..
What would be the best way to list all the files in one directory with PHP? Is there a $_SERVER function to do this? I would like to list all the files in the usernames/ directory and loop over that r..
I have the following test Script to display the current date & time :-
document.getElementById("para1").innerHTML = formatAMPM();
function formatAMPM() {
var date = new Date();
var hours..
In my MySQL database, I have a table with structure
username - varchar
insert_time - timestamp
This table was created in MySQL using the phpMyAdmin tool and for the insert_time column, I have menti..
When should a trailing slash be used in a URL? For example - should my URL look like /about-us/ or like /about-us?
I am fully aware of the SEO-related issues - duplicate content and the canonical thi..
I have an action class that generates a PDF. The contentType is set appropriately.
public class MyAction extends ActionSupport
{
public String execute() {
...
...
File report = signed..
I am trying to incorporate an autocomplete feature in Vim. I have used the omnicompletion of Vim as well as Pydiction. But in both the cases this message pops up:
Omni completion (^O^N^P) Pattern not..
I can do
>>> os.path.join("c:/","home","foo","bar","some.txt")
'c:/home\\foo\\bar\\some.txt'
But, when I do
>>> s = "c:/,home,foo,bar,some.txt".split(",")
>>> os.path.jo..
In a Windows Forms application, a drop-down selector list also gives the user the option of typing an alternate value into that same field (assuming the developer has left this option enabled on the c..
For some reason my Eclipse console no longer displays Log4j INFO and DEBUG statements when I run JUnit tests.
In terms of code there hasn't been any change, so it must something to do with the Eclipse..
I'm trying to pass "this" from a clicked span to a jQuery function that can then execute jQuery on that clicked element's first child. Can't seem to get it right...
<p onclick="toggleSection($(thi..
My situation is very simple. Somewhere in my code I have this:
dynamic myVariable = GetDataThatLooksVerySimilarButNotTheSame();
//How to do this?
if (myVariable.MyProperty.Exists)
//Do stuff
So..
I have an array prLst that is a list of integers. The integers are not sorted, because their position in the array represents a particular column on a spreadsheet. I want to know how I find a particu..
Hey I got problem in running .NET framework 4.0 website on IIS7.0.
the error I got is like:
HTTP Error 404.2 - Not Found "The page you are requesting cannot be served because of the ISAPI and CGI Res..
How to get gateway IP details , There is option using wifimanager but. If there is no wify how to find gateway,dns and other details in android device when connected using usb tethering...
Possible Duplicate:
Help with deadlock in Sql Server 2008
SQLServer automatically logs all deadlocks. Can anyone help me to get sql query which will capture deadlocks data that is being co..
I have no idea what the problem is. Using MySQL 5.0 I get a compile error when attempting to run the following MySQL update query:
UPDATE b
SET b.mapx = g.latitude,
b.mapy = g.longitude
FROM busi..
I have two postcodes char* that I want to compare, ignoring case.
Is there a function to do this?
Or do I have to loop through each use the tolower function and then do the comparison?
Any idea how ..
I am trying to pass the data between Activities
I use intents to pass data between regular activities
consider the code below::
AndroidTabRestaurantDescSearchListView.java
public class AndroidTabR..
a very easy question: considering an If...Then...Else instruction in VBA, how can I separate multiple instructions after Then? In other words, should I write something like
If condition [ Then ]
..
here's my code. It correctly adds the pictures I want and everything works except that the images are using their native resolution, so if the image is big it's being cropped to fit the page.
Is ther..
I'm using virtualenv and the virtualenvwrapper. I can switch between virtualenv's just fine using the workon command.
me@mymachine:~$ workon env1
(env1)me@mymachine:~$ workon env2
(env2)me@mymachine..
I have data in a MySQL database. I am sending the user a URL to get their data out as a CSV file.
I have the e-mailing of the link, MySQL query, etc. covered.
How can I, when they click the link, ha..
I know it's possible to check whether the value of a text box or variable is numeric using try/catch statements, but IsNumeric is so much simpler. One of my current projects requires recovering value..
I need to build a project for drawing on canvas by fingers,
to get the touch event and motion event of my finger, and thence draw.
Any one can advice me how to get start in project,
and what is bes..
I am trying to get a PHP array variable into a JavaScript variable.
This is my code:
<html>
<head>
<script type="text/javascript">
function drawChart(row,..
In Excel 2003 there used to be a command that I added to my toolbar that was called Address (if I remember correctly) and it would show the fully-qualified network path to the file I had open. For ex..
I have a JsonObject named "mapping" with the following content:
{
"client": "127.0.0.1",
"servers": [
"8.8.8.8",
"8.8.4.4",
"156.154.70.1",
"156.154.71.1"
..
I am using this part of code to ping an ip address in java but only pinging localhost is successful and for the other hosts the program says the host is unreachable.
I disabled my firewall but still ..
I'm using IE 8 on Vista, and everytime I change a javascript file and then start debugging, I have to hit Ctrl+F5 to have it reload my javascript. Is there any way to make it automatically reload java..
I have a photo type (not landscape) background image with 979px width by 1200px height. I would like to set it to float left and show 100% full image height fixed, without the need to scroll up/down (..
Looking the "Array" section in the bash(1) man page, I didn't find a way to slice an array.
So I came up with this overly complicated function:
#!/bin/bash
# @brief: slice a bash array
# @arg1: ou..
I'm currently learning how to use new Cloud Functions for Firebase and the problem I'm having is that I can't access the function I wrote through an AJAX request. I get the "No 'Access-Control-Allow-O..
Could someone give me some guidance on when I should use WITH (NOLOCK) as opposed to SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
What are the pros/cons of each? Are there any unintended consequ..
The issue I believe is how CurrentDay is entered. It was previously created as:
Transaction <- function(PnL, Day)
results <- list(a = PnL, b = Day)
return(results)
Both PnL and Day are nu..
I want every character to be a different color.
for example,
cout << "Hello world" << endl;
H would be red
e would be blue
l would be orange
and so on.
I know this can be done, I ju..
Refered to https://angular.io/docs/ts/latest/guide/displaying-data.html and stack How to check empty object in angular 2 template using *ngIf still getting syntax error self context undefined. If I re..
There's a File object in JavaScript. I want to instantiate one for testing purposes.
I have tried new File(), but I get an "Illegal constructor" error.
Is it possible to create a File object ?
F..
How do I upgrade OpenSSL in CentOS 6.5?
I have used these commands, but nothings happens:
cd /usr/src
wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz
tar -zxf openssl-1.0.1g.tar.gz
cd o..
There are n people numbered from 1 to n. I have to write a code which produces and print all different combinations of k people from these n. Please explain the algorithm used for that. ..
I have an EditText and a Button in my layout.
After writing in the edit field and clicking on the Button, I want to hide the virtual keyboard when touching outside the keyboard. I assume that this is ..
I'd like to browse through the current folder and all its subfolders and get all the files with .htm|.html extensions. I have found out that it is possible to find out whether an object is a dir or fi..
I have two bits of code. First a standard copy paste from cell A to cell B
Sheets(sheet_).Cells(x, 1).Copy Destination:=Sheets("Output").Cells(startrow, 2)
I can do almost the same using
Sheets("..
I am getting following error when I open my site which is made using laravel 5
Fatal error: Class 'Illuminate\Foundation\Application' not found in C:\cms\bootstrap\app.php on line 14
I have trie..
How can I achieve the equivalents of SQL's IN and NOT IN?
I have a list with the required values.
Here's the scenario:
df = pd.DataFrame({'country': ['US', 'UK', 'Germany', 'China']})
countries_to_kee..
I am using PHP 5.5 and MAMP (downloaded from here):
I have a basic script like this:
<?php
$servername = "127.0.0.1";
$username = "root";
$password = "root";
// Create connection
$conn = mysqli_..
I've got some links that I want to select class and id at the same time.
This is because I've got 2 different behaviours. When a class of links got one class name they behave in one way, when the sam..
Basically, I was taught on how to create a root password using the "mysqladmin -u root -p password" command, this was done all through the windows command editor. Now, the next process was to display ..
I need to disable Home and other system buttons in my Android application.
Example: MX Player (see at Google Play) - you can press "lock" icon at player screen and it locks all hardware and software ..
I'm inside a big function I have to write. In the last part I have to calculate the mean of a column in a data frame. The name of the column I am operating on is given as an argument to the function...
In the Chrome's developer pane, I can see these css settings of an element.
As far as I can see, every single font-family value is inherit.
How can I find what is the actual value of the font fam..
There's already a solution for writing file JSON online but I want to save json file locally.
I've tried to use this example http://jsfiddle.net/RZBbY/10/
It creates a link to download the file, using..
I've tried the following with no success:
function a(args){
b(arguments);
}
function b(args){
// arguments are lost?
}
a(1,2,3);
In function a, I can use the arguments keyword to access a..
I'm loading my files (pdf, doc, flv, etc) into a buffer and serving them to my users with a script. I need my script to be able to access the file but not allow direct access to it. Whats the best w..
I would like to sort a data frame by alphabetic order of a character variable in R. I've tried to do it with the order() function but it transforms my data frame into a list. Does anyone has a clue ?..
I am in the process of setting up node.js in order to work with a framework like Meteor, Derby, or Ember, but am running into some problems early on. Following these instructions (http://www.nodebegin..
Is there a command like cat in linux which can return a specified quantity of characters from a file?
e.g., I have a text file like:
Hello world
this is the second line
this is the third line
And ..
I have a multi-index data frame with columns 'A' and 'B'.
Is there is a way to select rows by filtering on one column of the multi-index without resetting the index to a single column index?
For ..
Is there anyway to get the full-size profile picture using any facebook api?
http://graph.facebook.com/{ID}/picture?type=large is way to small.
Thanks :)..
I'm trying to retain the first 2 child elements on the same row while the third element is in its own below at full width, all while using flex.
I'm particularly interested in using the flex-grow and..
I'm getting the error below when I try and access SSRS on SQL Server 2008 R2
I'm not sure how many others have started using SQL 2008 R2 SSRS, but I am having an issue with getting the error below wh..
I created a div element, that I placed all the way on the right of my site. The only problem is that its at the top of the site, so if i scroll down it remains there.
How can I force it to remain in ..
I can get the number of columns in an SQL Server database with this:
SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 'Address'
But is there any way (for an unknown number of colu..
I have two integers x and y. I need to calculate x/y and as outcome I would like to get float. For example as an outcome of 3/2 I would like to have 1.5. I thought that easiest (or the only) way to do..
I have a git checkout. All the file permissions are different than what git thinks they should be therefore they all show up as modified.
Without touching the content of the files (just want to modif..
I have this input field
<input name="question"/> I want to call IsEmpty function when submit clicking submit button.
I tried the code below but did not work.
any advice?
_x000D_
_x000D_
<h..
Every now and then I see a web site that has an old copyright date. In my mind, I always think "Look at the sucker who forgot to update his copyright year!" Then, while I was hard-coding a copyright y..
I want to navigate from the root directory to all other directories within and print the same.
Here's my code:
#!/usr/bin/python
import os
import fnmatch
for root, dir, files in os.walk("."):
..
I have been developing an app for 1 or 2 weeks now and just yesterday I have updated my iPhone 5S to the iOS 8 GM. Everything worked fine and I could test on my device as well until I deleted the app ..
<input name="foo[]" ... >
I've used these before, but I'm wondering what it is called and if there is a specification for it?
I couldn't find it in the HTML 4.01 Spec and results in various G..
Every time I develop a new form that includes a textarea I have the following dilemma when I need to specify its dimensions:
Use CSS or use the textarea's attributes cols and rows?
What are the pros..
When I print a numpy array, I get a truncated representation, but I want the full array.
Is there any way to do this?
Examples:
>>> numpy.arange(10000)
array([ 0, 1, 2, ..., 9997,..
I'm creating a local PowerShell module downloader script. The module and the script are held on a network share. The script is invoke using:
& '\\net\DSFShare\Shared Data\Powershell Modules\Ins..
I have this multi-line string (quotes included):
abc'asdf"
$(dont-execute-this)
foo"bar"''
How would I assign it to a variable using a heredoc in Bash?
I need to preserve newlines.
I don't want t..
I have 3 Columns of ULs each a Dynamic UL container that can have anywhere from 0-9 LI containers (eventually more). All my LI elements have an attribute "rel" which I am trying to ultimately find tha..
Does anyone know where I can find older versions of the Android NDK? Our code doesn't build with r6. Surely there must be archived versions somewhere...
This is a very basic question, I just can not seem to find an answer.
I have a dataframe like this, called df:
A B C
a.1 b.1 c.1
a.2 b.2 c.2
a.3 b.3 c.3
Then I extract all..
Can you overlay a view on top of everything in android?
In iPhone I would get the new view set its frame.origin to (0,0) and its width and height to the width and height of self.view. Adding it to se..
I'm having a particular issue with the jQuery Datepicker. I can easily add a date range, but I want the selectable range to change depending on the event the user has picked.
So if they pick event #1..
I have a DateTime which I want to format to "2009-09-01T00:00:00.000Z", but the following code gives me "2009-09-01T00:00:00.000+01:00" (both lines):
new DateTime(2009, 9, 1, 0, 0, 0, 0, DateTimeKind..
I've always been sort of confused on the subject of directory traversal in Python, and have a situation I'm curious about: I have a file that I want to access in a directory essentially parallel to th..
I'm trying to get an onClickListener to fire on a Spinner, but I get the following error:
Java.lang.RuntimeException is "Don't call setOnClickListener for an AdapterView. You probably want setOnIt..
I need to do a market research on specific type of apps. so is there a way for me to know the download count of the app / any app.
Is there a way to find the number of downloads for a particular app ..
I need to pass a resource ID to a method in one of my classes. It needs to use both the id that the reference points to and also it needs the string. How should I best achieve this?
For example:
R.d..
I wanted to use MOD function in SQL Server 2008R2 and followed this link but still got the message:
'MOD' is not a recognized built-in function name.
DECLARE @m INT
SET @m = MOD(321,11)
SELECT..
I am working with Spring MVC controller project. Below is my Controller and I have a constructor declared which I am specifically using for testing purpose.
@Controller
public class TestController {
..
I am trying to send a DELETE request with a url parameter using CURL. I am doing:
curl -H application/x-www-form-urlencoded -X DELETE http://localhost:5000/locations` -d 'id=3'
However, the server ..
I'm having some trouble working with dates on my Android application that uses SQLite.
I have a couple questions:
What type should I use to store dates in SQLite (text, integer, ...)?
Given the best..
I have a ToolStripMenuItem called myMenu. How can I access this like so:
/* Normally, I would do: */
this.myMenu... etc.
/* But how do I access it like this: */
String name = myMenu;
this.name...
..
I want to create a python function to test the time spent in each function and print its name with its time, how i can print the function name and if there is another way to do so please tell me
def ..
I've seen several posts for this issue but didn't found my solution.
I'm trying to serve static files within my Django 1.3 development environment.
Here are my settings
...
STATIC_ROOT = '/home/gli..
This is the error that I got when I created my first Axis2 web service using Eclipse. After I wrote the class, I created the web service with Apache Axis2. When I click the start server button in ecli..
I am new on react.js I have implemented one component in which I am fetching the data from server and use it like,
CallEnterprise:function(TenantId){
fetchData('http://xxx.xxx.xx.xx:8090/Enter..
Possible Duplicate:
Do you use NULL or 0 (zero) for pointers in C++?
Is it a good idea to use NULL in C++ or just the value 0?
Is there a special circumstance using NULL in C code calling ..
Is it possible to make a simple query to count how many records I have in a determined period of time like a year, month, or day, having a TIMESTAMP field, like:
SELECT COUNT(id)
FROM stats
WHERE re..
I have a simple textbox in which users enter number.
Does jQuery have a isDigit function that will allow me to show an alert box if users enter something other than digits?
The field can have decimal..
Actually I want to read the contents that come after the search query, when it is done. The problem is that the URL only accepts POST methods, and it does not take any action with GET method...
I hav..
In my code I need to find all my things that happened today. So I need to compare against dates from today at 00:00am (midnight early this morning) to 12:00pm (midnight tonight).
I know ...
Date to..
Working with xenserver, and I want to perform a command on each file that is in a directory, grepping some stuff out of the output of the command and appending it in a file.
I'm clear on the command ..
I am having trouble compiling and running my Java code, intended to allow me to interface Java with a shared object for Vensim, a simulation modeling package.
The following code compiles without erro..
This is an example of a bash script which checks for some running process (daemon or service) and does specific actions (reload, sends mail) if there is no such process running.
check_process(){
..
I'm using @font-face on my company's site and it works/looks great. Except Firefox and Chrome will throw a 404 error on the .woff file. IE does not throw the error. I have the fonts located at the roo..
I have used this jquery validation plugin for the following form.
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" src="http://jzaefferer...
I want to make a copy of an object, then after some logic, re-assign the original object the value of the copy.
example:
User userCopy = //make a copy
foreach(...)
{
user.Age = 1;
user.ID = -1;..
I have custom designed EditText
search_page.xml
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:p..
I have an angular foreach loop and i want to break from loop if i match a value. The following code does not work.
angular.forEach([0,1,2], function(count){
if(count == 1){
break;
}
});
How..
I want to convert a json string to a Object list. Please help me. it would be more helpful if done by NewtonJson.
I tried, but its not working. I dont want all the values of that json. just which are..
I have a container <div> with display: flex. It has a child <a>.
How can I make the child appear "inline"?
Specifically, how can I make the child's width determined by its content, an..
while True:
reply = input('Enter text')
if reply == 'stop': break
print(reply.upper())
The result was:
Enter text:Traceback (most recent call last):
File "C:\PythonProjects\5.py", li..
I am using a scope method in an angular ng-click directive like so:
<a ng-click="$navigate.go('#/path/obj.val1/obj.val2')">{{obj.val1}}, {{obj.val2}}</a>
The trouble here is that obj.va..
I would like to know how I can retrieve the list of people a user is following on Instagram. This is given that this particular user is someone that I follow. So I have access to his/her photos and hi..
I'm new to gesture recognizers so maybe this question sounds silly: I'm assigning tap gesture recognizers to a bunch of UIViews. In the method is it possible to find out which of them was tapped someh..
I'm trying to display a grayscale image using matplotlib.pyplot.imshow(). My problem is that the grayscale image is displayed as a colormap. I need the grayscale because I want to draw on top of the..
I'd like to create a fixed sidebar that exists outside my centered Bootstrap Grid. The challenge I face when attempting to do this is determining what additional styles to apply/overwrite to my .conta..