Is it possible to determine the throughput of an application on a processor from the cycle counts (Processor instruction cycles) consumed by the application ? If yes, how to calculate it ?
Suppose I have a class
public class Foo
{
public Bar { get; set; }
}
Then I have another class
public class Gloop
{
public List<Foo> Foos { get; set; }
}
What's the easiest way to get a List of Foo.Bars?
I'm using C# 4.0 and can use Linq if that is the best choice.
My first thought was something like
Today I had something weird happen in my copy of Resharper 5. I have a class that looks like this:
public class Foo
{
public string Username { get; private set; }
public Foo (string userName) { Username = userName; }
public void Bar()
{
DoWork(Username);
}
public DoWork(string userName) { }
}
When I start to…
I'm trying to bring a C++ library into C#, so naturally I am trying to make a C++/CLI project.
In visual studio I created a new project (Visual C++ project, class library). I then tried to make a test class out of the pre-generated "Class1"
namespace Test {
public ref class TestIt
{
public:
void DoWork()
{
…
Hello everyone... I am working on an automatic image stitching algorithm using MATLAB. So far, I have downloaded a source code much like the one that I had in mind and so, I'm currently studying how the code work.
The problem is, when stitching two or more images together, their color intensity will most probably be different from each other so…
I have a set of image files, they are generally very small, between 5k and 100k. They can be any size though, upwards of 50mb but this is very rare. When these images are put into the system they are not ever modified. There is about 50 TB of these images total. They are currently chunked and stored in BLOBs in Oracle, but we want to change…
A while back I ran in to a problem where after clicking an anchor with "javascript: void(0)" events just stopped firing. I read that following a link puts the page in a different state and in that different state events don't fire. Even though the link is not real, it sometimes confuses IE. Anyway, I removed the "javascript: void(0)"'s and…
Okay im using a snippet I found on google to take a users uploaded image and put it in my directory under Content
But Im worried about duplicates so I was going have it upload the image as a Random number
well here is my code you can probably understand what im going for through it anyways
<label for="file">Profile…
Earlier this year, I wrote an article series where I talked about developer’s life and compared it with Superhero. I have got amazing response to this series and I have been receiving quite a lots of email suggesting that I should write more blog post about them. Currently I am not planning to write more blog post but I will…
I have one computer running Ubuntu 10.04, and is running Vino, the default VNC server.
I have a second Windows box which is running a VNC client, but does not have any X11 capabilities. I am ssh'd into the Ubuntu host from the Windows host, but I forgot to enable VNC access on the Ubuntu host.
On the Ubuntu host, is there…
When the ntpd daemon is running, the file: /var/lib/ntp/ntp.drift gets updated periodically. Example:
17:20 hostname 118 ~> ls -l /var/lib/ntp/ntp.drift
-rw-r--r-- 1 ntp ntp 7 May 20 16:46 /var/lib/ntp/ntp.drift
# So it looks like it was last updated ~34 minutes ago
The file has one number in it, for example, looking…
In the future a young couple reach a parting of the ways because the young man can not handle the fact that she has a robotic arm. The bitterness of the break-up and bad treatment from her fellow humans lead to a dark future 40 years later where robots are relentlessly hunting and killing humans. Can the man who started her…
In der Microsoft Welt wohlbekannt, in der Oracle Welt nur ein Schulterzucken hervorrufend - die sogenannten Scripting Guys. Wie der Name bereits vermuten lässt, geht es in deren Hey, Scripting Guy! Blog um Scripting. Und damit natürlich um die Windows PowerShell. Ja, die Zeiten des DOS-Kommandofensters und Batch-Dateien ist…
Python seems all the rage these days, and not undeservingly - for it is truly a language with which one almost enjoys being given a new problem to solve. But, as a wise man once said (calling him a wise man only because I've no idea as to who actually said it; not sure whether he was that wise at all), to really know a…
One hundred years ago, there were places on Earth that no man had ever seen. Today, a man standing in one of those places can instantaneously communicate with someone who may be strolling down the street on his way to lunch half way around the globe. Our world is shrinking and becoming virtual. It is a…
What are the default mounting options for a non root partition ?
The man entry for mount says ...
defaults - use default options: rw, suid, dev, exec, auto, nouser, and async.
... so that might be what we expect to see. But, unless I'm missing something, that's not what happens.
I have an ext3 partition…
It looks like some of the commands like lpr and lprm have broken versions that don't work with cups. These commands worked properly on 10.04.
lpr for cups has an -o option, but no lpr is intalled when cups is installed, and the lpr installed with apt-get install lpr does not have the -o option and does not…
Some simple predictions based on one fact: Rafa Benitez stays at Liverpool 1. Torres leaves for 60 million – destination Man City 2. Gerrard leaves for 30 million – destination Real Madrid – Mourinho gets his man 3. Mascherano leaves for 25 million – destination Spain 4. Riera leaves for…
Today we did another patch set update for Oracle VM 3 (3.0.3-build 227). This can be downloaded from My Oracle Support as patch ID 14736185. There are quite a few updates in here and I highly recommend any Oracle VM 3 customer or user to install this update.
This patch can be installed on top of Oracle…
What do you get when you cross classic video game themes with a club beat? These Subwoofer-maxing remixes take Link and Mario to the dance floor. Courtesy of NickplosionFX, the above video remixes The Legend of Zelda and Pac-Man with a healthy dose of back beat. Other offerings from 8 Bit Beats include…
I have one computer running Ubuntu 10.04, and is running Vino, the default VNC server.
I have a second Windows box which is running a VNC client, but does not have any X11 capabilities. I am ssh'd into the Ubuntu host from the Windows host, but I forgot to enable VNC access on the Ubuntu host.
On the…