Performance testing of Dictionary, List and HashSet
This is an interesting article. I won’t spoil the results.
Read all about it here: http://softscenario.blogspot.com/2009/05/performance-testing-of-dictionary-list.html
This is an interesting article. I won’t spoil the results.
Read all about it here: http://softscenario.blogspot.com/2009/05/performance-testing-of-dictionary-list.html
Recently, while I was browsing through some of the ftp logs on my Ubuntu server, I’ve noticed some unsuccessfull login attempts with random usernames, spamming every few seconds.
Here’s a few of the solutions I have found to avoid such scripts from wasting too many of your resources:
This code will run on the first column until it finds an empty cell. To change the column, modify the ’1′ with the desired column number in this line
While Cells(Cursor + StartRow, 1) <> ""
Here is the macro.
Sub Macro1()
Dim start As Integer ' row to start on
Dim i As Integer
Dim c As Integer
start = 2
c = 0
i = 1
While Cells(c + start, 1) <> ""
If (i Mod 33 <> 0) Then
Rows(CStr(c + start) & ":" & CStr(c + start)).Delete Shift:=xlUp
Else ' skip row
c = c + 1
End If
i = i + 1
Wend
End Sub
Products that will be launched by the end of this year:
Products to be launched in the first half of 2010:
Product names in quotes have no marketing name yet.
The nested loops join, also called nested iteration, uses one join input as the outer input table (shown as the top input in the graphical execution plan) and one as the inner (bottom) input table. The outer loop consumes the outer input table row by row. The inner loop, executed for each outer row, searches for matching rows in the inner input table.
Information sources:
In Microsoft SQL Server the Nested Loop Join will be chosen if one of the tables is small and the other table has an index on the column that joins the tables. The join type can be enforced by using the OPTION clause.
SELECT a.field1 FROM table1 a JOIN table2 b ON a.table1_id = b.table2_id
There are three types of Nested-Loop join:
Hash joins are used for many types of set-matching operations: inner join; left, right, and full outer join; left and right semi-join; intersection; union; and difference. Moreover, a variant of the hash join can do duplicate removal and grouping (such as SUM(salary) GROUP BY department). These modifications use only one input for both the build and probe roles.
Information sources:
Currently, MySQL doesn’t support this.
The merge join requires that both inputs be sorted on the merge columns, which are defined by the equality (WHERE) clauses of the join predicate. The query optimizer typically scans an index, if one exists on the proper set of columns, or places a sort operator below the merge join. In rare cases, there may be multiple equality clauses, but the merge columns are taken from only some of the available equality clauses.
Information sources:
Further reading:
Microsoft plans to formally banish the popular programming function that’s been responsible for an untold number of security vulnerabilities over the years, not just in Windows but in countless other applications based on the C language. Effective later this year, Microsoft will add memcpy(), CopyMemory(), and RtlCopyMemory() to its list of function calls banned under its secure development lifecycle.
Source: http://www.theregister.co.uk/2009/05/15/microsoft_banishes_memcpy/
Just banged my head on this one today while working on a new project in C#.
Here’s how you can return 0 in case SUM() or any other math function returns NULL.
SELECT COALESCE((SUM(myfield)),0) FROM mytable;
COALESCE() returns the first non-null value, therefore if SUM() is null, then it will return the following 0.
// Populate the row
string[] row = new string[] {"Item 1","Item 2","Item 3"};
//Add the row to the DataGridView
dataGridView.Rows.Add(row[0]);
You can, of course, create an object array with multiple row arrays and use a foreach to add them all to the DataGridView.
Worth every minute. Amazing.
http://www.wolframalpha.com/screencast/introducingwolframalpha.html
You can download an alpha version on codeplex by following this link http://phpazure.codeplex.com/. Only for PHP >= 5.2.4.
- Overview
- Enables PHP developers to take advantage of the Microsoft Cloud Services Platform – Windows Azure.
- Provides consistent programming model for Windows Azure Storage (Blobs, Tables & Queues)
- Features
- PHP classes for Windows Azure Blobs, Tables & Queues (for CRUD operations)
- Helper Classes for HTTP transport, AuthN/AuthZ, REST & Error Management
- Manageability, Instrumentation & Logging support