Questions

How can I see what I am about to push with git?

Is there a way to see what would be pushed if I did a `git push` command? What I'm picturing is something like the "Files Changed" tab of Github's "pull request" feature. When I issue a pull request,...

21 Mar at 20:22

C# getting its own class name

If I have a class called `MyProgram`, is there a way of retrieving "" as a string?

21 Dec at 02:19

.gitignore for Visual Studio Projects and Solutions

Which files should I include in `.gitignore` when using in conjunction with Solutions (`.sln`) and Projects?

What does %>% function mean in R?

I have seen the use of `%>%` (percent greater than percent) function in some packages like [dplyr](https://github.com/hadley/dplyr) and [rvest](https://github.com/hadley/rvest). What does it mean? Is...

21 May at 18:9

New line in JavaScript alert box

How do you put in a new line into a JavaScript alert box?

3 Dec at 17:21

Count number of occurences for each unique value

Let's say I have: ``` v = rep(c(1,2, 2, 2), 25) ``` Now, I want to count the number of times each unique value appears. `unique(v)` returns what the unique values are, but not how many they are. ...

17 Jun at 10:40

How do you change text to bold in Android?

How do you change settings in an Android `TextView`? For example, how do you make the text ?

3 Jun at 08:56

Find rows that have the same value on a column in MySQL

In a [member] table, some rows have the same value for the `email` column. ``` login_id | email ---------|--------------------- john | john123@hotmail.com peter | peter456@gmail.com johnny |...

18 Sep at 18:43

How to get a random number in Ruby

How do I generate a random number between `0` and `n`?

Play/pause HTML 5 video using JQuery

I am trying to control HTML5 videos using JQuery. I have two clips in a tabbed interface, there are six tabs in total, the others just have images. I am trying to make the video clips play when their ...

10 Jan at 12:50

Mockito How to mock and assert a thrown exception?

I'm using mockito in a junit test. How do you make an exception happen and then assert that it has (generic pseudo-code)

25 Sep at 20:10

Returning JSON object as response in Spring Boot

I have a sample RestController in Spring Boot: ``` @RestController @RequestMapping("/api") class MyRestController { @GetMapping(path = "/hello") public JSONObject sayHello() { ret...

14 Jun at 20:57

How do I execute a bash script in Terminal?

I have a bash script like: ``` #!/bin/bash echo Hello world! ``` How do I execute this in Terminal?

9 Mar at 06:38

How to set the context path of a web application in Tomcat 7.0

I know that I can rename my webapp (or it's WAR file) to but this is a terrible way to do it, IMHO. Now I checked out the tomcat doc & it says > It is NOT recommended to place elements directly in...

25 Apr at 09:35

How to make a <div> always full screen?

No matter how its content is like. Is it possible to do this?

15 Nov at 02:5

How can I convert a datetime object to milliseconds since epoch (unix time) in Python?

I have a Python `datetime` object that I want to convert to unix time, or seconds/milliseconds since the 1970 epoch. How do I do this?

28 Dec at 19:47

ImportError: No module named tensorflow

Please help me with this error I have installed the tensorflow module on my server and below is it's information ``` 15IT60R19@cpusrv-gpu-109:~$ pip show tensorflow Name: tensorflow Version: 1.0.0 S...

Maven: Command to update repository after adding dependency to POM

I've added a new dependency to my POM. Is there a simple command I can run to download this dependency to my repository?

7 Oct at 22:18

Changing the resolution of a VNC session in linux

I use VNC to connect to a Linux workstation at work. At work I have a 20" monitor that runs at 1600x1200, while at home I use my laptop with its resolution of 1440x900. If I set the vncserver to run ...

19 Aug at 06:56

How to make gradient background in android

I want to create gradient background where the gradient is in the top half and there's a solid color in the bottom half, like in this image below: ![](https://i.stack.imgur.com/Woq2z.jpg) I can't be...

3 Nov at 06:4

How to list running screen sessions?

I have a bunch of servers, on which I run experiments using `screen`. The procedure is the following : 1. ssh to server XXX 2. launch screen 3. start experiments in a few tabs 4. detach screen 5. di...

2 Nov at 22:4

How do you count the lines of code in a Visual Studio solution?

Is it possible to find the number of lines of code in an entire solution? I've heard of [MZ-Tools](http://www.mztools.com/index.aspx), but is there an open source equivalent?

14 Mar at 13:24

How to call Stored Procedure in Entity Framework 6 (Code-First)?

I am very new to Entity Framework 6 and I want to implement stored procedures in my project. I have a stored procedure as follows: ``` ALTER PROCEDURE [dbo].[insert_department] @Name [varchar](10...

Datetime in where clause

How can I select 12/20/2008 in `where` clause of sql? The server is SQL server 2005. ``` select * from tblErrorLog where errorDate = '12/20/2008' ```

Command to remove all npm modules globally

Is there a command to remove all global npm modules? If not, what do you suggest?

17 Sep at 17:1