LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Old

usb detection

Posted 03-15-2011 at 03:04 AM by sumeet inani

Code:
sudo lshw | grep -i usb
you will see
Quote:
bus info: usb@1:number_varying_with_port
configuration: driver=usb-storage
Obviously lshw (as super-user) will show all info like serial number,signature,capacity etc. of pendrive
Member
Posted in Uncategorized
Views 335 Comments 0 sumeet inani is offline
Old

my dvdrip

Posted 03-15-2011 at 02:38 AM by sumeet inani
Updated 03-15-2011 at 02:56 AM by sumeet inani

Formula to calculate video bitrate
Code:
bitrate(in kb\s) = (target_size_in_Mbytes - sound_size_in_Mbytes) * 1024 * 1.024 * 8 / length_in_secs
sound_size is obtained from
Code:
mencoder INPUT_video_file -of rawaudio -oac mp3lame -ovc copy  -o sound_size.mp3
rip it
Code:
ffmpeg -i Input_video_file  -s widthxheight -f avi -vcodec mpeg4 -b from_formula -g 300 -bf 2 -acodec libmp3lame -ab 96k dvdrip.avi
If ffmpeg gives 'segmentation error' , 'cannot resample...'...
Member
Posted in Uncategorized
Views 406 Comments 0 sumeet inani is offline
Old

how to compile c program in linux

Posted 03-15-2011 at 02:25 AM by sumeet inani

In windows , I used to run borland C++ compiler which also provides help on all functions defined in various libraries.

In ubuntu 10.04 I do
Code:
gcc c_program.c
It will provide error output , if any. Otherwise produce a.out in current folder which can be executed
Code:
./a.out
In one of my threads I learnt that you should end printf with '\n' so that buffered output is flushed on screen.
You can also use 'fflush(stdout);'...
Member
Posted in Uncategorized
Views 2273 Comments 1 sumeet inani is offline
Old

black stripes around mouse pointer + monitor out of range

Posted 03-15-2011 at 02:12 AM by sheyer

Hallo,

i have seen that for some years another person has the same question already ask, but does not received any answer.

I have also for some days receive very irritating black vertical lines spaced equally closely surrounding the mouse pointer, which does not disappear. I use the operating system Linux Debian. Under Windows ( i have both operating system on my PC) this problem does not appear.

Some more details about the appearance:
I have first...
LQ Newbie
Posted in Uncategorized
Views 2678 Comments 1 sheyer is offline
Old

no

Posted 03-14-2011 at 11:52 PM by MrCode
Updated 04-02-2011 at 04:28 PM by MrCode (Major program revision)

Code:
#include <stdio.h>
#include <string.h>
#include <malloc.h>

int main(int argc,char** argv)
{
    char* str = malloc(1);
	
    if(argc >= 2)
    {
        int i;
        for(i = 1; i < argc; i++)
        {
            strcat(str," ");
            strcat(str,argv[i]);
        }
        
        int len = strlen(str);
...
Member
Views 751 Comments 0 MrCode is offline

  



All times are GMT -5. The time now is 07:43 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration