This file contains hidden or 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 hidden or 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
using System; | |
using System.Net; | |
using System.Net.Mail; | |
namespace ConsoleApplication1 | |
{ | |
/// <summary> | |
/// sending e-mail using hotmail smtp service | |
/// </summary> | |
class Program |
This file contains hidden or 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
$.ajax({ | |
url: "http://localhost:33460/api/Account/userinfo", | |
dataType: 'json', | |
data: { | |
foo: 'bar' | |
}, | |
success: function(data, status) { | |
return console.log("The returned data", data); | |
}, | |
beforeSend: function(xhr, settings) { xhr.setRequestHeader('Authorization','Bearer ' + tokenString ); } //set tokenString before send |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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"> |
OlderNewer