How can I connect to Android with ADB over TCP?

How can I connect to Android with ADB over TCP?

I am attempting to debug an application on a Motorola Droid, but I am having some difficulty connecting to the device via USB. My development server is a Windows 7 64-bit VM running in Hyper-V, and so I cannot connect directly via USB in th

How to configure XAMPP to send mail from localhost?

How to configure XAMPP to send mail from localhost?

I am trying to send mail from localhost.but i am unable to send the mail from localhostso can anybody tell me that how to reconfigure my xampp to send mail from localhost 1:You can send mail from localhost with sendmail package , sendma

sed: -i may not be used with stdin on Mac OS X

sed: -i may not be used with stdin on Mac OS X

I am using a bison parser in my project. When I run the following command:sed -i y.tab.c -e "s/ __attribute__ ((__unused__))$/# ifndef __cplusplus\n __attribute__ ((__unused__));\n# endif/"I get this errorsed: -i may not be used with stdi

Recursively finding only directories with FileUtils.listFiles

Recursively finding only directories with FileUtils.listFiles

I want to collect a list of all files under a directory, in particular including subdirectories. I like not doing things myself, so I'm using FileUtils.listFiles from Apache Commons IO. So I have something like:import java.io.File;import ja

How do I debug a WordPress plugin?

How do I debug a WordPress plugin?

I've recently inherited a WordPress plugin that has a few bugs in it. My problem is that I'm also new to WordPress and I don't know how to log debug messages so that I can figure out what's going on. I really just need a way to create a pop

c++ how to remove filename from path string

c++ how to remove filename from path string

I haveconst char *pathname = "..\somepath\somemorepath\somefile.ext";how to transform that into "..\somepath\somemorepath"? 1:The easiest way is to use find_last_of member function of std::stringstring s1("../somepath/somemorepath/somefi

Python: what are the nearest Linux and OSX equivalents of winsound.Beep?

Python: what are the nearest Linux and OSX equivalents of winsound.Beep?

If one wishes to beep the speaker on Windows, Python 2 apparently provides a useful function: winsound.Beep(). The neat thing about this function is that it takes arguments specifying the exact frequency and duration of the beep. This is ex

PuTTY: Change default SSH login directory [closed]

PuTTY: Change default SSH login directory [closed]

On Windows I use PuTTY to log in a remote server via SSH. Is is possible to change the default directory entry point I get to after I connect and login? (That would be a nice time safer)e.g. from server/home/ to server/home/subdir/subdirfor

Newline character in stringbuilder

Newline character in stringbuilder

How do you append new line(\n\r) character in StringBuilder? 1:I would make use of Environment.NewLine Property Something likeStringBuilder sb = new StringBuilder();sb.AppendFormat("Foo{0}Bar", Environment.NewLine);string s = sb.ToString

Creating Python RPM

Creating Python RPM

I have been reading about creating an RPM for Python 2.6.4. In this page: http://docs.python.org/distutils/builtdist.html it says you can create an RPM of the current Python using python setup.py bdist_rpm. The question's I have are:Do you

mmap vs sbrk, performance comparison

mmap vs sbrk, performance comparison

Which of these calls is faster on average? I've heard that mmap is faster for smaller allocations but I haven't heard a comparison of either. Any information on performance for these would be nice. 1:You should tag this with a particular

Task Dependency in OpenMP 4

Task Dependency in OpenMP 4

The following code works based on the OpenMP 4.0 specification: The out and inout dependence-types. The generated task will be a dependent task of all previously generated sibling tasks that reference at least one of the list items in an

When is copy on write invoked for python multiprocessing across class methods

When is copy on write invoked for python multiprocessing across class methods

I have a bit of multiprocessing Python code that looks a bit like this:import timefrom multiprocessing import Poolimport numpy as npclass MyClass(object): def __init__(self): self.myAttribute = np.zeros(100000000) # basically a bi

Oracle java 7 Installation in Ubuntu E: Sub-process /usr/bin/dpkg returned an error code (1)

Oracle java 7 Installation in Ubuntu E: Sub-process /usr/bin/dpkg returned an error code (1)

I can't install oracle java 7 following the steps provided in this link:http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.htmlsudo add-apt-repository ppa:webupd8team/javasudo apt-get updatesudo apt-get install oracle-ja

GlassFish v3 Domain Server cannot start. Port is occupied

GlassFish v3 Domain Server cannot start. Port is occupied

I imagine this is a pretty generic error. I cant seem to find any documentation on it. I am simply attempting to run a java web project with jsp's and beans... using netbeans 6.8 on windows xp. Thoughts? apologies for such a newb question.

syslog_r for Linux?

syslog_r for Linux?

Folks, I can't find the re-entrant version of syslog() for Linux...is there one? And if no, what do you? The obvious answer is to move logging facility into separate thread and serialise access to syslog... 1:According to the POSIX speci

What does it take to run the Windows Phone 8 emulator?

What does it take to run the Windows Phone 8 emulator?

With the release of Windows Phone 8 finally out there, we finally have access to the SDK. I've heard that it requires special hardware or something for the emulator though. What are the system requirements for the phone emulator? 1:You n

Docker: MacOSX Expose Container ports to host machine

Docker: MacOSX Expose Container ports to host machine

In my job I working with docker and the option --net=host working like a charm forwarding the docker container ports to the machine. This allows me to adding grunt tasks that use certain ports by example:A taks for serving my coverage repor

Redirect to HTTPS with .htaccess with a specific domain

Redirect to HTTPS with .htaccess with a specific domain

I currently have 2 domains that access to the same folder on my server: metrikstudios.com and ziced.com.I want the users that enter through http://metrikstudios.com be redirected to https://metrikstudios.com and the users that enter through

Python copy larger file too slow

Python copy larger file too slow

I am trying to copy a large file (> 1 GB) from hard disk to usb drive using shutil.copy. A simple script depicting what I am trying to do is:-import shutilsrc_file = "source\to\large\file"dest = "destination\directory"shutil.copy(src_file,

Differences between unix and windows files

Differences between unix and windows files

Am I correct in assuming that the only difference between "windows files" and "unix files" is the linebreak? We have a system that has been moved from a windows machine to a unix machine and are having troubles with the format.I need to aut

Jekyll's “--auto” doesn't work?

Jekyll's “--auto” doesn't work?

I have just reinstalled my whole system and started working on my projects again. I used and still use Jekyll in some of them however I have a problem with auto generation using --auto or _config.yml's auto: true. It simply doesn't work. Th

How to get time in PHP with nanosecond precision?

How to get time in PHP with nanosecond precision?

Is this even possible in PHP?If not, what is the highest precision available? 1:The microtime function is what you're looking for.PHP does not supply a function that has higher precision than microseconds.You can use the system function

‘setprecision’ is not a member of ‘std’

‘setprecision’ is not a member of ‘std’

Errors:~> g++ ssstring.cppssstring.cpp: In function ‘int main()’:ssstring.cpp:12:31: error: ‘setprecision’ is not a member of ‘std’ssstring.cpp:12:52: error: ‘numeric_limits’ is not a member of ‘std’ssstring.cpp:12:74: error: expected prima

freeing a null pointer

freeing a null pointer

What happens inside memory if we try to free a pointer which is pointing to NULL?Is that ever valid?Why does it not show any warning/error messages? 1:From C99 section 7.20.3.2 : The free functionSynopsis 1 #include void free(void *p