Skip to content

u/jerryF

In this archive from Jan 2009 to Jul 2019

3
posts
51
comments
1
media
163
score

something so obviously trivial wouldn't be patentable

Softly bouncing overscroll got patented and was upheld despite of prior art, sadly. Word it correctly and "obviously trivial" may be your greatest strength. Then start by suing smaller outfits, when it pays off you go after bigger fish in a couple of years you'll be a millionaire ;-)

But jokes aside I totally agree. I fear what TPP will bring.

1 points

I saw a grizzled unixbeard do something similar many years ago

If he hasn't patented it, this may be your chance. Lots of companies out there using your invention without paying. That's not fair!

2 points

Truth to be told I wasn't the one who were supposed to do the database programming but circumstance forced it upon me. I did consult one of my friends about it but he basically said that I did it wrong but it was passable given the situation and that he didn't have the time clean it up.

Still I was surprised that the actual summing over approx 900 crosstabs each consisting of 1x2 variables with several different sums took about a second or less in php on a core2 laptop - for some reason it was slower on my shared host.

I guess the real culprit was to do with the amount of ram in the different stages.

1 points

In my experience you should do as little as possible in the database. It seems that summing can be done extremely efficient outside of the database but you may have to write some dedicated functions. That's what I did.

For instance I once had to generate a bunch of reports with a little under 1000 crosstabs in each with various summing (count, means etc.). I had the database make one big sort of all variables (many "union all"), then I had php iterating over this array doing all the summing etc. Finally I had a function iterating over the summed array making the output to the report.

There were around 12000 rows in the database for these reports.

At first I did all the work in the database and each report took up to 15 minutes to generate. After I changed it, it took consistently between 2 and 3 minutes, of which only about 5-10 sec were not spent in the database.

I guess you could do something similar, either throw the raw sorted data at the client and have javascript doing the final aggregates or perhaps doing some partial aggregate before it's transferred.

-1 points

You are correct:

  find /path/to/folder -name '*.part'

Will work as intended, or you can control output more by:

  find /path/to/folder -name '*.part' -printf "path: %h file: %f\\n"

The "-printf" commands has a lot of possibilities for formatting the output (in this case: %h=full path, %f=file name, \n=newline).

man find

is your friend

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.