Questions

How to convert C# nullable int to int

How do I convert a nullable `int` to an `int`? Suppose I have 2 type of int as below: ``` int? v1; int v2; ``` I want to assign `v1`'s value to `v2`. `v2 = v1;` will cause an error. How do I conv...

15 Mar at 06:40

Select info from table where row has max date

My table looks something like this: ``` group date cash checks 1 1/1/2013 0 0 2 1/1/2013 0 800 1 1/3/2013 0 700 3 1/1/2013 0 600 1 ...

Add characters to a string in Javascript

I need to add in a characters to an empty string. I know that you can use the function concat in Javascript to do concats with strings ``` var first_name = "peter"; var last_name = "jones"; var nam...

28 Sep at 05:9

What is the max size of localStorage values?

Since `localStorage` (currently) only supports strings as values, and in order to do that the objects need to be stringified (stored as JSON-string) before they can be stored, is there a defined limit...

16 Jul at 02:13

Outline radius?

Is there any way of getting rounded corners on the outline of a `div` element, similar to `border-radius`?

25 Sep at 17:27

jQuery Scroll To bottom of the page

After my page is done loading. I want jQUery to nicely scroll to the bottom of the page, animating quickly, not a snap/jolt. Do iI need a plugin like `ScrollTo` for that? or is that built into jQuery...

4 Aug at 07:21

How to present a simple alert message in java?

Coming from .NET i am so used calling Alert() in desktop apps. However in this java desktop app, I just want to alert a message saying "thank you for using java" I have to go through this much sufferi...

1 Mar at 10:51

Manifest Merger failed with multiple errors in Android Studio

So, I am a beginner into Android and Java. I just began learning. While I was experimenting with today, I incurred an error. ``` Error:Execution failed for task ':app:processDebugManifest'. > Manife...

20 Aug at 07:16

How can I split a shell command over multiple lines when using an IF statement?

How can I split a command over multiple lines in the shell, when the command is part of an `if` statement? This works: ``` if ! fab --fabfile=.deploy/fabfile.py --forward-agent --disable-known-host...

21 Aug at 19:37

Appending to an empty DataFrame in Pandas?

Is it possible to append to an empty data frame that doesn't contain any indices or columns? I have tried to do this, but keep getting an empty dataframe at the end. e.g. ``` import pandas as pd df =...

1 Apr at 11:56

Copying files from one directory to another in Java

I want to copy files from one directory to another (subdirectory) using Java. I have a directory, dir, with text files. I iterate over the first 20 files in dir, and want to copy them to another direc...

18 Jul at 11:58

How do you get a string from a MemoryStream?

If I am given a `MemoryStream` that I know has been populated with a `String`, how do I get a `String` back out?

3 Oct at 11:51

How do I correctly clean up a Python object?

``` class Package: def __init__(self): self.files = [] # ... def __del__(self): for file in self.files: os.unlink(file) ``` `__del__(self)` above fails with...

14 May at 19:4

Find and replace string values in list

I got this list: ``` words = ['how', 'much', 'is[br]', 'the', 'fish[br]', 'no', 'really'] ``` What I would like is to replace `[br]` with some fantastic value similar to `<br />` and thus getting a n...

7 Oct at 14:3

Reading a key from the Web.Config using ConfigurationManager

I am trying to read the keys from the `Web.config` file in a different layer than the web layer (Same solution) Here is what I am trying: ``` string userName = System.Configuration.ConfigurationMana...

31 Aug at 15:36

How do I read any request header in PHP

How should I read any header in PHP? For example the custom header: `X-Requested-With`.

6 Feb at 08:50

How to use OrderBy with findAll in Spring Data

I am using spring data and my DAO looks like ``` public interface StudentDAO extends JpaRepository<StudentEntity, Integer> { public findAllOrderByIdAsc(); // I want to use some thing like this ...

15 Dec at 16:7

Counting unique values in a column in pandas dataframe like in Qlik?

If I have a table like this: ``` df = pd.DataFrame({ 'hID': [101, 102, 103, 101, 102, 104, 105, 101], 'dID': [10, 11, 12, 10, 11, 10, 12, 10], 'uID': ['James', 'Henry', '...

18 Aug at 15:21

How to DROP multiple columns with a single ALTER TABLE statement in SQL Server?

I would like to write a single SQL command to drop multiple columns from a single table in one `ALTER TABLE` statement. From [MSDN's ALTER TABLE documentation](http://msdn.microsoft.com/en-us/library...

7 Sep at 10:36

How to get value at a specific index of array In JavaScript?

I have an array and simply want to get the element at index 1. ``` var myValues = new Array(); var valueAtIndex1 = myValues.getValue(1); // (something like this) ``` How can I get the value at the ...

21 Dec at 19:56

How to enable assembly bind failure logging (Fusion) in .NET

How do I enable assembly bind failure logging (Fusion) in .NET?

13 May at 17:50

Read the current full URL with React?

How do I get the full URL from within a ReactJS component? I'm thinking it should be something like `this.props.location` but it is `undefined`

3 Oct at 02:5

Git: What's the best practice to "git clone" into an existing folder?

I have a working copy of the project, without any source control meta data. Now, I'd like to do the equivalent of git-clone into this folder, and keep my local changes. git-clone doesn't allow me to ...

3 Mar at 03:17

Vue.js - How to properly watch for nested data

I'm trying to understand how to properly watch for some prop variation. I have a parent component (.vue files) that receive data from an ajax call, put the data inside an object and use it to render ...

How to make type="number" to positive numbers only

currently I have the following code ``` <input type="number" /> ``` it comes out to something like this ![enter image description here](https://i.stack.imgur.com/dxgg1.png) The little selector th...

7 Oct at 19:51