Stack Overflow Weekly Newsletter
Stack Overflow Weekly Newsletter

Top new questions this week:

Java Name Hiding: The Hard Way

I have a problem with name hiding that is extremely hard to solve. Here is a simplified version that explains the problem: There is a class: org.A package org; public class A{ public class …

java name-clash member-hiding  
asked by gexicide 79 votes
answered by Donal Fellows 70 votes

Do "nothing" while "condition"

While browsing the code for the Java 8 version of ForkJoinPool(which has a few interesting changes from Java 7) I ran across this construct (here): do {} while (!blocker.isReleasable() && …

java while-loop do-while  
asked by Erik Vesteraas 52 votes
answered by MicSim 42 votes

How to implement classic sorting algorithms in modern C++?

The std::sort algorithm (and its cousins std::partial_sort and std::nth_element) from the C++ Standard Library is in most implementations a complicated and hybrid amalgation of more elementary sorting …

c++ algorithm sorting c++11 c++-faq  
asked by TemplateRex 50 votes
answered by TemplateRex 60 votes

Why does '(int)(char)(byte)-2' produce 65534 in Java?

public class Manager { public static void main (String args[]){ System.out.println((int)(char)(byte)-2); } } I encountered this question in technical test for a job. It gives the …

java  
asked by mangoCar 39 votes
answered by raphw 71 votes

Why can't you add an int and a char in some cases?

Why does char ch = '4'; ch = '4' + 2; work, but char ch = '4'; ch = ch + 2; doesn't?

java  
asked by Lester 37 votes
answered by Chris K 52 votes

when is const reference better than pass-by-value in c++11

I have some pre-c++11 code in which I use const references to pass large parameters like vector's a lot. An example is as follows: int hd(const vector<int>& a) { return a[0]; } I heard …

c++ c++11  
asked by Ting L 27 votes
answered by Rapptz 30 votes

Populating a Boolean Array in Java

As a fairly green Java coder I've set myself the hefty challenge of trying to write a simple text adventure. Unsurprisingly, I've encountered difficulties already! I'm trying to give my Location …

java arrays  
asked by lordchancellor 25 votes
answered by Ross Drew 10 votes

Greatest hits from previous weeks:

Calling an external command in Python

How can I call an external command in Python? In other words, how can I spawn a process?

python shell command external  
asked by freshWoWer 1048 votes
answered by David Cournapeau 965 votes

Undo the last Git commit?

I accidentally added the wrong directory containing my files in Git. Instead of adding a .java file, I added the directory containing the .class file. How can I undo this action?

git  
asked by Hamza Yerlikaya 4759 votes
answered by Esko Luontola 4313 votes

Can you answer these?

Modifying data written to disk by Ext4 filesystem

I'm working on the academic project, part of which is applying transparent encryption (AES-CTR) to the selected Ext4 files stored on the disk (I can already mark them as encrypted using new ioctl …

c linux-kernel cryptography filesystems ext4  
asked by Tomek Falkiewicz 6 votes

Does a docker container have its own TCP/IP stack?

I'm trying to understand what's happening under the hood to a network packet coming from the wire connected to the host machine and directed to an application inside a Docker container. If it were a …

networking containers docker tcp-ip  
asked by Manuel Durando 5 votes

Neo4j Virtual machine in windows azure

I have created a Neo4j virtual machine on windows azure using VM Depot.My Virtual machine size is' A1 (1 core, 1.75 GB memory)'. But while accessing from web browser I always get an error …

javascript azure neo4j  
asked by Midhuna 5 votes
Subscribe to more Stack Exchange newsletters


Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on stackexchange.com.

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all stackexchange.com emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3