0 Comments

This post covers storing and retrieving settings with a WPF combobox for the UI. If you are looking for a solution to store settings across devices, for instance a Windows Surface tablet and a Windows Phone powered device, you should check out the blog of Mike Taulty. That is called roaming data storage. And if you are not working on an app for Windows RT/metro or Windows Phone but are just coding some WPF application, you should read this post from Scott Hanselman.

Let’s start with some code now that it’s clear what this post covers and what it doesn’t cover.

Here is my XAML from my userinterface:

<ComboBox x:Name="cbCountry" 
    SelectionChanged="ComboBox_SelectionChanged" 
    PlaceholderText="Select country" SelectedValuePath="Tag">
    <ComboBoxItem Content="Australia" Tag="au"/>
    <ComboBoxItem Content="New Zealand" Tag="nz"/>
</ComboBox>

Please note the ‘SelectedValuePath’ is being set to ‘Tag’, otherwise it would grab the ‘comboboxitem’ or ‘content’ like this:

var comboboxContent = ((ComboBoxItem)cbCountry.SelectedValue).Content;

With the value path set to tag, it will grab ‘au’ or ‘nz’ as selected value.

This is the constructor of the xaml page containing my settings.

var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;

this.InitializeComponent();

if (localSettings.Values.ContainsKey("country"))
{
    cbCountry.SelectedValue = localSettings.Values["country"];
}

and this is the code for the selectionchanged event of the combobox.

private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
    var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
    localSettings.Values["country"] = cbCountry.SelectedValue;
}

Good luck with this small code sample. If this is not what you are looking for, please check the links mentioned at the start. I strongly believe that they take you to the code that you are looking for (if the code above is insufficient)

Pin on pinterest Plus on Googleplus Post on LinkedIn

The Lenovo Miix 2 tablet is great if you look at the value you get for your money. I purchased one for work for just 196 euro at paradigit.nl

http://www.techspot.com/images/products/tablets/org/1766429079_943123002_o.jpg

It took me a day to install all updates on the windows 8.1 machine. When I returned at work the next day the tablet did not boot. It was still on the usb charger so it was not a battery drain or empty battery or whatsoever. I tried to contact Lenovo through twitter, but no response (yet).

So I had to figure it out myself and found this blog with tips. One of them is to plugin the USB cable, wait for the white light and power on. That did not work. Power on before removing USB cable also did not work. Maybe this works for you, please let me know in the comments.

The real solution (for me) was this trick of @marauderz:

Hold the power button for 20 seconds and then release and press again. That does show the lenovo logo and makes the tablet boot again. It does not matter if you have the 8 inch or 10 inch device. According to @marauderz it has to do with "ConnStandby" mode which is the "connected standby" feature of windows. More about it is available on MSDN. This superuser answer explains how you can disable this feature. Since I am developing a universal app on this tablet and have it on an USB powercable 24/7 I do not need this connected standby feature. So launch regedit, go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\

and change ‘CsEnabled’ from 1 to 0. Confirm, close regedit and reboot.

Pin on pinterest Plus on Googleplus Post on LinkedIn
1 Comments

No one blogged about migrating from a Windows Phone to a new Windows Phone! There is no source online about this. I have used the amazing Nokia Lumia 920 for almost a year, but I have a Nokia Lumia 930 now. I have won this amazing device from the June competition of Adduplex.

The 930 has a better screen (full HD) better CPU and a better camera. My 920 had the windows phone 8.1 developer preview 8.10.12400.899 and my 930 has 8.1 (no developer preview) and runs 8.10.12397.895 so the old phone seems to run newer software, but it has no Nokia Cyan (yet).

Back to the migration of the new phone. There are several guides online about moving from Android to Windows Phone or Apple (iOs) to Windows Phone, but no guides from Windows Phone to Windows Phone.WP_20140723_08_53_19_Pro

When you fire up the new Nokia Lumia 930 you get the installation wizard. During that wizard you have to sign in at your Windows id/account (former live id, former .net passport) The wizard will notice that you had a Windows Phone before and will give you the option to restore a backup. The backup contains all your mail accounts, apps, OS- preferences (home screen, tile positions) etc. It is amazing!

In the picture to the right, you can see (in Dutch) that the wizard found a backup of my other Windows Phone (Lumia 920)

There is just one thing that I forgot. I just restored the backup and it started downloading all the apps that I had on my old phone. So I was ready to actually use the new Nokia Lumia 930 and wanted to insert my sim card. But… the 920 has a micro sim and the 930 has a nano sim.

copyright wikipedia justin ormont


So to summarize, migrating from WP to WP is, turn on your device. Sign in onto Microsoft ID. Restore backup. Insert sim card. Done!

p.s. looking forward to the Windows Phone 8.1 GDR1 update!

p.p.s. Did you know that SIM stands for Subscriber Identity Module?

Pin on pinterest Plus on Googleplus Post on LinkedIn

http://resources2.news.com.au/images/2010/09/24/1225928/839170-the-social-network.jpgAs a software developer, you need a headphone and music to get into the zone. If I have to explain what “the zone” is, you might consider skipping this blog. Mark Zuckerberg was in the zone in the movie the social network.

My current headphone is a on-ear Sony MDR-NC7 with active noise-cancelling. It was the cheapest noise-cancelling headphone and I wanted to check out if noise cancelling would work. So if you have a nice affordable suggestion for a new headphone (preferably with noise cancelling) please let me know in the comments below.

As a developer, you know how hard it can be. If you have an off day:

So here is a list of Spotify playlists for coders. Please feel free to share your spotify coding playlist in the comments!

  1. A soundtrack for coding, 9911 followers
  2. Coding programming hacking slashing – tracks I listen to while writing code, 2672 followers
  3. Chill coding musix, 2625 followers
  4. Music for programming, 1500 followers
  5. A soundtrack for coding: the 2am session, 1042 followers
  6. Coding tracks, 808 followers
  7. Coding music, 463 followers
  8. Coding for hackers, 386 followers
  9. Development on the beat, 348 followers

The “followers” data is from 21th of july 2014. I will try to keep this list up-to-date after each comment. Ow and please post a comment if you have a good affordable noise cancelling over-ear headphone tip!

Good luck coding/hacking/developing/programming!

Pin on pinterest Plus on Googleplus Post on LinkedIn
0 Comments

There are a lot of guides online on how to start mining bitcoins, and a lot of them require your pc running mining software and eating all resources or buying expensive dedicated hardware. This guide is for the option in between. A dedicated USB miner. It’s inexpensive and can get up to 2GH/s. I have bought an overclockable Bitmain Antminer U2 which can get up to 2.2GH/s if you overclock it.

http://ecx.images-amazon.com/images/I/51YQ00d3lrL._SY300_.jpgYou won’t get rich with this usb miner by the way. In six hours I mined about 0,5 eurocent. But it is fun to explore and try out. I paid 25 dollar for the usb miner, which is about 18 euro. So it will take me about three years to it earn back. Not to mention power consumption.

So once you have bought your usb miner. Download BGFMiner for your operating system. I needed the x64 version for my Windows 8.1. Unzip it and remember the location. (mine was C:\bfgminer-4.0.0-win64) The next step is to download the driver for the usb miner and install it. Plug in your usb stick and launch a command prompt (or create a .cmd file in notepad)

c:\bfgminer-4.0.0-win64\bfgminer.exe -o PROTOCOL://POOL_URL:PORT -u MY_WORKER_NAME -p WORKER_PASSWORD -S antminer:all --set-device antminer:clock=x0781

I have setup an account at bitcoin.cz this will give you an address like stratum+tcp://stratum.bitcoin.cz:3333 and the worker name and password.

BitcoinThe ‘clock’ hexadecimal variable is to overclock. Please keep in mind that this usb miner gets really hot by default. So add extra cooling if you want to go up to 2.0Gh/s or 2.2Gh/s

x0781 = 1.6 GH/s

x0881 = 1.8 GH/s

x0981 = 2.0 GH/s

x0A81 = 2.2 GH/s

Some tips:

Good luck mining!

Pin on pinterest Plus on Googleplus Post on LinkedIn