Programming :: Checking Of Input In Roman Program?
Apr 11, 2010
i have to write a program which checks the information inside a text file to make sure it is all integers and then convert the integers to roman Numerals. My program seems to have a bit of a problem and im not sure where exactly the problem is....
Code:
#include<stdlib.h>
#include<string>
[code]....
View 8 Replies
ADVERTISEMENT
Jan 18, 2010
what i am trying to do is to allow the user to key in data such as "23.23" or "24" , as it is the price of certain objectsHow am i able to design a check which will allow me to prevent users from typing in input such as "ab.21" or "rfrr" as this field is purely a numerical field. The problem i am facing is i tried using this search code.
Code:
echo "read this"
read this
[code]....
View 14 Replies
View Related
Aug 14, 2010
I am creating a 15 integer array which is input from the user and outputted for the.
Ex.
Enter the array values: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Your values are: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Code:
View 4 Replies
View Related
Apr 13, 2011
I started to run a C++ my program in Linux and I don't know how to test my program that works fine with a text file. This is a project for my uni and to explain more clear, My program is a sample database for modify or add and search and it read data from a binary file and also write into a binary file. I have got an input from my lecture and she said after compiling in Linux I must write:
1-to compile:
Code:
g++ (files with cpp)
2-to see the output:
Code:
./a.out
3-to test with input:
Code:
./a.out < input.txt >
My problem is in step three. What I must write in the command part after" step2" to see the output?
View 3 Replies
View Related
Jan 12, 2011
I am trying to finish up my intro C++ course, and have to make a Roman numeral to Arabic converter. I had no trouble with the reverse (Arabic to Roman), but I must be missing something on this one. I tried a few variations, and either got 0 or an insanely high number as the output.
Code:
#include<iostream>
#include<cstring>
[code]....
View 3 Replies
View Related
Sep 25, 2010
I have a file with two fields of numbers that I want to use as input for another program.
Code:
The above code does not work, as I think it would take the whole first and second fields as the input for one particular instance of the program 'inputbashangle'. What I want is to get the first two numbers from the first line of the file 'outfailtest', execute 'inputbashangle' with them, then move on to the first two numbers of the second line for all the lines of 'outfailtest'.
View 9 Replies
View Related
Apr 7, 2010
i am trying to write a program which will read input from a text file, check if each line contains any alphabets and then display a message imforming me if there is an alphabet in each line. My text file is formatted in this way...
[Code]....
View 2 Replies
View Related
Jan 11, 2010
Title : Author : Price
France : Mark : 40
Persia : John : 50
how i arranged my database. I am trying to write aprogram which does a search either using Title, Author or both.
[Code]....
but i am still unclear on how i am able to make the program check if either on of the input(either $Title or $Author) is not filled up, and if one of it is not filled up, use the other one which is filled to do a search.
View 6 Replies
View Related
Apr 6, 2011
basically i have to create a simple program with will continually read input from the user until they enter a blank linei know how to read in certain input but not sure how to get it continually in a loop
View 2 Replies
View Related
May 5, 2010
I would like to use Japanese kana (hiragana, katakana, kanji) on Ubuntu but everything that I've tried to get it set up and running isn't working. The Spanish that I have set up is working perfectly so far.
I've read, the SCIM input program should start up automatically when loading a program, it doesn't. When I have it loaded I cannot seem to get the input working.
View 9 Replies
View Related
Mar 3, 2011
I would like to know if there's a way of checking which program has new updates without internet connection?
Maybe like having a program to grab the currently available programs from a repo?
View 7 Replies
View Related
Jan 25, 2010
Code:
I am trying to do a search to check if the input is using alphabets and nothing else.
I tried using [[:digit:]] and [[:alpha:]] but none seems to work
When i use digit, it read 22.k as alphabet and not as a wrong syntax.
For alpha , it does not allow me to input data which has spaces such as " hello world".
View 1 Replies
View Related
Dec 17, 2010
@work we use Zabbix and also IP-audit for monitoring. Each day we have a list of outgoing SMTP-servers on our IPaudit server.
This script will take that list and check them all against a whole bunch of DNSBL's
# cat /usr/local/sbin/check_rbl
Code:
#!/bin/bash
#####################################################
# check_rbl
#####################################################
# 17-12-2010 by JP van Melis
#
[Code].....
View 15 Replies
View Related
May 15, 2010
I am using Red Hat Enterprise Version 5. There is a ruby program which use standard input as its input (e.g. the Ruby program process input from standard input). I think standard input should be keyboard, correct?
So, I think other kinds of input (non-standard input) should not work (i.e. the ruby program should not be able to read input from such non-standard input), but actually I have tried using pipe works, I am so confused because I think pipe should be some other kinds of input -- other than standard input, why it could work? i.e. put text "123" in abc.txt with pipe, could achieve the same result as using keyboard as input to type "123" for the ruby program.
cat abc.txt | ~/test/rubysrc/foo.rb
View 4 Replies
View Related
Jul 6, 2010
I Just got the ADS VideoXpress video capture USB thing (Plug composite video and audio into it, and plug it into a computers USB port). Anyway, I've tried to install what came on the CD, with Wine, but still cant view any video. I don't need it to record from it, I just want to view the video live as it passes through. I don't even need audio, just the basic low quality video.
Anyone know where I can find a program to view the raw input?[URL]..
View 6 Replies
View Related
Sep 18, 2010
I am trying to figure out how i would go about finding out where system call is made and error checking is not done. I have code below, if somebody can point me in the right direction where system call is made but error checking is not done.Quote:
#include "shell.h"
#include <stdio.h>
#include <string.h>
[code]....
View 5 Replies
View Related
Nov 8, 2010
I need to allocate a % of the total system memory for a buffer but what is the best method to determine how much memory is in the system? So far the only way I have found is to get the pages of memory:
Code:
long sysconf(_SC_PHYS_PAGES)
Is that the only option?
View 2 Replies
View Related
Apr 20, 2010
I run my own icecast2 server. In the near future it looks like, I will be doing some shows. I would like to beable to change my link, so if I am broadcasting, to go to the stream if not pop a box for my schedule.Now from when I was checking to see if my webcam was up or not, i used this.does anyone know haw to change my code for this? I know when I'm not stream it generates a 404 error, in winamp (on windows)
View 3 Replies
View Related
May 11, 2010
How can i check what operating system, i am running on, at run time?Moreover, how can i retrieve that current state of process?
View 4 Replies
View Related
Jan 21, 2011
I recently started shell programming and my task now is to do a menu display.Currently i am stuck whereby user will input both title and author and it will delete it.
Do i have to use sed command?
View 4 Replies
View Related
Jul 21, 2011
1. i need to check whether the oracle database is running or not if it is running it will run auto mount script.nohup /u01/app/oracle/product/11.2.0/dbhome_1/bin/dbfs_client dbfs@xxxxx -o allow_other,direct_io /u01/app/oracle/DBFS/XXXXX < /home/oracle/passwd_dbfs.txt&nohup /u01/app/oracle/product/11.2.0/dbhome_1/bin/dbfs_client dbfs@xxxxxx -o allow_other,direct_io /u01/app/oracle/DBFS/XXXXX < /home/oracle/passwd_dbfs.txt &2. For every 1 hour i need to check above mount points is mounted or not if it is not mounted it should be mounted.
View 3 Replies
View Related
Jul 17, 2010
It is possible to check who logged in with "who" command. If we are also logged in to that linux pc.
But, is there any possibility to check without our login?(not even by ssh)
Our logging in to find that pc, will be wasting the cpu resources. And may disturb the user who is working on the x-session.
View 7 Replies
View Related
Jan 19, 2010
I am trying to do a search for the certain books, and I am trying to make it case insensitive. what I have come up with so far is this :
Code:
Database.txt
RETARDED MONKEY:RACHEAL ABRAHAML:30:30:20
GOLD:FATIN:23.20:12:3
StUPiD:JERLYN:20:40:3
Code:
echo -n "Title: "
read Title
echo -n "Author:"
read Author
echo ""
valuecheck='grep -i "$Title" Database.txt | grep -i "$Author" | awk -F":" '{ print $1}''
echo $valuecheck
if [ $Title = $valuecheck ] ; then
echo "HOHOHO"
else
echo "too bad"
fi
The issue which I am having is that, when it does the search for the correct row to be inputted into valuecheck, it will input the value as written in the database, which is in Uppercase. For this case, if I type in stupid for $Title and jerlyn for $Author, it searches the correct row, but the awk will print "STUPID" into the variable as that is what is written in the database. So how can I make my if statement case insensitive? Currently it reads like this:
Code:
if [ $Title = $valuecheck ] ; then
which means
if [stupid = StUPiD ] ; then
How can I make the if statement it case insensitive to allow it to display "HOHOHO"
View 5 Replies
View Related
Apr 8, 2010
i am searching a string(with multiple words) in a file that file contains the string but words are separated with multiple white space.
ex: pattern to be matched "hello how are you" all single white space and file contains " hello how are you" variable white space between words
grep "pattern" file_in_which_to_search i am reading the "pattern" so i cannot modify the "pattern"
so my pattern match does not take place, though i want it to match.
View 3 Replies
View Related
Apr 22, 2010
I'm trying to figure out a simple script to go thought 500 Cisco devices to see if I can SSH to the device. Then display something like this:
10.0.0.1 Yes
10.0.0.2 No
10.0.0.3 No
I tried something like this:
Code:
ssh -q -o BatchMode=yes -o StrictHostKeyChecking=no user@10.0.0.1 "echo 2>&1" && echo "Yes" || echo "No"
When tested the above line it replied No, even if I tried it on a Switch that does not have SSH configure.
View 8 Replies
View Related
Jan 20, 2009
To know the function on checking whether a character is ascii or unicode character. From the following [uRL]. The function IsTextUnicode is related to Windows VC++ library. I would like to know the library/function which provides such facility.
View 2 Replies
View Related
Sep 27, 2010
I have a machine with 8 cores. I have a directory of input files that I need to process using a non-parallelized program. I would like to write a script that works its way through a list of commands executing 8 commans (i.e., instances of this program; each with specific flags having to do with the current input file) until the list of commands has been exhausted. Is there an easy way to do this?
Code:
hamstrsearch_local-hmmer3.pl -protein -refspec=lotgi_2713 -hmmset=lophotrochozoa_hmmer3 -sequence_file=Aplysia_californica.fas -taxon=ACAL
View 3 Replies
View Related
Feb 4, 2010
Can I add Times New Roman to a Hardy/OpenOffice 2.4 install?
View 5 Replies
View Related
Aug 4, 2011
How to install times new roman fonts in Ubuntu 11.04 in 64 bit desktop??
View 2 Replies
View Related
Jan 20, 2011
I have a bash script that checks for contents in a folder every 15 seconds and then acts on it's contents. This works great for the average size file however on very large files it starts acting on the file before it's completely written. Is there a facility in bash shell to get a file complete signal or such? here is trigger to launch a larger script.
Code:
#!/bin/sh
while true
do
$HOME/bin/hpgl.sh >/dev/null 2>&1 &
[code].....
View 10 Replies
View Related