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.Collections; | |
namespace naichilab | |
{ | |
public class CameraSizeInitializer : MonoBehaviour | |
{ | |
public const float PixelToUnits = 1f; | |
// ゲーム内解像度 |
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; | |
/// <summary> | |
/// 暗号化PlayerPrefs | |
/// </summary> | |
public static class EncryptedPlayerPrefs | |
{ | |
public static void SaveInt(string key, int value) | |
{ |
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
//欲しいデータ | |
//SQLで書くとこんなかんじ。これをNCMBで再現したい。 | |
//select level,time from TestClass where level = 2 order by time desc limit 3 | |
//union all | |
//select level,time from TestClass where level = 3 order by time desc limit 3 | |
//union all | |
//select level,time from TestClass where level = 4 order by time desc limit 3 | |
//union all | |
//select level,time from TestClass where level = 5 order by time desc limit 3 | |
//union all |
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
dim col | |
col = Editor.ExpandParameter( "$x" ) | |
if col = 1 then | |
'未入力の行 | |
'現在時刻とタブの記入 | |
Editor.InsertTime | |
Editor.InsText vbTab | |
elseif col = 6 then | |
'同マクロで時刻を入力した直後 |
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
Editor.InsertDate |
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
Option Explicit | |
Const DEBUG_MODE As Boolean = False | |
Sub 図に枠線をつける() | |
'このマクロは「行内」画像にしか作用しません。 | |
Const THEME_COLOR As Integer = wdThemeColorBackground2 | |
Const TINT_AND_SHADE As Long = 0 |
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
Attribute VB_Name = "PDF" | |
Option Explicit | |
Sub SaveToPDF() | |
Attribute SaveToPDF.VB_ProcData.VB_Invoke_Func = " \n14" | |
Dim saveTo As String | |
saveTo = GetDesktopDir() & Format(Now(), "yyyyMMdd_hhmmss") & ".pdf" | |
ActiveWorkbook.ExportAsFixedFormat _ | |
Type:=xlTypePDF _ |
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
context '有効なパラメータの場合' do | |
def create_user | |
post :create, user: attributes_for(:user) | |
end | |
it 'リクエストは302 リダイレクトとなること' do | |
create_user | |
expect(response.status).to eq 302 | |
end | |
it 'データベースに新しいユーザーが登録されること' do | |
expect{ |
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
context '有効なパラメータの場合' do | |
let(:create_user) { -> { post :create, user: attributes_for(:user) } } | |
it 'リクエストは302 リダイレクトとなること' do | |
create_user.call | |
expect(response.status).to eq 302 | |
end | |
it 'データベースに新しいユーザーが登録されること' do | |
expect{ | |
create_user.call | |
}.to change(User, :count).by(1) |
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
context '有効なパラメータの場合' do | |
before do | |
@user = attributes_for(:user) | |
end | |
it '正しく登録されること' do | |
expect{ | |
post :create, user: @user | |
}.to change(User, :count).by(1) | |
expect(response.status).to eq 302 | |
expect(response).to redirect_to root_path |
NewerOlder