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
type # concepts | |
BasicValue[T] = concept v | |
v.value is T | |
MinValue[T] = concept v | |
v is BasicValue[T] | |
v.min is T | |
MaxValue[T] = concept v | |
v is BasicValue[T] | |
v.max is T |
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
Name=Later This Evening | |
ColorForeground=#959595 | |
ColorBackground=#222222 | |
ColorCursor=#424242 | |
ColorPalette=#2b2b2b;#d45a60;#afba67;#e5d289;#a0bad6;#c092d6;#91bfb7;#3c3d3d; | |
#454747;#d3232f;#aabb39;#e5be39;#6699d6;#ab53d6;#5fc0ae;#c1c2c2 |
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
(lldb) | |
Process 27249 stopped | |
* thread #1, name = 't_hash', stop reason = step over | |
frame #0: 0x00005555555554bc t_hash`h_search(hTable=0x0000555555559260, key="400") at myhash.c:134:30 | |
131 else { | |
132 // looking for the key inside the next element of the linked list | |
133 char* keyAtNextValue = hTable->h_items[resultHash]->h_next->h_key; | |
-> 134 while( nextValue->h_next != NULL) { | |
135 fprintf(stderr, "Found a collision, traversing Linked list at address %p, key is: %s", | |
136 nextValue, nextValue); |
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
--- testdata_thash_output_sorted 2019-07-30 07:56:15.926762046 +0000 | |
+++ testdata_original 2019-07-30 07:57:44.266766721 +0000 | |
@@ -114,6 +114,7 @@ | |
adapt-sna:1365/tcp | |
adcp:7508/tcp | |
adi-gxp-srvprt:6769/tcp | |
+admind:3279/tcp | |
admind:8403/tcp | |
admins-lms:2692/tcp | |
adobeserver-1:1102/tcp |
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
--- testdata_original_delete 2019-07-30 12:14:25.430923889 +0000 | |
+++ testdata_original 2019-07-30 12:13:13.064253409 +0000 | |
@@ -561,6 +561,8 @@ | |
ansanotify:116/tcp | |
mcidas:112/tcp | |
gppitnp:103/tcp | |
+mpm-flags:44/tcp | |
+smtp:25/tcp | |
nimbusdb:48004/tcp | |
jvl-mactalk:47100/udp |
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
#!/usr/bin/env python3 | |
import csv | |
import sys | |
import getopt | |
import regex | |
devices = [] | |
newdevices = {} | |
def loadDevices(file): |
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
{ | |
"Standard Template": { | |
"prefix": "main", | |
"body": [ | |
"#include <stdio.h>", | |
"", | |
"int main (int argc, char** argv) {", | |
"\t\t$0\n", | |
" return EXIT_SUCCESS;", | |
"}" |
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
#define FAIL_IF(EXP) (\ | |
{\ | |
if(EXP) {\ | |
exit(EXIT_FAILURE);\ | |
}\ | |
}\ | |
)\ | |
#define FAIL_IF_MSG(EXP,MSG) (\ | |
{\ |
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
/** | |
* @file [file name].c | |
* @authors [author] | |
* @copyright [copy write holder] | |
* | |
* @brief [description] | |
*/ | |
/******************************************************************************* | |
* Includes | |
*******************************************************************************/ |
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
def minimumSwaps(arr): | |
swp = 0 | |
n = len(arr) | |
print(arr) | |
for i in range(1,n+1): | |
for j in range(n): | |
if(arr[arr.index(i)] == arr[j]): | |
source_idx = arr.index(i) | |
destination_idx = i-1 | |
if source_idx != destination_idx: |