Skip to content

Instantly share code, notes, and snippets.

View hoganlong's full-sized avatar

Hogan Long hoganlong

View GitHub Profile

In programming we are constantly applying different layers of abstraction. At the root level data is just 1 and 0 and moving between memory cells and registers. Most people have no concern for that when they program. They have an object oriented or strongly typed language that adds a layer of abstraction over the internal machine code, instructions, and bytes.

Worrying about the endian of integers is a case of not looking at problems form the correct level of abstraction, in almost all cases. It is very rare a programmer will ever have to worry about the details of how the hardware stores the number in memory -- unless you are writing in machine language or doing hardware level data transfer it won't matter.

The compiler (yes even low level compilers like C) will take care of it for you. It just won't matter as long as you use the abstract typing of compiler.

Lets say you need to create a transport protocol -- in this case it may or may not matter depending on the protocol. If the protocol is in JSON or so

How to make a Tarot card

We want to make an image that is

  • 2.75" by 4.75" or
  • 70mm by 120mm or
  • 897px by 1497px

36 px on each edge will be cropped to get a "bleed" (so that the image goes all the way to the edge.)

How to Auction cards on Faceboook

  1. Edit your post, for each auction item post an individual pictures as a comment.

    • To bid on the item people will reply to that comment.
    • Typically when someone bids the auctioner will like the bid comment to show it was recieved.
    • Even if there were prior offers, you should have those people comment below the picture to show there was a bid on that item.
  2. Make sure you also comment and have an end time -- this will impact an auction a lot but you can't have an auction without one. Often people will also have anti-snipe rules.

  3. Anti-snipe

let Uxxankyun = {
a: 8,
b: 6,
draw: function(x) {
document.write("<pre>");
if (x) {
for (let i = 0; i < this.a; i++) {
for (let j = 0; j < this.b; j++) {
document.write(" * ")
}
with data(id, dept, age, name) as
(
values
(1, 'A', 60, 'A A' ),
(2, 'A', 70, 'B B' ),
(3, 'A', 80, 'C C' ),
(4, 'A', 90, 'D D' ),
(5, 'A', 100, 'E E' ),
(6, 'B', 10, 'F F' ),
(7, 'B', 20, 'G G' ),
with data(id, dept, age, name) as
(
values
(1, 'A', 60, 'A A' ),
(2, 'A', 70, 'B B' ),
(3, 'A', 80, 'C C' ),
(4, 'A', 90, 'D D' ),
(5, 'A', 100, 'E E' ),
(6, 'B', 10, 'F F' ),
(7, 'B', 20, 'G G' ),
for example if you have
Id State1 State2
1 1 DE
2 1 GA
3 1 AL
4 1 DC
5 1 FG
6 1 KG
7 1 PM
import java.io.FileNotFoundException;
import java.util.*;
public class TwoDArray {
public static void main(String[] args) throws FileNotFoundException {
java.io.File file = new java.io.File("2DArray.txt");
Scanner input = new Scanner(file);
int totalRow = 6;
with mat1 as
(
SELECT DISTINCT
matl1.SubPartNo,
STUFF((
SELECT ', ' + matl2.PartNo
FROM Materials as matl2
WHERE matl2.SubPartNo = matl1.SubPartNo
FOR XML PATH('')
),1,1,'') as WhereUsed
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>Freed From The Real podcast</title>
<description>A podcast for and about Magic Online</description>
<link>http://puremtgo.com/articles/recent?uid=&amp;title=freed+from+the+real</link>
<ttl>1800</ttl>
<item>
<title>Freed from the Real 414: Command Lowers Your Life Expectancy</title>