homework

Entropy using Decision Tree's

This is a question in a previous exam paper that I have been asked to look at; the slide we have used to learn do not make sense of this. I understand how to use a table to get the Entropy, but not how to use the equation provided to do so Question Train a decision tree on the data represented by attributes A1, A2, A3 and outcome C des...

Question about in-place sort

For example, we have the following array: char data[]=new char[]{'A','S','O','R','T','I','N','G','E','X','A','M','P','L','E'}; and an index array: int a[]=new int[]{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14}; void insitu (char data[], int a[], N) { for (int i=0;i<N;i++) { char v=data[i]; int j, int k; for (...

how to make an setup file

i am new to program,and our teacher asked us to write a small program witch using sqlserver; so i use visual studio 2010 c# to write it,but i meet a problem: i don't know how to make a setup file.because i put the SqlConnectionString in the code file directly;so,even i have publish the program ,the sqlconnectionstring didn't change,it di...

Array Recursion

I've got an assignment I can't figure out, any pointers will be much appreciated, it goes like so: There's a series of light bulbs represented as an array of true/false, there's a switch for every light bulb, by clicking it for any light bulb, you toggle it as well as 2 adjacent ones (1 from left & another 1 from right; if clicked switc...

I want to split string without using split function ?

I want to split string without using split . can anybody solve my problem I am tried but I cannot find the exact logic. ...

Call function based off of a string in Lisp

I am passing in command line arguments to my Lisp program and they are formatted like this when they hit my main function: ("1 1 1" "dot" "2 2 2") I have a dot function (which takes two vectors as arguments) and would like to call it directly from the argument, but this isn't possible because something like (funcall (second args)...) r...

How can a extend memory space at 8086 up to 1 GB ???

How can a extend memory space at 8086 up to 1 GB ??? ...

Modular Inverse and BigInteger division

I've been working on the problem of calculating the modular inverse of an large integer i.e. a^-1 mod n. and have been using BigInteger's built in function modInverse to check my work. I've coded the algorithm as shown in The Handbook of Applied Cryptography by Menezes, et al. Unfortunately for me, I do not get the correct outcome f...

scripts on Cshell

hello, I've got some problem, I have list of data in the file: 053-37878 03828008 Moskovitch James 500 052-34363 01234567 Mendelson Kippi 450 053-32322 03828008 Jameson Shula 350 054-39238 03333333 Merden Moshe 300 is it possible rewrite this list in the same file (without using temporary file) but without last number thanks in advanc...

circular shift c

I have to shift the int one place to the right and return it In Java i can just return n >> 1; Is this possible in C? The method we were given is as follows // Return n after a right circular 1-bit shift unsigned int right_circular_shift_1(unsigned int n) { ...

How to calculate line count for project

I am taking a software engineering class right now. Our assignment is to evaluate Mozilla's Thunderbird. Our assignment is to evaluate the size of Thunderbird. One metric that we need to use is the number of lines of code in the project. (Lines of code meaning not including comments or new lines). Is there a standard way to find t...

Cracking the Playfair cipher

I have the ciphertext and an encrypting program (with the key hardcoded in). How would I go about finding the key? Surely the availability of the encryptor must open up possibilities beyond brute-forcing it. ...

sort an array such that one half of the array has even numbers in ascending order and the other half has odd numbers in descending order.

Possible Duplicate: simple question regarding sorting Design an algorithm with min time and space here is my solution - assume a array of N elements with 32 bit integers use a bit array to set the appropriate bits the array is sorted now assign even numbers to the first half of the array in ascending order assign odd number...

Format double value in scientific notation

I have a double number like 223.45654543434 and I need to show it like "0.223x10E-3". How can I do this in Java? ...

Generating a python file

Hi! I'm havin issues with python (Sorry for my personal feelings before.. :P). I have a txt file, it contains a custom language and I have to translate it to a working python code. The input: import sys n = int(sys.argv[1]) ;;print "Beginning of the program!" LOOP i in range(1,n) {print "The number:";;print i} BRANCH n < 5 ...

Understanding object models

What is the importance of object models and can I have some examples? ...

question about missing element in array

i have following problem from book introduction algorithm second edition by MIT university problem is following An array A[1 . . n] contains all the integers from 0 to n except one. It would be easy to determine the missing integer in O(n) time by using an auxiliary array B[0 . . n] to record which numbers appear in ...

prove, that if sqr(a) + sqr(b) divisible on 7, then a + b divisible on 7 too

how can i prove, that if sqr(a) + sqr(b) divisible on 7, then a + b divisible on 7 too. i'm thinking on it whole day... Thanks update i mean, that sqr(a) = a*a ...

grid traversal question

Possible Duplicate: Looping in a spiral Given a grid of any height and width, write an algorithm to traverse it in a spiral. (Starting at the top left and ending in the middle) without passing over previously visited nodes. Without using nested loops. ...

How do I write sql data into a textbox after a submit type event

Finishing up some homework and Im having trouble with figuring out how to take information generated in sql column(a primary key set up to assign a record number to a customer example 1046) at submit and writing it to my redirected recipt page. I call it recipt.aspx. Any takers Professor says to use a datareader...but things go bad afte...