Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#define NUM 100
void read(FILE *fp);
int main( int argc, char *argv[NUM] )
{
FILE *fp;
int i;
char filename[NUM];
#include <stdio.h>
#include <stdlib.h>
#define NUM 100
void write(FILE *fp);
int main(void)
{
FILE *fp;
#include <stdio.h>
#define NUM 100
void read(FILE *fp);
int main(void)
{
FILE *fp;
fp = fopen("C:\\Users\\啓汰\\Downloads\\BC PAD\\課題12DataFile\\kadai12h.txt","r");
module.exports = (robot) ->
robot.hear /煽り (.*)/i, (msg) ->
num = (Math.floor(Math.random() * 100 ) % 3) + 1
if num == 1
msg.send "#{msg.match[1]}、そろそろ気付きな?髪の薄さに"
else if num == 2
msg.send "#{msg.match[1]}、脳みそがスッキリしてそうでい>いですね"
else
msg.send "#{msg.match[1]}、のけ"
[keita@ip-172-31-28-2 workspace]$ rails _4.2.2_ new hello_app
/usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- io/console (LoadError)
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/keita/.gem/ruby/2.0/gems/thor-0.19.1/lib/thor/shell/basic.rb:2:in `<top (required)>'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/keita/.gem/ruby/2.0/gems/thor-0.19.1/lib/thor/shell/color.rb:1:in `<top (required)>'
from /home/keita/.gem/ruby/2.0/gems/thor-0.19.1/lib/thor/shell.rb:17:in `shell'
from /home/keita/.gem/ruby/2.0/gems/thor-0.19.1/lib/thor/base.rb:439:in `start'
from /home/keita/.gem/ruby/2.0/gems/railties-4.2.2/lib/rails/commands/application.rb:17:in `<top (required)>'
[keita@ip-172-31-28-2 hello_app]$ bundle install
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies....
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.2
Using thread_safe 0.3.5
module.exports = (robot) ->
robot.hear /突然の(.*)/i,(res) ->
str = res.match[1]
res.send "#{str}"
len = str.length
res.send len
if len > 0
ans = ('人' for i in [0..len])
ans = ans.replace(/,/g, "")
res.send "#{ans}"
[keita@ip-172-31-28-2 hello_app]$ echo "# hello_app" >> README.md
[keita@ip-172-31-28-2 hello_app]$ git init
Reinitialized existing Git repository in /home/keita/workspace/hello_app/.git/
[keita@ip-172-31-28-2 hello_app]$ git add README.md
[keita@ip-172-31-28-2 hello_app]$ git commit -m "first commit"
[master 5f21d58] first commit
1 file changed, 1 insertion(+)
[keita@ip-172-31-28-2 hello_app]$ git remote add origin git@github.com:keita03301995/hello_app.git
fatal: remote origin already exists.
[keita@ip-172-31-28-2 hello_app]$ git push -u origin master
[keita@ip-172-31-28-2 toy_app]$ rails console
Loading development environment (Rails 4.2.2)
irb(main):001:0> micropost.user
NameError: undefined local variable or method `micropost' for main:Object
from (irb):1
from /home/keita/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/console.rb:110:in `start'
from /home/keita/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/console.rb:9:in `start'
from /home/keita/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:68:in `console'
from /home/keita/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /home/keita/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-4.2.2/lib/rails/commands.rb:17:in `<top (required)>'
[keita@ip-172-31-28-2 toy_app]$ git add -A
[keita@ip-172-31-28-2 toy_app]$ git commit -m "修正"
[master 18f8fa6] 修正
[keita@ip-172-31-28-2 toy_app]$ git remote add origin https://github.com/keita03301995/toy_app.git
fatal: remote origin already exists.
[keita@ip-172-31-28-2 toy_app]$ git push -u origin master
Username for 'https://github.com': keita03301995
Password for 'https://keita03301995@github.com':
Counting objects: 145, done.
Compressing objects: 100% (129/129), done.