Questions

JavaScript TypeError: Cannot read property 'style' of null

I have JavaScript code and below line has problem. ``` if ((hr==20)) document.write("Good Night"); document.getElementById('Night).style.display='' ``` ``` Uncaught TypeError: Cannot read propert...

7 Dec at 04:31

Unfortunately MyApp has stopped. How can I solve this?

I am developing an application, and everytime I run it, I get the message: > Unfortunately, MyApp has stopped. What can I do to solve this? --- [What is a stack trace, and how can I use it to d...

21 Jul at 22:35

Git diff against a stash

How can I see the changes un-stashing will make to the current working tree? I would like to know what changes will be made before applying them!

13 Apr at 16:15

decimal vs double! - Which one should I use and when?

I keep seeing people using doubles in C#. I know I read somewhere that doubles sometimes lose precision. My question is when should a use a double and when should I use a decimal type? Which type is ...

14 Mar at 13:18

How to exit git log or git diff

I'm trying to learn Git with the help of [Git Immersion](http://gitimmersion.com/). There's one thing that frustrates me whenever I use `git log` or `git diff`: ![Git log shows (END) marker](https://...

17 Apr at 17:57

View contents of database file in Android Studio

I have been using to develop my app since it's was released. Everything works nice until recently, I have to debug together with checking the database file. Since I don't know how to see the databas...

Overflow:hidden dots at the end

Let's say I have a string "" and I cut it with `overflow:hidden`, so it displays something like this: > I like big butts and I cann cutting off the text. Is it possible to display this like this: >...

6 Sep at 03:20

How do I check if file exists in jQuery or pure JavaScript?

How do I check if a file on my server exists in jQuery or pure JavaScript?

7 Nov at 15:3

After installing Homebrew I get `zsh: command not found: brew`

``` ➜ ~ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" -e:77: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040677 It appears H...

21 Oct at 22:7

Register comdlg32.dll gets Regsvr32: DllRegisterServer entry point was not found

I have Windows 7, 64-bit. I'm trying to register a .dll (comdlg32.dll) using regsvr32. But I get an error that says the dll is read but the DLLRegistryServer entry point is not found. I have run the...

How do I add a Fragment to an Activity with a programmatically created content view

I want to add a Fragment to an Activity that implements its layout programmatically. I looked over the Fragment documentation but there aren't many examples describing what I need. Here is the type of...

Find a string by searching all tables in SQL Server

Is there any way to search for a string in all tables of a database in SQL Server? I want to search for string say `john`. The result should show the tables and their respective row that contain `john...

16 Jul at 14:59

How to use if-else option in JSTL

Is there an if-else tag available in JSTL?

27 Oct at 13:54

Sorting a list using Lambda/Linq to objects

I have the name of the "sort by property" in a string. I will need to use Lambda/Linq to sort the list of objects. Ex: ``` public class Employee { public string FirstName {set; get;} public stri...

27 Dec at 07:27

Where is JAVA_HOME on macOS Mojave (10.14) to Lion (10.7)?

Java is an optional package on the latest versions of macOS. Yet once installed it appears like the environment variable is .

29 Oct at 05:0

Merge two (or more) lists into one, in C# .NET

Is it possible to convert two or more lists into one single list, in .NET using C#? For example, ``` public static List<Product> GetAllProducts(int categoryId){ .... } . . . var productCollection1 ...

20 Dec at 08:49

Session timeout in ASP.NET

I am running an ASP.NET 2.0 application in IIS 6.0. I want session timeout to be 60 minutes rather than the default 20 minutes. I have done the following 1. Set <sessionState timeout="60"></sessionS...

26 Mar at 14:30

CASCADE DELETE just once

I have a Postgresql database on which I want to do a few cascading deletes. However, the tables aren't set up with the ON DELETE CASCADE rule. Is there any way I can perform a delete and tell Postgr...

23 May at 12:26

Http Basic Authentication in Java using HttpClient?

I am trying to mimic the functionality of this curl command in Java: ``` curl --basic --user username:password -d "" http://ipaddress/test/login ``` I wrote the following using Commons HttpClient 3...

19 Jul at 17:21

break out of if and foreach

I have a foreach loop and an if statement. If a match is found i need to ultimately break out of the foreach. ``` foreach ($equipxml as $equip) { $current_device = $equip->xpath("name"); if (...

13 Jul at 14:34

A table name as a variable

I am trying to execute this query: ``` declare @tablename varchar(50) set @tablename = 'test' select * from @tablename ``` This produces the following error: > Msg 1087, Level 16, State 1, Line 5Must...

Get a list of checked checkboxes in a div using jQuery

I want to get a list of names of checkboxes that are selected in a div with certain id. How would I do that using jQuery? E.g., for this div I want to get array ["c_n_0"; "c_n_3"] or a string "c_n_0;...

2 Aug at 11:20

ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist

I am getting the above error when trying to connect to a server database from a client using service name `orcl`. It is getting connected when I am using the other service name i.e. `dms` Below is my...

28 Feb at 09:46

Gradle build without tests

I want to execute `gradle build` without executing the unit tests. I tried: ``` $ gradle -Dskip.tests build ``` That doesn't seem to do anything. Is there some other command I could use?

10 Nov at 09:40

Taskkill /f doesn't kill a process

When I start up an Experimental instance of VS from VS for debugging and stop debugging (sometimes directly from the parent VS), a zombile devenv.exe process remains running which I am unable to kill....