Better techniques for trimming leading zeros in SQL Server?
I've been using [this](https://stackoverflow.com/questions/92093/removing-leading-zeroes-from-a-field-in-a-sql-statement) for some time: ``` SUBSTRING(str_col, PATINDEX('%[^0]%', str_col), LEN(str_co...
- Modified
- 23 May at 12:34
Custom li list-style with font-awesome icon
I am wondering if it's possible to utilize font-awesome (or any other iconic font) classes to create a custom `<li>` list-style-type? I am currently using jQuery to do this, ie: ``` $("li.myClass")....
- Modified
- 13 Nov at 01:54
How to check for DLL dependency?
Sometimes when I'm doing a little project I'm not careful enough and accidentally add a dependency for a DLL that I am not aware of. When I ship this program to a friend or other people, "it doesn't w...
- Modified
- 26 Apr at 18:22
Vue Js - Loop via v-for X times (in a range)
How can I repeat a loop via `v-for` X (e.g. 10) times? ``` <!-- want to repeat this (e.g.) 10 times --> <ul> <li v-for="item in shoppingItems"> {{ item.name }} - {{ item.price }} </li> </ul> ...
- Modified
- 24 Oct at 10:1
nullable object must have a value
There is paradox in the exception description: Nullable object must have a value (?!) This is the problem: I have a `DateTimeExtended` class, that has ``` { DateTime? MyDataTime; int? otherda...
- Modified
- 26 Jan at 20:39
Getting the thread ID from a thread
In C# when debugging threads for example, you can see each thread's ID. I couldn't find a way to get that same thread, programmatically. I could not even get the ID of the current thread (in the prop...
- Modified
- 27 Sep at 12:40
How to open an Excel file in C#?
I am trying to convert some [VBA](http://en.wikipedia.org/wiki/Visual_Basic_for_Applications) code to C#. I am new to C#. Currently I am trying to open an Excel file from a folder and if it does not e...
Convert a list into a comma-separated string
My code is as below: ``` public void ReadListItem() { List<uint> lst = new List<uint>() { 1, 2, 3, 4, 5 }; string str = string.Empty; foreach (var item in lst) str = str + ite...
Difference between a Structure and a Union
Is there any good example to give the difference between a `struct` and a `union`? Basically I know that `struct` uses all the memory of its member and `union` uses the largest members memory space. I...
Could not determine the dependencies of task ':app:crashlyticsStoreDeobsDebug' if I enable the proguard
I get following error when I was running an app within Android Studio 2. ``` Gradle tasks [:app:assembleDebug] Could not determine the dependencies of task ':app:crashlyticsStoreDeobsDebug'. > Task w...
- Modified
- 22 Dec at 17:28
Where is android_sdk_root? and how do I set it.?
I set the android_sdk_home variable so that my application could find .android when trying to run. Now I get an error stating that "android_sdk_root is undefined". I am running win 7 with a new insta...
- Modified
- 14 Sep at 13:11
Remove duplicates in the list using linq
I have a class `Items` with `properties (Id, Name, Code, Price)`. The List of `Items` is populated with duplicated items. For ex.: ``` 1 Item1 IT00001 $100 2 Item2 ...
- Modified
- 22 Oct at 12:26
Filter values only if not null using lambda in Java8
I have a list of objects say `car`. I want to filter this list based on some parameter using Java 8. But if the parameter is `null`, it throws `NullPointerException`. How to filter out null values? C...
- Modified
- 1 Oct at 10:13
How to send cookies in a post request with the Python Requests library?
I'm trying to use the [Requests](http://docs.python-requests.org/en/latest/user/quickstart/#cookies) library to send cookies with a post request, but I'm not sure how to actually set up the cookies ba...
- Modified
- 7 Apr at 11:35
How can I get the source code of a Python function?
Suppose I have a Python function as defined below: ``` def foo(arg1,arg2): #do something with args a = arg1 + arg2 return a ``` I can get the name of the function using `foo.func_name`....
jQuery date/time picker
I've been looking around for a decent jQuery plugin that can handle both dates and times. The core UI `DatePicker` is great, but unfortunately I need to be able to take time in as well. I've found a...
- Modified
- 22 Feb at 23:32
jQuery's .on() method combined with the submit event
I've got a problem with `.on()`. I have multiple form-elements (forms with `class="remember"`), also I add another one `form.remember` using AJAX. So, I want it to handle submit event something like: ...
Git error on commit after merge - fatal: cannot do a partial commit during a merge
I ran a `git pull` that ended in a conflict. I resolved the conflict and everything is fine now (I used mergetool also). When I commit the resolved file with `git commit file.php -m "message"` I get...
- Modified
- 23 Sep at 19:24
How to calculate a Mod b in Casio fx-991ES calculator
Does anyone know how to calculate a Mod b in Casio fx-991ES Calculator. Thanks
- Modified
- 7 Dec at 17:45
How to change MySQL data directory?
Is it possible to change my default MySQL data directory to another path? Will I be able to access the databases from the old location?
How can one print a size_t variable portably using the printf family?
I have a variable of type `size_t`, and I want to print it using `printf()`. What format specifier do I use to print it portably? In 32-bit machine, `%u` seems right. I compiled with `g++ -g -W -Wal...
Adding an arbitrary line to a matplotlib plot in ipython notebook
I'm rather new to both python/matplotlib and using it through the ipython notebook. I'm trying to add some annotation lines to an existing graph and I can't figure out how to render the lines on a gra...
- Modified
- 5 Jul at 13:43
How to get string objects instead of Unicode from JSON
I'm using to parse JSON from text files. When loading these files with either [json](https://docs.python.org/2/library/json.html) or [simplejson](https://pypi.python.org/pypi/simplejson/), all my st...
- Modified
- 25 Sep at 14:20
How to find out which processes are using swap space in Linux?
Under Linux, how do I find out which process is using the swap space more?