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,...
- Modified
- 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?
- Modified
- 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?
- Modified
- 19 Apr at 11:48
New line in JavaScript alert box
How do you put in a new line into a JavaScript alert box?
- Modified
- 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. ...
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 ?
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 |...
How to get a random number in Ruby
How do I generate a random number between `0` and `n`?
- Modified
- 22 Sep at 10:0
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 ...
- Modified
- 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)
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...
- Modified
- 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?
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...
- Modified
- 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?
- Modified
- 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?
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...
- Modified
- 23 May at 11:46
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?
- Modified
- 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 ...
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...
- Modified
- 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...
- Modified
- 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?
- Modified
- 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...
- Modified
- 7 Mar at 08:14
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' ```
- Modified
- 10 Mar at 21:27
Command to remove all npm modules globally
Is there a command to remove all global npm modules? If not, what do you suggest?