使われてない変数はgccの最適化で消えるのか?
- void.c
int main(void) {
return 0;
#include <stdio.h> | |
#include <memory.h> | |
#include <string.h> | |
char** split(char* originalString, int stringNum) | |
{ | |
int i; | |
char** stringArray; | |
char* tp; |
window.onload = function () { | |
// 初期設定 | |
var canvas = document.createElement("canvas"); | |
canvas.width = 500; | |
canvas.height = 250; | |
document.body.appendChild(canvas); | |
var stage = new createjs.Stage(canvas); | |
// プレイヤー | |
var box = new createjs.Shape(); |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
struct schedule{ | |
int year; | |
int month; | |
int day; | |
int hour; | |
int minute; |
trait Packet | |
class ItemPacket extends Packet | |
class QuestPacket extends Packet | |
object PacketHandler { | |
trait PacketHandler[T <: Packet] { | |
def handle(packet: T) | |
} | |
implicit object ItemPacketHandler extends PacketHandler[ItemPacket] { |
#include <iostream> | |
#include <functional> | |
typedef std::function<void()> ThreadFunc; | |
int main(){ | |
ThreadFunc a = []{}; | |
a(); | |
return 0; | |
} |
import asyncio | |
def on_accept(r, w): | |
print("new client accepted.") | |
print(r, w) | |
if __name__ == "__main__": | |
future = asyncio.start_server(on_accept, host="127.0.0.1", port=5555) | |
asyncio.async(future) |
# -*- coding: utf-8 -*- | |
import asyncio | |
# coroutineデコレータをつけるだけでコルーチンになる | |
@asyncio.coroutine | |
def cor(): | |
asyncio.sleep(1) | |
return "cor_result" |
int[] array = new int[] | |
{ | |
1, | |
7, | |
16, | |
11, | |
14, | |
19, | |
20, | |
18 |