Sunday, 13 January 2013

Django web hosting

I love Django web framework , it's easy  elegant and makes development a joy.
Hot List hosting providers that's are friendly with Django web framework

DotCloud  It's my favorite
Google App Engine
Heroku
Stackable
Djangofoo
Pythonanywhere
RXname 
Webfaction
Linode
DreamHost
Gondor
Webbynode 
Bitnami
Eapps
Appsembler






Friday, 20 April 2012

SharePoint 2010 ListUtility


I had worked with SharePoint 2010 in a short time . 
I do not talk about SharePoint development advantages  , but in my opinion it has more disadvantages than advantages .Development in SP 2010 is very clumsy.
I wrote 3 web parts in it , and I think that  to change or develop something in it is very uncomfortable. 

To handle custom list or SP lists fields you should know it's internal field name . there is some ways to find internal names  for example  look at this.
According this  I write simple app to get fields internal names and list items in grid. 
I think it will be useful for beginners of SharePoint developer.




Tuesday, 13 December 2011

String functions in MSSQL

Part 2

1: LEFT/RIGHT (character expression ,integer expression )
Returns the left or right part of a character string with the specified number of characters.
SELECT LEFT('Hello SQL world',7);
Result will be 'Hello S'
SELECT RIGHT('Hello SQL world',7);
Result will be 'L world'

2: LOWER/UPER (character expression) Returns a character expression after converting uppercase character data to lowercase.
SELECT UPPER('Hello sql world');
Result will be 'HELLO SQL WORLD'
SELECT LOWER('Hello SQL world');
Result will be 'hello sql world'

3: REPLACE (string expression , string pattern ,string replacement) Replaces all occurrences of a specified string value with another string value.
SELECT REPLACE('Hello Google','Google','Microsoft');
Result will be 'Hello Microsoft'

Change all Bill into Goerge:)
USE AdventureWorks2008R2 ;
SELECT FirstName , REPLACE(FirstName,'Bill','Goerge') FROM Person.Person

4 : REVERSE ( string expression ) Returns the reverse of a string value.
SELECT REVERSE('Hello SQl World');
Result Will be 'dlroW lQS olleH'.

Reverse all Firstnames in person Table.
USE AdventureWorks2008R2 ;
SELECT FirstName , REVERSE(FirstName) FROM Person.Person

5 : SUBSTRING (expression,start,length ) Returns character data if expression is one of the supported character data types. Returns binary data if expression is one of the supported binary data types.
SELECT SUBSTRING('Hello SQL World', 2, 3);
Result will be 'ell'

6 : RTRIM/LTRIM (character expression) Returns a character string after truncating all trailing blanks
SELECT RTRIM(' Hello SQL ');
SELECT LTRIM(' Hello SQL ');





Monday, 12 December 2011

String functions in MSSQL

Part 1

In this article I will try to write some examples of string functions in MSSQL

1 : ASCII (expression) - If you want to find numeric value of a character .
SELECT ASCII('b') as LOWER_CASE_B
Result will be 98
SELECT ASCII('B') as UPPER_CASE_B
Result will be 66

2 : LEN(expression) To get the length of a string
DECLARE @test VARCHAR(50);
SET @test = 'this is test example';
SELECT LEN(@test);
Result will be 20


3 :DIFFERENCE(expression,expression) Function is commonly used to search with names.
select DIFFERENCE('SQL','sql1');
Result will be 4

Select all firstname and lastname from person table where
firstname is Similar "Roberto"
USE AdventureWorks2008R2;
SELECT FirstName, LastName FROM Person.Person
WHERE DIFFERENCE(Person.Person.FirstName , 'Roberto') =4;

4 : CHARINDEX (expression1 ,expression2, start location ) - Searches expression2 for expression1 and returns its starting position if found. The search starts at start location.

SELECT CHARINDEX('SQL','Hello SQL world');
Result will be 7
SELECT CHARINDEX('SQL','Hello SQL world',8);
Result will be 0