Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Edward J Beckett edwardbeckett

🎯
Focusing
Block or report user

Report or block edwardbeckett

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@edwardbeckett
edwardbeckett / GitCommitEmoji.md
Created Sep 19, 2019 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
View GitCommitEmoji.md
@edwardbeckett
edwardbeckett / JAXBCollection.java
Created Nov 22, 2018 — forked from itavero/JAXBCollection.java
Generic serializer / marshaller / unserializer / unmarshaller class to convert objects into strings and vice versa. Uses the JAXB lib. Personally used this class for converting messages received/sent to a queue (JMS).
View JAXBCollection.java
/*
* Copyright (c) 2013, Arno Moonen <info@arnom.nl>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@edwardbeckett
edwardbeckett / dualPivotQuicksort.js
Created Oct 12, 2018 — forked from lewisje/dualPivotQuicksort.js
Dual-Pivot Quicksort algorithm by Vladimir Yaroslavskiy, now with more input validation and support for (non-astral-plane-safe) string sorting (MIT License): https://web.archive.org/web/20151002230717/http://iaroslavski.narod.ru/quicksort/DualPivotQuicksort.pdf
View dualPivotQuicksort.js
// https://web.archive.org/web/20141119215047/http://jsperf.com/javascript-quicksort-comparisons
// based on work from Vladimir Yaroslavskiy: https://web.archive.org/web/20151002230717/http://iaroslavski.narod.ru/quicksort/DualPivotQuicksort.pdf
var dualPivotQuicksort = (function (Math, toString, undefined) {
'use strict';
function swap(arr, i, j) {
var temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
}
function dualPivotQuicksort(arr, comp, left, right, div) {
@edwardbeckett
edwardbeckett / LogicalOperators.java
Created Mar 28, 2018
Logical Operators Cheat Sheet
View LogicalOperators.java
public class LogicalOperators {
/*
* TRUTH LOGIC
*
* X & Y
* (AND)
*
* AND is Only True IF BOTH OPERANDS ARE TRUE
* ---------------------------------
@edwardbeckett
edwardbeckett / Inline.java
Last active Apr 11, 2017
Demo to assert inlining methods...
View Inline.java
112 1 3 java.lang.AbstractStringBuilder::newCapacity (39 bytes)
@ 31 java.lang.AbstractStringBuilder::hugeCapacity (28 bytes)
@ 11 java.lang.OutOfMemoryError::<init> (5 bytes) don't inline Throwable constructors
112 2 3 java.lang.String::hashCode (55 bytes)
113 3 3 java.lang.String::equals (81 bytes)
114 4 3 java.lang.Object::<init> (1 bytes)
114 5 3 java.lang.String::indexOf (70 bytes)
@ 66 java.lang.String::indexOfSupplementary (71 bytes) callee is too large
114 9 n 0 java.lang.System::arraycopy (native) (static)
114 7 3 java.lang.Math::min (11 bytes)
View jhi_persistent_audit_event_modification.sql
USE [Foo]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[jhi_persistent_audit_event](
[event_id] [bigint] IDENTITY(1,1) NOT NULL,
@edwardbeckett
edwardbeckett / progfun04
Created Oct 30, 2016 — forked from nicokosi/progfun04
My notes from Coursera course "Functional Programming Principles in Scala" (https://class.coursera.org/progfun-004).
View progfun04
Notes from Coursera course 'Functional Programming Principles in Scala":
https://class.coursera.org/progfun-004
✔ Week 1: Functions & Evaluations @done (14-05-01 17:20)
✔ Lecture 1.1 - Programming Paradigms (14:32) @done (14-04-27 17:54)
3 paradigms: imperative, functional, logic
OO: orthogonal
imperative:
View 100_users.json
[
{
"userID": "ethel.price@example.com",
"firstName": "Ethel",
"lastName": "Price",
"viewEdit": ""
},
{
"userID": "claudine.neal@example.com",
@edwardbeckett
edwardbeckett / CrmAuth.java
Created Jun 5, 2016 — forked from jlattimer/CrmAuth.java
Dynamics CRM Java SOAP only authentication
View CrmAuth.java
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.security.MessageDigest;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
@edwardbeckett
edwardbeckett / Xrm.CRMAuth.js
Created Jun 5, 2016 — forked from jlattimer/Xrm.CRMAuth.js
Dynamics CRM JavaScript SOAP only authentication - this only works in mobile applications - not browsers!
View Xrm.CRMAuth.js
//Requires jQuery - http://jquery.com/
//Requires jsSHA (sha1.js) - http://caligatio.github.io/jsSHA/
Xrm = window.Xrm || { __namespace: true };
Xrm.CRMAuth = Xrm.CRMAuth || { __namespace: true };
/// <summary>Gets a CRM Online SOAP header & expiration.</summary>
/// <param name="url" type="String">The Url of the CRM Online organization (https://org.crm.dynamics.com).</param>
/// <param name="username" type="String">Username of a valid CRM user.</param>
/// <param name="password" type="String">Password of a valid CRM user.</param>
You can’t perform that action at this time.