Running MacOS X on Windows

by Nathan 1. March 2010 08:03

 

Using VMWare 7 you can easily run MacOS X Snow Leopard within windows.

 

 

 

Follow this site and you will be able to succesfully run MacOS within your windows box.

http://www.ihackintosh.com/2009/12/install-snow-leopard-in-vmware-7-windows-edition/

 

Tags:

Windows

Attempted to access an unloaded AppDomain

by Nathan 1. March 2010 07:55
Problem occured when running application in debug mode, have resolved by restarting Visual Studio 2005.

Tags:

ASP.NET

URL Rewriting apache mod_rewrite

by Nathan 24. February 2010 07:54

 

You have to make sure  you have AllowOverride in your httpd.conf for mod_rewrite to work.

To make the rewrite active for a website you have to change the .htaccess file

An example of the content would be:

Options +Indexes
Options +FollowSymlinks
RewriteEngine on
#RewriteBase /
RewriteRule ^(.*)\.html$ $1.php [L] 

This script converts all requests to a .html file to a .php file. So it appears as a HTML file to the end user.

Tags: , ,

PHP

Welcome to BlogEngine.NET 1.6.0

by Nathan 23. January 2010 18:00

If you see this post it means that BlogEngine.NET 1.6.0 is running and the hard part of creating your own blog is done. There is only a few things left to do.

Write Permissions

To be able to log in to the blog and writing posts, you need to enable write permissions on the App_Data folder. If you’re blog is hosted at a hosting provider, you can either log into your account’s admin page or call the support. You need write permissions on the App_Data folder because all posts, comments, and blog attachments are saved as XML files and placed in the App_Data folder. 

If you wish to use a database to to store your blog data, we still encourage you to enable this write access for an images you may wish to store for your blog posts.  If you are interested in using Microsoft SQL Server, MySQL, VistaDB, or other databases, please see the BlogEngine wiki to get started.

Security

When you've got write permissions to the App_Data folder, you need to change the username and password. Find the sign-in link located either at the bottom or top of the page depending on your current theme and click it. Now enter "admin" in both the username and password fields and click the button. You will now see an admin menu appear. It has a link to the "Users" admin page. From there you can change the username and password.  Passwords are hashed by default so if you lose your password, please see the BlogEngine wiki for information on recovery.

Configuration and Profile

Now that you have your blog secured, take a look through the settings and give your new blog a title.  BlogEngine.NET 1.4 is set up to take full advantage of of many semantic formats and technologies such as FOAF, SIOC and APML. It means that the content stored in your BlogEngine.NET installation will be fully portable and auto-discoverable.  Be sure to fill in your author profile to take better advantage of this.

Themes and Widgets

One last thing to consider is customizing the look of your blog.  We have a few themes available right out of the box including two fully setup to use our new widget framework.  The widget framework allows drop and drag placement on your side bar as well as editing and configuration right in the widget while you are logged in.  Be sure to check out our home page for more theme choices and downloadable widgets to add to your blog.

On the web

You can find BlogEngine.NET on the official website. Here you'll find tutorials, documentation, tips and tricks and much more. The ongoing development of BlogEngine.NET can be followed at CodePlex where the daily builds will be published for anyone to download.

Good luck and happy writing.

The BlogEngine.NET team

Tags: ,

Prevent Cache of SWF Files and Xml Content in Flash

by Nathan 19. August 2009 09:17

 

If you like the flash player to expire the content of the SWF file add the following line between your <HEAD></HEAD>  tags

<META HTTP-EQUIV="Expires" CONTENT="Mon, 04 Dec 1999 21:29:02 GMT">
for more information check out: 
http://kb2.adobe.com/cps/147/tn_14743.html 

 

To prevent flash caching xml data, you can use the cache manager extension. It basically adds a timestamp to the querystring so it looks like a unique request.

 

You can download this from here:

http://www.communitymx.com/content/article.cfm?cid=827ea

Once you install the extension the usage is quite simple:

xml.load(CacheManager.uncacheURL(XmlFileLocation));

 

Tags: ,

Flash

Calculating Elapsed Time ActionScript

by Nathan 27. July 2009 09:58

 

function calculateTimeElapsed(startTime:Date,endTime:Date) {
    
    var sHours = startTime.getHours();
    var sMinutes = startTime.getMinutes();
     var sSeconds = startTime.getSeconds();
    var sMilliSeconds = startTime.getMilliseconds();

    var eHours = endTime.getHours();
    var eMinutes = endTime.getMinutes();
     var eSeconds = endTime.getSeconds();
    var eMilliSeconds = endTime.getMilliseconds();
    
    var sTimeSpan = (sHours*3600*1000) + (sMinutes*60*1000) + (sSeconds*1000) + (sMilliSeconds);
    var eTimeSpan = (eHours*3600*1000) + (eMinutes*60*1000) + (eSeconds*1000) + (eMilliSeconds);
    return eTimeSpan - sTimeSpan;
    
}

Tags: ,

Flash

Dynamically Creating Movie Clips in Flash

by Nathan 16. July 2009 05:19

var myText:TextField;

for (var i:Number = 1; i<6; i++) {
        this["clip"+i] = new MovieClip();
        this["clip"+i].graphics.beginFill(0xFFFF00);
        this["clip"+i].graphics.drawCircle(40, 40, 40);
        this["clip"+i].x=i*80;
        myText=new TextField;
        myText.width=250;
        myText.height=250;
        myText.text="clip" +i;
        myText.x=10;
        myText.y=20;
        this["clip"+i].addChild(myText);
        addChild(this["clip"+i]);
}

Tags: ,

Flash

Clearing All Textbox Programatically in ASP.NET Web Form

by Nathan 15. July 2009 11:04

There are multiple ways of doing this ie using JavaScript, but this is the server side solution.

You can adapt this method for several other solutions:

        foreach (Control c in this.Page.Controls)
        {                        
            if(c.GetType().FullName.Equals("System.Web.UI.HtmlControls.HtmlForm")) {
                foreach (Control cForm in c.Controls)
                {                        
                    if(cForm.GetType().Equals(typeof(TextBox))) {   
                        ((TextBox)(cForm)).Text = "";
                    }
                }
            }
        }

Tags:

ASP.NET

SQL UPDATE INNER JOIN

by Nathan 13. July 2009 06:41

 

If you want to update the data in a table by getting information from another table.  You can acheive this by using an update inner join query.

For example if i wanted to update the phone numbers in my table using a list of contacts from a secondary table, the UPDATE INNER JOIN Query would be like the one below:

UPDATE c
SET c.PhoneNumber = c2.PhoneNumber
FROM Contact AS c
INNER JOIN ContactTable2 c2 on c.Id = c2.Id
WHERE DateCreated > GETDATE()-60

Tags:

SQL

Selecting Default Values on Dropdown Lists

by Nathan 2. June 2009 10:17

If you would like your application to set the selected item in your dropdownlist to an item from a variable passed to it, or from the database

Here are some examples:

 

ASP.NET 

<asp:DropDownList ID="DropDownList1" runat="server"/><br />

DropDownList1.SelectedIndex = DropDownList1.Items.IndexOf(DropDownList1.Items.FindByValue(value.ToString()));

 

VBScript ASP Example:

 

  response.write "<select size=""1"" name=""selectData"" id=""selectData"">"
  response.write "<option value='0'>-- Select  Data --</option>"
  do while not objRs.eof

      if (ContactType = objRS("Value")) then
          response.write "<option value='"+cstr(objRS("Value"))+"' selected>"+objRS("Description")+"</option>"
      else
          response.write "<option value='"+cstr(objRS("Value"))+"'>"+objRS("Description")+"</option>"
      end if

      objRs.MoveNext
  loop
  response.write "</select></font></p>"

 

If you have a lot of variables i suggest using a for loop:

 

    response.write "<select name='select1'>"

    Dim MyWebSiteArray
    PrefOddsArray = MyWebSiteArray("web design","design","website","nathan","baker")

    For each Item in MyWebSiteArray

   DatabaseValue = RS("ValueFromDatabase")


   if(DatabaseValue = Item)  then
        response.write "<option value="""+Item+""" selected>"+Item+"</option>\n"
    else
        response.write "<option value="""+Item+""">"+Item+"</option>\n"
    end if
    Next
    response.write "</select></td>"
    response.write "</tr>"

 

 

Tags: , , ,

ASP | ASP.NET

Powered by BlogEngine.NET 1.6.0.0
Theme by Mads Kristensen