Skip to content

Instantly share code, notes, and snippets.

@nshiba
nshiba / New_Query.sql
Created February 8, 2024 08:05
New Query
with disable_firebase_users as (
select
*
from
cookpad_tv.users ctu
join cookpad_tv.financier_subscriptions ctfs on ctu.id = ctfs.user_id
left outer join cookpad.secure_users csu on ctu.cookpad_user_id = csu.user_id
left outer join cookpad.secure_user_phone_numbers csupn on ctu.cookpad_user_id = csupn.user_id
where
ctu.cookpad_user_id is not null
@nshiba
nshiba / New_Query.sql
Created January 25, 2024 09:55
New Query
with disable_firebase_users as (
select
*
from
cookpad_tv.users ctu
join cookpad_tv.financier_subscriptions ctfs on ctu.id = ctfs.user_id
left outer join cookpad.secure_users csu on ctu.cookpad_user_id = csu.user_id
left outer join cookpad.secure_user_phone_numbers csupn on ctu.cookpad_user_id = csupn.user_id
where
ctu.cookpad_user_id is not null
public class Game {
private GameCoreListener listener = null;
...
Game(Subcode subcode, GameCoreListener listener) {
select = 0;
this.subcode = subcode;
this.stage = "outofrange";
@nshiba
nshiba / ChannelEchoClient2.java
Created December 5, 2017 06:47
2017 ネトプロ 応用課題 参考実装
package netprog12.networking.httpd;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.channels.SocketChannel;
public class ChannelEchoClient2 {
public static final int ECHO_PORT = 10007;
public class Main {
public static void main(String[] args) {
Predator predator = new Predator(1, "name", 3, 2, new int[] {1, 3, 10}, new int[] {2, 6, 20}, "test");
predation(1, predator);
}
private void predation(int victimLevel, Predator predator) {
int dice = new Random().nextInt(6) + 1;
int eatResult = predator.eatPower[predator.level - 1] * dice * (predator.level - victimLevel);
❯ latex extended-abstract.tex [12:13:43]
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
(./extended-abstract.tex
LaTeX2e <2016/03/31>
Babel <3.9r> and hyphenation patterns for 22 language(s) loaded.
(./sigchi-ext.cls
Document Class: sigchi-ext 2015/1/05, David A. Shamma
CHI Extended Abstracts template
❯ latex extended-abstract.tex [12:13:43]
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=latex)
restricted \write18 enabled.
entering extended mode
(./extended-abstract.tex
LaTeX2e <2016/03/31>
Babel <3.9r> and hyphenation patterns for 22 language(s) loaded.
(./sigchi-ext.cls
Document Class: sigchi-ext 2015/1/05, David A. Shamma
CHI Extended Abstracts template
public class MainActivity extends AppCompatActivity implements MainView {
private static final String TAG = MainActivity.class.getSimpleName();
private static final double EBISU_LATITUDE = 35.647156;
private static final double EBISU_LONGITUDE = 139.709739;
ActivityMainBinding binding;
'use strict';
const THREE = require('three');
const OrbitControls = require('three-orbit-controls')(THREE);
const width = window.innerWidth;
const height = window.innerHeight;
const scene = new THREE.Scene();
const sphereGeo = new THREE.SphereGeometry(10, 120, 80);
const video = document.createElement('video');
@nshiba
nshiba / ffmpeg2program.cpp
Created January 29, 2016 06:41
プログラムとffmpeg間の通信サンプル
// プログラムとFfmpeg間の通信はnamed pipeを使用して行っています.
//named pipe へ書き込み準備
// Create a pipe to send data
HANDLE pipe = CreateNamedPipe(
"\\\\.\\pipe\\my_pipe", // パイプ名.この名前にアクセスすればデータが受け取れる
PIPE_ACCESS_OUTBOUND, // 1-way pipe -- send only
PIPE_TYPE_BYTE, // send data as a byte stream
1, // only allow 1 instance of this pipe
0, // no outbound buffer