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 fs = require('fs'); | |
var NCMB = require("ncmb"); | |
// アプリケーションキーとクライアントキー | |
var appKey = ""; | |
var cliKey = ""; | |
// Raspberry Pi GPIOの16番ピンを入力モードに設定する | |
fs.writeFileSync('/sys/class/gpio/export', 16); | |
fs.writeFileSync('/sys/class/gpio/gpio16/direction', 'in'); |
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
public class Fibonacci { | |
public static void main(String[] args) { | |
int f0 = Integer.parseInt(args[0]); | |
int f1 = Integer.parseInt(args[1]); | |
int fn = 0; | |
for (int i = 0; i < 10; i++) { | |
fn = f0 + f1; |
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
public class FizzBuzz { | |
public static void main(String[] args) { | |
int num = Integer.parseInt(args[0]); | |
for (int i = 1; i <= num; i++) { | |
if (i % 15 == 0) | |
System.out.println("FizzBuzz"); | |
else if (i % 3 == 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
public class Factorial { | |
public static void main(String[] args) { | |
int num = Integer.parseInt(args[0]); | |
System.out.println(fact(num)); | |
} | |
private static int fact(int n) { | |
if (n == 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
using UnityEngine; | |
using System.Collections; | |
using UnityEngine.UI; | |
public class ChangeMasterClient : Photon.MonoBehaviour | |
{ | |
[SerializeField] | |
private Button connecToPhoton, joinRoom, rpc, master; | |
[SerializeField] | |
private Text log, name, masterName; |
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; | |
using Hashtable = ExitGames.Client.Photon.Hashtable; | |
public class LobbyManager : MonoBehaviour | |
{ | |
private PhotonPlayer photonPlayer; | |
private string[] playerNames; | |
// エラー系 |
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; | |
using UnityEngine.UI; | |
public class Example : Photon.MonoBehaviour | |
{ | |
[SerializeField] | |
private Button connecToPhoton, joinRoom, rpc; | |
[SerializeField] | |
private Text log; |
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; | |
using UnityEngine.UI; | |
using System.Collections.Generic; | |
using ExitGames.Client.Photon; | |
public class WebRPC : MonoBehaviour | |
{ | |
public Button connecToPhoton, joinRoom, webRpc; |
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
local jsonRequest = json.parse(request.body) | |
local _name = jsonRequest.name | |
local _age = jsonRequest.age | |
if _name ~= nil and _age ~= nil then | |
return { | |
ResultCode = 0, | |
Data = { | |
name = _name, | |
age = _age |
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; | |
using UniRx; | |
using UniRx.Triggers; | |
public class PhotonManager : MonoBehaviour | |
{ | |
void Start() | |
{ | |
PhotonNetwork.ConnectUsingSettings("0"); |
NewerOlder