This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//returns query parameters as object | |
function getQueryString() { | |
var result = {}, queryString = location.search.slice(1), | |
re = /([^&=]+)=([^&]*)/g, m; | |
while (m = re.exec(queryString)) { | |
result[decodeURIComponent(m[1])] = decodeURIComponent(m[2]); | |
} | |
return result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string URI = "http://www.site.com"; | |
string myParameters = "param1=value1¶m2=value2¶m3=value3"; | |
using (WebClient wc = new WebClient()) | |
{ | |
wc.Encoding = Encoding.UTF8; | |
wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded"; | |
string htmlResult = wc.UploadString(URI, myParameters); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// 11 haneli bir rakamdır. | |
/// 0'la başlayamaz. | |
/// ilk 10 rakamın toplamının birler basamağı, son rakama eşittir | |
/// | |
/// Vikipedi: | |
/// 1, 3, 5, 7 ve 9. rakamın toplamının 7 katı ile 2, 4, 6 ve 8. rakamın toplamının 9 katının toplamının birler basamağı 10. rakamı; | |
/// 1, 3, 5, 7 ve 9. rakamın toplamının 8 katının birler basamağı 11. rakamı vermektedir. | |
/// | |
/// Programatik olarak düşünürsek, ilk rakam 0. index olduğuna göre: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "Abkhaz", | |
"nativeName": "аҧсуа", | |
"code": "ab" | |
}, | |
{ | |
"name": "Afar", | |
"nativeName": "Afaraf", | |
"code": "aa" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ab": { | |
"name": "Abkhaz", | |
"nativeName": "аҧсуа" | |
}, | |
"aa": { | |
"name": "Afar", | |
"nativeName": "Afaraf" | |
}, | |
"af": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{"name": "Afghanistan", "code": "AF"}, | |
{"name": "Ãland Islands", "code": "AX"}, | |
{"name": "Albania", "code": "AL"}, | |
{"name": "Algeria", "code": "DZ"}, | |
{"name": "American Samoa", "code": "AS"}, | |
{"name": "AndorrA", "code": "AD"}, | |
{"name": "Angola", "code": "AO"}, | |
{"name": "Anguilla", "code": "AI"}, | |
{"name": "Antarctica", "code": "AQ"}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--table valued function | |
create function tableValuedFunction() | |
returns table | |
as | |
return(select * from TBL_FOO) | |
--using table-valued func | |
select * from tableValuedFunction() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta charset="utf-8" /> | |
<title></title> | |
</head> | |
<body ng-app="app"> | |
<div ng-controller="ratingDemoCtrl"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html: | |
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?libraries=places&sensor=false"></script> | |
<div ng-app="app" ng-controller="mainController"> | |
Selected place: {{selectedPlace}} <br/> | |
<input ng-model="selectedPlace" googleplace/> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IDatabaseFactory | |
{ | |
HIDSDbContext Get(); | |
} | |
public class DatabaseFactory : IDisposable, IDatabaseFactory | |
{ | |
private DbContext _context; | |
public DbContext Get() | |
{ | |
return _context ?? (_context = new DbContext()); |
OlderNewer