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
[B][SIZE=5][COLOR=rgb(0, 89, 179)]VERSION[/COLOR][/SIZE][/B] | |
[SIZE=4][B][COLOR=rgb(0, 179, 0)][U]Added[/U][/COLOR][/B][/SIZE] | |
[LIST] | |
[*] | |
[/LIST] | |
[B][U]Changes/Fixes[/U][/B] | |
[LIST] | |
[*] |
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
=== Changelog VERSION === | |
====== ++Added++ ====== | |
* | |
====== Changed/Fixed ====== | |
* |
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 class MinecraftPing { | |
//this value updates every 40 Ticks => 2 Seconds. So you proparly want to add a scheduled task for it. | |
public int getReflectionPing(Player player) { | |
try { | |
if (getHandleMethod == null) { | |
getHandleMethod = player.getClass().getDeclaredMethod("getHandle"); | |
//disable java security check. This will speed it a little | |
getHandleMethod.setAccessible(true); | |
} |
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 class AnnotationHelper { | |
private static final String ANNOTATIONS = "annotations"; | |
public static final String ANNOTATION_DATA = "annotationData"; | |
public static boolean isJDK7OrLower() { | |
boolean jdk7OrLower = true; | |
try { | |
Class.class.getDeclaredField(ANNOTATIONS); | |
} catch (NoSuchFieldException e) { | |
//Willfully ignore all exceptions |
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
nmap -sP -n 192.168.0.0/24 |
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
;; area-of-ring: number number -> number | |
;; Determines the area of a ring | |
;; with outer radius outer and an inner radius inner | |
;; Example: (area-of-ring 5 3) is | |
;; roughly 50.26544 | |
(define (area-of-ring outer inner) | |
(- (area-of-circle outer) | |
(area-of-circle inner))) | |
;;Tests |
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
#! /usr/bin/python3 | |
# Example output: | |
# Enter a number:1024 | |
# Number: 1024 | |
# Needed bits: 11 | |
# Bytes (unsigned) 100 0000 0000 | |
# Bytes (two-complement) 0100 0000 0000 | |
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
;; The first three lines of this file were inserted by DrRacket. They record metadata | |
;; about the language level of this file in a form that our tools can easily process. | |
#reader(lib "htdp-intermediate-reader.ss" "lang")((modname invert) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) | |
(define (invert lst) | |
(cond [(empty? lst) empty] | |
[else (append (invert (rest lst)) (cons (first lst) empty))])) | |
(check-expect (invert empty) empty) | |
(check-expect (invert (list 1)) (list 1)) |
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
;; The first three lines of this file were inserted by DrRacket. They record metadata | |
;; about the language level of this file in a form that our tools can easily process. | |
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname newton-method) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) | |
;; newton-method: (X -> Y) (X -> Z) number number -> number | |
;; | |
;; Makes use of the newton method to calculate the f(x) = 0 | |
;; | |
;; Example: | |
(define (newton-method fct fct-abl x delta) |
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
;; The first three lines of this file were inserted by DrRacket. They record metadata | |
;; about the language level of this file in a form that our tools can easily process. | |
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname newton-method) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) | |
;; length-representation: number number -> number | |
;; | |
;; Outputs the lowester exponent for b which is higher than x | |
;; | |
;; Example: (length-representation 10 2) = 4 | |
(define (length-representation x b) |