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
.dropCap:first-letter { | |
font-weight: 600; | |
font-size: 6em!important; | |
line-height: .8; | |
display: block; | |
float: left; | |
height: 0.6em; | |
margin: 5px 5px 5px -7px; | |
} |
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
body { | |
background-color: #f5f5dc; | |
border-top: solid 10px #333; | |
color: #4c362a; | |
font-size: 1.1em; | |
font-family: 'Alegreya', serif; | |
margin: 0; | |
padding: 0; | |
} |
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
<input type="file" capture="camera" accept="image/*" id="cameraInput"> |
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
DECLARE @Id int | |
DECLARE TableCursor CURSOR LOCAL FAST_FORWARD FOR | |
SELECT Id | |
FROM dbo.TABLENAME | |
OPEN TableCursor | |
FETCH NEXT FROM TableCursor INTO @Id | |
WHILE @@FETCH_STATUS=0 |
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
SELECT TOP 1 [xmlColumnName].value('(//NodeName)[1]','varchar(max)') AS NameOfData | |
FROM [TableWithXMLColumn] | |
WHERE | |
Id = @id |
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
// This does not work and gives the wrong figure due to concatination | |
var shiftPrem = $('#Contract_Reward_ShiftPremium').val(); | |
var basePay = $('#Contract_Reward_BasePay').val(); | |
var total = basePay + (basePay * (shiftPrem/100)); | |
//This works by forcing javascript to treat the variables as numbers | |
shiftPrem = $('#Contract_Reward_ShiftPremium').val(); | |
basePay = $('#Contract_Reward_BasePay').val(); | |
total = +basePay + +(basePay * (shiftPrem/100)); |
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
<input type="text" title="email" required pattern="[^@]+@[^@]+\.[a-zA-Z]{2,6}" /> |
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
navigator.sayswho = (function () { | |
var ua = navigator.userAgent, tem, | |
M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*([\d\.]+)/i) || []; | |
if (/trident/i.test(M[1])) { | |
tem = /\brv[ :]+(\d+(\.\d+)?)/g.exec(ua) || []; | |
return 'IE ' + (tem[1] || ''); | |
} | |
M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?']; | |
if ((tem = ua.match(/version\/([\.\d]+)/i)) != null) M[2] = tem[1]; | |
return M.join(' '); |
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
@Html.DropDownListFor(x=>x.ListName, | |
Model.ListName.Select(i => new SelectListItem | |
{ | |
Value = i.Id.ToString(), | |
Text = i.Title | |
}), | |
new { @class = "input-full" }) |
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
@@IDENTITY - returns the last identity value generated for any table in the current session, across all scopes. You need to be careful here, since it's across scopes. You could get a value from a trigger, instead of your current statement. | |
SCOPE_IDENTITY - returns the last identity value generated for any table in the current session and the current scope. Generally what you want to use. | |
IDENT_CURRENT - returns the last identity value generated for a specific table in any session and any scope. This lets you specify which table you want the value from, in case the two above aren't quite what you need (very rare). Also, as @Guy Starbuck mentioned, "You could use this if you want to get the current IDENTITY value for a table that you have not inserted a record into." | |
The OUTPUT clause of the INSERT statement will let you access every row that was inserted via that statement. Since it's scoped to the specific statement, it's more straightforward than the other functions above. However, it's a litt |
OlderNewer