Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
10
Posts with Upvotes
9
Upvoting Members
9
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Commented Posts
1 Endorsement
Ranked #858
Ranked #1K
~38.1K People Reached
Favorite Tags
c++ x 18
php x 11
c x 7
java x 6

50 Posted Topics

Member Avatar for Andrew_45

Testing takes time, but one simple test can find a lot of problems like fake sticks. Just write the three byte pattern 0x55AAFF over and over, and then verify it. If it is a fake stick, the 3 byte pattern will go wrong. To speed writing an checking, you can …

Member Avatar for David_50
0
445
Member Avatar for rubberman

When you talk about executing code, php loads the server but ecmascript loads the clients, which is better for scaling. However, you have to cost out the amount of code and supporting data you are shipping, for cpu speed is still much cheaper than bandwidth.

Member Avatar for TexWiller
3
2K
Member Avatar for vegaseat

Print %, as 100*(sorted size/total size)^2, since simple bubble sort effort is n^2 scaled.

Member Avatar for David_50
5
745
Member Avatar for ann123

It seems you have the deck be any stack of cards, and many decks, so it is hard to tell if all cards are still in some deck. Shuffling is faster/free of dups if you rand times numner of cards left to pick the next card from a deck originally …

Member Avatar for sandeepjkl
0
149
Member Avatar for batoolhussain

Location as URL or path on server? You need to query it as a URL inside an <IMG HREF="..."> to get the browser to pick it up. You might need to create a service to get the file from path to URL, if it is a path. If you want …

Member Avatar for David_50
0
193
Member Avatar for Sen_1

Why the .strWhere, when 'where ... between' already in SQL? Is it just a title, since it is not a legal SQL 'IN'? Id the input date in a form native to this SQL engine? Try "YYYY-mm-dd HH:MM:SS.ssssss" (ISO date).

Member Avatar for David_50
0
164
Member Avatar for ramsiva

Excel stores dates as floating point *days* since their epoch *1900* (not the unix *1970* epoch in *seconds*). Some adjustment is required, both in scale and in offset. You don't need a date diff tool, just the right constants for multiply (86400 sec/day) and subtract (days, 1900 to 1970 = …

Member Avatar for David_50
0
135
Member Avatar for diafol

We configured our RDBMS with a flat file or pipe as a selectable table, so we could do an insert-select and just write to the pipe all the data we wanted to insert. We did this with the combination of UDFs and a stored procedure that generated the rows. Each …

Member Avatar for diafol
4
12K
Member Avatar for jephthah

Now, if stdin is a pipe or such, a read() too big will stall, so many apps read() one byte at a time to get earlier access to input.

Member Avatar for David_50
0
6K
Member Avatar for ms95

You can sort as you go, manually or using a sorted container like tsearch, or sort later, like with qsort() or popen( "sort", "w" ). http://linux.die.net/man/3/tsearch http://linux.die.net/man/3/qsort http://linux.die.net/man/3/popen

Member Avatar for ms95
0
634
Member Avatar for Kamal_6
Member Avatar for nhiap6

Every read overwrites the prior read. Try read and print. Does read() the method produce a null term string, or return a size somewhere? http://www.cplusplus.com/reference/istream/istream/read/ inherited from http://www.cplusplus.com/reference/fstream/ifstream/ No, no, so I would avoid it, or use the supporting calls that tell you what will be read. How were the …

Member Avatar for David_50
0
296
Member Avatar for Learner010

A simple way to design a loop is to continue until you are about to repeat a step, and then add the loop and adjust any calculations for changing variables within the loop. Next, decide where to exit and insert an "if ( conditons ) break, goto or return". Be …

Member Avatar for Markland
7
704
Member Avatar for jonathan.paul.7543

You are talking about keeping the book, just like a stock exchange or a hotel clerk. The book is a durable database of rooms and for each room, an ordered list of times booked. The book needs to be cleaned periodically to remove/archive expired data. The book needs locks so …

Member Avatar for David_50
0
1K
Member Avatar for anandhachandru

You need a reverse or de-compiler that meets or exceeds the original version. You will probably get replacement names for almost everything not a native or well known API class, including language primitives, and then only the class name will be right, not the instance or object reference name. For …

Member Avatar for anandhachandru
0
625
Member Avatar for cambalinho

Images are read by the constructor as each instance is instantiated, and you handle the images by pointer assignment, destroying them when done.

Member Avatar for Schol-R-LEA
0
298
Member Avatar for Yardood

All programmers work in pseudo code in their heads, with loosely defined objects and containers, until they decide on the flow, steps. Final steps in this process are minimalizing the processing, while retaining clarity of what is happening. For instance, in designing a sort, one might first read N items …

Member Avatar for Yardood
0
162
Member Avatar for marcelmarcelmarcelmarcelmarcelmarcelmarcelmarcel

First, in real life one does not use linked lists, double or single, for sorting. You can achieve that by using a tree container. The exercise id good for teaching you how much overhead is in the misuse of this container! This code does not sort on insert, it sorts …

Member Avatar for David W
0
2K
Member Avatar for Yara Emad

Seems like you could get these stats char by char; stats on unique words used and each word frequency are what demands tokenizing words.

Member Avatar for David W
0
488
Member Avatar for Huseyin_1

Your first question is, is this a stateless server? In a stateless server, the storage of all intermediate state is achieved by sending it back to the client, which reiterates it on the next service request, like with browser cookies or embedded variables in dynamically generated response forms. The stateful …

Member Avatar for David_50
0
349
Member Avatar for ivel
Member Avatar for Jack_11

Yes, but the IT world has many varied roles. You might be a great programmer given a design or requirement, but would you be able to do the business analysis to write the requirement, design? DBA work might bore you to tears. It's a good direction, and talent is great, …

Member Avatar for <M/>
0
670
Member Avatar for manalibhadula

Accurate comparison might take advanced APIs, to compare workbooks sheet by sheet. For each sheet, it might be easier to convert the sheet to CSV or tab separated text and use a text comparison tool. There are free command line tools to do that. Do you want to detect styling …

Member Avatar for David_50
0
104
Member Avatar for Rahul47

Or you can just walk the string from start to end, extracting the digits and detecting the spaces. But for class, tokenizing is popular (but also a popular way to get a SEGV fault, so handle pointers like knives). I always preferred non-destructive parsing using strptok() or the like. Are …

Member Avatar for Rahul47
0
214
Member Avatar for Jack_11

Division of labor: the O/S provides support services that could fatally cluttter an application. However, you can mmap() your own files and have direct access to VM. This is especially nice in UFS where you can have gaps in the file data without pages of disk, supporting sparse arrays.

Member Avatar for mike_2000_17
0
281
Member Avatar for amatsas

Which assembly language is this? Every CPU has its own. Strings are arrays of characters, and depending on language/code a character may take one or many bytes. Are the strings coming form i/o? are they null terminated or of known length? What character set are they in? USASCII/iso8859-1/latin-1/EBCDIC/utf8/unicode all use …

Member Avatar for David_50
0
116
Member Avatar for rtipton

I didn;t know html had a graph side, but there is always the use of characters in a fixd pitch area like <PRE>. I did Google up this: http://www.selenic.com/pipermail/mercurial-devel/2014-June/059722.html http://www.gerd-tentler.de/tools/phpgraphs/

Member Avatar for rtipton
0
179
Member Avatar for littlesanto

GNU date allows you to do clock relative input delta, but to get the output onto the command line, use "\`cmd\`" or "$(cmd)". The latter tolerates nesting, is good for ksh & bash. The former is legal in sh, too. You need a + at the front of any format. …

Member Avatar for David_50
0
137
Member Avatar for KIMSOO

Assuming this is a C++ library API, you either instantiate an object directly with new or call factory static methods that return an object instance. You have to read the docs or code to figure out how to use it. Of course, you need to #include the header(s), tell make …

Member Avatar for David_50
0
320
Member Avatar for MasterChat
Member Avatar for razstec
Member Avatar for Betty96
Member Avatar for chrisschristou

Gamers want fastest response on single thread, and cover single core CPUs or dual core systems, high clock rates. Geeks might go for max total power, which is usually achieved with more cores. I have found that I live with the CPU I buy, as faster CPUs often need new …

Member Avatar for David_50
0
223
Member Avatar for craig.m.farish

Well, to process the xml you need either a web service or a ECMA/JAVA-Script in the web page. The web service could be php, asp, jsp, CGI . . . .

Member Avatar for JorgeM
0
121
Member Avatar for Pintu82
Member Avatar for razstec

PERL has Excel extensions, or one of the MS scripts like VB. You might get this to solve the excel side of the problem: http://wizard.ae.krakow.pl/~jb/xls2txt/ or https://github.com/hroptatyr/xls2txt/blob/master/xls2txt.c Loose requirements: is the Excel file just one worksheet?

Member Avatar for David_50
0
60
Member Avatar for Santanu.Das

I wrote a strings merge sort as a way to optimize cache hits: Consider a container of N objects to contain N sorted strings of objects of length one, which you build as you read input. Read two and insert into the first two elements of an array of containers. …

Member Avatar for David_50
0
524
Member Avatar for AQWst

So, you need to search the strings in each cell for the delimiting character, then do a substring to get the part you want, and concatenate the substrings. I bet there is a char index function and a substring function - anticipation, since Excel is like SQL on training wheels. …

Member Avatar for ddanbe
0
273
Member Avatar for David_50

I worked for 20 years in hardware and twenty odd now in software, so change is an old friend. I consult on UNIX/LINUX to a variety of industries, write lots of bits for my own needs, love to help others over their hurdles.

Member Avatar for JorgeM
0
230
Member Avatar for Jesse_4

Customers need to be numbered and put in waiting room status, and then as windows are free, assigned to windows sequentially. One behavior is the number and add to tail (take a ticket), and the other is to read and delete from head (now serving #N). Now, the waiting room …

Member Avatar for David_50
0
1K
Member Avatar for Diellza

The algorythm is pretty simple. The assumption is that there are many duplicate keys, so you can count each and deliver them, a bit like loading shelves. Each key has a first position in the output array discovered by scanning, counting, adding. As items are positioned in the output, the …

Member Avatar for David_50
0
700
Member Avatar for safeer008

Design a generic table so users can hide and rearrange columns, which sorts left to right, reverse on second click of any column. Design it to have filters so the row count under view can be reduced. Design it to freeze panes so they can still access col/row headers when …

Member Avatar for mattster
0
1K
Member Avatar for Paul_29
Member Avatar for newbie14

Programmers love to write new, but better is the enemy of good enough. Make a business case. What is the cost to maintain (finding resources with old/diverse skills), the performance limits (hard to pin down as HW gets faster all the time). How big is the problem you are fixing. …

Member Avatar for newbie14
0
165
Member Avatar for J.C. SolvoTerra

Delete cascade prevents orphans, not childless parents. If you delete the parent, all children get deleted. Deleting children is just life. You can develop a trigger that for child deletes, deletes the parent if no other children exist. I am not a fan of triggers and cascades, preferring trusted code …

Member Avatar for David_50
0
335
Member Avatar for sahs1hdv

Back to HTML 101? You select the destinations, wrap the graphic and text for it in <A href=where_to_go>...</A>, generating a dynamic <TABLE> of destinations in whatever geometry you desire. Make the graphics adjust width to a reasonable % for the column count. Essentially the same thing for hotels at the …

Member Avatar for David_50
0
125
Member Avatar for asareakoto.daniel

Use Google Drive as your Cloud? Speak about server based monitoring of clients for viruses, hacks and rootkits. Windows servers are higher cost and risk, cna you do all LINUX? Have servers monitor each other. Use servers as brouters so they feel they are necessary? Lots of secure wifi, perhaps …

Member Avatar for JorgeM
0
330
Member Avatar for Olaniyi

It depends on the database underneath. Sybase has sp_help, is it Oracle or DB2 that does DESCribe? I use free SQuirreL and free JDBC adapters for all, and just look. I see there is low level support in their API: http://www.devart.com/dotconnect/universal/docs/MetaData.html

Member Avatar for David_50
0
105
Member Avatar for Diellza

Should not be hard. It resembles hash bucketing where the hash is just subject to a modulus before bucket selection. It has a bit of a string oriented flavor, as binary numbers have bit radix, but I guess the concepts apply: http://en.wikipedia.org/wiki/Radix_sort#An_example

Member Avatar for David_50
0
617
Member Avatar for ayesha.newtn

All circles are in the same 2 dimensional plane. Intersection is that there exists one, two or more points where the two circles intersect. if circle 1 is 1, 2, 25 and circle 2 is 3, 4, 24 then intersection is when x and y are the radius of each …

Member Avatar for David_50
0
208

The End.