Search Results

Showing results 1 to 40 of 78
Search took 0.01 seconds.
Search: Posts Made By: drjay1627
Forum: PHP 20 Hours Ago
Replies: 7
Views: 173
Posted By drjay1627
Thanks the both of you. I have a better idea of what to do now.

I don't really understand the regular expression example.

$regex = '/(href|src)=["\'](.*?)["\']/i';
href and src is the html...
Forum: PHP 1 Day Ago
Replies: 7
Views: 173
Posted By drjay1627
Thanks mate. I actually saw your post from 2007. I was going through one of your code on your website.

I'll try and understand what your trying to do. I'll write on here if I have any question.
...
Forum: PHP 2 Days Ago
Replies: 7
Views: 173
Posted By drjay1627
My friend and I are working on an Internet bot. We want to make a bot that given a website, would index into a table.

Example --

Given the website: www.daniweb.com

Add to table:
...
Forum: C++ Oct 16th, 2009
Replies: 6
Views: 311
Posted By drjay1627
Actually I figured it out. ctrl+d in linux and ctrl+z in windows!
Forum: C++ Oct 16th, 2009
Replies: 6
Views: 311
Posted By drjay1627
Just out of curiosity, how do you stop the while loop with control+z?

--drjay
Forum: C++ Oct 16th, 2009
Replies: 17
Views: 420
Posted By drjay1627
so a newbie:

start here


#include <bitset>
#include <cstdlib>

int main(){
// you will need some sort of a loop
Forum: Computer Science Oct 16th, 2009
Replies: 1
Views: 292
Posted By drjay1627
people in the forum who have jobs or who are recruiters or own a company (yes I'm referring to people such as sergey brin and lawrence page); what advice would you give to an entry level computer...
Forum: Legacy and Other Languages Jul 17th, 2009
Replies: 3
Views: 943
Posted By drjay1627
thanks mate, but this was a project due about a month back and i was able to complete it for the most part. in fact i was only unable to complete 1 requirement and i was able to get about 85% with...
Forum: Legacy and Other Languages Jun 25th, 2009
Replies: 3
Views: 943
Posted By drjay1627
-1
lisp
anyone here know lisp? i'm trying to code a trie in list. i know what to do as i already did it in ruby and python. i just need some guidance with doing the same.

reply to this thread if you know...
Forum: Python Jun 18th, 2009
Replies: 2
Views: 206
Posted By drjay1627
I have a recursive function. My base case is:

somemethod(somelist)
if len(somelist) == 0
return
...


This is suppose to return the function to the place where it was called from.
Forum: Python Jun 17th, 2009
Replies: 1
Views: 201
Posted By drjay1627
Follows,

I need some help with fixing a bug in my program. I can't post the entire code here as its an on going assignment.

I'm building a Tree in Python.

class Tree:
def __init__(self,...
Forum: Python Jun 17th, 2009
Replies: 7
Views: 353
Posted By drjay1627
This is what I did:


class MyClass:
def __init__(self, f, r):
self.first = f
self.rest = r

def main(argv = sys.argv):
newclass = MyClass(" ", [])
Forum: Python Jun 15th, 2009
Replies: 7
Views: 353
Posted By drjay1627
Thanks mate cheers!

I was doing some research last night and I found this:

from collections import namedtuple

namedtuple("MyClass", "foo bar")

MyClass(foo=1, bar=2)
Forum: Python Jun 14th, 2009
Replies: 7
Views: 353
Posted By drjay1627
hello,

I wanna create a struct in python. the struct needs to have a char and an array of chars.

eg. (ruby code):


Somestruct = Struct .new(:character, :characterArray)
structure =...
Forum: Ruby Jun 4th, 2009
Replies: 3
Views: 1,563
Posted By drjay1627
What are names starting with the ":", are they variables, constants or something else?

drjay
Forum: Python Jun 4th, 2009
Replies: 4
Solved: Trie
Views: 433
Posted By drjay1627
Well I did that and I know what a Trie is. But coding it in a language you haven't used before is a challenge. I just want to know, when programing a data structure where do I begin. I already did...
Forum: Python Jun 4th, 2009
Replies: 4
Solved: Trie
Views: 433
Posted By drjay1627
I'm trying to code a Trie in Python. Any suggestions as to where I should begin?

drjay
Forum: Ruby Jun 3rd, 2009
Replies: 2
Views: 2,143
Posted By drjay1627
well i figured it out btw. so for anyone in the future looking to do something similar to the java code above:


#arguments
inFile = ARGV[0]
outFile = ARGV[1]

def foo(infile, outfile)...
Forum: Legacy and Other Languages May 29th, 2009
Replies: 0
Views: 625
Posted By drjay1627
does anyone know erlang here. i really need help with this one. for starters how do you ran a program?
Forum: Legacy and Other Languages May 29th, 2009
Replies: 2
SML
Views: 685
Posted By drjay1627
i mean Standard ML of New Jersey
Forum: Legacy and Other Languages May 28th, 2009
Replies: 2
SML
Views: 685
Posted By drjay1627
-1
SML
Does anyone here know SML?
Forum: Ruby May 26th, 2009
Replies: 2
Views: 2,143
Posted By drjay1627
i'm a java c/c++ person. trying out ruby for the 1st time!

how do i do something like this in ruby:


//this is java
public static void main ( String args [] ) {
File inFile = new File (...
Forum: C++ May 1st, 2009
Replies: 9
Solved: Vector problem
Views: 312
Posted By drjay1627
Is this your output or this this how the output should look like?
Forum: C++ May 1st, 2009
Replies: 9
Solved: Vector problem
Views: 312
Posted By drjay1627
I think you are not cout-ing properly. Copy-paste the entire output or exactly which cout statement out do you have here?
Forum: C++ May 1st, 2009
Replies: 3
Views: 289
Posted By drjay1627
3000 lines? are they all in main()? If that is the case that is your 1st problem. 3000 lines or 30,000 lines want matter if you break the code down.

Get into the habit of writing smaller methods....
Forum: Shell Scripting May 1st, 2009
Replies: 2
Views: 905
Posted By drjay1627
I don't really understand the question. Post the project, we might then get an idea of what is required.
Forum: C Apr 27th, 2009
Replies: 3
Views: 281
Posted By drjay1627
hey can someone suggest the best way to get the list of files in a directory. i only need files no need directories.

given a folder, i want to write a program that gets all the files in it. its...
Forum: C Apr 27th, 2009
Replies: 7
Views: 719
Posted By drjay1627
this what i ended up doing. pretty inefficient i guess.

string tempbuf;
stringstream ss ( inBuf );
vector < string > tokens;
while ( ss >> tempbuf ) {
tokens.push_back...
Forum: C Apr 27th, 2009
Replies: 7
Views: 719
Posted By drjay1627
I used that before, but ran into many problems.

suppose there is an input entered by the user in the form
W 1 1 12 hello world
a variable char mode = w
a variable int c = 1
a variable int s...
Forum: C Apr 26th, 2009
Replies: 7
Views: 719
Posted By drjay1627
i changed the source code a bit when posting. i dont have a problem with the syntax, just a way to concatenate a bunch of characters or spliting a string into 2.
Forum: C Apr 26th, 2009
Replies: 7
Views: 719
Posted By drjay1627
how do i concatenate a an array.

This is the code.


char data [128];
char c, s, l;
char *cmd_array [128];
count = 0;
char * pch_W;
Forum: PHP Apr 26th, 2009
Replies: 1
Views: 289
Posted By drjay1627
this is a general question. do you think that a bandwidth estimator can be used to measure the bandwidth and optimise a users video viewing experience.

in other words, if i have a 56k connection...
Forum: C++ Apr 25th, 2009
Replies: 6
Views: 399
Posted By drjay1627
I actually fixed it. The fault was at the client end. worked on it for about 5 hours!

The read function in the client read in a char array of a fixed size. when the write from the server is...
Forum: C++ Apr 24th, 2009
Replies: 1
Views: 358
Posted By drjay1627
I'm looking for some help resolving the following warning...

warning: format ‘%c’ expects type ‘char*’, but argument 6 has type ‘char (*)[128]’



char data [ BLOCK_SIZE ];
sscanf ( inBuf,...
Forum: C++ Apr 24th, 2009
Replies: 2
Views: 717
Posted By drjay1627
Forum: C++ Apr 24th, 2009
Replies: 2
Views: 717
Posted By drjay1627
int c, s;

sscanf ( inBuf, " %d %d", &c, &s );



I wanna check if c and s are actually int.

suppose if you enter a letter rather than a number, how do i check?
Forum: C++ Apr 24th, 2009
Replies: 6
Views: 399
Posted By drjay1627
its server not sever... that was a typo.

char outBuf[128];
int cylinders, sectors, client_sockfd;
sprintf ( outBuf, "cylinder: %d Sector: %d\n", cylinders, sectors );
write ( client_sockfd,...
Forum: C++ Apr 24th, 2009
Replies: 6
Views: 399
Posted By drjay1627
when the sever out put to the client, how do i get the whole stream rather than just part of it?
Forum: C++ Apr 24th, 2009
Replies: 6
Views: 399
Posted By drjay1627
I doing this server and client program. The sever has to output to the client.

strcpy ( outBuf, " " );
sprintf ( outBuf, "cylinder: %d Sector: %d\n", cylinders, sectors );
if ( write...
Forum: C++ Apr 11th, 2009
Replies: 3
Views: 848
Posted By drjay1627
can someone please explain to me how read write work in sock programming.

my assignment is to run a server and client. the client ask the server "who are you?" and the server replies with the...
Showing results 1 to 40 of 78

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC