Skip to main content

Posts

Showing posts from September, 2013

SQL - Types of Joins

When you join tables, the type of join that you create affects the rows that appear in the result set. You can create the following types of joins: Inner join    A join that displays only the rows that have a match in both joined tables. (This is the default type of join in the  Query and View Designer .) For example, you can join the  titles  and  publishers  tables to create a result set that shows the publisher name for each title. In an inner join, titles for which you do not have publisher information are not included in the result set, nor are publishers with no titles. The resulting SQL for such a join might look like this: SELECT title, pub_name FROM titles INNER JOIN publishers ON titles.pub_id = publishers.pub_id Note Columns containing NULL do not match any values when you are creating an inner join and are therefore excluded from the result set. Null values do not match other null values. Outer join    A join that includes rows

C# - HTTP request with post

HttpWebRequest httpWReq = ( HttpWebRequest ) WebRequest . Create ( "http://domain.com/page.aspx" ); ASCIIEncoding encoding = new ASCIIEncoding (); string postData = "username=user" ; postData += "&password=pass" ; byte [] data = encoding . GetBytes ( postData ); httpWReq . Method = "POST" ; httpWReq . ContentType = "application/x-www-form-urlencoded" ; httpWReq . ContentLength = data . Length ; using ( Stream stream = httpWReq . GetRequestStream ()) { stream . Write ( data , 0 , data . Length ); } HttpWebResponse response = ( HttpWebResponse ) httpWReq . GetResponse (); string responseString = new StreamReader ( response . GetResponseStream ()). ReadToEnd ();

Best Practices for Speeding Up Your Web Site

Minimize HTTP Requests tag: content 80% of the end-user response time is spent on the front-end. Most of this time is tied up in downloading all the components in the page: images, stylesheets, scripts, Flash, etc. Reducing the number of components in turn reduces the number of HTTP requests required to render the page. This is the key to faster pages. One way to reduce the number of components in the page is to simplify the page's design. But is there a way to build pages with richer content while also achieving fast response times? Here are some techniques for reducing the number of HTTP requests, while still supporting rich page designs. Combined files  are a way to reduce the number of HTTP requests by combining all scripts into a single script, and similarly combining all CSS into a single stylesheet. Combining files is more challenging when the scripts and stylesheets vary from page to page, but making this part of your release process improves response times. CSS