User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
DaniWeb is a massive community of 457,003 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,205 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Showing results 1 to 40 of 61
Search took 0.01 seconds; generated 5 minute(s) ago.
Posts Made By: sgriffiths
Forum: *nix Software Jan 21st, 2008
Replies: 1
Views: 432
Posted By sgriffiths
Find command

Hello

I need to be able to search through directorys using 1 find command

The issue i have is as follows

I need to search

/titan/client/c0021/upload/new_debt
...
Forum: Shell Scripting Oct 10th, 2007
Replies: 2
Views: 1,501
Posted By sgriffiths
string manipulation

Hello

I have a string "c0024"

How can i get rid of non numeric digits, so i am left with

0024

removed "c"
Forum: Shell Scripting Oct 4th, 2007
Replies: 2
Views: 1,159
Posted By sgriffiths
expr command

Help!

I need to total up values which are monetary

ie

VAR1=123.20 ( £123.20p)
VAR2=2000 ( £2000 )

can i do this using expr, i can total them up, but lose the .20p
Forum: C Jul 18th, 2007
Replies: 4
Views: 1,173
Posted By sgriffiths
Word count

Hello

I would like to count how many words are in a string

ie "PETER JOHNSON LTD"

so this string contains 3

I was going to use strtok but this is too slow.
Forum: Shell Scripting Jan 11th, 2007
Replies: 1
Views: 1,259
Posted By sgriffiths
FInding dates on files

Hello

I have some files with the date included in the filename

the format is

limited_file_11012007.dat
so this is the 11th January 2007

I have numerous files eg
Forum: C Jan 3rd, 2007
Replies: 8
Views: 1,302
Posted By sgriffiths
Re: Help with string

Unfortunatly there is no way of knowing where to put the delimiter
Forum: C Jan 3rd, 2007
Replies: 8
Views: 1,302
Posted By sgriffiths
Help with string

hello i have the following

char Ambiglist[1000];

this variable contains a company name and postcode, but there may be numerous of both ie

STEPHEN COMPANY LTD;TN25 8a7 JOHN JACKSON LTD;98asHHS...
Forum: Linux Users Lounge Nov 29th, 2006
Replies: 0
Views: 2,228
Posted By sgriffiths
Cant compile on Linux

Hello

I have wrote a peice of C code on Sun Solaris.

When i have tried to compile the code on a linux machine i get the below messages

the compiling options i am using are

...
Forum: C Nov 24th, 2006
Replies: 1
Views: 1,573
Posted By sgriffiths
Using dlopen dlsym and calling sharedobjects

Hello All i have a program written in C, and i want to call a sharedobject, which i can do fine!

The only problem i am having is passing parameters.. Here is my code

int main()
{
static int...
Forum: C Nov 21st, 2006
Replies: 5
Views: 1,345
Posted By sgriffiths
Re: Regexp?

I have looked at the regexp man pages but it is very terse.

When i search google, all examples appear to be in perl.

Do you have any regexp examples in C?

Thanks
Forum: C Nov 20th, 2006
Replies: 5
Views: 1,345
Posted By sgriffiths
Regexp?

Hello all

I want to split regular expression values in the list (in quotes)

list("A","B"....... )

What is the best way to go about this?

Regards
Forum: Shell Scripting Nov 15th, 2006
Replies: 1
Views: 1,744
Posted By sgriffiths
Pattern matching?

Hello

I have a var="STEPHEN,GRIFFITHS"

how can i check to see if a variable contains a certain character, ie a comma (,)

Thanks
Forum: C Nov 7th, 2006
Replies: 10
Views: 2,505
Posted By sgriffiths
Re: Removing found chars from string

But this doesnt help me remove a word as such does it?

I need to remove the word LTD from string

STEPHENJOHNSONLTD

Thanks
Forum: C Nov 7th, 2006
Replies: 10
Views: 2,505
Posted By sgriffiths
Re: Removing found chars from string

I have managed to get my string from

"STEPHEN JOHNSON - LTD"

to

"STEPHENJOHNSONLTD"

No i need to remove LTD
Forum: C Nov 7th, 2006
Replies: 10
Views: 2,505
Posted By sgriffiths
Removing found chars from string

Hello all

I want to be able to search a string and remove non a-z chars and also search for certain words and then remove them

ie. char string[25]="STEPHEN JOHNSON - LTD"

So i use isalpha to...
Forum: JavaScript / DHTML / AJAX Nov 3rd, 2006
Replies: 5
Views: 2,626
Posted By sgriffiths
Re: Submit or action button

ok ok

What i wanted was an onChange option, this then calls a javascript procedure

But i need the procedure to be php with embedded html
Forum: JavaScript / DHTML / AJAX Nov 2nd, 2006
Replies: 5
Views: 2,626
Posted By sgriffiths
Submit or action button

Hello

I have a web page which has a drop down menu.
I want the user to select an option from the drop down menu, then click submit.

This will then activate my php script and select data from my...
Forum: HTML and CSS Nov 1st, 2006
Replies: 1
Views: 1,614
Posted By sgriffiths
Selecting MYSQL into fields

Hello

I am using mysql with html to create a webpage

I have a table called people

This table has 2 fields, first_name and second_name

I have 5 records in this table
Forum: MySQL Oct 31st, 2006
Replies: 1
Views: 3,709
Posted By sgriffiths
Inserting NULL into database table

hello

can anyone tell me how to insert the NULL value into a field?
Forum: HTML and CSS Oct 31st, 2006
Replies: 1
Views: 598
Posted By sgriffiths
Question

If i have 2 fields and i want the user to enter some details in the first field, but after they enter the details in the first field, i want the second field to automatically default to show "TEST",...
Forum: PHP Oct 31st, 2006
Replies: 11
Views: 4,999
Posted By sgriffiths
Re: Generate User ID

What would be the best way to generate a random id, which include user_name of "stephen"?
Forum: PHP Oct 31st, 2006
Replies: 11
Views: 4,999
Posted By sgriffiths
Generate User ID

hello All

I am pretty stuck and would like any help or assiatance

I am creating a web page with 2 fields
First field would be a username
Second field would be a user_id

I want the user to...
Forum: C Oct 26th, 2006
Replies: 5
Views: 1,258
Posted By sgriffiths
Re: Querying a blank string

That wont work, and wont compile

Its an empty characters constant
Forum: C Oct 26th, 2006
Replies: 5
Views: 1,258
Posted By sgriffiths
Re: Querying a blank string

But this is setting the variable length to 0 bytes

what happens if there is actually a real values in name like

name=[80];

strcpy(name, "CHRISXHSHSHSHSH" );
Forum: C Oct 26th, 2006
Replies: 5
Views: 1,258
Posted By sgriffiths
Querying a blank string

Hello

can anyone help me with the following
The below will actually display the Name found part, even though no name actually exists and its just blank, how do i get round this, the string name...
Forum: Shell Scripting Oct 23rd, 2006
Replies: 1
Views: 2,065
Posted By sgriffiths
Help with reading file and splitting by delims

Hello all

I am trying to create a script to do the following:

I have a file which contains the following

STEPHEN;CHRIS:PETER>JOHN|

What i need to do is read this file in and be able to...
Forum: C Aug 21st, 2006
Replies: 5
Views: 1,800
Posted By sgriffiths
Re: Reading a string

here is my output

21-08-2006 11:25:37 cdmssjg 6213 template(v1) Allocated "2096919" byte(s) "5841" records(s) for block

InSchStruct[field].field_id = 3027
InSchStruct[field].field_length = 80...
Forum: C Aug 21st, 2006
Replies: 5
Views: 1,800
Posted By sgriffiths
Re: Reading a string

Im using C, are you talking about c++
Forum: C Aug 21st, 2006
Replies: 5
Views: 1,800
Posted By sgriffiths
Re: Reading a string

This is what i have.

I can successfully loop each line and find if the last word on line is LTD.

But how would i go about updating this file with "Limited", how do i work all this out??

int...
Forum: C Aug 21st, 2006
Replies: 5
Views: 1,800
Posted By sgriffiths
Reading a string

Hello All

A question i have.

I have a file which contains 5 million records.

One line of this file may look something like below

Adrian Tompson & Sons Ltd.
Forum: C Aug 15th, 2006
Replies: 17
Views: 2,473
Posted By sgriffiths
Re: Passing struct to procuedre

I was not being rude, i just informed him that i did not ask that question, and restated my question

Am I supposed to say 'yes that is what i asked', when it was not.
Forum: C Aug 14th, 2006
Replies: 17
Views: 2,473
Posted By sgriffiths
Re: Passing struct to procuedre

I didnt ask how to refer to a specific member

I asked how do i pass to a proceudre
Forum: C Aug 14th, 2006
Replies: 17
Views: 2,473
Posted By sgriffiths
Passing struct to procuedre

Hi

I have a struct


struct s_list
{
char name[30];
char lowest[30];
int int_value;
Forum: C Aug 8th, 2006
Replies: 5
Views: 1,062
Posted By sgriffiths
Listing in numeric order

Hello

i have a a struct which contains the below

1
10
11
2
3
Forum: C Aug 4th, 2006
Replies: 7
Views: 1,152
Posted By sgriffiths
Re: strtok and core dump

/************************************************************************
* Function : word_match
* Description : word_match
...
Forum: C Aug 4th, 2006
Replies: 7
Views: 1,152
Posted By sgriffiths
Re: strtok and core dump

here is my code

int word_match(RULE_INFO *pRuleSharedObject)
{

int (*fptr)(int); /*Needed to add fuzzy rule*/
RULE_INFO SharedObject; /*Provides structure of sent info to your code*/
static...
Forum: C Aug 3rd, 2006
Replies: 7
Views: 1,152
Posted By sgriffiths
strtok and core dump

hello

I have a program which is being passed 2 lines items at a time

To hold these lines i have 2 static pointers, these are:-

static char *first_string=NULL;
static char *second_string=NULL;
...
Forum: C Jul 17th, 2006
Replies: 22
Views: 19,085
Posted By sgriffiths
Re: Convert string to to HEX

An additional question

If i want to convert hex 4c4c

Do i pass the complete string of 4c4c or do i pass 2 characters at a time, ie 4c, let the conversion take place to L, then pass the next 4c...
Forum: C Jul 17th, 2006
Replies: 22
Views: 19,085
Posted By sgriffiths
Re: Convert string to to HEX

Okay, i have now NULL termainted my converted_string, but this still does not work, any help?



int Convert_Update_From_Hex(char *update_record, char *field_name )
{
int i, k=0;
char...
Forum: C Jul 14th, 2006
Replies: 22
Views: 19,085
Posted By sgriffiths
Re: Convert string to to HEX

Im not quite there, and need a little bit more help, when i run my code, update_record="4c3333"
i get L3^C out.....anyone help ,me so i can get the correct L33.




int...
Showing results 1 to 40 of 61

 
All times are GMT -4. The time now is 6:46 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC