tag:blogger.com,1999:blog-27203253675924262002024-03-17T22:01:44.423-07:00Useful and interesting web sitesThis blog have blog tutorial, Javascript and HTML tips (including jQuery). Intention of this blog is to help readers and explain things in simple manner. This also include articles about web traffic and SEO (Search engine optimization).Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.comBlogger152125tag:blogger.com,1999:blog-2720325367592426200.post-82721716102467909032021-02-28T10:17:00.007-08:002021-02-28T10:32:32.051-08:00Date sorting in Kendo UI Grid for dd.MM.yyyy format<p>Date sorting not working as expected in Kedno grid when format does not follow the order YEAR -> MONTH -> DAY.</p>
<p>It is because dates are treated as strings objects and they are compared as plain text.</p>
<p>One solution is to parse strings to dates and sorting will work in an expected manner.</p>
<p><b>KendoGridSortedDate.js</b></p>
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><table><tr><td><pre style="margin: 0; line-height: 125%"> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32</pre></td><td><pre style="margin: 0; line-height: 125%"><span style="color: #008800; font-weight: bold">var</span> orders <span style="color: #333333">=</span> [
{ OrderDate<span style="color: #333333">:</span> <span style="background-color: #fff0f0">'10 20 1999'</span> },
{ OrderDate<span style="color: #333333">:</span> <span style="background-color: #fff0f0">'2/06/2015'</span> },
{ OrderDate<span style="color: #333333">:</span> <span style="background-color: #fff0f0">'09/09/2112'</span>}
];
$(<span style="background-color: #fff0f0">"#singleSort"</span>).kendoGrid({
dataSource<span style="color: #333333">:</span> {
schema<span style="color: #333333">:</span> {
model<span style="color: #333333">:</span> {
fields<span style="color: #333333">:</span> {
OrderDate<span style="color: #333333">:</span> {
type<span style="color: #333333">:</span> <span style="background-color: #fff0f0">"date"</span>,
parse<span style="color: #333333">:</span> <span style="color: #008800; font-weight: bold">function</span> (e) {
<span style="color: #008800; font-weight: bold">return</span> <span style="color: #008800; font-weight: bold">new</span> <span style="color: #007020">Date</span>(e)
}
}
}
}
},
data<span style="color: #333333">:</span> orders
},
sortable<span style="color: #333333">:</span> <span style="color: #008800; font-weight: bold">true</span>,
columns<span style="color: #333333">:</span> [
{
field<span style="color: #333333">:</span> <span style="background-color: #fff0f0">"OrderDate"</span>,
title<span style="color: #333333">:</span> <span style="background-color: #fff0f0">"Order Date"</span>,
format<span style="color: #333333">:</span> <span style="background-color: #fff0f0">"{0:dd.MM.yyyy}"</span>
}
]
});
</pre></td></tr></table></div>
<p><b>KendoGridSortedDate.html</b></p>
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><table><tr><td><pre style="margin: 0; line-height: 125%"> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26</pre></td><td><pre style="margin: 0; line-height: 125%"><span style="color: #557799"><!DOCTYPE html></span>
<span style="color: #007700"><html></span>
<span style="color: #007700"><head></span>
<span style="color: #007700"><style>html</span> { <span style="color: #008800; font-weight: bold">font-size</span><span style="color: #333333">:</span> <span style="color: #6600EE; font-weight: bold">12px</span>; <span style="color: #008800; font-weight: bold">font-family</span><span style="color: #333333">:</span> Arial<span style="color: #333333">,</span> Helvetica<span style="color: #333333">,</span> <span style="color: #008800; font-weight: bold">sans-serif</span>; }<span style="color: #007700"></style></span>
<span style="color: #007700"><title></title></span>
<span style="color: #007700"><link</span> <span style="color: #0000CC">rel=</span><span style="background-color: #fff0f0">"stylesheet"</span> <span style="color: #0000CC">href=</span><span style="background-color: #fff0f0">"http://cdn.kendostatic.com/2015.1.318/styles/kendo.common.min.css"</span> <span style="color: #007700">/></span>
<span style="color: #007700"><link</span> <span style="color: #0000CC">rel=</span><span style="background-color: #fff0f0">"stylesheet"</span> <span style="color: #0000CC">href=</span><span style="background-color: #fff0f0">"http://cdn.kendostatic.com/2015.1.318/styles/kendo.default.min.css"</span> <span style="color: #007700">/></span>
<span style="color: #007700"><link</span> <span style="color: #0000CC">rel=</span><span style="background-color: #fff0f0">"stylesheet"</span> <span style="color: #0000CC">href=</span><span style="background-color: #fff0f0">"http://cdn.kendostatic.com/2015.1.318/styles/kendo.dataviz.min.css"</span> <span style="color: #007700">/></span>
<span style="color: #007700"><link</span> <span style="color: #0000CC">rel=</span><span style="background-color: #fff0f0">"stylesheet"</span> <span style="color: #0000CC">href=</span><span style="background-color: #fff0f0">"http://cdn.kendostatic.com/2015.1.318/styles/kendo.dataviz.default.min.css"</span> <span style="color: #007700">/></span>
<span style="color: #007700"><script </span><span style="color: #0000CC">src=</span><span style="background-color: #fff0f0">"http://cdn.kendostatic.com/2015.1.318/js/jquery.min.js"</span><span style="color: #007700">></script></span>
<span style="color: #007700"><script </span><span style="color: #0000CC">src=</span><span style="background-color: #fff0f0">"http://cdn.kendostatic.com/2015.1.318/js/angular.min.js"</span><span style="color: #007700">></script></span>
<span style="color: #007700"><script </span><span style="color: #0000CC">src=</span><span style="background-color: #fff0f0">"http://cdn.kendostatic.com/2015.1.318/js/kendo.all.min.js"</span><span style="color: #007700">></script></span>
<span style="color: #007700"></head></span>
<span style="color: #007700"><body></span>
<span style="color: #007700"><div</span> <span style="color: #0000CC">class=</span><span style="background-color: #fff0f0">"demo-section k-header"</span><span style="color: #007700">></span>
<span style="color: #007700"><div</span> <span style="color: #0000CC">id=</span><span style="background-color: #fff0f0">"singleSort"</span><span style="color: #007700">></div></span>
<span style="color: #007700"></div></span>
<span style="color: #007700"><script </span><span style="color: #0000CC">src=</span><span style="background-color: #fff0f0">"KendoGridSortedDate.js"</span><span style="color: #007700">></script></span>
<span style="color: #007700"></body></span>
<span style="color: #007700"></html></span>
</pre></td></tr></table></div>
<p><b>Source links:</b></p>
<ul>
<li><a href="http://dojo.telerik.com/@boyan.dim/UDAWE">Grid with single column sorting enabled</a></li>
<li><a href="http://jsbin.com/iHUJeXEq/1/edit?html,js,output">Order date string</a></li>
</ul>
<p><b>Sorted grid</b></p>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyPVVYXhRmq3fjTCXVGeZEk6IMaRZHlvkTReJmp0GPqBk6Ru1vqPW01v8041rrmo0E90P9pDTN0a4PNbaitKuWlrKzkGkb6C6un7WwVJz6ru05dEpC-L-Bhy6dxAd2DgPt_0UbsCbh__Y/s0/KendoSortedColumn.JPG" style="display: block; padding: 1em 0; text-align: center; clear: left; float: left;"><img alt="" border="0" data-original-height="175" data-original-width="375" width="350" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyPVVYXhRmq3fjTCXVGeZEk6IMaRZHlvkTReJmp0GPqBk6Ru1vqPW01v8041rrmo0E90P9pDTN0a4PNbaitKuWlrKzkGkb6C6un7WwVJz6ru05dEpC-L-Bhy6dxAd2DgPt_0UbsCbh__Y/s0/KendoSortedColumn.JPG"/></a></div>
Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com0tag:blogger.com,1999:blog-2720325367592426200.post-3951967605569736322021-02-27T07:52:00.002-08:002021-02-27T07:52:07.283-08:00Convert a string to a date with javascript method<p>Change string to date is a frequent action.</p>
<p>Below you can find javascript method which return Date from string.</p>
<p>Function name is <b>stringToDate</b>.</p>
<p>Input parameters are:
<ul>
<li>_date parameter with date in string format</li>
<li>_format parameter - use yyyy, dd and MM. Example : yyyy.MM.dd</li>
<li>_delimiter - delimiter, for example ".". Can be omitted</li>
</ul></p>
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><table><tr><td><pre style="margin: 0; line-height: 125%"> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36</pre></td><td><pre style="margin: 0; line-height: 125%"><span style="color: #333333"><</span>script<span style="color: #333333">></span>
console.log(stringToDate(<span style="background-color: #fff0f0">"01/9/2020"</span>,<span style="background-color: #fff0f0">"dd/MM/yyyy"</span>,<span style="background-color: #fff0f0">"/"</span>)); <span style="color: #888888">// Tue Sep 01 2020 00:00:00 GMT+0200 (Central European Summer Time)</span>
console.log(stringToDate(<span style="background-color: #fff0f0">"9 2020"</span>,<span style="background-color: #fff0f0">"MM yyyy"</span>,<span style="background-color: #fff0f0">" "</span>)); <span style="color: #888888">// Tue Sep 01 2020 00:00:00 GMT+0200 (Central European Summer Time)</span>
console.log(stringToDate(<span style="background-color: #fff0f0">"9/17/2020"</span>,<span style="background-color: #fff0f0">"mm/dd/yyyy"</span>,<span style="background-color: #fff0f0">"/"</span>)); <span style="color: #888888">// Thu Sep 17 2020 00:00:00 GMT+0200 (Central European Summer Time)</span>
console.log(stringToDate(<span style="background-color: #fff0f0">"9-17-2020"</span>,<span style="background-color: #fff0f0">"mm-dd-yyyy"</span>,<span style="background-color: #fff0f0">"-"</span>)); <span style="color: #888888">// Thu Sep 17 2020 00:00:00 GMT+0200 (Central European Summer Time)</span>
console.log(stringToDate(<span style="background-color: #fff0f0">"09/2/2020"</span>,<span style="background-color: #fff0f0">"mm/dd/yyyy"</span>,<span style="background-color: #fff0f0">"/"</span>)); <span style="color: #888888">// Wed Sep 02 2020 00:00:00 GMT+0200 (Central European Summer Time)</span>
console.log(stringToDate(<span style="background-color: #fff0f0">"01/9/2020"</span>,<span style="background-color: #fff0f0">"dd/MM/yyyy"</span>)); <span style="color: #888888">// Tue Sep 01 2020 00:00:00 GMT+0200 (Central European Summer Time)</span>
console.log(stringToDate(<span style="background-color: #fff0f0">"9 2020"</span>,<span style="background-color: #fff0f0">"MM yyyy"</span>)); <span style="color: #888888">// Tue Sep 01 2020 00:00:00 GMT+0200 (Central European Summer Time)</span>
console.log(stringToDate(<span style="background-color: #fff0f0">"9/17/2020"</span>,<span style="background-color: #fff0f0">"mm/dd/yyyy"</span>)); <span style="color: #888888">// Thu Sep 17 2020 00:00:00 GMT+0200 (Central European Summer Time)</span>
console.log(stringToDate(<span style="background-color: #fff0f0">"9-17-2020"</span>,<span style="background-color: #fff0f0">"mm-dd-yyyy"</span>)); <span style="color: #888888">// Thu Sep 17 2020 00:00:00 GMT+0200 (Central European Summer Time)</span>
console.log(stringToDate(<span style="background-color: #fff0f0">"09/2/2020"</span>,<span style="background-color: #fff0f0">"mm/dd/yyyy"</span>)); <span style="color: #888888">// Wed Sep 02 2020 00:00:00 GMT+0200 (Central European Summer Time</span>
<span style="color: #008800; font-weight: bold">function</span> stringToDate(_date,_format,_delimiter)
{
<span style="color: #008800; font-weight: bold">if</span> (<span style="color: #333333">!</span>_delimiter)
_delimiter <span style="color: #333333">=</span> _format.match(<span style="color: #000000; background-color: #fff0ff">/\W/g</span>)[<span style="color: #0000DD; font-weight: bold">0</span>];
<span style="color: #008800; font-weight: bold">var</span> formatLowerCase<span style="color: #333333">=</span>_format.toLowerCase();
<span style="color: #008800; font-weight: bold">var</span> formatItems<span style="color: #333333">=</span>formatLowerCase.split(_delimiter);
<span style="color: #008800; font-weight: bold">var</span> dateItems<span style="color: #333333">=</span>_date.split(_delimiter);
<span style="color: #008800; font-weight: bold">var</span> monthIndex<span style="color: #333333">=</span>formatItems.indexOf(<span style="background-color: #fff0f0">"mm"</span>);
<span style="color: #008800; font-weight: bold">var</span> dayIndex<span style="color: #333333">=</span>formatItems.indexOf(<span style="background-color: #fff0f0">"dd"</span>);
<span style="color: #008800; font-weight: bold">var</span> yearIndex<span style="color: #333333">=</span>formatItems.indexOf(<span style="background-color: #fff0f0">"yyyy"</span>);
<span style="color: #008800; font-weight: bold">var</span> month<span style="color: #333333">=</span><span style="color: #007020">parseInt</span>(dateItems[monthIndex]);
month<span style="color: #333333">-=</span><span style="color: #0000DD; font-weight: bold">1</span>;
<span style="color: #008800; font-weight: bold">var</span> day <span style="color: #333333">=</span> <span style="color: #0000DD; font-weight: bold">1</span>;
<span style="color: #008800; font-weight: bold">if</span> (dayIndex <span style="color: #333333">>=</span> <span style="color: #0000DD; font-weight: bold">0</span>)
day <span style="color: #333333">=</span> dateItems[dayIndex];
<span style="color: #008800; font-weight: bold">var</span> formatedDate <span style="color: #333333">=</span> <span style="color: #008800; font-weight: bold">new</span> <span style="color: #007020">Date</span>(dateItems[yearIndex], month, day);
<span style="color: #008800; font-weight: bold">return</span> formatedDate;
}
<span style="color: #333333"><</span><span style="color: #FF0000; background-color: #FFAAAA">/script></span>
</pre></td></tr></table></div>
Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com0tag:blogger.com,1999:blog-2720325367592426200.post-18002881682436487412021-02-22T11:01:00.009-08:002021-02-27T01:01:51.945-08:00SQL How to group identifiers that are related with each other in specific groups<p>This article is a guide for grouping
mutually related identifiers in groups using SQL. In math terminology, we could say it will find all connected subgraphs of an undirected graph (<a href="https://www.tutorialspoint.com/graph_theory/graph_theory_connectivity.htm">Graph Theory - Connectivity</a>). </p>
<p>A graph is said to be connected if there is a path between every pair of a vertex.</p>
<p>Input, connected ident pairs:</p>
<pre class="lang-sql s-code-block hljs"><code>Ident1 <span class="hljs-operator">|</span> Ident2
<span class="hljs-comment">---------------------------------</span>
<span class="hljs-number"></span> 1 <span class="hljs-operator">|</span> 2
<span class="hljs-number"></span> 1 <span class="hljs-operator">|</span> 3
<span class="hljs-number"></span> 4 <span class="hljs-operator">|</span> 5
<span class="hljs-number"></span> 4 <span class="hljs-operator">|</span> 6
</code></pre>
<p>So, in the example above 1, 2 and 3 are in a group (subgraph) 1. </p>
<p>4, 5 and 6 are in group 2.</p>
<p>Note that 1, 2 and 3 are in the same group although 2 and 3 are not directly related.</p>
<p>Output, idents with related groups:</p>
<pre class="lang-sql s-code-block hljs"><code>Ident <span class="hljs-operator">|</span> Group
<span class="hljs-comment">---------------------------------</span>
<span class="hljs-number"></span> 1 <span class="hljs-operator">|</span> 1
<span class="hljs-number"></span> 2 <span class="hljs-operator">|</span> 1
<span class="hljs-number"></span> 3 <span class="hljs-operator">|</span> 1
<span class="hljs-number"></span> 4 <span class="hljs-operator">|</span> 2
<span class="hljs-number"></span> 5 <span class="hljs-operator">|</span> 2
<span class="hljs-number"></span> 6 <span class="hljs-operator">|</span> 2
</code></pre>
<p>So, how to make connectivity groups of related elements in SQL?</p>
<p>My suggestion which is relatively easy to achieve is to use sp_GetIdentByGroup stored procedure. This stored procedure expects temporary table #PairIds to be created and filled. #PairIds have connected pairs ids. Result set returns Ident columns with Ids from #PairIds which are assigned to a specific group of connected elements.</p>
<p>First stored procedure sp_GetIdentByGroup should be created and after that sp_GetIdentByGroup can be executed to get a result.</p>
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><table><tr><td><pre style="margin: 0; line-height: 125%"> 1
2
3
4
5
6
7
8
9
10
11
12
13</pre></td><td><pre style="margin: 0; line-height: 125%"><span style="color: #008800; font-weight: bold">CREATE</span> <span style="color: #008800; font-weight: bold">TABLE</span> <span style="color: #333333">#</span>PairIds
(
Ident1 <span style="color: #007020">INT</span>,
Ident2 <span style="color: #007020">INT</span>
)
<span style="color: #008800; font-weight: bold">INSERT</span> <span style="color: #008800; font-weight: bold">INTO</span> <span style="color: #333333">#</span>PairIds
<span style="color: #008800; font-weight: bold">VALUES</span> (<span style="color: #0000DD; font-weight: bold">1</span>, <span style="color: #0000DD; font-weight: bold">2</span>),
(<span style="color: #0000DD; font-weight: bold">1</span>, <span style="color: #0000DD; font-weight: bold">3</span>),
(<span style="color: #0000DD; font-weight: bold">4</span>, <span style="color: #0000DD; font-weight: bold">5</span>),
(<span style="color: #0000DD; font-weight: bold">4</span>, <span style="color: #0000DD; font-weight: bold">6</span>)
<span style="color: #008800; font-weight: bold">exec</span> [dbo].[sp_GetIdentByGroup]
</pre></td></tr></table></div>
<p>This stored procedure use cursor for grouping together related elements. The index makes it relatively fast. It is SQL 2012+ compatible.</p>
<p>Script for create [dbo].[sp_GetIdentByGroup] procedure:</p>
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><table><tr><td><pre style="margin: 0; line-height: 125%"> 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137</pre></td><td><pre style="margin: 0; line-height: 125%"><span style="color: #008800; font-weight: bold">CREATE</span> <span style="color: #008800; font-weight: bold">PROCEDURE</span> [dbo].[sp_GetIdentByGroup]
<span style="color: #008800; font-weight: bold">AS</span>
<span style="color: #008800; font-weight: bold">BEGIN</span>
<span style="color: #008800; font-weight: bold">DECLARE</span> <span style="color: #333333">@</span>message <span style="color: #007020">VARCHAR</span>(<span style="color: #0000DD; font-weight: bold">70</span>);
<span style="color: #008800; font-weight: bold">DECLARE</span> <span style="color: #333333">@</span>IdentInput1 <span style="color: #007020">varchar</span>(<span style="color: #0000DD; font-weight: bold">20</span>)
<span style="color: #008800; font-weight: bold">DECLARE</span> <span style="color: #333333">@</span>IdentInput2 <span style="color: #007020">varchar</span>(<span style="color: #0000DD; font-weight: bold">20</span>)
<span style="color: #008800; font-weight: bold">DECLARE</span> <span style="color: #333333">@</span>Counter <span style="color: #007020">INT</span>
<span style="color: #008800; font-weight: bold">DECLARE</span> <span style="color: #333333">@</span>Group1 <span style="color: #007020">INT</span>
<span style="color: #008800; font-weight: bold">DECLARE</span> <span style="color: #333333">@</span>Group2 <span style="color: #007020">INT</span>
<span style="color: #008800; font-weight: bold">DECLARE</span> <span style="color: #333333">@</span>Ident <span style="color: #007020">varchar</span>(<span style="color: #0000DD; font-weight: bold">20</span>)
<span style="color: #008800; font-weight: bold">DECLARE</span> <span style="color: #333333">@</span>IdentCheck1 <span style="color: #007020">varchar</span>(<span style="color: #0000DD; font-weight: bold">20</span>)
<span style="color: #008800; font-weight: bold">DECLARE</span> <span style="color: #333333">@</span>IdentCheck2 <span style="color: #007020">varchar</span>(<span style="color: #0000DD; font-weight: bold">20</span>)
<span style="color: #008800; font-weight: bold">SET</span> <span style="color: #333333">@</span>Counter <span style="color: #333333">=</span> <span style="color: #0000DD; font-weight: bold">1</span>
<span style="color: #008800; font-weight: bold">DECLARE</span> <span style="color: #333333">@</span>IdentByGroupCursor <span style="color: #008800; font-weight: bold">TABLE</span> (
Ident <span style="color: #007020">varchar</span>(<span style="color: #0000DD; font-weight: bold">20</span>) <span style="color: #008800; font-weight: bold">UNIQUE</span> CLUSTERED,
GroupID <span style="color: #007020">INT</span>
);
<span style="color: #888888">-- Use a cursor to select your data, which enables SQL Server to extract</span>
<span style="color: #888888">-- the data from your local table to the variables.</span>
<span style="color: #008800; font-weight: bold">declare</span> ins_cursor <span style="color: #008800; font-weight: bold">cursor</span> <span style="color: #008800; font-weight: bold">for</span>
<span style="color: #008800; font-weight: bold">select</span> Ident1, Ident2 <span style="color: #008800; font-weight: bold">from</span> <span style="color: #333333">#</span>PairIds
<span style="color: #008800; font-weight: bold">open</span> ins_cursor
<span style="color: #008800; font-weight: bold">fetch</span> <span style="color: #008800; font-weight: bold">next</span> <span style="color: #008800; font-weight: bold">from</span> ins_cursor <span style="color: #008800; font-weight: bold">into</span> <span style="color: #333333">@</span>IdentInput1, <span style="color: #333333">@</span>IdentInput2 <span style="color: #888888">-- At this point, the data from the first row</span>
<span style="color: #888888">-- is in your local variables.</span>
<span style="color: #888888">-- Move through the table with the @@FETCH_STATUS=0</span>
WHILE <span style="color: #333333">@@</span>FETCH_STATUS<span style="color: #333333">=</span><span style="color: #0000DD; font-weight: bold">0</span>
<span style="color: #008800; font-weight: bold">BEGIN</span>
<span style="color: #008800; font-weight: bold">SET</span> <span style="color: #333333">@</span>Group1 <span style="color: #333333">=</span> <span style="color: #008800; font-weight: bold">null</span>
<span style="color: #008800; font-weight: bold">SET</span> <span style="color: #333333">@</span>Group2 <span style="color: #333333">=</span> <span style="color: #008800; font-weight: bold">null</span>
<span style="color: #008800; font-weight: bold">SELECT</span> TOP <span style="color: #0000DD; font-weight: bold">1</span> <span style="color: #333333">@</span>Group1 <span style="color: #333333">=</span> GroupID, <span style="color: #333333">@</span>IdentCheck1 <span style="color: #333333">=</span> Ident
<span style="color: #008800; font-weight: bold">FROM</span> <span style="color: #333333">@</span>IdentByGroupCursor
<span style="color: #008800; font-weight: bold">WHERE</span> Ident <span style="color: #008800; font-weight: bold">in</span> (<span style="color: #333333">@</span>IdentInput1)
<span style="color: #008800; font-weight: bold">SELECT</span> TOP <span style="color: #0000DD; font-weight: bold">1</span> <span style="color: #333333">@</span>Group2 <span style="color: #333333">=</span> GroupID, <span style="color: #333333">@</span>IdentCheck2 <span style="color: #333333">=</span> Ident
<span style="color: #008800; font-weight: bold">FROM</span> <span style="color: #333333">@</span>IdentByGroupCursor
<span style="color: #008800; font-weight: bold">WHERE</span> Ident <span style="color: #008800; font-weight: bold">in</span> (<span style="color: #333333">@</span>IdentInput2)
IF (<span style="color: #333333">@</span>Group1 <span style="color: #008800; font-weight: bold">IS</span> <span style="color: #008800; font-weight: bold">NOT</span> <span style="color: #008800; font-weight: bold">NULL</span> <span style="color: #008800; font-weight: bold">AND</span> <span style="color: #333333">@</span>Group2 <span style="color: #008800; font-weight: bold">IS</span> <span style="color: #008800; font-weight: bold">NOT</span> <span style="color: #008800; font-weight: bold">NULL</span>)
<span style="color: #008800; font-weight: bold">BEGIN</span>
IF <span style="color: #333333">@</span>Group1 <span style="color: #333333">></span> <span style="color: #333333">@</span>Group2
<span style="color: #008800; font-weight: bold">BEGIN</span>
<span style="color: #008800; font-weight: bold">UPDATE</span> <span style="color: #333333">@</span>IdentByGroupCursor
<span style="color: #008800; font-weight: bold">SET</span> GroupID <span style="color: #333333">=</span> <span style="color: #333333">@</span>Group2
<span style="color: #008800; font-weight: bold">WHERE</span>
GroupID <span style="color: #333333">=</span> <span style="color: #333333">@</span>Group1
<span style="color: #008800; font-weight: bold">END</span>
IF <span style="color: #333333">@</span>Group2 <span style="color: #333333">></span> <span style="color: #333333">@</span>Group1
<span style="color: #008800; font-weight: bold">BEGIN</span>
<span style="color: #008800; font-weight: bold">UPDATE</span> <span style="color: #333333">@</span>IdentByGroupCursor
<span style="color: #008800; font-weight: bold">SET</span> GroupID <span style="color: #333333">=</span> <span style="color: #333333">@</span>Group1
<span style="color: #008800; font-weight: bold">WHERE</span>
GroupID <span style="color: #333333">=</span> <span style="color: #333333">@</span>Group2
<span style="color: #008800; font-weight: bold">END</span>
<span style="color: #008800; font-weight: bold">END</span>
<span style="color: #008800; font-weight: bold">ELSE</span> IF <span style="color: #333333">@</span>Group1 <span style="color: #008800; font-weight: bold">IS</span> <span style="color: #008800; font-weight: bold">NOT</span> <span style="color: #008800; font-weight: bold">NULL</span>
<span style="color: #008800; font-weight: bold">BEGIN</span>
<span style="color: #008800; font-weight: bold">UPDATE</span> <span style="color: #333333">@</span>IdentByGroupCursor
<span style="color: #008800; font-weight: bold">SET</span> GroupID <span style="color: #333333">=</span> <span style="color: #333333">@</span>Group1
<span style="color: #008800; font-weight: bold">WHERE</span>
Ident <span style="color: #008800; font-weight: bold">IN</span> (<span style="color: #333333">@</span>IdentInput1)
<span style="color: #008800; font-weight: bold">END</span>
<span style="color: #008800; font-weight: bold">ELSE</span> IF <span style="color: #333333">@</span>Group2 <span style="color: #008800; font-weight: bold">IS</span> <span style="color: #008800; font-weight: bold">NOT</span> <span style="color: #008800; font-weight: bold">NULL</span>
<span style="color: #008800; font-weight: bold">BEGIN</span>
<span style="color: #008800; font-weight: bold">UPDATE</span> <span style="color: #333333">@</span>IdentByGroupCursor
<span style="color: #008800; font-weight: bold">SET</span> GroupID <span style="color: #333333">=</span> <span style="color: #333333">@</span>Group2
<span style="color: #008800; font-weight: bold">WHERE</span>
Ident <span style="color: #008800; font-weight: bold">IN</span> (<span style="color: #333333">@</span>IdentInput2)
<span style="color: #008800; font-weight: bold">END</span>
IF (<span style="color: #333333">@</span>Group1 <span style="color: #008800; font-weight: bold">IS</span> <span style="color: #008800; font-weight: bold">NOT</span> <span style="color: #008800; font-weight: bold">NULL</span> <span style="color: #008800; font-weight: bold">AND</span> <span style="color: #333333">@</span>Group2 <span style="color: #008800; font-weight: bold">IS</span> <span style="color: #008800; font-weight: bold">NOT</span> <span style="color: #008800; font-weight: bold">NULL</span>)
<span style="color: #008800; font-weight: bold">BEGIN</span>
IF <span style="color: #333333">@</span>Group1 <span style="color: #333333">></span> <span style="color: #333333">@</span>Group2
<span style="color: #008800; font-weight: bold">BEGIN</span>
<span style="color: #008800; font-weight: bold">UPDATE</span> <span style="color: #333333">@</span>IdentByGroupCursor
<span style="color: #008800; font-weight: bold">SET</span> GroupID <span style="color: #333333">=</span> <span style="color: #333333">@</span>Group2
<span style="color: #008800; font-weight: bold">WHERE</span>
GroupID <span style="color: #333333">=</span> <span style="color: #333333">@</span>Group1
<span style="color: #008800; font-weight: bold">END</span>
IF <span style="color: #333333">@</span>Group2 <span style="color: #333333">></span> <span style="color: #333333">@</span>Group1
<span style="color: #008800; font-weight: bold">BEGIN</span>
<span style="color: #008800; font-weight: bold">UPDATE</span> <span style="color: #333333">@</span>IdentByGroupCursor
<span style="color: #008800; font-weight: bold">SET</span> GroupID <span style="color: #333333">=</span> <span style="color: #333333">@</span>Group1
<span style="color: #008800; font-weight: bold">WHERE</span>
GroupID <span style="color: #333333">=</span> <span style="color: #333333">@</span>Group2
<span style="color: #008800; font-weight: bold">END</span>
<span style="color: #008800; font-weight: bold">END</span>
IF <span style="color: #333333">@</span>Group1 <span style="color: #008800; font-weight: bold">IS</span> <span style="color: #008800; font-weight: bold">NULL</span>
<span style="color: #008800; font-weight: bold">BEGIN</span>
<span style="color: #008800; font-weight: bold">INSERT</span> <span style="color: #008800; font-weight: bold">INTO</span> <span style="color: #333333">@</span>IdentByGroupCursor (Ident, GroupID)
<span style="color: #008800; font-weight: bold">VALUES</span> (<span style="color: #333333">@</span>IdentInput1, <span style="color: #008800; font-weight: bold">ISNULL</span>(<span style="color: #333333">@</span>Group2, <span style="color: #333333">@</span>Counter))
<span style="color: #008800; font-weight: bold">END</span>
IF <span style="color: #333333">@</span>Group2 <span style="color: #008800; font-weight: bold">IS</span> <span style="color: #008800; font-weight: bold">NULL</span>
<span style="color: #008800; font-weight: bold">BEGIN</span>
<span style="color: #008800; font-weight: bold">INSERT</span> <span style="color: #008800; font-weight: bold">INTO</span> <span style="color: #333333">@</span>IdentByGroupCursor (Ident, GroupID)
<span style="color: #008800; font-weight: bold">VALUES</span> (<span style="color: #333333">@</span>IdentInput2, <span style="color: #008800; font-weight: bold">ISNULL</span>(<span style="color: #333333">@</span>Group1, <span style="color: #333333">@</span>COunter))
<span style="color: #008800; font-weight: bold">END</span>
IF (<span style="color: #333333">@</span>Group1 <span style="color: #008800; font-weight: bold">IS</span> <span style="color: #008800; font-weight: bold">NULL</span> <span style="color: #008800; font-weight: bold">OR</span> <span style="color: #333333">@</span>Group2 <span style="color: #008800; font-weight: bold">IS</span> <span style="color: #008800; font-weight: bold">NULL</span>)
<span style="color: #008800; font-weight: bold">BEGIN</span>
<span style="color: #008800; font-weight: bold">SET</span> <span style="color: #333333">@</span>COunter <span style="color: #333333">=</span> <span style="color: #333333">@</span>COunter <span style="color: #333333">+</span><span style="color: #0000DD; font-weight: bold">1</span>
<span style="color: #008800; font-weight: bold">END</span>
<span style="color: #888888">-- Once the execution has taken place, you fetch the next row of data from your local table.</span>
<span style="color: #008800; font-weight: bold">fetch</span> <span style="color: #008800; font-weight: bold">next</span> <span style="color: #008800; font-weight: bold">from</span> ins_cursor <span style="color: #008800; font-weight: bold">into</span> <span style="color: #333333">@</span>IdentInput1, <span style="color: #333333">@</span>IdentInput2
<span style="color: #008800; font-weight: bold">End</span>
<span style="color: #888888">-- When all the rows have inserted you must close and deallocate the cursor.</span>
<span style="color: #888888">-- Failure to do this will not let you re-use the cursor. </span>
<span style="color: #008800; font-weight: bold">close</span> ins_cursor
<span style="color: #008800; font-weight: bold">deallocate</span> ins_cursor
<span style="color: #008800; font-weight: bold">SELECT</span> Ident ,DENSE_RANK() OVER( <span style="color: #008800; font-weight: bold">ORDER</span> <span style="color: #008800; font-weight: bold">BY</span> GroupID <span style="color: #008800; font-weight: bold">ASC</span>) <span style="color: #008800; font-weight: bold">AS</span> GroupID
<span style="color: #008800; font-weight: bold">FROM</span> <span style="color: #333333">@</span>IdentByGroupCursor
<span style="color: #008800; font-weight: bold">END</span>
<span style="color: #008800; font-weight: bold">GO</span>
</pre></td></tr></table></div>
Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com0tag:blogger.com,1999:blog-2720325367592426200.post-1937693002597282882021-02-21T01:46:00.006-08:002021-02-21T01:58:14.380-08:00How to add code snippet in blogger<p>After a a while I wanted to write new blog post with snippet of SQL code. After googled "add code snippet to blogger" search terms at the of the results a link to the <a href="http://hilite.me/"><b>hilite web</b></a> was found.</p>
<p>It is a very easy to use web. I recommend.</p>
<p>It can be used for various programming languages.</p>
<p>The user only needs to:</p>
<ul>
<li>
Type source code
</li>
<li>
Choose Language, Style and Line numbers
</li>
<li>
Click the Higlight button, Preview will appear the and the user only needs to copy and paste HTML code from HTML textbox into blogger post (in HTML view)
</li>
</ul>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgSOZ40QYpj2iSFgjz8AEnqriIeQ7SiL5yAy-QHOB6rAj2wgutKqPleI6tcUr7OlHW_Gw8ycGnIaxXImAptmrZbO3bi-JR1vF8f3OJrFijUZZTTdpSoxUoUrZRfR4Q4aYm8dpsItBRTtU/s0/hilite_me.JPG" style="display: block; padding: 1em 0; text-align: center; clear: left; float: left;"><img alt="" border="0" data-original-height="475" data-original-width="1061" width="420" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgSOZ40QYpj2iSFgjz8AEnqriIeQ7SiL5yAy-QHOB6rAj2wgutKqPleI6tcUr7OlHW_Gw8ycGnIaxXImAptmrZbO3bi-JR1vF8f3OJrFijUZZTTdpSoxUoUrZRfR4Q4aYm8dpsItBRTtU/s0/hilite_me.JPG"/></a></div>Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com0tag:blogger.com,1999:blog-2720325367592426200.post-82548013151840000452014-05-22T12:47:00.000-07:002014-05-22T12:47:41.393-07:00.NET project on online Source control<p>Visual Studio 2013 express have a option to add your project to Source Control. It is easy to add project to local repository location. In this article you will find step by step tutorial how to add your project to free private Source control located on the internet.</p>
<p>Bitbucket supports private or public Git/Mercurial repositories up to 5 users.</p>
<b>Why you need online Source control Repository?</b>
<p>Let's say you developing your project and one day your computer crash down. It is pity to lose all your development effort till this point. So if you have local Source Control repository you will lost everything. But if you have online repository you could continue to work from your last check in on other computer.</p>
<p>Of course, there are other reasons why you should use online Source safe like sharing work and code with other people who are distant from you but in my case online backup is main reason to use online source control.</p>
<b>Step by step guide for online Source Control with Visual Studio 2013 express</b>
<ul>
<li>To add your project to Source control click FILE --> Add to Source Control</li>
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG8hk52eEA8cyJmqkXI51P9MZOdyx5Mfu3ZpPUwD1U1ZHEltLgIN02G0t8Oh_qDgzO0Y4YdDZMMcvMidp_8NsfIkmxQMDaSPaOT4g1D6_BmOArhakOmZbZ7ov7YuztLfGAaxaXCXWnG7o/s1600/AddTo+SourceControl.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG8hk52eEA8cyJmqkXI51P9MZOdyx5Mfu3ZpPUwD1U1ZHEltLgIN02G0t8Oh_qDgzO0Y4YdDZMMcvMidp_8NsfIkmxQMDaSPaOT4g1D6_BmOArhakOmZbZ7ov7YuztLfGAaxaXCXWnG7o/s400/AddTo+SourceControl.jpg" height=200 /></a>
<br />
<br />
<li>Choose Git radio button and click OK</li>
<br />
<li>If you get error like this: "<b>The current solution has projects that are located outside the solution folder. These projects will not be source controlled in the Git repository...</b>" check <a href="http://interestingwebs.blogspot.com/2014/05/add-asp-net-empty-web-site-to-git.html">Add ASP .NET Empty Web Site to Git Source control</a></li>
<br />
<li>Open Team Explorer, VIEW --> Team Explorer</li>
<br />
<li>Choose <b>Changes</b> in dropdown of Team Explorer window</li>
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifhBP8Dy0e-fMOkfA_ShrtEQqDNYthkab4dT_qb5ednDAdd_b8Ws9Z20X88-6MO_ceh4Q3AVufWK60PS33TxzIQQEOCH-vVDTfa_JM-YbbySAPJzt-e7FuhkmH18dlD9PSBxcs3vZOEAE/s1600/ChangeTeamExplr.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifhBP8Dy0e-fMOkfA_ShrtEQqDNYthkab4dT_qb5ednDAdd_b8Ws9Z20X88-6MO_ceh4Q3AVufWK60PS33TxzIQQEOCH-vVDTfa_JM-YbbySAPJzt-e7FuhkmH18dlD9PSBxcs3vZOEAE/s1600/ChangeTeamExplr.jpg" height=200 /></a>
<br />
<br />
<li>Commit to local GIT, enter the comment (eg. "Initial Commit") and choose Commit from dropdown</li>
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie9aSGQ0B4tlUmM9BAeO5SKMpkgqjdy5_XhLWM8lWyFA5U0E9emT2qje7tRUV7T2fyNjjcNpKbdXJOnTbQkf4yPKHdVXW3HtMpWgI-NyzD-TBgKn3d80HRBlCMJu4wrevaMrDL3kNC7xE/s1600/CommitSourceControl.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie9aSGQ0B4tlUmM9BAeO5SKMpkgqjdy5_XhLWM8lWyFA5U0E9emT2qje7tRUV7T2fyNjjcNpKbdXJOnTbQkf4yPKHdVXW3HtMpWgI-NyzD-TBgKn3d80HRBlCMJu4wrevaMrDL3kNC7xE/s1600/CommitSourceControl.jpg" height=150 /></a>
<br />
<br />
<li>Click on "Unsynced Commits"</li>
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC2uN93IpzAGNiBpkzcqbJo8k5CvIdsA9-TEcyQGX5Rb8_xhZ9fmd3b_P6Sx-002srQL8km61f0i9oltVLQt5vFlMjVJ3xSsoKYHLYCjuCC4_TFMKEnKT1z0kznsfl_Qgtxh656M7E5Xs/s1600/CommitSourceControl2.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC2uN93IpzAGNiBpkzcqbJo8k5CvIdsA9-TEcyQGX5Rb8_xhZ9fmd3b_P6Sx-002srQL8km61f0i9oltVLQt5vFlMjVJ3xSsoKYHLYCjuCC4_TFMKEnKT1z0kznsfl_Qgtxh656M7E5Xs/s1600/CommitSourceControl2.jpg" height=150 /></a>
<br /><br />
<li>Now you need to enter URL of an empty GIT repo, to get this URL you need to create account on Bitbucket</li>
<br />
<ul>
<li><b>Creating Bitbucket repository</b></li>
<br />
<li>Go to <a href="https://bitbucket.org/">Bitbucket</a> and Sign up for free</li>
<br />
<li>Click on button Create to create new Bitbucket repository</li>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFs8Aq9-pdhNOJo3wYMJX7Dtw3RCmBTa-s50bcpifqDJA1VOcqjuluGv4QRAjTorurklLQmGMFuJyXXJL3TQrtjKh6P15dpn6YHWF4k-QVhHxNEWy8vpzaJFmLJ0OxjkHsRlzZJlQBmKU/s1600/CreateBitbucketRepository.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFs8Aq9-pdhNOJo3wYMJX7Dtw3RCmBTa-s50bcpifqDJA1VOcqjuluGv4QRAjTorurklLQmGMFuJyXXJL3TQrtjKh6P15dpn6YHWF4k-QVhHxNEWy8vpzaJFmLJ0OxjkHsRlzZJlQBmKU/s1600/CreateBitbucketRepository.jpg" width=400 /></a>
<br /><br />
<li>enter Name, Description, Access level (in this sample I checked private repostiroy checkbox), Repository type (Git) and Language (C#)</li>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW_7P7OWN6oy5Wxbg9X2aR-bU9mQJ7WWU7s3Km8NdWxkWHhGBUSrodV6_ux3nmgK7V0jBbgrDKlvUVpdkWGRysbFCCWJ1KEhhok7cU115wmRf33LkQgMEQWzkXqGSix_LIKq_duJjpPGo/s1600/BitBucketCreateRepo.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW_7P7OWN6oy5Wxbg9X2aR-bU9mQJ7WWU7s3Km8NdWxkWHhGBUSrodV6_ux3nmgK7V0jBbgrDKlvUVpdkWGRysbFCCWJ1KEhhok7cU115wmRf33LkQgMEQWzkXqGSix_LIKq_duJjpPGo/s1600/BitBucketCreateRepo.jpg" width=400 height=300 /></a>
<br />
<li>after Create repository button is clicked you create new repository</li>
<br />
<li>next step is to copy URL, <br />
URL is in format :<br />
https://bitbucket.org/<b>[ProfileName]</b>/<b>[RepoName]</b>
<br />
So if my profile on bitbucket is <b>Me</b> URL will be:<br />
https://bitbucket.org/Me/newwebsite</li>
<br />
<li>let's go back on Visual Studio 2013</li>
</ul>
<br />
<li>In Visaul Studio in Team Explorer paste link of your BitBucket Repository and click Pubish</li>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW2HIkOqI1_J2LLgfJac7aoxKOaLa4HqmTb1jssDnu6iBLXdBhgqDiPwB0Jz1J7YuZFQ2UvSqp8JvbbVp-u2EjEMPkdkqFTClpzp9kw1HJZ9BRq8_CJtFqLDGvtVwx0vzeB18whYwahyphenhyphen4/s1600/PublishToRemoteRepository.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW2HIkOqI1_J2LLgfJac7aoxKOaLa4HqmTb1jssDnu6iBLXdBhgqDiPwB0Jz1J7YuZFQ2UvSqp8JvbbVp-u2EjEMPkdkqFTClpzp9kw1HJZ9BRq8_CJtFqLDGvtVwx0vzeB18whYwahyphenhyphen4/s1600/PublishToRemoteRepository.jpg" width=350 height=250 /></a>
<br /><br />
<li>Enter you BitBucket username and password if you are asked. If everything is ok you will see meassage : "The origin remote has been added and the current branch has been published."</li>
<br />
<li>If you click Sync button your code will be synced on online BitBucket location</li>
<br />
<li>You can check it by going on BitBucket web page, choose repository and clicking Source under Navigation tab.</li>
</ul>Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com1tag:blogger.com,1999:blog-2720325367592426200.post-5220188153375714402014-05-19T11:41:00.000-07:002014-05-19T11:41:37.620-07:00Add ASP .NET Empty Web Site to Git Source control<p>Visual Studio 2013 have feature to add your .NET projects to Git source control. But when you try to add your ASP NET Empty Web Site solution to Git Source control it failed. The message is: <br />
<b>The current solution has projects that are located outside the solution folder. These projects will not be source controlled in the Git repository. To add all the projects to a single Git repository please consolidate all projects under a singe folder.</b></p>
<p>Here are step by step instruction how to create new ASP NET Empty Web Site which can be added to GIT source control.</p>
<ul>
<li>First open New Web Site in Visual Studio</li>
<br/>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPtJ5mHGHy86WLpifZ7Mqi3-T8yxCpJgDnjp1JjcOs9u8kTLE77KzDJrPILdu4A2o8jpr1yM2rMb507z2uWvjIbGbU8JVXVzhuDn9JlcQYK69jWV7Mlg1IG2cc6L-HUMo-164f7b_lEGo/s1600/NewWebSite.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPtJ5mHGHy86WLpifZ7Mqi3-T8yxCpJgDnjp1JjcOs9u8kTLE77KzDJrPILdu4A2o8jpr1yM2rMb507z2uWvjIbGbU8JVXVzhuDn9JlcQYK69jWV7Mlg1IG2cc6L-HUMo-164f7b_lEGo/s320/NewWebSite.jpg" /></a>
<br /><br />
<li>the second step is to choose ASP .NET Empty Web Site,I choose NewWebSite for name of a site, after button OK is clicked site will be created in <br />
<i>C:\Users\<b>Name</b>\Documents\Visual Studio 2013\WebSites\NewWebSite</i><br />
folder.
<br />
Inside path instead of <i><b>Name</b></i> will be User name on your computer
</li>
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJpQfqWJibmGrLHc-mwD2T34IfiDVbPFd0moOXgxxWwLHk3KEd-TgQ8-ahNVpdzpYab_NncIaLxSUUH8Ih015aKcs3RagHutYWOhsk0o8969GvM2yv8UA9KEtE2O0t67mxWo7LUHu8jSM/s1600/NewEmptyWebSiteSm.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJpQfqWJibmGrLHc-mwD2T34IfiDVbPFd0moOXgxxWwLHk3KEd-TgQ8-ahNVpdzpYab_NncIaLxSUUH8Ih015aKcs3RagHutYWOhsk0o8969GvM2yv8UA9KEtE2O0t67mxWo7LUHu8jSM/s1600/NewEmptyWebSiteSm.jpg" width="600" height="250" /></a>
<br /><br />
<li>Solution is created. If you click on Solution NewWebSite and look in the properties prpoerty Path you will see solution file is located inside:
<br />
C:\Users\Name\Documents\Visual Studio 2013\Projects\NewWebSite\
<br />
It is not good if you want to add your web site to source control
</li>
<br />
<li>
Click on the solution file, click menu FILE --> Save NewWebSite.sln As ...
<br />
Now save your solution file inside WebSite folder:
<br />
C:\Users\<b>Name</b>\Documents\Visual Studio 2013\WebSites\NewWebSite
<br />
Your .sln file should be in same folder as WebSite project
</li>
<br />
<li>maybee it is good idea to delete folder:
<br />
C:\Users\<b>Name</b>\Documents\Visual Studio 2013\Projects\NewWebSite\
<br />
to make things simpler
</li>
<br />
<li>
Now you can click FILE --> Add to Source Control
</li>
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG8hk52eEA8cyJmqkXI51P9MZOdyx5Mfu3ZpPUwD1U1ZHEltLgIN02G0t8Oh_qDgzO0Y4YdDZMMcvMidp_8NsfIkmxQMDaSPaOT4g1D6_BmOArhakOmZbZ7ov7YuztLfGAaxaXCXWnG7o/s1600/AddTo+SourceControl.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiG8hk52eEA8cyJmqkXI51P9MZOdyx5Mfu3ZpPUwD1U1ZHEltLgIN02G0t8Oh_qDgzO0Y4YdDZMMcvMidp_8NsfIkmxQMDaSPaOT4g1D6_BmOArhakOmZbZ7ov7YuztLfGAaxaXCXWnG7o/s400/AddTo+SourceControl.jpg" /></a>
<br />
<li>
Choose Git radio button and click OK.
</li>
<br />
<li>So, you successfully created Local Git Repository for your ASP .NET Empty WebSite</li>
</ul>Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com0tag:blogger.com,1999:blog-2720325367592426200.post-5323380974285123102014-05-13T12:17:00.000-07:002014-05-13T12:17:06.472-07:00ASP.NET authentication with Facebook, LinkedIn and Google<p>How to make possible to authenticate with some of social network ID (such as Google authentication, facebook login and LinkedIn) to your ASP.NET web form application?</p>
<br />
<b>Use Visual Studio 2013 built in functionality</b>
<p>One possibility is to use Visual Studio 2013 built in functionality inside ASP .NET Web Form Site template (it is not only template with built in authentication). You need to configure project to work with social networks logins.</p>
<p>To learn more how to configure Visual Studio 2013 to work with external social sites visit: <a href="http://www.asp.net/web-api/overview/security/external-authentication-services">External authentication services c#</a> and <a href="http://www.asp.net/web-pages/tutorials/security/enabling-login-from-external-sites-in-an-aspnet-web-pages-site">Logging In Using External Sites in an ASP.NET Web Pages</a>.</p>
<br />
<ul><b>Why I do not like VS built in authentication inside templates</b>
<br /><br />
<li>I find it difficult to understand and change to my application needs</li>
<br />
<li>do not know what happens under the hood, for example in ASP .NET Web Form Site template, attached database is created with tables for storing data about users, I do not know when this database is created and do not know how methods exactly work</li>
<br />
<li>connecting to external social networks is relatively new and have bugs</li>
<br />
<li>so if you want to use proposed model go with it, but if you have some specific ideas maybe it is good idea to start from scratch</li>
</ul>
<br />
<b>How Asp.NET logging communicate with Facebook</b>
<br />
<br/>This is simplified and User agent is not taken into account</br>
<ul>
<li>ASP.NET site sends facebook Application ID and URL of ASP.NET application to facebook <br />(https://graph.facebook.com/oauth/authorize?client_id=[ApplicationID]&redirect_uri=[ASP.NET_ADDRESS])</li>
<br />
<li>user is redirected to facebook site where he need to login with his facebook login</li>
<br />
<li>facebook authorization page is redirected to ASP.NET authorization page, inside URL is "code" query parameter</li>
<br />
<li>ASP.NET read code parameter and send web request to facebook with ApplicationID, Application secret and code which is received two steps before</li>
<br />
<li>ASP.NET get response from facebook site, now ASP.NET have a token</li>
<br />
<li>Now ASP.NET can send request to facebook site with token to get data about user</li>
</ul>
<br/> <br />
<p>There is a code for authentication to your ASP.NET application with Facebook login.
<ul>
<li>Facebook button is first clicked </li>
<br />
<li>when facebook page redirect back to ASP.NET page GetAuthToken method is called and then GetUserInfo method is called</li>
<br />
<li>inside GetUserInfo method ASP.NET get id of facebook user and user facebook name</li>
<br />
<li>you must create facebook application to get APP_KEY and APP_SECRET, find more about it <a href="http://www.codeproject.com/Articles/450535/Using-Facebook-login-in-ASP-NET-application-withou">here</a></li>
</ul></p>
<style type="text/css">.csharpcode, .csharpcode pre
{
font-size: 11.3333px;
font-width: 400;
color: black;
font-family: "Courier New";
}
.csharpcode pre { margin: 0px; }
.csharpcode .comment { color: #008000; }
.csharpcode .comment2 { color: #808080; }
.csharpcode .type { color: #2B91AF; }
.csharpcode .keyword { color: #0000FF; }
.csharpcode .string { color: #A31515; }
.csharpcode .preproc { color: #0000FF; }
</style>
<div class='csharpcode'>Code:<pre style='border:1px dashed #CCCCCC;overflow-x:auto;overflow-y:hidden;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height20px;color:#000000;word-wrap:normal;'><span class='keyword'>using</span> System;
<span class='keyword'>using</span> System.Collections.Generic;
<span class='keyword'>using</span> System.Linq;
<span class='keyword'>using</span> System.Web;
<span class='keyword'>using</span> System.Web.UI;
<span class='keyword'>using</span> System.Web.UI.WebControls;
<span class='keyword'>using</span> System.Text;
<span class='keyword'>using</span> System.IO;
<span class='keyword'>using</span> Newtonsoft.Json.Linq;
<span class='keyword'>using</span> System.Net;
<span class='keyword'>public</span> <span class='keyword'>partial</span> <span class='keyword'>class</span> <span class='type'>JustFacebook</span> : <span class='type'>System</span>.<span class='type'>Web</span>.<span class='type'>UI</span>.<span class='type'>Page</span>
{
<span class='keyword'>protected</span> <span class='keyword'>void</span> Page_Load(<span class='keyword'>object</span> sender, <span class='type'>EventArgs</span> e)
{
<span class='keyword'>if</span> (Request.<span class='type'>Url</span>.AbsolutePath.IndexOf(<span class='string'>"/OnFacebookAuth"</span>) > 0 && !<span class='keyword'>string</span>.IsNullOrEmpty(Request.Params[<span class='string'>"code"</span>]))
{
GetAuthToken();
GetUserInfoAction();
}
}
<span class='keyword'>protected</span> <span class='keyword'>void</span> btnFacebookLogin_Click(<span class='keyword'>object</span> sender, <span class='type'>EventArgs</span> e)
{
<span class='keyword'>string</span> redirectTo = Request.<span class='type'>Url</span>.Scheme + <span class='string'>"://"</span> + Request.<span class='type'>Url</span>.Authority + Request.<span class='type'>Url</span>.AbsolutePath + <span class='string'>"/OnFacebookAuth"</span>;
<span class='keyword'>string</span> request = <span class='keyword'>string</span>.<span class='type'>Format</span>(<span class='string'>"https://graph.facebook.com/oauth/authorize?client_id={0}&redirect_uri={1}"</span>, <span class='string'>"APP_KEY"</span>, redirectTo);
Response.Redirect(request);
}
<span class='keyword'>private</span> <span class='keyword'>void</span> GetAuthToken()
{
<span class='keyword'>string</span> redirectTo = Request.<span class='type'>Url</span>.Scheme + <span class='string'>"://"</span> + Request.<span class='type'>Url</span>.Authority + Request.<span class='type'>Url</span>.AbsolutePath;
<span class='keyword'>string</span> code = Request.Params[<span class='string'>"code"</span>];
<span class='keyword'>string</span> facebookApplicationSecret = <span class='string'>"APP_SECRET"</span>;
<span class='keyword'>string</span> request = <span class='keyword'>string</span>.<span class='type'>Format</span>(<span class='string'>"https://graph.facebook.com/oauth/access_token?client_id={0}&redirect_uri={1}&client_secret={2}&code={3}"</span>, APP_KEY, redirectTo,facebookApplicationSecret, code);
<span class='type'>var</span> httpRequest = (<span class='type'>HttpWebRequest</span>)<span class='type'>WebRequest</span>.Create(request);
<span class='type'>var</span> httpResponse = (<span class='type'>HttpWebResponse</span>)httpRequest.GetResponse();
<span class='type'>Encoding</span> enc = <span class='type'>Encoding</span>.UTF8;
<span class='type'>var</span> loResponseStream = <span class='keyword'>new</span> <span class='type'>StreamReader</span>(httpResponse.GetResponseStream(), enc);
<span class='keyword'>string</span> response = loResponseStream.ReadToEnd();
<span class='keyword'>try</span>
{
<span class='keyword'>string</span>[] pairResponse = response.Split(<span class='string'>'&'</span>);
<span class='keyword'>string</span> accessToken = pairResponse[0].Split(<span class='string'>'='</span>)[1];
Session[<span class='string'>"FacebookAccessTokenSession"</span>] = accessToken;
}
<span class='keyword'>catch</span>
{
<span class='keyword'>throw</span>;
}
}
<span class='keyword'>private</span> <span class='keyword'>void</span> GetUserInfoAction()
{
<span class='keyword'>if</span> (Session[<span class='string'>"FacebookAccessTokenSession"</span>] != <span class='keyword'>null</span>)
{
<span class='keyword'>object</span> token = Session[<span class='string'>"FacebookAccessTokenSession"</span>];
<span class='keyword'>string</span> request = <span class='keyword'>string</span>.<span class='type'>Format</span>(<span class='string'>"https://graph.facebook.com/me?access_token={0}"</span>, token);
<span class='type'>var</span> httpRequest = (<span class='type'>HttpWebRequest</span>)<span class='type'>WebRequest</span>.Create(request);
<span class='type'>var</span> httpResponse = (<span class='type'>HttpWebResponse</span>)httpRequest.GetResponse();
<span class='type'>Encoding</span> enc = <span class='type'>Encoding</span>.UTF8;
<span class='type'>var</span> loResponseStream = <span class='keyword'>new</span> <span class='type'>StreamReader</span>(httpResponse.GetResponseStream(), enc);
<span class='keyword'>string</span> response = loResponseStream.ReadToEnd();
<span class='type'>JObject</span> jsonObject = <span class='type'>JObject</span>.Parse(response);
<span class='type'>var</span> id = (<span class='keyword'>string</span>)jsonObject[<span class='string'>"link"</span>];
<span class='type'>var</span> displayName = (<span class='keyword'>string</span>)jsonObject[<span class='string'>"name"</span>];
}
}
}<!--[if IE]>
<![endif]--></pre></div>
<br /><br />
<b>Simplest way to authenticate using external social network logins</b>
<p>Some good people make various classes to make easier to login using Facebook, Google authenticate, LinkedIn and others. Those classes hides complexity of communicating with LogIn services.</p>
<p>I find ASPSnippets very handy and easy for use.
There is simple step by step tutorial for:
<ul>
<li><b><a href="http://www.aspsnippets.com/Articles/Autheticate-Users-login-account-using-FaceBook-API-in-ASPNet-Website.aspx">Autheticate User's login account using FaceBook API in ASP.Net Website</a></b></li>
<br />
<li><b><a href="http://www.aspsnippets.com/Articles/LinkedIn-API-Integration-in-ASPNet.aspx">LinkedIn login integration in ASP.NET</a></b></li>
</ul></p>
<br />
<style type="text/css">.csharpcode, .csharpcode pre
{
font-size: 11.3333px;
font-width: 400;
color: black;
font-family: "Courier New";
}
.csharpcode pre { margin: 0px; }
.csharpcode .comment { color: #008000; }
.csharpcode .comment2 { color: #808080; }
.csharpcode .type { color: #2B91AF; }
.csharpcode .keyword { color: #0000FF; }
.csharpcode .string { color: #A31515; }
.csharpcode .preproc { color: #0000FF; }
</style>
<div class='csharpcode'>Code:<pre style='border:1px dashed #CCCCCC;overflow-x:auto;overflow-y:hidden;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height20px;color:#000000;word-wrap:normal;'><span class='keyword'>using</span> System;
<span class='keyword'>using</span> System.Collections.Generic;
<span class='keyword'>using</span> System.Linq;
<span class='keyword'>using</span> System.Web;
<span class='keyword'>using</span> System.Web.UI;
<span class='keyword'>using</span> System.Web.UI.WebControls;
<span class='keyword'>using</span> ASPSnippets.LinkedInAPI;
<span class='keyword'>using</span> ASPSnippets.FaceBookAPI;
<span class='keyword'>using</span> System.Web.Script.Serialization;
<span class='keyword'>using</span> System.Data;
<span class='keyword'>public</span> <span class='keyword'>partial</span> <span class='keyword'>class</span> <span class='type'>JustASPSnippets</span> : <span class='type'>System</span>.<span class='type'>Web</span>.<span class='type'>UI</span>.<span class='type'>Page</span>
{
<span class='keyword'>protected</span> <span class='keyword'>void</span> Page_Load(<span class='keyword'>object</span> sender, <span class='type'>EventArgs</span> e)
{
FaceBookConnect.API_Key = FACEBOOK_KEY;
FaceBookConnect.API_Secret = FACEBOOK_SECRET;
<span class='keyword'>if</span> (!<span class='keyword'>string</span>.IsNullOrEmpty(Request.Params[<span class='string'>"code"</span>]) && Session[<span class='string'>"SocialNetworkCalled"</span>] == <span class='string'>"Facebook"</span>)
{
<span class='keyword'>string</span> code = Request.QueryString[<span class='string'>"code"</span>];
<span class='keyword'>string</span> data = FaceBookConnect.Fetch(code, <span class='string'>"me"</span>);
<span class='type'>FaceBookUser</span> faceBookUser = <span class='keyword'>new</span> <span class='type'>JavaScriptSerializer</span>().Deserialize<<span class='type'>FaceBookUser</span>>(data);
<span class='keyword'>string</span> id = faceBookUser.Id;
<span class='keyword'>string</span> userName = faceBookUser.UserName;
<span class='keyword'>string</span> name = faceBookUser.Name;
<span class='keyword'>string</span> email = faceBookUser.Email;
}
LinkedInConnect.APIKey = LINKEDIN_KEY;
LinkedInConnect.APISecret = LINKEDIN_SECRET;
LinkedInConnect.RedirectUrl = Request.<span class='type'>Url</span>.AbsoluteUri.Split(<span class='string'>'?'</span>)[0];
<span class='keyword'>if</span> (LinkedInConnect.IsAuthorized && Session[<span class='string'>"SocialNetworkCalled"</span>] == <span class='string'>"LinkedIn"</span>)
{
<span class='type'>DataSet</span> ds = LinkedInConnect.Fetch();
<span class='keyword'>string</span> a = ds.Tables[<span class='string'>"person"</span>].Rows[0][<span class='string'>"first-name"</span>].ToString();
<span class='keyword'>string</span> b = a + <span class='string'>" "</span> + ds.Tables[<span class='string'>"person"</span>].Rows[0][<span class='string'>"last-name"</span>].ToString();
<span class='keyword'>string</span> email = ds.Tables[<span class='string'>"person"</span>].Rows[0][<span class='string'>"email-address"</span>].ToString();
<span class='keyword'>string</span> linkeinemail = ds.Tables[<span class='string'>"person"</span>].Rows[0][<span class='string'>"id"</span>].ToString();
}
Session[<span class='string'>"SocialNetworkCalled"</span>] = <span class='string'>""</span>;
}
<span class='keyword'>protected</span> <span class='keyword'>void</span> btn_FacebookLogin_Click(<span class='keyword'>object</span> sender, <span class='type'>EventArgs</span> e)
{
Session[<span class='string'>"SocialNetworkCalled"</span>] = <span class='string'>"Facebook"</span>;
FaceBookConnect.Authorize(<span class='string'>"email,user_birthday"</span>, Request.<span class='type'>Url</span>.AbsoluteUri.Split(<span class='string'>'?'</span>)[0]);
}
<span class='keyword'>protected</span> <span class='keyword'>void</span> btn_LinkedInLogin_Click(<span class='keyword'>object</span> sender, <span class='type'>EventArgs</span> e)
{
Session[<span class='string'>"SocialNetworkCalled"</span>] = <span class='string'>"LinkedIn"</span>;
LinkedInConnect.Authorize();
}
}<!--[if IE]>
<![endif]--></pre></div>
<br />
<p>FaceBookUser class:</p>
<style type="text/css">.csharpcode, .csharpcode pre
{
font-size: 11.3333px;
font-width: 400;
color: black;
font-family: "Courier New";
}
.csharpcode pre { margin: 0px; }
.csharpcode .comment { color: #008000; }
.csharpcode .comment2 { color: #808080; }
.csharpcode .type { color: #2B91AF; }
.csharpcode .keyword { color: #0000FF; }
.csharpcode .string { color: #A31515; }
.csharpcode .preproc { color: #0000FF; }
</style>
<div class='csharpcode'>Code:<pre style='border:1px dashed #CCCCCC;overflow-x:auto;overflow-y:hidden;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height20px;color:#000000;word-wrap:normal;'><span class='keyword'>using</span> System;
<span class='keyword'>using</span> System.Collections.Generic;
<span class='keyword'>using</span> System.Linq;
<span class='keyword'>using</span> System.Web;
<span class='comment2'>///</span><span class='comment'> </span><span class='comment2'><summary></span><span class='comment'></span>
<span class='comment2'>///</span><span class='comment'> Summary description for Facebook</span>
<span class='comment2'>///</span><span class='comment'> </span><span class='comment2'></summary></span><span class='comment'></span>
<span class='keyword'>public</span> <span class='keyword'>class</span> <span class='type'>FaceBookUser</span>
{
<span class='keyword'>public</span> <span class='keyword'>string</span> Id { <span class='keyword'>get</span>; <span class='keyword'>set</span>; }
<span class='keyword'>public</span> <span class='keyword'>string</span> Name { <span class='keyword'>get</span>; <span class='keyword'>set</span>; }
<span class='keyword'>public</span> <span class='keyword'>string</span> UserName { <span class='keyword'>get</span>; <span class='keyword'>set</span>; }
<span class='keyword'>public</span> <span class='keyword'>string</span> PictureUrl { <span class='keyword'>get</span>; <span class='keyword'>set</span>; }
<span class='keyword'>public</span> <span class='keyword'>string</span> Email { <span class='keyword'>get</span>; <span class='keyword'>set</span>; }
<span class='keyword'>public</span> <span class='keyword'>string</span> Birthday { <span class='keyword'>get</span>; <span class='keyword'>set</span>; }
<span class='keyword'>public</span> <span class='keyword'>string</span> Gender { <span class='keyword'>get</span>; <span class='keyword'>set</span>; }
<span class='keyword'>public</span> <span class='type'>FaceBookEntity</span> Location { <span class='keyword'>get</span>; <span class='keyword'>set</span>; }
}
<span class='keyword'>public</span> <span class='keyword'>class</span> <span class='type'>FaceBookEntity</span>
{
<span class='keyword'>public</span> <span class='keyword'>string</span> Id { <span class='keyword'>get</span>; <span class='keyword'>set</span>; }
<span class='keyword'>public</span> <span class='keyword'>string</span> Name { <span class='keyword'>get</span>; <span class='keyword'>set</span>; }
}</pre></div>
<br />
<p>Let's try explain code in few lines:
<ul><br />
<li>when btn_FacebookLogin is clicked, FaceBookConnect.Authorize method is called, it redirect user to facebook login page</li>
<br />
<li>if user successfully login to facebook, he is redirected back to ASP.NET application Login page</li>
<br />
<li>then inside Page_Load it is recognized ASP.NET page is loaded after facebook login page</li>
<br />
<li>FaceBookConnect.Fetch method is called and ASP.NET application can get data about user</li>
<br />
<li>with LinkedIn authentication is similar process</li>
</ul></p>
<b>A few more things</b>
<br />
<p>Be careful with Google OpenId identifier because it change if you change domain.</p>
Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com0tag:blogger.com,1999:blog-2720325367592426200.post-36720366554137855312013-08-08T13:15:00.000-07:002013-08-08T13:15:46.272-07:00Open localhost web aplication on iphone from your local IIS<p>Find how to open and test your ASP.NET application located on your Win 7.0 from your iPhone.</p>
<br /><br />
<ul>
<li><b>1. turn on WLAN on your PC</b></li>
<br />
<li><b>2. place your ASP.NET application on your IIS 7.0</b>
<br/>For example I deployed simple WebTest ASP.NET application to my IIS 7.0. Try click "Browse *:80 (http)" from IIS to be sure your application properly running</li>
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0hm3TpcydllGUfwzZUbbFsn4KE62yyhVbY4csVtkNBnEObgbTMZidO-48QTm6HnR2OwD9ELiz_zs3kh9oUKE2lhprya4NJTGa78p1C6lKnOAIKVLq0uMdGJZL0gPFXu9EW1BfNWJiCWo/s1600/IISASPNETSm.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0hm3TpcydllGUfwzZUbbFsn4KE62yyhVbY4csVtkNBnEObgbTMZidO-48QTm6HnR2OwD9ELiz_zs3kh9oUKE2lhprya4NJTGa78p1C6lKnOAIKVLq0uMdGJZL0gPFXu9EW1BfNWJiCWo/s1600/IISASPNETSm.jpg" width="500" height="230" /></a></div>
<br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br />
<li><b>3. find your computer IPv4 Address</b>
<br /> - open Command Prompt (All Programs --> Accessories --> Command Prompt)
<br /> - type <b>ipconfig</b>
<br /> - remember IPv4Address (in format 192.x.x.x)
</li>
<br />
<li><b>4. try to open your ASP.NET application from your PC</b>
<br /> - instead of localhost type IPv4Address, in my case it is "http://192.x.x.x/WebTest/"
<br /> - if it works proceed to next step</li>
<br />
<li><b>5. connect your iPhone to your WLAN</b>
<br /> - on your iPhone: Settings --> Wi-Fi
<br /> - Wi-Fi should be "ON" and you need to choose your WLAN Network
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRi1kfjSzrF5ks_ROeW1SPeXMJ2orkhx5AOLYh9h95rY90cviErMQnYT8qrEXkmxXj4iXBaZXTMs6vA-4XCBi-AsSD5lsMxf66GVO0runSUFAs4C7t8znj-gWx5NQbD0DgowcFdKlQlkA/s1600/Wi-Fi-IphoneSm.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRi1kfjSzrF5ks_ROeW1SPeXMJ2orkhx5AOLYh9h95rY90cviErMQnYT8qrEXkmxXj4iXBaZXTMs6vA-4XCBi-AsSD5lsMxf66GVO0runSUFAs4C7t8znj-gWx5NQbD0DgowcFdKlQlkA/s1600/Wi-Fi-IphoneSm.jpg" /></a></div>
</li>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<br /><br /><br /><br /><br /><br /><br />
<li><b>6. try to type address in your browser on your iphone</b> (in my example something like this "http://192.x.x.x/WebTest/")</li>
<br />
<li>7. if "http://192.x.x.x" open IIS page on your iphone but "http://192.x.x.x/WebTest/" (of course WebTest is in only in my example) does not open web application try open Control Panel --> Window Firewall --> Allow a Program through Windows Firewall
<br /> - in "Allowed programs" click "Change setting" button and check "World Wide Web Services (HTTP)" and "Home/Work (Private)"
<br /> - after this change you should see your web applicatio in your iPhone browser</li>
</ul>Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com0tag:blogger.com,1999:blog-2720325367592426200.post-700723950135420292013-03-27T14:07:00.000-07:002013-03-27T14:07:42.321-07:00HTML5 canvas<p>Canvas is perhaps one of those features of HTML5 which caused a great deal of stir among the web developers. In simple sense, canvas tag allows you to specify a region on your document where you can draw stuff. One thing to be noted is we have to use some sort of a scripting language (usually JavaScript) to interact with canvas. For today's article I'll assume you know the basics of JavaScript.</p>
<br /><br />
<h4>Creating a Canvas Element</h4>
<p>Creating a canvas element is quite simple:
<br />
<pre><b>
<canvas height = "200" width = "200" id = "canvas1" ></canvas></b>
</pre>
It is advised to always give a height and width to canvas element. A id is also necessary as there can be more than one canvas element in a single page.</p>
<p>
The above code is actually as far as only HTML will take us, for functionalities of canvas
we gotta use JavaScript as mentioned earlier. Please bear in mind any subsequent codes seen
in this article must be written inside script tag or an external script file.
</p>
<h4>Understanding the Context</h4>
<p>
When we draw something on canvas, we actually retrieve the "context" of the canvas and put
stuff on it. Broadly speaking, there are two types of context, 2d (mostly used) and 3d (still
experimental). We will use the 2d context. Our first job is to identify our canvas element
and create a handler to its 2d context. We do this by the following fragment:
<pre><b>
var canvas = document.getElementById('canvas1');
var ctx = canvas.getContext('2d');</b>
</pre>We are first creating a handler to our canvas element (recall it had the id 'canvas1'), then
we are retrieving its 2d context through the function getContext().
</p>
<h4>Basic Canvas Properties</h4>
<p>
Remember we grabbed the context just on the previous section? Now we are going to set
some of its properties. First let's have a look at three basic properties:
</p>
<ul>
<li>
<p>
<em>fillStyle:</em><br>
style to use when filling. We can specify CSS colors,gradients or patterns (defaults to
black).
</p>
</li>
<li>
<p>
<em>strokeStyle:</em><br>
style to use when filling. Constraints similar to that of fillStyle.
</p>
</li>
<li>
<p>
<em>lineWidth:</em><br>
width of the lines drawn by our imaginary pen on canvas.
</p>
</li>
</ul>
<p>
Drawing with colors and styles is a two step process. First one is to set the above properties.
Other one is to perform the drawing operation i.e. calling the function which performs drawing.
</p>
<h4>Fill and Stroke</h4>
<p>
While dealing with canvas you'll find two versions of a function to create rectangles.
these are fillRect and strokeRect ("Rect" standing for rectangle). What fill does is it creates
the solid shape filled with the designated color/pattern, whereas stroke simply outlines
the shape with that color. An example is presented shortly.
</p>
<p>
Before we append the following fragment to our code, let's have a look at the arguments that
the fillRect or strokeRect takes:<br>
<em>x-coord, y-coord, width, height</em><br>
The coordinates specify the position of upper-left corner of the rectangle, and width and
height denotes the size of the rectangle. One reminder, the origin of the coordinate system
is situated at the top-left corner of the canvas. Now we can append the following segment:
</p>
<pre><b>
ctx.fillStyle = 'tan';
ctx.fillRect(10, 10, 100, 100);
ctx.lineWidth = 5;
ctx.strokeStyle = 'red';
ctx.strokeRect(10 , 10, 100, 100);</b>
</pre>
<p>
First we chose the color tan and created a solid rectangle at (10, 10) having height and width
of 100. Then we selected the lineWidth to be 5.
Next we again selected a color, this time red; and stroked a rectangle at (10, 10)
having similar dimensions as the previous rectangle. Notice although we have used colors
as the property of fillStyle and such, we could have also used gradients or patterns, which
is quite easily possible using CSS3.
</p>
<b>Sample:</b>
<br />
<canvas id="CanvasFill" width="120" height="120">
Your browser does not support the HTML5 canvas tag.
</canvas>
<script>
var canvas = document.getElementById('CanvasFill');
var ctx = canvas.getContext('2d');
ctx.fillStyle = 'tan';
ctx.fillRect(10, 10, 100, 100);
ctx.lineWidth = 5;
ctx.strokeStyle = 'red';
ctx.strokeRect(10, 10, 100, 100);
</script>
<br /><br />
<b>Sample code:</b>
<pre style="border-style: solid; border-width: 1px; white-space: pre-wrap; white-space: -o-pre-wrap; white-space: -moz-pre-wrap; word-wrap: break-word; font-family:monospace; font-size:0.9em; padding: 3ex;">
<b><canvas id="CanvasFill" width="120" height="120">
Your browser does not support the HTML5 canvas tag.
</canvas>
<script>
var canvas = document.getElementById('CanvasFill');
var ctx = canvas.getContext('2d');
<FONT COLOR="brown">
ctx.fillStyle = 'tan';
ctx.fillRect(10, 10, 100, 100);
ctx.lineWidth = 5;
ctx.strokeStyle = 'red';
ctx.strokeRect(10, 10, 100, 100);
</FONT>
</script>
</b></pre>
<br />
<h4>Drawing Lines</h4>
<p>
For drawing a line we are going to use four functions: beginPath, moveTo, lineTo and stroke.
The function beginPath tells that we are going to create path. We move the imaginary pen
to a location through lineTo function. Notice that by "moving the pen" I mean picking the
tip of the pen up and then placing it down again at the designated coordinate. The function
lineTo instructs to draw a line starting from the current point to th point passed as parameter
of lineTo. But the line is actually not drawn unless we call the stroke function. Let's have
a look at the following fragment of code:
</p>
<pre><b>
ctx.lineWidth = 1;
ctx.strokeStyle = 'black';
ctx.beginPath();
ctx.moveTo(10, 10);
ctx.lineTo(110, 110);
ctx.stroke();
ctx.lineTo(200, 110);
ctx.stroke();</b>
</pre>
<p>
We are setting the line width to be 1 and the color of the stroke to be black. Then we call the
beginPath function. We move our imaginary pen to a point, in this case the point (10, 10).
In the next line we instruct to create a line from (10, 10) to (110, 110). And finally to
ensure the line is drawn, we call the stroke function. Notice that we created another line
from the point where the previous line ended. If we wanted to draw a line from a different point
we would have needed to call another moveTo function.
</p>
<b>Sample:</b>
<br /><br />
<canvas id="CanvasStroke" width="200" height="150">
Your browser does not support the HTML5 canvas tag.
</canvas>
<script>
var canvas = document.getElementById('CanvasStroke');
var ctx = canvas.getContext('2d');
ctx.lineWidth = 1;
ctx.strokeStyle = 'black';
ctx.beginPath();
ctx.moveTo(10, 10);
ctx.lineTo(110, 110);
ctx.stroke();
ctx.lineTo(200, 110);
ctx.stroke();
</script>
<br />
<b>Sample code:</b>
<pre style="border-style: solid; border-width: 1px; white-space: pre-wrap; white-space: -o-pre-wrap; white-space: -moz-pre-wrap; word-wrap: break-word; font-family:monospace; font-size:0.9em; padding: 3ex;">
<b>
<canvas id="CanvasStroke" width="200" height="150">
Your browser does not support the HTML5 canvas tag.
</canvas>
<script>
var canvas = document.getElementById('CanvasStroke');
var ctx = canvas.getContext('2d');
<FONT COLOR="brown">
ctx.lineWidth = 1;
ctx.strokeStyle = 'black';
ctx.beginPath();
ctx.moveTo(10, 10);
ctx.lineTo(110, 110);
ctx.stroke();
ctx.lineTo(200, 110);
ctx.stroke();
</FONT>
</script>
</b></pre>
<h4>Rendering Text</h4>
<p>
We can draw texts on canvas using fillText and strokeText functions. The arguments are:<br>
<em>text x-coord y-coord</em><br>
Before calling these functions, we can also specify properties by assigning values to the
font property of our context. The order in which these properties are assigned is:<br>
<em>font-style font-weight font-size font-face</em><br>
The following code illustrates the complete method:
</p>
<pre><b>
ctx.strokeStyle = 'black';
ctx.fillStyle = 'black';
ctx.font = "normal normal 24px Tahoma";
ctx.fillText("Hello world", 10, 140);</b>
</pre>
<b>Sample:</b>
<br />
<canvas id="CanvasText" width="200" height="100">
Your browser does not support the HTML5 canvas tag.
</canvas>
<script>
var canvas = document.getElementById('CanvasText');
var ctx = canvas.getContext('2d');
ctx.strokeStyle = 'black';
ctx.fillStyle = 'black';
ctx.font = "normal normal 24px Tahoma";
ctx.fillText("Hello world", 10, 40);
</script>
<br />
<b>Sample code:</b>
<pre style="border-style: solid; border-width: 1px; white-space: pre-wrap; white-space: -o-pre-wrap; white-space: -moz-pre-wrap; word-wrap: break-word; font-family:monospace; font-size:0.9em; padding: 3ex;">
<b>
<canvas id="CanvasText" width="200" height="100">
Your browser does not support the HTML5 canvas tag.
</canvas>
<script>
var canvas = document.getElementById('CanvasText');
var ctx = canvas.getContext('2d');
<FONT COLOR="brown">
ctx.strokeStyle = 'black';
ctx.fillStyle = 'black';
ctx.font = "normal normal 24px Tahoma";
ctx.fillText("Hello world", 10, 40);
</FONT>
</script>
</b></pre>
<br /><br />
<p>
The canvas of HTML5 has a vast domain. In this article I've tried to point out just some
of the basic ideas. From here I'd suggest you search the net for a bit more info. As always
<a href = "http://www.w3schools.com/html/html5_canvas.asp" rel="nofollow">w3schools</a>
has a precise collection of more or less all the features of canvas. Besides this
<a href = "https://developer.mozilla.org/en-US/docs/HTML/Canvas" rel="nofollow">mozilla developer site</a>
can also turn out to be really helpful. Although at first canvas might
seem a bit intimidating, it is actually quite a great tool to have at hand. Bottom line, this
is by far the best light-weight option to create graphic objects on the fly.
</p>
Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com4tag:blogger.com,1999:blog-2720325367592426200.post-69858431628427173392013-03-20T14:23:00.000-07:002013-03-20T14:23:32.069-07:00Javascript disable right click<p>In some situations some web admins think disabling a right click on their web page is a good idea.</p>
<p>The reason for disabling a right click could be to:
<ul>
<li>protect and hide source code</li>
<br />
<li>protect images on web page</li>
<br />
<li>disable copy and paste functionality...</li>
</ul>
</p>
<p>There are opinions that disabling right mouse click is a bad practice and you shouldn't do it on your site (find out why <a href="http://www.sitepoint.com/dont-disable-right-click/" rel="nofollow">here</a>). It can prevent some novice users from stealing on your site but more advanced users will find a way (to get image or take a look on your source code). </p>
<p>In this article you will find how to:</p>
<ul><li>disable right click on whole HTML web page using onmousedown event</li>
<br />
<li>disable right click on whole page using attribute inside body tag</li>
<br />
<li>disable right click on some part of HTML page</li>
<br />
<li>disable right click on image using javascript</li>
</ul>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoN8CWTwj3q2QjAX2HqfjwpLRucNObf2GBfw0rDmZN3z6M2QsX_0SDDpZ3tkRFEfk0ovxkEF4Qh8E8wq-ujaRIQXbDGx2fV0UxVd33q58AkEM5oLApQFrMeR_klk4oNy4EkM_9xiOP97U/s1600/NoRightClick.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoN8CWTwj3q2QjAX2HqfjwpLRucNObf2GBfw0rDmZN3z6M2QsX_0SDDpZ3tkRFEfk0ovxkEF4Qh8E8wq-ujaRIQXbDGx2fV0UxVd33q58AkEM5oLApQFrMeR_klk4oNy4EkM_9xiOP97U/s320/NoRightClick.jpg" oncontextmenu="return false" alt="No Right click (disabled) with javascript" /></a>
<br />
<h4>Disable right click using javascript on HTML page</h4>
<p>You can disable right click on your web page using javascript function which will show message box if right mouse button is clicked.</p>
<p>Here is a code:</p>
<pre style="border-style: solid; border-width: 1px; white-space: pre-wrap; white-space: -o-pre-wrap; white-space: -moz-pre-wrap; word-wrap: break-word; font-family:monospace; font-size:0.9em; padding: 3ex;"><span style="font-weight:bold;"><font COLOR="brown">
<script type="text/javascript">
function catch_click(e) {
if (!e) var e = window.event;
var right_click = (e.which ? (e.which == 3) : (e.button == 2));
if (right_click) {
alert('Right clicking on this page is not allowed.');
return false;
}
}
document.onmousedown = catch_click;
</script>
</FONT></span>
</pre>
<p>Brief explanation of code: When mouse button is clicked javascript function catch_click is called. If right button is clicked message box pop up and right click is canceled.</p>
<br />
<h4>Disable right click on HTML page using body attribute</h4>
<p>This method prevents context menu to appear when right click happened without message box on HTML page. It is very easy to implement.</p>
<p>You just need to add this attribute to body element:</p>
<pre style="border-style: solid; border-width: 1px; white-space: pre-wrap; white-space: -o-pre-wrap; white-space: -moz-pre-wrap; word-wrap: break-word; font-family:monospace; font-size:0.9em; padding: 3ex;">
<body <span style="font-weight:bold;"><font COLOR="brown">oncontextmenu="return false"</FONT></span>></pre>
<br />
<h4>Disable right click on only part of HTML page</h4>
<p>On the beginning of this article it was said that preventing users from using right click is a bad practice. So if you want to protect something on your page maybe is better practice to protect only this specific element.</p>
<p>It is possible to use oncontext attribute on specific HTML element.</p>
<p>To better explain we will show the example with HTML table with two columns. We will forbid right click only on First column. On Second column right click is possible.</p>
<pre style="border-style: solid; border-width: 1px; white-space: pre-wrap; white-space: -o-pre-wrap; white-space: -moz-pre-wrap; word-wrap: break-word; font-family:monospace; font-size:0.9em; padding: 3ex;"><span style="font-weight:bold;"><font COLOR="brown"><Table>
<tr>
<td oncontextmenu="return false">
First column (no right click)
</td>
<td>
Second column
</td>
</tr>
</Table>
</FONT></span></pre>
<p>On td tag attribute <i>oncontextmenu</i> is added and set to <i>"return false"</i>. So on First column right click is disabled.</p>
<br />
<Table style="border:1px solid black;">
<tr>
<td oncontextmenu="return false" style="border:1px solid black;">
No right click
</td>
<td style="border:1px solid black;">
Second column
</td>
</tr>
</Table>
<h4>Disable right click on image using javascript</h4>
<p>You can disable right click on image using the technique described in previous chapter. Just add <i>oncontextmenu</i> attribute inside <i>img</i> element.</p>
<pre style="border-style: solid; border-width: 1px; white-space: pre-wrap; white-space: -o-pre-wrap; white-space: -moz-pre-wrap; word-wrap: break-word; font-family:monospace; font-size:0.9em; padding: 3ex;">
<img src="../PathToImage" <span style="font-weight:bold;"><font COLOR="brown">oncontextmenu="return false"</FONT></span> />
</pre>
<p>On the beginning of the article you can find image "No right click!" which can not be right clicked.</p>
Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com1tag:blogger.com,1999:blog-2720325367592426200.post-2742177665318111632013-03-13T13:40:00.000-07:002013-03-13T13:40:35.957-07:00Keep Your Blogging Secure<p>Blogging is an important outlet for many people. Whether they do it for business, for school, or simply
as a way to fill their free time, the number of people who write blogs for one reason or another
increases every day, and as the years go by, blogs will only become an even more central part of our
culture and how we communicate.</p>
<p>But when writing a blog, it is important to keep your information secure. Surfing the internet is fraught
with danger, and the process of publishing a blog only compounds the risks that the internet involves.
So for bloggers who are interested in keep their online activity safe, here are a couple tips on how to
manage risk and stay secure.</p>
<h4>Keep Private Information Private</h4>
<p>Remember, the information that goes on a blog is going to be forever public. Even if you delete your
blog, there are websites like Google and Archive.com that scrape everything that is published on the
internet and store it on their servers permanently. So consider what you want to be public, and what
might better be kept private. There are no doubt many young people who are blogging today who will
wish they had been more circumspect when the information they publish comes back to haunt them in
the future.</p>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDnkblvlT9FUpdsAiCinL2LdKr6lx8wiq0dVBRbX8-Dqwny9ytbtrcQX2drWmLu5GA-CwLk4MRGi8HZ2hRK2G_wUsbOCm5vOwMKKSFvu_vscbySsjuGeLmbCtuLj53fkZUIgR4TDlQ9Z0/s1600/SecureBlogging.jpg" imageanchor="1" alt="Secure blogging" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDnkblvlT9FUpdsAiCinL2LdKr6lx8wiq0dVBRbX8-Dqwny9ytbtrcQX2drWmLu5GA-CwLk4MRGi8HZ2hRK2G_wUsbOCm5vOwMKKSFvu_vscbySsjuGeLmbCtuLj53fkZUIgR4TDlQ9Z0/s320/SecureBlogging.jpg" /></a>
<p>But this isn’t only about the future. Being too forthcoming now can expose you to online predators who
want to use your information against. The amount of information necessary to commit cyber fraud or
identity theft can be surprisingly small. Be careful that you are not disclosing too much on your blog. If
you do, strangers who come across that information can use it in all sorts of ways that can wreak havoc
on your personal and financial dealings.</p>
<h4>Protect Your Site from Viruses</h4>
<p>Many people host their own blogs, either on servers they administer or with cloud-hosting companies.
In these cases, their blogs can become vectors of online viruses without them even realizing it. They can
inadvertently transmit viruses to their servers and websites without intending to. Those viruses are then
passed along to their visitors. The best way to avoid this is to conduct all blogging activities over a <a
href="http://www.vpnservices.net">VPN service</a> , which will stop the transmission of viruses and
prevent third-parties from injecting viruses into your online data. This not only protects you, the author
of the blog, but it also protects all your readers from all potential harm.</p>
<p>Veronica Clyde is a dedicated writer at VPNServices.net – a website where you can read about <a
href="http://www.vpnservices.net">VPN services</a> and Online Security. She also loves to share VPN
technology, Wordpress and Blogging tips.</p>Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com1tag:blogger.com,1999:blog-2720325367592426200.post-91712864717938608142013-03-05T13:36:00.000-08:002013-03-05T13:36:41.858-08:00Group pages for reporting in GA<p>Ok, using Google Anlytics make a easy to find how many pageviews get your web site or specific web page.
<p>But what if you want to know how many visitors get specific group of pages. For example you want to track only pages written in 2013 or just pages written by specific author or only pages about specific topic...</p>
<p>This article is a guide how to make report for specific group of individually picked pages from your web site.</p>
<br />
<p>To better explain how to make reports of specific pages in GA we will explain:
<ul>
<li>How to report only on specifically picked pages</li>
<br />
<li>How to report pages written in 2012 instantly</li>
<br />
<li>How to make customized report for year 2012</li>
</ul></p>
<br />
<h4>Track visits from all pages about some topic in GA</h4>
<p>Maybe you want to know how many visits coming from some specific topic. For example how many visits drive topics about javacript.</p>
<p>If it is the case you can easily get report in Google Analytics with the number of visits for all pages on your site which include keyword javascript in title. Just follow instructions.</p>
<ul>
<li>In Google Analytics click on Content --> Overview --> Site Content --> All Pages
<br /><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbnpTiw90rK0QdfcjbkRxh4HbDnPrJ0tu9q3HPhQBxQsvAGjmgoczWYnrW3IdFlByfCoPB9U6SaHHSqabvS_l995PRbPAyC6rJVTSKKv_Wi8hBcNdfkJyxZiZsnGdYhOVx5_pAz2Ybjms/s1600/AllPagesGA.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbnpTiw90rK0QdfcjbkRxh4HbDnPrJ0tu9q3HPhQBxQsvAGjmgoczWYnrW3IdFlByfCoPB9U6SaHHSqabvS_l995PRbPAyC6rJVTSKKv_Wi8hBcNdfkJyxZiZsnGdYhOVx5_pAz2Ybjms/s320/AllPagesGA.jpg" /></a>
</li>
<br />
<li>Find and click link "advanced" next to the search bar<br /><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPibESpMpw5Wkfi0Ruzr3M33hoaz2L17nv8bIoC0WCk1-3lPX_BHtvefQMnAHKkWj7dRYQTmhJPCg-PXdp9XZ5e-k6TSd-160cRroiZjZEWdrlQaqCtBITyguGYC8RLgCPTkjT-zqGPZE/s1600/AdvancedGoogleAnalytics.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPibESpMpw5Wkfi0Ruzr3M33hoaz2L17nv8bIoC0WCk1-3lPX_BHtvefQMnAHKkWj7dRYQTmhJPCg-PXdp9XZ5e-k6TSd-160cRroiZjZEWdrlQaqCtBITyguGYC8RLgCPTkjT-zqGPZE/s320/AdvancedGoogleAnalytics.jpg" /></a></li>
<br />
<li>new container will appear, in third button choose <i>Containing</i> and in empty textbox type desired term. For purpose of this example it is "<i>javascript</i>".
<br /><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEU4_IJx7Jxm1xA_i3GdzhhLRJvUomT-eoqj4eAO27ASZOnt6cTiNvEGGT5fIW6W3iga7HSRLHPcNY9TPofQNlBhXo17nzT1ZYUO3ITf7ucvd9zTOIFCzdi1j81dut5kAaibxkwLvJKdE/s1600/GoogleAnalyticsInclude.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEU4_IJx7Jxm1xA_i3GdzhhLRJvUomT-eoqj4eAO27ASZOnt6cTiNvEGGT5fIW6W3iga7HSRLHPcNY9TPofQNlBhXo17nzT1ZYUO3ITf7ucvd9zTOIFCzdi1j81dut5kAaibxkwLvJKdE/s1600/GoogleAnalyticsInclude.jpg" width="500" /></a>
</li>
<br />
<li>click on "Apply" and you will get report for all pages on your site or blog which have term "javascript" in title</li>
</ul>
<br />
<h4>Track specifically picked pages on your site instantly in GA</h4>
<p>Let's say I want to make a report for group of only two pages on my blog and those two pages are: http://interestingwebs.blogspot.com//2009/01/jscript-in-blogger-post.html and http://interestingwebs.blogspot.com//2009/06/javascript-in-external-file.html.</p>
<ul>
<li>In Google Aalytics click on Content --> Overview --> Site Content --> All Pages
<br /><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbnpTiw90rK0QdfcjbkRxh4HbDnPrJ0tu9q3HPhQBxQsvAGjmgoczWYnrW3IdFlByfCoPB9U6SaHHSqabvS_l995PRbPAyC6rJVTSKKv_Wi8hBcNdfkJyxZiZsnGdYhOVx5_pAz2Ybjms/s1600/AllPagesGA.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbnpTiw90rK0QdfcjbkRxh4HbDnPrJ0tu9q3HPhQBxQsvAGjmgoczWYnrW3IdFlByfCoPB9U6SaHHSqabvS_l995PRbPAyC6rJVTSKKv_Wi8hBcNdfkJyxZiZsnGdYhOVx5_pAz2Ybjms/s320/AllPagesGA.jpg" /></a>
</li>
<br />
<li>Find and click advanced near search bar<br /><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPibESpMpw5Wkfi0Ruzr3M33hoaz2L17nv8bIoC0WCk1-3lPX_BHtvefQMnAHKkWj7dRYQTmhJPCg-PXdp9XZ5e-k6TSd-160cRroiZjZEWdrlQaqCtBITyguGYC8RLgCPTkjT-zqGPZE/s1600/AdvancedGoogleAnalytics.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPibESpMpw5Wkfi0Ruzr3M33hoaz2L17nv8bIoC0WCk1-3lPX_BHtvefQMnAHKkWj7dRYQTmhJPCg-PXdp9XZ5e-k6TSd-160cRroiZjZEWdrlQaqCtBITyguGYC8RLgCPTkjT-zqGPZE/s320/AdvancedGoogleAnalytics.jpg" /></a></li>
<br />
<li>new container will appear, in third button choose <i>Matching RegExp</i> and in empty textbox type second part of URL of page you want to track. We want to track two pages so we can use or operator : |. <br /><br />In our example it would be: "2009/01/jscript-in-blogger-post.html|2009/06/javascript-in-external-file.html".
<br /><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9n8WqzDO8cttvWYQWeRalbmpRTjHaJME_xsK-tQzAYJSd8aJ2dip2DQT2K7SntlRipJmbk3j3_mrEAwO4nvpkLVd65QpliaBE3CbeAjYkGJpBRf6ryRM0EAlR7_1Y-HI56qQSzWxs-no/s1600/IncludeRegExp.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9n8WqzDO8cttvWYQWeRalbmpRTjHaJME_xsK-tQzAYJSd8aJ2dip2DQT2K7SntlRipJmbk3j3_mrEAwO4nvpkLVd65QpliaBE3CbeAjYkGJpBRf6ryRM0EAlR7_1Y-HI56qQSzWxs-no/s1600/IncludeRegExp.jpg" width="500" /></a>
</li>
<br />
<li>click on "Apply" and you will get report for only two specific pages</li>
</ul>
<br />
<h4>Get visits report for all pages written in selected year with Google Analytics</h4>
<p>It can be useful to find how many visit drive all pages on your site written in one year. For example I want to know how many visits get my pages written in 2012 for last month.</p>
<p>This can be done with Google Analytics but only if the year in URL of your individual pages. I use blogspot blog and year can be read from URL.</p>
<p>For example:</p>
<p>http://interestingwebs.blogspot.com/<b>2013</b>/02/how-to-make-clickable-picture-in-html.html</p>
<p>From this URL we can conclude article is written in year 2013 and in second (2) month (February).</p>
<p>So, if permalinks on your site are structured in similar way you can use this method to make reports based on year when article is published.</p>
<ul>
<li>In Google Aalytics click on Content --> Overview --> Site Content --> All Pages
<br /><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbnpTiw90rK0QdfcjbkRxh4HbDnPrJ0tu9q3HPhQBxQsvAGjmgoczWYnrW3IdFlByfCoPB9U6SaHHSqabvS_l995PRbPAyC6rJVTSKKv_Wi8hBcNdfkJyxZiZsnGdYhOVx5_pAz2Ybjms/s1600/AllPagesGA.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbnpTiw90rK0QdfcjbkRxh4HbDnPrJ0tu9q3HPhQBxQsvAGjmgoczWYnrW3IdFlByfCoPB9U6SaHHSqabvS_l995PRbPAyC6rJVTSKKv_Wi8hBcNdfkJyxZiZsnGdYhOVx5_pAz2Ybjms/s320/AllPagesGA.jpg" /></a>
</li>
<br />
<li>Find and click advanced near search bar<br /><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPibESpMpw5Wkfi0Ruzr3M33hoaz2L17nv8bIoC0WCk1-3lPX_BHtvefQMnAHKkWj7dRYQTmhJPCg-PXdp9XZ5e-k6TSd-160cRroiZjZEWdrlQaqCtBITyguGYC8RLgCPTkjT-zqGPZE/s1600/AdvancedGoogleAnalytics.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPibESpMpw5Wkfi0Ruzr3M33hoaz2L17nv8bIoC0WCk1-3lPX_BHtvefQMnAHKkWj7dRYQTmhJPCg-PXdp9XZ5e-k6TSd-160cRroiZjZEWdrlQaqCtBITyguGYC8RLgCPTkjT-zqGPZE/s320/AdvancedGoogleAnalytics.jpg" /></a></li>
<br />
<li>new container will appear, in third button choose <i>Containing</i> and in empty textbox type year in this case 2012.
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwZ3L_ZJWZ6CKbz2bqPXbqqXZOlttbN8kw7Ga4UCye4CecFzlcyzH69eVXaYJqCe5KZJ6o_ICmRVJ1d0gIg0PppOwX-6eb-WQyCKcLChhGoy0LCsXn0Yw8SqvpyixNZGojNmYidC_CROA/s1600/GoogleAnalyticsFilterByYear.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwZ3L_ZJWZ6CKbz2bqPXbqqXZOlttbN8kw7Ga4UCye4CecFzlcyzH69eVXaYJqCe5KZJ6o_ICmRVJ1d0gIg0PppOwX-6eb-WQyCKcLChhGoy0LCsXn0Yw8SqvpyixNZGojNmYidC_CROA/s1600/GoogleAnalyticsFilterByYear.jpg" width="500" /></a>
</li>
<br />
<li>click on "Apply" and you will get report only for two specific pages</li>
</ul>
<br />
<h4>Make custom report for posts written in selected year whch can be reused</h4>
<p>Now you know how to group pages by specific criteria and make a reports for them. But it have no sense to every time you need such a report you must to create it from scratch. To avoid this you can make custom report which can be used later.</p>
<p>So here is example which will help you to learn some basic steps for creating custom reports. This example learn you how to create and use custom report which will report number of Pageviews for all pages written in 2012 year.</p>
<ul>
<li>Find and click "<i>Customization</i>" in Google Analytics
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYf5OUi58tP2SD3-zDTzz5rXIxhuvsxbSawF0gqebD6S6ZclhZSdguug_hFwMXX3wuTSpbaopVcF-hlBOUSt2ELEcP34m3JUwd4wIAIPdVFwo0XN7NIznD0EJ7tUHm2JOo74uVwGglRJA/s1600/GACustomization.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYf5OUi58tP2SD3-zDTzz5rXIxhuvsxbSawF0gqebD6S6ZclhZSdguug_hFwMXX3wuTSpbaopVcF-hlBOUSt2ELEcP34m3JUwd4wIAIPdVFwo0XN7NIznD0EJ7tUHm2JOo74uVwGglRJA/s320/GACustomization.jpg" width="200" /></a>
</li>
<br />
<li>click "<i>New Custom Report</i>"
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVRvoa44UQXKFn76_zhCOuDyzV4-ngA9tv1OyKKWzKaCKwRl_nqSQU6pLIn5sScLwICrvkjSYWt1Ye_lCnBMiap3XJHt2i6gTxVxt9a162mD_GDtJIxUQBEOisIqyf_gHUnsYTrbjymn4/s1600/GANewCustomReport.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVRvoa44UQXKFn76_zhCOuDyzV4-ngA9tv1OyKKWzKaCKwRl_nqSQU6pLIn5sScLwICrvkjSYWt1Ye_lCnBMiap3XJHt2i6gTxVxt9a162mD_GDtJIxUQBEOisIqyf_gHUnsYTrbjymn4/s1600/GANewCustomReport.jpg" width="150" /></a>
</li>
<br />
<li>in "<i>General information</i>" enter title, for example "2012 pages"</li>
<br />
<li>in Report content choose Name, Metric Groups and Dimension Drilldowns. For this example for <i>Name</i> type "<b>2012 pages</b>", for <i>Metric Group</i> choose <b>Pageviews</b>, for <i>Dimension Drilldowns</i> choose <b>Pages</b>.
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt46MGDgi4NQwMkQoDMU1X76z8TkE2PyTLTzrj3NOmCrOKyGWFdZx4p_uxvYUpAs3Dw6y7W4jsnZ6fsTc_TFb_0ts4nFKW6EhaZ-SrkE2dbTfmHgXueoqxTHsL0Luv7KoMluZ40MinyLM/s1600/GACustomReportReportContent.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt46MGDgi4NQwMkQoDMU1X76z8TkE2PyTLTzrj3NOmCrOKyGWFdZx4p_uxvYUpAs3Dw6y7W4jsnZ6fsTc_TFb_0ts4nFKW6EhaZ-SrkE2dbTfmHgXueoqxTHsL0Luv7KoMluZ40MinyLM/s1600/GACustomReportReportContent.jpg" width="550" /></a>
</li>
<br />
<li>in Filter tab set first button to "<b>Include</b>", second button to "<b>Page</b>"</li>, third button to "<b>Regex</b>" and fourth Textbox to <b>2012</b><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTmwz3aSfX5NXoVJcNTX8a3WwpS_Q5B75QR71XU5gYejAHTWtDTdGBm480bVQW83QrsS7FoJixBB_uTdn89u7nEIZrDlPs7gKlQgYeX-bk1Nu02oukcdDDKWAf66cgi5CDwkELEm3GP5M/s1600/GACustomReportFilter.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTmwz3aSfX5NXoVJcNTX8a3WwpS_Q5B75QR71XU5gYejAHTWtDTdGBm480bVQW83QrsS7FoJixBB_uTdn89u7nEIZrDlPs7gKlQgYeX-bk1Nu02oukcdDDKWAf66cgi5CDwkELEm3GP5M/s1600/GACustomReportFilter.jpg" width="550" /></a>
<br /><br />
<li>Save custom report and now you can see your Custom Report by clicking Custom Report --> 2012 pages<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0EByLkldvmQdDZtl4IqDoE0LnM4p8a3J7mqJIxIFrKmD-7g27wUU54HeZ4KeZPl3wGv7JNH-8ihPH5XSw9dRtj8uaaglCmKaqukCnzaILfKQ7s4r2gTR92keYljomeFGB6tqpkynTKjc/s1600/GACustomReportResultSm.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0EByLkldvmQdDZtl4IqDoE0LnM4p8a3J7mqJIxIFrKmD-7g27wUU54HeZ4KeZPl3wGv7JNH-8ihPH5XSw9dRtj8uaaglCmKaqukCnzaILfKQ7s4r2gTR92keYljomeFGB6tqpkynTKjc/s320/GACustomReportResultSm.jpg" /></a>
</li>
</ul>Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com0tag:blogger.com,1999:blog-2720325367592426200.post-22165505266147045172013-02-20T13:40:00.000-08:002013-02-20T13:42:05.367-08:00How to Make Older Browsers Compatible with HTML5<p>
In the past couple of years the web industry has seen a sudden boom in regards to HTML5. Although
technically for the full specification to get approved we'll have to wait till the end of 2014, this
is not stopping developers from writing codes in HTML5. Most, if not all, modern browsers have done
a more or less good job in implementing the features of HTML5 (we all know which one doesn't!).
</p>
<p>
Unfortunately not all browsers have been able to implement all the new features that HTML5 is
offering. So the developers often have to pay some extra care to make their code compatible with
older browsers. In this article I'll try to point out some ways by which we can make older
browsers compatible with HTML5. A little heads up though, this is about making browsers compatible
with HTML5, not CSS3 (actually some aspects described are related to both, but our target is HTML5).
</p>
<h4>Getting to Know the Browsers</h4>
<p>
Before we get into making our code compatible and all that, we first need to have a clear idea on
what actually the browsers can do. After all, what's the point of trying to teach someone what
he/she already knows, right? Much to our advantage, there are some great sites which offer us
considerable insight on browser features.
</p>
<ul>
<li>
<em><a href = "http://fmbip.com">FindMeByIP</a></em><br>
On this site you'll find several charts where you can see a list of HTML5 features (and also
CSS3) and info about which browser supports what feature. You can actually do it two ways, you
can go to fmbip.com, in which case you'll get the info on the browser you are visiting the
url by; or you can go to findmebyip.com/litmus, in which case you'll get a list of info on
opera, chrome, mozilla, safari and IE versions 6, 7, 8, 9.
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ-fvzM6EjmnFSg8z2hS40LsN8Oa67pjUDmjRAe5vvPT0rIlu0Bxqn_uN3JaxLTuag6ghhSenAOxICDpMaQCg7JZFRvhKJNJAunw3YxvidL_0zK-WByMZZ3nHNNChxyI6sAiyxcIn7BSw/s1600/WhatsMyIpSm.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ-fvzM6EjmnFSg8z2hS40LsN8Oa67pjUDmjRAe5vvPT0rIlu0Bxqn_uN3JaxLTuag6ghhSenAOxICDpMaQCg7JZFRvhKJNJAunw3YxvidL_0zK-WByMZZ3nHNNChxyI6sAiyxcIn7BSw/s320/WhatsMyIpSm.jpg" /></a>
</li>
<li>
<em><a href = "http://caniuse.com">CanIUse</a></em><br>
This site also has a comprehensive listing of compatibility info (color coded, always helps).
You can search for a particular feature or just skim through all that are listed. This is
actually one of the sites I have been frequently visiting since I first started coding in
HTML5 and CSS3.
</li>
<li>
<em><a href = "http://html5please.com">HTML5Please</a></em><br>
This site is a bit different than the previous two. It does not contain a pin pointed list of what
each browser can do, rather it gives us suggestions about what measures we should take regarding
various features: whether we should totally avoid, use backup (i.e. polyfills, more on this later),
use with caution or freely use a particular feature. According to the front page of this site, the
recommendations are based on the experience of web developers. So it can turn out to be really
handy in practical usage.
</li>
<li>
<em><a href = "http://browsershots.org">Browsershots</a></em><br>
Browsershots makes screenshots of your web design in different operating systems and browsers.
Not really informative, but to have a quick glimpse of what our page will look in different
browsers, quite an impressive site.
</li>
<li>
<em><a href = "http://spoon.net">Spoon.net</a></em><br>
I personally think this is an awesome site. The Spoon.net Browser Sandbox provides us
a method of cross-browser testing. All we have to do is just click run for any browser
from the given list to launch it instantly. By the way you have to have an account to use its
feature, and guess what, account creation is free!
</li>
</ul>
<p>
Now that we know we can thoroughly investigate abilities of various browsers, let's get them
compatible with HTML5. One thing that you'll see in common in most of these methods is the
use of JavaScript. Let's list our options first and then we'll start cracking them one by one.
</p>
<h4>Ways to Make Older Browsers HTML5 Compatible</h4>
<ul>
<li>Pure ol' JavaScript</li>
<li>html5shiv (also known as html5shim)</li>
<li>modernizr</li>
<li>HTML5 Boilerplate</li>
<li>Google Chrome Frame (especially for IE)</li>
</ul>
<p>
Before I proceed further, I'd like to make one thing very clear: using the above mentioned ways
does not make our browser all of a sudden capable of implementing all the features that HTML5
offers, in most cases it just makes the browser recognize that there is a tag with a specified name.
For example, using the first 3 ways you can make older browsers know that there is a tag named
'canvas', but you can't really perform actions which canvas really offers (note: I am saying HTML5
Boilerplate supports canvas because it actually makes IE render web pages using Google Chrome Frame,
which happens to support canvas).
</p>
<h4>Custom JavaScript</h4>
<p>
This is the elementary way of letting the browser know what new tags we are going to use if it
is not familiar with them already. Say for example we want to use the tag "header". This is a tag
which IE versions prior to 9 don't understand. So here's what we can do:<br>
<pre>
<!--[if lt IE 9]>
<script type="text/javascript">
document.createElement("header");
</script>
<![endif]-->
</pre>
It goes without saying that we have to place the piece of code between the "head" tags. The code
snippet is quite self explanatory; even then, let's have a quick look at it. At the very first
line we are starting a commented section, which basically says if the browser is less than IE
version 9, interpret the following code; otherwise ignore what's in between the "if - endif"
tags. Inside the script tags, we just have to call the createElement() function with the
appropriate parameter. As an instance, if we also wanted to use "nav" tag we would have added
the statement document.createElement("nav") in between script tags.
</p>
<h4>html5shiv</h4>
<p>
As stated before, it's also known as html5shim. So what is a shim? It is an application compatibility
workaround (for those of you who have already googled it, yup, I took it from wikipedia). html5shim is
one of the most popular polyfills (remember I stated the term "polyfill" previously? here it comes!).
Paul Irish gave a simple definition of polyfills. If you are wondering who is Paul Irish, just know
that he is sort of a front-end wizard in web industry. According to him polyfill is “a shim that
mimics a future API, providing fallback functionality to older browsers”. You can download html5shiv
<a href = "http://code.google.com/p/html5shiv">here</a>.
</p>
<p>
In case you are interested in technicalities, html5shiv sort of works by following the first method
described i.e. creating element through JavaScript. After you download it, all you need to do is
include the following snippet inside "head" tag:<br>
<pre>
<!--[if lt IE 9]>
<script src="dist/html5shiv.js"></script>
<![endif]-->
</pre>
</p>
<h4>modernizr</h4>
<p>
A really worthy name, it does make us modern (at least in regards to front-end development,
that's for sure!). The best place to learn about modernizr is its
<a href = "http://modernizr.com">official site</a>. But don't worry; I'm not leaving you empty-handed.
In short, what modernizr does is perform feature detection first. Note that I said "feature"
detection, not "browser" detection. That basically means it finds out what our browser can do, not what
browsers we are using. It then attaches necessary classes to our "html" tag. Say for example our
browser does not support "canvas" tag, so a class named "no-canvas" will be added to our "html"
tag. In the opposite case the class added would have been "canvas". So what do we do to use
modernizr? Same as before, we download a copy of modernizr.js (you can find a link in the
official site) and add the following code inside "head" tag:<br>
<pre>
<script src="js/modernizr.js"></script>
</pre>
It's worth noting that we can use modernizr to detect feature within our JavaScript, such as:
<pre>
if(Modernizr.geolocation){
}
</pre>
</p>
<h4>HTML5 Boilerplate</h4>
<p>
This is what I'd like to say is the ultimate blueprint. The package contains modernizr and jquery
library. It also has normalize.css (I left out normalize from previous descriptions
as it is related to CSS). You can find a link to download html5boilerplate from its
<a href = "http://html5boilerplate.com">website</a>. Once downloaded, if you explore the folder
you'll find all the files I've previously mentioned. The index.html is where your html goes. To
simply define, this is a template for implementing HTML5.
</p>
<h4>Google Chrome Frame (Abbreviated as GCF)</h4>
<p>
For those of you who are really frustrated with IE, I saved the best for the last. Google Chrome
Frame is simply a plug-in for IE which lets it render a webpage the same way google chrome would.
Of course the downside is you can't use the features not supported by google chrome, but trust me,
the amount of such features is negligible compared to IE. As far as I know, chrome ranks the second
in regards to adopting HTML5 features (Maxthon being first). You can check the current standings from
the site <a href = "http://html5test.com">html5test</a>. We basically have to do two things to make
a page be displayed using Google Chrome Frame in IE.<br></br>
Firstly, we have to make sure that the viewer's IE already has the plug-in installed. Frankly
speaking, there is no way to force the user to install GCF, but at least we can prompt the
user to install it. The developer's site chromium.org gives a way to use a JavaScript file
named "CFInstall.js" which exactly does that. You can find an example of using "CFInstall.js"
<a href = "http://www.chromium.org/developers/how-tos/chrome-frame-getting-started">here</a>. For
your convenience I'm presenting the code below:<br>
<pre>
<html>
<body>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script>
<style>
/*
CSS rules to use for styling the overlay:
.chromeFrameOverlayContent
.chromeFrameOverlayContent iframe
.chromeFrameOverlayCloseBar
.chromeFrameOverlayUnderlay
*/
</style>
<script>
// You may want to place these lines inside an onload handler
CFInstall.check({
mode: "overlay",
destination: "http://www.waikiki.com"
});
</script>
</body>
</html>
</pre>
Secondly, we have to give instructions to our page to use GCF. We
do this by adding the following simple meta inside "head" tag:<br>
<pre>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
</pre>
</p>
<h4>HTML5 Cross Browser Polyfills</h4>
<p>
Remember I said taking certain measures as stated above will not actually make our browser
able to use all the features provided by HTML5, but rather make our browser knowledgeable
on the fact that there are certain tags? For those of you who became heartbroken, take a look
at this
<a href = "https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills">site.</a>.
It provides a list of fallback options for HTML5 features.
</p>
<p>
Before I conclude I'd like to mention one thing. HTML5 is gaining popularity at a very high rate,
and the browsers are also catching up nicely. After a few years I think there won't be the
concept of making browsers "compatible with HTML5" (and sadly my so thoughtful article
will become obsolete). But till then, we certainly have to keep our eyes open and take necessary
measures.
</p>Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com1tag:blogger.com,1999:blog-2720325367592426200.post-7595789841144278912013-02-14T02:51:00.000-08:002013-02-14T03:03:54.270-08:00Using Images to Make Your Pages Pop<p>So, you've set up a blog, invested in some quality <a href="http://themefuse.com">
WordPress premium themes </a> to make it look amazing, and now you're ready to
add some images. Adding images to a blog post is quite simple; adding quality images,
however, is something else altogether.</p>
<h4>Cell Phone Cameras</h4>
<p>With the advent of cell phone cameras, suddenly everyone's a photographer. Whether
it's blogs or social media pages, tweets or whatever, you can't swing a run-on sentence
without hitting a camera-phone pic. What's wrong with that? A picture paints a
thousand words, doesn't it? Exactly! And if you post a fuzzy, poor quality cell phone
picture, the word that's going to come across loud and clear is amateur!</p>
<h4>Poor Resolution</h4>
<p>Cell phone cameras are great; you can take candid shots and send them out to friends
and family almost instantly. These images are great for viewing in the window of a
cell phone, but probably won't look as good blown up on a large computer screen.
Technology is improving all the time, but by and large, most cell phone cameras have
poor resolution and not a lot of great features.</p>
<h4>Why More Resolution is Better</h4>
<p>Your photos should have at least 5 megapixels of resolution, and 10 is even better.
While some will argue that you don't need so much resolution unless you intend to
blow your photos up into posters, the added resolution allows you to crop to your
heart's desire. If you start with a 10 megapixel photo and crop out 50 percent of it, what
remains is a basically a 5 megapixel photo. You might decide you only want one face
out of a whole crowd, and starting with higher resolution will allow you to crop it out and
enlarge it and still have a decent photo.</p>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglSadJe3EBg_WNWy-JVlqz2J2xq13Rb7N_hGNj8i8Usy8eOOCG7Q3ZHjANTlW1tyuptVmSnr-l6ILn6oZFCkhStFnZw3APPU-yg1gCH89dAUKRJ4p-WhaHxA4N32Gv5xZ_iU8zg3tO_qg/s1600/CameraShootingTips.jpg" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglSadJe3EBg_WNWy-JVlqz2J2xq13Rb7N_hGNj8i8Usy8eOOCG7Q3ZHjANTlW1tyuptVmSnr-l6ILn6oZFCkhStFnZw3APPU-yg1gCH89dAUKRJ4p-WhaHxA4N32Gv5xZ_iU8zg3tO_qg/s320/CameraShootingTips.jpg" /></a>
<h4>Crop, Crop, Crop Your Photos</h4>
<p>Cropping sets the professional apart from the amateur. In professional artwork, photos
are seldom used as they are taken. Don't be afraid to crop out the extraneous detail.
Cropping a photo puts more emphasis on the subject, and allows you to frame it more
clearly. Cropping also allows you to get rid of that extra arm, shoulder, or half a person
on the edge of the photo. Done artistically, cropping can also make your photos look
more edgy and modern. Another consideration is cropping to fit the layout of your
WordPress theme where you want to post the image.</p>
<h4>Adjust the Lighting</h4>
<p>Whether you use a professional program or simply the software that came with
your camera, you should always adjust lighting levels, brightness, contrast, hue and
saturation. Even in "auto" mode, most point and shoot camera photos will need light
and color adjustments for optimal image results. Take some time and play with the
results. Changing the hue can give your image a cooler or warmer look, and increasing
the saturation can make the colors pop.</p>
<h4>Bag the Flash</h4>
<p>Use flash sparingly. A good camera will take photos quite well without a flash. Using
flash tends to white out the picture. Dark photos can be lightened; the information is
still there in the darkness. Black is rarely truly black. The reverse is not true for white,
however. White in a photo means lost information. Even the best editing tools cannot
bring it back.</p>
<h4>Image Stabilization</h4>
<p>Sometimes referred to as "anti-shake" or "blur reduction," this feature is a must if
you're not using your camera on a tripod. Even the steadiest of hands can shake
imperceptibly, and most photos are taken "on the fly" with subjects and cameras all
moving at once. Since you're not a professional shooting dozens of shots every few
seconds, this will guarantee that your "money" shot doesn't end up blurry.</p>
<h4>Rename Your Image File</h4>
<p>Give your image file a descriptive name to help it pop up on Internet image searches.
WordPress themes usually allows you to input a description when you upload an image,
but including a keyword in the file name itself is a sure sign of a pro.</p>
About author:
<br />
Olga Ionel is a creative writer at <a href="http://themefuse.com"> ThemeFuse </a> – a
top provider of WordPress themes. She is passionate about studying online marketing
industry and sharing informative tips.
Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com0tag:blogger.com,1999:blog-2720325367592426200.post-44977389908021487462013-02-06T13:08:00.000-08:002013-02-07T11:05:33.771-08:00How to make clickable picture in HTML<p>This short tutorial will learn you how to make a clickable picture in HTML web page.</p>
<br />
<p>What is clickable picture?</p>
<p>Clickable picture is picture which will lead you to specific web page when you click on that picture.</p>
<br />
<p>To better explain what is clickable picture take a look at image below this text. If you click this image, post "Make clickable links and clickable images" will be opened.</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://interestingwebs.blogspot.com/2013/01/make-clickable-links-and-clickable.html" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="57" width="339" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCA28fRakg-yL4MwKgfsry7fB1wsmiEhEi76qNDGO0-RR5XzISj9g_xfN0MJl65E_PpanIkTKdlCP-ObYGaKhdNm6-ltvwxkNwgzNZB87pLH7JpJJp-BaCjPOiemyIXa5Se8I1tXj02Dg/s400/ClickableImage.jpg" alt="Clickable picture" /></a></div>
</br></br></br></br>
<h4>HTML code for: How to make clickable picture</h4>
<pre style="border-style: solid; border-width: 1px; white-space: pre-wrap; white-space: -o-pre-wrap; white-space: -moz-pre-wrap; word-wrap: break-word; font-family:monospace; font-size:0.9em; padding: 3ex;"><span style="font-weight:bold;"><FONT COLOR="brown"><a href="URLToLinkedWebPage"><img src="URLImageLocation" /></a>
</FONT></span></pre>
<p>In HTML code for clickable image you need to replace:
<ul><li>URLToLinkedWebPage - with URL to web page you want to be opened when user click on image</li>
<br />
<li>URLImageLocation - with location of image</li>
</ul></p>
<br />
<p><b>Example:</b></p>
<pre style="border-style: solid; border-width: 1px; white-space: pre-wrap; white-space: -o-pre-wrap; white-space: -moz-pre-wrap; word-wrap: break-word; font-family:monospace; font-size:0.9em; padding: 3ex;"><span style="font-weight:bold;"><FONT COLOR="brown"><a href="https://www.google.com"><img src="https://www.google.com/images/srpr/logo3w.png" /></a></FONT></span></pre>
<p>Above HTML code display Google logo ("www.google.com/images/srpr/logo3w.png") and links to "www.google.com" when picture is clicked.</p>Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com0tag:blogger.com,1999:blog-2720325367592426200.post-16752342157045401272013-01-29T13:15:00.000-08:002013-03-11T13:37:41.119-07:00Make clickable links and clickable images<p>How to create clickable links?</p>
<p>Let's first explain what are clickable links.</p>
<p><b>Clickable link</b> is a text which reference on some web place. So, when clickable link is clicked referenced page is opened. Common term for clickable link is hyperlink.</p>
<p><b>Example of clickable link:</b></p>
<p><b><a href="http://interestingwebs.blogspot.com/2009/06/tips-for-html-link-code.html">Some tips for clickable link</a></b></p>
<p>When above clickable link is clicked user is redirected to "<i>HTML link code tips</i>" page (http://interestingwebs.blogspot.com/2009/06/tips-for-html-link-code.html).</p>
<p><b>Guide to make scrollable link on web page</b></p>
<pre style="border-style: solid; border-width: 1px; white-space: pre-wrap; white-space: -o-pre-wrap; white-space: -moz-pre-wrap; word-wrap: break-word; font-family:monospace; font-size:0.9em; padding: 3ex;"><span style="font-weight:bold;"><FONT COLOR="brown"><a href="</FONT>Web address<FONT COLOR="brown">"></FONT>Here type clickable text<FONT COLOR="brown"></a></FONT></span></pre>
<ul>We have:
<br /><br />
<li>the <a> that tag defines a clickable link, which is used to link from one page to another</li>
<br />
<li>href attribute specifies the web address of the page where link lead</li>
</ul>
<p>Code for above example of clickable link would be:</p>
<pre style="border-style: solid; border-width: 1px; white-space: pre-wrap; white-space: -o-pre-wrap; white-space: -moz-pre-wrap; word-wrap: break-word; font-family:monospace; font-size:0.9em; padding: 3ex;"><span style="font-weight:bold;"><FONT COLOR="brown"><a href="http://interestingwebs.blogspot.com/2009/06/tips-for-html-link-code.html">Some tips for clickable link</a></FONT></span></pre>
<p>To better explain making of clickable links there is one more sample with hyperlink inside sentence.</p>
<br />
<p><b>Example of clickable link in setnence:</b></p>
<p>This <a href="https://www.google.com/">link</a> go to Google.</p>
<p><b>HTML code for scrollable link inside sentence (above example):</b></p>
<pre style="border-style: solid; border-width: 1px; white-space: pre-wrap; white-space: -o-pre-wrap; white-space: -moz-pre-wrap; word-wrap: break-word; font-family:monospace; font-size:0.9em; padding: 3ex;"><span style="font-weight:bold;"><FONT COLOR="brown">This <a href="https://www.google.com/">link</a> go to Google.</FONT></span></pre>
<p>In this example word <i>link</i> is a clickable link while other words in a sentence are not. The word <i>link</i> is enclosed inside <a> and </a> tag.</p>
<h3>How to make clickable image in HTML</h3>
<p>Clickable image would be an image which will open linked web page when visitor click on this image. It is easy to make such an clickable image.</p>
<p>Sample:</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://interestingwebs.blogspot.com/2013/02/how-to-make-clickable-picture-in-html.html" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="57" width="339" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCA28fRakg-yL4MwKgfsry7fB1wsmiEhEi76qNDGO0-RR5XzISj9g_xfN0MJl65E_PpanIkTKdlCP-ObYGaKhdNm6-ltvwxkNwgzNZB87pLH7JpJJp-BaCjPOiemyIXa5Se8I1tXj02Dg/s400/ClickableImage.jpg" alt="Clickable image sample" /></a></div>
<p>When this image is clicked it will lead you to How to make clickable image tutorial!</p>
Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com0tag:blogger.com,1999:blog-2720325367592426200.post-88745594811536377412013-01-23T13:40:00.000-08:002013-01-23T13:40:34.812-08:00Remove blogger navbar<p>How to remove blogger (blogspot) navbar?</p>
<p>Main reason why people want to remove blogger navbar from their blogspot blogs is that navbar does not fit with their blog design.</p>
<p>In this post you will find short tutorial how to remove blogger navbar.</p>
<p>It is relatively easy to remove it!</p>
<p>You just need to follow steps in this article!</p>
<br />
<h4>What is blogger navbar</h4>
<p>The Blogger Navbar appears by default at the top of every Blogger blog. Take a look at a below image to see how blogger nvabars looks like.</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqhZqI3vrPk5zLNgLd59CVTRa92BSRZ795RiYnDbaScCP1cUiLwaBDGMFbrXffzEdD7anWk_-iPqVSaOSkCBugGkT8zuWY4qGl3bk3N58dJBLjhY6q5Xe9_KZy6mIUN69-tq3sG1hiols/s1600/RemoveBloggerNavBar.jpg" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="26" width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqhZqI3vrPk5zLNgLd59CVTRa92BSRZ795RiYnDbaScCP1cUiLwaBDGMFbrXffzEdD7anWk_-iPqVSaOSkCBugGkT8zuWY4qGl3bk3N58dJBLjhY6q5Xe9_KZy6mIUN69-tq3sG1hiols/s400/RemoveBloggerNavBar.jpg" alt="Blogspot NavBar" /></a></div>
<br /><br /><br /><br />
<h4>Steps for removing the Blogger Navigation bar</h4>
<ul>
<li>in blogger Dashboard click Template</li>
<br />
<li>under "Live on Blog" click on button Edit HTML</li>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1c-nK3Rwu-FgjXZfidQXw7HXI8uyOglmRfGkiDjpPyM5nzrCR5lHyTfeE2-kBqNyhE0EMNdZ81vxs1IZBXXtLAaGYW6VkrVUb0mPBC6RdMvRHlpTQCBMYlNQtAnpam7HHhBEtgG8YuDw/s1600/TemplateEditHTMLSm.jpg" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="196" width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1c-nK3Rwu-FgjXZfidQXw7HXI8uyOglmRfGkiDjpPyM5nzrCR5lHyTfeE2-kBqNyhE0EMNdZ81vxs1IZBXXtLAaGYW6VkrVUb0mPBC6RdMvRHlpTQCBMYlNQtAnpam7HHhBEtgG8YuDw/s1600/TemplateEditHTMLSm.jpg" /></a></div>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<li>inside "<b>Template › Edit HTML</b>" find: </li>
<pre style="border-style: solid; border-width: 1px; white-space: pre-wrap; white-space: -o-pre-wrap; white-space: -moz-pre-wrap; word-wrap: break-word; font-family:monospace; font-size:0.9em; padding: 3ex;"><span style="font-weight:bold;"><font COLOR="brown">]]></b:skin>
</SPAN></font></pre>
<br />
<li>replace this code with:</li>
<pre style="border-style: solid; border-width: 1px; white-space: pre-wrap; white-space: -o-pre-wrap; white-space: -moz-pre-wrap; word-wrap: break-word; font-family:monospace; font-size:0.9em; padding: 3ex;"><span style="font-weight:bold;"><font COLOR="brown">#navbar-iframe,#navbar { display: none !important; }
]]></b:skin>
</font></span></pre>
<br />
<li>after replacing code you should save template and your blog will be without navbar. And be very careful when edit HTML layout of your blogger blog.</li>
</ul>
Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com0tag:blogger.com,1999:blog-2720325367592426200.post-84116882914613188732013-01-16T12:45:00.000-08:002013-01-16T12:45:25.974-08:00How often Google crawl<p>You make a new web page and ask yourself when Googe will crawl my new web page (or new blog post)?</p>
<p>Let's try to understand how Google crawl the web.</p>
<h4>Google spiders</h4>
<p>Google use spiders to crawl the web.</p>
<p>Spiders (also called GoogleBots) are software robots which discovers new and updated web pages and add those pages to the Google index.</p>
<h4>Google crawling</h4>
<p>When Googlebot (or a Google spider) visit one web site it detects all links on each page of this web site and adds them to its list of pages to crawl.</p>
<p>So Googlebot crawl from one page to another and follow their links. This is how Google crawl almost all pages on the internet. </p>
<p>When Google find some web site it will come back to crawl this site again and reindex it.</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA_oc5z8L8d716Rnz26ohjubctw1PjDrwje4VxuG9-iCux62T4iiPqG0FB8VnpknFgQWoQDpUuys7QbIQ7DIRch7qEsv7EyR0BegYDnpfFK7ZWIblkXNcuVyvSPcKgqkUGf54QR6Dp314/s1600/GoogleSpiderCrawlWebPage.jpg" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="458" width="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA_oc5z8L8d716Rnz26ohjubctw1PjDrwje4VxuG9-iCux62T4iiPqG0FB8VnpknFgQWoQDpUuys7QbIQ7DIRch7qEsv7EyR0BegYDnpfFK7ZWIblkXNcuVyvSPcKgqkUGf54QR6Dp314/s1600/GoogleSpiderCrawlWebPage.jpg" /></a></div>
<br /><br /><br /><br />
<br /><br /><br /><br />
<br /><br /><br /><br />
<br /><br /><br /><br />
<br /><br /><br /><br />
<br /><br /><br /><br />
<br />
<h4>How often Google crawl</h4>
<p>How often Google will crawl some web site depends on many factors such us PageRank, links to a page...</p>
<p>One of the factors is how often you change your site or add new pages. If changes are happening more frequently then Google will probably crawl your web site more frequently.</p>
<p>If your site or blog is new and is not indexed by google find out how to <a href="http://interestingwebs.blogspot.com/2009/10/force-google-reindex-of-site.html">force google to crawl your web site or blog</a>.</p>Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com0tag:blogger.com,1999:blog-2720325367592426200.post-46515180573021861352013-01-08T13:47:00.001-08:002013-01-14T11:54:28.191-08:00Blogger tips for beginners<p>Here you will find a few links to blogger tips for beginners. Those are tips that every blogger should know.</p>
<p>Tips are primarily for blogspot blog. Learn few basic techniques which will help you to blog better.</p>
<p>Learn how to make and arrange categories in blogger, how to have recent posts in your side bar, expandable summaries, display HTML code in blogger post...</p>
<br />
<h4><a href="http://interestingwebs.blogspot.com/2008/11/adding-categories-to-blogspot-blogger.html">Arrange your posts by categories in blogger</a></h4>
<p>Add categories to the blogger and give your visitors opportunity to view your posts sorted by categories. Accomplish this in a few simple steps.</p>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihJ28_tVknMwGJmRRrsI_TYv7Qh7EJAa5PUJW1tRajPbkXOEtWvzLJAZIdEaNmyP59I_F2Yxr5hT9ro6_X4c800keaLzBKLI6_Tx7SnPZqBLaHdKR-r8IRoSOSStKgE3CVtdl-NW_0AWo/s1600-h/Categories.JPG"><img id="BLOGGER_PHOTO_ID_5274500980670946770" style="width: 103px; height: 90px;" alt="Posts sorted by categories in blogger" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihJ28_tVknMwGJmRRrsI_TYv7Qh7EJAa5PUJW1tRajPbkXOEtWvzLJAZIdEaNmyP59I_F2Yxr5hT9ro6_X4c800keaLzBKLI6_Tx7SnPZqBLaHdKR-r8IRoSOSStKgE3CVtdl-NW_0AWo/s320/Categories.JPG" border="0" /></a>
<br /><br />
<h4><a href="http://interestingwebs.blogspot.com/2009/07/recent-posts-blogger-widget.html">List recent posts in blogspot</a></h4>
<p>You can easily display links to last (recent) five posts on your blog. Or maybee last ten posts.<br />
Don't know how? Read this post, it is easy!</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMICp0Dfs2dUua1CpkYZ8HP5Swnk2_ECPGGl-4z1wjrGdifBtBfEJn7vO6BnUWaDR9M3bv9HYrn2ltYpijLR_22rTA24D7vTEOQB74aDjZpcpxjYoyWp5x8Z6I6F8kMfAic0ZsheprH_M/s1600/RecentPostsBlog.jpg" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="140" width="243" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMICp0Dfs2dUua1CpkYZ8HP5Swnk2_ECPGGl-4z1wjrGdifBtBfEJn7vO6BnUWaDR9M3bv9HYrn2ltYpijLR_22rTA24D7vTEOQB74aDjZpcpxjYoyWp5x8Z6I6F8kMfAic0ZsheprH_M/s1600/RecentPostsBlog.jpg" alt="Learn how to display recent posts on your blogspot blog" /></a></div>
<br /><br /><br /><br /><br /><br /><br /><br /><br />
<h4><a href="http://interestingwebs.blogspot.com/2010/01/expandable-post-summaries-on-blogger.html">Expandable post summaries on main blog page</a></h4>
<p>If you want to have post summaries on main blog page which will expand on click on "read more". Read this article to learn how to accomplish it.</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibcTjeat7QTD5u36Ogxotz7OUyHDn5faqzyb1Ld1WCPjY0kuR2gdD0_Tmw_cDe5GxaJiyDcJwOf8zdaFJoorW8GkhMso-WZo_LRiGfVE3rzpXeHjlWwa9Jq_vP5Loeno-B4E3idBUpjZ4/s1600/ReadMoreBloggerSm.jpg" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="273" width="288" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibcTjeat7QTD5u36Ogxotz7OUyHDn5faqzyb1Ld1WCPjY0kuR2gdD0_Tmw_cDe5GxaJiyDcJwOf8zdaFJoorW8GkhMso-WZo_LRiGfVE3rzpXeHjlWwa9Jq_vP5Loeno-B4E3idBUpjZ4/s400/ReadMoreBloggerSm.jpg" /></a></div>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<h4><a href="http://interestingwebs.blogspot.com/2008/12/easy-way-to-put-code-snippets-in-blog.html">Display HTML code in blogger post</a></h4>
<p>Want to write blogger post about HTML code, but HTML code is not properly displayed in your blog post.</p>
<p>For example this text will not be displayed correctly:
<br/>
<pre>
<h3>I want <h3> tags not heading format</h3>
</pre>
</p>
<p>Follow the link and you will find guide how to display HTML code in your blog posts!</p>
<h4><a href="http://interestingwebs.blogspot.com/2009/02/create-your-own-site-search-using.html">Make google search for your blog</a></h4>
<p>Add search capability on your blog with AdSense for Search. Allow your visitors to search content of your site in a Google like manner and try to earn some money.</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHQbVy5Lec3G-FDIf7ANegAYNEwiXuo2QfK0pmoK9wY9u2HQ90Tv_zKNlv6lWk2XoD7z_SjiGDPE9dsvyTfz2yFjoA1wfeNpeQjnPSfIJEpPlntr1A-MfR3YPJJgvmcmR3xXB-RMSVR4U/s1600/SearchYourBlog.jpg" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="70" width="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHQbVy5Lec3G-FDIf7ANegAYNEwiXuo2QfK0pmoK9wY9u2HQ90Tv_zKNlv6lWk2XoD7z_SjiGDPE9dsvyTfz2yFjoA1wfeNpeQjnPSfIJEpPlntr1A-MfR3YPJJgvmcmR3xXB-RMSVR4U/s400/SearchYourBlog.jpg" alt="Add Google search box in your blog which search your blog only" /></a></div>
<br /><br /><br /><br /><br /><br />
<h4><a href="
http://interestingwebs.blogspot.com/2009/01/jscript-in-blogger-post.html
">How to add java script in your blogger post</a></h4>
<p>You need to add some cool javascript functionality inside blogspot post but do not know how? Here is a short tutorial how to do this.</p>
<br />
<h4><b><a href="http://interestingwebs.blogspot.com/2009/07/increase-blogger-traffic-change-title.html">Increase visits with title change</a></b></h4>
<p>Short guide to change title structure in blogger which have significant impact of SEO performance.</p>
<p>The default title structure is : <b>[Blog title]: [Post title]</b></p>
<p>The structure : <b>[Post title]: [Blog title]</b> could improve your traffic performance. </p>
Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com0tag:blogger.com,1999:blog-2720325367592426200.post-52424101923538430692013-01-02T13:18:00.000-08:002013-01-02T13:18:43.001-08:00Add meta description on blogger post<p><b>How to add unique meta description tag to each post post in blogspot (blogger) blog?</b></p>
<p>If you searching answer on that question this article is right place to find solution. It give simple easy to implement solution.</p>
<p>This article is divided on two parts:</p>
<ul><li>what is purpose of meta description tags</li>
<br />
<li>how to implement meta description tags to every post in blogger</li>
</ul>
<br />
<h4>WHY TO USE META DESCRIPTION TAGS?</h4>
<p><b>What is Meta Description Tags?</b></p>
<p>Meta Description Tags are HTML elements used to provide description about a HTML page.</p>
<p><b>Why Meta Description Tags are important?</b></p>
<p>It is important because Meta Description Tag content might be used in Search Engine Result Page (SERP) for snippets. So if user find snippet text usable there is better chance he will open your page.</p>
<p><b>Example of SERP code snippet</b></p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibx8Is3WQiUlawxaWJ61Q_5FVkqmRhTdgxvOPEIEQ0Ges4XpoxC_B8P9t_LmJLac6IWbudownv4AEg8dF5AdCBpe6iq5_eD57ycvcQ6J7dAE4J2Ov8tmdIt5MbrjniZTe_k9m8xpCCp9c/s1600/SERPCodeSnippet.jpg" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="112" width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibx8Is3WQiUlawxaWJ61Q_5FVkqmRhTdgxvOPEIEQ0Ges4XpoxC_B8P9t_LmJLac6IWbudownv4AEg8dF5AdCBpe6iq5_eD57ycvcQ6J7dAE4J2Ov8tmdIt5MbrjniZTe_k9m8xpCCp9c/s1600/SERPCodeSnippet.jpg" alt="Google SERP code snippet sample" /></a></div>
<br />
<br /><br /><br /><br /><br /><br />
<p>We get above code snippet and here is a content of Meta Description tag!</p>
<pre style="border-style: solid; border-width: 1px; white-space: pre-wrap; white-space: -o-pre-wrap; white-space: -moz-pre-wrap; word-wrap: break-word; font-family:monospace; font-size:0.9em; padding: 3ex;"><span style="font-weight:bold;"><FONT COLOR="brown"><meta content='This blog have blog tutorial, Javascript and HTML tips (including jQuery).'<br /> name='description'/></FONT></span></pre>
<BR />
<h4>ADD DIFFERENT META DESCRIPTION TAG TO EVERY POST IN YOUR BLOGGER BLOG</h4>
<p>Now blogger make it easy to add meta descriptions for each post throug blogspot interface.</p>
<p>Recently it was much harder to accomplish it, you must make a change inside <i>HTML template edit</i> for each post and it was very impractical.</p>
<p>Now it is enough to follow this steps:</p>
<ul><li>Inside blogger dashboard click <b>Settings > Search Settings</b>
<br /><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxeughoTrtkuBdC17CcmZIlw_enW9K15ccuhBqAZisyr-M9b5BWmijzNwzqSErW1qlhwjBj6NmAPVEoIZuw7jaEAED_EoUltETEDds7Rea_8TYKncdcIU9zSa2q-k4rOqZ9IUNhp4BGhk/s1600/BloggerSettings.jpg" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="150" width="100" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxeughoTrtkuBdC17CcmZIlw_enW9K15ccuhBqAZisyr-M9b5BWmijzNwzqSErW1qlhwjBj6NmAPVEoIZuw7jaEAED_EoUltETEDds7Rea_8TYKncdcIU9zSa2q-k4rOqZ9IUNhp4BGhk/s400/BloggerSettings.jpg" alt="Bloggers interface Setting - Search preferences" /></a></div>
<br /><br /><br /><br /><br /><br /><br /><br /><br />
</li>
<br />
<li>Under Meta tags switch "<i>Enable search description</i>" (to Yes) and type text you want to be meta description for your blog. Of course don't forget to Save changes.
<br /><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO1kf4aiOXhqJEmBnRZ3_ul_aL8O8iqhamCuXsXg_QmmUXBNy3eTBFPfwUfLn6zPjg8k7dEV8sgpQGWGQTqc8U1VJjMbmh_5e956At81oR-6MZPMlq6o8DaoXXSVLywgNXCJJiQNonues/s1600/BloggerMetaTagsDescription.jpg" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="146" width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjO1kf4aiOXhqJEmBnRZ3_ul_aL8O8iqhamCuXsXg_QmmUXBNy3eTBFPfwUfLn6zPjg8k7dEV8sgpQGWGQTqc8U1VJjMbmh_5e956At81oR-6MZPMlq6o8DaoXXSVLywgNXCJJiQNonues/s1600/BloggerMetaTagsDescription.jpg" alt="Blogger meta tags description in blogspot interface" /></a></div>
<br /><br /><br /><br /><br /><br /><br /><br /><br />
</li>
<li>Last step is to inside "<i>Edit post interface</i>" find <b>Post settings --> Search Description</b> and type description you want to appear for meta description tag in current post.
<br /><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0zsiyvk_ofa_kRn0ZCe0PJvlaMSjjASSaarGFzajqcwBtDe8XTwbA-ZTWwSvmmy9qQbXo15KuEbboP4UkihCuml3iSSB0CZv_unhNR-wrijBPWhoNCNODGI9kO-aoYLLudlQ5jUDOlKQ/s1600/PostMetaDescriptionTag.jpg" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="220" width="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0zsiyvk_ofa_kRn0ZCe0PJvlaMSjjASSaarGFzajqcwBtDe8XTwbA-ZTWwSvmmy9qQbXo15KuEbboP4UkihCuml3iSSB0CZv_unhNR-wrijBPWhoNCNODGI9kO-aoYLLudlQ5jUDOlKQ/s400/PostMetaDescriptionTag.jpg" /></a></div>
</li>
</ul>
Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com0tag:blogger.com,1999:blog-2720325367592426200.post-72886038522164839382012-12-17T11:30:00.000-08:002013-01-01T02:15:40.432-08:00Submit guest post guidelines<p>Here are some basic guidelines for submitting guest post on this blog.</p>
<p>First let's list few reasons why you should guest post:
<ul><li>by posting on other’s blog, you are gaining exposure and publicity</li>
<br />
<li>get more backlinks</li>
<br />
<li>immediately increase traffic if you guest post on popular blogs</li>
</ul></p>
<br /><br />
<h3>Rules for guest posting on this blog</h3>
<h4>Choose a topic</h4>
<ul>
<li>suggest a few titles with two or three keywords - e.g. Title: "How to increase web traffic" Keywords: "increase traffic"
<br /><br />
<ul><li>I will decide if I am satisfied with suggested titles, topic and keywords, optionally you can make <a href="http://interestingwebs.blogspot.com/2011/11/how-to-keyword-research.html">keyword research</a></li>
<br />
<li>you can send me your suggestion on this <a href="mailto:blogsrec@gmail.com?subject=Guest post">mail</a> with a subject "Guest post"</li>
</ul>
</li>
<br /><br />
<li>Choose a topic which is related with this blog. Topics could be:
<ul><br />
<li>HTML, CSS...</li>
<br />
<li>javascript, jQuery</li>
<br />
<li>tips for blogspot blog</li>
<br />
<li>tips for general blogging</li>
<br />
<li>how to increase web traffic, monetization and SEO</li>
</ul>
</li>
<br />
<li>guest post should have some useful information, answer on some question or give some step by step instructions how to do something, for example: <a href="">Adding categories to blogspot (blogger)</a> </li>
</ul>
<br />
<b>Post rules</b>
<ul><li>article must be original, it <b>shouldn't be published anywhere on web</b></li>
<br />
<li>use paragraph tags (<p></p>)</li>
<br />
<li>paragraphs should not be too long, so text should be easy to read</li>
<br />
<li>you shuold pay attention on <a href="http://interestingwebs.blogspot.com/2011/12/web-page-optimization-techniques.html">keywords in text</a>:
<br /> <br />
<ul><li>Keyword position on web page</li>
<br />
<li>Keyword density</li>
<br />
<li>Keyword proximity</li>
</ul></li>
<br />
<li>using unordered list is a good idea, example:
<br />
<ul>
<br />
<li>first line</li>
<br />
<li>second line</li>
<br />
</ul></li>
</ul>
<br />
<b>Writing code inside guest post</b>
<ul>
<li>if you want to have some code in guest post put it inside <pre> tags for example: <pre>Some code</pre></li>
<br />
<li>don't forget to replace code characters and symbols into character entities, find more in <a href="http://interestingwebs.blogspot.com/2008/12/easy-way-to-put-code-snippets-in-blog.html">How to display HTML code in blog or web</a></li>
</ul>
<br />
<b>Images</b>
<p>If you have some screenshots you could send me images in mail (not more then 3 per post) and type image file name inside text where image should be. .jpg format is recommended.</p>
<br />
<b>Example of well formated text</b>
<p>At the end here is HTML for this post. When you send me guest post it should be formated similar to this example:</p>
<pre><p>Here are some basic guidelines for submitting guest post on this blog.</p>
<p>First let's list few reasons why you should guest post:
<ul><li>by posting on other%u2019s blog, you are gaining exposure and publicity</li>
<br />
<li>get more backlinks</li>
<br />
<li>immediately increase traffic if you guest post on popular blogs</li>
</ul></p>
<br /><br />
<h3>Rules for guest posting on this blog</h3>
<h4>Choose a topic</h4>
<ul>
<li>suggest a few titles with two or three keywords - e.g. Title: "How to increse web traffic" Keywords: "increase traffic"
<br /><br />
<ul><li>I will decide if I am satisfied with suggested titles, topic and keywords, optionally you can make <a href="http://interestingwebs.blogspot.com/2011/11/how-to-keyword-research.html">keyword research</a></li>
<br />
<li>you can send me your suggestion on this <a href="mailto:blogsrec@gmail.com?subject=Guest post">mail</a> with a subject "Guest post"</li>
</ul>
</li>
<br /><br />
<li>Choose a topic which is related with this blog. Topics could be:
<ul><br />
<li>HTML, CSS...</li>
<br />
<li>javascript, jQuery</li>
<br />
<li>tips for blogspot blog</li>
<br />
<li>tips for general blogging</li>
<br />
<li>how to increase web traffic, monetization and SEO</li>
</ul>
</li>
<br />
<li>guest post should have some useful information, answer on some question or give some step by step instructions how to do something, for example: <a href="">Adding categories to blogspot (blogger)</a> </li>
</ul>
<br />
<b>Post rules</b>
<ul><li>article must be original, it <b>shouldn't be published anywhere on web</b></li>
<br />
<li>use paragraph tags (&lt;p&gt;&lt;/p&gt;)</li>
<br />
<li>paragraphs should not be too long, so text should be easy to read</li>
<br />
<li>you shuold pay attention on <a href="http://interestingwebs.blogspot.com/2011/12/web-page-optimization-techniques.html">keywords in text</a>:
<br /> <br />
<ul><li>Keyword position on web page</li>
<br />
<li>Keyword density</li>
<br />
<li>Keyword proximity</li>
</ul></li>
<br />
<li>using unordered list is a good idea, example:
<br />
&lt;ul&gt;
<br />
&lt;li&gt;first line&lt;/li&gt;
<br />
&lt;li&gt;second line&lt;/li&gt;
<br />
&lt;/ul&gt;</li>
</ul>
<br />
<b>Writing code inside guest post</b>
<ul>
<li>if you want to have some code in guest post put it inside &lt;pre&gt; tags for example: &lt;pre&gt;Some code&lt;/pre&gt;</li>
<br />
<li>don't forget to replace code characters and symbols into character entities, find more in <a href="http://interestingwebs.blogspot.com/2008/12/easy-way-to-put-code-snippets-in-blog.html">How to display HTML code in blog or web</a></li>
</ul></pre>
Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com1tag:blogger.com,1999:blog-2720325367592426200.post-14285006726142664452012-12-06T12:33:00.000-08:002013-01-21T11:19:58.568-08:003D snowflakes effect on HTML page or blog<p>Here is a sample of 3D snow effect on HTML page. This sample work with a help of HTML5 and three.js library.</p>
<p>Snowflakes are moving in 3D manner and if you move mouse on left snowflakes will rotate to left. Same thing function for other directions. Try it!.</p>
<p>This 3D snow effect work on new version of browsers which support HTML5 functionality.</p>
<p>It seem this effect does not work on Internet Explorer browser but it works well on Chrome and Firefox.</p>
<br /><br /><br />
<style type="text/css">
.snow {
background-color: #000099;
margin: 0px;
overflow: hidden;
width: 650px;
height: 350px;
}
</style>
<div id="Div1" class="snow"></div>
<script type="text/javascript" src="https://dl.dropbox.com/u/59215462/SnowFall/3D/ThreeCanvas.js"></script>
<script type="text/javascript" src="https://dl.dropbox.com/u/59215462/SnowFall/3D/Snow.js"></script>
<script src="https://dl.dropbox.com/u/59215462/SnowFall/3D/3DSnowBox.js" type="text/javascript"></script>
<script>
init('Div1');
</script>
<br />
<p>Here is 3D snowfall code:</p>
<pre class="brush: js; gutter: true;">
<style type="text/css">
.snow {
background-color: #000099;
margin: 0px;
overflow: hidden;
width: 650px;
height: 350px;
}
</style>
<div id="Div1" class="snow"></div>
<script type="text/javascript" src="http://seb.ly/demos/JSSnow/js/ThreeCanvas.js">
</script>
<script type="text/javascript" src="https://dl.dropbox.com/u/59215462/SnowFall/3D/Snow.js">
</script>
<script src="https://dl.dropbox.com/u/59215462/SnowFall/3D/3DSnowBox.js"
type="text/javascript"></script>
<script>
init('Div1');
</script>
</pre>
<br />
<h4>Let's explain 3D snowfalling code</h4>
<ul><li>Line 1 to 9 is a style for div HTML element in which snowfall effect is putted, this style is used for .snow class, you can change value in style to adjust width, height or color to your needs</li>
<br />
<li>Line 11 is div element, its class in snow so style from beginning of code is used on this div</li>
<br />
<li>Line 13 to 14 is a reference to three.js library, it is 3D library</li>
<br />
<li>Line 15 to 16 is a reference to Snow.js library. This library make this cool 3D snow effect</li>
<br />
<li>Line 17 to 18 is a reference to 3DSnowBox.js. This file is mine and it make call to Snow.js easier</li>
<br />
<li>line 20 to 22 is a javascript call to a Init method with id parameter of div element in which 3D snow should occur</li>
</ul>
<br />
<p>If you find this article useful please make a link to this article on your page or blog!</p>
<script src="https://dl.dropbox.com/u/59215462/SH/shCore.js" type="text/javascript"></script>
<script src="https://dl.dropbox.com/u/59215462/SH/shBrushJScript.js" type="text/javascript"></script>
<link href="https://dl.dropbox.com/u/59215462/SH/shCore.css" rel="stylesheet" type="text/css" />
<link href="https://dl.dropbox.com/u/59215462/SH/shThemeDefault.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
SyntaxHighlighter.defaults['gutter'] = true;
SyntaxHighlighter.all();
</script>
Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com7tag:blogger.com,1999:blog-2720325367592426200.post-79469290666900213382012-11-26T12:37:00.000-08:002012-11-26T12:37:02.578-08:00Does GM food safe?<p>Does GM food is safe for consuming is the question that many consumers ask.</p>
<p>
We will start with a few facts about GM food and finish with a few studies with a negative opinion about GMO.</p>
<br />
<h4>
<u>Facts about GM food (source : <a href="http://www.who.int/foodsafety/publications/biotech/20questions/en/">WTO</a>)</u></h4>
<b>What is GMO?</b><br />
<p>
Genetically modified organisms (GMOs) can be defined as organisms in which the genetic material (DNA) has been altered in a way that does not occur naturally.</p>
<br />
<b>What is genetic engineering?</b><br />
<p>
It is a technology which allows selected individual genes to be transferred from one organism into another, also between non-related species.</p>
<p>
For example genetically modified cabbages which produce scorpion poison that kills caterpillars when they bite leaves. The goal is to limit pesticide use.</p>
<br />
<b>How GM foods safety should be assessed</b><br />
<p>
Different GM organisms include different genes inserted in different ways. This means that individual GM foods and their safety should be assessed on a case-by-case basis and that it is not possible to make general statements on the safety of all GM foods.
</p>
<p>
Claimed by WHO, GM foods currently available on the international market have passed risk assessments and are not likely to present risks for human health. In addition, no effects on human health have been shown as a result of the consumption of such foods by the general population in the countries where they have been approved.</p>
<br />
<b>Which countries have most GM crops in 2011 (source: <a href="http://www.guardian.co.uk/environment/graphic/2012/feb/09/gm-crops-world-2011-map" rel="nofollow">Guardian</a>)</b>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhogWwE5pPsXTLRfoI5FumWUsTrxyXfxI7JLUnTWfMP1MZqfjhwPmsD8Cu-Ta7qyWv5w2nneoIb5DXatwf26XBYtz1rmp0H4kKTGQ73DaS2it7FKjQhkPFX6ELL-j8tRRMtAOpiSgM2KX8/s1600/world_GM_crops.gif" imageanchor="1" rel="nofollow" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img alt="Production of GM food in the world" border="0" height="284" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhogWwE5pPsXTLRfoI5FumWUsTrxyXfxI7JLUnTWfMP1MZqfjhwPmsD8Cu-Ta7qyWv5w2nneoIb5DXatwf26XBYtz1rmp0H4kKTGQ73DaS2it7FKjQhkPFX6ELL-j8tRRMtAOpiSgM2KX8/s400/world_GM_crops.gif" width="400" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<h4>
Negative safe studies about GMO</h4>
<b>Árpád Pusztai study</b>
<br />
<p>
Árpád Pusztai is a world expert on plant lectins. In his study he fed rats with genetically modified potatoes. In 1998 Pusztai said in an interview that his group had observed damage to the intestines and immune systems of rats fed the genetically modified potatoes.</p>
<p>
He also said "If I had the choice I would certainly not eat it", and that "I find it's very unfair to use our fellow citizens as guinea pigs".<br />
After interview Pusztai's annual contract at Rowett was not renewed (some claims on Tony Blair's request). This event is known as <a href="http://en.wikipedia.org/wiki/Pusztai_affair" rel="nofollow">Pusztai affair</a>.</p>
<br />
He knew the truth about GMO safety year's ago:
<br />
<div class="separator" style="clear: both; text-align: left;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/Onw72ShqbP4?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<br />
<b>Dr. Irina Ermakova study 2005 (source: <a href="http://www.gmo-compass.org/eng/news/stories/195.study_gm_soy_dangerous_newborns.html" rel="nofollow">Gmo-compass</a>)</b>
<p>Dr. Irina Ermakova of the Russian Academy of Sciences recently released a study reporting higher mortality rates and lower body weight among young rats whose mothers were fed a diet of herbicide resistant, genetically modified soybeans.</p>
<p>The scientific team found that the mortality rate of the offspring of rats fed genetically modified soy flour was six times higher than that of rats raised with feed from conventional soy.</p>
<p>These findings were never published in a peer reviewed journal.</p>
<p>According to the ACNFP, Dr. Ermakova's findings are inconsistent with a recognized, published research report. At South Dakota State University in the United States, Denise Brake and Dr. Donald Evenson conducted similar feeding studies on mice with GM soybean and published their results in a peer-reviewed scientific journal in 2004. Brake and Evenson’s studies found no negative effects.</p>
<br />
<b>French study 2012 (source: <a href="http://www.dailymail.co.uk/sciencetech/article-2205509/Cancer-row-GM-foods-French-study-claims-did-THIS-rats--cause-organ-damage-early-death-humans.html" rel="nofollow">Dailymail</a>)</b>
<br />
<p>
Rats fed a lifelong diet of one of the bestselling genetically modified corn suffered tumours and multiple organ damage.</p>
<p>
It is the first to look at the impact of eating a GM diet over a lifetime in rats, which is two years. Until this study, safety assessments of GM crops have been based on rat feeding trials lasting 90 days.
</p>
<br />
Shocking images of tumours in mice caused by exclusively eating GM corn:
<img alt="Shocking images of tumours in mice caused by exclusively eating GM corn" height="184" src="http://i.dailymail.co.uk/i/pix/2012/09/19/article-2205509-151799EE000005DC-217_634x371.jpg" width="350" />
<br />
<p>
Michael Antoniou, a molecular biologist at King's College London, who helped draft the paper, told reporters about need to test all GM crops in two-year lifelong studies.
He said:
<br />
<br />
<blockquote>
I feel this data is strong enough to withdraw the marketing approval for this variety of GM maize temporarily, until this study is followed up and repeated with larger number of animals to get the full statistical power that we want</blockquote>
</p>
<br />
Seralini, the main team research member believes his latest lifetime rat tests give a more realistic and authoritative view of risks than the 90-day feeding trials that form the basis of GM crop approvals, since three months is only the equivalent of early adulthood in rats.<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/Njd0RugGjAg?feature=player_embedded' frameborder='0'></iframe></div>
<p>Recently six french science academies <a href="http://dotearth.blogs.nytimes.com/2012/10/19/six-french-science-academies-dismiss-study-finding-gm-corn-harmed-rats/" rel="nofollow">dismiss this study</a>.</p>
<br />
<b>At the end</b>
<p>We can conclude that there are studies which results indicates the GMO technology could be extremely dangerous. On the other side there are even more studies which claims that GMO is safe.</p>
<p>All three studies mentioned in this article were challenged by research community. Problem is that multinational monopolistic industry fund research centers and studies. So you may ask yourself if you would be a scientist would you make such a study which consequence will be loss of your cash flow.</p>
<p>Dr. Mae-Wan Ho citation:</p>
<p><blockquote>Genetic engineering biotechnology is inherently hazardous. It could lead to disasters far worse than those caused by accidents to nuclear installations...
<br /><br />
I should, right away, dispel the myth that genetic engineering is just like conventional breeding techniques. It is not. Genetic engineering bypasses conventional breeding by using the artificially constructed vectors to multiply copies of genes, and in many cases, to carry and smuggle genes into cells.
</blockquote></p>
Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com0tag:blogger.com,1999:blog-2720325367592426200.post-57509130037619027312012-11-12T12:57:00.000-08:002012-12-13T12:39:45.013-08:00Christmas effects on HTML page<p>On this page you can find links to christmas javascript effects which can be applied on your web page.</p>
<p>We will start with two snow effect, then continue with moving santa.</p>
<p>Look below for links to christmas effect tutorials!</p>
<br /><br /><br /><br /><br /><br /><br />
<p><b><a href="http://interestingwebs.blogspot.com/2008/12/how-to-add-falling-snow-effect-to-blog.html">Christmas snowing javascript effect</a></b> - find how to add snowing effect on your web page. Following this link more advanced users can also find how to make snow fall with a custom snow flakes.</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWyzW2TOpqhSP0CUkqmUdnfI_PxMzgBFxn-MgrSf9VBeopzHjRukcJfWLrpJ7KrSX-qzipjx935Le26-LrUiFpGXfxVuKUWf9HZiIr1lfdHHoLq3Lg-bUuKBgSjr3ZwONyY5cx6zPc4Kc/s1600/SnowFallSm.jpg" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="162" width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWyzW2TOpqhSP0CUkqmUdnfI_PxMzgBFxn-MgrSf9VBeopzHjRukcJfWLrpJ7KrSX-qzipjx935Le26-LrUiFpGXfxVuKUWf9HZiIr1lfdHHoLq3Lg-bUuKBgSjr3ZwONyY5cx6zPc4Kc/s400/SnowFallSm.jpg" rel="nofollow" alt="Snow fall effect sample from my blog" /></a></div>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<p><b><a href="http://interestingwebs.blogspot.com/2011/01/walking-santa-claus-jscript-effect.html">Moving santa on your HTML page</a></b> - how to get moving christmas Stana Claus on your HTML page with a help of javascript.</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihvB0KVzSq-qeBAxrRuNfTi4mX3fzQ2ladXfL__SSIG2E0_UBiXJgoDtvtAMOS4sipj7rQYdBhz34rBsH2jNQBN2t8fUUAAQGpLaFI6cW-lSnl74lyn94zPq9SYA0HsWIGno9Z5adQYK8/s1600/AnimateEffectOnWebPage.jpg" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="160" width="289" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihvB0KVzSq-qeBAxrRuNfTi4mX3fzQ2ladXfL__SSIG2E0_UBiXJgoDtvtAMOS4sipj7rQYdBhz34rBsH2jNQBN2t8fUUAAQGpLaFI6cW-lSnl74lyn94zPq9SYA0HsWIGno9Z5adQYK8/s320/AnimateEffectOnWebPage.jpg" rel="nofollow" alt="Animate - Moving image effect on web page" /></a></div>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<p><b><a href="http://interestingwebs.blogspot.com/2012/12/3d-snowflakes-effect-on-html-page-or.html">3D snow effect in HTML5</a></b> - want a window looking on 3D falling snow on your HTML page? This impressive 3D effect you can find by following the link.</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEQjjpwn3lwYTB_GIzSuVQk92YgXSq2QbFnqSWiPiOprPdGE9AkRuqRdkI54D7vExnjNx90FIJUPX0NV_g56_UPW03OSkHl69exh1PMywpNEWegMG2GfNYTBpKEXPI83I5K0hCYsjJqvc/s1600/3DSnow.jpg" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="179" width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEQjjpwn3lwYTB_GIzSuVQk92YgXSq2QbFnqSWiPiOprPdGE9AkRuqRdkI54D7vExnjNx90FIJUPX0NV_g56_UPW03OSkHl69exh1PMywpNEWegMG2GfNYTBpKEXPI83I5K0hCYsjJqvc/s400/3DSnow.jpg" alt="3D snow effect with HTML5 and javascript" /></a></div>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<p><b><a href="http://interestingwebs.blogspot.com/2012/11/jquery-snow-falling-effect-on-your-blog.html">jQuery snow falling effect</a></b> - if you like jQuery, linked article could teach you how to add snowing effect on you web site using jQuery.</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFZ9TKbGAiqrVCAa21tPM4PCg1Tuzt-sQJ9ItmN4zSSdgFEpzW7iNIzk08YGcjObXa0e_2U1H4uCPt8JxEy63uYf6jrYxhY-MM3pvAo_7-NYa768T2LNUosHMtyMK4H3t4xTw2_LxYPUw/s1600/Snowing.jpg" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="115" width="269" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFZ9TKbGAiqrVCAa21tPM4PCg1Tuzt-sQJ9ItmN4zSSdgFEpzW7iNIzk08YGcjObXa0e_2U1H4uCPt8JxEy63uYf6jrYxhY-MM3pvAo_7-NYa768T2LNUosHMtyMK4H3t4xTw2_LxYPUw/s320/Snowing.jpg" alt="jQuery snowing effect animation sample" /></a>
</div>
Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com0tag:blogger.com,1999:blog-2720325367592426200.post-88433266932098010152012-11-08T12:05:00.000-08:002012-11-08T12:30:28.240-08:00jQuery snow falling effect on your blog<p>How to get jQuery snowing effect animation on your blog or web site?</p>
<p>Very easy, you just need to copy a few lines of HTML code plus a few lines of jQuery code and your web page will snowing, many snowflakes will fall.</p>
<p>jQuery snow falling effect is visible on this page. If you look at page you will see falling snowflakes.</p>
<br />
<p>To get same (jQuery) snow effect you need to include this code on your page:</p>
<pre class="brush: js; gutter: true;">
<script src="http://code.jquery.com/jquery-1.8.2.min.js"
type="text/javascript"></script>
<script src="http://cloud.github.com/downloads/kopipejst/jqSnow/jquery.snow.js"
type="text/javascript"></script>
<script>
$(document).ready( function(){
$.fn.snow();
});
</script>
</pre>
<p>So, to get jQuery snowing effect you just need to copy code above and paste it on your HTML page.</p>
<p>First four lines of HTML code are links to jquery-1.8.2.min.js and to jquery.snow.js files. Lines 6 to 10 is jquery code which call snow method from jquery.snow.js file.</p>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFZ9TKbGAiqrVCAa21tPM4PCg1Tuzt-sQJ9ItmN4zSSdgFEpzW7iNIzk08YGcjObXa0e_2U1H4uCPt8JxEy63uYf6jrYxhY-MM3pvAo_7-NYa768T2LNUosHMtyMK4H3t4xTw2_LxYPUw/s1600/Snowing.jpg" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"><img border="0" height="115" width="269" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFZ9TKbGAiqrVCAa21tPM4PCg1Tuzt-sQJ9ItmN4zSSdgFEpzW7iNIzk08YGcjObXa0e_2U1H4uCPt8JxEy63uYf6jrYxhY-MM3pvAo_7-NYa768T2LNUosHMtyMK4H3t4xTw2_LxYPUw/s320/Snowing.jpg" alt="jQuery snowing effect animation sample" /></a></div>
<p>You can download jquery.snow.js file from <a href="http://workshop.rs/2012/01/jquery-snow-falling-plugin/">WORKSHOP
owned by Ivan Lazarevic</a> (the author of snowing script code), then upload this file somewhere on internet and use it for your blog or web site.</p>
<p>There is another <a href="http://interestingwebs.blogspot.com/2008/12/how-to-add-falling-snow-effect-to-blog.html">snowing effect on my blog</a> written in ordinary javascript.</p>
<script src="http://code.jquery.com/jquery-1.8.2.min.js" type="text/javascript"></script>
<script src="http://cloud.github.com/downloads/kopipejst/jqSnow/jquery.snow.js" type="text/javascript"></script>
<script>
$(document).ready( function(){
$.fn.snow();
});
</script>
<script src="https://dl.dropbox.com/u/59215462/SH/shCore.js" type="text/javascript"></script>
<script src="https://dl.dropbox.com/u/59215462/SH/shBrushJScript.js" type="text/javascript"></script>
<link href="https://dl.dropbox.com/u/59215462/SH/shCore.css" rel="stylesheet" type="text/css" />
<link href="https://dl.dropbox.com/u/59215462/SH/shThemeDefault.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
SyntaxHighlighter.defaults['gutter'] = true;
SyntaxHighlighter.all();
</script>Markhttp://www.blogger.com/profile/16964923116965247316noreply@blogger.com9