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
<!DOCTYPE html> | |
<!-- | |
To change this license header, choose License Headers in Project Properties. | |
To change this template file, choose Tools | Templates | |
and open the template in the editor. | |
--> | |
<html> | |
<head> | |
<title>MontyHall Paradox</title> | |
<meta charset="UTF-8"> |
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
fn index_of_any(str: &str, search_chars: &[char]) -> Vec<usize> { | |
str.char_indices() | |
.filter(|ci| search_chars.contains(&ci.1)) | |
.map(|ci| ci.0) | |
.collect() | |
} | |
fn main() { | |
let str = "abccd"; |
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
import java.util.Arrays; | |
import java.util.stream.IntStream; | |
public class Main { | |
public static int[] indexOfAny(String str, char[] searchChars) { | |
return IntStream.range(0, str.length()) | |
.filter(i -> IntStream.range(0, searchChars.length) | |
.anyMatch(ci -> searchChars[ci] == str.charAt(i))) | |
.toArray(); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<!--- | |
Source: | |
https://developer.apple.com/business/documentation/Configuration-Profile-Reference.pdf | |
https://www.derman.com/blogs/Example-iOS-VPN-OnDemand-Rules | |
--> | |
<dict> | |
<key>PayloadContent</key> |
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
C:\jdk\build\windows-x86_64-server-release\images\jdk\bin\java.exe -javaagent:C:\Progs\idea-2019.3\lib\idea_rt.jar=49476:C:\Progs\idea-2019.3\bin -Dfile.encoding=UTF-8 -classpath C:\workspace\jmh_file_exists\target\classes;C:\Users\Vest\.m2\repository\org\openjdk\jmh\jmh-core\1.22\jmh-core-1.22.jar;C:\Users\Vest\.m2\repository\net\sf\jopt-simple\jopt-simple\4.6\jopt-simple-4.6.jar;C:\Users\Vest\.m2\repository\org\apache\commons\commons-math3\3.2\commons-math3-3.2.jar org.sample.MyBenchmark | |
WARNING: An illegal reflective access operation has occurred | |
WARNING: Illegal reflective access by org.openjdk.jmh.util.Utils (file:/C:/Users/Vest/.m2/repository/org/openjdk/jmh/jmh-core/1.22/jmh-core-1.22.jar) to field java.io.PrintStream.charOut | |
WARNING: Please consider reporting this to the maintainers of org.openjdk.jmh.util.Utils | |
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations | |
WARNING: All illegal access operations will be denied in a future release | |
# JMH version: 1 |