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
# Box Blur Algorithm from Gerdus van Zyl <gerdusvanzyl@gmail.com> | |
# it's a slow.it's not good to realtime stuff. Still it works without any other python library based on C. | |
# Need pypng(pure tiny python image library) for extractiing pixel array of png file. | |
# Portable. Just put png.py from pypng to your project with this file. | |
# This source gonna save your file with name "FINAL.PNG" Reccomend modifying for your project. | |
import png | |
import array |
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
// 이 튜토리얼 코드는, Derek Benas 의 C# 교육 코드를 유니티 스크립트 교육 맞춰 간단하게 고친것임을 밝힌다. | |
class Animal | |
{ | |
// public : 접근 제한이 없다 | |
// protected : 현재 클래스와 자식 클래스에서만 접근 가능 | |
// private : 현재 클래스에서만 접근 가능 | |
// 클래스 내부의 변수를 필드라고 부른다. |
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
class Player: MonoBehaviour{ | |
///// 코드 뭉치들.. | |
public float checkRadius; // 체크할 반경 | |
void Update() { | |
// 중심으로 부터 원을 그려서 겹치는 모든 콜라이더2D 들을 배열로 가져옴 | |
Collider2D detectedColliders = Physics2D.OverlapCircle(transform.position, checkRadius); | |
//하나씩 순회하면서 만약에 타입 A를 가진 친구가 있다면 실행하고 나머지 코드는 무시 | |
foreach (Collider2D target in detectedColliders) |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
using System.IO; | |
// 로컬 이미지 파일 경로를 주면 해당 경로에서 이미지를 로드해 UI Image로 띄어주는 코드 | |
public class ImageLoader : MonoBehaviour { | |
// 스프라이트를 로드할 이미지 컴포넌트 |
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
Shader "Custom/TermalRed" { | |
Properties { | |
_NormalTex("Normal Texture",2D) = "white" {} | |
_DistanceFadeOut("DistanceFadeOut",Range(0,3)) = 0 | |
} | |
SubShader { | |
Tags { "RenderType"="Opaque" } | |
LOD 200 |
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
var foundAny=false; | |
function selectAllByLetter(remainingLetters) { | |
console.log(remainingLetters) | |
var letter = remainingLetters.pop(); | |
$("#channel_invite_filter").val(letter).trigger("input"); | |
setTimeout(function() { | |
$(".channel_invite_member:not(hidden)").each(function(i, obj) { | |
foundAny=true; | |
this.click(); | |
}); |
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
using UnityEngine; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
// Merge multiple Sprites as one sprite | |
public static class SpriteMerger { | |
public static Sprite MergeSprite(Sprite[] sprites) { | |
// 스프라이트 중 가장 큰 크기의 것으로 지정되야함 |
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 <SoftwareSerial.h> | |
#include <AFMotor.h> | |
AF_DCMotor motor_L(4); // 모터드라이버 L293D 3: M3에 연결, 4: M4에 연결 | |
AF_DCMotor motor_R(3); | |
// ???? | |
int i; | |
int j; | |
//초음파센서 출력핀(trig)과 입력핀(echo), 변수, 함수 선언// |
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
from google.cloud import storage | |
import os | |
certificationJsonFile = 'XXXXX.json' | |
bucketName = r'pubsite_prod_rev_XXXXXX' | |
reportYear = 2018 | |
# Connecte with Service Account | |
storage_client = storage.Client.from_service_account_json(certificationJsonFile) |
OlderNewer