I have a webpage with 1 label and 2 buttons. One button does a postback generates a random squence of numbers, saves it to the Application object, and calls a method which gets the list from the Application object and writes them to the label. The other obutton just calls the method which gets the numbers and writes them to the label. On...
Can anyone please explain this?
struct node
{
int data;
struct node * link;
}
main()
{
struct node *p, *list, *temp;
list = p = temp = NULL;
.........................
.........................
}
addbeg()
{
int x;
temp=malloc(sizeof(struct node));
scanf("%d", &x);
temp->data=x;
t...
Well I'm looking for a function that reduce multiple spaces in a string.
For example for string s given :
s="hello__________world____!"
The function must return "hello_world_!"
In python we can do it via regexp simply as:
re.sub("\s+", " ", s);
...
How can I find the preorder listing of a tree if only the postorder listing is given and vice versa. Also, in the tree, every non-leaf node has two children (i.e. Each node has either two or zero children.)
EDIT: Another given assumption is that the label of each node is unique and has a field that will identify it as an internal node o...
Hii
I need help for discrete wavelet transformation source code with matlab...
Could i know full discrete wavelet transformation source code with matlab that can be used for video processing???
especially i need for wyner zif filter using wavelet transformation with matlab...
...
I need to implement a handshake type protocol in to a small Linux program that uses named pipes to communicate with other processes. I've searched for a general implementation pattern for a handshake type protocol when using named pipes but I've not been able to turn anything up...
I simply can't believe that there isn't patterns to do ...
Is this allowed?
Object::Object()
{
new (this) Object(0, NULL);
}
...
A binary tree can be encoded using two functions l and r such that for a node n, l(n) give the left child of n , r(n) give the right child of n.
A branch of a tree is a path from the root to a leaf, the length of a branch to a particular leaf is the number of arcs on the path from the root to that leaf.
Let MinBranch(l,r,x) be a simple...
So it's the third week of my life in C and I've been given the task of writing a program which takes in upto 100words which are upto 80characters long, calculates the average word length of the inputs, prints words larger than the average, and finally prints the average word size.
EDIT: We also have to use an emalloc, a recursive output ...
Hi!
I'm a relative novice at C# and am thoroughly stuck! I need to make a sliding puzzle where numbered tiles are to be rearranged in order by using a blank space, i.e.
1 2 3
4 5 6
7 8
I have no idea where to start!
Thanks for your time!
...
Related to my question about how to build a tree-like structure, the data I receive from the server are in arrays like this: {School Chair Table Chalk}
How can I loop through this so that:
School becomes parent of Chair
Chair becomes parent of Table
Table becomes parent of Chalk
...
i am a student and my final project in gaduate study of Computer engineering is design and development a map viewer web application that must be used for an AVL tracking system.
i am trying with applet in java.
first, map images formate are GIF/JPG with big/large amount size(100MB).
now, i want to find, how i break map images into small...
I have a web service that contains this method:
[WebMethod]
public static List<string> GetFileListOnWebServer()
{
DirectoryInfo dInfo = new DirectoryInfo(HostingEnvironment.MapPath("~/UploadedFiles/"));
FileInfo[] fInfo = dInfo.GetFiles("*.*", SearchOption.TopDirectoryOnly);
List<string> listFilenames = new List<string>(fInfo....
I have a program with a graph whose nodes represent some processes, and the proccess computing time is the node's cost.This graph is maintainded in memory as a list of nodes and each nod has a list of parent and children, and his execution time.
I must find the path with the minimum execution time.
Each node can connect with any other...
i need help making a batch file in ms dos to do certain commands like
a)Request from you to first press any key
b) List the contents of the C:\WINDOWS directory
c) Create a subdirectory on one of your local drives. Use your initials to name the subdirectory.
d) Copy all the text files from C:\WINDOWS directory into the new subdirecto...
Hi there I am really interested to have a method that can remove a line from text file based on "id number", but i don't know how to achieve this any help please, thanks. That is what i have got so far:
// students.txt file
1111111,John Smith
7777777,Dave Smith
// class Student
import java.io.*;
public class Student implements Ser...
import java .sql.*;
class Pro
{
public static void main(String args[]) throws Exception
{
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://localhost:3306/test";
Connection conn = DriverManager.getConnection (url,"root","password");
CallableStatement cst=conn.prepareCall("{call fileproc(?,?)}");
cst.setInt(1,10);
cst.reg...
I have a program that read urls in a file and does a gethostbyname() on each URL host. This call is quite consuming. I want to cache them.
Is there a very simple map-base code snippet in C out there that I could use to do the caching? (I just don't want to reinvent the wheel).
It has to have the following points :
Open-source with ...
I'm looking for an algorithm that will count the number of binary bit patterns in an n-bit word which are equal to or less than an arbitrary limit that is less than 2^n. Further, I want to generate the count for all 1-bit combinations, 2-bit combinations, etc.. Obviously, if the limit were 2^n, there would be 2^n combinations (C(n,1) 1-b...
Given this table:
Employee
--
firstname
lastname
salary
age
I want to print the first name if it's started by "a" also i want to print the name of employee who has a salary more than 200$ and less than 1000$.
...