Skip to content

Instantly share code, notes, and snippets.

View yakimelon's full-sized avatar

Yakimelon yakimelon

View GitHub Profile
package main
import (
"github.com/aws/aws-lambda-go/lambda"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/dynamodb"
"os"
"fmt"
)
import Foundation
import Hydra
// RailsのREST APIにアクセスするメソッドをまとめた物
// 必要無いメソッドはEmptyPromiseFactoryの値を返すようにする
protocol RESTGateway {
// リソースの複数形の型
associatedtype ResourcesType
// リソースの単数形の型
print(sum([x for x in range(0, 1000) if x % 3 == 0 or x % 5 == 0]))
import java.io.*;
import java.net.*;
import java.nio.ByteBuffer;
public class AnimUDPServerColor0{
public static void main(String args[]){
// 受信パケットの雛形を作成
byte req[] = new byte[32];
DatagramPacket receivePacket = new DatagramPacket(req,req.length);
import java.io.*;
import java.net.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*; //イメージ利用のための決まり文句
class AnimUDPClientColor1{ //mainメソッドのみを持つクラス
public static void main(String[] args){
AppFrame3 f = new AppFrame3(args[0],args[1], args[2]); //ウィンドウの作成
f.setSize(640,480); //ウィンドウの大きさ
import java.io.*;
import java.net.*;
public class AnimUDPServerColor0{
public static void main(String args[]){
// 受信パケットの雛形を作成
byte req[] = new byte[32];
DatagramPacket receivePacket = new DatagramPacket(req,req.length);
try{
import java.io.*;
import java.net.*;
public class AnimUDPServerColor0{
public static void main(String args[]){
// 受信パケットの雛形を作成
byte req[] = new byte[32];
DatagramPacket receivePacket = new DatagramPacket(req,req.length);
try{
fibo m x y =
[x+y] ++ if x + y < m
then fibo m y (x+y)
else []
fibo m xs =
xs : case xs of
(x:y:_) | x + y < m -> fibo m [x+y]
_ -> []
#include <stdio.h>
#include <string.h>
int main(void)
{
char baseChar = '7'; // 基準の文字
char str[]="A0B1C2D3E4F5G6H7I8J9K";
int i;
for(i=0 ; i<(int)strlen(str) ; i++) {