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 palindrome(input): | |
length = len(input) | |
palindromes = [] | |
for x in range(2,len(input)+1): | |
min = 0 | |
while (min+x) < length+1: | |
if(input[min:(min+x)] == input[min:(min+x)][::-1]): | |
palindromes.append(testString) | |
min = min+1 | |
return palindromes |
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
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace rate_limited_threadpool | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Diagnostics; | |
using System.IO; | |
namespace TimingAttack | |
{ |
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 external crates | |
extern crate time; | |
//start main function | |
fn main() { | |
//define the full tokens, immutable str's | |
let valid_token = "qCXQ8v73jv8L2m/YXOfWB55mJzDubC0s51r3nHqLsBFTlaPTO8vBDcLJVs/Rt8j4VjiA3VDUMy8gK+eagU9JVw=="; | |
let invalid_token = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRTSUVWXYZ123456789abcdefghijklmnopqrstuvwxy=="; | |
//define the arrys which will hold the times for each trial | |
let mut correct_times: [u64;200] = [0;200]; |
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
extern crate time; | |
extern crate rand; | |
use time::PreciseTime; | |
use rand::Rng; | |
fn main() { | |
for n in 0..101{ | |
let start_double_shift = PreciseTime::now(); | |
for n in 0..101 { | |
let num = rand::thread_rng().gen_range(0, 255); |
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
month30 = [4, 6, 9, 11] | |
month31 = [1, 3, 5, 7, 8, 10, 12] | |
for year in range(17,100): | |
for month in range(1,13): | |
if month in month30: | |
upper = 31 | |
elif month in month31: | |
upper = 32 | |
else: |
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
<style> | |
.vAlign { | |
min-height: 100%; | |
display: inline-flex; | |
align-items: center; | |
width:100%; | |
} | |
.cAlign { | |
display:inline-flex; | |
flex-direction:column; |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace rust_dll_poc | |
{ | |
[StructLayout(LayoutKind.Sequential)] |
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
//using statements | |
use std::os::raw::c_char; | |
use std::ffi::CString; | |
//static var | |
static mut STRING_POINTER: *mut c_char = 0 as *mut c_char; | |
///structs | |
#[repr(C)] | |
pub struct SampleStruct { | |
pub field_one: i16, |
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
#include "stdafx.h" | |
#include "TranslateOutput.h" | |
typedef SomeStruct(CALLBACK* GetSomeStructType)(); | |
int main() | |
{ | |
HINSTANCE dllHandle = NULL; | |
dllHandle = LoadLibrary(L"translator_test.dll"); |
OlderNewer