Skip to content

Instantly share code, notes, and snippets.

/*
* Copyright 2015 Kazunori Jo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
struct entry {
char name[32];
char sex;
int age;
struct entry *next;
@itochan
itochan / Ex2_4_1.java
Last active October 31, 2015 09:48
OOP2015 Assignment No.2
/*
* Ex2_4_1
*
* Copyright (c) 2015 Kazunori Jo
*
* This software is released under the MIT License.
* http://opensource.org/licenses/mit-license.php
*/
import java.awt.BorderLayout;
/lost+found/#10001: C source, ASCII text
/lost+found/#10002: C source, ASCII text
/lost+found/#10003: C source, ASCII text
/lost+found/#10004: C source, ASCII text
/lost+found/#10005: directory
/lost+found/#10010: C source, ASCII text
/lost+found/#10011: C source, ASCII text
/lost+found/#10012: C source, ASCII text
/lost+found/#10013: ASCII text
/lost+found/#10014: ASCII text
function fizzBuzz() {
for (var i = 1; i <= 30; i++) {
if (i % 15 == 0) {
alert('Fizz Buzz');
} else if (i % 3 == 0) {
alert ('Fizz');
} else if (i % 5 == 0) {
alert('Buzz');
} else {
alert(i);
function nabeatsu() {
for (var i = 1; i <= 99; i++) {
if (i % 3 == 0 || i % 10 == 3 || (i > 10 && i % 30 < 10)) {
alert('アホ');
} else {
alert(i);
}
}
}
@itochan
itochan / ex4.js
Last active August 29, 2015 14:19
var john = {
firstName: "John",
lastName: "Smith",
};
var joanna = {
firstName: "Joanna",
lastName: "Doe",
};
jq -s '{ response: [( (.[0].response | sort_by(.name)) as $a | (.[1].response | sort_by(.name)) as $b | ($a | length) as $length | $a[] as $item | $item + $b[range(0;$length)] )] }' a.json b.json

a.json

{
  "response": [
    {
      "station_ja": "新宿",
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.