Questions

What should I do when 'svn cleanup' fails?

I have a lot of changes in a working folder, and something screwed up trying to do an update. Now when I issue an 'svn cleanup' I get: ``` >svn cleanup . svn: In directory '.' svn: Error processing ...

9 Jan at 21:53

How does "this" keyword work within a function?

I just came across an interesting situation in JavaScript. I have a class with a method that defines several objects using object-literal notation. Inside those objects, the `this` pointer is being ...

When the keyboard appears, the Flutter widgets resize. How to prevent this?

I have a Column of Expanded widgets like this: ``` return new Container( child: new Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: <Widget>[ new Exp...

remove kernel on jupyter notebook

How can I remove a kernel from jupyter notebook? I have R kernel on my jupyter notebook. Recently kernel always dies right after I open a new notebook.

14 Oct at 16:0

How to delete an item from state array?

The story is, I should be able to put Bob, Sally and Jack into a box. I can also remove either from the box. When removed, no slot is left. ``` people = ["Bob", "Sally", "Jack"] ``` I now need to r...

17 Jul at 15:34

Git says remote ref does not exist when I delete remote branch

I ran `git branch -a` ``` * master remotes/origin/test remotes/origin/master ``` I want to delete my remote branch I've tried ``` git push origin --delete remotes/origin/test ``` I got ...

2 Mar at 09:16

Where is adb.exe in windows 10 located?

I installed android studio 1.5 on windows 10. When I type in command line: > adb I get command not found. Where can I get it from or where is it installed?

9 Jan at 14:18

What does `return` keyword mean inside `forEach` function?

``` $('button').click(function () { [1, 2, 3, 4, 5].forEach(function (n) { if (n == 3) { // it should break out here and doesn't alert anything after return false } ...

7 Jan at 11:11

How to choose an AWS profile when using boto3 to connect to CloudFront

I am using the Boto 3 python library, and want to connect to AWS CloudFront. I need to specify the correct AWS Profile (AWS Credentials), but looking at the official documentation, I see no way to spe...

Adding headers when using httpClient.GetAsync

I'm implementing an API made by other colleagues with Apiary.io, in a Windows Store app project. They show this example of a method I have to implement: ``` var baseAddress = new Uri("https://privat...

XPath: Get parent node from child node

I need get the parent node for child node `title 50` At the moment I am using only ``` //*[title="50"] ``` How could I get its parent? Result should be the `store` node. --- ``` <?xml version...

17 May at 17:23

Insert a line break in mailto body

I would like to insert a line break into my mailto body. I tried %0A, %0D and %0D%0A. Nothing worked for me. I tested on Gmail, Yahoo, Apple Mail, Outlook 2010, Outlook.com and Thunderbird with Googl...

25 Nov at 18:1

Constant pointer vs Pointer to constant

I want to know the difference between ``` const int* ptr; ``` and ``` int * const ptr; ``` and how it works. It is pretty difficult for me to understand or keep remember this. Please help.

29 Jan at 18:24

Format / Suppress Scientific Notation from Pandas Aggregation Results

How can one modify the format for the output from a groupby operation in pandas that produces scientific notation for very large numbers? I know how to do string formatting in python but I'm at a lo...

Writing data into CSV file in C#

I am trying to write into a `csv` file row by row using C# language. Here is my function ``` string first = reader[0].ToString(); string second=image.ToString(); string csv = string.Format("{0},{1}\n...

18 Jan at 08:33

Access the css ":after" selector with jQuery

I have the following css: ``` .pageMenu .active::after { content: ''; margin-top: -6px; display: inline-block; width: 0px; height: 0px; border-top: 14px solid white; borde...

22 Jul at 13:41

Regular Expression to get a string between parentheses in Javascript

I am trying to write a regular expression which returns a string which is between parentheses. For example: I want to get the string which resides between the strings "(" and ")" ``` I expect five hun...

29 Dec at 01:6

How to use PHP OPCache?

PHP 5.5 has been released and it features a new code caching module called OPCache, but there doesn't appear to be any documentation for it. So where is the documentation for it and how do I use OPc...

20 Jun at 22:31

Converting Java objects to JSON with Jackson

I want my JSON to look like this: ``` { "information": [{ "timestamp": "xxxx", "feature": "xxxx", "ean": 1234, "data": "xxxx" }, { "timestamp": "yyy", ...

19 Nov at 05:43

Adding two numbers concatenates them instead of calculating the sum

I am adding two numbers, but I don't get a correct value. For example, doing `1 + 2` returns 12 and not 3 What am I doing wrong in this code? ``` function myFunction() { var y = document.getEleme...

9 Feb at 21:12

For i = 0, why is (i += i++) equal to 0?

Take the following code (usable as a Console Application): ``` static void Main(string[] args) { int i = 0; i += i++; Console.WriteLine(i); Console.ReadLine(); } ``` The result of `...

27 Mar at 14:44

How to create streams from string in Node.Js?

I am using a library, [ya-csv](https://github.com/koles/ya-csv), that expects either a file or a stream as input, but I have a string. How do I convert that string into a stream in Node?

Wordpress how to use jquery and $ sign

I have a simple jQuery script in a WordPress plugin that is using a jQuery wrapper like this: ``` $(document).ready(function(){ // jQuery code is in here }); ``` I am calling this script from...

14 Sep at 09:12

From list of integers, get number closest to a given value

Given a list of integers, I want to find which number is the closest to a number I give in input: ``` >>> myList = [4, 1, 88, 44, 3] >>> myNumber = 5 >>> takeClosest(myList, myNumber) ... 4 ``` Is ...

31 Aug at 09:25

<out T> vs <T> in Generics

What is the difference between `<out T>` and `<T>`? For example: ``` public interface IExample<out T> { ... } ``` vs. ``` public interface IExample<T> { ... } ```

18 Apr at 23:43