Latest Posts in Software Development

in C++
 
0
 

a + b - c * d

If the types of a, b, c, and d are int, long int, float, and double respectively, then the type of the expression is:

Re: in C#
 
0
 

Hi

Sorry for the late replay, out all day yesterday.

The compact shorthand I have used here is called a Method Group.

To really understand this I would type for about 10 pages or if you have time watch these videos in this order. Will take a while but they are really high quality and very enjoyable.

https://www.youtube.com/watch?v=v6Zb0nD7PHA&index=1&list=PLdbkZkVDyKZVvizO94tJNmTfRzXWGDFZ3

https://www.youtube.com/watch?v=0nd-tcQcslc&list=PLdbkZkVDyKZVvizO94tJNmTfRzXWGDFZ3&index=2

https://www.youtube.com/watch?v=0qnwc5XqVs0&list=PLdbkZkVDyKZVvizO94tJNmTfRzXWGDFZ3&index=3

https://www.youtube.com/watch?v=WJItr-ecdCE

https://www.youtube.com/watch?v=OqSXsmAAZcw

Finally consider the following progression - think of that image of an ape gradually evolving into a human!

//var lettersOnly = String.Join("", word.ToLower().Where(delegate(char c) { return Char.IsLetter(c); }));
//var lettersOnly = String.Join("", word.ToLower().Where((char c) => { return Char.IsLetter(c); }));
//var lettersOnly = String.Join("", word.ToLower().Where(c => { return Char.IsLetter(c); }));
//var lettersOnly = String.Join("", word.ToLower().Where(c => Char.IsLetter(c)));
var lettersOnly = String.Join("", word.ToLower().Where(Char.IsLetter));
Re: in Computer Science
 
0
 

You start from an idea for an application (desktop, mobile, arduino... whatever).
It would be best if it is your own idea, but you can also find plenty of "wishlists" on the web.

When you have motivation for making this idea a reality - start exploring and asking question, find the right technology (android/java, windows/c++, iphone, etc...)

You can start by searching similar solutions in opensource comunities.

You can also join an opensource project.

Good luck!

in Computer Science
 
0
 

I am a BTech student in Computer Science. And interested in computers, software, programming languages etc.
I have learnt HTML,C,C++. But there are so many things out there....it's confusing what to learn and where.
I wanna learn more and achieve more. Like really get good at it..but I lack motivation and lose confidence in myself.

I need help and I am ready to learn things.
But where do I start?

Thankyou for your help.

Re: in Game Development
 
0
 

I suppose you want to do rotations in 3D etc.?
The math involved can get quite complicated. (Try "quaternion")
So the only advise I can give is -you can hardly get around it- study some math about 3D matrix transformations. Alas, I believe there is no way around it.

Re: in VB.NET
 
0
 

is "Enable Adding" on your DGV properties checked to true?

if yes, then you have to use Count - 2
if no, then you have to use Count -1

Re: in C++
 
0
 

which programming language do you prefer?

in c++ I would use std::vector to keep the numbers, and sum them when breaking from the while loop.

#include <vector>

int ccmain()
{
    std::vector<int> all_goals;
    std::vector<int> all_assists;

    int goals = 0;
    int assists = 0;
    while (goals >= 0 && assists >= 0)
    {

//      ... some code for getting the numbers ...
        all_goals.push_back(goals);
        all_assists.push_back(assists);
    }

    int sum_of_elems = 0;
    for (std::vector<int>::iterator j = all_assists.begin(); j != all_assists.end(); j++)
        sum_of_elems += *j;

    return 0;
}
Re: in VB.NET
 
0
 

Your code is not messy :)

You are using positional parameters (?) so I would change cmd as follows:

Dim STOCKSWSRt As Integer = 24 ' Hardcoded value ("numexpected" from the db)

Sql = "UPDATE ItemProduct SET stocksretail = stocksretail - ? WHERE CODE = ?" ' Positional params
cmd = New OleDbCommand(Sql, conn)

cmd.Parameters.Add(STOCKSWSRt)
cmd.Parameters.Add("1002") ' Hardcoded value here too, should be LVCart.Items(a).Text
cmd.ExecuteNonQuery()

Or with named parameters:

Sql2 = "UPDATE ItemProduct SET stocksretail = stocksretail - @pstockretail WHERE CODE = @pCODE" ' Named params
cmd2 = New OleDbCommand(Sql2, conn)

cmd2.Parameters.AddWithValue("@pstockretail", STOCKSWSRt)
cmd2.Parameters.AddWithValue("@pCODE", "1002")
cmd2.ExecuteNonQuery()

HTH

in C++
 
0
 

this is what it should look like, a while loop that repeatedly reads goals,assists, stops when a negative is entered. at the end it calcuates sum, average. donot know how to calcuate sum or average if i dont know how many times the user will enter.

Enter a number of goals: 0
Enter a number of assists: 0

Enter a number of goals: 1
Enter a number of assists: 0

Enter a number of goals: 2
Enter a number of assists: 1

Enter a number of goals: 0
Enter a number of assists: 3

Enter a number of goals: 4
Enter a number of assists: 1

Enter a number of goals: 0
Enter a number of assists: 0

Enter a number of goals: 2
Enter a number of assists: -3

Total Goals: 7
Total Assists: 5
Average Goals: 1.16667
Average Assists: 0.833333
Yes, there was a hat trick!

Re: in Computer Science
 
0
 

Hi,I am a student of computer system engineering and enrolled in the course of web engineering.Now,we are searching for semester project on web designing .Any good suggestion? we have about 2 months.

Re: in Game Development
 
0
 

there's also this, which doesn't work correctly:

cosx = cos(radians(rx)); sinx = sin(radians(rx))
cosy = cos(radians(ry)); siny = sin(radians(ry))
cosz = cos(radians(rz)); sinz = sin(radians(rz))
m = [
    [
        sx*cosy*cosz,
        sx*sinz*cosy,
        -sx*siny,
        0.0],
    [
        sy*(sinx*cosz*siny-cosx*sinz),
        sy*(sinx*sinz*siny+cosz*cosx),
        sy*sinx*cosy,
        0.0],
    [
        sz*(sinx*sinz+cosx*cosz*siny),
        sz*(cosx*sinz*siny-sinx*cosz),
        sz*cosx*cosy,
        0.0],
    [0.0,0.0,0.0,1.0]
]
m[0][3]= (lx*m[0][0]) + (ly*m[0][1]) + (lz*m[0][2])
m[1][3]= (lx*m[1][0]) + (ly*m[1][1]) + (lz*m[1][2])
m[2][3]= (lx*m[2][0]) + (ly*m[2][1]) + (lz*m[2][2])
Re: in C++
 
0
 

Here are the correct compile commands for the .bb-file:

do_compile() {
${CXX} ${CXXFLAGS} ${LDFLAGS} ${WORKDIR}/dcp.cpp -lpthread -o dcp
}

And now I'm running my dcp-command on my VU+ Solo2... at last.!! :-)
Thanks to Moschops for all help and tips - it was very valueable for me..

in C
 
0
 

How to access each element of array of words?
For example, if I want to find number of vowels in every word of an array.

#include<stdio.h>
#include<stdlib.h>
int main()
{
    int i,n;
    char **array;
    do
    {
        printf("n=");scanf("%d",&n);
    }
    while(n<1);
    array=(char **)malloc(n * sizeof(char *));

Thanks for replies.

Re: in C++
 
0
 

Moschops: I changed the reference from {CC} to {CXX} in the .bb-file, and then the source code compiled as it should. Thanks for pointing me in the right direction.. :-)
(But I have not solved the problem about pthread not loading. That's the next step..)

Software Development Tag Cloud