A simple method for retrieving an RSS feed and convert it to an HTML unordered list. Some feeds may differ in the xpath used, so change the
XmlNodeList rssNodeList = rss.DocumentElement.SelectNodes(“channel/item”);
and
string itemTitle = rssItem.SelectSingleNode(“title”).InnerText;
string itemLink = rssItem.SelectSingleNode(“link”).InnerText;
to get it tailored like you want it :-)
/// <summary>
/// Converts an RSS feed to an HTML UL list with title and links to the article, blogpost etc.
/// </summary>
/// <param name="pRssFeedToLoad">The RSS feeds URI. (Either from disk, or url)</param>
/// <returns>A fully XHTML formatted unordered list with css class "RssFeed"</returns>
protected string ShowRSSFeed(string pRssFeedToLoad)
{
// setup initial stringbuilder, for creating an HTML UL list.
StringBuilder sb = new StringBuilder();
sb.AppendLine("<ul class=\"RssFeed\">");
// create a new xml document used for parsing
XmlDocument rss = new XmlDocument();
// load the rss feed either from disk or url.
rss.Load(pRssFeedToLoad);
// select the items
XmlNodeList rssNodeList = rss.DocumentElement.SelectNodes("channel/item");
// traverse the items in the feed.
foreach (XmlNode rssItem in rssNodeList)
{
// get the needed data from the item.
string itemTitle = rssItem.SelectSingleNode("title").InnerText;
string itemLink = rssItem.SelectSingleNode("link").InnerText;
// create HTML LI element.
sb.AppendLine("<li>");
sb.AppendLine(string.Format("<a href=\"{0}\">{1}</a>", itemLink, itemTitle));
sb.AppendLine("</li>");
}
// close the HTML UL list.
sb.AppendLine("</ul>");
// return the HTML UL list.
return sb.ToString();
}
Sometimes people tend to forget their password for the user account on their pc, and they just _NEED_ to get access to their files. Well, what now you may think, how do I solve this? The solution is not so hard, but it requires you to clash your fingers on the keyboard and try to type some letters. This is a quick and painless fix for Windows users.
1. First up, you’ll need to fetch a copy of the ultimate I-got-all-the-tools-u-need linuxdistro called BackTrack. You can visit their download section by pressing this link and view a bunch of different versions and select the one that fits your taste or use this link to do a direct download of BackTrack4 Final.
2. Ok, here we are. We have downloaded a fresh cool copy of BT4, and are ready to reset some passwords! Hey wait a bit! Didnt we forget something? Oh yea.. First off you’ll need to burn the ISO to a DVD, since we have to boot from that DVD later on. For your ISO burning, you could use an application called ImgBurn <- clicky clicky.
3. Burn it, and stuff that DVD into the computer you wish to reset a password on.
4. Next up is that you need to ensure that the computer we want to boot, has booting from cd/dvdrom-drive enabled. Since there are five million different ways to check this on all brands, I’ll just leave you up to check it yourself. See if there is a message when you turn on your computer that says “One time boot order”, “Boot order” or something in that direction. (Dell users can probably just hit F12, and Lenovo users can hit Enter or ESC to interrupt normal boot order).
5. Things going great so far, but we haven’t touched the fun part yet. Once you booted from the DVD, you’ll get a menu where you have a bunch of different options for which settings you would like to run BT4 with. For simplicity just choose the BackTrack 4 with Frambuffer (1024×768) or choose some other option if you want that, you decide.
6. Let the magical linuxdistro boot up and wait for a line that has some green text saying root@bt4~:
We are now ready for the interesting part (and the part that we actually do something).
7. First off, we’ll need to mount our Windows drive so we can access it and locate our favourite file called SAM. Now, we need to find out which disk drive to use. Your disks would be called either hd or sd, depending on the type (IDE or SATA) and which driver that are in use. Dont pay too much attention to this right now, we want to find our correct disk and partition.
On the commandline type “ls -la /dev/sd*” if that dont return any results looking like /dev/sda1, /dev/sda2 or similar, try to run this command instead “ls -la /dev/hd*” and follow the same procedure looking for /dev/hda1, /dev/hda2 or something similar. Both those two can have an other letter like /dev/sdb1, /dev/sdc2 and so on.
We have hopefully located our correct disk, if not repeat the procedure mentioned like 2 seconds ago. In this example I will use my computer as reference, and my disk is located at /dev/sda and my partition with M$ Windows is on the first partition /dev/sda1 .
8. Now I’m going to make a folder called /mnt/mydisk where I will mount my partition using this command : mkdir /mnt/mydisk
(the /mnt folder already exists in every linux distro, so you’ll just have to make the mydisk folder, if /mnt for some reasons dont exist, use this command first “mkdir /mnt”)
Then we’ll mount our partition to that newly created folder using this command: mount /dev/sda1 /mnt/mydisk
Now we got our partition mounted, and it’s ready for access. If for some reason it doesnt list Windows when you do a “ls -la /mnt/mydisk” then you probably have the wrong disk and/or partition. Follow the step where we mounted the partition, and try with another like /dev/sda2, or /dev/hdb3 (re-read section 7 again).
9. Okay, here we are, ready to finally reset our password. Run this command: chntpw -i /mnt/mydisk/Windows/system32/config/SAM (if it says that it cannot open the file, please check the foldernames as they are casesensitive.)
10. We now got a sweet little menu with a few options, you should select option number 1 “Edit user data and passwords”. Moving on.
11. Next up you will be prompted for which user you would like to change password on, you’ll get a list of all the users. Type in the username and hit Enter.
12. Now you got the “User edit menu” with 5 possible options. On option number 4, you can unlock the useraccount if it has been locked due to a number of failed login attempts. If it’s not locked it would say something similar to “seems unlocked already”. Then skip this step.
13. We have unlocked our account if it was needed, and are ready to reset the password. Retype your desired username and hit Enter, and then type 1 and hit Enter. Your password will now be reset to blank (no password needed at login).
14. Now we want to quit and save. Type ! and hit Enter. You will now be sent back to the main menu, type q and hit Enter again. When asked to save you choose yes (type y) and hit Enter.
15. Password are reset, and we’re ready to boot back into Windows and retrieve our long lost files! Type reboot and hit Enter. You will be prompted to remove the DVD.
That’s it! Once you boot into Windows, just type administrator as username (in my example) and nothing in the password field, and click OK. You will now be logged in :-)
That kicks ass! And yeah, you can use this method on any pc which you have physical access to and able to boot from a DVD :-)
Filed under: Generelt
Due to changes in my life (and lazyness) this blog hasnt been updated for quite a while, but interesting things may happen in the future :-)
Hopefully someone have had good use of the few articles I’ve posted here earlier, and I’m looking forward to posting some new cool stuff here with fixes for different problems and some tutorials maybe. If you have a problem that you can’t fix, give me a heads up and I’ll see if I can manage to fix it, and maybe post an article for reference to others who may have the same/similar problem (computerstuff please, if you have a personal problem, go see your doctor/psychiatrist). :-)
Filed under: Generelt
Today I experienced some problems with Spotify. The problem was that I could not log on to Spotify, and it returned an error stating that there was some problems with the firewall settings, also known as Error 110. After checking the firewalls, and confirmed that there was no problem with the rules, I was stuck. After searching and surfing for solutions on the net, I found other people experiencing the same problems that I had.
The problem seemed to be with the “Remember me” option. Other people that had the same problem just disabled the remember me option, and logged in as usual with their own password. The same solution worked for me. :-)
Just got to love the power of Google :-)
Filed under: Problems & solutions | Tags: wlcomm.exe, wlm, windows live messenger, excessive resources, crash, pidgin, amsn, wlm contacts server
I’ve used the newest version of Windows Live Messenger for some time now, and I’ve noticed there’s a bug which is really annoying. What happens is that the WLM Contacts Server (wlcomm.exe) uses excessive amounts of resouces, which eventually leads to a total hang-up for all the applications running. This happens randomly, atleast in my case. What happens is that the wlcomm.exe process tend to use from about 15 to 60% of the CPU, and makes the computer run slow, and in worst case a hang-up or a system crash. It may also use excessive amounts of memory, but this hasn’t happened on my computer.
If you try to kill the wlcomm.exe process from within task manager, you will be logged off WLM. wlcomm.exe will start again when you log in the next time.
After a bit of searching around the net, I found a solution, it’s not perfect, but atleast it works. You will have two (2) options. The first is to downgrade to an older version of WLM/MSNmessenger, or the second, which is to install a different MSN client like pidgin or amsn. (There are other open source msn clients, just google it :-) )
Note: If you choose to downgrade to an older version of WLM / messenger, you will have to run the Microsoft Install Cleaner after the uninstall of WLM. Otherwise you will get an error while trying to install the older version, with the message that there is a newer version installed. Open the CleanUp Utility and highlight the Windows Live (WL) and Windows Live Messenger (WLM) files. Kudos to the user Bobbye from the techspot forum for this information, see techspot url under sources for more information.
If you have a solution for this error, without downgrading or installing another client, please post the solution in a comment, and I’ll update this article and include the solution.
Comments appreciated :-)
Sources:
- Information about the wlcomm.exe process (from whatsrunning.com)
- Information from a forum thread at techspot.com
- Windows Installer CleanUp Utility
Filed under: Music | Tags: channel, invite, irc, playlist, quakenet, share, spotify
Spotify is a really genius streaming music service, which is invite-only if you don’t want to pay a monthly fee. You can’t get an invite you say? Well, you may be able to get an invite through a friend, or by logging on to the Quakenet IRC network and joining the #spotify channel. Instructions are provided in the topic of the channel. :-)
Go get the invite you want! :D
Got a fresh and funky playlist? Share the URL in a comment :-
Filed under: Symbian | Tags: application, blacklist, location, pyS60, sports tracker, ssh, step counter, Symbian, tagger, useful, wellness diary
A compilation of applications that would be useful for your smartphone.
Networking:
Fitness:
- Step counter (Nokia E66 is not supported, yet..)
- Sports Tracker
- Wellness Diary (Data from Sports Tracker and Step Counter can be imported to this app)
Utilities:
Media:
- Location Tagger
- Twibble (twitter app)
Useful applications will be added to the list. If you have an application that you would like to add to this list, post a comment.
Filed under: Programming, School | Tags: C++, Java, mobilenin, Nokia, pyS60, Python, S60, Sourceforge.net, Tutorial
Want to write an application for your smartphone but don’t have the C++ knowledge required or want to write in another language (or perhaps you know Python already and want to utilitize your knowledge)? Why not use Python? For all Series 60 (S60) enabled smartphones Nokia has released a runtime and shell interpreter for Python that let’s you write your own Python scripts / applications with a bit more ease than writing it in C++.
The Python package for the S60 are called “PyS60″ and this can be downloaded from Sourceforge.net [Link]
Look at this page called Mobilenin for some pyS60 tutorials. [Link]
The pyS60 tutorials are written by Jurgen Scheible and are easy to follow to create some nice python application examples.
Jurgen Scheible had a presentation at my university about a year ago, where he talked about Python for the Series 60 phones. He also showed some examples and let the attendants write some simple test applications. It’s worth to take a look at, if you would like to write a program in a different language than C++ or Java :-)
Have fun!
“If it moves, compile it.” -GentooLinux
This guy is really good at playing keyboard :D
Filed under: Tutorial | Tags: drumkit, keyboard, MIDI, Playstation 3, Reason, virtual, xpadder
Just a simple tutorial of how to use the GH:WT drumkit with Propellerheads Reason music software. You don’t have to use Reason, as you can use any music application that support listening to the computer keyboard, interpret letters and play the right sound/tangent or whatever :-) (more…)