Roger's woze

July 31, 2008

duplicated output when using fork

Filed under: Uncategorized — rogerdpack @ 11:39 pm

If you get it, then flush stdout:
fflush(stdout);

how to have shared memory for a fork in os x

Filed under: Uncategorized — rogerdpack @ 6:50 am

so say you want to fork and still share memory between child and parent?
Looks like it’s slightly different on OS X than Linux:

something like

*/
area=(shared_stuff_p)mmap(0,
sizeof(shared_stuff_t),
PROT_READ|PROT_WRITE,MAP_SHARED|MAP_ANON,
-1,
0
);

refs:

http://www.linuxforums.org/forum/linux-programming-scripting/106916-fork-common-variables-gnu-c.html

http://209.85.141.104/search?q=cache:qYkWXzCOanEJ:www.cs.brown.edu/courses/cs036/labs/overload.pdf+os+x+fork+shared+memory+mmap&hl=en&ct=clnk&cd=4&gl=us&client=firefox-a

July 30, 2008

rails woe

Filed under: Uncategorized — rogerdpack @ 12:25 am

undefined method `url_for_file_column’ for #
for me meant “you upgraded your image processor–this is a link to the old style images!”

July 29, 2008

how to do speedy bulk updates in mysql

Filed under: Uncategorized — rogerdpack @ 8:22 pm

looks like the best way is to create a temporary ‘you will match this eventually’ table, then with a single sql statement you can make the tables match. Then drop the temporary table.
Also, do bulk inserts into the temporary table. speedy inserts are bulk inserts, especially with active record.
There is a helper for active record bulk inserts. activerecord extensions.
There is a helper for cool looking active record find’s — english_like_queries: http://code.google.com/p/ruby-roger-useful-functions/wiki/EnglishLikeQueries

July 28, 2008

install rmagick in ubuntu

Filed under: Uncategorized — rogerdpack @ 8:15 am

apparently here’s how

July 26, 2008

how to fix vista and make it fast

Filed under: Uncategorized — rogerdpack @ 7:30 am

Well…I don’t really know the answer, but the advice here seemed to help.  For me it seemed that basically turning aero off did the trick.

Note: may want to do the other things mentioned, and maybe even profile your system looking for processes hogging memory or CPU, or causing lots of page faults, or performing lots of I/O Reads or I/O writes. [use the windows task manager for those -- ctrl alt delete + 'task manager'].

Ex: maybe disabling google desktop helps. Dunno.

GL

July 25, 2008

rails speedup link

Filed under: Uncategorized — rogerdpack @ 7:10 pm

Here’s another:

http://work.rowanhick.com/2008/02/12/how-to-avoid-hanging-yourself-with-rails/

wonder if it helps
=R

ruby class constants.

Filed under: Uncategorized — rogerdpack @ 12:28 am

class A < B
Online = A::IS_ONLINE
IS_ONLINE = true
end

Any guesses what A::Online is? Yep–you guessed it. Possibly false, depending on what it is set to in B. IS_ONLINE hadn’t been setup right, so it appeared that the class wasn’t getting the right constant value. My bad.
-R

July 22, 2008

how to compile opendht bamboo

Filed under: Uncategorized — rogerdpack @ 10:16 pm

if you change a .java file within opendht, to ‘recompile it’ you actually run make from the root directory.

July 20, 2008

how to install g++ on planetlab

Filed under: Uncategorized — rogerdpack @ 12:01 am

yum install gcc-c++
from
http://www.linuxforums.org/forum/redhat-fedora-linux-help/85370-please-help-me-install-g-compiler-fedora-6-a.html [from google search: how to install g++ on fedora]

Older Posts »

Powered by WordPress