[ create a new paste ] login | about

nvsofts

Name: NV
Email:
Site/Blog: http://iddy.jp/profile/nvsofts/
Location: Japan
Default language: Ruby
Favorite languages: Ruby, C++, C
About:

Saved pastes by nvsofts:

Plain Text, pasted on May 24:
1
2
3
4
5
$ ./huffman < input.dat > input_shannon.dat && ./shannon < input_shannon.dat
@ : 0.1859
E : 0.1031
T : 0.0796
A : 0.0642
...
view (200 lines)
Plain Text, pasted on Apr 16:
1
2
$ echo -en 'RIFF\xde\xf3\x55\x0aWAVEfmt \x10\x00\x00\x00\x01\x00\x02\x00\x44\xAC\x00\x00\x10\xB1\x02\x00\x04\x00\x10\x00data\xb8\xf3\x55\x0a' > wave.hed
$ cat wave.hed thbgm_tr.dat > thbgm_tr.wav
view (2 lines)
C++, pasted on Mar 3:
1
2
3
4
5
#include <iostream>

int main(void)
{
  int hoge;
...
view (11 lines, 3 lines of output)
C, pasted on Feb 15:
1
2
3
4
5
#include <stdio.h>

/* http://www.entis.jp/doc/lolita_programing/lolita1.html */

typedef int moe;
...
view (26 lines, 10 lines of output)
C, pasted on Feb 13:
1
2
3
4
5
#include <stdio.h>

#define HOGE

int main(void)
...
view (12 lines, 1 line of output)
Ruby, pasted on Jan 19:
1
2
3
4
5
Termtter::Client.register_command(
  :name => :unfav,
  :exec => lambda {|arg|
    Termtter::API.twitter.remove_favorite(arg)
    puts "Unavorited status #" + arg
...
view (7 lines)
Plain Text, pasted on Jan 8:
1
2
3
4
5
01-08 12:25:44.610: ERROR/linker(1320): bionic/linker/linker.c:672| WARNING: `/system/lib/hw/gralloc.qsd8k.so` is not a prelinked library
01-08 12:25:44.610: ERROR/linker(1320):  1223 mapping library 'gralloc.qsd8k.so' at 40500000 (index 00000005) through buddy allocator.
01-08 12:25:44.610: ERROR/qsd8k.gralloc(1320): RGB565
01-08 12:25:44.630: ERROR/linker(1320): bionic/linker/linker.c:672| WARNING: `/system/lib/egl/libEGL_adreno200.so` is not a prelinked library
01-08 12:25:44.630: ERROR/linker(1320):  1223 mapping library 'libEGL_adreno200.so' at 40600000 (index 00000006) through buddy allocator.
...
view (31 lines)
Plain Text, pasted on Jan 4:
1
2
3
4
5
[nvsofts@cirno ~]$ cd fuse
[nvsofts@cirno ~/fuse]$ ll
合計 0
-r--r--r-- 1 nvsofts nvsofts 27 2011-01-04 19:34 495.jpg
[nvsofts@cirno ~/fuse]$ cat 495.jpg
...
view (7 lines)
Plain Text, pasted on Jan 4:
1
2
3
4
5
--- fusefs_lib.c.org    2011-01-04 19:08:27.000000000 +0900
+++ fusefs_lib.c        2011-01-04 19:07:53.000000000 +0900
@@ -452,7 +452,7 @@
     if (TYPE(cur_entry) != T_STRING)
       continue;
...
view (57 lines)
Plain Text, pasted on Dec 28:
1
2
3
4
5
[nvsofts@sukima ~]$ adb shell
$ cd /data
$ chmod +x install.sh
$ ./install.sh
Android(Froyo) for IS01 build-v4 installer
...
view (441 lines)
Plain Text, pasted on Dec 27:
1
2
3
4
5
Android(Froyo) for IS01 build-v4 installer

Creating directory ...
Copying system/ ...
Installing ...
...
view (402 lines)
Plain Text, pasted on Dec 16:
1
2
3
4
5
$ ./asroot2 /system/bin/id
./asroot2 /system/bin/id
 [+] Using newer pipe_inode_info layout
Opening: /proc/31431/fd/3
SUCCESS: Enjoy the shell.
...
view (6 lines)
Plain Text, pasted on Dec 11:
1
2
3
4
5
C:\Users\NV\Desktop>adb devices
List of devices attached
SSHEX------     recovery


...
view (34 lines)
Plain Text, pasted on Dec 10:
1
2
3
4
5
C:\Users\NV\Desktop>adb devices
List of devices attached
SSHEX------     recovery


...
view (18 lines)
Plain Text, pasted on Dec 10:
1
2
3
4
> adb push recovery.bin /data
> adb shell
$ /sqlite_journals/is01root/_su
# flash_image recovery_wr /data/recovery.bin
view (4 lines)
C, pasted on Dec 9:
1
2
3
4
5
#include <stdio.h>
#include <stdlib.h>
#include "object.h"

int main(void)
...
view (18 lines)
Plain Text, pasted on Dec 4:
1
2
3
4
5
C:\Users\NV>adb shell
$ uname -a
uname -a
Linux localhost 2.6.29-hack #2 PREEMPT Sat Dec 4 14:31:09 JST 2010 armv7l GNU/Linux
$ exit
...
view (54 lines)
Plain Text, pasted on Dec 3:
1
2
3
4
5
C:\Users\NV\Desktop>adb shell
# getprop ro.secure
getprop ro.secure
0
# dmesg | grep modules
...
view (14 lines)
Plain Text, pasted on Dec 2:
1
2
3
4
5
C:\Users\NV>adb shell
$ /sqlite_journals/bin/marisa
/sqlite_journals/bin/marisa
su: access granted, courtesy of www.magicandroidapps.com
# dmesg | grep modules
...
view (35 lines)
Plain Text, pasted on Nov 16:
1
2
3
4
5
[nvsofts@cirno ~/J4/trunk/calc_vm]$ cat test2.calc
-1 + 2 * (4 / 2 + (5 - 6)) / 2 - 3;
[nvsofts@cirno ~/J4/trunk/calc_vm]$ ./calc_c < test2.calc | tee /dev/stderr | ex/test_vm /dev/stdin
pushi   1
pushi   -1
...
view (27 lines)
C, pasted on Oct 28:
1
2
3
4
5
#include <stdio.h>

int a(void)
{
  printf("a\n");
...
view (21 lines, 2 lines of output)
Ruby, pasted on Oct 25:
1
2
3
4
5
stream = MariBot::Server::TwitterStream.new(token)
stream.open
loop do
  data = stream.recv
  p data unless data.empty?
...
view (7 lines)
Ruby, pasted on Aug 11:
1
2
3
4
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-

input = STDIN.readlines.join.chomp.tr('^まりさ', '')
...
view (58 lines)
Ruby, pasted on Aug 8:
1
(1..500).to_a.select{|v| v >= 495}.each{|v| p v}
view (1 line, 6 lines of output)
Ruby, pasted on Aug 8:
1
2
[1, 2, 3].each{|v| p v} if false
[4, 5, 6].each{|v| p v} if true
view (2 lines, 3 lines of output)
Ruby, pasted on Jul 4:
1
2
3
4
5
module Hoge
  @@foo = [1, 2]

  class Piyo
    include Hoge
...
view (30 lines, 3 lines of output)
C++, pasted on Jun 28:
1
2
3
4
5
#include <iostream>
#include <string>
#include <boost/spirit.hpp>

void SHOW(const char str)
...
view (24 lines)
Plain Text, pasted on Jun 24:
1
2
3
$ ./marisa.rb
ままままままままままままままままりさまさままままままままままままままままままさまりりさりまさままままままままままりまさまままままままままままままりさまさりりりりさまりりさりまさりまさまままままままままままりさまさままままままさまりりさりまさままままりまさまままままままりさまさりりりりりりさまりりさりまさりまさまままままままままままりさまさままままさまりりさりまさりまさまままままままままままままままままままりさまさりりりりさまりりさりまさりま
MARISA
view (3 lines)
Plain Text, pasted on Jun 24:
1
2
3
4
$ ./bf2marisa.rb | ./marisa.rb
+++++++++[>++++++++>+++++++++++>+++++<<<-]>.>++.+++++++..+++.>-.
------------.<++++++++.--------.+++.------.--------.>+.
Hello, world!
view (4 lines)
Ruby, pasted on Jun 24:
1
2
3
4
5
#!/usr/bin/env ruby

table = {'>' => 'まさ', '<' => 'さま', '+' => 'まま', '-' => 'りり', ',' => 'まり', '.' => 'りま', '[' => 'りさ', ']' => 'さり'}

while STDIN.gets
...
view (12 lines)
Ruby, pasted on Jun 24:
1
2
3
4
#!/usr/bin/env ruby

$KCODE = 'UTF-8'
require 'jcode'
...
view (63 lines)
Plain Text, pasted on May 7:
1
2
3
4
5
// ==UserScript==
// @name	Google Right Navigator
// @description	Googleのナビゲーションパネルを右側に移動させます。
// @include	http://www.google.co.jp/search?*

...
view (23 lines)
Plain Text, pasted on Jul 11:
1
2
3
4
5
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   016    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0005   132   132   054    Pre-fail  Offline      -       141
...
view (20 lines)
C++, pasted on Jun 27:
1
2
3
4
5
#include <iostream>
using namespace std;

int main(void)
{
...
view (8 lines, 1 line of output)