Linux.com

Community Blogs



a Linux-Newb.

Hi all.

I have to to find my way around linux, MySQL and Python/ Perl.

And I know absolutely nothing about linux or anything related to computer sciences.I have a biological background.

My only training in information tech. was a couple of years back in visual basic and just a tiny bit of SQL. I have been using windows  for over a decade now, that may help a bit with understanding all this, but this is Linux.

 So you see this would be quite a challange , to learn all this stuff without  the proper background.

 And this is why i shall document my struggles with linux and everything else . And also i get to say that i have my own blog now.

-p.

 

Do Your Friends Know You Tweet?

They'd better because Twitter has become an important new tool in building relationships and getting your message across.  This post details how to get started building your followers and adding value to the Twitter community. 

I recently saw survey results from a 60 Minutes/Vanity Fair poll that stated only 15 percent of Americans believe Twitter to be an important new tool for communication and I believe it.  Not because it's true but because Twitter can be hard to understand and get the hang of at first.

I distinctly remember my first experience with Twitter when I noticed someone casually mentioning they were "putting lipstick on at a redlight".  My first thought was "this is totally worthless".  My how times have changed.  Not only has the growth of Twitter been off the charts (1382% to be exact), but I've actually started using Twitter on a regular basis and find it extremely helpful and useful in my job.

Twitter can be tough to understand at first and there's good reason for it; its a different communication model than most are used to.  How ...

 

 

Digital Differential Analyzer (DDA) Algorithm

DDA_1

 DDA_2

 DDA_3

/*************************************************
* Digital Differential Analyzer (DDA) Algorithm *
*************************************************
* Usage :- Simple and general method for rasterizing lines and triangles
* Author :- Rooparam Choudhary
* Date :- August 29, 2009
* Place :- Shri Mata Vaishno Devi University
* EntryNo :- 2006ECS20
*/

#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <iostream>

#define ROUND(x) ((int)(x+0.5))

int MYCOLOR = WHITE;

inline void setpixel(int, int);
void DDA(int, int, int, int);
void unionJack(void);
void hexagon(int, int);
void randomUnionJack(int);

inline void setpixel(int x, int y){
putpixel(320+x, 240-y, MYCOLOR);
}

void randomUnionJack(int count){
void DJ(int, int, int);
int xr, yr, clr=0;
srand(time(NULL));
while(count-- > 0){
xr = -320 + rand()d1;
yr = -240 + rand()H1;
clr = 0;
if(yr > -xr){
if(xr < 0) clr = 3;
else if(yr < 0) clr = 2;
else if(yr > xr) clr = 4;
else if(yr < xr) clr = 1;
}else if(yr < -xr) {
if(xr > 0) clr = 3;
else if(yr > 0) clr = 2;
else if(yr < xr) clr = 4;
else if(yr > xr) clr = 1;
}
DJ(xr, yr, clr);
}
}

void DJ(int x, int y, int clr){
int shade = 0;
switch(clr){
case 1: shade = RED; break;
case 2: shade = BLUE; break;
case 3: shade = CYAN; break;
case 4: shade = MAGENTA; break;
default: return; break;
}
putpixel(320+x, 240-y, shade);
}

void DDA(int x0, int y0, int x1, int y1) {
int delX = x1-x0, delY = y1-y0, steps, k;
float x=x0, y=y0, incX, incY;

steps = (abs(delX) > abs(delY)) ? abs(delX) : abs(delY) ;

incX = delX / (float)steps;
incY = delY / (float)steps;

setpixel(ROUND(x), ROUND(y));
for(k=0; k<steps; ++k) {
x += incX;
y += incY;
setpixel(ROUND(x), ROUND(y));
}
}

int main(void) {
int gd = DETECT, gm;
char *author = "Coder:- Rooparam Choudhary";
char *algo = "Digital Differential Analyzer Algorithm";
char point[30];
std::cout << "Digital Differential Analyzer Algorithm ";
std::cout << author << std::endl;
initgraph(&gd, &gm, "C:");

setcolor(WHITE);
setbkcolor(GREEN);
outtextxy(320 - textwidth(algo)/2, 5, algo);
outtextxy(getmaxx()-4 -textwidth(author), getmaxy()-20, author);
setcolor(GREEN);
setbkcolor(BLACK);

MYCOLOR = GREEN;
// X-axis
DDA(-320, -1, 320, -1);
DDA(-320, 0, 320, 0);
DDA(-320, 1, 320, 1);
// Y-axis
DDA(-1, 240, -1, -240);
DDA( 0, 240, 0, -240);
DDA( 1, 240, 1, -240);
// Y - X = 0
DDA(-240, -240, 240, 240);
// Y + X = 0
DDA(-240, 240, 240, -240);

MYCOLOR = BROWN;
hexagon(-160, 120);
hexagon(160, 120);
hexagon(160, -120);
hexagon(-160, -120);

std::cout << "Enter samples for union jack (SHOULD BE GEATER THAN 100K): ";
int samp;
std::cin >> samp;
//unionJack();
randomUnionJack(samp);

setcolor(WHITE);
setbkcolor(GREEN);
outtextxy(320 - textwidth(algo)/2, 5, algo);
outtextxy(getmaxx()-4 -textwidth(author), getmaxy()-20, author);
setcolor(GREEN);
setbkcolor(BLACK);

int x0, y0, x1, y1;
MYCOLOR = WHITE;
std::cout << "Enter '-400' to exit ";
std::cout << "Enter the coordinates of end points: [x0 y0 x1 y1] ";

std::cin >> x0;
while(x0 != -400) {
std::cin >> y0 >> x1 >> y1;
sprintf(point, "(M, M)", x0, y0);
outtextxy(320+x0-textwidth(point)/2, 240-y0+2, point);
sprintf(point, "(M, M)", x1, y1);
outtextxy(320+x1-textwidth(point)/2, 240-y1+2, point);
DDA(x0, y0, x1, y1);

setcolor(WHITE);
setbkcolor(GREEN);
outtextxy(320 - textwidth(algo)/2, 5, algo);
outtextxy(getmaxx()-4 -textwidth(author), getmaxy()-20, author);
setcolor(GREEN);
setbkcolor(BLACK);

std::cin >> x0;
}

closegraph();
return 0;
}

void unionJack(void){
for(int y = 240; y>0; --y) {
int x = -321;

MYCOLOR = BLUE;
while(++x < -y)
{ putpixel(320+x, 240-y, MYCOLOR); }
MYCOLOR = CYAN;
while(++x < 0)
{ putpixel(320+x, 240-y, MYCOLOR); } MYCOLOR = MAGENTA;
while(++x < y)
{ putpixel(320+x, 240-y, MYCOLOR); }
MYCOLOR = RED;
while(++x < 321)
{ putpixel(320+x, 240-y, MYCOLOR); }
}
for(int y = -1; y>-241; --y) {
int x = -321;

MYCOLOR = RED;
while(++x < y)
{ putpixel(320+x, 240-y, MYCOLOR); }
MYCOLOR = MAGENTA;
while(++x < 0)
{ putpixel(320+x, 240-y, MYCOLOR); }
MYCOLOR = CYAN;
while(++x < -y)
{ putpixel(320+x, 240-y, MYCOLOR); }
MYCOLOR = BLUE;
while(++x < 321)
{ putpixel(320+x, 240-y, MYCOLOR); }
}
}

void hexagon(int xc, int yc) {
DDA(xc+60, yc+104, xc+120, yc);
DDA(xc+60, yc+104, xc+60, yc-104);
DDA(xc+60, yc+104, xc-60, yc-104);
DDA(xc+60, yc+104, xc-120, yc);
DDA(xc+60, yc+104, xc-60, yc+104);
DDA(xc+120, yc, xc+60, yc-104);
DDA(xc+120, yc, xc-60, yc-104);
DDA(xc+120, yc, xc-120, yc);
DDA(xc+120, yc, xc-60, yc+104);
DDA(xc+60, yc-104, xc-60, yc-104);
DDA(xc+60, yc-104, xc-120, yc);
DDA(xc+60, yc-104, xc-60, yc+104);
DDA(xc-60, yc-104, xc-120, yc);
DDA(xc-60, yc-104, xc-60, yc+104);
DDA(xc-120, yc, xc-60, yc+104);
}

 

 

I am back!

There were a lot of things going on in my life, but everything seems to settle down.

Now I am back and expect to see more posts!

 

the first

     wow wow wow!

      this is my first time to write blog with English. actually,my first language is not English. so i have to use many time to learn English.

      Also i learn computer by myself.Just for fun!

      AND this is my really first time to use Linux(it seems that i have said it several days before!).i love Linux ,i love Ubuntu .In fact , i had tried fedora9 in my old machine last year.But it's nightmare for me .THE machine has 224RAM,AMD Sempron3000+.

     Try it!Do it!  

 

Automation security and OOPs!

Quick note for all.  I just learned that if you start a blog, get a call from Nagios that a raid array crashed, and mark a blog you just started as "unpublish" it just might get published auto magically for you at some point in the future. 

 For those who read that piece of a blog, sorry.  I'll edit locally and cut and paste going forward. As one gentleman I know once said, "Whatever automation and security do for you they also do to you."  Well it did it to me this time.

 

Ubiquity - Firefox-Addon



Ich möchte euch hier das Firefox-Addon "Ubiquity" vorstellen. Mir war das Addon bis heute nicht bekannt...es scheint aber eines der besten Addons zu sein, das ich bisher gesehen habe. Ubiquity bietet eine Art Schnittstelle zu Online-Inhalten, wie Suchmaschinen oder anderen Diensten. Über die Tastenkombination STRG + Space (kann man auch frei wählen) ruft man Ubiquity in den Vordergrund (Bild 1), welches dann in der linken oberen Ecke des Browsers erscheint. Hier hat man nun die Möglichkeit, über ein Eingabefeld bestimmte Befehle einzugeben und gewünschte Dienste, etc... aufzurufen.
Beispiele:
Google-Suche: Eingabe "google + Suchbegriff" (Bild 2)
Browser-Kommandos wie "exit firefox", "restart firefox", "close window", "close tab", "fullscreen" und vielen weiteren
E-Mail schreiben (momentan nur GMail): Eingabe "gmail + Nachricht + to Empfänger" (Bild 3) E-Mails abrufen: Eingabe "get last mail"
Google Maps: Eingabe "map + Ort" (Bild 4)
Youtube: Eingabe "youtube + Suchbegriff".....genauso funktioniert das mit Flickr, Wikipedia, Yahoo, Digg, Amazon, Ebay und vielen anderen Diensten.
Wetter: Eingabe "get weather + Ort"
Twitter: Eingabe "tweet + Nachricht + as Benutzername"
Regional ganz interessant für den VRR (Verkehrsverbund Rhein-Ruhr) eine Fahrplanauskunft: Eingabe "vrr + from Ort + to Ort"
Ich könnte diese Liste nun endlos erweitern. Ubiquity macht das Surfen im Netz jedenfalls deutlich einfacher und schneller.
Screenshots:
Bild 1

Bild 2

Bild 3

Bild 4

Weblinks:
https://addons.mozilla.org/de/firefox/addon/9527
Hier gibt es die aktuelle stabile Version. Eine Preview-Version findet ihr hier:
Mozilla Labs Ubiquity (Einfach auf "latest Beta" klicken)
Weitere Erklärung mit kurzem Video:
Der Browser versteht mich & Add-ons ohne Neustart - Firefox 3.6, 4.0 und mehr: Die Zukunft des Mozilla-Browsers - CHIP Online
 

–•–æ—á—É Netbook

–ü—Ä–æ—à–µ–ª—Å—è –ø–æ —Å–∞–π—Ç–∞–º –Ω–∞—à–µ–ª Netbook ASUS T91 –ª–∏–Ω–∫ –≤–æ—Ç –∑–¥–µ—Å—å –Ω–µ—Ç–±—É–∫ —ç—Ç–æ—Ç –∏–Ω—Ç–µ—Ä–µ—Å–Ω–æ —Å–∫–æ–ª—å–∫–æ –±—É–¥–µ—Ç —É –Ω–∞—Å —Å—Ç–æ–∏—Ç—å...
 

My first time in Linuz.com

This is something cool.

I can have my own blog here... does this make me a Linux Expert?

 

To start with (Small story with happy end)

I know, that everybody of visitors can tell nearly the same story about their way to GNULinux. However, it seems to me, that such kind of story is significally important for people who are not sure about moving to GNULinux. So, I'll try to tell about my story.

Everything started more than year ago, when I was going throw the local computer shop, I SUDDENLY saw IT - Linux Format magazine. It was a great thing, main subject was GNOME vs KDE. Such a holy war was interesting for me, but there was one small problem - I hadn't known anything about Linux. ANYTHING!

So, I had bought Linux Format, came home and started to read it. There was a great interview with Richard Stallman, but for me the most surrising thing was his appearence, especially beard. With the help of spirit from this interview I started to install my first GNULinux - Mandriva 2008.0. Of course, there were no problems, except small one - I destroyed all my data from Windows partition. 

After installation I tried to setup my VPN internet communication. I failed. I reinstalled the distribution. And failed again. So i spent whole my weekend reinstalling the distribution. When I was about to install Windows back, my friend (who is fan of Apple) advised me to use his MacBook for searching solution in th Web. After several hours of searching, I finally found instruction and started to explore the console in Mandriva. Suprisingly, console was quite sex appealing for me, so I decided to try another distribution - I chose... Arch.

Oh, that was great - I spent whole night reading manuals, so I got up at 11 o'clock and found myself lying on the keyboard with KDEmod launched on my screen

 

Linux just Works

Dual-booting should never be this hard. But for some reason Microsoft's ode to crappy names, and crappy OS design and development seems to love to make things harder than they have to be. I've had some serious issue with Vista ever since I bought the OS under the assumptions that it would be nearly as friendly, and refreshing as XP. If it wasn't for Vista I could even come to the conclusion that perhaps I would have never tried Ubuntu, and thus any other linux distribution out there. So as of tonight I'd like to outline a few ways in which crappy OS' like Vista make me delighted to be a penguin.

I began my installation of Vista as I normally do with dual-booting, apprehensive. I setup my second drive as NTFS and slipped the Vista disk in. Installation went smoothly, and setting up grub to be my primary bootloader went smoother than normal. Much smoother than it ever had in the past thanks to great help at ubuntuforums.com.

But this was short-lived. After the installation I was left with the usual myriad of issues that needed immediate fixing. This included getting my Audigy 2 ZS to work under Vista (mostly a Creative issue), downloading and installing drivers for a 9500 GT and a Linksys wireless adaptor, downloading updates, and then maybe I could get to what I installed the OS in the first place for, in this case playing pc games.

Things went well until after I downloaded Fallout 3 and attempted to extract it. Vista would give me errors that it could not extract a 5.5Gb archive into roughly 50Gb of hard drive space. Explorer was having a problem with this, and I couldn't get a straight answer anywhere online. It was around this time that the updates finished downloading, and I was prompted to restart. Strangely some updates did not download. No issue, I hoped.

Upon restart the updates were configured, for nearly an hour. Vista then restarted itself and gave me an error, so I had to place the install disc back into the drive to run repair. This appeared to fix the issue until halfway to downloading Winzip, in an attempt to rectify the previous issue, I was greated with the great spirit of Windows, the Blue Screen of Death. Wonderful, I thought to myself, not even 5 hours into Vista's lifespan it is already having issues with itself. A forced restart later, and another attempt at running the OS proved that the BSOD didn't plan on going away. So here I am, reinstalling a version of Windows not 5 hours old.

As you can tell, getting Vista just to run successfully is a huge trial in patience. When Ubuntu performs every needed task faster, stabler, and more securely it boggles my mind that Microsoft has gotten away with the crap they put on store shelves. And if those of you who are interested in Windows 7 think that things may change, think again, I received concurrent BSOD's in that OS as well. My Windows 7 install disk now sits happily at the bottom of a landfill somewhere in New Mexico. 

It is a huge burden to setup Vista when every Linux distribution I've used has done things better than Vista out-of-the-box, so to speak. Just staring at the installation screen makes me sigh not knowing what issue it will throw at me next. And realizing this I'll probably just end up formatting the drive again, and turning on Ubuntu to get things done. And slowly I realize why I switched to Linux in the first place, and take a quiet resignation and joy in the fact that Linux just works.

 

 
Page 7 of 15

Upcoming Linux Foundation Courses

  1. LFS230 Linux Network Management
    06 Oct » 09 Oct - Virtual
    Details
  2. LFD331 Developing Linux Device Drivers
    13 Oct » 17 Oct - Virtual
    Details
  3. LFS430 Linux Enterprise Automation
    13 Oct » 16 Oct - Virtual
    Details

View All Upcoming Courses


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board