Generic | Primitive specializations | Quick summary
---------------------------+----------------------------------------------+-----------------------------------------------------------------
Supplier <A> | (Int/Long/Double/Boolean)Supplier | Returns a value
| |
Consumer <A> | (Int/Long/Double)Consumer | Processes a single argument
BiConsumer <A1, A2> | Obj(Int/Long/Double)Consumer<A1> | Processes 2 arguments, the first one is always generic
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
#!/usr/bin/python | |
# -*- coding: windows-1251 -*- | |
import random, time, datetime, httplib, urllib | |
random.seed() | |
def changeSig(signature): | |
headers = { | |
"Content-type": "application/x-www-form-urlencoded", | |
"Accept": "text/plain" |
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
import random | |
class Car: pass | |
class Sheep: pass | |
class MontyHall: | |
cars = 0 | |
sheep = 0 | |
def __init__(self): | |
carLocation = random.randint(0, 2) |
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
import logging | |
import win32com.client as com | |
class EvtLogger: | |
"""Event handler for Bloomberg.Data COM events.""" | |
statusLog = logging.getLogger("Bloomberg.Data.onStatus") | |
dataLog = logging.getLogger("Bloomberg.Data.onData") | |
def OnStatus(self, code, subcode, descr): statusLog.info("%d.%d - %s" % (code, subcode, descr)) | |
def OnData(self, code, cookie, fields, data, status): dataLog.debug(locals()) | |
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
setx SSH_AUTH_SOCK %TEMP%/.ssh-socket | |
rm -rf %SSH_AUTH_SOCK% | |
ssh-agent -a %SSH_AUTH_SOCK% | |
ssh-add %CYGWIN_HOME%\home\%USERPROFILE%\.ssh\id_dsa | |
ssh-add %CYGWIN_HOME%\home\%USERPROFILE%\.ssh\id_rsa | |
pause |
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
import org.aspectj.lang.Signature; | |
import java.util.*; | |
import java.util.stream.Collectors; | |
interface DaggerComponentMarker {} // marker, so we can find the children of annotated classes using the pointcut language | |
public aspect DaggerTracer { | |
Deque<InjectionRecord> stack = new LinkedList<>(); | |
Set<Object> seen = new HashSet<>(); |
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
org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':compileClasspath'. | |
at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.rethrowFailure(DefaultLenientConfiguration.java:62) | |
at org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfiguration.rethrowFailure(DefaultResolvedConfiguration.java:36) | |
at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyConfigurationResolver$FilesAggregatingResolvedConfiguration.rethrowFailure(SelfResolvingDependencyConfigurationResolver.java:112) | |
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver$ErrorHandlingResolvedConfiguration.rethrowFailure(ErrorHandlingConfigurationResolver.java:189) | |
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:684) | |
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getFiles |
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
2017-01-29T08:52:34.084042Z|cov-build|19316|info|> cov-build 8.7.0 (build b452b3f2c8 p-lodi-push-28091.612) | |
2017-01-29T08:52:34.084042Z|cov-build|19316|info|> Coverity Build Capture (32-bit) version 8.7.0 on Windows 10 Professional, 64-bit (build 14393) | |
2017-01-29T08:52:34.084042Z|cov-build|19316|info|> Internal version numbers: b452b3f2c8 p-lodi-push-28091.612 | |
2017-01-29T08:52:34.084042Z|cov-build|19316|info|> | |
2017-01-29T08:52:34.084042Z|cov-build|19316|info|> Dumping from hostname : GARUDA | |
2017-01-29T08:52:34.084042Z|cov-build|19316|info|> | |
2017-01-29T08:52:34.084042Z|cov-build|19316|info|> Platform info: Windows 10 Professional, 64-bit (build 14393) | |
2017-01-29T08:52:34.084042Z|cov-build|19316|info|> | |
2017-01-29T08:52:34.084042Z|cov-build|19316|info|> cov-build command: cov-build --dir cov-int gradlew jar | |
2017-01-29T08:52:34.084042Z|cov-build|19316|info|> cov-build expanded command: cov-build --dir cov-int gradlew jar |
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
if ! out=`ansible-playbook yourplaybook.yaml`; then echo $out; fi | |
( ( do_something ; do_something_else ) > /dev/null ) 2>&1 | sed 's/^/doing_something: /g' >> /.../logs/cronerr.log |