First-come first-served (FCFS)
Shortest-job next (SJN)
Shortest remaining time (SRT)
Round-robin (RR), quantum = 1
Round-robin (RR), quantum = 5
RR is a preemptive scheduler, which is designed especially for time-sharing systems. In other words, it does not wait for a process to finish or give up control. In RR, each process is given a time slot to run. If the process does not finish, it will “get back in line” and receive another time slot until it has completed.
Scheduling
Round-Robin Scheduling
BangTech
Friday, February 24, 2012
Monday, November 21, 2011
Writing Custom Code in SQL Server Reporting Services
To add code to a report 1.On the Report menu, click Report Properties. Note If the Report menu is not available, click within the report design area. 2.On the Code tab, in Custom Code, type the code.
Methods in embedded code must be written in Visual Basic .NET. The following is a sample function to calculate Last Monday.
Public Function StartDate() StartDate = Today.AddDays(-6 - Today.DayOfWeek()) End Function
Labels:
SQL
Friday, November 18, 2011
Run MS Test via the command-line tool MSTest.exe
- Right-click the ‘List of Tests’ option in the tree view on the left and select the ‘New Test List…’ option.
- Fill out the dialog with a meaningful name and description.
- Click the ‘All Loaded Tests’ option in the tree view to display a list of available tests. Right click on the displayed list and select the menu item.
- Running MSTest at the command prompt with the ‘testmetadata’ option pointing to your new vsmdi file will run the tests.
Labels:
VS.NET
Wednesday, November 09, 2011
Replay an IIS web server log
- Click Test and then click New Test.
The Add New Test dialog box is displayed. - Under Add to Test Project, choose one of the options for creating a new test project. For example, click Create a new Visual C# Test Project.
Note: By default, the type of test project shown under Add to Test Project is the type that is currently set as the default in the Options dialog box, which is available onthe Tools menu. For more information, see How to: Configure Test Project Creation. - In the Templates pane, select the type of test you want to add.
- Click OK.
The New Test Project dialog box appears. - Enter a name for the new test project, or accept the default name, and click Create.
- Depending on the type of test you chose, you can either hand-code or generate the newly added test.
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies\ Microsoft.VisualStudio.QualityTools.WebTestFramework.dll
Application must target .NET Framework 4.
To reference the Log Parser, look for the “MS Utility 1.0 Type Library – LogParser Interfaces collection” COM component in the Add Reference dialog.
MSDN: Create a Test Project
Josh Christie: Replay an IIS web server log
VS 2010 compiler error: Interop type XXX cannot be embedded. Use the applicable interface instead.
Labels:
VS.NET
Thursday, October 13, 2011
Prevent popup appearing before the page is fully rendered.
StringBuilder strScript = new StringBuilder();
strScript.Append(" ");
ClientScript.RegisterStartupScript(this.GetType(), "Pop", strScript.ToString());
When you click the Save button, the popup may appear immediately after the postback with the white screen background.
Solution 1:
StringBuilder strScript = new StringBuilder();
strScript.Append(" ");
ClientScript.RegisterClientScriptBlock(this.GetType(), "Pop", strScript.ToString());
Solution 2: Add a timer to the alert
strScript.Append("window.setTimeout('displayMessage()', 1000);\n");
strScript.Append(" ");
ClientScript.RegisterStartupScript(this.GetType(), "Pop", strScript.ToString());
When you click the Save button, the popup may appear immediately after the postback with the white screen background.
Solution 1:
StringBuilder strScript = new StringBuilder();
strScript.Append(" ");
ClientScript.RegisterClientScriptBlock(this.GetType(), "Pop", strScript.ToString());
Solution 2: Add a timer to the alert
strScript.Append("window.setTimeout('displayMessage()', 1000);\n");
Labels:
Web
Monday, September 19, 2011
Registry Edits for Windows XP
Windows XP - Fix Suddenly lost the ability to minimize programs onto the taskbar
Registry Edits for Windows XP
Registry Edits for Windows XP
Labels:
OS
Thursday, September 15, 2011
WYSIWYG HTML editors
elRTE is a WYSIWYG HTML editor for the Web written using jQuery. It features rich text editing, options for changing its appearance and style, insertion and management of various HTML elements with formatting (images, tables, lists, etc.), support for viewing and editing HTML code, and normal and full-screen modes.
elRTE
TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL by Moxiecode Systems AB.
TinyMCE
elRTE
TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL by Moxiecode Systems AB.
TinyMCE
Labels:
Web
PATCH .trim() in JavaScript not working in IE
if (typeof String.prototype.trim !== 'function')
{
String.prototype.trim = function()
{
return this.replace(/^\s+\s+$/g, '');
}
}
Labels:
Javascript
Subscribe to:
Posts (Atom)