Questions

Remote debugging a Java application

I have a java application running on linux machine. I run the java application using the following: ``` java myapp -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4000, suspend=n ``` I have...

30 Apr at 18:5

Why do we not have a virtual constructor in C++?

Why does C++ not have a virtual constructor?

6 Feb at 08:38

Virtual Memory Usage from Java under Linux, too much memory used

I have a problem with a Java application running under Linux. When I launch the application, using the default maximum heap size (64 MB), I see using the tops application that 240 MB of virtual Memor...

22 Nov at 11:45

What Java ORM do you prefer, and why?

It's a pretty open ended question. I'll be starting out a new project and am looking at different ORMs to integrate with database access. Do you have any favorites? Are there any you would advise st...

25 Sep at 16:59

How to determine the encoding of text

I received some text that is encoded, but I don't know what charset was used. Is there a way to determine the encoding of a text file using Python? [How can I detect the encoding/codepage of a text fi...

26 Aug at 19:59

What's the difference between fill_parent and wrap_content?

In Android, when layout out widgets, what's the difference between `fill_parent` (`match_parent` in API Level 8 and higher) and `wrap_content`? Is there any documentation where you can point to? I'm ...

20 Mar at 16:28

Why does sudo change the PATH?

This is the `PATH` variable without sudo: ``` $ echo 'echo $PATH' | sh /opt/local/ruby/bin:/usr/bin:/bin ``` This is the `PATH` variable with sudo: ``` $ echo 'echo $PATH' | sudo sh /usr/local/sb...

7 Nov at 02:41

Why do we need C Unions?

When should unions be used? Why do we need them?

14 Aug at 17:49

How are ssl certificates verified?

What is the series of steps needed to securely verify a ssl certificate? My (very limited) understanding is that when you visit an https site, the server sends a certificate to the client (the browse...

16 Oct at 20:6

How do you kill all current connections to a SQL Server 2005 database?

I want to rename a database, but keep getting the error that 'couldn't get exclusive lock' on the database, which implies there is some connection(s) still active. How can I kill all the connections ...

13 Jul at 14:28

How to use switch statement inside a React component?

I have a React component, and inside the `render` method of the component I have something like this: ``` render() { return ( <div> <div> // removed for brevit...

5 Oct at 19:1

Vue 2 - Mutating props vue-warn

I started [https://laracasts.com/series/learning-vue-step-by-step](https://laracasts.com/series/learning-vue-step-by-step) series. I stopped on the lesson with this error: > vue.js:2574 [Vue warn]: A...

27 Jun at 00:15

What is the difference between json.load() and json.loads() functions

In Python, what is the difference between `json.load()` and `json.loads()`? I guess that the function must be used with a file object (I need thus to use a context manager) while the function take ...

28 Oct at 17:45

nvm is not compatible with the npm config "prefix" option:

I am trying to run another NodeJS version with `nvm` but getting this error: ``` $ nvm use v4.2.4 nvm is not compatible with the npm config "prefix" option: currently set to "/Users/z/.npm-globa...

11 Jan at 10:34

How can I move HEAD back to a previous location? (Detached head) & Undo commits

In Git, I was trying to do a `squash commit` by merging in another branch and then resetting `HEAD` to the previous place via: ``` git reset origin/master ``` But I need to step out of this. How ca...

Laravel 5 – Remove Public from URL

I know this is a very popular question but I haven't been able to find a working solution for Laravel 5. I've been trying to migrate from Codeigniter for a long time, but this convoluted installation ...

29 Jan at 00:32

How to create permanent PowerShell Aliases

I want to create an `alias` of a `cmdlet` that doesn't expire after I close the current session of Powershell, let's say I have this alias : ``` C:\Users\Aymen> New-Alias Goto Set-Location ``` This...

12 Apr at 20:54

Duplicate symbols for architecture x86_64 under Xcode

I now have the same question with above title but have not found the right answer yet. I got the error: ``` /Users/nle/Library/Developer/Xcode/DerivedData/TestMoboSDK-Client-cgodalyxmwqzynaxfbbewrooy...

9 Dec at 05:40

iOS 7 status bar back to iOS 6 default style in iPhone app?

In iOS 7 the `UIStatusBar` has been designed in a way that it merges with the view like this: ![GUI designed by Tina Tavčar](https://i.stack.imgur.com/rfo0Q.png) (GUI designed by [Tina Tavčar](http:/...

13 Aug at 11:33

How can I fix the Microsoft Visual Studio error: "package did not load correctly"?

I installed Visual Studio 2012 and [DevExpress](http://www.devexpress.com/Home/Mission.xml) 13.1. As Visual Studio started, it generated an error shown by this attached image, > The 'Microsoft.Visual...

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

CSS to set A4 paper size

I need simulate an A4 paper in web and allow to print this page as it is show on browser (Chrome, specifically). I set the element size to 21cm x 29.7cm, but when I send to print (or print preview) it...

3 Apr at 09:21

How do I get the file name from a String containing the Absolute file path?

`String` variable contains a file name, `C:\Hello\AnotherFolder\The File Name.PDF`. How do I only get the file name `The File Name.PDF` as a String? I planned to split the string, but that is not the...

25 Jan at 17:26

Objective-C declared @property attributes (nonatomic, copy, strong, weak)

Can someone explain to me in detail when I must use each attribute: `nonatomic`, `copy`, `strong`, `weak`, and so on, for a declared property, and explain what each does? Some sort of example would be...

Format a number as 2.5K if a thousand or more, otherwise 900

I need to show a currency value in the format of `1K` of equal to one thousand, or `1.1K`, `1.2K`, `1.9K` etc, if its not an even thousands, otherwise if under a thousand, display normal `500`, `100`,...