| Stefan's profileStefan Prodan's spacePhotosBlogLists | Help |
|
|
My New Intel PC Power Consumption EstimationThese days I am building a new pc for home use. It’s so difficult for me to chose the rite parts as I want to have a high end PC suitable for programming, design (photo & video editing) and gamming that can run smoothly Vista 64bit. The full configuration without a case (my old Thermaltake Soprano is in excellent shape) must not exceed 1000 Euro. This week I’ve been reading tones of hardware reviews, forums and blogs; finally I’ve managed to make a list of components I want for my new pc. Today I was wandering what kind of power supply should I buy considering the low amount of money I got left from my 1000 Euro budget. So first I’ve tried to figure out my pc’s configuration power consumption. First of all I was tying to find a free windows software that will calculate the power consumption of my actual pc… but no luck. After intense “googling” I’ve found a great web application made by Thermaltake named Power Consumption Calculator. I highly recommend this calculator for anyone who is tying to build a PC on his own from components. Here it is the estimation I got for my configuration: System Type: Single Processor Recommended PSU Wattage: 390 Watts Now having this value I thought that buying a 420 power supply will do just fine, but the watts specified on the power supplies products can be deceptive. If you buy for example a 400Watts that doesn’t really mean you have all that power, on a 400 you might have 300 or even less and I am not talking about a “no name” low-cost product here. My conclusion is that for a 390 watts consumption, to be sure, I have to buy a power supply at 550 watts minimum. Finally I can now make a decision based on my budget and desired quality, my choice is Antec NeoPower 550EC. Hardmusic.ro Hardcore Mix Vol.1 by Creep
Hardmusic.ro up and running!Hardmusic.ro it’s a project intended to promote the hard styles of electronic music in Romania. Hardmusic.ro a luat nastere in decembrie 2008 si este un site ce promoveaza muzica electronica in formele ei dure ("hard styles"). Scopul echipei hardmusic este sa largeasca spectrul de genuri de muzica electronica ascultate si promovate in Romania, in primul rand hardmusic.ro se vrea un site de culturalizare a genurilor inexistente pe scena romana, genuri consacrate in europa cum ar fi hardstyle, mainstream hardcore, uk hardcore, hard house, uplift si multe altele. Esti pasionat de muzica electronica? Vrei sa promovezi un eveniment sau ai un artist favorit si vrei sa scrii despre el? My Smartphone Wallet on SoftpediaI am proud to announce that Softpedia.com has publish My Smartphone Wallet v1.0 Beta in the handheld section. Now you can download the application from them: http://handheld.softpedia.com/get/Security/Password-Managers/My-Smartphone-Wallet-68356.shtml My Smartphone Wallet Beta v1.0My Smartphone Wallet is a freeware mobile application designed to store in a secure way your credit card information, very simple and easy to use. This application is compatible with Windows Mobile Version 5 and 6 for Smartphone QVGA and needs .NET Compact Framework 2.0 installed on the device. The current version 1.0.0.0 Beta was tested on HTC S710 device and should work fine on any Windows Mobile 6 Standard Edition without the need of .NET Compact Framework updates.
Why this software? Well there is no freeware wallet application for Smartphone that I could find on the web and as any software developer will say "If you can make your own why buying from others ?! " :) Before I was storing in my notes the credit card information as allot of people do... so if anyone finds your lost phone or steals it there is a big chance that you'll lose the money from the cards as well, with this app no such thing is possible, just put a strong password and you are safe. Only someone that can reverse SHA1 can hack the password, so I wouldn't mind about that. (For geeks: I know about MD5 and SHA1 reverse lookup databases but with a strong password all the effort to crack are in vain). Features
In version 1.0.0.0 the credit card fields that are stored are:
Thing to do (final version)
Safety concerns? License Download Beta 1.0 (Copy the .cab file to your mobile phone and run it) If you use this app and have HTC VOX S710 Smartphone ReviewThis month I decided to acquire a Windows Mobile 6 device to play with, the Vodafone offered me a discount on HTC Vox so being my first Smartphone experience I wanted something cheep. I've played allot with it these days so here comes my review.
Hardware Specs Processor: TI's OMAP 850, 201 MHz Out of the box software
You should know that Outlook is at the core of this phone, mail, tasks, calendar, SMS, MMS are managed using Outlook, the best part about this is that with ActiveSync version 4.5 you can synchronize most of the data, only SMS, MMS are not imported on the PC, but there are 3ed parties software that can do this. Word, Excel and PowerPoint lack the function to create new files, the workaround is to put on your SD empty documents and edit those then "save as". Windows Live is well integrated, you have access to all the features like mail, messenger, contacts and search (IE Mobile default search). With Adobe Reader LE you can open even large PDF file but lacks the usability I was expecting from Adobe, try to read a PDF book that is not made for mobile and you'll see what I mean. With Media Player you'll not be able to view AVI file (DivX, Xvid, etc) and if you want to play movies they should be converted priory at a lower frame rate. Java MIDP it's great, I've tested allot of games and applications made for Symbian and J2ME and most of them, if they are made for 240 X 320 resolution perform ok. The HTC applications are very well made and without them using this phone would get really hard, first of all WM6 doesn't have a Task Manager, HTC Task Manager is a tool that you should put on speed dial because the system will eat up most of the RAM so you'll have around 20MB free memory for all the applications that are running, with the Task Manager you can monitor the RAM usage and close applications to make room for others. The memory problem I think is generated by the fact that windows applications like Media Player, IE, Contacts, Outlook, etc doesn't have a close button, so if you access the calendar there is no way to close it. HTC Task Manager has another great feature "Go To", it acts like Alt-Tab, it's the only way to bring to front running applications. HTC Audio Manager is an MP3 player like Winamp, Media Player is not suitable for music playback so this software comes to the rescue. Recommended software
The Good :)
The Bad :(
PS: I am working on a mobile application right now called My Smartphone Wallet, it's an app that is designed to store credit card data in a secure way on your mobile. It's going to be be released as freeware, more info soon. Session provider for .NET Remoting and WCF
Project objectives Project background Building interfaces Another interface used in the project is ISession. If you want to have your own implementation of the Session provider you can do it by inheriting ISession. Note that T is type of ISessionEntry and must have a default empty constructor. public interface ISession<T> where T : ISessionEntry, new() Building Session class public Session(int sessionTimeoutInMinutes) As you can see in the constructor it can be set the timeout, there is no default value like in ASP.NET (20 minutes) because I think that any .NET Remoting server or WCF has it's own specific timeout, for example in the distributed application I mentioned the timeout is like 1h but if your application has per user licence then the timeout should be very short. In a per user licence case you should make on the client a KeepAlive Thread that every minute updates the LastAccessTime value on the server using the public method UpdateLastAccessTime. If the client shuts down without calling the Unregister method then after 1 minute he can login again because the cleaner thread has deleted the user entry from the active session. //set volatile flag running = false; Using the Session provider [Serializable] The following example is a console application and it shows how the methods of Session class can be used: class Program In the future I will post real examples of how to use Session provider in production with .NET Remoting and WCF. Full source code of the examples will be uploaded to my SkyDrive public folder so anyone can get them. In the meanwhile I am expecting comments and ideas about improving the session provider. Session related interfacespublic interface ISessionEntry { long SessionId { get; set; } DateTime LastAccessTime { get; set; } } public interface ISession<T> where T : ISessionEntry, new() { System.Collections.Generic.List<T> Entries(); object GetData(string key, long id); bool IsOnline(long sessionId); event SessionEntryTimeoutDelegate<T> OnEntryTimeout; void PrepareForDispose(); void Register(ref T newEntry); void SetData(string key, object val, long id); T this[long index] { get; } bool Unregister(long sessionId); bool UpdateLastAccessTime(long sessionId); } Session Classusing System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; using System.Threading; namespace Aleph.Framework.Remoting { public delegate void SessionEntryTimeoutDelegate<T>(T entry); public class Session<T> : ISession<T> where T : ISessionEntry, new() { //timeout event public event SessionEntryTimeoutDelegate<T> OnEntryTimeout; //storage colections List<T> activEntries = new List<T>(); List<T> expiredEntries = new List<T>(); Dictionary<long, Hashtable> data = new Dictionary<long, Hashtable>(); //threading Thread cleaner; ReaderWriterLockSlim slimLock; volatile bool running = true; public T this[long index] { get { slimLock.EnterReadLock(); T outputEntry = new T(); try { foreach (T entry in this.activEntries) { if (entry.SessionId == index) { outputEntry = entry; break; } } } finally { slimLock.ExitReadLock(); } if (outputEntry.SessionId == 0) { throw new SessionException("Session expired"); } return outputEntry; } } public Session(int sessionTimeoutInMinutes) { slimLock = new ReaderWriterLockSlim(); cleaner = new Thread(new ParameterizedThreadStart(ClearExpired)); cleaner.IsBackground = true; cleaner.Start(sessionTimeoutInMinutes); } public void Register(ref T newEntry) { slimLock.EnterWriteLock(); try { newEntry.LastAccessTime = DateTime.Now; newEntry.SessionId = newEntry.LastAccessTime.ToBinary(); this.activEntries.Add(newEntry); } finally { slimLock.ExitWriteLock(); } } public bool Unregister(long sessionId) { slimLock.EnterWriteLock(); try { bool ok = false; int y = -1; for (int i = 0; i < this.activEntries.Count; i++) { if (this.activEntries[i].SessionId == sessionId) { y = i; ok = true; //remove data from colection data.Remove(sessionId); break; } } if (y > -1) { //remove entry from colection this.activEntries.RemoveAt(y); } return ok; } finally { slimLock.ExitWriteLock(); } } public bool UpdateLastAccessTime(long sessionId) { slimLock.EnterWriteLock(); try { bool ok = false; int y = -1; //search for entry for (int i = 0; i < this.activEntries.Count; i++) { if (activEntries[i].SessionId == sessionId) { y = i; ok = true; break; } } if (y > -1) { this.activEntries[y].LastAccessTime = DateTime.Now; } return ok; } finally { slimLock.ExitWriteLock(); } } public bool IsOnline(long sessionId) { bool ok = false; slimLock.EnterReadLock(); try { //search for session ID foreach (T entry in this.activEntries) { if (entry.SessionId == sessionId) { ok = true; break; } } } finally { slimLock.ExitReadLock(); } return ok; } public List<T> Entries() { slimLock.EnterReadLock(); try { return this.activEntries; } finally { slimLock.ExitReadLock(); } } public void SetData(string key, object val, long id) { slimLock.EnterWriteLock(); try { Hashtable ht = new Hashtable(); if (data.ContainsKey(id)) { ht = data[id]; //overwite value if key exists //acts like the ASP.NET session if (ht.ContainsKey(key)) { ht[key] = val; } else { ht.Add(key, val); } data[id] = ht; } else { ht.Add(key, val); data.Add(id, ht); } } finally { slimLock.ExitWriteLock(); } } public object GetData(string key, long id) { slimLock.EnterReadLock(); object val = null; try { if (data.ContainsKey(id)) { if (data[id].ContainsKey(key)) { val = data[id][key]; } } } finally { slimLock.ExitReadLock(); } return val; } public void PrepareForDispose() { //set flag running = false; //wake up cleaner if (cleaner.ThreadState == ThreadState.WaitSleepJoin) { cleaner.Interrupt(); } //wait for the thread to stop for (int i = 0; i < 100; i++) { if (cleaner == null || cleaner.ThreadState == ThreadState.Stopped) { System.Diagnostics.Debug.WriteLine( "Cleaner has stopped after " + i * 100 + " milliseconds"); break; } Thread.Sleep(100); } //prepare objects for GC activEntries.Clear(); activEntries = null; expiredEntries.Clear(); expiredEntries = null; data.Clear(); data = null; } void ClearExpired(object timeout) { int sessionTimeout = (int)timeout; while (running) { slimLock.EnterUpgradeableReadLock(); try { //process all active entries for (int i = 0; i < this.activEntries.Count; i++) { TimeSpan span = DateTime.Now - this.activEntries[i].LastAccessTime; if (span.TotalMinutes >= sessionTimeout) { this.expiredEntries.Add(this.activEntries[i]); } } //remove timeout entries if (this.expiredEntries.Count > 0) { slimLock.EnterWriteLock(); try { foreach (T entry in this.expiredEntries) { System.Diagnostics.Debug.WriteLine( "Session expired for id = " + entry.SessionId); if (OnEntryTimeout != null) { //will slow down the thread OnEntryTimeout(entry); } data.Remove(entry.SessionId); this.activEntries.Remove(entry); } this.expiredEntries.Clear(); } finally { slimLock.ExitWriteLock(); } } } finally { slimLock.ExitUpgradeableReadLock(); } //sleep for 1 minute(larger values will speed up the session) Thread.Sleep(TimeSpan.FromMinutes(1).Milliseconds); } } } } C# 3.0 books to readHere it is a shopping list for every software company that what to make their programmers to be C# 3.0 aware C# 3.0 in a Nutshell: A Desktop Quick Reference Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition Pro LINQ: Language Integrated Query in C# 2008 |
|
|