import math
def combinations_count(n, r):
return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
This file contains hidden or 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 <iostream> | |
#include <stdlib.h> | |
#include <GL/glew.h> | |
#include <GLFW/glfw3.h> | |
#define WIDTH 512 | |
#define HEIGHT 512 | |
extern "C" void kernelBindPbo(GLuint pixelBufferObj); |
This file contains hidden or 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; | |
class WingElem { | |
public WingElem(Vector3 pos, float dih, float coef, LineRenderer dlr, LineRenderer llr) { | |
Pos = pos; | |
var rad = Mathf.Deg2Rad * dih; | |
BeamVec = new Vector3(Mathf.Cos(rad), Mathf.Sin(rad), 0); | |
Normal = new Vector3(-Mathf.Sin(rad), Mathf.Cos(rad), 0); | |
Coef = coef; |
This file contains hidden or 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
unmap J | |
unmap H | |
unmap K | |
unmap L | |
map J goBack | |
map H previousTab | |
map K goForward | |
map L nextTab |
This file contains hidden or 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
#メッシュの作製 | |
mesh = bpy.data.meshes.new("new_mesh") | |
#点を描画する場合 | |
mesh.from_pydata([(0,0,0),(1,0,0),(1,1,0)], [], []) | |
mesh.update() | |
#加えて線を描画する場合(何番目の点と何番目の点を結ぶかのリストを渡す) | |
mesh.from_pydata([(0,0,0),(1,0,0),(1,1,0)], [(0,1),(1,2),(2,0)], []) | |
mesh.update() | |
#加えて面を描画する場合) | |
mesh.from_pydata([(0,0,0),(1,0,0),(1,1,0)], [], [(0,1,2)]) |
This file contains hidden or 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
SELECT | |
nsp.nspname AS schema, | |
cls.relname AS table_name, | |
own.rolname AS owner, | |
dsc.description | |
FROM | |
pg_catalog.pg_class cls | |
LEFT JOIN pg_catalog.pg_namespace nsp ON cls.relnamespace = nsp.oid | |
LEFT JOIN pg_catalog.pg_authid own ON cls.relowner = own.oid | |
LEFT JOIN pg_catalog.pg_description dsc ON cls.oid = dsc.objoid |