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
diff -ruN a/run/1password2john.py b/run/1password2john.py | |
--- a/run/1password2john.py 2024-02-03 03:18:48 | |
+++ b/run/1password2john.py 2024-02-24 17:05:12 | |
@@ -1,4 +1,4 @@ | |
-#!/usr/bin/env python | |
+#!/usr/bin/env python3 | |
# Written by Dhiru Kholia <dhiru at openwall.com> in July 2012 for JtR project. | |
# Copyright (c) 2012-2013, Dhiru Kholia. | |
diff -ruN a/run/DPAPImk2john.py b/run/DPAPImk2john.py |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <zlib.h> | |
int main() { | |
// Le message "Hello World" à compresser | |
const char *message = "Hello World"; | |
// Données pour la compression |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <bzlib.h> | |
int main() { | |
// Le message "Hello World" à compresser | |
const char *message = "Hello World"; | |
// Données pour la compression |
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
diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt | |
--- a/Tests/BuildDepends/Project/CMakeLists.txt | |
+++ b/Tests/BuildDepends/Project/CMakeLists.txt | |
@@ -19,7 +19,7 @@ | |
if(EXISTS "${CMAKE_OSX_SYSROOT}" AND NOT "${CMAKE_GENERATOR}" MATCHES "Ninja") | |
if(CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 10) | |
# Arch 'i386' no longer works in Xcode 10. | |
- set(CMAKE_OSX_ARCHITECTURES x86_64) | |
+ set(CMAKE_OSX_ARCHITECTURES x86_64 arm64) | |
elseif(CMake_TEST_XCODE_VERSION VERSION_GREATER_EQUAL 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
fun main(){ | |
print("What is your country? ") | |
val country = readLine() | |
val addressStrategy = if(country == "US") getUsAddressStrategy() else getOtherCountryAddressStrategy() | |
return addressStrategy.promptAddress() | |
} |
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
fun getOtherCountryAddressStrategy() = AddressStrategy{ | |
print("Please enter your zipCode: ") | |
readLine() | |
print("Please enter your city: ") | |
readLine() | |
print("Please enter your street address: ") | |
readLine() | |
} |
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
fun getUsAddressStrategy() = AddressStrategy{ | |
print("Please enter your state: ") | |
readLine() | |
print("Please enter your zipCode: ") | |
readLine() | |
print("Please enter your city: ") | |
readLine() | |
print("Please enter your street address: ") | |
readLine() | |
} |
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
fun interface AddressStrategy{ | |
fun promptAddress() | |
} |
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
fun main(){ | |
val context = StateContext() | |
val test1 = "123." | |
val test2 = "123er45" | |
val test3 = "-145.36" | |
println("$test1 is ${if(context.parseString(test1)) "" else "not "}a valid number.") | |
println("$test2 is ${if(context.parseString(test2)) "" else "not "}a valid number.") | |
println("$test3 is ${if(context.parseString(test3)) "" else "not "}a valid number.") | |
} |
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
class StateContext { | |
private var state: State? = null | |
fun setState(state: State?){ | |
this.state = state | |
} | |
public fun parseString(number: String): Boolean{ | |
setState(InitialState()) | |
for(character in number){ |
NewerOlder