Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

There is no such command in MS-Windows -- lpr is a linux program.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

About 3 tablespoons hemp seeds, I bought them just yesterday after hearing about them on Dr Oz tv show. They taste like finly chopped nazel nuts.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You could use global variables, that that is normally fround upon because it can lead to bugs and errors.

you sould nest the functions like this: functionB(a,b,FunctionA(a,b));

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

That's a common sorting problem with numerical data represented as strings. Correct the problem by right-aligning the numbers, embed either spaces or 0s to the beginning of each number so that all numbers are the same width. for example the first value, 10, would become 0010 so that it's the same width as 5555.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Don't put the password in MySetting in the first place. Hardcode the password inside your program when connecting to the db, or prompt for password then put the text in the connection string.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

how to send text/graphics to a printer depends on the operating system. If the printer is attached to LPT1 port (most are USB or wifi nowdays) then just open LPT1 as if it were a text file. Otherwise it's pretty complicated, as shown in this Microsoft article

I don't know how to do it with Linux computers, something to do with postscript.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Windows 7/8 have a program that changes existing partition size so that you can create new partitions. I've done it several times with no problems. There's also Partition Magic, but if you have Windows 7 or 8 you don't need it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

why isn't this code work??/

You need to explain a bit more. Do you take your car to a machanic and just say "it doesn't work". Of course not, you tell him the symptoms, such as it doesn't start. Programming is a bit like that -- we can't tell you why "it doesn't work" unless we know what's wrong with it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I had to google for it because I never heard of it. But my emoticon is (:| (Yawn)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

A boy died about a month a go from hitting a car head on WITHOUT a helmet.

Darwin's theory of Survival of the Fittest at work.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

show you my WHAT??

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

WallMart doesn't sell walls either. If the names of businesses had to represent what they sell then there would be very few businesses.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Just replace textBox1.Text with string objects. Using ddanbe's suggestion

List<string> items;
                    foreach (string ln in split)
                    {
                        string n;
                        if (count > 4 && count < 8)
                        {
                            n += (ln + Environment.NewLine);
                        }
                        items.add(n);
                        count++;
                    }
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

i wana to initalization all rooms ids and all beds id
once time not every time i run the programmme

Not possible unless you save the info to a text file and re-read it when the program starts. Once the program terminates evrything is lost, just like when you turn your computer off.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

List<string> CVSValues

Looks like C++ to me, does C# have similar containers?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

how old is the computer? what brand internet card? Is it internal to the motherboard of an add-on card?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

By using ReadToEnd() you lose track of individual lines, so you'd have to know beforehand how many columns are on a line then extract them from the array as if everything was in one big line of the file. So you'd have to set it up something like this:

 const int ColumnsPerLine = 10;
 int count = 0;
 foreach (string s in stringArray)
 {
    ++count;
    if (count > 4 && count < 7)
       textBox1.Text += (s + Environment.NewLine);
    if( count >= ColumnsPerLine)
       count = 0; // reset for next line
 }

I would think it would be a lot more understandable if the file were just read one line at a time, like in your original post.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Are you mixing C++ and C#? No need for that loop.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

If you have a lot of items to display then use a listbox instead of a textbox so that you can see them all. textbox doesn't have a scrollbar.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

If you don't care about which values are on which lines, then why not combine lines 3 and 4 so that it does split only once?

            StreamReader sr = new StreamReader(filepath);
                string fileString = sr.ReadToEnd();
                string[] stringArray = fileString.Split(new char[] {',','\n'});
                int count = 0;
                foreach (string s in stringArray)
                {
                    if (count++ > 4)
                        textBox1.Text += (s + Environment.NewLine);
                }
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

That joke is older than I am :)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The code I posted will do exactly that. Why are you using an array of lines?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

If you want each value to appear in the text box on it's own line, then below is one way to do it. I couldn't get it to work the way you tried it.

            using (StreamReader readFile = new StreamReader("C:..."))
            {
                string line;
                while ((line = readFile.ReadLine()) != null)
                {
                    string[] split = line.Split(',');
                    int count = 0;
                    foreach (string ln in split)
                    {
                        if( count++ > 2) // ignore first 3 columns
                            textBox1.Text += (ln + Environment.NewLine);
                    }
                }
            }
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

See the examples here how to split the string into it's individual tokens

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Gummi Bears, of course.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

What does the acrnym IBM stand for? A: It's Better Manually.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Begin by placing a FlowLayoutPanel control on the left side of the window, then put other controls on top of it. Change the background color of all controls to whatever color you want them to be.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

what compiler are you using? Please post the contents of the *.c file where the error appears, or at least the part from line 1 until the line that contains the error.

Another hint: check calibration.h to see if it expects some macro definitions to be defined before including that file. Look for lines that begin with #ifdef or #ifndef

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

If yo momma was so smelly yo daddy must have been awful drunk when yo were conceived :P)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Fruit Cake.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I don't think explorer.exe can be removed -- it's an integral part of the operating system. See this article about a lawsuit.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

And we've seen in California, and now in Washington, what happens when the people start demanding the labeling of food.

What are you talking about??

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

We don't have Taco Bell here. It's because of consumer protection laws against false representation. Basically, you cannot sell a "beef taco" if you cannot show that it actually contains beef. That's why Taco Bell (and a few other american chains) don't exist in Quebec.

That's just stupid! How can Toco Bell NOT prove that their tocos contain beef? What else could they contain -- kangaroos or horsemeat? All the inspectors have to do is watch them make it and test the ingredients.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

That paradox has been the subject of several time-travel movies, such as Dr. Who. When time traveling you're not allowed to alter history, it's caled a Temporal paradox

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I would think professors would encourage students to learn how to do research -- learn how to use google to find answers to questions. Afterall, that's what happens on-the-job. That doesn't mean find someone to do write their programs for them, but to ask questions, something like what DaniWeb encourages. Do those same professors who object to students getting outside help also object to students working with tutors?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I love Irish Mist, but can't drink it any more. Now I just drink diet Pepsi, water, and ice tea.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

New buttons are nice -- but will you please add tool tips so that we know what they are? For example buttons for Report Post (Flag) and the other one next to it (I have no idea what it does).

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Here's a great tutorial to get you started with vb.net, I refer to it often myself.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

This worked for me ok (note: I changed the name of the database to be one that's already on my computer). Also used System.IO.File.Copy() instead of win32 api copyfile().

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim path As String = Application.StartupPath & "\Database1.accdb"
        Dim backup As New FolderBrowserDialog
        Dim backuptext As String
        If backup.ShowDialog() = Windows.Forms.DialogResult.OK Then
            backuptext = backup.SelectedPath
        End If
        System.IO.File.Copy(path, backuptext & "/POP.mdb")
    End Sub
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I don't know -- that article was based on some congressional report

Based on eight years of research and analysis, 50 years of data from nuclear tests and EMP simulators, and never-before-attempted EMP tests, the commission found that any nuclear weapon, even a low-yield one, could potentially pose a catastrophic EMP threat to the United States, mainly because of the great fragility of the electric grid.

So, are you saying that's just a lot of bullshit??

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

See this thread. Why does the code start with '' and end with '' ???

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

after line 9 add another line to call strlen() to get the length of the line just read. If you want all the lines in the file then add them up into an int variable that you can use later in the program.

[

int sum = 0;
while( fgets(...) ) // replace ... with actual parameters
{
    sum += strlen(text);
}

](null)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

According to the article whose link I posted

A single nuclear weapon detonated at an altitude of 400 kilometers over the United States would project an EMP field over the entire country, as well as parts of Canada and Mexico.

But you are right -- we'd have many more problems to worry about than EMP if that ever happened.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

First, gets() gets text from the keyboard, not from a data file. What you want is fgets() to read the text file. Do you know how to read text files? If not, here is a short tutorial

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Taco Bell and poor service.

Service is ok at the Toco Bell where I live. Another store is combined with KFC.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

if it's const char array then you won't be able to add text from a text file to it. But maybe what you want is a function whose parameter is const char*?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I don't have an account at that site and I don't have any problems reading it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

By EMPS do you mean this?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Do it in small parts so that you don't get overwhelmed. First, write the program and inputs three integers. After you get that working, you can add some more to sum up the three integers as you enter them. After that, so each of the other parts, and soon you will have the program written.

JeffGrigg commented: Excellent advice for a beginner. +6
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Most desserts are bad for us, but we can't live forever so might as well enjoy it :)