I have a litte problem on Console.WriteLine(). I have my while(true) loop that would check the data if exist and it would allow checking the data 3 times. And inside my loop I have this message:
Console.WriteLine(string.format("Checking data {0}",ctr));
Here's my sample code below:
int ctr = 0;
while(true)
{
ctr += 1;
Conso...
I have a homework to build on paper a parameter marshaling protocol to be suited to call a method with one variable, or with an array (like a polymorphism).
procedure(var1)
procedure(array1)
How would you define the protocol? How about the method in C++
...
Hi!
I got a hw assignment asking me to invoke a function without explicitly calling it, using buffer overflow. The code is basically this:
#include <stdio.h>
#include <stdlib.h>
void g()
{
printf("now inside g()!\n");
}
void f()
{
printf("now inside f()!\n");
// can only modify this section
// cant call g(), maybe...
Following is the sample data. I need to make 3 copies of this data in t sql without using loop and return as one resultset. This is sample data not real.
42 South Yorkshire
43 Lancashire
44 Norfolk
Edit: I need multiple copies and I have no idea in advance that how many copies I need I have to decide this on the basis of dates. Dat...
I am trying to deploy my class project as web service on glassfish. I was told that this is really simple and netbeans does all the work and even creates the WSDL for you. I see where you can make a webservice client. But where do you go to make the webservice?
...
I have the relation instructor(ID, name, dept name, salary).
The question in our assignment asks us to: Use the rank function in SQL to write a query to nd the id and name of those instructors in the top 10 most highly paid.
I'm able to rank the instructors through using select id, name, rank() over(order by(salary) desc) as sal
from i...
How to write a program in scheme that takes an arbitrary
sexpression consisting of integers and which returns an sexpression that is identical to
the original but with all the integers doubled?
...
A homework assignment I have asks the following question:
Show how to express \group by cube (a, b, c, d)" using rollup rather than cube.
I really don't have the faintest clue how to do this. Where would I start or where could I look for some help?
...
Given a binary tree, I want to find out the largest subtree which is a BST in it.
Naive approach:
I have a naive approach in mind where I visit every node of the tree and pass this node to a isBST function. I will also keep track of the number of nodes in a sub-tree if it is a BST.
Is there a better approach than this ?
...
The problem is this: There is an array of M binary numbers and each of them is in state '0' or '1'. You can perform several steps in changing the state of the numbers and in each step you are allowed to change the state of exactly N sequential numbers. Given the numbers M, N and the array with the members of course, you are about to calc...
Can / Should MVC be used on a SVN or HG type CLI application? If so, how might one go about this?
I've been trying to come up with a design and I've come to the conclusion that MVC and HG/SVN type interface simply doesn't work together; that they serve separate purposes.
Just to be clear, what I mean by the Hg/SVN type interface is i...
I'm trying to debug a hashset implementation (for a school assignment). Collisions are being managed via linear probing, and I need to count the number of clusters of a given size for the debug routine. I worked this up:
// really just hoping that a 50+ cluster doesn't occur
int clusters[50];
int count = 0;
for (int i=0; i < hashset->di...
Hi
I have heard a lot about XML parser but I want to know i.e 2 kinds of it and also the advantages and disadvantages of each one!
please help me
thanks
...
I have the following module:
module add_8bit ( output wire co,
output wire [7:0] r,
input wire ci,
input wire [7:0] x,
input wire [7:0] y );
I am trying to use it via the following code:
wire rbit [7:0];
wire onebit [7:0];
wire twocomp [7:0];
wire tco, tci;
add_8bit t9 (...
I have to do this project for school, and the theme is "A successful business". And I'm really stuck because I have no idea where to start from. Initially the project was supposed to be some sort of educational thing, but the theme changed after 2 months of work on the previous project so now I have to start again from the beginning.
I...
Hi all, I´v tried to write a procedure that gets an integer as parameter and returns true if the number is a palindrome and false otherwise and it seems to be that there is a problem with changing a global parameter's value whithin an internal function block.
(define index 0)
(define (palindrome? x)
(if (= (lenght x) 1)
#t
...
I want to read and write excel file . it can do with oledb , there is a limitation
maximunm characters < 255
solution is mono data type , now create table become second sheet (when open excel it is shown as hidden.)
please give proper answer
...
I am a high school student taking cs106a at Stanford via video.
For my current assignment I have to add GObjects and position them relative to the size of the window.
I am currently trying to get the width of the window using the command
I am a high school student taking cs106a at Stanford via video.
For my current assignment I have ...
I'm writing a program that asks the user for their birthdate and then calculates that birthdate on different planets. I am not suppose to assume how the birthdate is to be enter except that there is one white space between each number.
The code I have right now does not meet these specifications right now and I'm not sure how to write i...
void BinaryTree::InitializeFromFile(string Filename){
ifstream inFile;
inFile.open(Filename, fstream::binary);
if(inFile.fail()){
cout<<"Error in opening file "<<Filename;
return;
}
for(int i=0;i<=255;i++) Freq[i]=0;
char c;
inFile.get(c);
while(!inFile.eof()){
Freq[c] ++;
inFile.get(c);
}
}
HuffmanTree.cpp(...