0
голосов
2ответов
502 просмотров

code porting from 32bit to 64bit

I am trying to port 32bit code to 64bit linux machine. Are there any compiler flags for 64bit posrting warning on Linux. There are +w2 -m64 flags for SUN. Could anyone give me information for flags similar to this one? Thank you in advance,

0
голосов
1ответов
325 просмотров

jstat and ksysguard

Is there any way that I can get the output of jstat (in particular the -gcutil output) into ksysguard so that I can keep track of how a collection of java processes are doing from a garbage collection perspective? I know that jconsole has similar visualisations but I would prefer it if I could g...

3
голосов
3ответов
3169 просмотров

Running multiple sites on a LAMP with secure isolation

I have been administering a few LAMP servers with 2-5 sites on each of them. These are basically owned by the same user/client so there are no security issues except from attacks through vulnerable deamons or scripts. I am builing my own server and would like to start hosting multiple sites. My f...

16
голосов
4ответов
64441 просмотров

(13)Permission denied: access to /cgi-bin/test.cgi denied

I am trying out CGI-scripts for the first time but without success. I have read many tutorials and followed may threads in different forums but I can not make it work. I am using a appache web server on a Fedora 10 machine. I always have problem with [Wed Oct 21 20:47:36 2009] [notice] SELinux ...

3
голосов
1ответов
1189 просмотров

Create and build pure "ActionScript project" with Flex SDK under Linux

Before all: excuse my english :) Ok, here we go - im developing mostly java things, so my IDE - Intellij IDEA. For a few last weeks im playing with Flex and AS3. So, im using Flex SDK 3 with IDEA plugin. Everything was just fine, but now i want to create pure actionscript project without any fl...

1
голосов
2ответов
1208 просмотров

Simplest method to get the dictionary definitions of a list of words in a text file

File1: hello world I don't know the best method to extract a list of words from a text file, find their definitions and paste them into an output textfile. I've been thinking of using WordNet - but don't know how to automate the process. Does anyone have any ideas (perhaps google/APIs/linux a...

13
голосов
4ответов
17147 просмотров

Regex match a string with spaces (use quotes?) in an if statement

How would I do a regex match as shown below but with quotes around the ("^This") as in the real world "This" will be a string that can have spaces in it. #!/bin/bash text="This is just a test string" if [[ "$text" =~ ^This ]]; then echo "matched" else echo "not matched" fi I want to do som...

15
голосов
3ответов
8307 просмотров

Duplicate file descriptor with its own file offset

How can one create a new file descriptor from an existing file descriptor such that the new descriptor does not share the same internal file structure/entry in the file table? Specifically attributes such as file offset (and preferably permissions, sharing and modes) should not be shared between ...

2
голосов
1ответов
1393 просмотров

npapi plugin: how do I install a gecko plugin?

I've compile the basic plugin found here but I can't figure out how to install it on my Ubuntu machine.

-1
голосов
1ответов
108 просмотров

How do you start off with implementing a thread library?

How to write kernel code in C ? Where can we look forward to learn more of writing kernel code ? I want to know writing programs in C that can be used to modify my kernel. How do i do that ? What resources can i look upto ?

5
голосов
5ответов
2638 просмотров

Move line(s) to follow another line in a file

I got a file that has a line in the file like this: check=('78905905f5a4ed82160c327f3fd34cba') I'd like to be able to move this line to follow a line that looks like this: files=('somefile.txt') The array though at times that can span multiple lines, for example: files=('somefile.txt' ...

0
голосов
2ответов
1359 просмотров

Reading a line from a socket

I am writing some code in which i need to get a line from a socket whenever the line ends in a newline or carriage return. The line shoould be stored in a buffer. n = recv(sock, &ch, 1, 0); if (n > 0) { if (ch == '\r') { // do stuff } // } // I am using co...

18
голосов
12ответов
17250 просмотров

Good C++ Debugging/IDE Environment for Linux?

I have a friend who is trying to make the switch to Linux, but is hung up on the apparent lack of debugging/IDE environments for C++, especially as they relate to template programming. He has been using visual studio for years and is maybe a little spoiled by their awesome IDE. Does anyone have a...

-1
голосов
8ответов
884 просмотров

How can I make my C++ code cross platform capable?

How can I make my C++ code cross platform capable? I need it to work on Windows and Xubuntu.

3
голосов
4ответов
294 просмотров

Building files from TCP/IP traffic?

So, for a CS project I'm supposed to sniff a network stream and build files from that stream. For example, if the program is pointed to ~/dumps/tmp/ then the directory structure would be this: ~/dumps/tmp /192.168.0.1/ page1.html page2.html [various resources for pages1 ...

10
голосов
2ответов
6985 просмотров

How do I use waf to build a shared library?

I want to build a shared library using waf as it looks much easier and less cluttered than GNU autotools. I actually have several questions so far related to the wscript I've started to write: VERSION='0.0.1' APPNAME='libmylib' srcdir = '.' blddir = 'build' def set_options(opt): opt.tool_opt...

0
голосов
1ответов
635 просмотров

Malloc/free algorithm in Suse

Which implementation of malloc/free is used in a specific Linux distribution (in my case Suse 9 and Suse 10) ? Has it change between both versions ? Is it the same algorithm for 32 bits and 64 bits versions ?

2
голосов
12ответов
833 просмотров

Which language to use for implementing few Linux shell commands (homework) - plain C or C++?

I need to implement a few commands of Linux shell for my homework - 5 or 6 of them, including ls. Do not know much about which parameters to implement for each of commands... I planned to use C++, but when I asked my colleague for advice what language to choose - plain C or C++, he said that int...

2
голосов
3ответов
4537 просмотров

Qt Linking Error

I configure qt-x11 with following options ./configure -prefix /iTalk/qtx11 -prefix-install -bindir /iTalk/qtx11-install/bin -libdir /iTalk/qtx11-install/lib -docdir /iTalk/qtx11-install/doc -headerdir /iTalk/qtx11-install/include -datadir /iTalk/qtx11-install/data -examplesdir /iTalk/qtx11-inst...

2
голосов
3ответов
3320 просмотров

busybox sh wrapper to add extra functionality

I need a simple busybox sh wrapper which will do: IF "-Q" PARAMETER IS PROVIDED THEN acommand ALL PARAMETERS BUT "-Q" 2>&1 1>/dev/null ELSE acommand ALL PARAMETERS FI Parameters may include spaces. BTW I want to run the script with busybox sh and it doesn't support...

8
голосов
7ответов
2330 просмотров

Is Mono really cross-platform?

Official Mono project website says that Mono works successfully on Windows, Linux and Mac OS X. Is that true? I want to build applications which work at least on Windows and Linux. Is it possible with Mono? P.S. I know that similar topics already exist (e.g. Cross platform .Net?), but they may...

3
голосов
4ответов
9821 просмотров

pgpgin and pgpgout - Linux Counters in /proc/vmstat

I am writing an application which collects overall system I/O statistics. I was wondering whether the two counters for page-ins and page-outs, pgpgin pgpgout in /proc/vmstat include pages written to, and read from all disk-based block devices attached to the system. Please let me know, if yo...

10
голосов
4ответов
23180 просмотров

Use sed to delete all leading/following blank spaces in a text file

File1: hello world How would one delete the leading/trailing blank spaces within this file using sed - using one command (no intermediate files)? I've currently got: sed -e 's/^[ \t]*//' a > b For leading spaces. sed 's/ *$//' b > c And this for trailing spaces.

0
голосов
3ответов
15194 просмотров

How to use sed to delete a string with wildcards

File1: <a>hello</b> <c>foo</d> <a>world</b> <c>bar</d> Is an example of the file this would work on. How can one remove all strings which have a <c>*</d> using sed?

3
голосов
2ответов
1131 просмотров

Operator new and bad_alloc on linux

On Linux, malloc doesn't necessarily return a null pointer if you're out of memory. You might get back a pointer and then have the OOM killer start eating processes if you're really out of memory. Is the same true for c++'s operator new or will you get the bad_alloc exception?

2
голосов
3ответов
56646 просмотров

Running a jar from shell script

I have a jar file named umar.jar in /root/umar/bin directory. I have a shell script file run.sh in same directory. Following is the content of run.sh #!/bin/bash "$JAVA_HOME"/bin/java -jar /root/umar/bin/umar.jar Now when I run the shell script, I get the following error Exception in thread "...

1
голосов
3ответов
1971 просмотров

Running a command in shell script

I have a shell script file (run.sh) that contains the following: #!/bin/bash %JAVA_HOME%/bin/java -jar umar.jar when i try to run it (./run.sh), it gives me following: umar/bin/run.sh: line 1: fg: no job control However if I run same command directly on shell, it works perfectly. What's wr...

4
голосов
10ответов
3117 просмотров

How do I import environment settings into my Perl program?

I have a script whose content simply exports a variable in linux. export LD_LIBRARY_PATH=.... I want to run this script in my Perl script so whoever is running my Perl script will have their LD_LIBRARY_PATH set. Can i just do this in the beginning of my Perl script: #!/usr/bin/perl -w system...

20
голосов
6ответов
3301 просмотров

Good collection of libraries for C?

I'm looking for a good collection of libraries for ANSI-C, stuff for handling vectors, hash maps, binary tress, string processing, etc.

1
голосов
1ответов
623 просмотров

gprof error: profile file has unsupported version

I am trying to profile a shared library but there is an error when I invoke gprof: $ export LD_PROFILE=libMy.so $ ./a.out $ gprof -q libMy.so /var/tmp/libMy.so.profile gprof: file /var/tmp/libMy.so.profile has unsupported version 131071 Shared library was compiled with -ggdb -...