Author Archives: admin

Sendy.co

Send newsletters, 100x cheaper. Sendy is a self hosted email newsletter application that lets you send trackable emails via Amazon Simple Email Service (SES). Complete with reports, subscriber and list management. Amazon SES allows you to send authenticated bulk emails at an insanely low price (just 10 cents per THOUSAND emails). Compared to other emailing services, Amazon SES is 100x cheaper (or more), yet with no loss of quality in terms of deliverability.

www.Sendy.co

Change product key in windows server 2012 or windows 8

1. Use slmgr

  • Open an elevated command prompt and type the following commands:
  • slmgr -upk
    This will remove the key first
  • slmgr -ipk xyzyx-xyzyx-xyzyx-xyzyx-xyzyx
    This will add your key. Of course replace the xyzyx-xyzyx with your own real key.
  • Activate Windows (you will probably have popups already during this process)

2. Use slui.exe

  • Swipe in from the right edge of the screen, and then tap Search. Or, if you are using a mouse, point to the lower-right corner of the screen, and then click Search.
  • In the search box, type Slui.exe 0x3.
  • Tap or click the Slui.exe 0x3 icon.
  • Type your product key in the Windows Activation window, and then click Activate.

3. You can also use the Volume Activation Management Tool (VAMT) 3.0 to change the product key remotely, or if you want to change the product key on multiple computers.

The last two methods can be  found referenced in this KB: http://support.microsoft.com/kb/2750773

 

Top 10 Improvements in ArcGIS Server 10.1

How to remove a VM from Hyper-V

Delete the VM from Hyper-V Manager: Open Hyper-V Manager right click the VM you want to remove and click Delete.

This only removed the VM from that Hyper-V Manager.  It did not delete the VMs files.

This is good for porting this VM to another Hyper-V host or back to the original

SQL Server, Common Table Expressions

A common table expression (CTE) can be thought of as a temporary result set that is defined within the execution scope of a single SELECT, INSERT, UPDATE, DELETE, or CREATE VIEW statement. A CTE is similar to a derived table in that it is not stored as an object and lasts only for the duration of the query. Unlike a derived table, a CTE can be self-referencing and can be referenced multiple times in the same query.

A CTE can be used to:

  • Create a recursive query. For more information, see Recursive Queries Using Common Table Expressions.
  • Substitute for a view when the general use of a view is not required; that is, you do not have to store the definition in metadata.
  • Enable grouping by a column that is derived from a scalar subselect, or a function that is either not deterministic or has external access.
  • Reference the resulting table multiple times in the same statement.

Using a CTE offers the advantages of improved readability and ease in maintenance of complex queries. The query can be divided into separate, simple, logical building blocks. These simple blocks can then be used to build more complex, interim CTEs until the final result set is generated.

CTEs can be defined in user-defined routines, such as functions, stored procedures, triggers, or views.

read more »

Recursive Queries using Common Table Expressions (CTE) in SQL Server

Given the example , hierarchical data structures, organizational charts and other parent-child table relationship reports can easily benefit from the use of recursive CTEs. Common Table Expression is just one of those T-SQL enhancements available for SQL Server 2005. CTEs bring us the chance to create much more complex queries while retaining a much simpler syntax. They also can lessen the administrative burden of creating and testing views for situations where the view will not be reused.

Syntax

WITH cte_alias (column_aliases)
AS
(
cte_query_definition   --initialization
UNION ALL
cte_query_definition2 --recursive execution
)
SELECT * FROM cte_alias

Sample (from Root nodes to Leaf  noes)

WITH Managers AS
(
--initialization
SELECT EmployeeID, LastName, ReportsTo
FROM Employees
WHERE ReportsTo IS NULL
UNION ALL
--recursive execution
SELECT e.employeeID,e.LastName, e.ReportsTo
FROM Employees e INNER JOIN Managers m
ON e.ReportsTo = m.employeeID
)
SELECT * FROM Managers

Sample (From Leaf nodes to Root nodes), where u must specifie the leaves to include/use.

WITH xEmployees AS
(
--initialization
SELECT  EmployeeID, LastName, ReportsTo
FROM Employees
WHERE EmployeeID IN (55,98,65,12)  -- sample Leaf nodes to filter/use
UNION ALL
--recursive execution
SELECT a.EmployeeID,a.LastName,a.ReportsTo
FROM Employees a INNER JOIN xEmployees m
ON a.EmployeeID = m.reportsTo
)
SELECT Distinct EmployeeID, LastName, ReportsTo  FROM xEmployees

!Importante to use “Distinct” statement!

Sucuri SiteCheck

Free Website Malware Scanner
sitecheck.sucuri.net

ASP.NET application serve pages only over HTTPS?

To Serve all the pages over https add this to the Application_BeginRequest method in your Global.asax file.

 Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
   If Request.IsSecureConnection = False Then
     Dim ub As New UriBuilder(Request.Url)
     ub.Scheme = Uri.UriSchemeHttps
     ub.Port = 443
     Response.Redirect(ub.Uri.ToString, True)
   End If
 End Sub
 

get a substring in SQL SERVER using space as separator

get a substring in SQL SERVER using space as separator


SELECT CASE CHARINDEX(' ', news.description, 40)
  WHEN 0 THEN news.description
  ELSE SUBSTRING(news.description, 0, CHARINDEX(' ', news.description, 40) - 0)
  END
 AS FirstWord
FROM news

source:
http://www.dreamincode.net/forums/topic/239440-how-can-i-get-a-substring-in-sql-server-using-space-as-separator/
CHARINDEX (Transact-SQL) http://msdn.microsoft.com/pt-pt/library/ms186323.aspx

SUBSTRING (Transact-SQL)http://msdn.microsoft.com/en-us/library/ms187748.aspx

Infographic: HTML5 and Why Developers Need It

Infographic: HTML5 and Why Developers Need It

HTML5 Infographic by Ignite UI Infragistics Jquery Controls

source:
http://www.infragistics.com/community/blogs/marketing/archive/2012/11/27/infographic-html5-and-why-developers-need-it.aspx