Jul 30
2009

Place text and divs beside each other using css

Category: Programming Thomas Frost @ 10:36 AM

I suddenly needed to have some text beside a div, but i just couldn't remember how.

But i figured it out and here is my solution, and yes it's not the most complex thing in the world ;)

html:

Some text <div class="divBesideText"></div>

CSS:

.divBesideText
{
    display: inline;
}

 

Tags:

kick it on DotNetKicks.com

May 4
2009

Custom file extension in IIS and register a HTTP handler in asp.net

Category: Programming Thomas Frost @ 02:25 PM

Good msdn articles on how to add a new file extension in the IIS and registrer the HTTP handler in asp.net

Register the handler: http://msdn.microsoft.com/en-us/library/46c5ddfy(VS.71).aspx

Configure the IIS to accept the new file extension: http://msdn.microsoft.com/en-us/library/bb515343.aspx

Tags: ,

kick it on DotNetKicks.com

Mar 18
2009

Chrome Experiments - JavaScript mania

Category: Other Thomas Frost @ 11:20 PM

 This is a great site if you want to look at some awesome JavaScript and see what it actually is capable of doing, and how well your browser renders JavaScript.

It is called: Chrome Experiments and is as the name says for Google Chrome, it just have a lot of mind blowing experiments that I think is worth checking out

Tags: , , ,

kick it on DotNetKicks.com

Mar 5
2009

If you haven't got the message then listen here

Category: Other Thomas Frost @ 11:20 PM

A friend posted a link to this video and it is just so funny and true that i just had to post it, Write in c - Let it be!

Read more

Tags:

kick it on DotNetKicks.com

Mar 3
2009

SyntaxHighlighter2 extension for Blogengine.net

Category: Programming | Tools Thomas Frost @ 05:31 PM

I wanted to use syntax highlighting on my blog, and I found the well-known SyntaxHighlighter which is started/developed by Alex Gorbatchev.

Now I needed a smart way to implement the files into my blogengine.net application. I found the solution from Chris Blankenship which has made a small extension that implements the scripts and styles you need in the header. The only problem is that it is for the "old" SyntaxHighlighter, so i decided to change the links and update it to SyntaxHighlighter2.0.

How to install:

  1. Download the SyntaxHighlighter2 and place the scripts and styles folders into the SyntaxHighlighter folder that you need to create in the root of your application.
  2. Some tweaks is needed in the css to get the correct path to the images.
  3. Download the new blogengine.net SyntaxHighlighter2.0 extension
  4. Place the file in  ~/App_Code/Extensions/
  5. Now you should be done!

To test it simply build the application and see if the links is in the Page Source.

Or post a quick example like so:

<pre class="brush: js">
    alert("Hello world");
</pre>

This will not work in TinyMCE by default because it makes a lot of changes to the formatted code. Therefore use: FCKeditor. Here is a guide on: How to install FCKeditor on Blogengine.net

Tags: , , , ,

kick it on DotNetKicks.com

Mar 2
2009

New and improved frostyzone

Category: Private Thomas Frost @ 09:46 PM

For the last week i have modified and added a lot of new stuff to my blogengine.net blog, it is ready for publishing but it still needs a little tweaks here and there.

Enjoy!

Change log:

Tags:

kick it on DotNetKicks.com

Feb 19
2009

Ignore query in jQuery treeview persist location

Category: Programming Thomas Frost @ 06:40 AM

The jQuery treeview plugin can be found here, it is a brilliant plugin which makes amazing treeviews.

But when i use:

persist: "location"

 I run into a little "problem", because i would like to have the treeview item selected when i use query's in the URL, and as default it just doesn't select any when using query.

What I need to do is to detect if there is a query in the url and then ignore it, I've done it the following way:

case "location":

var current = this.find("a").filter(function()
{
    return this.href.substring(0, (this.href.indexOf("?") == -1) ? this.href.length: this.href.indexOf("?")).toLowerCase() == location.href.substring(0, (location.href.indexOf("?") == -1) ? location.href.length: location.href.indexOf("?")).toLowerCase();
});

It is a pretty simple fix and works like a charm!

 

EDIT:

This version is also able to handle bookmarks and query in url.

case "location":

var current = this.find("a").filter(function()
{
    var linkLength = (this.href.indexOf("?") != -1) ? this.href.indexOf("?") : (this.href.indexOf("#") != -1) ? this.href.indexOf("#") : this.href.length;
    var link = this.href.substring(0, linkLength);

    var urlLength = (location.href.indexOf("?") != -1) ? location.href.indexOf("?") : (location.href.indexOf("#") != -1) ? location.href.indexOf("#") : location.href.length;
    var url = location.href.substring(0, urlLength);

    return link.toLowerCase() == url.toLowerCase();
});

 

Tags: , ,

kick it on DotNetKicks.com

Feb 18
2009

Windows remote desktop security

Category: Other Thomas Frost @ 08:22 PM

I've been wondering about how secure Windows Remote Desktop actually is, and it seems like you can be pretty protected with some common sense and few changes.

Here are a few tips that I have found while searching:

  • As default all administrators has remote desktop access, so it is a good idea to change the Administrator users name to a different name.
    1. It is found in: Control Panel -> Administrative Tools -> Local Security Policy -> Local Policies -> Security Options
    2. Find: "Accounts: Rename administrator account" in the list, and right click and Properties.
    3. You are able to rename the administrator name here, and then restart the computer.
    4. While your in the Local Policies you can change the values in the Account Policies to be as you want it, like changing the: Account lockout threshold to a few attempts.
  • Another thing is to change the default port number of remote desktop which is 3389, it can be changed the following way.
    1. Go to: Start -> Run -> write "regedit" -> press OK.
    2. Go to the following folder: HKEY_LOCAL_MACHINE -> System -> CurrentControlSet -> Control -> TerminalServer -> WinStations -> RDP-Tcp
    3. Find: "PortNumber" in the list, and right click and "Modify..."
    4. Write your desired port number and remember to add ":PortNumber" at the end of the URL when connecting to your Remote Desktop, and be sure to check if the firewall port is open.

Tags: , ,

kick it on DotNetKicks.com

Feb 14
2009

Convert your Windows Server 2008 to a Workstation

Category: Other Thomas Frost @ 09:38 PM

I use windows server 2008 as a workstation myself, and there are significant changes which can be made to make it much better as a workstation.

A great site that i used to reconfigure mine is: win2008workstation.com, there is guides to everything, from disabling the shutdown tracker to performance increases and much more!

..i can warmly recommend it, because it gives a better workstation experience on a awesome OS.

Tags: , ,

kick it on DotNetKicks.com

Feb 13
2009

Saving changes is not permitted in Microsoft SQL Server Management Studio 2008

Category: Other Thomas Frost @ 06:06 PM

If you try to change columns in a table that you've created you will get the following message:

"Saving changes ins not permitted. The changes you have made require the following table to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created.". I think this option isen't very useful as enabled by default.

The message explains itsel, you have to disable the "Prevent saving changesthat require the table to be re-created", but where is this option.

Tools -> Options -> Table and Database Designers -> Uncheck "Prevent saving changes that require the table to be re-created"

 

Tags: ,

kick it on DotNetKicks.com