BlogsAlgo Puzzle - Product of Elements of an ArrayI came across this interesting problem of coming up with an algorithm that would compute, for each element of an array, the product of all other elements in that array, in linear time without using the division operator (or implementing a division algorithm.) A solution is to traverse left to right computing the growing product, and then traverse right to left computing the growing product and multiplying it with the result from the previous traversal. I.e., Given,P Q R SCompute, 1 P PQ PQR x x x x QRS RS S 1 ------------------- QRS PRS PQS PQR Implemented in python,
def elProd( A ):
result = []
prod = 1
# for i from 0 up to len(A) - 1
for i in range( len( A ) ):
result.append( prod )
prod = prod * A[ i ]
prod = 1
# for i from len(A) - 1 down to 0
for i in range( len( A ) - 1, -1, -1 ):
result[ i ] = result[ i ] * prod
prod = prod * A[ i ]
return result
Unlimited Concurrent Remote Desktop Connectionsiv been searching the web for months tring to find a modified termsrv.dll in
order to allow multiple concurrent remote desktop connections. after months of
looking, i have found little parts of what we need to modify in XP along with
replacing the original termsrv.dll file to make unlimited RDP work. i have put
together an easy install pack to make patching for unimited RDP quick and
simple.
Subversion: Branching and CommittingOftentimes you have changes in your working copy that you'd like to preserve but not taint the trunk with it. Maybe you'd like to work on it later, or perhaps you'd just like to branch off features so that you don't interfere with a trunk moving to stable. The trouble is, you didn't decide beforehand that you have to create a branch. How do you solve this problem? Enter Here's how you do it:
You'd still be in the old working copy however, but one that points to the new svn url. That's confusing, so as soon as you commit your changes,
A Nice C++ Linked List
I had reason to brush up on my C/C++ skills a bit and did something I've wanted to do for some time: implemented a nice encapsulated linked list. Read more for the source.
Super Cavitation - The New Generation Speed ResearchI just happened to watch a telecast on Discovery India on a topic called Speed with modern research and one of the ideas that predicted much result was Super Cavitation. Supercavitation is the use of cavitation effects to create a large bubble of gas inside a liquid, allowing an object to travel at great speed through the liquid by being wholly enveloped by the bubble. The cavity (i.e., the bubble) reduces the drag on the object and precisely this makes supercavitation an attractive technology: drag is normally about 1,000 times greater in water than in air. The potential of this technology being relatively frictionless linear as well as radial motion in an environment of much high density and hence much high drag.
Inventor: W. Daniel HillisI have always dreamed of becoming an Inventor, have a lab of my own with all sorts of esoteric gadgets and all the time in the world to create whatever I want. At 46, Daniel Hillis is doing exactly that. An American inventor, he is living his dream - conjuring up whacky ideas and implementing them in his uber-cool lab. He is also an author, a scientist, and an engineer.
The Two Schools of CryptographyTechnology Research News (TRN) is featuring an article on the two schools of cryptography, based on the two basic methods of cryptography, namely, computational and probabilistic. Two schools of cryptography (TRN How it works)
Threads Cannot Be Implemented as a LibraryA paper by Hans Boehm demonstrates why vicarious multithreading, through library implementations (such as Pthreads), in languages like C and C++ can never be 100% correct.
UNIX SwappingI was reading though a threaded discussion over at Kerneltrap.org, under the post "Swap Pre-Fetching" and found this really neat explanation of how swapping relates to files and inodes. Especially enlightening as to how a file backed (mmap()) swapping system works if the underlying executable itself is upgraded when the executable is running.
Introduction to the Xen Virtual MachineXen is the new kid in the virtualization arena, receiving well deserved attention from the industry and the academia, with some really big players betting on it. Xen is an open source virtual machine monitor, or hypervisor, developed by the University of Cambridge. It has a design goal of being able to run 100 full featured OS instances on a single typical computer. Xen provides secure isolation, resource control, quality of service guarantees, and live migration of virtual machines. Linux Journal is featuring an introductory article on Xen and its design. A nice, moderately technical read: Introduction to the Xen Virtual Machine
|
TopicsRecent blog posts
|