Comparing each character in the first string with the character at the same index in the second string and compute the number of different characters in the two strings. (ex. Strings_ Difference("atalk","took")=
diff is = 5
and
Compute the difference between the two strings in length.(ex. Strings_Difference("tall","talls") =1 becaus...
i have a homework:
The student should write a bash program named fix-permissions.sh that accepts a list of users as argument
If a user or more are given as arguments, the script should reset files permissions as follows....
"accepts a list of users as argument"
can someone explain it to me please?
...
Possible Duplicate:
the # of internal nodes
I'm taking course that's Data Structure in CS. I've this question that asks for a recursive algorithm that determines the height of the tree by given the ROOT NODE of the tree.
I'll explain what is tree and root node:
root
...
So this is what I have so far for my vertical string.
public static void main(String[] args) {
(**What do I put in here?**)
}
public static void vertical(String str) {
String vertical = "hey now";
for (int i = 0; i < str.length(); i++) {
System.out.println(str.charAt(i));
}
}
My teacher checked out the "out...
5.121 ____ simplifies expression in which ! is applied to && or ||
This showed up on my quiz in Java. I have no idea what it is and it is not multiple choice. Could someone help me?
...
Every other question I have seen in my book I had at least some understanding of what the book was asking but this one I have no idea on how to approach it. It goes:
"Write a method called padString that accepts two parameters: a String and an integer representing a length. For example,
padString ("hello", 8)
should return "hello "...
Ok, so i have this
edu_less(hs,college).
edu_less(college,masters).
edu_less(masters,phd).
I need to write a function to tell if something is than the other. The predicate is
edu_le.
So if i put edu_le(hs,phd). it should return yes.
I came up with this.
edu_le(A,B) :- A = B.
edu_le(A,B) :- edu_less(A,B).
edu_le(A,B) :- edu_less(A,...
Hello :)
I have a question. How long time does it takes to read a 2 mb file, which is fragmented in 2?
If the rotational delay is 4300 rpm
And the seektime is 10 ms
the transfer time is 10 mb/s
and the controller overhead is 0,5 ms.
My calculation is:
2*(10 ms + 7 ms (<-rotational delay) + 0,5 ms + 200 ms (<-transfer time))
Is this...
I am writing multi process fibonacci number calculator , I have a file that keeps track of the fibonacci numbers , first process open the file and write first fibonacci numbers (0 and 1 ), then do fork and its child process read the last two numbers add them up and write the next into file and close the file and fork again this process c...
What are the different operations involved in using the Windows Explorer? Explain each operations.
...
I'm trying to declare a function that will let me change a number in a char list list (I'm still working on the sudoku game from earlier).
changesudo : char list list -> int * int * char -> char list list
I need to be able to call changesudo xs (r,s,c) where xs is the char list list, r is the list, s is the position in xs and c is the c...
Hi All! Could anyone point me in the right direction on this. I have 20+ weeks to design and code a Texas Hold'em Poker Game in Java for an Android phone for a University Project. It should include AI opponents that play with you or just against themselves. They should be able to learn what strategies work best over a period of time, con...
Hey, I have a quiz really soon, and part of it is translating between JSON and XML. How do I do this?
...
I am new to programing and am having difficulties writing a program dealing with files. The program is to read a file, calculate an employees pay and an updated YTD pay total. After calculations the program will write to a new file. I can not get the program to do the calculations or make, write, or save the updated file.
This is what ...
I need to get the line number of a phrase in a text file. The phrase could be:
the dog barked
I need to open the file, search it for that phrase and print the line number.
I'm using Python 2.6 on Windows XP
This Is What I Have:
o = open("C:/file.txt")
j = o.read()
if "the dog barked" in j:
print "Found It"
else:
print "...
This is homework so for those that dont like looking at someone asking questions about homework dont read this post.
I am to create a console application and a windows form in C#. When I run the console application it suppose to popup a windows form with two buttons on it Pressme and Exit. The part I am having a hard time with is. How d...
I have this JSON:
{
animals:{
dog:[
{
name:'Rufus',
breed:'labrador'
},
{
name:'Marty',
breed:'whippet'
}
],
cat:{
name:'Matilda'
}
}
}
Why is it that it translates to this:
<animals>
<dog>
...
For this picture:
Draw histogram of R, G, B components of color (not using imhist)
Change picture to binary so brown exoskeleton of insect is white
Measure insect's exoskeleton's width and height
EDIT:
1:
I did that:
a = imread('C:\a.jpg');
r = a(:,:,1);
g = a(:,:,2);
b = a(:,:,3);
rhist = zeros(1,256);
[w h] = size(a(:,:,1));
fo...
So far I have this code
int w = (int)((450-150)*random()+150);
This generates a number between 450 and 150... But I have no idea how to make that number a multiple of 10.
Thanks in advance!
...
A program contains the following funcion
void display(in arg1, double arg2, char arg3)
{
cout << "here are the values:"
<< arg1 << " " << arg2 << " "
<< arg3 << endl;
}
Write a statement that calls the procedure and passes the following variables to it:
Int age;
Double income;
Char intitial;
...