Author Archives: admin

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.

[vb]
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
[/vb]

get a substring in SQL SERVER using space as separator

get a substring in SQL SERVER using space as separator

[sql]

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
[/sql]

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

mysql ‘Proper case’ formating a column?

How to do something like:

Proper(“GALHANO.COM”) = “Galhano.com”

there’s no builtin function to do this but we combine CONCAT and SUBSTRING:

[sql]CONCAT(UCASE(SUBSTRING(`fieldName`, 1, 1)),LOWER(SUBSTRING(`fieldName`, 2)))[/sql]

Enterprise Library

The Microsoft Enterprise Library is a collection of reusable software components (application blocks) designed to assist software developers with common enterprise development cross-cutting concerns (such as logging, validation, data access, exception handling, and many others). Application blocks are a type of guidance; they are provided as source code, test cases, and documentation that can be used “as is,” extended, or modified by developers to use on complex, enterprise-level line-of-business development projects.

read more »

Yahoo Condition Code

Yahoo Condition Code
Condition codes are used in to describe the current conditions.

If you want to personalize conditions image icon, you must provide this set of  icons:

Code Description
0 tornado
1 tropical storm
2 hurricane
3 severe thunderstorms
4 thunderstorms
5 mixed rain and snow
6 mixed rain and sleet
7 mixed snow and sleet
8 freezing drizzle
9 drizzle
10 freezing rain
11 showers
12 showers
13 snow flurries
14 light snow showers
15 blowing snow
16 snow
17 hail
18 sleet
19 dust
20 foggy
21 haze
22 smoky
23 blustery
24 windy
25 cold
26 cloudy
27 mostly cloudy (night)
28 mostly cloudy (day)
29 partly cloudy (night)
30 partly cloudy (day)
31 clear (night)
32 sunny
33 fair (night)
34 fair (day)
35 mixed rain and hail
36 hot
37 isolated thunderstorms
38 scattered thunderstorms
39 scattered thunderstorms
40 scattered showers
41 heavy snow
42 scattered snow showers
43 heavy snow
44 partly cloudy
45 thundershowers
46 snow showers
47 isolated thundershowers
3200 not available
This allows you to create your own custom icons.
<img src=”/img/{current_condition_code}.png”>

Outlook.com

With the arrival and availability of its latest e-mail service, the Outlook.com, Microsoft takes a giant step forward in renewing the service Hotmail disponibilizava, and seeks to bring back all users over the years were opting for other services that were appearing and showed themselves better.This email service based on the Internet has all the features you would expect from a similar platform, but also brought some of the features that were already in Hotmail, albeit reinvented and adapted to this new platform.

One of the most interesting that we have at Outlook.com is the ability to create email addresses associated with your personal account. Watch as they can.

A modern interface: faster and cleaner
The simple, fluid and interactive design of Outlook makes it easy to use whether you’re on a desktop, phone or tablet.

Learn more

Get an Outlook email address for your new inbox
You can get a new email address from Outlook. You don’t have to worry about your contacts and previous emails, you’ll keep them. And, you’ll continue receiving messages sent to your Hotmail address.

Get new ID

Bring your inbox to life — Connect Facebook and Twitter
Connect and see your friends’ Facebook updates and Tweets directly in your inbox. Your contacts’ information is automatically in sync so you don’t miss a thing.

Connect now

Computer Hardware Chart

Computer Hardware Chart
Computer Hardware Chart

Yahoo! Query Language

What is YQL?

The Yahoo! Query Language is an expressive SQL-like language that lets you query, filter, and join data across Web services. With YQL, apps run faster with fewer lines of code and a smaller network footprint.

Yahoo! and other websites across the Internet make much of their structured data available to developers, primarily through Web services. To access and query these services, developers traditionally endure the pain of locating the right URLs and documentation to access and query each Web service.

With YQL, developers can access and shape data across the Internet through one simple language, eliminating the need to learn how to call different APIs.

How Do I Get Started?

  1. Check out the YQL Console.
  2. Complete the The Two-Minute Tutorial.
  3. Read how to access YQL from your application.
  4. Get your API Keys to sign your requests if you need them.
  5. Check out the YQL frequently asked questions (FAQ) for answers to common issues.

read more »

Gerenating a GUID using Delphi 7

GUID – Globally Unique IDentifier

In Delphi, GUID values are represented with the TGuid record defined in the System unit. A Guid value is a 128-bit integer (16 bytes) that can be used in database applications when a unique identifier is required.
When developing database applications, the TGuidField is used to represents a guid field in a dataset.

[delphi]

procedure TForm1.btnGetGUIDClick(Sender: TObject);
var
Guid: TGUID;
begin
CreateGUID(Guid);
form1.label1.Caption := GUIDToString(Guid);
end;

[/delphi]

read more »