Archive

Archive for the ‘Uncategorized’ Category

I need this

September 11th, 2006 No comments

I have set my screensaver to time out in 3 minutes of inactivity, because even the act of going for a cup of tea requires a keyboard lock and if I forget then I’m under attack from co-workers who think its funny to leave lock your keyboard notes on my screen in notepad.  It is rather funny, I must admit I’ve done it myself, not within 2 seconds of getting a cup of tea though !

So I need a device to auto lock windows when I get up.  I reckon that either a web cam that monitors the mass in front of the screen or a pressure device in the chair could on receipt of a signal to a USB receiver just lock the keyboard after a time-out of say 10 seconds to x minutes  as a replacement for the screensaver timeout.  This could work in conjunction with the standard screensaver timeout and energy savings so when the user has left the area it can auto turn off monitors helping reduce electricity usage.

It was recently mentioned to me that the screensaver timeout is a real annoyance to some upper management.  Its these type of workers who could really benefit from this device as they could have a higher Screensaver timeout capacity, if there is someone there it would not switch off at all until they leave. This makes the locking mechanism more secure for upper management email and files as has been proved by my fun loving colleagues it takes less than 30 seconds to access the machine, in that time you can change the password and go access files safely elsewhere in the building.

Now that ideas out of the way onto my auto-feed cable that gets installed a-top of rotary clothes lines.  Lately my head just keeps filling up with odd ideas for inventions, most of them as bad as this.

tags: ,

Categories: Uncategorized Tags:

Seasonal Food

September 7th, 2006 No comments

Whilst trying to recognise a tree at work, I came across this site.

http://www.eattheseasons.co.uk/index.htm

Being a fan of seasonal food rather than shipping it halfway across the world this site rather appealed to me and they have a food of the week on the home page.

For those interested I have this book Food For Free which is a handy sized guide for when your walking in the woods.  Elderberries are ripe at this time and make an evil wine, don’t try them raw !

The tree was a chestnut and I believe the nuts are edible, but I will know more about that when they ripen.

tags: , ,

Categories: Uncategorized Tags:

.Net Web Service Studio broke since .NET 2.0

June 29th, 2006 No comments

Since I installed .NET 2.0, when I try to use the Web Service studio it would complain about partial classes when pointed at certain webservices.

To remedy this tell studio which runtime is supported

Create a WebServiceStudio.exe.config file with this in it

<configuration>
    <startup>
      
<supportedRuntime version=”v1.1.4322″ />
    </startup>
</
configuration>

That should work now.

Categories: Uncategorized Tags:

Find a user in AD and display LastLogon (plus others) in c#

June 15th, 2006 No comments

I have been trying to print the lastLogin time from active directory, its taken about an hour of coding testing and googling,  but I have done it.

First you have to get your AD entry.  Now I work in a place with a few domains so I narrowed my search down a bit by domain, but I bet you can figure out how to tweak it.

Then there is some funky code to convert the AD largeint into a date time and there you are all done

(This is an example so as for naming and exception handling i recommend you do it right)

string login=”funky\\simon”;
string[] keys= {“displayName”,”LastLogon”,”mail”};
string domain,name;

domain=login.Split(‘\\’)[0];
name=login.Split(‘\\’)[1];

System.DirectoryServices.DirectoryEntry o=
      
new System.DirectoryServices.DirectoryEntry(“LDAP://dc=” + s + “,dc=binaryjam,dc=com”);

System.DirectoryServices.DirectoryEntry p=null;

System.DirectoryServices.DirectorySearcher search=
                     
new System.DirectoryServices.DirectorySearcher(o);

search.Filter = String.Format(“(SAMAccountName={0})”, name);

foreach (string key in keys)
{
   search.PropertiesToLoad.Add(key);
}

p=search.FindOne().GetDirectoryEntry();

foreach (string key in keys) {

string adDets=key + ” – “;

try {
  
if(key==”LastLogon”) {
      ActiveDs.IADsLargeInteger li=((ActiveDs.IADsLargeInteger)(p.Properties[key].Value));
      
long date = (long)li.HighPart << 32 | (uint ) li.LowPart;
      DateTime time = DateTime.FromFileTime( date );
      adDets+=time.ToString();
   }
   
else {
      
adDets+=p.Properties[key].Value.ToString();
   }

   //Here I add asDets to a listBox but you do what you like with it
}
catch {//Yes I am a bad man, you do it right}

}

 

I have the followng articles to thank

http://www.codeproject.com/dotnet/QueryADwithDotNet.asp?print=true
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=321717&SiteID=1

 

Categories: Uncategorized Tags:

Reading and Writing Excel Spreadsheets Using ADO.NET C# DbProviderFactory

June 9th, 2006 3 comments

Nice article on reading and writing spreadsheets.

http://davidhayden.com/blog/dave/archive/2006/05/26/2973.aspx

Just in time Im going to need this soon.

Categories: Uncategorized Tags:

Sharepoint Template in Portal

May 23rd, 2006 No comments

Share point templates.  A while ago MS came up with some
new team site templates.  Now most of the instructions you read
are about adding those templates to the root of a wss site, now if your
running portal this is a bit difficult.

Wondering around the portal controls I thought I had the answer under
the manage user and security and other things option wqas a site
gallery option.  I uploaded my templates and bugger all
happened.  Heck knows what this is for.

To add those templates or any other STP to a portal site then you use
stsadm -o addtemplate  plus an iisreset and woot, there they are.

Categories: Uncategorized Tags:

Sql Reporting

April 7th, 2006 No comments

For those who havent tried sql reporting services yet, do it now, even if you havent got a server to deploy it to just load the developers bits for visual studio.  Even without the server option Its been so usful for me to write my adhoc data queries and data cleansing test routines  in this as it gets created as a standard project in VisStud and can be source coded, instead of snippets of sql all over the place.

But as a reporting tool its just fantastic and I havent even scratched the surface.

Databinder Warning:Actual SQL skills are required to use this tool.

Step away from the dataset.

Categories: Uncategorized Tags:

Packard Bell

April 7th, 2006 No comments

I recently have had the pleasure of trying to rebuild a packard bell laptop.  This had been a thoroughly awful process.   First if you have one of these, handy hint, DO NOT FDISK THEM, or delete the partitions. 

For one, there is a special partition on them if you hit F11 at boot will allow you to rebuild it.

For Two, if you have fdsisked them then the special code that is on that hard drive that allows you to rebuild them from a master dvd is now wiped and a telephone call to tech support at 75p a minute is required (took me 15 minutes).

For Three the price of the master dvd’s is £42 pounds (when i purchased them). 

Then I suffered possibly the worst rebuild routine I’ve ever seen, its a good job normal users don’t witness this.

So Packard Bell you suck.

However my Sony laptop came with rebuild media, and the process to restore is so quick and simple and elegant.

I suppose the moral is, “get what you pay for”.  I wonder what Dell’s rebuild is like ?

 

 

Categories: Uncategorized Tags:

ISP

November 28th, 2005 No comments

I had complaints with Pipex my old provider, BT loused up my connection and then a series of problems with them and Pipex’s customer service made me decide to leave them and move elsewhere.

So I moved from Pipex to Plusnet, I know that others have had no trouble but I have had nothing but trouble since I joined.  First I joined the wrong plan, the plan I joined did not detail that I would get really poor download speeds even on web, so part my fault part theirs due to poor descriptions of what is and isn’t included.

I switched to the better plan, now I’m paying 5 quid a month more for an inferior service to pipex, Pipex’s network was rock solid with no tampering, plusnet’s network seems solid enough but they apply QoS to your line between certain hours.

I have tried to get out of them exactly what is going on but I get short terse responses explaining I have exceeded my 30gb limit.  the supposed limit is for peak time download.  Whilst one part of their system tells me I have downloaded 8gb, which is close to my estimate, the support dick tells me its 30gb, well there isn’t 30gb I want to download and certainly not possible in the 2 weeks at 30kb a second I’ve been getting.

Also the 30kb a sec limiter is only supposed to apply at peak times, I’ve checked and the damn thing happens at all times of day, since when is 6am on a wednesday peak time and I need a speed restriction applying.

So Im pissed.  Pipex, yeh they gave me bad customer service, but when it works it just works.  Plus net whilst they have 24hr customer service its been taking 1.5 days to answer each question they do it poorly and I can’t say their network is working either.

So if this isn’t sorted soon, anyone got a recommendation for some ISP in the UK who is good ?  And cost effective or do I just go back to pipex on bended knee ?

 

Categories: Uncategorized Tags:

Rss Feed

November 28th, 2005 No comments

Can any one who might subscribe to this blog, please switch to

http://feeds.feedburner.com/Binaryjam

This will

1. Give me an idea of the 2 people subscribing

2. Lower my bandwidth usage as Im sure a lot of it is down to RSS fetching every hour.

 

Once you have switched feeds you will never have to change it again, unless feedburner hits the wall of course !  This will ensure continued usage when I eventually drop dasBlog for wordpress, nothing against dasBlog its just WordPress is very impressive.

Categories: Uncategorized Tags: