Search Results

Search: Posts Made By: gregarion
Forum: Programming 02-10-2010
2,569
Posted By gregarion
Error Checking
Hey guys i am facing a problem in my sql statement. I am trying to check if there is such a value in the database.

Code:

string NewMovie = "ww";

string queryText ;...
Forum: Programming 02-09-2010
1,584
Posted By gregarion
Syntax Problem in Query
Hey guys, i am having a problem in my query statement. I am using Mysql in Netbeans and c++.


What i am trying to do is for the user to enter a certain value and then the program will store the...
Forum: Programming 02-08-2010
1,439
Posted By gregarion
Problem with output
Hey guys, i am having problem with displaying my text. my text file is displayed in such a way and is called test.......

Sam Worthington ... Jake SullyasZoe Saldana ... NeytiriasSigourney Weaver...
Forum: Programming 02-04-2010
3,844
Posted By gregarion
What i meant is, for example... i run a class and...
What i meant is, for example... i run a class and it gives me an output of "abc". i would then want to use this output to be displayed in a seperate class. What i tried was...

class ...
Forum: Programming 02-04-2010
3,844
Posted By gregarion
Declaring variables
Hey guys im facing a problem in declaring variables. i have a few classes like the one below...



#ifndef _FINANCE_H
#define _FINANCE_H

#include <string>
#include <iostream>
#include...
Forum: Programming 02-04-2010
2,094
Posted By gregarion
Hmm, the values i want is in string NasdaqValue...
Hmm, the values i want is in string NasdaqValue and string NasdaqValueChange. SOrry but can i ask how do u put them in class members and why cant it be stored in local variables.
Forum: Programming 02-04-2010
2,094
Posted By gregarion
CppUnit
Hey guys, i am trying to test one of my classes using cppunit.

the class is suppose to extract data out of a certain text file and then displays it...

void readNasdaq::Nasdaq(fstream& myfile)...
Forum: Programming 02-02-2010
1,551
Posted By gregarion
Database Linking
Hey, i cant seem to find #include<sqlite3> in the libraries, even after installing sqlite3 in linux. how do i solve this problem
2,358
Posted By gregarion
Sorry, what i meant is . when i entered "." or ""...
Sorry, what i meant is . when i entered "." or "" , it seems to give me an error saying ./test: line 8: [[: A time: syntax error in expression (error token is "time").

my test data was
...
2,358
Posted By gregarion
thanks jim. But i would only like the search to...
thanks jim. But i would only like the search to allow those using alphabets only to be true.
If there is any "." or numbers or any other characters, it should return a false.
2,358
Posted By gregarion
Checking for Alphabets
echo -n "read this also:"
read NewAuthor


if [ -z $( echo "$NewAuthor" | tr -d '[[:digit:]]' ) ] ; then
echo "its a digit"
else
echo "something else"
fi
Hey guys , i am trying to do a...
1,581
Posted By gregarion
hey thanks. could you help explain what ^ means?
hey thanks. could you help explain what ^ means?
1,581
Posted By gregarion
Calling of search using awk
Database
rina lives:fatin:20:20:20
rina:fatin:20:20:20

i am having a small problem in extracting out the information from the database. For example, if i were to input a book titled rina into my...
1,122
Posted By gregarion
Using loops in a search
Title=
echo -n "Title: "
read Title
echo -n "Author:"
read Author




validation=`grep -i "$Title" fruit | grep -i "$Author" | awk -F":" '{ print $1}'`


if [ "$Title" = "$validation" ]...
12,058
Posted By gregarion
thanks for the help guys, i solved it.
thanks for the help guys, i solved it.
12,058
Posted By gregarion
Runaway String Problem
Database.txt
John:30:40


echo -n "New Title Please :"
read NewTitle
awk -F":" 'OFS = ":"{ $1 = "'$NewTitle'" ; print $0 } ' Database.txt> Database2.txt
mv Database2.txt Database.txt

what...
5,898
Posted By gregarion
yeap , that would work. but sometimes, my...
yeap , that would work. but sometimes, my database does not store all in uppercase , for example


Database.txt
RETARDED MONKEY:RACHEAL ABRAHAML:30:30:20
GOLD:FATIN:23.20:12:3...
5,898
Posted By gregarion
Case Insensitive search
Hey , i am trying to do a search for the certain books , and im trying to make it case insensitive. what i have come up with so far is this :

Database.txt
RETARDED MONKEY:RACHEAL...
3,564
Posted By gregarion
Hey Scrutinizer, just let me check how this code...
Hey Scrutinizer, just let me check how this code works

echo "$this" |

*this echo out the content inside $this and pipes it into the next set of command




tr -d '[[:digit:]]')

*this...
1,815
Posted By gregarion
Using of OFS
Hey guys, i am having a slight problem with OFS. I have a database which displays its information like this ,

John:22:345

I need to read an input from the user and then replace it in $1.

awk...
3,564
Posted By gregarion
its the -d command which i do not get it. a...
its the -d command which i do not get it. a syntax for a normal tr command would be

tr [set1][set2]


so how does it work in the code above. basically, the input of $this is being deleted only...
3,564
Posted By gregarion
Checking input is Numerical
Hey guys, i was looking for some examples of how can i check if the use input is just using numerical. i came across an example using tr :

echo "read this"
read this

if [ -z "`echo "$this" |...
6,270
Posted By gregarion
wow, it worked.thanks dude. while true do ...
wow, it worked.thanks dude.

while true
do
echo -n "Title = "
read Title
echo -n "Author = "
read Author
if grep $Title database.txt | grep $Author &>/dev/null
then
echo $Author
else...
6,270
Posted By gregarion
okay, i tested it out. For $Title i used Persia ,...
okay, i tested it out. For $Title i used Persia , for $Author , i used John. It is located inside the database. but when i ran it, the output was "book does not exist".

For the infile.txt , i...
6,270
Posted By gregarion
echo -n "Title:" read Title echo -n...
echo -n "Title:"
read Title
echo -n "Author:"
read Author

price_check=`awk -F: '{if ($1=='$Title' && $3=='$Author') print $3 } ' fruit`
echo $price_check

sorry , when i copied the post...
Showing results 1 to 25 of 67

 
All times are GMT -4. The time now is 04:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy