Skip to content

Instantly share code, notes, and snippets.

View kamera25's full-sized avatar
😏

NAKAOKU Takahiro kamera25

😏
View GitHub Profile
@kamera25
kamera25 / gist:f3aac1fded7a3494cb04
Last active August 29, 2015 14:13
regular.php の仮リファクタリング
<?php
class Helper_Shift_Regular{
// 該当時間の勤務スタッフ数を求める
public static function regular_work_staff_count($regular_shift_day_id ,$shift_type) {
if($shift_type == 0){
$result = DB::select('*')
->from('regular_user')
->where('regular_day_id', $regular_shift_day_id)
->where('edited_shift_type', 'in', array(1,2,3))
@kamera25
kamera25 / ExportWithSettings.cs
Last active August 29, 2015 14:13
Unitypackageにアセットデータとプロジェクトセッティングを含める方法
using UnityEngine;
using System.Collections;
using UnityEditor;
public class Exporter
{
[MenuItem("Assets/ExportWithSettings")]
static void Export () {
AssetDatabase.ExportPackage("Assets", "Entire Project.unitypackage",ExportPackageOptions.Interactive | ExportPackageOptions.Recurse | ExportPackageOptions.IncludeLibraryAssets|ExportPackageOptions.IncludeDependencies );
}
@kamera25
kamera25 / RepeatButton.cs
Created January 29, 2015 08:29
UGUIでRepeatButtonを作る。
using UnityEngine;
using System.Collections;
public class RepeatButton : MonoBehaviour
{
bool push = false; // ボタンが押されているか?
public void StartPush()
{
push = true;
@kamera25
kamera25 / cnvogdtopo.bas
Created February 10, 2015 13:39
ogd(Libreoffice Draw)データから、POファイルを生成する(書きかけ)
REM ***** BASIC *****
Sub TranslateMessage
Dim iNumber As Integer
Dim aFile As String
Dim sText As String
' sText = InputBox ("poファイルのフルパスを入力してください。 ","poファイルのパス")
from microbit import *
while True:
display.scroll('あ')
sleep(2000)
from microbit import *
while True:
display.show(
Image(
"01000:"
"11101:"
"01010:"
"10101:"
# Add your Python code here. E.g.
from microbit import *
# ひらがなの画像
# KanaFive by pleist. http://wentwayup.tamaliver.jp/e93615.html
HIRAGANA_IMAGES = [
#あ
Image(
"01000:"
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class test : MonoBehaviour
{
public void SetValueByField( string key)
{
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SpriteMove : MonoBehaviour {
// 設定データを入れる
static Dictionary<string, float> settingDic = new Dictionary<string, float>(){
{"speedMax", 0F},
{"velocityMax", 0F}
@kamera25
kamera25 / GetVertsAndFacesForPython.py
Created October 17, 2020 11:50
Blenderで、頂点とメッシュデータをPython配列用に抽出するスクリプト
import bpy
# Get Variables.
obj = bpy.context.active_object
mesh = obj.data
print ( f"# Convert vertexs and face from \"{obj.name}\".")
# Print Vertexs.
vertNum = len(mesh.vertices)
print( f"# of vertices={vertNum}")