Programming :: Modify What Already Printed On The Screen?

May 6, 2011

Now we are implementing our own shell using C++. What upseting us is the history command function, we use an array to store the history commands, and print the when receiving the up and down arrow buttons. The problem is we cannot modify the history command already printed on the terminal, we even cannot move the cursur, let alone modifying the command.

View 1 Replies


ADVERTISEMENT

Programming :: Write A Driver In C So That When Released The Key Some Message Will Printed In Output Screen?

Nov 22, 2010

I want to write a driver in c so that when i released the key some message will printed in output screen. The driver should be for arm.I have a driver which read the key when it is pressed.But i want the both (means key press and release).

View 3 Replies View Related

Programming :: Garbage After Exactly Eight Properly Printed Characters?

Jul 21, 2010

The code below prints garbage if I use puts() but it is fine if I use printf() instead (see sample of output at the bottom of this post). The odd thing is that the mess always starts after exactly eight properly printed characters. That sort of regularity can't be a coincidence, can it? It almost looks like an encoding issue (I'm using UTF-8) but if it really is, then I don't understand why the printf() is unaffected.

Code:
#include <stdio.h>
#include <string.h>
const char *nChars (const char *, int);
int main (int argc, char * argv[]){
char * name ="Count Dracula++";
int len = strlen(name);
if (argv[1] == 0) argv[1]="printf";
printf("--->%d characters", len); .....

View 9 Replies View Related

Programming :: Extra "10" Printed After Every Conversion From ASCII To Int?

Dec 1, 2009

I have a very basic program which I wrote, to print the integer equivalents of an ASCII character. The code is below:

Code:

#include<stdio.h>
int main(void)
{
char c;

[code]....

The code is supposed to take a character as input and print the integer equivalent of that character. But the problem is that, after printing the integer equivalent, it prints an extra '10', every time.

Code:

f
102
10

[code].....

Why does this extra '10' always come? When the code is just a simple:

Code:

#include<stdio.h>
int main(void)
{

[code]....

The code works just fine. There is no extra '10' displayed. I am using Ubuntu 9.10 with gcc-4.4.1.

View 4 Replies View Related

Ubuntu :: Modify Screen Size From 11'' To 10'' In 9.10?

Apr 8, 2010

I've installed Ubuntu 9.10 Netbook Remix on my girlfriend's computer, and everything went fine except the computer *thinks* it's got an 11'' monitor when it's actually something like 10.2". As a result, since Ubuntu windows now relies heavily on the screen size parameters, everything goes "out of the monitor": browser window, background image, etc In System -> Display, I see it's set as an 11'' monitor...do you know how I can modify this value to be 10'' ? There used to be an Xorg.conf that one could edit to permanently modify these values but now it's nowhere to be found

View 5 Replies View Related

Ubuntu :: Can't Modify Login Screen In 10.10?

Feb 24, 2011

I installed Ubuntu onto my computer, I downloaded all of the major appearance applications like Tweak. Using Tweak, I modified the login screen to have a custom wallpaper and no sound to play when I login, and it worked perfectly. When I re-installed Ubuntu after that first time (I re-installed it because I totally screwed with the GUI) and every time after that, I go to use Tweak and it still allows me the option to modie login screen.However, after I make the modifications and restart the GUI, the login screen background is just a blank purple wallpaper and the login sound still plays when I login (both are things I didn't select). I open up Tweak and the modifications I made are still there, but they don't apply. What's up?

View 6 Replies View Related

Fedora :: Modify Graphical Grub Screen To Contain Mepis?

Sep 21, 2010

I've just installed fc 13 on my laptop. It's got windows and mepis linux on here also. the installer for fc only found windows and I was wondering if there's a way to modify the graphical grub screen to contain mepis linux or if i have to disable it and use a standard text screen for grub.

View 1 Replies View Related

Ubuntu :: Modify The Splash Screen When Booting Up Xubuntu 10.10?

Nov 3, 2010

I would like to modify the splash screen that you see when booting up Xubuntu 10.10. I want something light. What dimesions should I have it at like 800X600 1280X768 and etc. I will be using this on many different resolutions. Also where does the splash reside on this build?

View 2 Replies View Related

Programming :: How To Modify System Kernel

Dec 7, 2010

For my work, I have to modify the routing lookup process at Linux kernel.

The details is below:

A-----B.

We have pcA, pcB (using Linux OS kernel 2.6.26.5) connect together. We need to modify the source code of kernel at B in order to if A sends the packets with destination IP address as C, pcB still receives this packet and send to transport layer (that means, it bypass the routing lookup process at kernel).

The solution I used as the following code...

View 12 Replies View Related

Programming :: How To Modify ArrayList From Outside Of Class?

Mar 10, 2010

Okay so I'm working on a program here as I'm learning java,I have an array that is initialized with 5 objects that are hard coded. I have made a GUI that takes the input needed and creates an object with those values.I need to add that object to the ArrayList that I have previously made.Okay, so I have three classes, guiclass.java, main.java and gladiator.java Objects are made and defined in "gladiator".Main contains my public static void main section, launches my gui, creates my five hard coded objects, creates my ArrayList and adds my five hard coded objects to the ArrayList.Now, I need to add the object that I generated in the guiSection [action Listener]to the ArrayList that I created in my main class's public static void main string... section. Problem is my arraylist "cannot be resolved" from guiclass.

View 13 Replies View Related

Programming :: Modify Lines That Are Too Long?

May 25, 2010

I have a CDL netlist with 5630 lines. 512 of the lines are over 128 characters. The tool I am using to read in the CDL returns an error for each line over 128 characters.

If the line is too long I can fix it by adding a line continuation symbol, in this case a "/", somewhere prior to the 128th character then a line feed, obviously, and a "+" to the continuation.

example (pretend its a long line);
before;
this line is too long
after;
this line /
+ is too long

Part of the problem is that I can't use a constant point prior to the 128th character because I can't break up a term.

bad;
this line i /
+ s too long

If I can replace the last space before the 128th character with " / + " on all lines that are over 128 characters then I'm golden. I'm not sure if I need to escape the + or not. If so then the substitution is " / + ". And if I use sed then I'll escape the .

View 6 Replies View Related

Programming :: Trying To Modify Code For GBLink?

Apr 12, 2010

I'm trying to modify the code for gblink so that it can read from my usb to parallel port cable. I know that the address for a normal parallel port (/dev/lp0) is 0x3bc, but how can I find out the address for /dev/usb/lp0?

View 6 Replies View Related

Programming :: Using Sed To Modify Command Output?

Jun 13, 2010

The output of a command changed and I need to extract the data and print it out in a different fassion:

Code:
abcd1=aaaa xx
abcd 2 aaa xx bbb
abcd2=aaaa xy
ab 2 xx aaa bbb ccc xxx
should be transformed to:

[Code]...

Currently I used sed "search1|search2|search3" to get the lines that need to be transformed. But I also need to search for substrings in those lines and I need to print those substrings in a specific order together with other characters. How is this done with sed?

View 7 Replies View Related

Programming :: If Modify Tcp.c Stack File And How To Compile

Nov 4, 2010

i have just modify tcp.c file in/usr/src/linux/net/ ipv4 location.Now should i compile the complete kernel?if not then how to compile that net/ipv4 package or etc.

View 1 Replies View Related

Programming :: Modify Output Of Shell Script

Dec 3, 2010

I'm running RHEL5.5 and nagios 3.2.0. The real question deals with how to change the printed output so nagios will work with it.I have made a script that will calculate network throughput on interfaces. The script is going through and finding all interfaces (eth, bond, lan) and doing the math to calculate throughput.The output is mainly for nagios to report and trend the values. As nagios wants to see nothing but perf data after the '|' character, I somehow need to have only one '|' character for all of the output.

View 2 Replies View Related

Programming :: Run Script To Modify Text File?

Mar 20, 2010

I have around 600 empty text files that I need to add the name of this file as part of the data, I mean files from "file1.txt to "file599.txt, all of them empty, and I need to get the name inside the file, so, when I open the file show the name as part of the data "file1".

View 11 Replies View Related

Debian Multimedia :: Modify The Gnome Login Screen's Font Rendering?

Jul 31, 2011

How can i change that login window's font rendering, i mean that screen which you can select user and type password. Is anybody have the experience for tweaking gnome login font or background image?

View 3 Replies View Related

Programming :: Parse And Modify File Without Creating A Copy?

Nov 4, 2010

I don't think this is a "perl one-liner" of find and replace. I'm trying to auto-fill some information in a listing of files. The simplest example is that in the files the following exists:

I would want the script to find this and populate it with something like -- Date : 20101004-1758

I have a few more similar fields to autofill, and I'd like to do this from within a larger perl script I'm developing to process these files. So, how I perform in-place file modification from within a perl script?

View 3 Replies View Related

Programming :: How To Parse And Modify Keywords Using Shell Script?

Apr 14, 2011

There is a file with that format of each models' information.I don't think that's good format, but I cannot change that format. I needed to modify the model name, 'model = xxx' as 'model = abc'.And I don't know how to parse and modify 'model = iii' and 'model = ddd'.The only clue to parse 'model = ddd' is the second 'model = ' after the second 'system information'. But how to parse the second keyword?Is it possible with 'sed'?I sometimes have to modify the information of the file.using shell script if possible.Python is ok. (Shell script is better for me.)

View 15 Replies View Related

Programming :: Store Data In Text File And Be Able To Modify It And Save As Well Using C++?

Jan 25, 2010

I wanna learn how to store data in text file and be able to modify it and save as well using C++.

Note: im using Turbo C++ 3.0

View 9 Replies View Related

Programming :: BASH: Read + Define + Modify A Numeric Value From/to A File?

Mar 25, 2010

I want my bash file to read from "input.dat" the two values emin emax. My input file looks like that:

#cat input.dat
!Energies
emin 10.00 !minimum energy
emax 30.00 !maximum energy

Now this seems to be not so hard with the command awk

#!/bin/bash
awk '{FS=" "}/emin/{print $2}' input.dat
awk '{FS=" "}/emax/{print $2}' input.dat

[code]....

So far so good. Now, I want to define two variables (e.g. e1,e2) in the bash file, so that their values would correspond to 00.00 and 30.00, as read from the input file. This one I have not found yet, thus asking for your advice. At the end, writing echo $e1 $e2, I should get 10.00 30.00 This is even harder to me: I want to replace the values emin,emax in a new file "modify.dat" which looks like that:

...
c---- energy interval
emin = 1.00
emax = 2.00
...

with the values e1 and e2 I have in my bash file. In other words, I want to call "modify.dat", find these two lines and replace the numeric values with the e1 and e2. At the end, my file should be like:

...
c---- energy interval
emin = 10.00
emax = 30.00
...

View 3 Replies View Related

Programming :: Modify Script Loading Array With Ranges Of Lines In Awk?

Mar 15, 2011

As awk programmers may know, we can print range of lines with awk, from an initial pattern until a final pattern as follow:

Code:

awk '/Initial_String/,/Final_String/' inputfile

Well, I have this inputfile:

Code:

[code]...

Once having those elements in that way within an array(a[]), I want to be able to manipulate the array (a[]) and copy its elements
to another array (b[]) in different order (all lines joined in a single line separated with commas), as follow:

Code:

Category,Adventure,Titles,Robinson,Crusoe,Saturday,Authors,Daniel-Defoe,Ian-McEwan

Only inserting the missing "array" coding and based and follow the code I've written Not needed to create a new code to do it with other method.

View 7 Replies View Related

Fedora :: Printed Page Is Cut Off / Fix It?

Sep 24, 2009

I was able to set up my printer using a guide i found on this site. However when i print a page from my e-mail account, for example. It will either print the whole page with advertisements and all when i select print from the file menu up top or it will only print what is showing on the screen and cut off the rest of the words in the e-mail that are not showing on the screen, when i select print icon within the e-mail.

View 3 Replies View Related

Ubuntu :: Filling Out A Pre-printed Form?

Jan 4, 2010

I have a pre-printed form that I need to fill in. Is it possible to scan it, fill it in on screen, and then put the original form in the printer and get things to print out on that original form? I know that I can scan the form and fill it in on screen and print out on a blank piece of paper, but I need to use the original form

View 9 Replies View Related

General :: Viewing Files That Have Already Printed?

Oct 26, 2010

I'd like to know how to see which files have been printed on the printer. I can see which print jobs have run and who submitted them using the following command:

Code:
$ lpstat -W completed -o
but it doesn't show me the names of the files that printed.

Is there a way to set a retention policy to have it hold the job in the queue even after it's finished printing? Or a command to view the details of jobs that have already run? I'm looking for something similar to the output of the lpq command.

View 1 Replies View Related

Hardware :: Ink Printed CD Labels - Bad For The Computer?

Jun 24, 2010

I recently ordered some custom CDs from a local shop. I sent them the ISOs for Debian and a large colorful PNG graphic for the label. They used an inkjet printer to print the label onto some special CDs. A few hours later, I noticed that the red ink transfered to my fingers when I picked up the CD. Previously, I printed some disks with blue, purple, and yellow, but found no such problem.

I wonder if could be damaging to the computer, ie. lots of little paint flakes coming off inside the computer while the CD drive is spinning and heating up?

View 2 Replies View Related

Fedora :: Storing And Reviewing Printed Jobs?

Oct 12, 2010

I need to review what people are using the printers for at work.I was wondering how I can do this under fedora. I basically need to store a copy of the printed jobs and view them afterwards..

View 5 Replies View Related

Ubuntu :: Ps2pdf Printed Page Margins?

Aug 30, 2010

I am having trouble converting a latex file to pdf with the precision I am looking for. I want strict control of the margins for both the outputted pdf and the printed page but currently it looks like there is a discrepancy between the two. I set the margins with the geometry package, i.e.

Code:
usepackage[left=.5in,right=.5in,top=.5in,bottom=.5in]{geometry} and then have tried converting to pdf by both the dvipdf route and the dvips --> ps2pdf route. All of these output files look identical through evince, however when I physically print the pdf the margins are roughly double the size I want. When I print the ps version the margins are exactly what I want. Therefore I expect the problem is obviously in ps2pdf.

I am printing on letter paper (8.5 x 11), which I have tried to explicitly set using

Code:
ps2pdf -sPAPERSIZE=letter foo.ps
with no luck.

My goal is to have a pdf for the sake of compatibility. I also do not want to use pdflatex for various reasons. Does anyone have any idea why this would be happening? What options have to be set that I don't know about. I tried searching around for a while but mostly found solutions involving a mistake papersize (a4 vs letter) changes, so sorry if this is RTFM.

View 1 Replies View Related

Ubuntu :: Print The Test Page (or Anything Else), Nothing Is Printed?

Oct 20, 2010

I installed my epson stylus tx420w through cups web interface. I used the PPD file provided by the driver recommended in linuxprinting.org.But when I try to print the test page (or anything else), nothing is printed. According to the diagnostics, the printer status is "Processing page 1...", but it won't go beyond that.I've already tested it, it's fine. But won't work in ubuntu. Don't know what's going on.

View 5 Replies View Related

Slackware :: Have A Reminder Printed On The Console Just After Login

Nov 19, 2010

I have sometimes wished to place a reminder, to be displayed after I login. And what I did was to write it in /etc/motd or in /etc/issue. But something in the system erases or writes a new motd/issue.What would be the easiest way to have a reminder printed on the console just after login?

View 10 Replies View Related







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