Programming :: Small Awk Script: Critiques Sought?

Mar 18, 2010

I'm not fluent in awk and would like to improve so seek critiques of this effort: stylistic, functional, whatever ...

Code:
#!/usr/bin/awk -f
BEGIN {
FS = "="
tab = " "

[Code]...

View 23 Replies


ADVERTISEMENT

Ubuntu :: Hard Drives (RAID1 Via Firewire) Setup Sought?

Aug 14, 2010

I searched, and unfortunately all that did was raise my confusion level on this. "Grub"? "mdadm"? "fake"?, S/Wraid? Disk utility? So many options, so little understanding! Relevant stuff (Mostly reported by "Disk utility"):

- Lucid Lynx. PATA host adaptor -> IDE controller -> Maxtor 164GB H/D [I *think* this has Windoze on it, but can't remember!] There's also a CD & DVD drive on this IDE bus. PATA host adaptor -> SATA controller -> Seagate 500GB H.D. - The Ubuntu boot drive, currently a 250GB ext4 partition, 3GB swap and 250GB "unused".Peripiheral devices -> Firewire 400 -> 2 x Samsung 500GB H/D's. These were "stolen" from my Mac Book and are currently a RAID1 Apple array. Everything they contained is safely backed up, and these can be considered as "new" drives awaiting formatting. [It's actually a Buffalo Drivestation Duo, but their site was even more confusing than here.

everything is working wonderfully, but I'd like to use the 2 F/W drives in a RAID1 array - So, eventually to the question: How do I tell Ubuntu to use these drives as a RAID array? It seems I can format and partition etc from disk utility. Do I then use mdadm for configuration? Any other recommendations?

View 1 Replies View Related

Programming :: Is There Small IDE For Lconsole?

Oct 4, 2010

i'm learning C now, later C++. using DJGPP isn't so nice on MS-DOS yet, no LFNs etc. and other limitations that is only one terminal, no multitasking etc.is there a small IDE for linux console? (i'm using a celeron 333 atm). for C it would be sufficient i guess?what i would need is a wide documentation, help on .h files, includes etc.on MS-DOS i use RHIDE. later on i might use eclipse or code::blocks. read another thread about c/c++ IDE.

View 14 Replies View Related

Programming :: How To Write Small Project With C++

Dec 29, 2010

I am trying to write my first small project with C++ - implement stl list like collection class. This is what i have a the moment:

Code:

#ifndef GUARD_link_list_h
#define GUARD_link_list_h
template <class T>
struct Node {

[code]....

View 1 Replies View Related

Programming :: Create A Small Array Of 3x3 Arrays?

Jul 12, 2009

I'm trying to figure how to create an small array of 3x3 arrays such I can do

Code:

SUM1(i) = SUM1(i) + SUM2

where i goes from 1 to 8 and SUM2 is a 3x3 array.

View 2 Replies View Related

Programming :: Small Projects In C++ Using Advanced Features

Feb 4, 2010

Can any one point out links to some small projects w.r.t C++ ? Now when I say small projects. It doesn't mean building a calculator or matrix multiplication programs, nor does it mean building games, nor does it mean dealing with databases,

What I actually want is to use the advanced features of C++ like:
i.Templates
ii. Nested friends
iii.Virtual functions
iv. Operator overloading (not merely '+', '-') but '[', '<<' also

View 4 Replies View Related

Programming :: Send File With FTP From Small Version?

Feb 9, 2011

I have this problem.I need to do this:I got a small version of Linux installed in some small devices. These devices come from the provider with this small version of Linux installed.This devices should send data to some other machine in the internet. I have tested wput for this purpose with a PC which has an Ubuntu version 10 and it works fine. However, when I try wput in the small device, I get an error. It seems that the wput might need some libraries to work with the small version of Linux installed in the small device.The fact of using wput or not is optional. I just need being able to send files through ftp with this small version of Linux.The thing is that to be able to run wput in this small version of Linux, it seems that many of the needed libraries were missing. So what I did was just install all the needed libraries. But still the wput program fails in its first line.

View 14 Replies View Related

Programming :: Proofread Prompt / Small Error Can't Find?

Jun 1, 2011

I've set the following as my prompt:... can't post the string due to the 15 post rule. how helpful....

Everything looks fine initially.
1- It sets the username and host in back on green text.
2- It then changes to an off-white an prints the command number for the terminal.
3- Next, it prints the working directory.
4- Finally is prints a ">" character and a space. it looks like this (hostname/un edited & image enlarged slightly to make it easier to read.)

The problem occurs when I try to "up arrow" to reuse and/or edit a prior command. It prints the prior command fine, but if I arrow over to edit the command sometimes the first character can not be deleted from displaying

I'd love to post 2 screen-shots I took to show the problem but.. 15 posts?

View 1 Replies View Related

General :: Set Up And Administer A Small Programming Desktop Environment?

Feb 23, 2011

I am would like to learn how to keep my system clean of unneeded and unwanted file clutter as I am trying to get the most out of my older home built pc. I am running fatdog64 puppy linux off of a usb stick right now, but I would like to have a small standards based setup on my hard drive to use as a base to build a custom kernel for my pc. I sure miss my old GEM desktop

View 1 Replies View Related

Programming :: Gimp Commands To Edit Small Image?

Jul 20, 2010

I have a few small still images of around 300 bytes each that I created under Windows many years ago, I'd like to:

1) change the colour of some pixels on each and
2) make them the exact same size but I do not want to learn Gimp to do this since I have no other use for it.

Could someone show me the sequences of commands in Gimp GUI that will do the job?

View 4 Replies View Related

Programming :: Small C++ Project - Disk Sector Viewer?

Jun 2, 2011

I have a small project that I am trying to do for my job to help us out. Basically, I need to make a tool that lets me view all the sectors of a hard drive in hexadecimal format to make sure they are all zero after a low-level format. I need it to be very minimal, and display the data in a way that I can scroll down and skim through the sectors. Doesn't have to be pretty, just functional.I need it to do more things down the road, but this is the first hurdle I need to overcome. I would like to create a GUI interface so it looks nice, but first I am only concerned with the sector viewing function. I am not entirely sure where I should start.

I see there is a tool called dd I could use to read the hard drive and I am wondering if I need to use that, or if I can just open /dev/hda as a file and be able to view all the sectors that way.Also, just to clarify, I am wanting to write this tool for linux,specifically DSL. I need it to be a very small distribution that can be loaded quickly from a usb drive, cd, or over the network with PXE.

View 15 Replies View Related

Programming :: Small Java Program To Manage 2 Apartments?

Feb 17, 2011

this is my first post and I would like to get some help from you , so what should be the answer for this question ?:::::::::::::the question::::::::::::::::THE UNIVERSITY APARTMENTSThe University Apartments provides apartment rental to university students at affordable rates, with optional facilities:Apartment Type A, 2 bedrooms and equiped with kitchen and laundry facilities. The monthly rental for the rooms in this apartment type is RM300.Apartment Type B, 3 bedrooms includes one master bedroom with attached bathroom but does not have kitchen and laundry facilities. The monthly rental for the rooms in this apartment type is RM200 and students staying in the master bedroom will be paying an additional 40%.

Each apartment may house a maximum of 3 students. Students are required to check out from the apartment unit when the current semester ends.Create an application to manage the university apartments rental:1. Register new student and assign apartment moduleRegister and assigns an apartment to the student for 140 days from the date of registration. The module should retrieve the date automatically from the system clock and calculates the expiry date for the apartment rental. Before an apartment is assigned, the system should allow the selection of the type of apartment (i.e. Type A or B), then check for the number of occupants in the apartment. If the apartment already housed 3 students, it should recommend another apartment unit that is still available. Upon registration, student should pay a RM100 for the utility charges, rental deposit for one month and the rental for the current month.

2. Update apartment status moduleWhen a student moves out from an apartment, the apartment status is updated.3. Reporting moduleGenerates a report of apartments with full occupancy and another report for apartments where rooms are still available. 4. Search module Enable the administrator to search for a student's apartment unit using the student id as the search key. The search result should produce the student�s information and the details of the apartment that the student is staying in.The application should be developed using object-oriented concepts using Student class and Apartment class, implementing the appropriate data fields and methods for the classes. Data may be stored in collections i.e

View 10 Replies View Related

Programming :: OpenGL And GLUT In Fedora 12: Windows Too Small And Don't Resize

Mar 15, 2010

I have verified using yum that I have the most uptodate glut, freeglut, freeglut-devel etc., yet when I compile Example 2-6 from the Red Book at http://www.glprogramming.com/red/chapter02.html#name16, I get a window that is too small for the program output, includes display from other windows, and will not redraw after being resized.

I get slightly better behavior with the SGI sample program mentioned in the same book, 'checkers.c'. Again, the initial size is too small, but at least it will resize and redraw the checkerboards entirely inside the resized window. What is going on here? Is this some bug in glut? I can't see anything obviously wrong in their glut initialization, which looks like:

int main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize (350, 150);

[code]...

Then again, since I am such a newbie to glut, I am not sure I would recognize what, if anything, they did wrong. what ARE the valid and useful command line parameters I could have passed to the main() above?

View 12 Replies View Related

Programming :: Write A Small Perl Script To Collect Some Info From Mysql?

Oct 10, 2010

am running Centos 5.4 and would like to write a small perl script to collect some info from mysql.

so I went
yum install perl-DBI
yum install perl-DBD-mysql

then

nano perl.pl
---
#!/bin/perl
use Mysql;

[Code].....

Why can't perl find Mysql.pm? I guess because it doesn't exist as I ran find / -name Mysql.pm, and also could not find it.

shouldn't that file have been created and thus exist after I install perl-DBD-mysql?

View 6 Replies View Related

Programming :: Script That Change The Names Of Files And Folders Into Small Letter?

Oct 2, 2009

i want to make a script that change the names of files and folders into small letter because they are all in capital and more than 1000 fileit is impossible to do that with my hand

View 14 Replies View Related

Programming :: Write A Small Program That Shows Some Stockquotes And Indexes Etc On The Desktop?

Aug 29, 2010

I want to write a small program that shows some stockquotes and indexes etc on the desktop. Does anyone know how to get the quotes from google, yahoo etc? Do I rip it from the webpages or is there some other way?

View 3 Replies View Related

Programming :: Run Small Shell Script - Bash - Syntax Error Near Unexpected Token `('

Jul 9, 2010

I was trying to run small shell script, but could not run. I got the error like in subject.

This is exact way i was trying to do.

View 6 Replies View Related

Programming :: Small "?" Next To Font In Xlib Font Used As A Graphic?

Mar 16, 2011

I am seeing a weird error in a font display. I see a small question mark next to a font that I am using as a simple graphic. Does this mean that some function call in xlib is being passed an invalid paramter?

View 1 Replies View Related

Red Hat :: SCP File To All In Small LAN Network

Sep 23, 2010

I have a small lan network. I known the passwords of all and I want to scp a file to all and I don't want to give password each time. Is there any way for that through writing script.

View 1 Replies View Related

Fedora :: No Fonts - Only Small Boxes / Get Them?

Dec 16, 2009

Don't know how this happened, but I only see small boxes instead of my fonts on the desktop, in the title bars or on the panel

I really don't know how to fix it..

View 4 Replies View Related

General :: Run A Small IPTV Station?

Feb 28, 2011

I'm looking to run an iptv station for my dorm. I know I can serve multicast so that's not a problem. The station will serve out podcasts and other cc licensed content. The target endpoint is xbmc- a media center. So far I know that I need to serve an rtp stream over udp that's streaming an mpeg-4 avc main or high profile with aac ( or ac3 ?) audio. I've had some luck using vlc with vlm to stream but it seems limited. What are my other options?  Everything has to run on Linux- hopefully open source. How can I use playlists and not live streams? What are my software options?

View 1 Replies View Related

Ubuntu Servers :: Setting Up DNS For A Small Lan

Jan 25, 2010

how to set up dns/bind but the issue I am hitting is that I want to just create a non internet domain setup ie t60.mysuperlan. desktop.mysuperlan. etc . Using a hosts file isn't the best as its pretty much about learning all the stuff to make it work.

View 2 Replies View Related

Ubuntu Installation :: Can't Figure Out Hd Is So Small?

Dec 25, 2010

My computer has a much bigger hard drive than 11 gb but that is all I have access to when I transfer files using an external hd -- can anybody set me straight as to what I did wrong installing dual boot ubuntu 10.10 on my windows 7 machine?

View 1 Replies View Related

Ubuntu :: GNOME Screen Is Too Small

Apr 13, 2011

I use Ubuntu 10.10 with both Gnome and KDE desktops. My default screen res is 1366x768, and there is no problem with KDE, Gnome indicates that my res is the same but everything on the screen looks too large. When I lunch an app like GIMP I can't see the inmenu icons, it's not a pain to die but sometimes makes work harder. At first I told it was the way Gnome looks (I have never before run linux on such a high res), but when I boot another distro like Debian everything is OK. Also my display mode is locked to laptop screen and can't be changed.I like my Gnome screen and don't want to move to KDE.

View 1 Replies View Related

General :: How Build Small A Packages

Aug 11, 2011

I want to build some small soft wares in linux .

Example there is OS called ttylinux [URL] it supports only few packages , example it doesn't support GCC compiler etc .. So I want built this packages to the os and create a final image out of it .

View 4 Replies View Related

General :: /var Is Too Small To Compile Openoffice

Apr 28, 2011

I have /var set to 2.5G which I have not had a problem with until now.

I cant compile openoffice because /var runs out of space when I do so. On Gentoo /var is used to compile.

can I set a different perameter to compile openoffice(emerge oppenoffice) to have just this program compile in another location?

View 4 Replies View Related

Software :: Communication With Some Small SPI Driver

Mar 15, 2010

I am moving some code for to work with SPI interface from windows to Linux SUSE platform and for to make it working I have to communicate with some small SPI driver.

I have few libraries generated by that driver:
libi2cbrdg.a
libi2cbrdg.la
libi2cbrdg.so
libi2cbrdg.so.1
libi2cbrdg.so.1.1.0

I am compiling my project with following makefile:
comp: ErrorCodes.h Errors.h FrameDll.h FrameDllHeader.h Framework.h Functions.h TargetProcessor.h Layout1.h ModCommon.h ModScalerDB.h ProxyIDs.h SPIProxy.h SPITuning.cpp ModBiquad.h ModCommon.h ModDeinterleave.h ModFloatToFract32.h
g++ -g -L./lib -li2cbrdg ErrorCodes.h Errors.h FrameDll.h FrameDllHeader.h Framework.h Functions.h TargetProcessor.h Layout1.h ModCommon.h ModScalerDB.h ProxyIDs.h SPIProxy.h SPITuning.cpp -o comp.o

Output:
SPIProxy.h: In member function "virtual int CSPIProxy::_Read(void*, int)":
SPIProxy.h:55: error: "U2C_IoWrite" was not declared in this scope
SPIProxy.h:56: error: "U2C_SpiRead" was not declared in this scope
SPIProxy.h: In member function "virtual int CSPIProxy::_Write(const void*, int)":
SPIProxy.h:65: error: "U2C_IoWrite" was not declared in this scope
SPIProxy.h:66: error: "U2C_SpiWrite" was not declared in this scope .....

But still as u see I have some functions missed I know that they are in these libraries.

View 2 Replies View Related

Software :: Tar Split Into Small Files?

Feb 7, 2011

Rather simple question, but is there a way to make an archive (simple tarball, no compression needed) out of a very large file and split it into parts? Basically I need a ~1GB file in 25MB pieces.

View 1 Replies View Related

Slackware :: 13.1 - MF / MP Symbols Small And Unreadable

Jun 4, 2010

When I used slackware 13.0 I installed wine 1.1.40 and then I installed an old program, PowerTAB. The font for the mf, mp, and other symbols was very small and unreadable. To solve this I put sylfaen.ttf in /home/darksaurian/.wine/drive_c/windows/Fonts and this magically fixed the problem. I don't know why or how I figured it out. But now with Slack 13.1 I do the exact same thing, same version of wine, and the font trick does nothing. The mf, mp symbols remain unchanged and unreadable.

View 9 Replies View Related

Slackware :: Small SlackDVD Does Not Appear In Media

Feb 3, 2011

The SlackDVD appears in Dolphin but not in ls /media.

Why does this happen (or not)?

According to the tutorials I have seen, it should, shouldn't it?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved