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
public abstract class BasePrinter<Self extends BasePrinter<Self>> { | |
private static final String WORD_SEP = " "; | |
private static final String INDENT_STR = " "; | |
private final String wordSep, indentStr; | |
private boolean built; | |
private StringBuilder builder; | |
private String builtString; |
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
static class TestModule extends AbstractModule { | |
private final GenerationCtx ctx; | |
public TestModule(GenerationCtx ctx) { | |
this.ctx = ctx; | |
} | |
@Override | |
protected void configure() { | |
bind(GenerationCtx.class).toInstance(ctx); |
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
package com.krakenrs.spade.pipeline; | |
import java.util.function.Function; | |
import com.google.inject.AbstractModule; | |
import com.google.inject.Guice; | |
import com.google.inject.Inject; | |
import com.google.inject.Injector; | |
public class TestPipeline2 { |
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
package com.krakenrs.spade.pipeline2; | |
import java.util.function.Function; | |
public class TestPipeline2 { | |
static interface PipelineStep<I, O> extends Function<I, O> { | |
} | |
static interface PipelineProducer<S, I> { |
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
package com.krakenrs.spade.pipeline; | |
public class TestPipeline { | |
public interface PipelineBuilder<I> { | |
<O> PipelineBuilder<O> then(PipelineStep<I, O> step); | |
void run(); | |
} | |
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 * as t from 'io-ts'; | |
import { withMessage } from 'io-ts-types/lib/withMessage'; | |
import { Either, either } from 'fp-ts/lib/Either'; | |
interface UsernameBrand { | |
readonly Username: unique symbol; | |
} | |
type ErrorOrString = Either<t.Errors, string> |
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
Option Explicit | |
Public Const BankDateCol = "A" | |
Public Const BankNameCol = "C" | |
Public Const BankAmountCol = "D" | |
Public Const BankPropertyCol = "F" | |
Sub CopyValue(BankRow As Long, PropRow As Long, BankCol As String, PropertyCol As Long, PropertySheet As Worksheet) | |
PropertySheet.Cells(PropRow, PropertyCol).Value = Sheet1.Range(BankCol & BankRow).Value |
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 <ctype.h> | |
int checksum(char *str) { | |
int cs = 0; | |
int length = 0; | |
char *c; | |
/* get sequence length and validate chars in it */ | |
for(c=str; *c; c++, length++) { |
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 ComputeLinearScanOrder : public StackObj { | |
private: | |
int _max_block_id; // the highest block_id of a block | |
int _num_blocks; // total number of blocks (smaller than _max_block_id) | |
int _num_loops; // total number of loops | |
bool _iterative_dominators;// method requires iterative computation of dominatiors | |
BlockList* _linear_scan_order; // the resulting list of blocks in correct order | |
ResourceBitMap _visited_blocks; // used for recursive processing of blocks |
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
package org.mapleir.stdlib.collections; | |
import java.util.HashSet; | |
import java.util.Iterator; | |
import java.util.Set; | |
public abstract class IteratorIterator<T> implements Iterator<T> { | |
protected Iterator<T> current; | |
NewerOlder