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
//A Tour of Go #38 | |
//Exercise: Slices | |
package main | |
import "code.google.com/p/go-tour/pic" | |
func Pic(dx, dy int) [][]uint8 { | |
f:= make([][]uint8,dy) | |
for y:=0;y<dy;y++{ |
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
package main | |
import ( | |
"encoding/csv" | |
"fmt" | |
"io" | |
"os" | |
) | |
func main() { |
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
-- | |
update monitor switches using statement on ; | |
--Create Event Monitor | |
create event monitor ykrkmonapp for statements write to file 'd:/tmp'; | |
--Set Event Monitor Active | |
set event monitor ykrkmonapp state=1 ; | |
--Drop Event Monitor |
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
uses | |
SysUtils, | |
Variants, | |
ActiveX, | |
ComObj; | |
function ConvertSidToStringSid(Sid: PSID; out StringSid: PChar): BOOL; stdcall; external 'ADVAPI32.DLL' name {$IFDEF UNICODE} 'ConvertSidToStringSidW'{$ELSE} 'ConvertSidToStringSidA'{$ENDIF}; | |
function SIDToString(ASID: PSID): string; | |
var |
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
// Copyright 2013 - by Jim Lawless | |
// License: MIT / X11 | |
// See: http://www.mailsend-online.com/license2013.php | |
// | |
// Bear with me ... I'm a Go noob. | |
package main | |
import ( | |
"log" |
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
uses ShlObj, ComObj, ActiveX; | |
//GET DESKTOP FOLDERS | |
function GetSystemPath(Folder: Integer): string; | |
var | |
PIDL: PItemIDList; | |
Path: LPSTR; | |
AMalloc: IMalloc; | |
begin | |
Path := StrAlloc(MAX_PATH); |
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 void RegisterTaskDefinition() | |
{ | |
ITaskService taskservice = null; | |
try | |
{ | |
taskservice = new TaskScheduler.TaskScheduler(); | |
taskservice.Connect(null, null, null, null); | |
ITaskFolder rootfolder = null; | |
try | |
{ |
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
//http://stackoverflow.com/questions/21180094/how-to-get-a-list-of-used-dlls | |
//http://msdn.microsoft.com/en-us/library/windows/desktop/ms683201(v=vs.85).aspx | |
//http://delphi.wikia.com/wiki/Dynamic_Link_Library_(DLL) | |
uses | |
SysUtils, | |
Windows, | |
TlHelp32; | |
{$R *.res} |
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
'Option Explicit | |
'Sub aa() | |
Dim oEncoder, oFile, oFSO 'As Object | |
Dim oStream, sSourceFile | |
Dim sDest, sFileOut, oEncFile | |
Set oEncoder = CreateObject("Scripting.Encoder") | |
Set oFSO = CreateObject("Scripting.FileSystemObject") | |
Set oFile = oFSO.GetFile("C:\ExcelMacro.vbs") |
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
//http://stackoverflow.com/questions/20271812/use-a-one-image-sprite-sheet-in-sprite-kit-ios | |
Entity *cookie = [[Entity alloc] initWithSpriteSheetNamed:@"cookie_sheet" withinNode:map sourceRect:CGRectMake(0, 0, 32, 32) andNumberOfSprites:6]; | |
- (id) initWithSpriteSheetNamed: (NSString *) spriteSheet withinNode: (SKSpriteNode *) scene sourceRect: (CGRect) source andNumberOfSprites: (int) numberOfSprites { | |
// @param numberOfSprites - the number of sprite images to the left | |
// @param scene - I add my sprite to a map node. Change it to a SKScene | |
// if [self addChild:] is used. |
OlderNewer