These are dbase files
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
| use num::{One, BigUint}; // 0.2.0 | |
| use std::ops::{MulAssign, AddAssign}; | |
| fn fac<T>(n: T) -> T | |
| where T: One + AddAssign + Ord, | |
| for <'a> T : MulAssign<&'a T> { | |
| let mut r = T::one(); | |
| let mut i = T::one(); | |
| while i <= n { |
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
| /* | |
| A WBO (https://wbo.openode.io) hello world script | |
| This draws an orange square | |
| Be careful not to commit more than a few updates per second to the server when scripting, or it will ban you. | |
| Enter the following in your browser's javascript console: | |
| */ |
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
| extern crate pipe; | |
| /** | |
| Some libraries (such as handlebars or serde) offer functions that can generate data when given | |
| an object that implements io::Write. | |
| Some other libraries (such as Rocket) can consume data only from objects implementing io::Read. | |
| Here is an example `piper` function that can be used to make these two kinds of libraries together. |
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
| private static PrimitiveIterator.OfInt alphaChars(CharSequence s) { | |
| return s.chars().filter(Character::isAlphabetic).map(Character::toLowerCase).iterator(); | |
| } | |
| public static boolean compareAlphabeticCharacters(CharSequence a, CharSequence b) { | |
| PrimitiveIterator.OfInt aStream = alphaChars(a); | |
| PrimitiveIterator.OfInt bStream = alphaChars(b); | |
| while (aStream.hasNext() && bStream.hasNext()) { | |
| if (aStream.nextInt() != bStream.nextInt()) return false; | |
| } |
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
| package com.qwant; | |
| import org.ccil.cowan.tagsoup.jaxp.SAXParserImpl; | |
| import org.xml.sax.Attributes; | |
| import org.xml.sax.SAXException; | |
| import org.xml.sax.helpers.DefaultHandler; | |
| import java.io.ByteArrayInputStream; | |
| import java.io.IOException; | |
| import java.io.InputStream; |
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
| package com.company; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| import java.util.stream.Stream; | |
| import static java.util.stream.Collectors.joining; | |
| public class Main { | |
| public static String decode(String morseCode) { |
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
| package com.company; | |
| import java.io.PrintStream; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| public class Main { | |
| static void hist(String codes, PrintStream out) { | |
| Map<Character, Integer> map = new HashMap<>(); |
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
| function memoize_async(func) { | |
| const m = async function (key) { | |
| if (!m.cache.has(key)) m.cache.set(key, await func.apply(this, arguments)); | |
| return m.cache.get(key); | |
| }; | |
| m.cache = new Map(); | |
| return m; | |
| }; |
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
| package com.company; | |
| import java.io.PrintWriter; | |
| import java.sql.SQLException; | |
| import static org.junit.Assert.assertEquals; | |
| public class MainTest { | |
| @org.junit.Test |