A quick question, is there a way to perform these 3 operations:
while(...) {
fscanf(input, "%lf %lf", &t, &y);
tTotal += t;
yTotal += y;
}
in one operation where t and y add themselves to tArray and yArray respectively, inside the scanf statement? Something of the form
fscanf(input, "%lf %lf", ...code..., ...code...);
Thanks, Ash....
How to restrict the length? Like 12345.789.22.7890 is invalid because the IP ranges from
0-255
Kindly help me
...
What is the best way of extracting the values from vvv.www.xxx.yyy.zzz
Note that vvv or www or xxx or yyy or zzz can vary i.e. it can be of any length.
For this reason I cannot use substring with charindex.
I don't want to do this with LOOP or CURSOR . By using CTE and a number table also it can be done but that will be a bit lengthy ...
I'm working on a practice problem set for C programming, and I've encountered this question. I'm not entirely sure what the question is asking for... given that xDEADBEEF is the halt instruction, but where do we inject deadbeef? why is the FP relevant in this question? thank you!
You’ve been assigned as the lead computer engineer on an ...
I get 6,4,3 for the first 3 questions respectively, but I don't know how to figure out the last one. However, the solution manual indicated 7,5,4,18 as the answers.
int sum(int x[], int N) {
int k = 0;
int s = 0;
while (k < N) {
s = s + x[k];
k = k + 1;
}
return s; // the activation record for sum will be ____________ ...
How do I find the length of an array without using the Length property in C#?
...
I came across a question "How can one reverse a number as an integer and not as a string?" Could anyone please help me to find out the answer.
...
Hello,
I have to implement some bignum arithmetics. The number has to be split into a list of 16 bit integers.
That is not the problem. The problem is to parse a string into this notation. If it would be a single integer, i would go through the string backwards, get the number out of the char and would add <number>*10^stringposition. (...
Hi,
I have two applications,one is for server and the other is for client.at first I run my server application .then I will run the client application.When you run the client application,one frame will be shown which get user name and password and if they were correct,the other frame will be shown.but when I click on the Sign In button ,...
Here is a task:
"3 brothers have to transfer 9 boxes from one place to another.
These boxes weigh 1, 2, 4, 5, 6, 8, 9, 11, 14 kilos.
Every brother takes 3 boxes.
So, how to make a program that would count the most optimal way to take boxes?
The difference between one brother's carrying boxes weight and other'...
Is there a way to print numbers from 1 to 100 without using any loops or conditions like "if"?
We can easily do using recursion but that again has an if condition. Is there a way to do without using "if" as well? Also no repetitive print statements,or a single print statement containing all the numbers from 1 to 100.
A solution in Java ...
Here's the case. I'm trying to make a Chess engine. Not that I believe that I can make anything better than what's already out there, but I want to see how it works. I've made some of the important parts, such as board representation and the evaluation function. The evaluation function seems to produce decent results, so now I need to im...
As a student, I am trying to learn some JQuery tricks.
Here my HTML
<div id="EngineGroup" class="OptionGroupStyle">
<div id="GS300"><input id="GS300Check" name="GS300Check" type="checkbox" disabled="disabled" checked="checked"/>V6 250ch</div>
<div id="GS300Price">53.000 €</div>
<div id="GS430"><input id="GS430Check" name="GS...
Hi, I am stuck on the following problem from my C programming class:
Write a program that prompts the user to input a year, and then outputs the calendar(for the entire year).
I have no idea how to approach this problem. I can usually start my homework problems (this is an optional challenge problem), but I am really lost. We've wor...
Hi, i am doing computer science and in a project at the moment. I have had no code input for this as its specifically designed to mimic work i guess. I am the tester.
i have stumbled across a rather complex method written by my colleague who isn't here at the moment, and the method returns a boolean. The issue is however that the method...
Hey,
i have to implement the LPC (linear predictive coding) Algorithm with Java and quiet frankly don't have a clue where to start. Could someone please point me into a right direction.. I can't. of course, use already implemented algorithms from the java sound api (if its provides a solution).
thanks for you help
fabian
...
Hey I'm just revising for my functional programming exam coming up on friday and I'm just working through exercises given by our lecturer. I've come across one which I neep a bit of help on:
6. a) Write a function that zips a given list xs with every list in a list yss of lists. Use partial
applications and lambda expressions to the gre...
How in Java do you return the first digit of an integer.?
i.e.
345
Returns an int of 3.
...
Hey,
1) Anyone has an idea to get the number of shortest paths in an undirected unweighted graph?
I wanna fill a 2 dimensional matrix which has the number of shortest paths for any i,j vertex,
2) another question is how to get number of shortest paths between two vertex i,j in a way that the path must pass a certain vertex.
Thanks in adv...
Consider this example :
T(n) = T(7n/8) + 2n
I assumed T(1) = 0
and tried to solve it in the following way
T(n) = T(7n/8) + 2n
= T(49n/64) + 2.(7n/8) + 2n
= T(343n/512) + 2.(7n/8).(7n/8)+ 2.(7n/8) + 2n
= T(1) + 2n ( (7n/8)^i + ..... + 1)
but I could not come to any conclusion about this. I am confu...