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 java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* Created by IAN on 30/08/14. | |
*/ | |
class Problem { |
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
C# | |
class Card { | |
public static enum CardType { “HEART”, “SPADE”, “DIAMOND”, “CLUB” } | |
public CardType type; | |
public int num; | |
//said I wanted to use properties with backing fields to limit access to sets, | |
//only provide public gets, but that I wasn’t exactly sure how to do it | |
public Card( int type, int num ){ | |
this.type = (CardType)type; |
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
using UnityEngine; | |
public class _Ha : MonoBehaviour { | |
float red = 0x00; | |
float green = 0x00; | |
float blue = 0x00; | |
const int step = 1; | |
const int min = 0x08; | |
const int max = 0xFF; |
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
//is called recursively to draw the beam of light | |
public void SetPoint(Vector3 origin, Vector3 direction) | |
{ | |
RaycastHit2D hit = Physics2D.Raycast(origin, direction); | |
//hit something! | |
if (hit.collider != null) | |
{ | |
if (hit.collider.GetComponent<Switch>().passable == true ) |
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
// Update is called once per frame | |
private void Update() | |
{ | |
ShowHitsComps(); | |
} | |
/** | |
Casts (and shows) a ray detecting all objects and their multiple components from the mouse cursor | |
position outward from the camera position in the camera's direction. Always works in only Scene | |
pane, but Gizmos needs to be on and the direction away from camera changed to see in Game pane. |
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
select | |
cco.option_code, substr(cco.option_code, 18) pt_code, pt.payment_type_id | |
from psec_client_config_option cco, paycfg_payment_type pt | |
where substr(cco.option_code, 18) = pt.payment_type_id | |
--where cco.client_code = pt.client_code | |
and cco.option_code like 'ACCOUNT_PATTERN%' | |
and cco.client_code = ( select client_code from psec_client where short_name = upper('cott')) | |
order by pt_code; |
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
select | |
cco.option_code, substr(cco.option_code, 18) pt_code, pt.payment_type_id, pt.PAYMENT_TYPE_CODE, pt.PAYMENT_TYPE_DESCRIPTION | |
from psec_client_config_option cco, paycfg_payment_type pt | |
where substr(cco.option_code, 18) = pt.payment_type_id | |
and cco.option_code like 'ACCOUNT_PATTERN%' | |
and cco.client_code = ( select client_code from psec_client where short_name = upper('cott')) | |
order by pt_code; |
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
protected override void OnCollisionEnter2D(Collision2D col) | |
{ | |
DamageVisitor damager = col.gameObject.GetComponent<DamageVisitor>(); | |
DamageVisitable damagable = gameObject.GetComponent<DamageVisitable>(); | |
damagable.AcceptDamageFrom(damager); | |
} | |
public override void AcceptDamageFrom(DamageVisitor damager) | |
{ | |
int damageAmount = damager.CauseDamageTo(this); |
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
const express = require('express'); | |
const multer = require('multer'); | |
const ejs = require('ejs'); | |
const path = require('path'); | |
//const bodyParser = require('body-parser'); | |
const port = process.env.PORT || 3004; | |
const app = express(); | |
const storage = multer.diskStorage({ |
OlderNewer