homework

Repository Pattern Implementation Experience

I am getting ready to start a new asp.net web project and I am going to LINQ-to-SQL. I have done a little bit of work getting my data layer setup using some info I found by Mike Hadlow that uses an Interface and generics to create a Repository for each table in the database. I thought this was an interesting approach at first. However...

Shortest Root to Leaf Path

What is the easiest way, preferably using recursion, to find the shortest root-to-leaf path in a BST (Binary Search Tree). Java prefered, pseudocode okay. Thanks! ...

When does ++ not produce the same results as +1?

The following two C# code snippets produce different results (assuming the variable level is used both before and after the recursive call). Why? public DoStuff(int level) { // ... DoStuff(level++); // ... } , public DoStuff(int level) { // ... DoStuff(level+1); // ... } After reading some of the responses below I thoug...

Failed software development

I have to do a project based on failed software development and implementation in any organizations or case from the internet and then do a forensic investigation on it. can anyone suggest how can i do this project. I have no idea about failed project. Can anyone suggest me.... ...

What would be the simplest way to alpha sort an array of chars in C?

I'm looking for a simple, easy to understand algorithm to alphabetically sort an array of characters in C. ...

How do I upload a HTML form with a username, password, multiple file uploads and then process it with PHP?

How to post a username, password and multiple binary files from a single html form and process it using php? I'm not allowed to use ajax. ...

Given a function which produces a random integer in the range 1 to 5, write a function which produces a random integer in the range 1 to 7

What is simple solution What is effective solution to less minimum memory and(or) cpu speed? ...

How do I read a file in C++?

I am having some problems reading from a file. I have two header files: a and b. b is derived from a,and c is derived from b. Now i want to open a text file. The whole format is like this: A john A johnee P 123 If the first charcter is 'a' and 'p' is also there, then print the second line, else print the first line. #i...

Does TCP/IP prevent packet replays?

Does TCP/IP prevent multiple copies of the same packet from reaching the destination? Or is it up to the endpoint to layer idempotency logic above it? Please reference specific paragraphs from the TCP/IP specification if possible. ...

unix path searching C function

Hi, I am programming a UNIX shell and I have to use the execv() system call to create a process. One of the parameters for execv() is the filepath for the executable. So if somebody types in /bin/ls, it will run the ls executable. But what I need is a function that when ls is typed, it will search for the filepath of ls (like the "whi...

C++ SQL Database program (Yes it is for school!)

I have the following code that I wrote but it the SQLBindCol does not seem to work correctly (of course I could have screwed up the whole program too!.) THe connection works, it creates the table in the DB, addes the record fine and they all look good in SQL Enterprise Manager. So what I need help with is after the comment "Part 3 & 4:...

How do I check if an integer is even or odd?

How best can I check if an integer is even or odd in C? I considered how I'd do this in Java, but I couldn't come up with an answer either. Thanks. ...

Getting Input C++

Hello, I want to get input from an amount of integers,but after it get input to a string with getline(cin,stringname); But the enter that the user gives when he input numbers to the ints,gets into the string and it doesn't get any input(sentence) to the string,only the "enter" key. how can I solve that? Thanks. ...

Array Vs. Linked List

I apologize--this question may be a bit open-ended but I think there are probably definite, quantifiable answers to it so I'll post it anyway. A person I know is trying to learn C++ and software development (+1 to him) and he asked me why someone would want to use a linked list in preference to an array. Coding a linked list is, no dou...

Frame expert system

What's the best way to write a simple frame-based expert system, which determines if object is relative to some group? It's a kind of lab work for Intelligent Systems course in university. Or are there any OpenSource projects to study it's realization? ...

How to show fullscreen popup window in javascript?

Is there a way to make a popup window maximised as soon as it is opened? If not that, at least make it screen-sized? This: window.open(src, fullscreen="yes") apparently only worked for old version of IE. ...

Writing a reliable, totally-ordered multicast system in Python

I have to write a reliable, totally-ordered multicast system from scratch in Python. I can't use any external libraries. I'm allowed to use a central sequencer. There seems to be two immediate approaches: write an efficient system, attaching a unique id to each multicasted message, having the sequencer multicast sequence numbers for ...

How to Build a simple HTTP server in C

I need to build a simple HTTP server in C. Any guidance? Links? Samples? Thanks! ...

C++: Asterisks and Pointers

I've recently decided that I just have to finally learn C/C++, and there is one thing I do not really understand about pointers or more precisely, their definition. How about these examples: int* test; int *test; int * test; int* test,test2; int *test,test2; int * test,test2; Now, to my understanding, the first 3 cases are all doin...

Search then Extract

I have here a multiple data, I want to search a name and date, if I typed JULIUS CESAR as name then the whole data about JULIUS will be extracted.? What if i want only to extract information? This file was save in texteditor(linux). # Record number: 1 Date: 08-Oct-08 Time: 23:45:01 Name: JULIUS CESAR Address: BAGUIO CITY, Philippines I...