jQuery – set option by value
$('.selDiv option[value="SEL1"]').prop('selected', true)
source: https://stackoverflow.com/questions/314636/how-do-you-select-a-particular-option-in-a-select-element-in-jquery
$('.selDiv option[value="SEL1"]').prop('selected', true)
source: https://stackoverflow.com/questions/314636/how-do-you-select-a-particular-option-in-a-select-element-in-jquery
<rewrite>
<rules>
<rule name="redirect" enabled="true">
<match url="(.*)" />
<action type="Redirect" url="http://www.example.com/" appendQueryString="true" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
var date_diff_indays = function(date1, date2) {
dt1 = new Date(date1);
dt2 = new Date(date2);
return Math.floor((Date.UTC(dt2.getFullYear(), dt2.getMonth(), dt2.getDate()) - Date.UTC(dt1.getFullYear(), dt1.getMonth(), dt1.getDate()) ) /(1000 * 60 * 60 * 24));
}
SOURCE: https://www.w3resource.com/javascript-exercises/javascript-date-exercise-8.php
$("#element_1").replaceWith("<div id="element_2">123<div>");
SELECT min(CONVERT(NVARCHAR(max), my_ntext_filed)) AS my_agg_ntext_filed FROM tbl_test GROUP BY id
<system.webServer> <httpRedirect enabled="true" destination="http://www.google.com/" /> </system.webServer>
Dim loConn, lsSQL, loRs
Set loConn = CreateObject("ADODB.Connection")
' Open a connection to the database
loConn.Open(application("DSN=myDSN;UID=something;PWD=Something;"))
' Insert a new record into the table
lsSQL = "SET NOCOUNT ON;" &_
"INSERT INTO tbl_test (naziv) VALUES ('pero');" &_
"SELECT @@IDENTITY AS NewID;"
' Execute the SQL statement
Set loRs = loConn.Execute(lsSQL)
' Get the inserted ID
myNewID= loRs.Fields("NewID").value
response.write myNewID
' Close the connection
loConn.Close()
Set loConn = Nothing
The SET NOCOUNT ON suppresses messages like “1 Row(s) affected” being sent back. These messages are sent back every time SQL statement is executed.
source: http://www.kamath.com/tutorials/tut007_identity.asp
FUNCTION URLDecode(str)
'// This function:
'// - decodes any utf-8 encoded characters into unicode characters eg. (%C3%A5 = å)
'// - replaces any plus sign separators with a space character
'//
'// IMPORTANT:
'// Your webpage must use the UTF-8 character set. Easiest method is to use this META tag:
'//
'//
Dim objScript
Set objScript = Server.CreateObject("ScriptControl")
objScript.Language = "JavaScript"
URLDecode = objScript.Eval("decodeURIComponent(""" & str & """.replace(/\+/g,"" ""))")
Set objScript = NOTHING
END FUNCTION
source: https://gist.github.com/gwobcke/2773779
SELECT * FROM sys.dm_db_resource_stats order by end_time desc;