Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
~13.5K People Reached
Favorite Forums
Favorite Tags
Member Avatar for XodoX

Hello, how does an Interpreter work ? I read up on it and it seems you just parse each line and then (somehow) execute the lines. I suppose the code needs instructions on how to execute each line ?

Member Avatar for sepp2k
0
117
Member Avatar for XodoX

When I have a simple server-client code, how do I get the client to send the server a time request and the server responds, and the client then displays the offset and the delay ? The communication should be in NTP. I think that means there are 4 time stamps, …

Member Avatar for XodoX
0
311
Member Avatar for XodoX

I have a few questions. Server-client code with a (distributed) hash table. Give the peers their own port, own node-ID, predecessor and successor ( node-ID, IP and port of them). That's a snippet of it. port= argv[1]; ownNodeID = atoi(argv[2]); sucNodeID = atoi(argv[3]); sucIP = argv[4]; sucPort = argv[5]; preNodeID …

0
123
Member Avatar for XodoX

I have a small code utilizing a hash table. Now I want to convert it, basically, to a distributed hash table. Hoever, I can not find out how you actually code one or what changes you make to an existing hash table...??? Can anyone please help me, please? I can …

Member Avatar for L7Sqr
0
171
Member Avatar for XodoX

It's a server-client code. The client should wait for the server, and if there's no response, then send a new request. There's a 2 second wait. It's UNIX. I've been looking at some select() examples, but I'm not really sure... I found this example. #include <sys/types.h> #include <sys/socket.h> #include <sys/time.h> …

Member Avatar for iamthwee
0
160
Member Avatar for XodoX

If I want to have a datagram socket, what do I have to change here ? It's a stream socket right now. Just change it where it creates the socket ? `sockfd = socket(PF_INET,SOCK_STREAM,0);`

Member Avatar for Hiroshe
0
192
Member Avatar for XodoX

I found this site http://www.guyrutenberg.com/2007/09/22/profiling-code-using-clock_gettime/ If I have a server-client code and this: clock_gettime(CLOCK_REALTIME, &time_a); // create socket clock_gettime(CLOCK_REALTIME, &time_b); // close socket If I have a and b wand want to measure the time it takes to communicate, what's the best way ? Still not fully understanding the exact …

Member Avatar for NathanOliver
0
258
Member Avatar for XodoX

I have some experience with client-server codes. TCP and udp client. I want to know how a stream socket works with HTTP. This client is for a server-client code where the greatest common divisor is calculated and displayed. #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <sys/types.h> …

Member Avatar for Banfa
0
257
Member Avatar for XodoX

I want to create a simple stream socket server. I haven't found a website that explains it well. So how do I create a simple stream server ? One connection is fine.

0
103
Member Avatar for XodoX

Hello, Billabong is just a small board game. You have kangaroos that you move clockwise around a lake. It looks like this: http://www.deskovehry.com/fotky/billabong/billabong-06.jpg First you need to draw the board etc. The example looks like this: static private void printField(String[][] field) { System.out.print(" "); String letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; for (int …

Member Avatar for JamesCherrill
0
179
Member Avatar for XodoX

I'm new to Python, but I can use a library to do this, right? Like this one: import pprint import scipy import scipy.linalg # SciPy Linear Algebra Library A = scipy.array([ [7, 3, -1, 2], [3, 8, 1, -4], [-1, 1, 4, -1], [2, -4, -1, 6] ]) P, L, …

Member Avatar for Gribouillis
0
2K
Member Avatar for XodoX

Hello, I'm looking for a CSV parser and I found this example.... package com.ibm.ccd.api.samplecode.parser; import java.io.BufferedReader; import java.io.StringReader; import java.util.ArrayList; public class CSVParser { String oneRes; private String line = ""; private int nbLines = 0; private BufferedReader reader; public CSVParser(BufferedReader reader) { this.reader = reader; } public String[] splitLine() …

Member Avatar for Taywin
0
127
Member Avatar for XodoX

To be honest, my programming skills stink. The College textbook I have been using dosen't do it for me. And I learn better by looking at examples. However, I have not been able to find a website that offers an extensive archive of C++ code examples. From the basics such …

Member Avatar for rubberman
0
226
Member Avatar for XodoX

I can nto find anything that explains semaphores well. From what I understand, you can create an array of the type sem_t , for instance. Like a "semaphore array", I guess. And you use loops somehow to create them. Or can somebody explain this to me, please? I'm trying to …

Member Avatar for XodoX
0
107
Member Avatar for XodoX

for i := 1 to n do for j := 1 to n do C[i, j] := A[i,j] + B[i, j] #include <iostream> #include <iomanip> using namespace std; int SIZE = 10; double Sum(double matrixA[SIZE], double matrixB[SIZE]) { int i = 0; int j = 0; double rows, columns; double …

Member Avatar for XodoX
0
126
Member Avatar for XodoX

import java.util.Arrays; public class binary_search { public static void main(String[] args) { int ar1[] = new int[128]; int p, key=78; p=Arrays.binarySearch(ar1, key); System.out.println("element found at index "+p); Arrays.sort(ar1); p=Arrays.binarySearch(ar1, key); long start = System.currentTimeMillis(); Long elapsed = System.currentTimeMillis() - start System.out.println("Time to do stuff (in milliseconds): " + elapsed ); …

Member Avatar for JamesCherrill
0
109
Member Avatar for XodoX

I'm having difficulties writing the rpc function. Specifically, I don't know how to pack a function name and input argument into a message body, send the message, set and unpack reply, and return result and error code. I know how to create the socket, request aconnection from the server etc. …

Member Avatar for XodoX
0
162
Member Avatar for XodoX

How di I use I/O redirection to load the input into an array ? % a.out < inputfile That's what I found. I don't know if that's all you need or if there's more..

Member Avatar for Lucaci Andrew
0
250
Member Avatar for XodoX

I was told you can access the index of an array and save it in a variable. Like, as you know, every element is referenced by an index number. 0,1,2,3,4 etc.. I don't want to save the content, I need the index number. I will need to know the position …

Member Avatar for triumphost
0
170
Member Avatar for XodoX

The input looks like this: Start 0 Run 40 Disk 0 Run 20 End Each word and number means something. The number is the time and the word a command. What's the best way to loop through it and evaluate it? So it's 2 different elements per line that should …

Member Avatar for XodoX
0
136
Member Avatar for XodoX

I have a linked list where the input is read into. The 2 types of input have to go into a queue. 1 queue for each type. I suppose that the output line of the linked list can be used to read it into the queue ? I know it …

Member Avatar for XodoX
0
141
Member Avatar for XodoX

I think this has something to do with process scheduling. (1st process) Start 0// starts at 0ms Run 10 // runs for 10 ms Disk 0 // no idea what this does, but it takes 10 ms Run 30 // run 30 ms End // terminates (2nd process) Start 5 …

Member Avatar for asrockw7
0
189
Member Avatar for XodoX

How many lines will the following codes print out, and why? main() { fork(); printf ("Hello!\n") fork(); printf("Good Bye!\n"); } // main What's the fork() doing here? Does it change the number of lines that will be output? > > The purpose of fork() system call is to create a …

Member Avatar for Lucaci Andrew
0
247
Member Avatar for XodoX

Ok, so I'm trying to fix this.. [CODE]# include <cstdlib> # include <iostream> # include <iomanip> # include <cmath> # include <omp.h> using namespace std; int main ( void ); void jacobi ( int n, double a[], double b[], double x[], double x_old[] ); void r8vec_uniform_01 ( int n, int …

Member Avatar for mrnutty
0
1K
Member Avatar for XodoX

Does anybody know of a good site where I can learn how to do linked lists and use multiple linked lists together? The sites I found weren't any good. I'm not getting it. I'm just the kind of person who needs to get it spoon-fed and detailed sometimes.. I would …

Member Avatar for myk45
0
52
Member Avatar for XodoX

I'm talking about Flow of Control, Functions, Parameters, overloading, arrays, classes, Pointers and dynamic data structures,exception handling, operator overloading and perhaps including linked data structures. I am not liking the programming exercises the book has at the end of each chapter. But I will have to program something to really …

Member Avatar for raptr_dflo
0
150
Member Avatar for XodoX

I read that you can use a while loop to read the input from a text file and create a doubly linked list? How do I do that? I would appreciate if someone could show me. Thank you!

Member Avatar for EskayJoe
0
1K
Member Avatar for XodoX

I'm trying to code something that's a little complex, imo. It's a C++ program that will count the number of operations of recursive functions and will compare it with O(g(n)). This count value will basically estimate time complexity function T(n). You have to find the g(n) to get O(g(n)) that …

Member Avatar for XodoX
0
155
Member Avatar for XodoX

Hi, how do I exactly do this? [quote]1) Read an integer from the input. (Reading will automatically stop after the first non-digit character, accounting for possible sign characters.) 2) DO read the next character WHILE the read character is whitespace, then validate it as an operator and store it. 3) …

0
74
Member Avatar for XodoX

Ok, I've asked something similar before, but I still have not been able to understand this... so I just want to have a txt file with math operations in it. Basically, it's just integers multiplies and added. Nothing else. 1*5+10 10+12 Each line can contain any multiplication or addition. The …

Member Avatar for Anirudh Rb
0
140