Tag: Linux
c file i/o
by Dark_Mafia on Feb.23, 2010, under Ah ? :S, Cutting edge, Downloads, Gaming, Linux Related, Multimedia, My Personal Stuff
#include <stdio.h>
int main ( int argc, char *argv[] )
{
if ( argc != 3 ) /* argc should be 2 for correct execution */
{
/* We print argv[0] assuming it is the program name */
printf( “usage: %s filename”, argv[0] );
}
else
{
// We assume argv[1] is a filename to open
FILE *file = fopen( argv[1], “r” );
FILE *file2 = fopen( argv[2], “w” );
char line[128];
/* fopen returns 0, the NULL pointer, on failure */
if ( file == 0 )
{
printf( “Could not open file\n” );
}
else
{
int x;
/* read one character at a time from file, stopping at EOF, which
indicates the end of the file. Note that the idiom of “assign
to a variable, check the value” used below works because
the assignment statement evaluates to the value assigned. */
while ( ( x = fgetc( file ) ) != EOF )
{
printf( “%c”, x );
fprintf(file2,”%c”,x);
}
/*while(fgets(line,sizeof line,file) != NULL){
fputs(line,stdout);
fprintf(file2,”%s”,line);
} */
fclose( file );
fclose(file2);
}
}
}
how to install fonts in fedora/redhat(might wrk for other distros too)
by Dark_Mafia on Dec.26, 2009, under Linux Related
k quick guide
make a folder in /usr/share/fonts
mkdir /usr/share/fonts/myfonts
copy all the fonts to the folder
cp /home/oshanr/fedora_software/fonts/* /usr/share/fonts/myfonts
cache them
fc-cache
check them
fc-list
Thts it
Install Picasa 3.5 In Linux
by Dark_Mafia on Sep.27, 2009, under Downloads, Linux Related, Multimedia
Google this week released Picasa 3.5 for Windows and Mac. Sadly no Linux version was offered, a fact Google blamed on the lowly adoption figures they have for Picasa on Linux.
I think that’s a shame because Picasa is such an incredible application – its photo editing, its photo management, it’s integrated web services… All are just first class.
Picasa 3.5 brings with it: -
Facial recognition
Geo-tagging
Better text tool
Awesome Tagging tools
Photo importing improvements
There are two option to install Picasa 3.5 in Linux.
First is to simply install the Windows version via Wine. It runs okay but lacks some of the basic Linux integration that Picasa for Linux comes with.
The second is to go one further and replace Picasa 3.0 for Linux with 3.5. Everything works (bar what never has) and it runs off of the same self-contained Wine install that Picasa for Linux does – meaning you don’t lose any integration with Gnome.
This article is about installing 3.5 as a Linux version.
You will need Picasa 3.0 already installed, as well as WINE.
You can either grab a .deb of 3.0 from
picasa.google.com/linux
or add the Google testing repository to ‘Software Sources’
deb http://dl.google.com/linux/deb/ testing non-free
Update/reload your sources after adding and then
sudo apt-get install picasa
To install Wine: -
sudo apt-get install wine
Get 3.5 FOR WINDOWS
Now grab a copy of Picasa 3.5 for windows!
http://dl.google.com/picasa/picasa35-setup.exe
Install this in wine by double-clicking on it, etc.
Installing 3.5 in Linux
Copy the installed Picasa 3.5 from
$cp -rf /home/{username}/.wine/drive_c/Program\ Files/Google/Picasa3 /opt/google/picasa/3.0/wine/drive_c/Program\ Files/Google/Picasa3
You’ll likely need to do this as root so
gksu nautilus
via a terminal to gain access.
Providing you already have Picasa 3.0 for Linux installed, all of the above directories should be there.
Once done, that’s it! Fire up Picasa 3.5 from your
Applications > Graphics > Picasa
menu and all of the new features are there ready and waiting.
narrat voice from linux command line
by Dark_Mafia on Sep.27, 2009, under Cutting edge, Linux Related
well its been a long time since i wrote my last article , i just found out about this and thought of sharing with u in simple way .
k to start up just remember that
$ = usermode
and
# = root
and those are commands you need to type in terminal
k now if you wants to narrat the current time just run
$saytime
and it you wants to say something
$echo “hi whatsupbuddy , have a nice day” | text2wave > hi.wav
template is
${command to send text} | text2wave > {output filename.wav}
so if u have a file to read just type
$cat {filename} | text2wave > {output filename.wav}
now to playback the wav just use
$aplay hi.wav
or
$aplay {output filename.wav}
Alice in UNIX Land
by Dark_Mafia on Sep.20, 2009, under Linux Related
Alice in UNIX Land
Alice was reading the message on her monitor and beginning to suspect
that everything was not as it should be. "Program too big to fit in
memory," it read.
"Curiouser and curiouser," she said, "All I did was load
fourteen TSRs before starting my word processor. With four megabytes,
I wish I could use more than 640K."
"At that moment, a small white consultant ( a very white
consultant) ran across the room. "Oh my coat and necktie," he said,
"I'm going to be late for my appointment. And at one fifty an hour,
too." Before Alice could say anything, he leaped into her monitor and
disappeared behind her operating system.
Alice thought that she had never seen anyone leap into a monitor
before; and certainly not go clean through the operating system. But
then, she had been told that DOS was very shallow. Without hesitating
a moment, she leaped in after him.
She found herself in a shiny corridor. Not knowing what else to
do, she began walking. Turning a corner, she found herself facing two
fat little men, each with an arm round the other's neck. One had "POS"
embroidered on his collar, and the "NEG".
"I know," said Alice, "you two are a transistor."
"Yes," said Positive.
"Can you help me? asked Alice.
"No," said Negative.
"I'm looking for a white consultant." Alice pointed in the
direction she had been walking. "Did he go this way?" she asked.
"No," said Negative.
She pointed the other way.
"Yes," said Positive.
Soon Alice came upon a large brown table. The Consultant was
there, as was an apparently Mad Hacker, and several creatures that
Alice did not recognize. In one corner sat a Dormouse fast asleep.
Over the table was a large sign that read "UNIX Conference."
Everyone except the Dormouse was holding a paper cup, from which
they were sampling what appeared to be custard. "Wrong flavor," they
all declared as they passed the cup the cup to the creature on their
right and graciously took the one being offered on their left. Alice
watched them repeat this ritual three or four times before she
approached and sat down.
Immediately, a large toad leaped into her lap and looked at her
as if it wanted to be loved. "Grep," it exclaimed.
"Don't mind him," explained the Mad Hacker. "He's just looking
for some string."
"Nroff?" asked the Frog.
The Mad Hacker handed Alice a cup of custard-like substance and
a spoon. "Here," he said, "what do you think of this?"
"It looks lovely," said Alice, "very sweet." She tried a
spoonful. "Yuck!" she cried. "It's awful. What is it?"
"Oh just another graphic interface for UNIX," answered the
Hacker.
Alice pointed to the sleeping Dormouse. "Who's he?" she asked.
"That's OS Too," explained the Hacker. "We've pretty much given
up on waking him.
"Just than, a large, Blue Elephant sitting next to the Dormouse
stood up. "Ladies and gentlemen," he trumpeted pompously, "as the
largest creature here, I feel impelled to state that we must take an
Open Look at..."
A young Job Sparrow on the other side of the table stood up
angrily. The Elephant noticed and changed his speech
accordingly."...what our NextStep will be.
"Half the creatures bowed in respect while the other half
snickered quietly to themselves. Just then, OS Too fell over in his
sleep, crashing into the Elephant and taking him down with him. No one
seemed a bit surprised.
"What we need," declared a Sun Bear as he lapped up custard with
his long tongue," is a flavor that goes down like the Macintosh.
"Suddenly, the White Consultant began jumping up and down as his
face got red. "No, no, no! he screamed. "No one pays one fifty an
hour to Macintosh consultants!"
"Awk," said the Frog.
"Users," explained the Sun Bear, "want an easy interface that
they will not have to learn."
"Users?" cried the Consultant in disbelief. "Users?! You mean
secretaries, accountants, architects. Manual laborers!"
"Well," responded the Sun Bear, "we've got to do something to
make them want to switch to UNIX."
"Do you think," said a Woodpecker who had been busy making a
hole in the table, "that there might be a problem with the name `UNIX?'
I mean, it does sort of suggest being less than a man."
"Maybe we should try another name, " suggested the Job Sparrow,
"like Brut, or Rambo."
"Penix," suggested a Penguin.
"Mount," said the Frog, "spawn."
Alice slapped him. "Nice?" he asked.
"But then again," suggested the Woodpecker, "what about the
shrinkwrap issue?"
Suddenly, everyone leaped up and started dashing about, waving
their hands in the air and screaming. Just as suddenly, they all sat
down again.
"Now that that's settled," said the Woodpecker, "let's go back
to tasting flavors."
Everyone at the table sampled a new cup of custard. "Wrong
flavor," they all declared as they passed the cup to the creature on
their right and took the one being offered on their left.
Totally confused, Alice got up and left. After she had been
walking away, she heard a familiar voice behind her.
"Rem," it said, "edlin."
Alice turned and saw the Frog. She smiled. "Those are queer
sounding words," she said, "but at least I know what they mean."
"Chkdsk," said the Frog.
-----By Lincoln Spector TEXAS COMPUTER CURRENTS SEPTEMBER 1989
downloader is updated
by Dark_Mafia on Sep.16, 2009, under My Personal Stuff
i got a new method to delete the downloaded links so i did an update
get the new file at downloader
My downloader script
by Dark_Mafia on Aug.25, 2009, under Cutting edge, Downloads, My Personal Stuff
a script i created to download files from the server , you can use it for any ftp download , it will store the files to
~/Downloads/axel
and the log files will be saved in
~/Downloads/axel/.tempfiles
i will get a readme file soon ![]()
you can use this for any linux distribution if you can get axel downloader running
Download
Moblin project
by Dark_Mafia on Aug.03, 2009, under Cutting edge, Linux Related, Multimedia
The Moblin Architecture is designed to support multiple platforms and usage models ranging from Netbooks to Mobile Internet Devices (MID), to various embedded usage models, such as the In Vehicle Infotainment systems. The central piece of the architecture is the common layer we call “Moblin Core”, a hardware and usage model independent layer that provides one uniform way to develop such devices. Underneath the Moblin Core sits the Linux kernel and device drivers specific to the hardware platform, and above the Moblin Core are the specific user interface and user interaction model for the target device.
its gonna be nothing like we hve ever imagined see these
Sabayon
by Dark_Mafia on Aug.03, 2009, under Linux Related




technically its linux operating system but in my point of view its not just another linux os its a whole new level of linux. all the great features of all different os’s have come together in this distro . and also whole new level of gui with all the features which you get after configuring . but this gives them all even in the live boot . even the boot loader screen looks awsome than any other os i can imagine of . and specially the compiz effects they are already working in the live boot without even installing the driveres( which is a booring job )
also if you just want to play the game you can just boot up into the game
get your copy today http://www.sabayonlinux.org
My 1st Blog post
by Dark_Mafia on Aug.02, 2009, under My Personal Stuff
well im A KID which is vry lazy to write. i just wanna click a button and evry thing happens or either type few keys and press enter and watch terminal doing my work for me
lol .1 reason y i lke linux so much and hate windws so much
but u knw thre are thousand ideas which pops to the head and thres no one around is intrested abt it
soooooooooo i started ths for my self . i donno just read and take wht evr u want if ur intrested
anyway GOOD LUCK c ya
