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
Dim message, sapi | |
message=InputBox("What do you want me to say?","Speak to Me") | |
Set sapi=CreateObject("sapi.spvoice") | |
sapi.Speak message |
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
<?php | |
class JaxWsSoapClient extends SoapClient | |
{ | |
public function __call($method, $arguments){ | |
$response = parent::__call($method, $arguments); | |
return $response->return; | |
} | |
} |
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
#!/bin/sh | |
REPOS="$1" | |
REV="$2" | |
# A - Item added to repository | |
# D - Item deleted from repository | |
# U - File contents changed | |
# _U - Properties of item changed; note the leading underscore | |
# UU - File contents and properties changed |
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
function getDateRangeArray($strDateFrom, $strDateTo) { | |
// takes two dates formatted as YYYY-MM-DD and creates an | |
// inclusive array of the dates between the from and to dates. | |
// could test validity of dates here but I'm already doing | |
// that in the main script | |
$aryRange = array(); | |
$iDateFrom = mktime(1, 0, 0, substr($strDateFrom, 5, 2), substr($strDateFrom, 8, 2), substr($strDateFrom, 0, 4)); | |
$iDateTo = mktime(1, 0, 0, substr($strDateTo, 5, 2), substr($strDateTo, 8, 2), substr($strDateTo, 0, 4)); |
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
DECLARE @myVar numeric | |
SET @myVar = 10 | |
UPDATE | |
tblMyTable | |
SET | |
@myvar = myId = @myVar + 1 | |
Where condition = 'Something' And isDeleted = 0 |
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
select S.program_name,DB_Name(S.dbid),min(S.last_batch), t.text as 'last_sql',S.loginame,count(*) | |
from sys.sysprocesses S | |
CROSS APPLY sys.dm_exec_sql_text (S.sql_handle) t | |
where S.dbid > 3 | |
and DB_NAME (S.dbid) = 'MyDatabase' | |
group by S.program_name,S.dbid,t.text,S.loginame having count(*) > 6 | |
order by count(*) desc |
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
.txtBox | |
{ | |
background: url(images/txtbox.png) no-repeat center; | |
border-style: none; | |
width: 207px; | |
height: 30px; | |
line-height: 30px; | |
font-family: Calibri, Verdana, Arial, Helvetica, Sans-Serif; | |
font-size: 11pt; | |
font-weight: bold; |
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
IF EXISTS (SELECT NULL FROM myTable WHERE myId = 'something') | |
UPDATE myTable SET some_other_column = 'some_other_thing' | |
ELSE | |
INSERT INTO myTable Values('something', 'some_other_thing',some_flag_may_be) |
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
//Before SQL Server 2012 | |
SELECT * FROM LargeTable WHERE indexColumn >= 'something' ORDER BY indexColumn | |
SELECT * | |
FROM ( SELECT ROW_NUMBER() OVER ( ORDER BY [PK] ) AS RowNum, * | |
FROM [funtest].[dbo].[LargeTable] | |
-- WHERE indexColumn >= 'something' | |
) AS RowConstrainedResult | |
WHERE RowNum >= 50 | |
AND RowNum <= 700 |
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
use *DATABASE_NAME* | |
go | |
SELECT *YOUR_FIELD*, COUNT(*) AS dupes | |
FROM *YOUR_TABLE_NAME* | |
GROUP BY *YOUR_FIELD* | |
HAVING (COUNT(*) > 1) |
OlderNewer