If you get it, then flush stdout:
fflush(stdout);
Monthly Archives: July 2008
how to have shared memory for a fork in os x
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
rails woe
undefined method `url_for_file_column’ for #
for me meant “you upgraded your image processor–this is a link to the old style images!”
how to do speedy bulk updates in mysql
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
install rmagick in ubuntu
apparently here’s how
how to fix vista and make it fast
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
rails speedup link
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.
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
how to compile opendht bamboo
if you change a .java file within opendht, to ‘recompile it’ you actually run make from the root directory.
how to install g++ on planetlab
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]