Hi,
what I want to do is PHP to look at the url and just grab the name of the file, without me needing to enter a path or anything (which would be dynamic anyway). E.G.
http://google.com/info/hello.php, I want to get the 'hello' bit.
Help?
Thanks.
...
I need to know how to start writing an application based on plug-in architecture. I mean how to write a base code and let others develop the application by adding the plug-ins they write.
I know that there is some problems in doing so in c++. most people use another language such as python to add plug-ins to their c++ application.
...
If there is any possibility to use the parameters in zsh aliases? Something like this:
alias ssh_nokia="ssh root@<ip_parameter>"
Usage:
ssh_nokia 192.168.1.2
...
I'm venturing into the world of C++ and Linux, and am having problems linking against a shared library.
I have a library, libicuuc.so.44.1, installed in /usr/local/lib. There is also a link in the same directory, libicuuc.so.44 pointing to that library.
My /etc/ld.so.conf reads:
include /etc/ld.so.conf.d/*.conf
I have a file, /etc/l...
Say I have a bunch of time stamps
As I iterate over these timestamps,
01:23:00
12:34:14
17:09:12
...
I want to include only timestamps between 08:00:00 and 17:00:00
please suggest
...
How to use Operating System Commands in Catalyst Controller?
For example. I want to use Perl system command in Controller .it’s not working ..
Any idea?
In Controller module
my $cmd = "/temp/useradd.sh $username_st1 $_ $log_file &";
system ($cmd );
...
I have just ordered a VPS from my provider.
I have some Q however...
My website uses Solr, which requires the following according to their website:
"Solr requires Java 1.5 and an Application server (such as Tomcat) which supports the Servlet 2.4 standard"
I also need php 5, MySql, and the usual javascript etc...
The OS is Ubuntu 9.10...
I'm using Python, for what it's worth, but will accept answers in any applicable language.
I've tried writing to /proc/$pid/cmdline, but that's a readonly file.
I've tried assigning a new string to sys.argv[0], but that has no perceptible impact.
Are there any other possibilities? My program is executing processes via os.system (equi...
I have an application that needs to behave differently if run directly from the linux console. So if a user connects with SSH to run FooBar, or the user walks over to the console and logs in directly to run FooBar, I want it to do something different.
What C API do I need to call to tell the difference between these two scenarios? I w...
Hi,
I live in the linux terminal all the time under my slackware GNU/linux system (an EeePC). By default, GNU Emacs won't start if It can't find several Xorg libraries. Assuming I will never use X software at all, would it make sense for me to drop all this Xorg stuff and compile emacs again ?
Are you aware of anything that could get m...
I have a list of directories
/home
/dir1
/dir2
...
/dir100
Some of them have no files in it. How can I use Unix find to do it?
I tried
find . -name "*" -type d -size 0
Doesn't seem to work.
...
The Component Object Model (COM) is (or was...) the way in Windows to provide language-neutral software components.
Is there any programming model in Linux/UNIX with the same philosophy of code reuse through binary components?
...
I've been working with large sparse files on openSUSE 11.2 x86_64. When I try to mmap() a 1TB sparse file, it fails with ENOMEM. I would have thought that the 64 bit address space would be adequate to map in a terabyte, but it seems not. Experimenting further, a 1GB file works fine, but a 2GB file (and anything bigger) fails. I'm guessin...
I'm using sigprocmask as follows:
void mask(){
sigset_t new_set,old_set;
sigemptyset(&new_set);
sigaddset(&new_set,SIGALRM);
sigprocmask(SIG_BLOCK, &new_set, &old_set);
}
and to my surprise a function which prints a big list somehow gets interrupted by the signal, even though I invoke mask() at its beginning.
It look...
I need a way to get user home directory in C++ program running on Linux. If the same code works on Unix, it would be nice. I don't want to use HOME environment value.
AFAIK, root home directory is /root. Is it OK to create some files/folders in this directory, in the case my program is running by root user?
...
I have a linux box hooked up to an amplifier via optical out, I use MPD to play music out through the amp. I also watch movies using a Popcorn Hour connected to the amp and to a projector. During daylight it's not really possible to use the projector so I want to watch TV programs on my Windows laptop, but still take advantage of the amp...
hi..
I was trying to run a java class file using java code.The aim was to direct the executing sequence of the terminal of fedora 10 into a frame with a textpane.
My code is:
import java.io.DataInputStream;
import java.io.IOException;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.s...
Hello,
If a have a /dev device node and its major/minor numbers how do i know the kernel module name that exported this node?
...
Hi, i have a php web application.This application works on windows server but doesn't work on linux server.I think this is about php.ini or file permissions.Whta can be other reasons for this situaion?What must be the basic php.ini configurations for this situation?Thanks for advance...
...
Hello,
I got a RFID reader (GigaTek PCR330A-00) that is meant to be recognized under linux/windows as a (Human Interface Device) keyboard/USB.
I hate to say this but it is working as a charm under Win7 but not "really" under Linux.
Under Debian-like distros (x/k/Ubuntu, Debian,..), or Gentoo, or... I just can't have the device working...