linux

How do I stop USB buffering?

I'm reading real-time data over USB, but the data is buffered. How do I stop the buffering? ...

web application: store txt file on windows server share from linux web server

I have a java class that I use to create a text file from a web application. I'm using the following code: private void CreatePaymentFile(String QueryCriteria) { BigDecimal TotalPay; DecimalFormat df2 = new DecimalFormat("00000"); String RecordString = null; try{ String fileName = "\\\\fileandprint\\Apps\\Jury\\SHARE\\Payment_" + short...

How to change case of UTF file.

Hello I have UTF file in uppercase and I want to change all words to lowercase. I have tried: `$ tr '[:upper:]' '[:lower:]' < input.txt > output.txt` but that changes only cheracter without accent. Thanks ...

Bash script to read a file

Not sure why the last line does not cut the " from the script: #!/bin/bash FILENAME=$1 while read line do cut -d '"' -f2 echo $line done < $FILENAME $ cat file "1" test "2" test "3" test "4" test "5" test If I run this script with the following command: $ ./test file 2 3 4 5 "1" test ...

how to make sure not to read a file before finishing the write to it

When trying to monitor a directory using inotify on Linux, as we know, we get notified as soon as the file gets created (before the other process finish writing to it) Is there an effective way to make sure that the file is not read before writing to it is complete by the other process? We could potentially add a delayed read; but as w...

Compare 2 directories and copy differences to directory 3

Hello - I have three directories. I would like to compare directory1 with directory2, then take those changes/new files and copy them over to directory3. Is there an easy way to do this, maybe by using linux diff and cp commands? I'm open to ideas. Thanks! Andrew ...

Most affordable, portable, battery-powered hardware for running a LAMP setup for development?

I will be flying to Australia (~15 hr. flight) and I'd like to continue work on my current project while on the airplane. My project (website on CakePHP framework) requires a LAMP bundle so I'm looking for a very portable, reasonably affordable device that can accommodate a LAMP installation, and also could retain battery life througho...

ARM calling conventions on WinCE and Linux?

Do WinCE and Linux use the same calling convention on ARM? What are the differences? The documents I've found so far do not explain very well. For example on http://msdn.microsoft.com/en-us/library/ms864497.aspx, it says "Windows CE .NET Compiler" on one line, but "the ARM compiler" on the next line, and "CLARM" at the bottom, and it's ...

Installing x86_64 version of ddd, but missing .so libraries

I am trying to install ddd on my x86_64 GNU/Linux machine. I have tried installing a few different versions of ddd, but when I type "rpm -i ddd..." I get: ddd-> rpm -i ddd-3.3.11-14.el5.4.x86_64.rpm warning: ddd-3.3.11-14.el5.4.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 217521f6 error: Failed dependencies: ...

Can ELF file contain more than one symbol table?

Can ELF file contain more than one symbol table? Is it standardized somehow? ...

.htaccess is interfering with nested .htaccess/.htpasswd?

I'm using Simple Mailing List (http://www.notonebit.com/projects/mailing-list). It's good mailing list, but no admin area. So you have to use .htaccess/.htpasswd to protect the /mail/admin folder. However, my site has WordPress installed in the website's root folder. WordPress creates .htaccess for custom permalinks. And for some reason...

non-IDE C development environment

How do I set up a non-IDE-based C development environment on Linux? ...

Can gdb make a function pointer point to another location?

I'll explain: Let's say I'm interested in replacing the rand() function used by a certain application. So I attach gdb to this process and make it load my custom shared library (which has a customized rand() function): call (int) dlopen("path_to_library/asdf.so") This would place the customized rand() function inside the process' m...

How to find out the location of currently used MySQL configuration file in linux

How do I know which configuration file is used by MySQL currently? Is there any command or something to find it out? ...

A quest for programmers editor under Linux

Hi. I understand this question is very personal for everyone :), but still I'm forced to ask it. Currently I'm using VIM and gVIM as my main editor, but imho it has a lot of downsides: Very inconvenient scripting language. Indentation and highlighting with regexps (real life shows that it's not the best idea). Mixed file types issues ...

profile java memory use on linux

i have a socket server written in java, and i believe there is a memory leak. The i could not find anything in Netbeans' profiler, so i want to test it when it in deployed on my ubuntu server. How do i do this? What is an easy to install and use java profiler for ubuntu? ...

recvfrom failing with error 11

Hi I am trying out a udpclient program which uses sendto and recvfrom functions. I am setting SO_RCVTIMEO value as 10 seconds for my socket. I am binding the socket to source ipaddress and sourceport. When I check the netstat I can see that there is no other process which is binded with the same values. My bind operation is also succe...

convert .fla file to .swf on linux

hello, i'm totally new to flash and action script, here some action script code, for capturing images from webcam (from here): var cam:Camera = Camera.getCamera(); var video:Video = new Video(640,480); video.attachCamera(cam); video.x = 20; video.y = 20; addChild(video); import flash.display.Bitmap; import flash.display.BitmapData; ...

Port forwarding on linux local loop to connect two android emulators

I am trying to communicate between two android emulators for communication , thus I am trying to forward port X to port Y on 127.0.0.1 where port X is the port I am transmitting too and Y is the one I am receiving . Is this possible and if so how do I forward the local ports? ...

Install Panda3d to run with python

Hello. I am running Ubuntu 10.04, I have python installed and running fine. When I installed pand3d from the deb package from the site and tried to run an sample. Like it is describe in this page: http://www.panda3d.org/manual/index.php/Installing_Panda3D_in_Linux I got the error: Traceback (most recent call last): File "T...