I have found the code which links against of 'g2c' library. Why do I need it? Just would like to understand why it might be important and what it does in general.
Thanks!
Is it possible to use ffmpeg create a video from a set of sequences, where the number does not start from zero?
For example, I have some images [test_100.jpg, test_101.jpg, test_102.jpg, ..., test_200.jpg], and I want to convert them to a video. I tried the following command, but it didn't work (it seems the number should start from zero):
ffmpeg -i test_%d.jpg -vcodec mpeg4 test.avi
Any advise?
I have a daemon writing to a log file that, eventually, fills up the disk. Is there a way for me to periodically limit the size of the log file without stopping the daemon without changing the code in it? SIGHUP kills the daemon.
My .deb package, built on 32-bit Ubuntu and containing executables compiled with gcc, won't install on the 64-bit version of the OS (the error message says 'Wrong architecture i386'). This is confusing to me because I thought that in general 32-bit software worked on 64-bit hardware, but not vice-versa.
Will it be possible for me to produce a .deb file that I can install on a 64-bit OS, using my 32-bit machine? Is it just a matter of using the appropriate compiler flags to produce the executables (and if so what are they), or is the .deb file itself somehow specific to one processor architecture?
I have always done this:
mysqldump -hlocalhost -uuser -ppass MYDATABASE > /home/f/db_backup/MYDATABASE.sql
mysql -uuser -ppass MYDATABASE < MYDATABASE.sql
But, if I do this instead...is this safe? Is this identical to the above???
mysqldump -hlocalhost -uuser -ppass MYDATABASE | gzip > /home/f/db_backup/MYDATABASE.sql.gz
zcat MYDATABASE.sql.gz | mysql -uuser -ppass MYDATABASE
Is there any protection provided by kernel? Because when we tried to allocate memory using an
kmalloc() from user space, the kernel allowed to allocated around 124
MB of memory, and when we try to write into it, the kernel crashed. If there
was protection of kernel memory area, this wouldn't have happened, i guess
I need to print the following values with printf as the follwoing around like this:
printf "[`date +%d"/"%b"/"%G"-"%T`] [WARN] $PARAM1 $PARAM2 $PARAM3
The required output:
[02/Jun/2010-11:08:42] [WARN] val1....val2...val3
how to delete all lines below a word except last line in a file. suppose i have a file which contains
| 02/04/2010 07:24:20 | 20-24 | 26 | 13 | 2.60 |
| 02/04/2010 07:24:25 | 25-29 | 6 | 3 | 0.60 |
+---------------------+-------+------------+----------+-------------+
02-04-2010-07:24 --- ER GW 03
+---------------------+-------+------------+----------+-------------+
| date | sec | BOTH_MO_MT | MO_or_MT | TPS_PER_SEC |
+---------------------+-------+------------+----------+-------------+
| 02/04/2010 07:00:00 | 00-04 | 28 | 14 | 2.80 |
| 02/04/2010 07:00:05 | 05-09 | 27 | 14 | 2.70 |
...
...
...
...
END OF TPS PER 5 REPORT
and i need to delete all contents from "02-04-2010-07:24 --- ER GW 03" except "END OF TPS PER 5 REPORT" and save the file.
This has to be done for around 700 files. all files are same format, with datemonthday filename.
I have a classifieds website, and users may post classifieds, add images, remove classifieds etc etc...
I have no idea what to set the permissions to on folders.
For instance, a php script which I have uploads a file to a directory.
What would you have set the directory permissions to?
Nobody need access to the directory, only the php script...
Just wonder if anybody has a good (brief) article about setting the "right" permissions?
Thanks
I'm using grep to generate a list of files I need to move:
grep -L -r 'Subject: \[SPAM\]' .
How can I pass this list to the mv command and move the files somewhere else?
My Windows application runs under Wine, but the installation is a bit of a headache for laymen, and the wrappers I've seen online (PlayOnLinux, Wine Doors) require even more packages to be installed. Is there a way to make a package that will install Wine if the user needs it to be installed, install the application and shortcuts, all with minimal user hassle?
hi,
consider a kernel tasklet scheduled and executing the tasklet function.
Is there a way to know which core the tasklet is running ?
I mean is there a function / variable to know at which core the tasklet is running at.
Architecture is arm.
Thanks!
Application scenario:
I have the (normal/permanent) /var/log mounted on an encrypted partition (/dev/LVG/log). /dev/LVG/log is not accessible at boot time, it needs to be manually activated later by su from ssh.
A RAM drive (using tmpfs) is mounted to /var/log at init time (in rc.local).
Once /dev/LVG/log is activated, I need a good way of appending everything in the tmpfs to /dev/LVG/log, before mounting it as /var/log.
Any recommendations on what would be a good way of doing so? Thanks in advance!
I use the functions fork(),exec()...
But how can this program compiled without including some extra headers(like sys/types.h, sys/wait.h).
I use ubuntu 10.04 with gcc version 4.4.3
#include <stdio.h>
#include <stdlib.h>
int main()
{
pid_t pid;
printf("before fork\n");
pid = fork();
if(pid == 0)
{
/*child*/
if(execvp("./cpuid", NULL))
{
printf("error\n");
exit(0);
}
}
else
{
if(wait(NULL) != -1)
{
printf("ok\n");
}
}
return 0;
}
Is there a command to tell compiz that we want to bring in front and set focus to a specific window?
How should we identify the window in that command?
The reason behind this question is the following use-case:
Suppose we have a wiki to keep notes of anything interesting we find out. It would be very convenient to have a keyboard shortcut to bring the browser window with our Wiki page in front and start typing immediately then with another key combination switch to the application we were working before
I know that "ALT+TAB" switches between the last two used windows but cannot support more complex combinations of applications. E.g Browser+Eclipse+ Wiki
If there is a command like the one described, it is easy to add a shortcut to it from KDE or GNOME interface
Thanx ...
I am working with a file upload script. I am currently uploading a file and then trying to echo out an anchor linking to that file, but since I used mkdir() with 0700 permissions to upload the file, it won't allow me access to view the file.
I am pretty sure the problem I am experiencing is because of the file permission code I used. The problem is I just don't know what all the different file permission codes are and what they mean.
Can somebody please list out all the different file permissions and what they each do?
Every x minutes I grab an image from a network-cam. Now i want to add this picture to an existing video file - on the fly.
I don't want to keep numerous image files and then encode them once in a while with e.g.
mencoder mf://@${LIST} -mf type=jpg:fps=${FPS} ...
The video format/codec doesn't really matter, as long as standard tools (mplayer, ffmpeg, vlc, ...) can handle it.
Any ides or suggestions?
Thanks in advance!
When consulting bash's man page, it read this sentence about bash history:
The second and subsequent lines of a multi-line compound command are
not tested, and are added to the history regardless of the value of
HISTCONTROL.
But I have tried this:
$ HISTCONTROL=ignorespace
$ if [ -f /var/log/messages ]
> then
> echo "/var/log/message exists."
> fi
$ history | tail -2
18 HISTCONTROL=ignorespace
19 history | tail -2
Note that the if is leaded by a space. Why the second line of this if compound command still not appear in the history?
You usually invoke the following commands to build a ./configured product:
make
make install
Okay, the product is in the system now. Then you change some source code files and invoke only make install. The question is, does the conventional implementation of install target requires the executables to be recompiled, or just the old ones should be copied to the appropriate system path?
I have a command line program written in Python, and when I pipe it through another program on the command line, sys.stdout.encoding is None. This makes sense, I suppose -- the output could be another program, or a file you're redirecting it into, or whatever, and it doesn't know what encoding is desired. But neither do I! This program will be used by many different people (humor me) in different ways. Should I play it safe and output only ascii (replacing non-ascii chars with question marks)? Or should I output UTF-8, since it's so widespread these days?
Basically, I want a simple pushButton with a colorful text which when pressed exits the application.
Why cant I press PushButton in this simple program. I am using QT 4.6 on Arch x86_64.
#include <QtGui/QApplication>
#include <QLabel>
#include <QPushButton>
#include<QtGui>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QMainWindow *Main=new QMainWindow;
QPushButton *button = new QPushButton(Main);
QLabel *label = new QLabel(Main);
label->setText("<h2><i>Hello</i> ""<font color=red>Qt!</font></h2>");
label->setVisible(true);
QObject::connect(button, SIGNAL(clicked()),label, SLOT(clear()));
label->setAlignment(Qt::AlignCenter|Qt::AlignVCenter);
label->setWindowTitle("HelloWorld Test Program");
Main->show();
return a.exec();
}