45 Posted Topics

Member Avatar for Andrius_1

In a database, you can just keep the count of every part, and as the users take or return stock, the count changes. If you want to know about the activity, you can have a table of activities, which can either be the primary and the stock level is the …

Member Avatar for DGPickett
0
339
Member Avatar for dave.wright

Google sheets keeps track of all changes and who entered them, and allows multiple user concurrent access. An RDBMS app needs to know who is logged in to make changes, and could have a complete history as well as status (the latest history) rows and active (the status is active) …

Member Avatar for DGPickett
0
306
Member Avatar for Leomar_1

Hash tables are containers. Hashing creates an integer from other types, usually the characters of a key, where it represents the values and positions of those characters. One divides the hash by the bucket count to select a bucket, which is a simple container like linked list where you can …

Member Avatar for DGPickett
0
283
Member Avatar for (MeoW)

The major methods for image reduction in size are compression, like in jpeg, and resampling. Resampling may take something like a weighted average, which can make things muddy, or select the pixels that are closest to the original position, a center-of-pixel strategy where a minor artifact may grow in relative …

Member Avatar for DGPickett
0
1K
Member Avatar for Mike!23

DHCP operates a pool of IPs for clients that need them. Usage is a bit worthless unless they stay assigned a long time. As noted, the mac from the ethernet layer is a better id.

Member Avatar for DGPickett
0
263
Member Avatar for misstj555

The Securities/Stock trading crowd like c++ for the speed, and XWindows was there long before most others.

Member Avatar for DGPickett
0
1K
Member Avatar for ImmutableIcarus

The hollow diamond is about distance from center column and distance from center row; their sum s/b half the height to print. In this case, 3. So: for ( int c = 0 ; c < 7 ; c++ ){ for ( int r = 0 ; r < 7 …

Member Avatar for Reverend Jim
0
427
Member Avatar for Sappie

Maybe put the array and indexes in parens after the & ? Debug messages on stderr , which, unlike stdout, is unbuffered!

Member Avatar for DGPickett
0
262
Member Avatar for engr_3

There are just 4 rules to parsing a CSV: Commas separate fields Carriage return linefeed separates rows Unless inside “ But “” is a literal “

Member Avatar for DGPickett
0
317
Member Avatar for Himanshu_13

A palindrome check should be a loop through the first half of the string or 1/2 less checking the mirror byte for a match. To make it a number check, filter for numbers along the way or format number types to a string. For instance, for 9 places check 1 …

Member Avatar for DGPickett
0
285
Member Avatar for Edy_3

JDBC tools like SQuirreL and jisql let you extract schema and data. I like to use LINUX sed to pipe a select into an insert, no intermediate files.

Member Avatar for DGPickett
0
544
Member Avatar for mnyirenda

To read a file, you need to declare an ifstream, open it, read from it using using >> into the appropriate types and check for eof(), bad(), fail() to detect errors and end of file. Note that >> at EOF sets fail (you didn't get what you asked for) as …

Member Avatar for mnyirenda
0
354
Member Avatar for Sappie

Comparing null terminated char arrays is: #include <string.h> int strcmp(const char *s1, const char *s2); but for known length unterminated strings: #include <string.h> int memcmp(const void *s1, const void *s2, size_t n); Both return an integer less than, equal to, or greater than zero if s1 is found, respectively, to …

Member Avatar for iJimJones
0
563
Member Avatar for Sappie

The keyboard and monitor data is 'cooked', not raw, unless you turn on raw orocessing like with stty in UNIX. The enter key is a carriage return 0x0D or ctrl-M, but is cooked into carriage return and linefeed 0x0D0A ctrl-M ctrl-J. On the teletype, one makes the typehead go to …

Member Avatar for DGPickett
0
450
Member Avatar for MosaicFuneral

For masking, write the random numbers directly, not as ascii. Write with fwrite() so each number is buffered into large block writes. Note that RAND_MAX is just 31 bits: /usr/include/stdlib.h:#define RAND_MAX 2147483647 You can write 3 bytes at a time to have pure randomness. Remember that the bytes you want …

Member Avatar for DGPickett
2
3K