Linux.com

jabirali

jabirali

  • Linux.com Member
  • Posts: 157
  • Member Since: 30 Apr 10
  • Last Logged In: 10 Aug 11

Latest Posts

Posted by
Topic
Post Preview
Posted
  • jabirali
    RE: Distro question (experts, please read)
    If you want to stick to C++, then [url=http://doc.trolltech.com/4.0/aboutqt.html]Qt[/url] is a good choice. The libraries have predefined widgets for almost everything, and defining your own widgets is also quite easy. The GUI itself can either be designed graphically (using Qt Designer), or manually (by instantiating and initializing the widgets yourself). When the GUI has been defined, you simply use the "connect" macro to map events (signals) to your own methods (slots). If you're interested, they have extensive tutorials and examples [url=http://doc.trolltech.com/4.0/examples.html]here[/url] to get you started. Here's an example of defining your own widget in Qt, I wrote it when going through their tutorial: [code]class LCDRange : public QWidget { public: LCDRange(QWidget *parent = NULL); }; LCDRange :: LCDRange(QWidget *parent) : QWidget(parent) { // Instantiate widgets QLCDNumber *lcd = new QLCDNumber(2); QSlider *slider = new QSlider(Qt::Horizontal); QVBoxLayout *layout = new QVBoxLayout; // Initialize widgets lcd -> setSegmentStyle(QLCDNumber::Filled); slider -> setRange(0,99); slider -> setValue(0); // Connect signals to slots connect(slider, SIGNAL(valueChanged(int)), lcd, SLOT(display(int))); // Configure layout layout -> addWidget(lcd); layout -> addWidget(slider); setLayout(layout); }[/code] Other popular alternatives include [url=http://wxwidgets.org/]wxwidgets[/url] and [url=http://www.gtkmm.org/en/]gtkmm[/url]. I've never used them before, so I can't speak for those libraries :) [b][edit][/b] If you're interested in creating your own distribution, you should also take a look at the [url=http://www.linuxfromscratch.org/lfs/]Linux From Scratch[/url] project. They provide a mature handbook that'll hold your hand through the entire process ;)
    Link to this post 25 Jun 11

    If you want to stick to C++, then Qt is a good choice. The libraries have predefined widgets for almost everything, and defining your own widgets is also quite easy. The GUI itself can either be designed graphically (using Qt Designer), or manually (by instantiating and initializing the widgets yourself). When the GUI has been defined, you simply use the "connect" macro to map events (signals) to your own methods (slots). If you're interested, they have extensive tutorials and examples here to get you started.

    Here's an example of defining your own widget in Qt, I wrote it when going through their tutorial:

    class LCDRange : public QWidget
    {
    public:
    LCDRange(QWidget *parent = NULL);
    };

    LCDRange :: LCDRange(QWidget *parent) : QWidget(parent)
    {
    // Instantiate widgets
    QLCDNumber *lcd = new QLCDNumber(2);
    QSlider *slider = new QSlider(Qt::Horizontal);
    QVBoxLayout *layout = new QVBoxLayout;

    // Initialize widgets
    lcd -> setSegmentStyle(QLCDNumber::Filled);
    slider -> setRange(0,99);
    slider -> setValue(0);

    // Connect signals to slots
    connect(slider, SIGNAL(valueChanged(int)), lcd, SLOT(display(int)));

    // Configure layout
    layout -> addWidget(lcd);
    layout -> addWidget(slider);
    setLayout(layout);
    }

    Other popular alternatives include wxwidgets and gtkmm. I've never used them before, so I can't speak for those libraries :)

    [edit]
    If you're interested in creating your own distribution, you should also take a look at the Linux From Scratch project. They provide a mature handbook that'll hold your hand through the entire process ;)

  • jabirali
    RE: I'm looking for a distro ..
    Yes, there are several distributions that let you choose all your software packages yourself. Here are some examples: [ul] [li][url=http://www.archlinux.org]ArchLinux[/url][/li] [li][url=http://www.debian.org]Debian[/url][/li] [li][url=http://www.slackware.com]Slackware[/url][/li] [li][url=http://www.gentoo.org]Gentoo[/url][/li] [/ul] ArchLinux, Gentoo and Debian Unstable are rolling-release distributions, which means that new packages are being released into the repositories as soon as they're available upstream. Debian Testing, Debian Stable and Slackware instead make stable releases from time to time, where package versions are frozen and only bugfixes and security updates are released during the lifespan of that release. ArchLinux and Debian are primarily based around binary software packages fetched from online repositories, with automatic dependency-fetching and so on. Slackware uses binary packages without dependency checking, but there are multiple third-party package managers for Slackware that adds support for online repositories and dependency fetching. Gentoo is based around an automated build system called Portage, that compiles each program for your machine, and let's you customize everything with USE-flags and MAKE-flags. This requires some time for maintenance, though. They each have a bit different philosophies, so it's up to you to choose the best one for your use.
    Link to this post 19 Jun 11

    Yes, there are several distributions that let you choose all your software packages yourself. Here are some examples:
    [ul] [li]ArchLinux[/li] [li]Debian[/li] [li]Slackware[/li] [li]Gentoo[/li] [/ul]
    ArchLinux, Gentoo and Debian Unstable are rolling-release distributions, which means that new packages are being released into the repositories as soon as they're available upstream. Debian Testing, Debian Stable and Slackware instead make stable releases from time to time, where package versions are frozen and only bugfixes and security updates are released during the lifespan of that release.

    ArchLinux and Debian are primarily based around binary software packages fetched from online repositories, with automatic dependency-fetching and so on. Slackware uses binary packages without dependency checking, but there are multiple third-party package managers for Slackware that adds support for online repositories and dependency fetching. Gentoo is based around an automated build system called Portage, that compiles each program for your machine, and let's you customize everything with USE-flags and MAKE-flags. This requires some time for maintenance, though.

    They each have a bit different philosophies, so it's up to you to choose the best one for your use.

  • jabirali
    RE: Recommendations for good programming books
    I used the book "Absolute C++" by Walter Savitch, and was quite satisfied with it. The book is easy to read, and touches all the basics (pointers, object orientation, linked data structures, templates, exceptions, basic input/output, STL).
    Link to this post 09 Jun 11

    I used the book "Absolute C++" by Walter Savitch, and was quite satisfied with it. The book is easy to read, and touches all the basics (pointers, object orientation, linked data structures, templates, exceptions, basic input/output, STL).

  • jabirali
    RE: Is my laptop capable of running a linux OS?
    Another safe bet is [url=http://www.damnsmalllinux.org/]Damn Small Linux[/url], which works with as little as 16MB of RAM and a 486 (pre-pentium) processor.
    Link to this post 06 Jun 11

    Another safe bet is Damn Small Linux, which works with as little as 16MB of RAM and a 486 (pre-pentium) processor.

  • jabirali
    RE: Need help for a class project.
    Correct me if I'm wrong, but it sounds like you basically want to pay someone to do your homework for you. I'm not going to that. I can, however, give you a pointer in the right direction if you're willing to do the job yourself. [ul][li]Linux scripting is usually done using [url=http://tldp.org/LDP/Bash-Beginners-Guide/html/]bash[/url].[/li][li]Information about processes, including CPU and memory usage, can either be extracted from the [i]/proc[/i] filesystem, or discovered using the command [i]ps[/i] (see [i]man ps[/i]).[/li][li]Whether or not processes are necessary - this is not trivial. Except for the kernel and init, anything can be turned off without major problems - but every time something is turned off, you lose some functionality. Whether or not this functionality is necessary depends on what the machine is used for.[/li][li]How much memory is used can be extracted from [i]/proc/meminfo[/i], or using the command [i]free[/i][/li].[/ul]
    Link to this post 04 Jun 11

    Correct me if I'm wrong, but it sounds like you basically want to pay someone to do your homework for you. I'm not going to that. I can, however, give you a pointer in the right direction if you're willing to do the job yourself.
    [ul][li]Linux scripting is usually done using bash.[/li][li]Information about processes, including CPU and memory usage, can either be extracted from the /proc filesystem, or discovered using the command ps (see man ps).[/li][li]Whether or not processes are necessary - this is not trivial. Except for the kernel and init, anything can be turned off without major problems - but every time something is turned off, you lose some functionality. Whether or not this functionality is necessary depends on what the machine is used for.[/li][li]How much memory is used can be extracted from /proc/meminfo, or using the command free[/li].[/ul]

  • jabirali
    RE: Startup question?
    [b]mfillpot wrote:[/b] [quote]To accomplish the same task with custom scripts and applications I have added an additional entry to my PATH variable that points to my scripts directory, then placed that entry into my .bashrc file so it is only available to the single user[/quote]This is what I've done as well, and it's a lot easier to maintain between reinstalls since you don't wipe out /home without backups that often... Personally, I also keep my script folder in Dropbox, so that the scripts are automatically distributed to all my Linux computers. By the way, if you insist on symlinking your scripts into the system path, the conventional place is /usr/local/bin/ :)
    Link to this post 31 May 11

    mfillpot wrote:

    To accomplish the same task with custom scripts and applications I have added an additional entry to my PATH variable that points to my scripts directory, then placed that entry into my .bashrc file so it is only available to the single user
    This is what I've done as well, and it's a lot easier to maintain between reinstalls since you don't wipe out /home without backups that often... Personally, I also keep my script folder in Dropbox, so that the scripts are automatically distributed to all my Linux computers.

    By the way, if you insist on symlinking your scripts into the system path, the conventional place is /usr/local/bin/ :)

  • jabirali
    RE: Non- "WYSIWYG" Text Editing?
    [b]GrouchoMarxist wrote:[/b] [quote]Would LaTeX also be advisable for non-technical works as well? I ask because I would like to compose several non-Linux related works, such as a science fiction book? Thank you for your help in this matter.[/quote]For non-technical works, LaTeX still has the advantage of separating the content from the formatting. You can write your entire book without having to care about how the document [i]looks[/i], and just focus on the content. When you're done, you can then tweak the appearance of the document by modifying your "preamble". You can of course play with fonts, margins and section headings - but there's a lot more available, like proper [url=http://nitens.org/taraborelli/latex]ligatures and smallcaps[/url] by default, and support for [url=http://en.wikipedia.org/wiki/Microtype]microtypography[/url]. If you ever wonder how to make the document look exactly how [i]you[/i] want it, someone has probably made a TeX package that lets you do it.
    Link to this post 31 May 11

    GrouchoMarxist wrote:

    Would LaTeX also be advisable for non-technical works as well? I ask because I would like to compose several non-Linux related works, such as a science fiction book? Thank you for your help in this matter.
    For non-technical works, LaTeX still has the advantage of separating the content from the formatting. You can write your entire book without having to care about how the document looks, and just focus on the content.

    When you're done, you can then tweak the appearance of the document by modifying your "preamble". You can of course play with fonts, margins and section headings - but there's a lot more available, like proper ligatures and smallcaps by default, and support for microtypography. If you ever wonder how to make the document look exactly how you want it, someone has probably made a TeX package that lets you do it.

  • jabirali
    RE: writing cgi using C++
    I'm glad I could help :)
    Link to this post 28 May 11

    I'm glad I could help :)

  • jabirali
    RE: Hosting Advice
    [b]tomasr wrote:[/b] [quote]What hosting service should I use?[/quote]What do you mean? As far as I know, "hosting service" usually refers to companies that maintain a web server for you, while you seem to wish to maintain your own server. Do you mean what software packages you should install on your server? Or perhaps where to get a domain name? [b]tomasr wrote:[/b] [quote]I'm also a worried about security - if I setup a server and it gets hacked, I don't want to end up paying thousands of dollars for the resources stolen by the hackers.[/quote]What kind of resources are we talking about here? Passwords should always be stored in an encrypted format. If you mean personal information, you could always put up a disclaimer encouraging that people don't disclose anything they intend to keep private. Mail addresses may be prone to spamming if the wrong people get to them, but I've never heard of anyone being sued for something like that. Good luck on the project by the way, it sounds like fun :)
    Link to this post 28 May 11

    tomasr wrote:

    What hosting service should I use?
    What do you mean? As far as I know, "hosting service" usually refers to companies that maintain a web server for you, while you seem to wish to maintain your own server. Do you mean what software packages you should install on your server? Or perhaps where to get a domain name?

    tomasr wrote:

    I'm also a worried about security - if I setup a server and it gets hacked, I don't want to end up paying thousands of dollars for the resources stolen by the hackers.
    What kind of resources are we talking about here? Passwords should always be stored in an encrypted format. If you mean personal information, you could always put up a disclaimer encouraging that people don't disclose anything they intend to keep private. Mail addresses may be prone to spamming if the wrong people get to them, but I've never heard of anyone being sued for something like that.

    Good luck on the project by the way, it sounds like fun :)

  • jabirali
    RE: Which distro do you find works the best ?
    [b]AstarothMastemaRavenclaw wrote:[/b] [quote]I also bought myself a nifty 16GB usb and was wondering which distros are good to use from usb ?[/quote]This kind of depends on what you will use the distribution for, as any recent distribution can be made to run from a USB pen. Since many USB devices are quite slow, something lightweight like [url=http://www.damnsmalllinux.org/]Damn Small Linux[/url] or [url=http://puppylinux.org/main/Overview%20and%20Getting%20Started.htm]Puppy Linux[/url] would probably be ideal though :-)
    Link to this post 28 May 11

    AstarothMastemaRavenclaw wrote:

    I also bought myself a nifty 16GB usb and was wondering which distros are good to use from usb ?
    This kind of depends on what you will use the distribution for, as any recent distribution can be made to run from a USB pen. Since many USB devices are quite slow, something lightweight like Damn Small Linux or Puppy Linux would probably be ideal though :-)

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