"She tells me one day her husband is a really great guy because he spends his free time helping to "clean up the internet."
I ask her what she means and she told me she found a bunch of porn in husbands web browser history. He informed her that he goes to porn sites to download the porn off of the internet servers onto his computer so that he can delete it. Apparently there's a lot of porn on the internet, but he was trying to do what he could to remove as much of it as possible - for the children and all...
She actually believes that he is doing this and uses it as a bragging point to show what a great guy her husband is in conversations."
http://www.reddit.com/r/AskReddit/comments/mk7yn/managers_supervisors_and_hr_people_of_reddit_tell/c31lp65
Monday, November 21, 2011
Friday, November 18, 2011
How to sign device drivers with a test certificate
This: http://msdn.microsoft.com/en-us/library/bb530195.aspx has a long, unwieldy explanation.
Here is a much simpler, step-by-step protocol:
1) Run the following from an elevated CMD window (RunAs Administrator):
bcdedit /set testsigning on
bcdedit /set nointegritychecks on
2) Reboot
3) Make a certificate. From a DDK command line window, type:
makecert -r -pe -ss MyTestCertStore -n "CN=MyTestCert" mytestcert.cer
4) From an elevated CMD window
certmgr -add mytestcert.cer -s -r localmachine root
certmgr -add mytestcert.cer -s -r localmachine trustedpublisher
5) From certmgr window that just opened in step one or two (or type certmgr):
a) Right click on Trusted Root Certification Authorities -> All Tasks -> Import
b) Navigate to the cert file you have just created in step (3) (mytestcert.cer).
c) Say "yes"
6) To sign the driver:
signtool sign /n MyTestCert /s "MyTestCert" yourdrivername.sys
Why can't our documentation people produce something similar???
Here is a much simpler, step-by-step protocol:
1) Run the following from an elevated CMD window (RunAs Administrator):
bcdedit /set testsigning on
bcdedit /set nointegritychecks on
2) Reboot
3) Make a certificate. From a DDK command line window, type:
makecert -r -pe -ss MyTestCertStore -n "CN=MyTestCert" mytestcert.cer
4) From an elevated CMD window
certmgr -add mytestcert.cer -s -r localmachine root
certmgr -add mytestcert.cer -s -r localmachine trustedpublisher
5) From certmgr window that just opened in step one or two (or type certmgr):
a) Right click on Trusted Root Certification Authorities -> All Tasks -> Import
b) Navigate to the cert file you have just created in step (3) (mytestcert.cer).
c) Say "yes"
6) To sign the driver:
signtool sign /n MyTestCert /s "MyTestCert" yourdrivername.sys
Why can't our documentation people produce something similar???
Tuesday, November 15, 2011
The new Free Speech protocol
Citizen! It has recently come to our attention that you wish to exercise your first amendment freedoms. In order to ensure compliance with Free Speech Safety standards please obey the following rules to ensure that your protest in conducted properly.
Good luck with your free speech action!
http://www.reddit.com/r/politics/comments/mcsy3/occupy_wall_street_being_evicted_calls_all_hands/c2zw30v
- You can exercise your rights in a designated Free Speech Zone. Anyone who is caught outside specified zones participating in a free speech action will be beaten and jailed.
- You must apply for a permit to designate a Free Speech Zone. To apply for a permit please contact the Board of Permitting and Public Safety. It is expected that you will have your sanitation, safety, education, environmental impact and concessions permits before applying. Anyone found participating in a free speech action without a permit will be beaten and jailed.
- Free Speech Zones operate between the hours of 9am - 5pm, anyone caught participating in a free speech action outside of those times will be beaten and jailed.
- All citizens participating in free speech actions must be properly dressed to identify themselves to authorities, corporate representatives and interested third parties. These uniforms can be purchased at several Free Speech Distribution Authorities located throughout your community. Anyone caught participating in a free speech action without proper attire will be beaten and jailed.
- No items will be allowed to be carried into the Free Speech Zone. Anything that is not attached directly to your person or is out of compliance with the standard Free Speech Zone attire protocol will confiscated before entering the Free Speech Zone. Those caught with foreign items are subject to beatings and possible incarceration at the officers discretion. Any property confiscated will be promptly destroyed.
Good luck with your free speech action!
http://www.reddit.com/r/politics/comments/mcsy3/occupy_wall_street_being_evicted_calls_all_hands/c2zw30v
Saturday, November 12, 2011
How I Stopped Worrying and Learned to Love the OWS Protests
http://www.rollingstone.com/politics/news/how-i-stopped-worrying-and-learned-to-love-the-ows-protests-20111110
"I originally was very uncomfortable with the way the protesters were focusing on the NYPD as symbols of the system. After all, I thought, these are just working-class guys from the Bronx and Staten Island who have never seen the inside of a Wall Street investment firm, much less had anything to do with the corruption of our financial system.
But I was wrong. The police in their own way are symbols of the problem. All over the country, thousands of armed cops have been deployed to stand around and surveil and even assault the polite crowds of Occupy protesters. This deployment of law-enforcement resources already dwarfs the amount of money and manpower that the government "committed" to fighting crime and corruption during the financial crisis. One OWS protester steps in the wrong place, and she immediately has police roping her off like wayward cattle. But in the skyscrapers above the protests, anything goes."
"I originally was very uncomfortable with the way the protesters were focusing on the NYPD as symbols of the system. After all, I thought, these are just working-class guys from the Bronx and Staten Island who have never seen the inside of a Wall Street investment firm, much less had anything to do with the corruption of our financial system.
But I was wrong. The police in their own way are symbols of the problem. All over the country, thousands of armed cops have been deployed to stand around and surveil and even assault the polite crowds of Occupy protesters. This deployment of law-enforcement resources already dwarfs the amount of money and manpower that the government "committed" to fighting crime and corruption during the financial crisis. One OWS protester steps in the wrong place, and she immediately has police roping her off like wayward cattle. But in the skyscrapers above the protests, anything goes."
Wednesday, November 9, 2011
Puzzling heap performance in CRT under Visual Studio
So I'm running this app which does reasonable amount of allocations using standard CRT functions. It's compiled for release, but I was running it under Visual Studio. Absolutely terrible memory allocator performance, especially the one in free: 89 seconds to free just under a million structures (the app uses just two sizes - around 32000 2056 byte structures and about 900000 36 byte structures).
Generating: 1000000
Adding: 951 ms
Port: 10000, total ip entries: 994937, total memory used: 3673124
Entries at level 1: 128 (blanket: 0)
Entries at level 2: 32768 (blanket: 0)
Entries at level 3: 885384 (blanket: 3975)
Testing the ip ranges... 0
Testing ip ranges: 27378 ms
Total ips allowed across all ports: 2012537
Removing: 71355 ms
Port: 10000, total ip entries: 0, total memory used: 0
Entries at level 1: 0 (blanket: 0)
Entries at level 2: 0 (blanket: 0)
Entries at level 3: 0 (blanket: 0)
Fine, I replaced the allocator with my own, using fixed memory blocks (described here: http://1-800-magic.blogspot.com/2007/11/guerilla-guide-to-native-memory.html). The object removal time promptly dropped to just above 200ms. Ok. Then, on a hunch, I run this - with the standard CRT allocator - from the command line:
Generating: 1000000
Adding: 281 ms
Port: 10000, total ip entries: 994937, total memory used: 3673124
Entries at level 1: 128 (blanket: 0)
Entries at level 2: 32768 (blanket: 0)
Entries at level 3: 885384 (blanket: 3975)
Testing the ip ranges... 0
Testing ip ranges: 27831 ms
Total ips allowed across all ports: 2012537
Removing: 249 msPort: 10000, total ip entries: 0, total memory used: 0
Entries at level 1: 0 (blanket: 0)
Entries at level 2: 0 (blanket: 0)
Entries at level 3: 0 (blanket: 0)
Come on, Visual Studio guys. Release should mean RELEASE - not a debug heap!
Interestingly, I ran it under profiler after this, and the profiler does the right thing - it uses the fast heap. Otherwise the results would be really, really screwed. It's a good thing - if you happen to use the profiler or at least run it outside the environment before pursuing the problem that does not even exist!
Generating: 1000000
Adding: 951 ms
Port: 10000, total ip entries: 994937, total memory used: 3673124
Entries at level 1: 128 (blanket: 0)
Entries at level 2: 32768 (blanket: 0)
Entries at level 3: 885384 (blanket: 3975)
Testing the ip ranges... 0
Testing ip ranges: 27378 ms
Total ips allowed across all ports: 2012537
Removing: 71355 ms
Port: 10000, total ip entries: 0, total memory used: 0
Entries at level 1: 0 (blanket: 0)
Entries at level 2: 0 (blanket: 0)
Entries at level 3: 0 (blanket: 0)
Fine, I replaced the allocator with my own, using fixed memory blocks (described here: http://1-800-magic.blogspot.com/2007/11/guerilla-guide-to-native-memory.html). The object removal time promptly dropped to just above 200ms. Ok. Then, on a hunch, I run this - with the standard CRT allocator - from the command line:
Generating: 1000000
Adding: 281 ms
Port: 10000, total ip entries: 994937, total memory used: 3673124
Entries at level 1: 128 (blanket: 0)
Entries at level 2: 32768 (blanket: 0)
Entries at level 3: 885384 (blanket: 3975)
Testing the ip ranges... 0
Testing ip ranges: 27831 ms
Total ips allowed across all ports: 2012537
Removing: 249 msPort: 10000, total ip entries: 0, total memory used: 0
Entries at level 1: 0 (blanket: 0)
Entries at level 2: 0 (blanket: 0)
Entries at level 3: 0 (blanket: 0)
Come on, Visual Studio guys. Release should mean RELEASE - not a debug heap!
Interestingly, I ran it under profiler after this, and the profiler does the right thing - it uses the fast heap. Otherwise the results would be really, really screwed. It's a good thing - if you happen to use the profiler or at least run it outside the environment before pursuing the problem that does not even exist!
Tuesday, November 8, 2011
Monday, October 10, 2011
String-matching automaton
static void Main(string[] args)
{
if (args.Length < 2)
{
Console.WriteLine("Usage: {0} string_pattern string",
Environment.GetCommandLineArgs()[0]);
return;
}
string pattern = args[0].ToUpper();
string str = args[1].ToUpper();
// The automaton. Simple state machine that contains back-links to self-repeating
// patterns inside the pattern. This takes a long time to compute:
// O(pattern size cubed times size of the alphabet). This makes this algorithm
// not very practical in general.
const int alphabetLen = 'Z' - 'A' + 1;
int [,] transitionFunc = new int[alphabetLen, pattern.Length];
for (int stateIndex = 0; stateIndex < pattern.Length; ++stateIndex)
{
for (int ch = 0; ch < alphabetLen; ++ch)
{
string suffix = pattern.Substring(0, stateIndex) + (char)('A' + ch);
int stateTransition = Math.Min(pattern.Length + 1, stateIndex + 2);
string prefix;
do
{
--stateTransition;
prefix = pattern.Substring(0, stateTransition);
}
while (!suffix.EndsWith(prefix));
transitionFunc[ch, stateIndex] = stateTransition;
}
}
// The match.
int state = 0;
for (int i = 0; i < str.Length; ++i)
{
state = transitionFunc[str[i] - 'A', state];
if (state == pattern.Length)
{
Console.WriteLine("Substring found at " + (i - pattern.Length + 1));
break;
}
}
}
{
if (args.Length < 2)
{
Console.WriteLine("Usage: {0} string_pattern string",
Environment.GetCommandLineArgs()[0]);
return;
}
string pattern = args[0].ToUpper();
string str = args[1].ToUpper();
// The automaton. Simple state machine that contains back-links to self-repeating
// patterns inside the pattern. This takes a long time to compute:
// O(pattern size cubed times size of the alphabet). This makes this algorithm
// not very practical in general.
const int alphabetLen = 'Z' - 'A' + 1;
int [,] transitionFunc = new int[alphabetLen, pattern.Length];
for (int stateIndex = 0; stateIndex < pattern.Length; ++stateIndex)
{
for (int ch = 0; ch < alphabetLen; ++ch)
{
string suffix = pattern.Substring(0, stateIndex) + (char)('A' + ch);
int stateTransition = Math.Min(pattern.Length + 1, stateIndex + 2);
string prefix;
do
{
--stateTransition;
prefix = pattern.Substring(0, stateTransition);
}
while (!suffix.EndsWith(prefix));
transitionFunc[ch, stateIndex] = stateTransition;
}
}
// The match.
int state = 0;
for (int i = 0; i < str.Length; ++i)
{
state = transitionFunc[str[i] - 'A', state];
if (state == pattern.Length)
{
Console.WriteLine("Substring found at " + (i - pattern.Length + 1));
break;
}
}
}
Thursday, October 6, 2011
SleepSort
static void SleepSort(int[] args)
{
int count = 0;
TimerCallback t = (object o) =>
{
Console.WriteLine(o);
Interlocked.Increment(ref count);
};
foreach (int a in args)
new Timer(t, a, a * 1000, System.Threading.Timeout.Infinite);
}
SleepSort(new int[] {5, 3, 12, 10, 1, 2});
}
{
int count = 0;
TimerCallback t = (object o) =>
{
Console.WriteLine(o);
Interlocked.Increment(ref count);
};
foreach (int a in args)
new Timer(t, a, a * 1000, System.Threading.Timeout.Infinite);
while (count < args.Length)
Thread.Sleep(1000);}
static void Main(string[] args)
{SleepSort(new int[] {5, 3, 12, 10, 1, 2});
}
Wednesday, October 5, 2011
Code snippet: how to use Windows Task Scheduler from .NET
First, make a reference to TaskScheduler 1.1 Type Library in COM components.
Then:
using System;
using System.IO;
using System.Threading;
using TaskScheduler;
namespace TaskScheduleDemo
{
class Program
{
static void Main(string[] args)
{
if (args.Length > 0)
{
if (args[0].Equals("bing"))
{
for (int i = 0; i < 10; ++i)
{
Console.WriteLine("Bing!");
Thread.Sleep(1000);
}
return;
}
else if (args[0].Equals("install"))
{
Install();
return;
}
else if (args[0].Equals("remove"))
{
Remove();
return;
}
}
Console.Error.WriteLine("Usage: {0} {bing|install|remove}");
}
static private void Remove()
{
ITaskService service = new TaskSchedulerClass();
service.Connect(null, null, null, null);
ITaskFolder folder = service.GetFolder(@"\");
try
{
folder.DeleteTask(@"\Microsoft\Bing\Bing", 0);
folder.DeleteFolder(@"\Microsoft\Bing", 0);
}
catch (FileNotFoundException)
{
}
catch (DirectoryNotFoundException)
{
}
catch (System.Runtime.InteropServices.COMException cex)
{
// Something else is still there
if ((uint)cex.ErrorCode != 0x80070091)
Console.Error.WriteLine("Failed to remove task: {0}", cex.ErrorCode);
}
}
static private void Install()
{
ITaskService service = new TaskSchedulerClass();
service.Connect(null, null, null, null);
ITaskFolder folder = service.GetFolder(@"\");
ITaskFolder bing = null;
try
{
bing = folder.GetFolder(@"Microsoft\Bing");
}
catch (FileNotFoundException)
{
}
if (bing == null)
bing = folder.CreateFolder(@"Microsoft\Bing",
"D:(A;;FA;;;BA)(A;;FA;;;SY)(A;;GR;;;WD)");
ITaskDefinition td = service.NewTask(0);
td.RegistrationInfo.Description = "Bing!";
td.Settings.Enabled = true;
td.Principal.LogonType = _TASK_LOGON_TYPE.TASK_LOGON_INTERACTIVE_TOKEN;
IExecAction action = td.Actions.Create(_TASK_ACTION_TYPE.TASK_ACTION_EXEC)
as IExecAction;
string executable = System.Reflection.Assembly.GetExecutingAssembly().Location;
action.Path = executable;
action.WorkingDirectory = Path.GetDirectoryName(executable);
action.Arguments = "bing";
ITrigger trigger = td.Triggers.Create(_TASK_TRIGGER_TYPE2.TASK_TRIGGER_TIME);
trigger.StartBoundary = DateTime.Now.AddMinutes(1).ToString("o");
trigger.Enabled = true;
bing.RegisterTaskDefinition(@"Bing", td, 6, null, null,
_TASK_LOGON_TYPE.TASK_LOGON_INTERACTIVE_TOKEN, null);
}
}
}
Then:
using System;
using System.IO;
using System.Threading;
using TaskScheduler;
namespace TaskScheduleDemo
{
class Program
{
static void Main(string[] args)
{
if (args.Length > 0)
{
if (args[0].Equals("bing"))
{
for (int i = 0; i < 10; ++i)
{
Console.WriteLine("Bing!");
Thread.Sleep(1000);
}
return;
}
else if (args[0].Equals("install"))
{
Install();
return;
}
else if (args[0].Equals("remove"))
{
Remove();
return;
}
}
Console.Error.WriteLine("Usage: {0} {bing|install|remove}");
}
static private void Remove()
{
ITaskService service = new TaskSchedulerClass();
service.Connect(null, null, null, null);
ITaskFolder folder = service.GetFolder(@"\");
try
{
folder.DeleteTask(@"\Microsoft\Bing\Bing", 0);
folder.DeleteFolder(@"\Microsoft\Bing", 0);
}
catch (FileNotFoundException)
{
}
catch (DirectoryNotFoundException)
{
}
catch (System.Runtime.InteropServices.COMException cex)
{
// Something else is still there
if ((uint)cex.ErrorCode != 0x80070091)
Console.Error.WriteLine("Failed to remove task: {0}", cex.ErrorCode);
}
}
static private void Install()
{
ITaskService service = new TaskSchedulerClass();
service.Connect(null, null, null, null);
ITaskFolder folder = service.GetFolder(@"\");
ITaskFolder bing = null;
try
{
bing = folder.GetFolder(@"Microsoft\Bing");
}
catch (FileNotFoundException)
{
}
if (bing == null)
bing = folder.CreateFolder(@"Microsoft\Bing",
"D:(A;;FA;;;BA)(A;;FA;;;SY)(A;;GR;;;WD)");
ITaskDefinition td = service.NewTask(0);
td.RegistrationInfo.Description = "Bing!";
td.Settings.Enabled = true;
td.Principal.LogonType = _TASK_LOGON_TYPE.TASK_LOGON_INTERACTIVE_TOKEN;
IExecAction action = td.Actions.Create(_TASK_ACTION_TYPE.TASK_ACTION_EXEC)
as IExecAction;
string executable = System.Reflection.Assembly.GetExecutingAssembly().Location;
action.Path = executable;
action.WorkingDirectory = Path.GetDirectoryName(executable);
action.Arguments = "bing";
ITrigger trigger = td.Triggers.Create(_TASK_TRIGGER_TYPE2.TASK_TRIGGER_TIME);
trigger.StartBoundary = DateTime.Now.AddMinutes(1).ToString("o");
trigger.Enabled = true;
bing.RegisterTaskDefinition(@"Bing", td, 6, null, null,
_TASK_LOGON_TYPE.TASK_LOGON_INTERACTIVE_TOKEN, null);
}
}
}
Thursday, June 30, 2011
A quote
"Great minds discuss ideas; Average minds discuss events; Small minds discuss people."
-- Eleanor Roosevelt
http://www.quotationspage.com/quote/36354.html
Today US public discourse is almost entirely devoid of ideas. There aren't even all that many events being discussed. Instead, everyone is focusing on what Sarah Palin is doing.
-- Eleanor Roosevelt
http://www.quotationspage.com/quote/36354.html
Today US public discourse is almost entirely devoid of ideas. There aren't even all that many events being discussed. Instead, everyone is focusing on what Sarah Palin is doing.
Monday, May 16, 2011
Wednesday, May 11, 2011
Monday, April 25, 2011
A GUID, cheap!
Someone was selling them on eBay a while ago, but there's none available now. So I'm offering one of my own. Inexpensively!
http://cgi.ebay.com/new-freshly-generated-GUID-/320690777459?pt=LH_DefaultDomain_0&hash=item4aaaa8ed73
http://cgi.ebay.com/new-freshly-generated-GUID-/320690777459?pt=LH_DefaultDomain_0&hash=item4aaaa8ed73
Sunday, April 24, 2011
Sunday, April 17, 2011
Reddit on taxes
This is the original link:
http://www.reddit.com/r/AskReddit/comments/gs6ov/people_are_angry_the_ge_did_not_pay_us_taxes_but/c1px4sv?context=1
Saving the text for posterity (because who knows what Reddit's retention rules would look like in a year), because it deserves it.
By kleinbl00 (http://www.reddit.com/user/kleinbl00)
"I have a financial planner. He's a dyed-in-the-wool PNAC militant Republican, all the more ironic considering he's an Iraqi with family ties to Chemical Ali. I watched him give a seminar once where in one breathtaking sentence he managed to tie Rosie the Riveter to Osama Bin Laden and blame the rise of Islamic terrorism to the post-war appearance of women in the workplace. I mention this not only to illustrate that his mindset is very much not my own, but to illustrate exactly how far away it is from anything I would consider "progressive."
Yet he manages my money. And he manages it aggressively. When we had this come-to-jesus about philosophy he said "I'll tell you the same thing I told (a prominent liberal whose money he also manages). I don't make the laws. I just play by them. You can hate the policies as much as you want but if I leave money on the table, I'm not doing my job. What you do with it is up to you - give everything I save you to Greenpeace for all I care. But can we have an understanding that because the tax code is written for the rich by the rich, you'd be a fool not to play the game by our rules?"
We fully arrived in Bizarro-World when we were talking about how our current state and our former state don't grant the same professional rights to my wife (a naturopathic doctor) and that her scope of practice would be significantly curtailed compared to what she was used to. "The cheapest thing to do would be to hire a lobbyist and get the laws changed," he said. We just sort of stared at him, bug-eyed. Cheapest? "Well, you're talking a state law with a very narrow scope. We could probably overturn that for ten, twenty thousand dollars." It turns out he was speaking hyperbolically, but he wasn't far off. The list of lobbyists he showed us was the same as the list of lobbyists my wife's professional organization hired off of. His prices were off - maybe a factor of two, factor of three. Not a factor of ten.
Americans need to understand down to their very bones that their money is going to - and their country is being run by - people who know that an inconvenient tax law doesn't need to be suffered, it needs to be changed. These people know that if $200k of lobbying saves them $200m in taxes that lobbying is their most financially efficient tax strategy. Americans need to understand that the entire system is rigged against people who take the 1040EZ, who always get the Standard Deduction, who think that their $10k account on eTrade makes them a "player." The entire system is rigged so heavily against the individual with a middle-class income that the average taxpayer still thinks he's a small fish in a small pond - he doesn't even realize he's a goldfish in an aquarium bought and paid for by people whose fortunes dwarf his so extravagantly that scientific notation is necessary to illustrate the difference.
The AP ran a pie chart in 2001 that I saw in a newspaper once and haven't seen since. It broke down who, exactly, benefited from the Bush Tax Cuts - remember, back when you got a $300 check as pablum to get you to shut up? Prosperity for everybody, right?
That graph had a lot of stuff on it that wouldn't surprise you. "Businesses" got a big chunk of it. "The Middle class" got a tiny chunk of it. "The wealthy" got a big chunk of it. But way down at the bottom, next to a "2%" there was an asterisk. That asterisk, down in the footnotes, said "Samuel, John, Christy, Alice and James Walton."1
2% of the benefits of an entire national tax cut - about four billion dollars - went directly to five people. Who happen to own Walmart. They cut you a $300 check so yo wouldn't grumble about it. Each Walton, individually, got more tax cut than 2.5 million people, collectively. But it's okay, because you got an X-box.
That's the system we live in. And the people who have the most direct power to change it are the ones that are benefiting the most. Be angry at GE. Be angry at the tax laws. Be angry at the lobbyists. Be angry at the people taking advantage of it. If you aren't outraged, you aren't paying attention.
http://www.reddit.com/r/AskReddit/comments/gs6ov/people_are_angry_the_ge_did_not_pay_us_taxes_but/c1px4sv?context=1
Saving the text for posterity (because who knows what Reddit's retention rules would look like in a year), because it deserves it.
By kleinbl00 (http://www.reddit.com/user/kleinbl00)
"I have a financial planner. He's a dyed-in-the-wool PNAC militant Republican, all the more ironic considering he's an Iraqi with family ties to Chemical Ali. I watched him give a seminar once where in one breathtaking sentence he managed to tie Rosie the Riveter to Osama Bin Laden and blame the rise of Islamic terrorism to the post-war appearance of women in the workplace. I mention this not only to illustrate that his mindset is very much not my own, but to illustrate exactly how far away it is from anything I would consider "progressive."
Yet he manages my money. And he manages it aggressively. When we had this come-to-jesus about philosophy he said "I'll tell you the same thing I told (a prominent liberal whose money he also manages). I don't make the laws. I just play by them. You can hate the policies as much as you want but if I leave money on the table, I'm not doing my job. What you do with it is up to you - give everything I save you to Greenpeace for all I care. But can we have an understanding that because the tax code is written for the rich by the rich, you'd be a fool not to play the game by our rules?"
We fully arrived in Bizarro-World when we were talking about how our current state and our former state don't grant the same professional rights to my wife (a naturopathic doctor) and that her scope of practice would be significantly curtailed compared to what she was used to. "The cheapest thing to do would be to hire a lobbyist and get the laws changed," he said. We just sort of stared at him, bug-eyed. Cheapest? "Well, you're talking a state law with a very narrow scope. We could probably overturn that for ten, twenty thousand dollars." It turns out he was speaking hyperbolically, but he wasn't far off. The list of lobbyists he showed us was the same as the list of lobbyists my wife's professional organization hired off of. His prices were off - maybe a factor of two, factor of three. Not a factor of ten.
Americans need to understand down to their very bones that their money is going to - and their country is being run by - people who know that an inconvenient tax law doesn't need to be suffered, it needs to be changed. These people know that if $200k of lobbying saves them $200m in taxes that lobbying is their most financially efficient tax strategy. Americans need to understand that the entire system is rigged against people who take the 1040EZ, who always get the Standard Deduction, who think that their $10k account on eTrade makes them a "player." The entire system is rigged so heavily against the individual with a middle-class income that the average taxpayer still thinks he's a small fish in a small pond - he doesn't even realize he's a goldfish in an aquarium bought and paid for by people whose fortunes dwarf his so extravagantly that scientific notation is necessary to illustrate the difference.
The AP ran a pie chart in 2001 that I saw in a newspaper once and haven't seen since. It broke down who, exactly, benefited from the Bush Tax Cuts - remember, back when you got a $300 check as pablum to get you to shut up? Prosperity for everybody, right?
That graph had a lot of stuff on it that wouldn't surprise you. "Businesses" got a big chunk of it. "The Middle class" got a tiny chunk of it. "The wealthy" got a big chunk of it. But way down at the bottom, next to a "2%" there was an asterisk. That asterisk, down in the footnotes, said "Samuel, John, Christy, Alice and James Walton."1
2% of the benefits of an entire national tax cut - about four billion dollars - went directly to five people. Who happen to own Walmart. They cut you a $300 check so yo wouldn't grumble about it. Each Walton, individually, got more tax cut than 2.5 million people, collectively. But it's okay, because you got an X-box.
That's the system we live in. And the people who have the most direct power to change it are the ones that are benefiting the most. Be angry at GE. Be angry at the tax laws. Be angry at the lobbyists. Be angry at the people taking advantage of it. If you aren't outraged, you aren't paying attention.
- "Socialism never took root in America because the poor see themselves not as an exploited proletariat, but as temporality embarrassed millionaires."
John Steinbeck"
Why is Idiocracy so funny? Because it's true...
(Idiocracy) "The years passed, mankind became stupider at a frightening rate. Some had high hopes the genetic engineering would correct this trend in evolution, but sadly the greatest minds and resources where focused on conquering hair loss and prolonging erections."
http://www.businessweek.com/magazine/content/11_17/b4225060960537.htm
"The best minds of my generation are thinking about how to make people click ads"
http://www.businessweek.com/magazine/content/11_17/b4225060960537.htm
"The best minds of my generation are thinking about how to make people click ads"
Thursday, March 31, 2011
Friday, March 11, 2011
Looking for awesome testers
My team is looking for very senior test engineers. The testers on our team do more than writing tests - alongside the devs they are responsible for the health of production instance, so the job is similar to that of Google SREs in many (but not all) respects. By the way, we are looking for Google SREs of all levels as well, in the more traditional SRE roles.
If you are interested, please send me your resume (mailto:resumes@solyanik.com).
Are you working on one of the most important problems in your field? If not, come join the team that is.
======================================================================
As Web 2.0 matures, a new paradigm is being born - massively distributed development, where a typical application runs on hundreds, thousands, sometimes tens of thousands computers at the same time. A new software stack that resembles familiar operating system concepts is being built to support this model.
Would you like to participate in the creation of the Web 2.0 framework?
The Manageability Services Group (MSG) builds components that massively distributed applications live and die by - deployment, automation, monitoring, discovery, etc. We have it all - complex algorithmic tasks, opportunity to write a lot of code, potential to influence the entire industry, and, last but not least, soon to be running millions of computers!
Interested?
We’re looking for strong algorithmic skills, native fluency in C#, and a lot of passion - proven by shipping real software! A SDET on our team is responsible for managing the design, implementation and automation of test cases to ensure high quality solutions are shipping across large data centers.
Qualifications:
Interested candidates should possess a thorough understanding of the software development lifecycle from specification, through implementation and testing, to final deployment and operation.
Passion for distributed systems, fault tolerance and recovery, and geo-distributed solutions
8+ years of Software Development experience working with a structured programming language (C++, C#, Java, etc.)
6+ years of broad testing experience required
Deep knowledge of test engineering and software development required.
Excellent troubleshooting skills
Knowledge of networking (tracing, packet sniffers, etc.) a big plus
Communications excellence including cross-team collaboration, presentation and documentation
Demonstrated technical leadership, great communication skills and a history of driving for results is required.
BS or MS in Computer Science or related areas is preferred and we will take experience and a proven track record over other requirements
If you are interested, please send me your resume (mailto:resumes@solyanik.com).
Are you working on one of the most important problems in your field? If not, come join the team that is.
======================================================================
As Web 2.0 matures, a new paradigm is being born - massively distributed development, where a typical application runs on hundreds, thousands, sometimes tens of thousands computers at the same time. A new software stack that resembles familiar operating system concepts is being built to support this model.
Would you like to participate in the creation of the Web 2.0 framework?
The Manageability Services Group (MSG) builds components that massively distributed applications live and die by - deployment, automation, monitoring, discovery, etc. We have it all - complex algorithmic tasks, opportunity to write a lot of code, potential to influence the entire industry, and, last but not least, soon to be running millions of computers!
Interested?
We’re looking for strong algorithmic skills, native fluency in C#, and a lot of passion - proven by shipping real software! A SDET on our team is responsible for managing the design, implementation and automation of test cases to ensure high quality solutions are shipping across large data centers.
Qualifications:
Interested candidates should possess a thorough understanding of the software development lifecycle from specification, through implementation and testing, to final deployment and operation.
Passion for distributed systems, fault tolerance and recovery, and geo-distributed solutions
8+ years of Software Development experience working with a structured programming language (C++, C#, Java, etc.)
6+ years of broad testing experience required
Deep knowledge of test engineering and software development required.
Excellent troubleshooting skills
Knowledge of networking (tracing, packet sniffers, etc.) a big plus
Communications excellence including cross-team collaboration, presentation and documentation
Demonstrated technical leadership, great communication skills and a history of driving for results is required.
BS or MS in Computer Science or related areas is preferred and we will take experience and a proven track record over other requirements
Intellectual property is now infrastructure
Wondered why the creme-de-la-creme of the modern web companies such as Google and Facebook do not seem to value software as a form of market lock-in? Google is, and has always been, publishing lots of articles containing detailed information - and source code - for their core systems.
MapReduce, Bigtable, GFS, Chubby, Closure, Chrome, Android et al would be the major source of competitive advantage 10 years ago, and now most of the key technologies that comprise Google are either open source or public domain.
Why?
Because Google does not derive its competitive advantage from software. They are betting that even if someone could replicate their technologies, they would never be able to replicate their datacenters. Incidentally, there is far less information about both hardware and software that runs it (try, for example, googling for "Google Borg").
It appears that the infrastructure - hardware and software - is becoming the modern answer to the open source. After the open source sucked the value out of the software as THE value proposition, the competitive advantage had so move somewhere, and infrastructure was the obvious way to go.
You move, FSF?
MapReduce, Bigtable, GFS, Chubby, Closure, Chrome, Android et al would be the major source of competitive advantage 10 years ago, and now most of the key technologies that comprise Google are either open source or public domain.
Why?
Because Google does not derive its competitive advantage from software. They are betting that even if someone could replicate their technologies, they would never be able to replicate their datacenters. Incidentally, there is far less information about both hardware and software that runs it (try, for example, googling for "Google Borg").
It appears that the infrastructure - hardware and software - is becoming the modern answer to the open source. After the open source sucked the value out of the software as THE value proposition, the competitive advantage had so move somewhere, and infrastructure was the obvious way to go.
You move, FSF?
Tuesday, March 1, 2011
Caviar! It's jumping off the shelf.
The owner of a specialty food store on Manhattan's Upper East Side—Maureen's Passion—was touting the top-income tax cuts the GOP had shoved into Obama's compromise. "It all turned around when the tax bill passed," he'd told a financial news website. "Caviar! It's jumping off the shelf."
http://motherjones.com/politics/2011/02/reagan-anniversary-david-stockman
http://motherjones.com/politics/2011/02/reagan-anniversary-david-stockman
Monday, February 21, 2011
Wikipedia quote on Idiocracy
"Fox downplayed the release of Idiocracy because the company did not want to offend its typical viewers."
http://en.wikipedia.org/wiki/Idiocracy#Release_issues
http://en.wikipedia.org/wiki/Idiocracy#Release_issues
Saturday, February 19, 2011
Monday, February 14, 2011
Google's JavaScript style guide is available
Very much worth a read if you are doing JavaScript development - it's not just about appearance!
Sunday, February 6, 2011
Seriously, there is a huge correlation between rightwinginness and stupidity
Bill O'Reilly does not know that Earth is not the only planet that has moons...
http://latimesblogs.latimes.com/the_big_picture/2011/02/bill-oreillys-latest-faux-science-lesson-the-other-planets-dont-really-have-any-moons.html
http://latimesblogs.latimes.com/the_big_picture/2011/02/bill-oreillys-latest-faux-science-lesson-the-other-planets-dont-really-have-any-moons.html
Wednesday, February 2, 2011
Friday, January 28, 2011
The most important health question that is asked first every time I visit a doctor:
"Do you still have Premera?"
---
For non-US readers: Premera Blue Cross is a health insurance provider.
---
For non-US readers: Premera Blue Cross is a health insurance provider.
Monday, January 24, 2011
Wednesday, January 5, 2011
Sunday, January 2, 2011
Detroit
Just watched this documentary about the current state of Detroit. Apparently, 30 millions of people left the are after auto manufacturing industry collapsed, but the life is slowly coming back.
http://www.vbs.tv/watch/uneven-terrain/palladium-detroit-full-new-credits--3
One thing that this underscores is a complete lack of vision on the part of our political class.
Instead of vasting $700B on rescuing banks that are not ready to collapse again, how about talking to a bunch of companies - Google, Microsoft, Amazon, others in software industry, venture capitalists - getting them to come into the area. Pouring money into revitalizing culture (hiring artists, opening theaters, clubs, etc), education to support the newcomers...
I bet a lot of people can be attracted by a prospect of almost free housing!
http://www.vbs.tv/watch/uneven-terrain/palladium-detroit-full-new-credits--3
One thing that this underscores is a complete lack of vision on the part of our political class.
Instead of vasting $700B on rescuing banks that are not ready to collapse again, how about talking to a bunch of companies - Google, Microsoft, Amazon, others in software industry, venture capitalists - getting them to come into the area. Pouring money into revitalizing culture (hiring artists, opening theaters, clubs, etc), education to support the newcomers...
I bet a lot of people can be attracted by a prospect of almost free housing!
Saturday, December 25, 2010
Meanwhile in Britain...
Every year, researchers from the British Social Attitudes survey ask a representative sample of British people whether they regard themselves as belonging to any particular religion and, if so, to which one? When the survey first asked these questions in 1985, 63% of the respondents answered that they were Christians, compared with 34% who said they had no religion (the rest belonged to non-Christian religions).
http://www.guardian.co.uk/commentisfree/2010/dec/24/religion-respecting-the-minority?CMP=EMCGT_241210
http://www.guardian.co.uk/commentisfree/2010/dec/24/religion-respecting-the-minority?CMP=EMCGT_241210
Sunday, December 19, 2010
The spirit of American revolution is now officially and irrevocably dead
People WANT to be duped by the government. Passionately so.
"The American public is highly critical of the recent release of confidential U.S. diplomatic cables on the WikiLeaks Web site and would support the arrest of WikiLeaks founder Julian Assange by U.S. authorities, a new Washington Post-ABC News poll finds.
Most of those polled - 68 percent - say the WikiLeaks' exposure of government documents about the State Department and U.S. diplomacy harms the public interest. Nearly as many - 59 percent - say the U.S. government should arrest Assange and charge him with a crime for releasing the diplomatic cables."
http://www.washingtonpost.com/wp-dyn/content/article/2010/12/14/AR2010121401650.html
Vladimir Putin, we are finally ready for your leadership...
"The American public is highly critical of the recent release of confidential U.S. diplomatic cables on the WikiLeaks Web site and would support the arrest of WikiLeaks founder Julian Assange by U.S. authorities, a new Washington Post-ABC News poll finds.
Most of those polled - 68 percent - say the WikiLeaks' exposure of government documents about the State Department and U.S. diplomacy harms the public interest. Nearly as many - 59 percent - say the U.S. government should arrest Assange and charge him with a crime for releasing the diplomatic cables."
http://www.washingtonpost.com/wp-dyn/content/article/2010/12/14/AR2010121401650.html
Vladimir Putin, we are finally ready for your leadership...
Saturday, December 18, 2010
If you ever doubted that GOP specifically targets morons for its electoral base...
...there should be no doubts now: the first target of the new Republican majority is... National Science Foundation.
http://scottaaronson.com/blog/?p=476
http://scottaaronson.com/blog/?p=476
Wednesday, December 8, 2010
Obama's record
http://www.reddit.com/r/politics/comments/ei2ka/olbermann_still_has_it_calls_obama_sellout/c18aby5
Obama was a sellout when he backed off on closing Guantanamo.
Obama was a sellout when he backed off of his promise to keep lobbyists out of his administration.
Obama was a sellout when he protected the Bush administration from prosecution for torture.
Obama was a sellout when he authorized the assassination of U.S. citizens abroad.
Obama was a sellout when he rescinded on his promise to not prosecute marijuana users in states where it is legal, and pushed for a 5 year prison term for a California-legal medical marijuana dispensary operator.
Obama was a sellout when he prosecuted child-soldier Omar Khadr using evidence gained through torture.
Obama was a sellout when he granted 27 waivers to oil companies drilling in the weeks following the Deepwater Horizon disaster.
Obama was a sellout when he fought for, and won, the right to deny habeas corpus to detainees.
He was a sellout when he blocked UN human rights investigations at Guantanamo.
He dropped charges against the CIA for destroying videotapes documenting torture of detainees.
He deported record number of undocumented immigrants.
He continued rendition of alleged terrorists to countries where they could be tortured.
He continued indefinitely detaining alleged terrorists, WITHOUT TRIAL.
He extended the PATRIOT Act, with no reforms.
He dramatically increased government secrecy, denying more Freedom of Information Act requests in 2009 than Bush did in 2008. So much for open government.
He cut a secret deal to kill the public option, while still campaigning on its behalf.
He defended Don't Ask Don't Tell from legal challenges.
He reaffirmed his opposition to same-sex marriage.
He granted waivers to 30 companies, including McDonalds, exempting them from health care reform.
He announced the single largest arms deal in history, of $60bil worth of arms, to Saudi Arabian dictatorship.
He gave permits to BP and other oil companies, exempting them from environmental protection laws.
He appointed Monsanto executive Michael Taylor to the FDA.
He appointed a former Monsanto lobbyist as Chief Agriculture Negotiator.
But NOW, he's a sellout, when he extends Bush's tax cuts? Oh no.
Obama has been a sellout since day one.
Obama was a sellout when he backed off on closing Guantanamo.
Obama was a sellout when he backed off of his promise to keep lobbyists out of his administration.
Obama was a sellout when he protected the Bush administration from prosecution for torture.
Obama was a sellout when he authorized the assassination of U.S. citizens abroad.
Obama was a sellout when he rescinded on his promise to not prosecute marijuana users in states where it is legal, and pushed for a 5 year prison term for a California-legal medical marijuana dispensary operator.
Obama was a sellout when he prosecuted child-soldier Omar Khadr using evidence gained through torture.
Obama was a sellout when he granted 27 waivers to oil companies drilling in the weeks following the Deepwater Horizon disaster.
Obama was a sellout when he fought for, and won, the right to deny habeas corpus to detainees.
He was a sellout when he blocked UN human rights investigations at Guantanamo.
He dropped charges against the CIA for destroying videotapes documenting torture of detainees.
He deported record number of undocumented immigrants.
He continued rendition of alleged terrorists to countries where they could be tortured.
He continued indefinitely detaining alleged terrorists, WITHOUT TRIAL.
He extended the PATRIOT Act, with no reforms.
He dramatically increased government secrecy, denying more Freedom of Information Act requests in 2009 than Bush did in 2008. So much for open government.
He cut a secret deal to kill the public option, while still campaigning on its behalf.
He defended Don't Ask Don't Tell from legal challenges.
He reaffirmed his opposition to same-sex marriage.
He granted waivers to 30 companies, including McDonalds, exempting them from health care reform.
He announced the single largest arms deal in history, of $60bil worth of arms, to Saudi Arabian dictatorship.
He gave permits to BP and other oil companies, exempting them from environmental protection laws.
He appointed Monsanto executive Michael Taylor to the FDA.
He appointed a former Monsanto lobbyist as Chief Agriculture Negotiator.
But NOW, he's a sellout, when he extends Bush's tax cuts? Oh no.
Obama has been a sellout since day one.
Monday, December 6, 2010
Sunday, November 28, 2010
Winows Phone 7
WP7 has hit the Microsoft campus on November 18. This was the date when the free phones the company gave to all the employees have arrived.
I've got one, too, and has been playing with it ever since. So far I cannot imagine going back to my iPhone 3GS.
The UI is slick and extremely responsive. In two weeks of use there was not a single case when the UI lagged. Not one frame of scrolling, zooming, or moving between apps. Not a trace of hesitation. It is also quite intuitive, everything you use often is at your fingertips when you need it.
Search is fully integrated into the experience. It works in the context of the currently running program - in maps it searches maps, in IE it searches the Internet, in Zune UI it searches the music, and in the Marketplace it searches the app store. It works well, too - the results are formatted for the phone, and the way local results are mixed in is uniquely useful for a mobile device.
The IE works great. Really, truly great. It feels faster than the iPhone's Safari browser. With the Samsung Focus' gigantic, bright screen it feels like a mini-tablet. When I bought the iPhone I noticed that I go to my laptop to browse less. With this device I go back to a real computer even less.
One of the reasons that I was awaiting WP7 was that the iPhone was syncing my calendar unreliably. Some of the appointments were transferred, and some were not. I have heard similar complaints from my peers who are also very heavy calendar users. Needless to say, this is the most critical part of the device for me, possibly even more important than the actual phone - I use it as a phone at most twice a day, but I use it as a calendar and email device at least once an hour.
Both calendar and email sync flawlessly on WP7. So does the rest of Office integration. I've spent a few hours reading a book formatted as a Word file, and, again, performance was fantastic and the document rendered flawlessly.
The device is rock solid. I have never - ever - had to reboot it for anything other than the change of the system locale.
Of course, as a v1 device, WP7 has a number of problems as well.
First, it has no way to upload custom ring tones to the device. Yes, this is actually true - the only ringtones that are available are ones preinstalled by the OEM. I have no idea how they managed to cut a feature that at this point is available anywhere else.
Second, the phone only supports a handful of mostly western European locales. For example, it has no support for entering Cyrillic, which, with me being in Russia right now is a big problem. Actually, this plus the absense of copy-paste makes entering an internet search query in any language other than English impossible. Given iPhone's completely universal keyboard that allows writing in any language with ease, this is a big disadvantage for anyone who speaks more than one language.
Third, the phone does not support - this is absolutely, amazingly stupid - user names that have spaces. So if your company has a "First Last" template for the user names, you are out of luck - Exchange sync will not work. Whoever tested the user input dialog - please hang your head in shame now.
Windows Phone 7 lacks the iPhone's breadth of apps, but this is actually an opportunity for developers, and the gap will probably be closed quickly.
Other than that - the device is actually great. I gave away my 3GS after playing with WP7 for less than a day, and 2 weeks in I did not regret that decision for a second. Very highly recommended!
I've got one, too, and has been playing with it ever since. So far I cannot imagine going back to my iPhone 3GS.
The UI is slick and extremely responsive. In two weeks of use there was not a single case when the UI lagged. Not one frame of scrolling, zooming, or moving between apps. Not a trace of hesitation. It is also quite intuitive, everything you use often is at your fingertips when you need it.
Search is fully integrated into the experience. It works in the context of the currently running program - in maps it searches maps, in IE it searches the Internet, in Zune UI it searches the music, and in the Marketplace it searches the app store. It works well, too - the results are formatted for the phone, and the way local results are mixed in is uniquely useful for a mobile device.
The IE works great. Really, truly great. It feels faster than the iPhone's Safari browser. With the Samsung Focus' gigantic, bright screen it feels like a mini-tablet. When I bought the iPhone I noticed that I go to my laptop to browse less. With this device I go back to a real computer even less.
One of the reasons that I was awaiting WP7 was that the iPhone was syncing my calendar unreliably. Some of the appointments were transferred, and some were not. I have heard similar complaints from my peers who are also very heavy calendar users. Needless to say, this is the most critical part of the device for me, possibly even more important than the actual phone - I use it as a phone at most twice a day, but I use it as a calendar and email device at least once an hour.
Both calendar and email sync flawlessly on WP7. So does the rest of Office integration. I've spent a few hours reading a book formatted as a Word file, and, again, performance was fantastic and the document rendered flawlessly.
The device is rock solid. I have never - ever - had to reboot it for anything other than the change of the system locale.
Of course, as a v1 device, WP7 has a number of problems as well.
First, it has no way to upload custom ring tones to the device. Yes, this is actually true - the only ringtones that are available are ones preinstalled by the OEM. I have no idea how they managed to cut a feature that at this point is available anywhere else.
Second, the phone only supports a handful of mostly western European locales. For example, it has no support for entering Cyrillic, which, with me being in Russia right now is a big problem. Actually, this plus the absense of copy-paste makes entering an internet search query in any language other than English impossible. Given iPhone's completely universal keyboard that allows writing in any language with ease, this is a big disadvantage for anyone who speaks more than one language.
Third, the phone does not support - this is absolutely, amazingly stupid - user names that have spaces. So if your company has a "First Last" template for the user names, you are out of luck - Exchange sync will not work. Whoever tested the user input dialog - please hang your head in shame now.
Windows Phone 7 lacks the iPhone's breadth of apps, but this is actually an opportunity for developers, and the gap will probably be closed quickly.
Other than that - the device is actually great. I gave away my 3GS after playing with WP7 for less than a day, and 2 weeks in I did not regret that decision for a second. Very highly recommended!
Thursday, November 25, 2010
Windows Phone 7 unlocking - NOT!
I am travelling to Russia, and tried to use the services of this company - windowsphoneunlock.com - to unlock my phone. They claim on the web site that it takes "up to 72 hours" to unlock the phone.
After waiting for 3 days, no response, I sent them an email, asking about the status. They responded that "some Windows Phone 7 devices take longer", and they will be clarifying this on their web page. However, they are confident that they will have the code in 24 hours.
Two more days go through, no code in the mail. I send them another query. This time, the response:
"Dear Sergey
Please accept our apologies with the length of time it is taking to acquire your unlock code. This is because it is with AT&T. It seems that they will not be giving out the unlock codes for several months after the phone has been registered, or until June 2011. We have just had your order returned to us as not found, not surprising as we are finding out no-one can get codes for Windows Phone 7 handsets on AT&T. However along with yours and other returns of not found came back one successful code return, which is peculiar. I don't know if this is a one-off or it means with some other techniques it might be possible.
I appreciate it has been a long time to wait, so at this point can you please advise if you want a full refund, or you want us to keep trying other techniques.
Many thanks for your patience,
windowsphoneunlock.com"
So, basically,
(1) They claimed that they could unlock Windows 7 phones, but they did not actually check it.
(2) The way they unlock phones is by simply asking for the code from AT&T on your behalf. Or, you can do it yourself and save the money. Of course, in either case AT&T does not supply the unlock code unless you own the phone for 90 days, as any customer service rep will tell you, which is why they couldn't "unlock" mine.
So stay away from these "services" and save yourself some time and money.
After waiting for 3 days, no response, I sent them an email, asking about the status. They responded that "some Windows Phone 7 devices take longer", and they will be clarifying this on their web page. However, they are confident that they will have the code in 24 hours.
Two more days go through, no code in the mail. I send them another query. This time, the response:
"Dear Sergey
Please accept our apologies with the length of time it is taking to acquire your unlock code. This is because it is with AT&T. It seems that they will not be giving out the unlock codes for several months after the phone has been registered, or until June 2011. We have just had your order returned to us as not found, not surprising as we are finding out no-one can get codes for Windows Phone 7 handsets on AT&T. However along with yours and other returns of not found came back one successful code return, which is peculiar. I don't know if this is a one-off or it means with some other techniques it might be possible.
I appreciate it has been a long time to wait, so at this point can you please advise if you want a full refund, or you want us to keep trying other techniques.
Many thanks for your patience,
windowsphoneunlock.com"
So, basically,
(1) They claimed that they could unlock Windows 7 phones, but they did not actually check it.
(2) The way they unlock phones is by simply asking for the code from AT&T on your behalf. Or, you can do it yourself and save the money. Of course, in either case AT&T does not supply the unlock code unless you own the phone for 90 days, as any customer service rep will tell you, which is why they couldn't "unlock" mine.
So stay away from these "services" and save yourself some time and money.
Wednesday, November 17, 2010
Tuesday, November 16, 2010
Trickle-up economics
With all the talk about tax cuts as a universal cure (for which of course there is exactly zero statistical evidence) that are prevalent in US media I wonder why no one is talking about much more obvious concept - a trickle-up economics, where the well-being of the population is certain to benefit the people at the top of the economic ladder.
After all, to earn more money companies need more people who can afford their products. The debt-financed prosperity of 1990s is perverse, but recent, evidence for this. By supporting policies that lead to growing inequality, the top 1% of earners are actually digging a hole for themselves. With the debt as a source of income nearly exhausted, the population will soon not be able to afford much, and the inevitable result will be collapsing incomes at the top as well...
After all, to earn more money companies need more people who can afford their products. The debt-financed prosperity of 1990s is perverse, but recent, evidence for this. By supporting policies that lead to growing inequality, the top 1% of earners are actually digging a hole for themselves. With the debt as a source of income nearly exhausted, the population will soon not be able to afford much, and the inevitable result will be collapsing incomes at the top as well...
Devices and PCs
The device wave seems to be sweeping the world. Apple's new tablet is selling like hot cakes, there are over a dozen of eBook readers on the market, and Android announces the support of a new device category every week.
I have been building the OS for devices for what is still the majority of my career at Microsoft, and had been a passionate advocate for and an avid user of various embedded electronics since 1997. I have shipped the first Microsoft's embedded product that sold for less than $100 (MN-700 residential gateway).
I have used video players, networked storage, terminal server clients, eBook readers, tablets, Internet terminals, portable music players, PDAs, car media players, portable displays, residential gateways, cameras, game boxes, etc, etc, etc. And, of course, smartphones, smartphones, smartphones, and more smartphones.
Over the years I have accumulated 4 large cardboard boxes full of devices in my basement. Almost all of them followed a very similar usage pattern: a new exciting device would come to market, I would get it and use it for about a year. Within a year though, rarely two, almost never three, the device would be obsolete. A new media format will become popular. A new display technology would call for higher video resolution. An upgrade to an OS would obsolete the device drivers. A company would go out of business and shut the web service down.
In the end, the destiny of all these gizmos was always the same - the brown box under the stairs. I think the longest I had embedded device was a couple of $15 wireless routers I got at Fry's 3-4 years ago, and I had a Sony eBook reader for 3 years. All the rest hit the box in at most 2 years.
I actually loved my SONY Reader. Despite the fact it took 10 minutes to boot. Despite the fact that there was no way to organize the collection in any meaningful way, so I always had to go through 66 pages of book titles to find the one I intended to read. Despite the fact that the battery life was nothing like advertized.
I even wrote a filter to automatically translate Project Gutenberg books to LRF format (http://1-800-magic.blogspot.com/2008/01/gutenberg-for-sony-pre-alpha.html).
What eventually killed the Reader was a multitude of factors. The hacked support for Russian script was no longer available for the most current firmware upgrade, so I had to stay on the old version. The new connection software no longer supports the old firmware. Finally, BookDesigner, a program that I used to translate RTF files into LRF to read them on the device does not work on newer operating systems.
At the same time, while playing with all these devices, I was slowly but surely - and mostly without realizing it - replacing them with PCs. Where devices lasted only a bit, PCs persisted.
A NAS device was replaced by three of server PCs first consisting of expensive case, good power supplies, cheap motherboards, and 30 disks. The cheap motherboards were quickly replaced by an expensive ones, but the rest was reused, and the machines are now in service 24/7 through the last 5 years. I have replaced a few disks, taking a couple of opportunities to upgrade - first going from 300 to 500GB, then to 1TB drives.
A couple of media center PCs that were in the house since 2005 went through a refresh this year. I have replaced motherboards, CPU, and memory ($400 per PC for 6-core Athlons, 8GB RAM, and top of the line ASUS boards), and upgraded the OS to Windows 7. I have reused the 500GB disks that were left over from the server upgrade.
A gaming PC that I have in my garage in front of a thread mill is in daily use since 2007, and it plays Halo 2 as well as it was on the first day of its life four and a half years ago. I have turned on the Xbox 360 next to it less than a dozen times over the same period of time. Last time only to find out that it had died, perhaps of loneliness.
Because of the super high level of commoditization, PC hardware is unmatched in price. Even the retail markup is different - for devices such as DVD players it usually is over 50%, whereas for PC hardware - thank you, Dell! - it is almost always below 15%. So you can buy a 4TB TerraStation for $800, or a pretty decent PC with 4 1TB hard drives which would in many cases cost much less.
And because PC hardware is interchangeable, when you decomission an old PC, you can almost always reuse at least some of the parts - a case, a power supply, a DVD drive - at a minimum, which makes your new build so much cheaper.
But of course the biggest advantage of the PC platform is that it is constantly evolving. A new codec that could kill a media player will be just a tiny upgrade to a Media Center PC. A Blu-ray is trivial to install without changing much of the existing functionality.
PCs do come with a cost - they could be hard to maintain. But there is a very simple solution - my PCs are all single function. A game PC is only used to play games. A Media Center is only used to watch movies. Servers are only used for storage and virtualization. There is a dedicated PC for Skype. I do software development and email on a VM that is specially built just for that.
As a result, there are usually no compatibility problems with software, and in fact configuration changes are very infrequent, so I spend very little time on my home infrastructure these days. Much less, in fact, than I used to spend trying to get all the devices to talk to each other :-).
I have been building the OS for devices for what is still the majority of my career at Microsoft, and had been a passionate advocate for and an avid user of various embedded electronics since 1997. I have shipped the first Microsoft's embedded product that sold for less than $100 (MN-700 residential gateway).
I have used video players, networked storage, terminal server clients, eBook readers, tablets, Internet terminals, portable music players, PDAs, car media players, portable displays, residential gateways, cameras, game boxes, etc, etc, etc. And, of course, smartphones, smartphones, smartphones, and more smartphones.
Over the years I have accumulated 4 large cardboard boxes full of devices in my basement. Almost all of them followed a very similar usage pattern: a new exciting device would come to market, I would get it and use it for about a year. Within a year though, rarely two, almost never three, the device would be obsolete. A new media format will become popular. A new display technology would call for higher video resolution. An upgrade to an OS would obsolete the device drivers. A company would go out of business and shut the web service down.
In the end, the destiny of all these gizmos was always the same - the brown box under the stairs. I think the longest I had embedded device was a couple of $15 wireless routers I got at Fry's 3-4 years ago, and I had a Sony eBook reader for 3 years. All the rest hit the box in at most 2 years.
I actually loved my SONY Reader. Despite the fact it took 10 minutes to boot. Despite the fact that there was no way to organize the collection in any meaningful way, so I always had to go through 66 pages of book titles to find the one I intended to read. Despite the fact that the battery life was nothing like advertized.
I even wrote a filter to automatically translate Project Gutenberg books to LRF format (http://1-800-magic.blogspot.com/2008/01/gutenberg-for-sony-pre-alpha.html).
What eventually killed the Reader was a multitude of factors. The hacked support for Russian script was no longer available for the most current firmware upgrade, so I had to stay on the old version. The new connection software no longer supports the old firmware. Finally, BookDesigner, a program that I used to translate RTF files into LRF to read them on the device does not work on newer operating systems.
At the same time, while playing with all these devices, I was slowly but surely - and mostly without realizing it - replacing them with PCs. Where devices lasted only a bit, PCs persisted.
A NAS device was replaced by three of server PCs first consisting of expensive case, good power supplies, cheap motherboards, and 30 disks. The cheap motherboards were quickly replaced by an expensive ones, but the rest was reused, and the machines are now in service 24/7 through the last 5 years. I have replaced a few disks, taking a couple of opportunities to upgrade - first going from 300 to 500GB, then to 1TB drives.
A couple of media center PCs that were in the house since 2005 went through a refresh this year. I have replaced motherboards, CPU, and memory ($400 per PC for 6-core Athlons, 8GB RAM, and top of the line ASUS boards), and upgraded the OS to Windows 7. I have reused the 500GB disks that were left over from the server upgrade.
A gaming PC that I have in my garage in front of a thread mill is in daily use since 2007, and it plays Halo 2 as well as it was on the first day of its life four and a half years ago. I have turned on the Xbox 360 next to it less than a dozen times over the same period of time. Last time only to find out that it had died, perhaps of loneliness.
Because of the super high level of commoditization, PC hardware is unmatched in price. Even the retail markup is different - for devices such as DVD players it usually is over 50%, whereas for PC hardware - thank you, Dell! - it is almost always below 15%. So you can buy a 4TB TerraStation for $800, or a pretty decent PC with 4 1TB hard drives which would in many cases cost much less.
And because PC hardware is interchangeable, when you decomission an old PC, you can almost always reuse at least some of the parts - a case, a power supply, a DVD drive - at a minimum, which makes your new build so much cheaper.
But of course the biggest advantage of the PC platform is that it is constantly evolving. A new codec that could kill a media player will be just a tiny upgrade to a Media Center PC. A Blu-ray is trivial to install without changing much of the existing functionality.
PCs do come with a cost - they could be hard to maintain. But there is a very simple solution - my PCs are all single function. A game PC is only used to play games. A Media Center is only used to watch movies. Servers are only used for storage and virtualization. There is a dedicated PC for Skype. I do software development and email on a VM that is specially built just for that.
As a result, there are usually no compatibility problems with software, and in fact configuration changes are very infrequent, so I spend very little time on my home infrastructure these days. Much less, in fact, than I used to spend trying to get all the devices to talk to each other :-).
Wednesday, November 10, 2010
We are screwed...
Here's the new (Republican) chairman of Energy and Commerce Committee. He says that Bible promises to not flood the Earth after Noah, therefore there will be no global warming. True story. This is the level of idiocy in Congress. I think I would rather live under Brezhnev again... Soviet government may have been evil, but it was not so monumentally stupid.
Tuesday, November 2, 2010
This is why Democrats need to abolish farm subsidies...
...to hold on to power.
Among other things that they should have done, but didn't (http://1-800-magic.blogspot.com/2008/11/next-depression.html) because they are too corrupt and incompetent...
Among other things that they should have done, but didn't (http://1-800-magic.blogspot.com/2008/11/next-depression.html) because they are too corrupt and incompetent...
Monday, November 1, 2010
Couple of interesting quotes
"Egotism is the anesthetic that dulls the pain of stupidity."
-- Frank Leahy
"Competition whose motive is merely to compete, to drive some other fellow out, never carries very far. The competitor to be feared is one who never bothers about you at all, but goes on making his own business better all the time. Businesses that grow by development and improvement do not die. But when a business ceases to be creative, when it believes it has reached perfection and needs to do nothing but produce - no improvement, no development - it is done."
-- Henry Ford
-- Frank Leahy
"Competition whose motive is merely to compete, to drive some other fellow out, never carries very far. The competitor to be feared is one who never bothers about you at all, but goes on making his own business better all the time. Businesses that grow by development and improvement do not die. But when a business ceases to be creative, when it believes it has reached perfection and needs to do nothing but produce - no improvement, no development - it is done."
-- Henry Ford
Thursday, October 28, 2010
Windows disk management with .NET framework
Windows has a very powerful programming API that allows developers almost total control over the way storage is managed. There are 3 main API subsets:
Unfortunately, .NET framework does not ship with an official wrapper, so there are two ways to access VDS from managed code. VDS is exposed through COM, but has no automation support, so one could use .NET COM interop, but would have to declare the interface by hand. There is a good example of how to do it here: http://stackoverflow.com/questions/2755458/retrieving-virtual-disk-file-name-from-disk-number/2892042.
However, VDS is a relatively big API, and so doing the marshalling by hand is a challenging job. Of course, if you do this, the humanity will be eternally grateful (especially if you post the results to http://pinvoke.net/)!
For those of us who are lazy, the next best thing is to use the DLL that is present on Windows Server 2008 and above - Microsoft.Storage.Vds.dll. It lives in both GAC and SxS. In both cases the paths to the files are absolutely awful, and I will dare not utter them here. Instead, go to you Windows directory and do "dir /s Microsoft.Storage.Vds.dll". The resulting DLL you can then copy to your application and add a reference to it in your project.
Important note: the DLL is ONLY present in Server OS - not in consumer Windows - but the interop logic that it exposes will work on Windows 7 as well. You just have to carry the file around with your app (note of course that Microsoft does not grant you any rights to redistribute parts of Windows!) .
Another important note: to use VDS on a local machine, your application must have an admin token in its process. When debugging in Visual Studio, it helps to start VS "as Administrator". To ensure that the right privileges exist when running the application, add the manifest file as follows:
This means that a new disk cannot be made dynamic using this interface, and therefore it cannot be used to build new disk arrays. If you need this functionality, you arescrewed have to do COM interop by hand. You can still use this library with the reflector to extract much of the interop code. However, all the code needed to check the disk system health, and to replace a disk is present, which means that the library is very useful for many interesting scenarios. (Again, Microsoft does not give you a right to reverse-engineer parts of Windows to incorporate them into your application!)
With this in mind, on to managed VDS!
To use VDS, you have to first connect to VDS service. You can connect to a service both on your local machine as well as on a remote computer (providing that your user has admin rights on it:
The basic provider contains all the "normal", non-dynamic disks. To get dynamic and basic providers, do the following:
Here is how to print information on all the disks in a system:
Among other things, Disk.Heath is a property that allows you to ferret out disks that are missing or unhealthy. From the reflector:
Time for a complete example. The following program scans a disk system on a running computer, finds disks that went missing/unhealthy, and sends an email to a pre-defined account.
Program.cs:
- VDS (Virtual Disk Service) allows to programmatically manage disks, volumes, and access features of Windows software RAID implementation. (http://msdn.microsoft.com/en-us/library/bb986750(v=VS.85).aspx)
- VSS (Volume Shadow Copy Service) lets one create snapshots of the current disk state. This can be used for a backup (these snapshots are internally consistent, because VSS exposes - and many software products consume - a subscription interface that allows application to write their state to disk before the snapshot is taken), as well as to preserve the current state of the volume state in time, so it (or individual files) could be rolled back at a later date. (http://msdn.microsoft.com/en-us/library/bb968832(VS.85).aspx)
- Block device access through device IOCTL and direct I/O (http://1-800-magic.blogspot.com/2008/02/taking-disk-image-snapshots.html)
Unfortunately, .NET framework does not ship with an official wrapper, so there are two ways to access VDS from managed code. VDS is exposed through COM, but has no automation support, so one could use .NET COM interop, but would have to declare the interface by hand. There is a good example of how to do it here: http://stackoverflow.com/questions/2755458/retrieving-virtual-disk-file-name-from-disk-number/2892042.
However, VDS is a relatively big API, and so doing the marshalling by hand is a challenging job. Of course, if you do this, the humanity will be eternally grateful (especially if you post the results to http://pinvoke.net/)!
For those of us who are lazy, the next best thing is to use the DLL that is present on Windows Server 2008 and above - Microsoft.Storage.Vds.dll. It lives in both GAC and SxS. In both cases the paths to the files are absolutely awful, and I will dare not utter them here. Instead, go to you Windows directory and do "dir /s Microsoft.Storage.Vds.dll". The resulting DLL you can then copy to your application and add a reference to it in your project.
Important note: the DLL is ONLY present in Server OS - not in consumer Windows - but the interop logic that it exposes will work on Windows 7 as well. You just have to carry the file around with your app (note of course that Microsoft does not grant you any rights to redistribute parts of Windows!) .
Another important note: to use VDS on a local machine, your application must have an admin token in its process. When debugging in Visual Studio, it helps to start VS "as Administrator". To ensure that the right privileges exist when running the application, add the manifest file as follows:
<?xml version="1.0" encoding="utf-8"?>The most important note: The managed API lacks one member of IVdsPack interface - the function that is absolutely crucial to creating RAID arrays (IVdsPack::MigrateDisks). As you can see in reflector, the IVdsPack is not completely marshalled ("slot7" occupies the place where MigrateDisks should have been):
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
</asmv1:assembly>
This means that a new disk cannot be made dynamic using this interface, and therefore it cannot be used to build new disk arrays. If you need this functionality, you are
With this in mind, on to managed VDS!
To use VDS, you have to first connect to VDS service. You can connect to a service both on your local machine as well as on a remote computer (providing that your user has admin rights on it:
using Microsoft.Storage.Vds;The object hierarchy in VDS is as follows. The VDS object contains a list of providers, and a list of unallocated disks. Unallocated disks are the disks that have not been initialized. You can access them as follows:
...
ServiceLoader loader = new ServiceLoader();
Service vds = loader.LoadService("computername"); // or null
vds.WaitForServiceReady();
foreach (Disk d in vds.UnallocatedDisks)On most computers (excluding the very rare cases where hardware manufacturers exposed their custom storage systems through VDS, which can happen with SANs), there are two providers, a dynamic provider and basic provider. A dynamic provider contains dynamic disks - the disks that can contain RAID volumes (simple volumes, spanned volumes, RAID-0, RAID-1, and RAID-5). You make the disk dynamic in disk management applet:
{
Console.WriteLine("Found unused disk {0} {1} {2} {3} {4}",
d.FriendlyName, d.Name, d.DevicePath, d.Size, d.Health);
}
The basic provider contains all the "normal", non-dynamic disks. To get dynamic and basic providers, do the following:
private static SoftwareProvider GetDynamicProvider(Service vds)Provider contains a list of packs. There is usually only one pack in the dynamic provider, unless a set of dynamic disks initialized on a different computer was added, but not migrated (they appear as "foreign" disks in disk management applet). Basic disks are one per pack, so if there several basic disks in the system, there would be multiple packs in basic provider.
{
foreach (Provider p in vds.Providers)
{
if ((p.Flags & ProviderFlags.Dynamic) != 0)
return p as SoftwareProvider;
}
return null;
}
private static SoftwareProvider GetBasicProvider(Service vds)
{
foreach (Provider p in vds.Providers)
{
if ((p.Flags & (ProviderFlags.Dynamic |
ProviderFlags.InternalHardwareProvider)) == 0)
return p as SoftwareProvider;
}
return null;
}
Here is how to print information on all the disks in a system:
SoftwareProvider dynamicProvider = GetDynamicProvider(vds);
foreach (Pack p in dynamicProvider.Packs)
{
foreach (Disk d in p.Disks)
{
Console.WriteLine("Found dynamic disk {0} {1} {2} {3} {4}",
d.FriendlyName, d.Name, d.DevicePath, d.Size, d.Health);
}
}
SoftwareProvider basicProvider = GetBasicProvider(vds);
foreach (Pack p in basicProvider.Packs)
{
foreach (Disk d in p.Disks)
{
Console.WriteLine("Found basic disk {0} {1} {2} {3} {4}",
d.FriendlyName, d.Name, d.DevicePath, d.Size, d.Health);
}
}
foreach (Disk d in vds.UnallocatedDisks)
{
Console.WriteLine("Found unused disk {0} {1} {2} {3} {4}",
d.FriendlyName, d.Name, d.DevicePath, d.Size, d.Health);
}
Among other things, Disk.Heath is a property that allows you to ferret out disks that are missing or unhealthy. From the reflector:
public enum HealthThe pack also contains volumes, e.g.:
{
Unknown = 0,
Healthy = 1,
Rebuilding = 2,
Stale = 3,
Failing = 4,
FailingRedundancy = 5,
FailedRedundancy = 6,
FailedRedundancyFailing = 7,
Failed = 8,
}
foreach (Volume v in p.Volumes)And, of course, given a disk, it is easy to figure out which volumes are on this disk (in case of RAID arrays, of course, the volume might not be on just one disk of course). A Disk structure has a list of extents in it. An extent has a volume id, which can be translated into a Volume object:
{
Console.WriteLine("Found volume {0}: {1} {2} {3} {4}",
v.DriveLetter, v.Name, v.Type, v.Size, v.Health);
}
foreach (DiskExtent de in d.Extents)The reverse - finding out what disks a volume occupies - is only slightly more involved:
{
Volume v = vds.GetObject<Volume>(de.DiskId);
}
foreach (VolumePlex vp in v.Plexes)Another useful piece of functionality in managed VDS interface is ability to replace a dead disk easily by using Pack.BeginReplaceDisk.
{
foreach (DiskExtent de in vp.Extents)
{
Disk d = vds.GetObject<Disk>(de.DiskId);
}
}
Time for a complete example. The following program scans a disk system on a running computer, finds disks that went missing/unhealthy, and sends an email to a pre-defined account.
Program.cs:
//-----------------------------------------------------------------------app.config:
// <copyright>
// Copyright (C) Sergey Solyanik.
//
// This file is subject to the terms and conditions of the Microsoft Public License (MS-PL).
// See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL for more details.
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Net.Mail;
using System.Text;
using Microsoft.Storage.Vds;
namespace DiskMonitor
{
/// <summary>
/// Implements a simple disk monitor. The program is a periodic task
/// that looks for an unhealthy disk and sends an email if it finds one.
/// </summary>
class Program
{
/// <summary>
/// Main program.
/// </summary>
/// <param name="args"> Arguments from the command line. None expected. </param>
static void Main(string[] args)
{
ServiceLoader loader = new ServiceLoader();
Service vds = loader.LoadService(null);
vds.WaitForServiceReady();
StringBuilder sb = new StringBuilder();
SoftwareProvider dynamicProvider = GetDynamicProvider(vds);
foreach (Pack p in dynamicProvider.Packs)
{
foreach (Disk d in p.Disks)
{
if (d.Health != Health.Healthy && d.Health != Health.Rebuilding)
{
sb.Append(string.Format("Disk {0} has health status {1}\n",
d.Name, d.Health));
}
}
}
SoftwareProvider basicProvider = GetBasicProvider(vds);
foreach (Pack p in basicProvider.Packs)
{
foreach (Disk d in p.Disks)
{
if (d.Health != Health.Healthy && d.Health != Health.Rebuilding)
{
sb.Append(string.Format("Disk {0} has health status {1}\n",
d.Name, d.Health));
}
}
}
if (sb.Length != 0)
{
Console.Error.Write(sb);
}
else
{
Console.WriteLine("Everything is great!");
}
MailMessage m = new MailMessage();
m.To.Add(ConfigurationManager.AppSettings["NotificationEmail"]);
m.From = new MailAddress(
ConfigurationManager.AppSettings["FromEmail"]);
m.Sender = new MailAddress(
ConfigurationManager.AppSettings["FromEmail"]);
m.IsBodyHtml = false;
if (sb.Length != 0)
{
m.Subject = string.Format(
"Problems with disk array on {0}", Environment.MachineName);
m.Body = sb.ToString();
}
else if (bool.Parse(ConfigurationManager.AppSettings["VerboseMail"]))
{
m.Subject = string.Format(
"Checked out disk system on {0}: everything is healthy!",
Environment.MachineName);
m.Body = "Nothing to report.";
}
SmtpClient client = new SmtpClient(
ConfigurationManager.AppSettings["SmtpServer"]);
client.UseDefaultCredentials = true;
client.EnableSsl = bool.Parse(
ConfigurationManager.AppSettings["UseSslForSmtp"]);
client.Send(m);
}
/// <summary>
/// Finds the dynamic software provider.
/// </summary>
/// <param name="vds"> VDS service. </param>
/// <returns> Basic software provider or null of none exists. </returns>
private static SoftwareProvider GetDynamicProvider(Service vds)
{
foreach (Provider p in vds.Providers)
{
if ((p.Flags & ProviderFlags.Dynamic) != 0)
return p as SoftwareProvider;
}
return null;
}
/// <summary>
/// Finds the basic software provider.
/// </summary>
/// <param name="vds"> VDS service. </param>
/// <returns> Basic software provider or null of none exists. </returns>
private static SoftwareProvider GetBasicProvider(Service vds)
{
foreach (Provider p in vds.Providers)
{
if ((p.Flags & (ProviderFlags.Dynamic |
ProviderFlags.InternalHardwareProvider)) == 0)
return p as SoftwareProvider;
}
return null;
}
}
}
<?xml version="1.0" encoding="utf-8" ?>app.manifest:
<configuration>
<appSettings>
<add key="SmtpServer" value="smtp.server.domain.com" />
<add key="NotificationEmail" value="target@domain.com" />
<add key="FromEmail" value="user@domain.com" />
<add key="UseSslForSmtp" value="true" />
<add key="VerboseMail" value="true" />
</appSettings>
</configuration>
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance>
<assemblyIdentity version="1.0.0.0" name="DiskMonitor"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
</asmv1:assembly>
Subscribe to:
Posts (Atom)






