183 Posted Topics

Member Avatar for Nutster

*I wrote this a few years ago as part of a C manual I wrote, but did not finish. I thought it might be interesting to the people on DaniWeb.* # Programming Language Generations # Different types of programming languages are often grouped into large categories known as generations. Each …

Member Avatar for <M/>
1
399
Member Avatar for govindh2so4

Zero. The pointer given to `free()` is not in its list of allocated blocks. Usually, `free` does not check for blocks that are inside the block that it knows is allocated; the pointer must match exactly what was given by `malloc()`.

Member Avatar for Schol-R-LEA
0
659
Member Avatar for Proglearner

The command line is available in Mint by opening a terminal. There are several packages that provide a terminal to the text interface in a graphical window. I like Terminator, as it allows you to open multiple windows on one screen.

Member Avatar for bsimms86
0
251
Member Avatar for odohben

There a few ways of using MS-Access databases with VB6, depending on whether you want to always use the same database or you want to choose which database at run-time. If you are always connecting to the same database, create a new Database project and connect to the database you …

Member Avatar for jhai_salvador
0
232
Member Avatar for Allorango

Are you asking about what functions and other things the DLL provides, then there are various tools that can display that information. A tool like [Dependency Walker](http://www.dependencywalker.com) can help determining the exported functions and datatypes from a DLL.

Member Avatar for Nutster
0
426
Member Avatar for ralph.d.abernathy.1

In line 307 you tell `cin` that you want to read octal values. Use the `hex` modifier instead, then use the `oct` modifier in the `cout` statement. You might want to consider using a single more general conversion rather than all these custom conversions. 1) Determine the input base. 2) …

Member Avatar for Nutster
0
503
Member Avatar for GeneClaude

Another thing to consider is what should happen if you get bad data. `scanf` stops if it does not get the type of data it is expecting, and leaves the unexpected characters on the input queue. If your program is expecting a number and you enter a non-numeric character, like …

Member Avatar for Nutster
0
440
Member Avatar for tayyabatiq

Operator overloading is a mechanism where you can allow existing operators to be used with your class. You can not add new symbols to be operators, nor change their precidence (order of operations), nor number of parametres. I would love to be able to assign **^** to a higher precidence …

Member Avatar for Nutster
0
264
Member Avatar for MRehanQadri

All member functions of a class can access all data members and all other member functions of that class, no matter what their access level (public, private etc.), and no matter which object of that class they are in. The copy constructor does not need to use the public interface …

Member Avatar for Nutster
0
153
Member Avatar for jemartalaban_1

# Using Another Form # On Form1, in the command button Click handler, do the work you want to do and store the value in a variable, say `intResult`. Then, at the end of the handler, put: Form2.lblResult.Caption = intResult Form2.Show The first line actually sets the value that will …

Member Avatar for AndreRet
0
199
Member Avatar for Nutster

I just noticed that my posting level went from "Poster in Training" (or something like that) to "Junior Poster". Is there a list around of the requirements for what posting level title?

Member Avatar for Reverend Jim
0
158
Member Avatar for VEL Hassan

Open a terminal to get a command line interface. Please report the entire output of each of these command lines. Copy and paste everything if you can. dpkg -l > /dev/null; echo $? df -ha What program/method are you using to update Firefox?

Member Avatar for Nutster
-1
141
Member Avatar for penty.kn

Really all that is happening is that in the first form, the program is ignoring the passed parameter array. It is not true overloading as you see in Java or C++.

Member Avatar for Nutster
0
219
Member Avatar for Papa_Don

My suggestions for improving the code as given: Keep only the minimum needed code inside the loop; everything else should be placed before or after the loop. In particular, move the code that opens the StreamReader before the loop. You have it restarting the file each time through the loop, …

Member Avatar for TnTinMN
0
618
Member Avatar for McLaren

The command to search for packages is `apt-cache search`, not `apt-file`. It does not need root permission to run, unlike `apt-get`. According to the instructions of the page you gave, `auto-apt search` would work for this utility.

Member Avatar for McLaren
0
677
Member Avatar for Hyshien

Please post what code you have already and we will give you some advice on fixing what you have. That said, depending on which system calls and other functions you have available with your C/C++ compiler system, you can look at `sleep()` or similar function calls to set a delay.

Member Avatar for Hyshien
0
99
Member Avatar for Chan23v

Are the various lists supposed to be syncronized? That is, are the same length, and corresponding elements of each list refer to the same thing or event? If so, you might want to consider using a class that incorporates all that information and then make a *list* or *map* of …

Member Avatar for Nutster
0
197
Member Avatar for can-mohan

This is actually a dangerous situtation. The pointer `a` is expecting to point to an existing object of class `derive2` or one of its derived classes, but you have it pointing to essentially a random point in memeory, because you have not initiallized the pointer. You have actually **not** created …

Member Avatar for can-mohan
0
175
Member Avatar for wallet123

That kind of error does indeed indicate that your computer does not have something installed that the upgraded package depends on. First make sure that you have updated the repository lists on your computer. `sudo apt-get update && sudo apt-get upgrade` If you still get the message that some packages …

Member Avatar for naphets
0
536
Member Avatar for rotten69

> I want to disable unity interface on the side and have something like what I had in 10.10. Is that possible? That is exactly what I did when I installed 12.04 LTS on my Linux laptop. I installed the `gnome` package and then the next time I logged in, …

Member Avatar for Nutster
0
357
Member Avatar for <M/>

As an Ontarion (the most populus English speaking province of Canada) I speak pretty much just English, with really rusty French. So I guess I am generally unilingual. Now as far a programming languages.... I do have the ability/habit of picking up the accents of people I am listen to …

Member Avatar for Lucaci Andrew
0
419
Member Avatar for fyra
Member Avatar for Nutster

Recently, I saw somebody start a "Deal or No Deal" game in the Posting Games section. This got me thinking of writing a program to actually play the game based on the rules of the show. So I spent a couple of hours writing this in ANSI-C. I probably should …

Member Avatar for Nutster
0
350
Member Avatar for liran

You could try: #/bin/sh yes > /tmp/tmpout command < /tmp/tmpout rm /tmp/tmpout You could even put it in a shell script, but then you could go back to using the pipe then as well.

Member Avatar for rubberman
0
1K
Member Avatar for green-script

Most Linux distros, including Opensuse, have an SFTP/SSH server called OpenSSH installed and active by default. An FTP server and a telnet server are available for download and installation but they are less preferred because they are less secure and have fewer features. You would have to set these up …

Member Avatar for Nutster
0
810
Member Avatar for VEL Hassan

I upgraded my old laptop, which does not support PAE, by downloading and using the 12.04 LTS **mini** installer. It will download what it needs from the internet, including the non-PAE generic kernal, from the repositories, so everything will be up to date. Just make sure you have a way …

Member Avatar for Nutster
0
177
Member Avatar for alaa sam

Boot to Mint. Make sure you have `grub-pc` package installed. Run `sudo update-grub` from the command line in a terminal. This should detect which operating systems are installed and update the boot list accordingly.

Member Avatar for Nutster
0
136
Member Avatar for Ancient Dragon

In ANSI-C++, you can use the vargs mechanism. I have not tried this in MS-Managed C++. First, `#include <stdarg.h>` at the start of your source file that will be using this capability. Actually first, think, "Do I really need to do this, or am I just being lazy in my …

Member Avatar for triumphost
1
687
Member Avatar for ashine80

Because of the way that `pow` and `sqrt` are written internally, it is usually much more efficient to multiply doubles rather than using these functions for squaring operations. { Sum_of_sq1 = Side1*Side1 + Side2*Side2; Sum_of_sq2 = Side1*Side1 + Side3*Side3; Sum_of_sq3 = Side2*Side2 + Side3*Side3; if (Sum_of_sq1==Side3*Side3 || Sum_of_sq2==Side2*Side2 || Sum_of_sq3==Side1*Side1) …

Member Avatar for Nutster
0
301
Member Avatar for chocomilk

Please give more details. What programming features are you using? What code is not working the way you expect? Please post the suspect code if you want help with it.

Member Avatar for chocomilk
0
245
Member Avatar for chdboy

When you create a data adapter, it knows that it is dealing with "Table", so you have to tell it to map that internal "Table" to your table, or as you have seen, things don't work too well; it tries to access your database object called "Table", which is not …

Member Avatar for Reverend Jim
0
859
Member Avatar for meenal9

Reverse the order of an array, perhaps? Please show what you have tried already to identify when a number is received as a binary value or a decimal one. We can then give you refinements of your idea. Read your notes from class and your textbook, if you have one, …

Member Avatar for meenal9
0
288
Member Avatar for rahulswr

You can call the `Sub Form_Enter` from your `Sub Form_Load`; just pass the `sender` and `e` you got from the function call. `Form_Enter(sender, e)`

Member Avatar for tinstaafl
0
139
Member Avatar for G_Waddell

You might want to change `Do While Not afile.EndOfData` to `Do Until afile.EndOfData` One less operation, making it easier to read and maintain, and maybe a little faster. Also, in your `Catch` block, I would use `Continue Do` instead of `Exit Do`. Just because one line is messed up does …

Member Avatar for Nutster
1
5K
Member Avatar for mitchstokes225

First of all, in your CheckChanged handlers, check to make sure the option button/radio button has a value of 1. If 0, then this indicates that the current button is losing a previous selection. If you don't do this, you will generate unnecessary random numbers and may set the random …

Member Avatar for Luc001
0
490
Member Avatar for acerious
Member Avatar for vijayan121
0
142
Member Avatar for needhelpalways
Member Avatar for Nutster
0
299
Member Avatar for Nutster

If am writing a VB.Net module for a project I am working on and have decided to try out different ways of doing some things, without getting rid of the older code that worked. I am selecting between these methods by setting a `#Const` at the beginning of the Module …

Member Avatar for john.knapp
0
193
Member Avatar for lulu79

You are assigning, not appending. Use **&=** instead of **=** to append the given string literal to the string variable in question. By using equals assignment, you keep replacing the string variable, so only the last assignment survives. Watch your brackets. In line 21, you have too many closing brackets …

Member Avatar for lulu79
0
909
Member Avatar for mitch_oso

What kind of errors are you getting? How does it not work? What version of Access are you using? Data Access Pages only exist in Access 2003 and 2007.

Member Avatar for Nutster
0
225
Member Avatar for Nutster

What is the recommended way to make changes to a code snippet that I have posted after the half-hour edit period is over? Would it be to add another posting with the new code or make a new posting and somehow invalidate the original, or could the edit period be …

Member Avatar for Dani
0
268
Member Avatar for Monkey101

Do you mean you want to scramble the order of things in an array, like shuffling a deck of cards? In that case go through the array a couple of time, swapping each element with one that has been randomly chosen from elsewhere in the array. That ought give you …

Member Avatar for Nutster
0
90
Member Avatar for Mike Askew

I would like to suggest a second button for **Cancel** beside the current **Submit**.

Member Avatar for Ancient Dragon
0
164
Member Avatar for Reverend Jim

I am hearing on the radio this morning that Long Island and Manhatten took the brunt of the storm. The subway appears to be flooded as well. New Jersey is not doing too well either. Here in the Toronto area, we had only one fatality. My prayers are with the …

Member Avatar for LastMitch
0
93
Member Avatar for Mgundo

In VB.Net, the lower bound of an array is always 0, so you could change that. You are missing an opening parenthesis in front of UBound, or get rid of the closing bracket after the +1. After the +1), there should be a new line; the assignement should be on …

Member Avatar for Nutster
0
125
Member Avatar for dnyaneshwari.phansekar

Make sure that the machine with the weird behaviour has all the latest Windows Updates. What is different about that one machine? Does it have something installed that no one else does? Is it missing something that everyone else has? Does restarting the application on any of the other computers …

Member Avatar for Nutster
0
110
Member Avatar for firdousahmad

There are a few methods for Structures, but there is more support for Classes. The easiest is to just assign the elements one at a time. Dim empTest As Employee empTest.inta = 1 empTest.strs = "Bill White" To create an initializer, you need to create a Sub New and pass …

Member Avatar for firdousahmad
0
247
Member Avatar for jontennyeah

What about not adding the record to the listview if the Attendance = "OUT"? That way, the user is not tempted to choose an invalid entry.

Member Avatar for Begginnerdev
0
94
Member Avatar for cody.reddoor

When you say your function will return a string, you need to return a string in every execution path. You need to return the result of the concatenation to the calling function. Also, take the return values from the recursive calls and concatentate them to this call's return value. I …

Member Avatar for Taywin
0
283
Member Avatar for cmstoner

What is the value of *custstr* when you get this error message? I think the **SELECT** statement may be malformed. Try using **VALUES** instead. BTW, this is VB.Net, not VB4/5/6; please post in the correct forum for a faster and more accurate response.

Member Avatar for kRod
0
281

The End.