Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e70147a

Browse files
committed
Added images and corrected links
1 parent 731ec82 commit e70147a

File tree

1,684 files changed

+89
-89
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,684 files changed

+89
-89
lines changed

_posts/2010-07-28-log-into-a-website-from-vbnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The first thing we need to go is set up our form, you will need to add the follo
3737

3838
I did some docking and other stuff to make my form look pretty but you don’t need to do this if you don’t want to. This is what my form looked like once I had added all the controls;
3939

40-
![](https://samjenkins.com/wp-content/uploads/2010/07/formlayout.jpg)
40+
![](/assets/images/2010/07/formlayout.jpg)
4141

4242
Now for some of the good stuff, double click on the form header to get yourself to the code screen with the Form\_Load event created. In the Form1\_Load event we want to add the following code;
4343

_posts/2010-07-28-the-use-of-the-random-class.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ End Class
4848

4949
If you run this you’re likely to get an outcome similar to this;
5050

51-
![](https://samjenkins.com/wp-content/uploads/2010/07/badrandom.jpg)
51+
![](/assets/images/2010/07/badrandom.jpg)
5252

5353
As you can see from the code they are creating a new Random object every time they want to get a random number. This is where the problem lies, the Random class requires a seed and if the programmer doesn’t supply a seed then the current system clock is used. Another thing to note about the seed for the Random class is that if you provide the same seed then the number that you receive when you call Next() will be the same.
5454

@@ -77,7 +77,7 @@ End Class
7777

7878
Now if you was to run the application and click on the button you will receive an output that looks more appropriate;
7979

80-
![](https://samjenkins.com/wp-content/uploads/2010/07/goodrandom.jpg)
80+
![](/assets/images/2010/07/goodrandom.jpg)
8181

8282
Obviously as this is random there is the possibility that when you click the button you will receive the same sort of output as above although that is highly unlikely and also it is not going to happen over and over again if you keep pressing the button like it would before hand.
8383

_posts/2010-08-09-multi-column-listbox.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ In order for you to get the ListView to act like a multicolumn ListBox you need
4141

4242
Once you have set the ListView properties appropriately, then you will need to click on the arrow on the top right of the ListView control on your form and click on “Edit Columns”.
4343

44-
![Viewing the ListView's available tasks](https://samjenkins.com/wp-content/uploads/2010/08/listview-tasks.jpg "Viewing the ListView's available tasks")
44+
![Viewing the ListView's available tasks](/assets/images/2010/08/listview-tasks.jpg "Viewing the ListView's available tasks")
4545

4646
You will then be presented with the following form, which allows for you to define the columns that will be in the ListView control.
4747

48-
![View the collection of column headers](https://samjenkins.com/wp-content/uploads/2010/08/columnheader-editor.jpg "View the collection of column headers")
48+
![View the collection of column headers](/assets/images/2010/08/columnheader-editor.jpg "View the collection of column headers")
4949

5050
When you click on “Add” you will be displayed the following. Change the “Text” property to the text that you wish to appear as the column header. If you wish to set the “Width” property then do so, but later I will talk about how to resize your columns to the appropriate width after you have inserted the data.
5151

52-
![Add a ColumnHeader](https://samjenkins.com/wp-content/uploads/2010/08/add-columnheader.jpg "Add a ColumnHeader")
52+
![Add a ColumnHeader](/assets/images/2010/08/add-columnheader.jpg "Add a ColumnHeader")
5353

5454
Repeat this for each column that you wish to have in your ListView.
5555

@@ -95,7 +95,7 @@ End Class
9595

9696
You would probably be looping through some data set adding to the ListView but this shows you how you can add the data. Arr(0) is the first column, arr(1) is the second column, arr(2) is the third column and guess what arr(3) is the fourth column. The result of the above code is;
9797

98-
![Output 1](https://samjenkins.com/wp-content/uploads/2010/08/output-1.jpg "Output 1")
98+
![Output 1](/assets/images/2010/08/output-1.jpg "Output 1")
9999

100100
Now as you can see we have 4 columns with data in them, but each of the columns are wider than they need to be so how can we get it so that so that the columns are resized to be the appropriate width? They we can do this is by using the following code.
101101

@@ -109,15 +109,15 @@ End Sub
109109

110110
Which gives you the following result;
111111

112-
![Output 2](https://samjenkins.com/wp-content/uploads/2010/08/output-2.jpg "Output 2")
112+
![Output 2](/assets/images/2010/08/output-2.jpg "Output 2")
113113

114114
There are two options when setting the width;
115115

116116
-2 Will look like what you have above. This is that each of the columns are resized to the width of the content of the column, but if you look at Column 4 you will notice that the width of the column has been set to the remainder of the ListView control.
117117

118118
-1 Will give you the form shown below. Again each of the columns are resized to the width of the content of the column and this time Column4 doesn’t extend for the rest of the ListView control.
119119

120-
![Output 3](https://samjenkins.com/wp-content/uploads/2010/08/output-3.jpg "Output 3")
120+
![Output 3](/assets/images/2010/08/output-3.jpg "Output 3")
121121

122122
**Sorting a column**
123123

_posts/2011-08-04-installed-excel-versions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ tags:
4545

4646
Microsoft Excel is probably one of the most used pieces of software on the planet. Spreadsheets are used heavily throughout the business world and Microsoft have enjoyed their Office suite taking a large proportion of businesses
4747

48-
![The Microsoft Excel 2007 splash screen](https://samjenkins.com/wp-content/uploads/2011/08/excel-logo-300x157.jpg)
48+
![The Microsoft Excel 2007 splash screen](/assets/images/2011/08/excel-logo-300x157.jpg)
4949

5050
There was a question recently on [Stack Overflow](http://stackoverflow.com/questions/6882010/how-to-choose-which-excel-version-to-open-using-vb-net "The question") which I felt was a challenge to answer as I couldn’t find anywhere online which appeared to give an answer on how to do it. After some time going through the registry, I was able to identify how to figure out which versions of Excel were installed.
5151
The following snippet of code is what I came up with to answer the question, the variable rtn is a Dictionary which stores the version of Excel as the key and the directory in which Excel is installed as the value.

_posts/2013-03-17-password-storage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ We are regularly asked when registering for a website to make sure that we use a
4444

4545
Yesterday I realised that I had forgotten my password for a web hosting service that I use, so I went to the ‘Forgot my password’ and entered my email address. What I received upset me, they had not sent me the standard reset my password email, they sent me an email containing my username and password!
4646

47-
[![Email from Streamline, showing their poor password storage strategy](https://samjenkins.com/wp-content/uploads/2013/03/Email-from-Streamline.png)](https://samjenkins.com/wp-content/uploads/2013/03/Email-from-Streamline.png)<figcaption class="wp-caption-text" id="caption-attachment-16">The ‘Forgot my password’ email from a hosting company, showing their poor password storage strategy</figcaption></figure>
47+
[![Email from Streamline, showing their poor password storage strategy](/assets/images/2013/03/Email-from-Streamline.png)](/assets/images/2013/03/Email-from-Streamline.png)<figcaption class="wp-caption-text" id="caption-attachment-16">The ‘Forgot my password’ email from a hosting company, showing their poor password storage strategy</figcaption></figure>
4848

4949
This tells me instantly that their password storage strategy is flawed, they should not be able to retrieve the plain text version of my password. You would have hoped with the number of large websites which have had their user details stolen that companies would have realised that they need a decent password storage policy. Some great examples of where the password storage strategy has not been adequate are [Tesco](http://www.theregister.co.uk/2012/07/31/tesco_website_insecurity/ "TheRegister - Tesco Web Insecurity"), [Gawker](http://www.bbc.co.uk/news/technology-11998648 "BBC News - Gawker hack triggers password resets at major sites"), [ABC](http://www.mailguard.com.au/blog/hashed-abc-passwords-cracked-by-australian-security-researcher/ "Mailguard.com.au - “Hashed” ABC Passwords Cracked by Australian Security Researcher") and of course [Sony](http://www.zdnet.com/article/sony-hacked-again-another-1m-passwords-exposed/ "Sony Hacked Again, 1 Million Passwords Exposed").
5050

_posts/2013-03-24-password-storage-how-to-do-it-right.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ tags:
4343

4444
I’ve spoken before in some of my other blog posts (some of which haven’t been finished/published yet) about password storage strategies and how it is important to make sure that you choose the right storage strategy. One of my friends pointed out that while it should be a no-brainer not to store passwords plain text or encrypted I didn’t provide any reasoning for those who aren’t familiar with this, so in that spirit, I thought I would do a post on some of the problems with different storage strategies.
4545

46-
[![A user table where the used password storage strategy is plain text](https://samjenkins.com/wp-content/uploads/2013/03/Usertable2.png "Password storage plain text")](https://samjenkins.com/wp-content/uploads/2013/03/Usertable2.png)
46+
[![A user table where the used password storage strategy is plain text](/assets/images/2013/03/Usertable2.png "Password storage plain text")](/assets/images/2013/03/Usertable2.png)
4747
In my opinion, there are three families of storage strategies, plain text, encryption and hashing. Encryption and hashing can be further broken down according to what encryption or hashing algorithm is used to compute the value but they are still the same family. In the following sections, I will discuss the advantages and disadvantages of each.
4848

4949
### Plain Text
@@ -89,7 +89,7 @@ Hashing is different to encryption in that hashing is a one-way process, hashing
8989

9090
So as you can see none of the above solutions is truly perfect, even hashing has the potential of having collisions with easier to guess passwords and attackers being able to use pre-computed tables to look up the plain text. The problem of being able to look up a password from a pre-computed table is an out of the box issue and it is possible to make this harder for an attacker to do with very little work. This can be achieved by using what is referred to as a ‘salt’, a salt is a series of characters which are appended or prepended to a password prior to hashing. What the salt does is mean that if an attacker wishes to brute force all the hashes in a user table then for each user he will have to compute all the values again because each user has a unique salt.
9191

92-
[![Usertable with Hashes](https://samjenkins.com/wp-content/uploads/2013/03/Usertable-with-Hashes.png "User table with Hashes")](https://samjenkins.com/wp-content/uploads/2013/03/Usertable-with-Hashes.png)
92+
[![Usertable with Hashes](/assets/images/2013/03/Usertable-with-Hashes.png "User table with Hashes")](/assets/images/2013/03/Usertable-with-Hashes.png)
9393

9494
Hopefully, you will agree with me that the most appropriate method of storing passwords is to combine the password with a unique salt for that user and to hash the result. By using a unique salt for each user it increases the time commitment for an attacker to get all the passwords. Encryption should only be used in extreme circumstances where you absolutely must be able to retrieve the plain text password (I can’t think of any good reasons off the top of my head) and plain text should never be used as a method for storing passwords.
9595

_posts/2013-03-27-source-control-server-on-your-development-machine.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ tags:
4545

4646
Please before you skip to the comments section to slate me for having a source control server on my development machine please read the whole post, then feel free to slate me if you feel that I am in the wrong, as a techy I am always happy to hear suggestions on how to better my practices. I have included the screenshot below as I feel that it illustrates some of the many reasons for using source control on your projects, I know I am guilty of the first one more often that I would like to admit, but where’s the fun if you don’t try out new things?
4747

48-
[![Reasons for version control](https://samjenkins.com/wp-content/uploads/2013/03/Reasons-for-version-control.png "Reasons for version control")](http://stackoverflow.com/a/1408464/465404)
48+
[![Reasons for version control](/assets/images/2013/03/Reasons-for-version-control.png "Reasons for version control")](http://stackoverflow.com/a/1408464/465404)
4949

5050
For years I have been working on personal projects, these could be little applications to automate something that I was doing, research I am doing for work or just messing about trying out the latest fads. Every time I would create a new project and start messing about with code but never set up any form of source control for these projects, why would I, they were just little apps which would have an incredibly short lifespan. Of course, I knew that I would be going to the deepest darkest level of Developer Hell for what I was doing, no source control and no backup! I wasn’t too worried about the backups as if my laptop died then these little applications would be the least of my worries, but the lack of source control didn’t feel like something that I could explain away. Don’t get me wrong here, if I was to be working on a project that was more than just for fun I would be sure to use a source control server that was not based on my development machine.
5151

_posts/2013-04-04-add-media-in-wordpress.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ tags:
4444

4545
[WordPress ](http://www.wordpress.org "WordPress > Blog Tool, Publishing Platform, and CMS")is one of the most popular content management systems on the Internet, it is used by an estimated 17.5% of websites according to W3Techs ([source](http://w3techs.com/technologies/details/cm-wordpress/all/all "Usage statistics and market share of WordPress for websites")). This is one of those many websites, I recently moved my website over from Joomla to the latest version of WordPress.
4646

47-
[![Add a new post in WordPress, including the Add Media button](https://samjenkins.com/wp-content/uploads/2013/04/ss4-postbox-300x195.png)](http://wordpress.org/)
47+
[![Add a new post in WordPress, including the Add Media button](/assets/images/2013/04/ss4-postbox-300x195.png)](http://wordpress.org/)
4848
During my initial setting up of WordPress, I went online to find suggestions of what to get WordPress set up properly as I had never used it before. I ended up following a few guides <del>WPGlaze,</del> [WPTeach](http://wpteach.com/after-the-install-10-things-to-do-after-installing-wordpress/ "After the Install: 10 Things To Do After Installing WordPress") and [Pro Blog Design](http://www.problogdesign.com/wordpress/10-things-to-do-after-installing-wordpress/ "10 Things to do After Installing WordPress"), which involved things like changing the administrator account to installing certain plugins, one of which I really like it’s called [WordPress SEO by Yoast](http://wordpress.org/extend/plugins/wordpress-seo/ "WordPress SEO by Yoast"). I’m not going to get into what I like about this plugin, what I am going to talk about is how JetPack, which is a standard plugin for WordPress does not play well when combined with WordPress SEO.
4949

5050
### So what’s the problem with the Add Media button?

_posts/2013-04-13-windows-azure-bootcamp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ tags:
4545

4646
I recently took the decision that I wanted to start to get more involved in the wider programming community, by giving back (through this blog and online through things like [StackOverflow](http://stackoverflow.com/users/465404/satal "My StackOverflow profile")) and by attending bootcamps, so I was really pleased when I heard about how Microsoft are doing a free [Windows Azure](http://www.windowsazure.com/ "Windows Azure") Bootcamp. The Bootcamp will be a “one day deep dive class” to introduce you to Windows Azure, this is aimed at both beginners and more seasoned Windows Azure users.
4747

48-
[![Windows Azure logo](https://samjenkins.com/wp-content/uploads/2013/04/Windows-Azure-logo-300x48.jpg)](http://www.windowsazure.com/)
48+
[![Windows Azure logo](/assets/images/2013/04/Windows-Azure-logo-300x48.jpg)](http://www.windowsazure.com/)
4949

5050
There are prerequisites for the attending the bootcamp although none of these should be a problem, they are detailed on the <del>prerequisites page</del> on the bootcamps website but in summary these are;
5151

_posts/2013-04-20-deck-of-cards-in-c.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ tags:
4343

4444
So this is something I have seen a number of times on [StackOverflow](http://stackoverflow.com/ "StackOverflow"), so I thought I would spend some time while I was on a ferry creating a solution for. So what we have is a standard deck of cards, 52 cards (no jokers), 4 suits (Clubs, Diamonds, Hearts and Spades) each with 13 cards (ace through to king). In this post I will go through the code that has been produced and at the bottom of the post there is a download link for the entire solution, unit tests and all.
4545

46-
[![Deck of Cards](https://samjenkins.com/wp-content/uploads/2013/04/playing-cards.jpg)](https://samjenkins.com/wp-content/uploads/2013/04/playing-cards.jpg)
46+
[![Deck of Cards](/assets/images/2013/04/playing-cards.jpg)](/assets/images/2013/04/playing-cards.jpg)
4747

4848

4949
Source: <http://www.leadersinstitute.com/wp-content/uploads/2011/02/playing-cards.jpg>
@@ -185,4 +185,4 @@ This method is like TakeCard although it allows for the user to take more than o
185185

186186
The deck of cards code can be used to implement your own card game software, a solitaire, poker game etc. the code it pretty simple and well defined so shouldn’t require much in the way of adjustments for any standard 52 card deck game. If you want to add Jokers then that will require a little more work but nothing too major (I’m just not too sure about their usage in games so I thought I would leave them out).
187187

188-
Anyway the solution that I produced for the deck of cards is available for download here ([Deck of Cards in C#](https://samjenkins.com/wp-content/uploads/2013/04/Cards.zip))
188+
Anyway the solution that I produced for the deck of cards is available for download here ([Deck of Cards in C#](/assets/images/2013/04/Cards.zip))

0 commit comments

Comments
 (0)