Questions

Font Awesome icons are not working, I have included all required files

I am trying to use Font Awesome icons of version on my website but they are not working, I have referenced them in the `head` of my page. I have tried using two methods. 1. <a class="btn-cta-freequo...

28 Aug at 11:56

JSON.net: how to deserialize without using the default constructor?

I have a class that has a default constructor and also an overloaded constructor that takes in a set of parameters. These parameters match to fields on the object and are assigned on construction. A...

23 Feb at 06:34

Execution of Python code with -m option or not

The python interpreter has `-m` option that "Runs library module as a script". With this python code a.py: ``` if __name__ == "__main__": print __package__ print __name__ ``` I tested `...

15 May at 07:57

Google Play Services Library update and missing symbol @integer/google_play_services_version

When upgrading my project to the latest version of Google Play Services ([v4.0, released on Halloween 2013](http://android-developers.blogspot.com/2013/10/google-play-services-40.html)), you are now s...

11 Jul at 23:46

Base64 Java encode and decode a string

I want to encode a string into `base64` and transfer it through a socket and decode it back. But after decoding it gives different answer. Following is my code and result is "77+9x6s=" ``` import...

16 Sep at 14:43

How to get current timestamp in milliseconds since 1970 just the way Java gets

In Java, we can use `System.currentTimeMillis()` to get the current timestamp in Milliseconds since epoch time which is - > the difference, measured in milliseconds, between the current time and mi...

30 Sep at 09:6

Populate nested array in mongoose

How can I populate "components" in the example document: ``` { "__v": 1, "_id": "5252875356f64d6d28000001", "pages": [ { "__v": 1, "_id": "5252875a56f64d6d28000002",...

22 Apr at 00:38

Creating and Update Laravel Eloquent

What's the shorthand for inserting a new record or updating if it exists? ``` <?php $shopOwner = ShopMeta::where('shopId', '=', $theID) ->where('metadataKey', '=', 2001)->first(); if ($shopOwne...

Error: Can't open display: (null) when using Xclip to copy ssh public key

I’m following in [Generating SSH Keys](https://help.github.com/articles/generating-ssh-keys#platform-linux), it says > `sudo apt-get install xclip` Downloads and installs xclip. If you don't have `apt...

24 Aug at 19:6

How do I create some kind of table of content in GitHub wiki?

If you look here: [http://en.wikipedia.org/wiki/Stack_Overflow](http://en.wikipedia.org/wiki/Stack_Overflow) You'll notice there's a little "Content" section, if you click on one of the links, it wil...

15 Aug at 00:18

Is there a way to auto-adjust Excel column widths with pandas.ExcelWriter?

I am being asked to generate some Excel reports. I am currently using pandas quite heavily for my data, so naturally I would like to use the `pandas.ExcelWriter` method to generate these reports. How...

21 Aug at 15:55

JavaScript null check

I've come across the following code: ``` function test(data) { if (data != null && data !== undefined) { // some code here } } ``` I'm somewhat new to JavaScript, but, from other qu...

24 Apr at 04:47

What is the IntelliJ shortcut key to create a javadoc comment?

In Eclipse, I can press ++ and get a javadoc comment automatically generated with fields, returns, or whatever would be applicable for that specific javadoc comment. I'm assuming that IntelliJ IDEA ha...

Select 50 items from list at random

I have a function which reads a list of items from a file. How can I select only 50 items from the list randomly to write to another file? ``` def randomizer(input, output='random.txt'): query = o...

10 Mar at 19:11

What does iterator->second mean?

In C++, what is the type of a `std::map<>::iterator`? We know that an object `it` of type `std::map<A,B>::iterator` has an overloaded `operator ->` which returns a `std::pair<A,B>*`, and that the `st...

27 Jan at 21:8

Select element by exact match of its content

All right, I wonder if there is a way to make the `:contains()` jQuery's selector to select elements with the string that is typed in for example - ``` <p>hello</p> <p>hello world</p> $('p:contain...

8 Jun at 13:1

How to generate a number of most distinctive colors in R?

I am plotting a categorical dataset and want to use distinctive colors to represent different categories. Given a number `n`, how can I get `n` number of MOST distinctive colors in R? Thanks.

Are complex expressions possible in ng-hide / ng-show?

I want to do so: ``` ng-hide="!globals.isAdmin && mapping.is_default" ``` but the expression evaluates always to `false`. I do not want to define special function on `$scope`.

1 Mar at 20:19

How to specify mapping rule when names of properties differ

I am a newbie to the Automapper framework. I have a domain class and a DTO class as follows: ``` public class Employee { public long Id {get;set;} public string Name {get;set;} public string...

16 Mar at 17:41

Using parameters in batch files at Windows command line

In Windows, how do you access arguments passed when a batch file is run? For example, let's say I have a program named `hello.bat`. When I enter `hello -a` at a Windows command line, how do I let ...

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")....

13 Nov at 01:54

How do I run a Python script from C#?

This sort of question has been asked before in varying degrees, but I feel it has not been answered in a concise way and so I ask it again. I want to run a script in Python. Let's say it's this: ```...

27 Feb at 22:3

Google Play on Android 4.0 emulator

How can I install the Google Play .apk onto my Android 4.0 emulator?

12 Nov at 09:7

Remove the string on the beginning of an URL

I want to remove the "`www.`" part from the beginning of an URL string For instance in these test cases: e.g. `www.test.com` → `test.com` e.g. `www.testwww.com` → `testwww.com` e.g. `testwww.com` → ...

29 Jul at 16:12

Changing all files' extensions in a folder with one command on Windows

How can I use the Windows command line to change the extensions of thousands of files to `*****.jpg`?

29 Sep at 03:54