My friend just bought a new Lenovo ideapad z580 laptop with Windows 8 on it. She was not sure if her special statistical programs will run on Windows 8, so she asked me to remove Windows 8 and install her copy of Windows 7 64 bit on it. As it turned out the Lenovo laptop arrived with UEFI boot turned on and it did not accept the original Windows 7 64 bit DVD as a boot device. The solution is to turn off UEFI in the BIOS and enable the legacy boot.
To enter the BIOS
- Turn off the Lenovo ideapad z580 laptop
- Press the small “Novo” button next to the power button to turn on the computer and display the Novo Button Menu
- In the Novo Button Menu select BIOS Setup and press Enter
Turn off the UEFI boot mode in the BIOS
- In the BIOS setup select Boot on the top of the screen
- Press Enter on the Boot Mode option and select Legacy Support
- Select Boot Priority, press enter and select Legacy First
Save the BIOS settings
- Select Exit on the top of the screen
- Select Exit Saving Changes and press Enter
- Press Enter on Yes to save the changes
The computer will automatically restart into Windows 8
- Keep the power button pressed to shut it down
Boot from the Windows 7 DVD
- Start the computer with the “Novo” button
- Insert the Windows 7 DVD into the DVD drive
- In the Novo Button Menu select Boot Menu and press Enter
- In the Boot menu select 2. ATAPI CD… and press Enter
Install Windows 7
- The computer will boot from the Windows 7 DVD
- Select Install, Advanced installation
- Delete all partitions on the hard drive
- Create one partition (Windows will create another 100MB system partition for itself)
- Select the large partition as the destination of Windows 7
To enable jQuery intellisense in Microsoft Visual Studio
- Open the _references.js file in the editor by double clicking it
- Drag the jquery-x.x.x.intellisense.js file into the _references.js file in the editor. The name of the file will be added to the _references.js file
If you need to make breaking changes in your source code that will be deployed later to production, but first have to be tested in the development environment you can include conditional compilation symbols to specify which lines will be included in the application for certain environments. This way you can maintain environment specific versions of the source code, the current version for production and the new version for development and testing.
In this example we will make a change in our source code that we want to deploy to the Development environment for testing, but not to QA, UAT and Production.
Create the conditional compilation symbol in the project
- Right click the project
- Select Properties
- On the left side select the Build tab
- Select Dev in the Configuration dropdown
- Enter new_version into the Conditional compilation symbols field
Add the conditional compilation symbol to the source code
- Surround the old and new code with a #if, #else, #endif structure
// New code
int a = 1;
// Old code
int a = 0;
int b = a;
If the Dev configuration is selected the new code will be compiled into the application
If another configuration (QA) is selected the old code will be compiled into the application
There are some settings that can make your work easier in Visual Studio.
Start Microsoft Visual Studio, and in the “Tools” menu select “Options”
– To insert new tabs to the right of existing tabs and keep the already opened tabs in place and
– Show pinned tabs in a separate row
- On the left side select “Environment”, “Tabs and Windows”
- Check “Insert new tabs to the right of existing tabs” and “Show pinned tabs in a separate row”
– To use tabs instead of spaces in edited files
- On the left side select “Text Editor”, “All Languages”, “Tabs”
- Select “Smart” and “Keep tabs”
I work on multiple computers using different operating systems.
When I tried to open a web service solution in Microsoft Visual Studio 2010 on my Windows 7 64 bit workstation I got the following error message:
“The project file … has been moved, renamed or is not on your computer.”
I could verify that the file was on my computer at the stated location, and I could open the same solution in Microsoft Visual Studio 2010 on a Windows Server 2003 32 bit machine. I have recreated the setup file on my Windows 7 64 bit machine, and everything looked all right, but when I closed the solution and tried to open it again I got the same error message. I have counted the length of the full path of the setup project and I got 153. As it turned out, the path was not too long.
The following steps solved the problem, but I still don’t know why:
- Removed the setup project from the solution
- Renamed the setup project file by changing one character of the file name (not the extension)
- Re-added the setup project as an existing project
There are two ways to modify a WordPress theme: the fast way and the smart way.
The fastest way is to edit the files of the theme by selecting the files with the “Appearance”, “Editor” menu option. The drawback is that when the theme is updated your customizations will be wiped out. The update process will overwrite the files you changed, so all of your changes will disappear.
A better way of modifying a theme is to create a “child theme”. This has two advantages:
- By creating a child theme you maintain the changed files in a separate theme (the child theme) so when you update the original (parent) theme your customization is not affected.
- You keep a separate copy of your changes in the child theme, so you can always easily find your modifications without reading through the theme files. You will only maintain the changed lines from the style.css file and your functions.php file will only include your custom functions. Your images folder will only contain your image files.
In this tutorial we will create a child theme for the Simplify theme
- Use your favorite FTP application (mine is FileZilla) and create a folder for the child theme in the wp-content/themes folder
- Right click the “themes” folder and select “Create directory”
- Enter the name of the folder of the child theme
- Double click the new folder name to open it
Right click the empty area of the directory listing and select “Create new file”
Enter style.css as the file name and click OK
- Log into your site as administrator,
- Navigate to the Theme Editor,
- In the upper right corner select the child theme and click the Select button
- In the upper right corner click the “Stylesheet” to open the style.css file
Copy the following to the editor window.
- Enter the name of the new child theme to the “Theme Name” line
- Replace “simplify” with the name of the original theme folder.
Theme Name: Simplify Child
Theme URI: http://example.com/
Description: Child theme for the Simplify theme
Author: Your name here
Author URI: http://example.com/about/
- Click the “Update File” button to save your changes
Select and activate the new child theme
- On the left side select “Appearance” , “Themes”
- On the theme list click the empty image of the new child theme you just created
- Click the “Save & Activate” button to activate the child theme
For more information see:
During the Visual Studio 2010 Web Application and Web Service deployment the prior setting of the application pool name is lost. The installer does not assign the correct application pool to the virtual directory, it will be assigned to the Default Application Pool.
If different .NET versions are assigned to the same application pool, the older .NET applications stop working.
To handle this problem in the VS 2010 msi file follow the steps below.
- Remote desktop into the web server and in the IIS manager create an application pool for your web application.
- Save the following program as SetAppPool.vbs to a common location in your file structure
' Sets the Application Pool of the Virtual Directory
' Right click on the Web Setup project
' Select Add, File
' Select C:\TFS\HALTeam\Other\Deployment_Tools\SetAppPool.vbs
' Right click on the Web Setup project
' Select View, Custom Actions
' Right click on Commit and select "Add Custom Action"
' Select the SetAppPool.vbs file in the Web Application Folder
' In the Properties window of SetAppPool.vbs enter the CustomActionData:
' Example: /vdir:HALGraphicUpload /appPool:HALGraphicUpload
Dim customActionData, customActionArray, vdirName, appPool, vdirObj
' Read the CustomActionData of the Installer
customActionData = Session.Property("CustomActionData")
' Parse the data from the CustomActionData
customActionArray = Split(customActionData) ' Splits by the space
vdirName = Replace(customActionArray(0), "/vdir:", "")
appPool = Replace(customActionArray(1), "/appPool:", "")
' Set the Application Pool property of the Virtual Directory
set vdirObj=GetObject("IIS://localhost/W3svc/1/Root/" & vdirName)
vdirObj.Put "AppPoolId", appPool
- Add the SetAppPool.vbs file to the Setup Project
- Right click the setup project
- Select “View”, “File System”
- On the left side right click the “Web Application Folder” and select “Add”, “File…”
- Browse to the “SetAppPool.vbs” file
- Add a custom action to the setup project
- Right click the setup project
- Select “View”, “Custom Actions”
- Right click on “Commit” and select “Add Custom Action”
- Double click the “Web Application Folder”
- Select “SetAppPool.vbs” and click the “OK” button
- On the left side of the screen right click”SetAppPool.vbs” and select “Properties Window”
- Enter the following into the CustomActionData field
(make sure there is only one space before /appPool and there are no other spaces and quotes in the text)
When you debug your Visual Studio web application you want to start and stop Internet Explorer automatically when you start and stop the debugging session. With the default settings Internet Explorer starts automatically when you start debugging, but it does not close when you stop the execution.
To enable the automatic stop, enable debugging in Internet Explorer:
- Start Internet Explorer,
- On the upper right corner click the gear icon to open the Tools menu,
- Select “Internet options”,
- On the “Advanced” tab of the Internet options window uncheck “Disable script debugging (Internet Explorer)”
- Click “OK”.
Next time when you debug in Microsoft Visual Studio Internet Explorer will start and stop with the debugging session. When you close Internet Explorer it will stop the debugging session in Visual Studio.
If you don’t need a folder in the Subversion database anymore follow the the steps below.
If you are using the TortoiseSVN Subversion client
- Start Windows Explorer,
- Right click any folder,
- Select “TortoiseSVN”, “Repo-browser” to open the repository browser.
In the repository browser:
- Right click the folder you want to remove,
- Select “Delete…”
Enter a message and click the “OK” button.
If you added the AnkhSVN – Subversion Support for Visual Studio from http://ankhsvn.open.collab.net/ you can easily version your files as you develop them.
In your application there could be projects or folders that you don’t want to include in source control.
To ignore the changes in a project open the Solution Explorer in Visual Studio 2010,
- Right click the project that you want to exclude from source control
- Select “Project File”, ‘”Ignore”, “Ignore Folder”