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 magicutilities; | |
import java.util.Objects; | |
import java.util.function.Function; | |
import java.util.function.ToIntFunction; | |
import javax.annotation.Nonnull; | |
import javax.annotation.Nullable; | |
public class EvenMoreObjects { |
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
.../MimeWalker.java:128: warning: [OperatorPrecedence] Use grouping parenthesis to make the operator precedence explicit | |
(contentType.startsWith("application/octet-stream")) && | |
^ | |
(see https://errorprone.info/bugpattern/OperatorPrecedence) | |
Did you mean '((contentType.startsWith("application/octet-stream")) &&'? | |
.../MimeWalker.java:128: warning: [UnnecessaryParentheses] Unnecessary use of grouping parentheses | |
(contentType.startsWith("application/octet-stream")) && | |
^ | |
(see https://errorprone.info/bugpattern/UnnecessaryParentheses) | |
Did you mean 'contentType.startsWith("application/octet-stream") &&'? |
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 hudson.util.RemotingDiagnostics | |
Jenkins.instance.slaves | |
.findAll { node -> node.labelString.contains('debian') } // not production-safe | |
.each { slave -> | |
println slave.name | |
def channel = slave.channel | |
if (channel != null) { | |
println RemotingDiagnostics.executeGroovy(""" |
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
$ docker run --volume "${PWD}:/home/tester/core" debianimage ps aux | |
Starting Xvfb... | |
Started Xvfb with PID 8 | |
Running command: ps aux | |
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND | |
root 1 3.0 0.0 21672 3256 ? Ss 08:57 0:00 /bin/bash /home/tester/run-wrapper ps aux | |
root 8 0.0 0.0 19424 876 ? R 08:57 0:00 Xvfb :1 -screen 0 1024x768x24 | |
root 9 0.0 0.0 19104 2560 ? R 08:57 0:00 ps aux | |
Finished | |
Stopping Xvfb... |
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
BMP file | |
{ | |
42 4d - magic 'BM' | |
8e 00 00 00 - total file size | |
00 00 00 00 - application specific reserved stuff | |
8a 00 00 00 - offset to pixel array | |
DIB header (BITMAPV5HEADER) | |
{ | |
7c 00 00 00 - DWORD biSize = 0x7c (bytes in header from here) |
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
00000000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 |.PNG........IHDR| | |
00000010 00 00 00 01 00 00 00 01 08 06 00 00 00 1f 15 c4 |................| | |
00000020 89 00 00 00 0d 49 44 41 54 78 da 63 98 f5 f9 7b |.....IDATx.c...{| | |
00000030 34 00 07 8f 02 e0 a7 82 a8 9a 00 00 00 00 49 45 |4.............IE| | |
00000040 4e 44 ae 42 60 82 |ND.B`.| | |
00000046 | |
89 50 4e 47 0d 0a 1a 0a - magic |
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.Locale; | |
import com.ibm.icu.text.DateFormat; | |
import com.ibm.icu.util.Calendar; | |
import com.ibm.icu.util.TimeZone; | |
import org.joda.time.DateTime; | |
import org.joda.time.DateTimeZone; | |
import org.joda.time.format.DateTimeFormat; | |
import org.joda.time.format.DateTimeFormatter; | |
import org.junit.Test; |
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> | |
<html> | |
<head> | |
<style type="text/css"> | |
html, body { | |
height: 100%; | |
width: 100%; | |
padding: 0px; | |
margin: 0px; |
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 "UnityCG.cginc" | |
fixed4 _Color; | |
float _DepthScale; | |
float _Sigma; | |
struct VertexInput | |
{ | |
float3 objectPos : POSITION; |
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
uint faceIndexFromDirection(float3 worldViewPos, float3 worldViewDir) | |
{ | |
//todo carry these from the source | |
float3 objectViewPos = mul(unity_WorldToObject, float4(worldViewPos, 1)).xyz; | |
float3 objectViewDir = mul(unity_WorldToObject, float4(worldViewDir, 0)).xyz; | |
fixed3 directionSign = sign(objectViewDir); | |
float3 directionInverse = 1.0 / objectViewDir; | |
float3 xHit = (-directionSign.x - objectViewPos.x) * directionInverse.x * objectViewDir; |