homework

How does SELECT from two tables separated by a comma work? (SELECT * FROM T1, T2)

Given 2 tables T1 and T2. T1 T2 --------- A 1 B 2 C 3 You make a query: SELECT * FROM T1, T2 What is the no: of rows that are fetched from this query? (a) 4 (b) 5 (c) 6 (d) 9 Answer is : 9 Question: Why is the answer "9"? ...

which one is suitable datastructure

Two files each of size terabytes. A file comparison tool compares ith line of file1 with i th line of file2. if they are same it prints. which datastructure is suitable. B-tree linked list hash tables none of them ...

Finding out the sum of first and the last digit of any number

I want to write a program for finding out the sum of first and the last digit of any number entered through keyboard. For example, I entered 52264. Output must be 5+4 = 9. Yes, this is an assignment. ...

Addition of all digits

I want to write a program to add all the digits of the entered number. For example, when I enter 54496 the output must be 5 + 4 + 4 + 9 + 6 = 28. ...

About the linked list

Give the advantages and the disadvantages of Linked List in Data Structure. ...

Independent set in a graph

As you know finding maximum independent set is NP. Is there an algorithm to find out whether a given graph has an Independent set of at least k vertices? Note that we don't want to find it. We just want to find out if such thing exists. ...

Image processing - edge detection

I need to count out boxes in a warehouse by using edge detection techniques, images will be taken from a 3D model of a warehouse and the propose system will be used 3 images in 3 different angles to cover the whole area of a warehouse. As I have no experience in image processing before I'm a bit confused about which algorithm to use. ...

Concatenate integer Values separated by Pipe and ':' using java

Hi, I have array of ValueA and ValueB(int type) . I am reading each value from array using a for loop. I want to concatenate all there values in a single String. these value should be in the form of like these ValueA1":"valueB1"|"ValueA2":"valueB2"|"ValueA3":"valueB3"|"ValueA4":"valueB4"|".... I want this in Java, please can some ...

recursive merge sort in MIPS using stack

Hi I am trying to implement the merge sort algorithm in a very dirty manner since it was told by our teacher to do so. This program takes the input integer array from the user and prints the value of the array each time the sort is call (just for testing. Ill correct it later). It is entirely dependent on stack . I was told to first imp...

Make a class in C++ form application global

I find myself stumnped by what should be a simple problem. How do you make a class (created in a seperate file) have global scope when using forms in Microsoft C++. I can declare, initalize, and use it in a textbox leave or keypress function but when I move to a button it is out of scope (the button and textbox have global scope, but I...

EJB3.0: Using dependency injection as opposed to the session object

Hello there! We're learning EJB 3.0 in school and we're trying to determine best practice for a problem our teacher has posed. We don't use Spring yet. The problem is as follows: Create an EJB that keeps track of the time the bean was last called by the same user (call the first user John) and displays this in a web (servlet) context. I...

finding sum,min,max with array

Write a program that inputs number of values then inputs these values (double type) one by one in a loop and finally outputs their sum, the maximum value and the minimum value. I write the code for this assignment but i got error #include <stdio.h> int main(void) { float a; float i; short c; float sum...

Ruby programming assignment

So i need some support with my Ruby assignment, I'm not from US so you have to excuse my English. We are building a hotel and this is the second assignment. It's a console based application and I have a class called main.rb that handles the runtime and a guest-class. In this second assignment we are to preload the app with five guest-...

how do you swap two rows in a matrix (in C)?

for example, given a matrix: 1 2 3 4 5 6 7 8 9 if you are goint to swap row[0] and row[1], resulting matrix would be: 4 5 6 1 2 3 7 8 9 can you guys help me get a code in C for this? ...

Question for 70-536 - study

Hi, I trainning: You want to create a stream that you can use to store a file temporarily while your application processes data. After all data processing is complete, you want to write it to the file system. It’s important that you minimize the time that the file is locked. Which class should you use? A. MemoryStream B. BufferedStream...

image processing

Hi, This is an assignment, i have put good effort since i am new to python programming: I am running the following function which takes in image and phrase (spaces will be removed so just text) as arguments, i have already been given all the import and preprocessing code, i just need to implement this function. I can only use getpixel...

finding min & max

i wrote the code but i dont get max value how to find max value #include <stdio.h> int main(void) { double temp[0]; float max,min; float i; short c,j,k; float sum=0; float nu[c]; printf("Number of values :"); scanf("%f",&i); for (c=1;i>=c;c++) { ...

file manipulation

in c++ i have written a simple program, which accepts 4 to 6 records and then do not accept any more when airline_no is same i.e. 1? The source code is: #include<fstream.h> #include<conio.h> #include<dos.h> #include<string.h> #include<stdlib.h> #include<process.h> #include<stdio.h> int lno; struct airln {int airline_no,routeno,dep_time,...

If array contains certain Item show item's value

Hi, I have a Console app, in which I input Users and Customers (that is stored in a array) and is then allowd to create a note from a user to a customer. At the end I want to show all the notes in the notes array that has been created but using the user and the customers fullname as in the users and customers array. Can anyone please hel...

Print ascii table 0-127

Hello, got a question regarding printing out the 128 first characters from the ascii table. I haven't gotten so far yet, because I already stumbled to a problem. The following code prints the correct value starting from 32-127. From 0 to 31 however it prints out some scrap values. I assume it is correct as well since I quick checkup on t...