What is the difference between a Shared Project and a Class Library in Visual Studio 2015?
I was looking at the new features for Visual Studio 2015 and Shared Project came up a lot but I don't understand how it is different to using a Class Library or a Portable Class Library. Can anyone ex...
- Modified
- 4 Jun at 22:0
Is there a way to apply styles to Safari only?
I'm trying to find a way to apply CSS just to Safari, but everything I find also applies to Chrome. I know these are currently both WebKit browsers, but I'm having problems with div alignments in Chro...
Broadcast receiver for checking internet connection in android app
I am developing an android broadcast receiver for checking internet connection. The problem is that my broadcast receiver is being called two times. I want it to get called only when the network is a...
- Modified
- 26 Oct at 04:7
Using python's eval() vs. ast.literal_eval()
I have a situation with some code where `eval()` came up as a possible solution. Now I have never had to use `eval()` before but, I have come across plenty of information about the potential danger i...
- Modified
- 30 Sep at 19:13
What is the maximum characters for the NVARCHAR(MAX)?
I have declared a column of type `NVARCHAR(MAX)` in SQL Server 2008, what would be its exact maximum characters having the MAX as the length?
- Modified
- 21 Jun at 05:30
I want to get Year, Month, Day, etc from Java Date to compare with Gregorian Calendar date in Java. Is this possible?
I have a Date object in Java stored as Java's Date type. I also have a Gregorian Calendar created date. The gregorian calendar date has no parameters and therefore is an instance of today's date (and...
- Modified
- 16 Mar at 03:32
Where is array's length property defined?
We can determine the length of an `ArrayList<E>` using its public method `size()`, like ``` ArrayList<Integer> arr = new ArrayList(10); int size = arr.size(); ``` Similarly we can determine the len...
fatal: Not a valid object name: 'master'
I have a private server running git 1.7 When I ``` git init ``` a folder it doesn't create a master branch. Cause when i do: ``` git branch ``` it doesn't list anything. When I do: ``` git -...
- Modified
- 6 Feb at 15:17
ADB Shell Input Events
What is the basic difference between `adb shell input keyevent` and `adb shell sendevent`? Which one should I use for inputting a character? Are the keycodes the same that we pass to both the commands...
Read connection string from web.config
How can I read a connection string from a `web.config` file into a public class contained within a class library? I've tried: ``` WebConfigurationManager ConfigurationManager ``` But these classe...
- Modified
- 17 Jul at 12:5
Is returning out of a switch statement considered a better practice than using break?
`switch``return` ``` function myFunction(opt) { switch (opt) { case 1: return "One"; case 2: return "Two"; case 3: return "Three"; default: return ""; } } ``` `switch``break`...
- Modified
- 25 May at 00:34
How can I get a specific number child using CSS?
I have a `table` whose `td`s are created dynamically. I know how to get the first and last child but my question is: Is there a way of getting the second or third child using CSS?
- Modified
- 18 Jul at 10:26
How do you specify a byte literal in Java?
If I have a method ``` void f(byte b); ``` how can I call it with a numeric argument without casting? ``` f(0); ``` gives an error.
Why am I getting 'Assembly '*.dll' must be strong signed in order to be marked as a prerequisite.'?
I'm trying to compile my excel addin using C# 4.0, and started to get this problem when building my project in Visual Studio. It's important to tell you that I haven't had this problem before. What co...
- Modified
- 8 Mar at 21:6
How to write UPDATE SQL with Table alias in SQL Server 2008?
I have a very basic `UPDATE SQL` - ``` UPDATE HOLD_TABLE Q SET Q.TITLE = 'TEST' WHERE Q.ID = 101; ``` This query runs fine in `Oracle`, `Derby`, `MySQL` - but it with following error: > "Msg 10...
- Modified
- 13 Apr at 13:5
Practical uses for AtomicInteger
I sort of understand that AtomicInteger and other Atomic variables allow concurrent accesses. In what cases is this class typically used though?
- Modified
- 21 Oct at 11:57
How can I check if my python object is a number?
In Java the numeric types all descend from Number so I would use ``` (x instanceof Number). ``` What is the python equivalent?
In Jinja2, how do you test if a variable is undefined?
Converting from Django, I'm used to doing something like this: ``` {% if not var1 %} {% endif %} ``` and having it work if I didn't put var1 into the context. Jinja2 gives me an undefined error. Is...
- Modified
- 29 May at 11:17
Checking length of dictionary object
I'm trying to check the length here. Tried count. Is there something I'm missing? ``` var dNames = {}; dNames = GetAllNames(); for (var i = 0, l = dName.length; i < l; i++) { alert("Name...
- Modified
- 26 Jul at 17:35
I can’t find the Android keytool
I am trying to follow the Android mapping tutorial and [got to this part where I had to get an API key](http://code.google.com/android/add-ons/google-apis/mapkey.html#getdebugfingerprint). I have fou...
- Modified
- 19 Sep at 16:14
How to pass objects to functions in C++?
I am new to C++ programming, but I have experience in Java. I need guidance on how to pass objects to functions in C++. Do I need to pass pointers, references, or non-pointer and non-reference values...
- Modified
- 31 Oct at 06:53
convert a list of objects from one type to another using lambda expression
I have a foreach loop reading a list of objects of one type and producing a list of objects of a different type. I was told that a lambda expression can achieve the same result. ``` var origList = Lis...
How can I format a nullable DateTime with ToString()?
How can I convert the nullable DateTime to a formatted string? ``` DateTime dt = DateTime.Now; Console.WriteLine(dt.ToString("yyyy-MM-dd hh:mm:ss")); //works DateTime? dt2 = DateTime.Now; Console.W...
- Modified
- 2 Dec at 13:57
gcc warning" 'will be initialized after'
I am getting a lot of these warnings from 3rd party code that I cannot modify. Is there a way to disable this warning or at least disable it for certain areas (like #pragma push/pop in VC++)? Example...
- Modified
- 6 Jan at 09:51
What do the icons in Eclipse mean?
- - - - - I just came to SO looking for this, didn't find it, and found it on my own elsewhere. But I thought it would be good for SO to have the answer for future reference; I wondered about them a...