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
| import random | |
| peeps = { | |
| 'Matt': '', | |
| 'Al': '', | |
| 'Bebop': '', | |
| 'Mum': '', | |
| 'Dad': '', | |
| 'Gramps': '' | |
| } |
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
| node* Deletemultiples(node* head, int k) | |
| { | |
| node* temp = head, *old = head, *todelete; | |
| if (head == NULL) | |
| return NULL; | |
| while (temp!=NULL) { | |
| if (temp->data % k ==0 && temp->data != k) { | |
| todelete = temp; |
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
| #include <iostream> | |
| #include "inst_none.h" | |
| const int matrixSize = 1000; | |
| int a[matrixSize][matrixSize]; | |
| int b[matrixSize][matrixSize]; | |
| int c[matrixSize][matrixSize]; | |
| int main() { |
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
| Global $packetID = "UCAS" | |
| Local $inbuff = "", $n | |
| While 1 | |
| ;ManageTray() | |
| ;Sleep(50) ; (to allow script to make way for other software. Not sure if it does though?) | |
| $inbuff = $inbuff & _Commgetstring() |
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
| Local $handleDLL = DLLOpen("C:\DelcomDLL.dll") | |
| Local $devices = DllCall($handleDLL,"dword","DelcomGetDeviceCount","dword",0) | |
| Local $stStrings[$devices[0]] | |
| Local $tDeviceArray = DllStructCreate("wchar* Items[" & $devices[0] & "]") | |
| For $i = 1 To $devices[0] | |
| $stStrings[$i - 1] = DllStructCreate("wchar Name[512]") | |
| DllStructSetData($tDeviceArray, "Items", $stStrings[$i - 1], $i) |
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
| Func _ToBase($iNumber, $iBase, $iPad = 1, $sCharSet = Default) | |
| Local Static $sDefCharSet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/" | |
| Local $sRet = "", $iDigit | |
| If $sCharSet = Default Then $sCharSet = $sDefCharSet | |
| Do | |
| $iDigit = Mod($iNumber, $iBase) | |
| $sRet = StringMid($sCharSet, $iDigit + 1, 1) & $sRet | |
| $iNumber = Int($iNumber / $iBase) |
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
| Local $__AL_AU3API = FileRead("C:\Program Files\AutoIt3\SciTE\api\au3.api") | |
| Global $__AL_KEYWORDS = StringRegExp($__AL_AU3API, "(\w+)\?4", 3) | |
| Global $__AL_FUNCS = StringRegExp($__AL_AU3API, "(?:\n|\A)([^\_]\w+)\s\(", 3) | |
| Global $__AL_MACROS = StringRegExp($__AL_AU3API, "(?:\n|\A)(@\w+)\?3", 3) | |
| Local $aTypes[3] = ["KEYWORDS", "FUNCS", "MACROS"] | |
| Local $aArrays[3] = [$__AL_KEYWORDS, $__AL_FUNCS, $__AL_MACROS] | |
| Local $hFile, $a |
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
| #cs | |
| Syntax Tree Usage: | |
| The syntax tree is a flat array of "branches". The branches can point to each other by referencing | |
| the child branches index. In a simplistic way, the following tree: | |
| 1 | |
| / \ |
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
| #include <Array.au3> | |
| #include "AuLex.au3" | |
| Local $s = "TestOpt.au3" | |
| MsgBox(0, $s, _PreProcess($s)) | |
| Func _PreProcess($sFile) | |
| Local $aDefined[1][2] = [[0, 0]] ; NAME, VALUE |
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
| #include <Array.au3> | |
| #include <Math.au3> | |
| Global $__CmdLine_StrictMode = False | |
| Global $__CmdLine_PrefixLong = "--" | |
| Global $__CmdLine_PrefixShort = "-" | |
| Global $__CmdLine_StringChars = "'""" | |
| Global $__CmdLine_SplitChars = " =:" & @TAB |
NewerOlder