hyper_card 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +132 -0
- data/LICENSE.txt +21 -0
- data/README.org +75 -0
- data/Rakefile +36 -0
- data/docs/c_basic/2_5_2.c +17 -0
- data/docs/c_basic/README.html +175 -0
- data/docs/c_basic/README.org +67 -0
- data/docs/hyper_card/README.html +104 -0
- data/docs/hyper_card/README.org +35 -0
- data/docs/hyper_card/Rakefile +8 -0
- data/docs/hyper_card/hc_index.rb +54 -0
- data/docs/hyper_card/images/HyperCard_24f-01.jpg +0 -0
- data/docs/hyper_card/images/HyperCard_24f-02.jpg +0 -0
- data/docs/hyper_card/images/HyperCard_24f-03.jpg +0 -0
- data/docs/hyper_card/images/HyperCard_24f-04.jpg +0 -0
- data/docs/hyper_card/images/HyperCard_24f-05.jpg +0 -0
- data/docs/hyper_card/images/HyperCard_24f-06.jpg +0 -0
- data/docs/hyper_card/images/HyperCard_24f-07.jpg +0 -0
- data/docs/hyper_card/images/HyperCard_24f-08.jpg +0 -0
- data/docs/hyper_card/images/HyperCard_24f-09.jpg +0 -0
- data/docs/hyper_card/images/HyperCard_24f-10.jpg +0 -0
- data/docs/hyper_card/images/HyperCard_24f-11.jpg +0 -0
- data/docs/hyper_card/images/HyperCard_24f-12.jpg +0 -0
- data/docs/hyper_card/images/HyperCard_24f-13.jpg +0 -0
- data/docs/hyper_card/multiple_rake.html +40 -0
- data/docs/hyper_card/multiple_rake.org +17 -0
- data/docs/hyper_card/rakelib/al_twist.rake +58 -0
- data/docs/hyper_card/rakelib/comp_a.rake +55 -0
- data/docs/hyper_card/schizophrenia_vs_paranoia/Kato10_book_review_eto.html +105 -0
- data/docs/hyper_card/schizophrenia_vs_paranoia/Kato10_book_review_eto.org +49 -0
- data/docs/hyper_card/schizophrenia_vs_paranoia/TetsugakuRenshu20_296.html +131 -0
- data/docs/hyper_card/schizophrenia_vs_paranoia/TetsugakuRenshu20_296.org +55 -0
- data/docs/ruby_basic/README.html +115 -0
- data/docs/ruby_basic/README.org +30 -0
- data/docs/ruby_basic/Rakefile +56 -0
- data/docs/ruby_basic/Rakefile_on_site +69 -0
- data/docs/ruby_basic/basic_6/README.org +12 -0
- data/docs/ruby_basic/basic_6/readlines.rb +5 -0
- data/docs/ruby_basic/fsm/README.html +189 -0
- data/docs/ruby_basic/fsm/README.org +27 -0
- data/docs/ruby_basic/fsm/README_sample.org +25 -0
- data/docs/ruby_basic/fsm/README_sample_org.html +57 -0
- data/docs/ruby_basic/fsm/README_sample_org.org +13 -0
- data/docs/ruby_basic/fsm/complex/README.html +133 -0
- data/docs/ruby_basic/fsm/complex/README.org +50 -0
- data/docs/ruby_basic/fsm/complex/check_auto_calc_state_action.rb +35 -0
- data/docs/ruby_basic/fsm/complex/check_auto_calc_state_action_rb.html +67 -0
- data/docs/ruby_basic/fsm/complex/check_auto_calc_state_action_rb.org +13 -0
- data/docs/ruby_basic/fsm/complex/fsm_results.txt +16 -0
- data/docs/ruby_basic/fsm/complex/fsm_results_txt.html +52 -0
- data/docs/ruby_basic/fsm/complex/fsm_results_txt.org +14 -0
- data/docs/ruby_basic/fsm/complex/vasptest.o22698 +4289 -0
- data/docs/ruby_basic/fsm/complex/vasptest_short.o01234 +26 -0
- data/docs/ruby_basic/fsm/complex/vasptest_short_o01234.html +62 -0
- data/docs/ruby_basic/fsm/complex/vasptest_short_o01234.org +14 -0
- data/docs/ruby_basic/fsm/fsm_no_hash.html +108 -0
- data/docs/ruby_basic/fsm/fsm_no_hash.org +20 -0
- data/docs/ruby_basic/fsm/fsm_no_hash.rb +8 -0
- data/docs/ruby_basic/fsm/fsm_no_hash_results.txt +4 -0
- data/docs/ruby_basic/fsm/fsm_simplest.rb +12 -0
- data/docs/ruby_basic/fsm/fsm_state_action.html +50 -0
- data/docs/ruby_basic/fsm/fsm_state_action.org +16 -0
- data/docs/ruby_basic/fsm/fsm_state_action.rb +34 -0
- data/docs/ruby_basic/fsm/fsm_state_action.results +14 -0
- data/docs/ruby_basic/fsm/fsm_state_action_rb.html +64 -0
- data/docs/ruby_basic/fsm/fsm_state_action_rb.org +13 -0
- data/docs/ruby_basic/fsm/fsm_state_action_results.html +46 -0
- data/docs/ruby_basic/fsm/fsm_state_action_results.org +13 -0
- data/docs/ruby_basic/fsm/fsm_state_key.rb +22 -0
- data/docs/ruby_basic/fsm/full_fsm +1 -0
- data/docs/ruby_basic/images/seminar_24s-05.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-06.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-07.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-08.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-09.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-10.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-11.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-12.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-13.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-14.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-15.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-18.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-19.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-2.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-20.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-21.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-22.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-24.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-25.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-27.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-28.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-31.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-34.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-35.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-37.jpg +0 -0
- data/docs/ruby_basic/images/seminar_24s-38.jpg +0 -0
- data/docs/ruby_basic/simple_tdd/README.html +74 -0
- data/docs/ruby_basic/simple_tdd/README.org +19 -0
- data/exe/hyper_card +3 -0
- data/lib/hyper_card/version.rb +5 -0
- data/lib/hyper_card.rb +9 -0
- data/sig/hyper_card.rbs +4 -0
- metadata +150 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a70f951d4a72c16cd59b89a5ed3dab4c7822f45fe6e8a79ffa9f4ffdb70a8745
|
4
|
+
data.tar.gz: 26b092adf34f8e643daa2de7717158666ad489981e41bf3abbca188d1808dfaf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 95f753c82241b47257d02095dd7e5e60070c671f5ef458f9b4077ad296676cec85ac42496394446f7c7bd31a95b85681ac3191df0db4bc34d3aa30d2edbba6f9
|
7
|
+
data.tar.gz: f3ed3b64494c74b86e7db84997026941d2ad662005f498c3eb581695f9e7909fa7e809b942cc2d7836f5c9ca27f43af8ad02803fdee535d652a873aba19734f2
|
data/CHANGELOG.md
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
10
|
+
identity and orientation.
|
11
|
+
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
13
|
+
diverse, inclusive, and healthy community.
|
14
|
+
|
15
|
+
## Our Standards
|
16
|
+
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
18
|
+
community include:
|
19
|
+
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
24
|
+
and learning from the experience
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
26
|
+
community
|
27
|
+
|
28
|
+
Examples of unacceptable behavior include:
|
29
|
+
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
31
|
+
any kind
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
33
|
+
* Public or private harassment
|
34
|
+
* Publishing others' private information, such as a physical or email address,
|
35
|
+
without their explicit permission
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
37
|
+
professional setting
|
38
|
+
|
39
|
+
## Enforcement Responsibilities
|
40
|
+
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
44
|
+
or harmful.
|
45
|
+
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
49
|
+
decisions when appropriate.
|
50
|
+
|
51
|
+
## Scope
|
52
|
+
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
54
|
+
an individual is officially representing the community in public spaces.
|
55
|
+
Examples of representing our community include using an official email address,
|
56
|
+
posting via an official social media account, or acting as an appointed
|
57
|
+
representative at an online or offline event.
|
58
|
+
|
59
|
+
## Enforcement
|
60
|
+
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
62
|
+
reported to the community leaders responsible for enforcement at
|
63
|
+
[INSERT CONTACT METHOD].
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
65
|
+
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
67
|
+
reporter of any incident.
|
68
|
+
|
69
|
+
## Enforcement Guidelines
|
70
|
+
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
73
|
+
|
74
|
+
### 1. Correction
|
75
|
+
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
77
|
+
unprofessional or unwelcome in the community.
|
78
|
+
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
82
|
+
|
83
|
+
### 2. Warning
|
84
|
+
|
85
|
+
**Community Impact**: A violation through a single incident or series of
|
86
|
+
actions.
|
87
|
+
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
92
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
93
|
+
ban.
|
94
|
+
|
95
|
+
### 3. Temporary Ban
|
96
|
+
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
98
|
+
sustained inappropriate behavior.
|
99
|
+
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
101
|
+
communication with the community for a specified period of time. No public or
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
104
|
+
Violating these terms may lead to a permanent ban.
|
105
|
+
|
106
|
+
### 4. Permanent Ban
|
107
|
+
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
111
|
+
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
113
|
+
community.
|
114
|
+
|
115
|
+
## Attribution
|
116
|
+
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
118
|
+
version 2.1, available at
|
119
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
120
|
+
|
121
|
+
Community Impact Guidelines were inspired by
|
122
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
123
|
+
|
124
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
125
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
126
|
+
[https://www.contributor-covenant.org/translations][translations].
|
127
|
+
|
128
|
+
[homepage]: https://www.contributor-covenant.org
|
129
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
130
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
131
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
132
|
+
[translations]: https://www.contributor-covenant.org/translations
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2024 Shigeto R. Nishiani
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.org
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
#+OPTIONS: ^:{}
|
2
|
+
#+STARTUP: indent nolineimages overview num
|
3
|
+
#+TITLE: Hyper Card system for Ruby
|
4
|
+
#+AUTHOR: Shigeto R. Nishitani
|
5
|
+
#+EMAIL: (concat "shigeto_nishitani@mac.com")
|
6
|
+
#+LANGUAGE: jp
|
7
|
+
#+OPTIONS: H:4 toc:t num:2
|
8
|
+
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
|
9
|
+
|
10
|
+
|
11
|
+
* HyperCard
|
12
|
+
|
13
|
+
Hyper Card system for Ruby learners and users
|
14
|
+
|
15
|
+
HyperCard is originally released in the late 80's
|
16
|
+
by Apple with the Macintosh SE, made by Bill Atkinson.
|
17
|
+
After that, although the concept of HyperCard has been used
|
18
|
+
in MacOS, Finder, Keynote and so on,
|
19
|
+
the simple application of HyperCard has gone.
|
20
|
+
This HyperCard system try to rebuild the hyper card world again.
|
21
|
+
|
22
|
+
Rubyを習得する人あるいは使う人のためのHyper Cardシステムです.
|
23
|
+
Hyper CardはAppleのMacのためにBill Atkinsonが開発した付録でした.
|
24
|
+
その後,HyperCardの思想は,MacOS(Finder), あるいはKeynoteに
|
25
|
+
受け継がれたのですが,HyperCard自身はどっかへ消えていきました.
|
26
|
+
何かプログラミング言語を習得するには,
|
27
|
+
写経しろとか,数学の問題を解くようにとか言われますが,
|
28
|
+
現代の初心者にはなんのこっちゃだと思います.
|
29
|
+
あるいはコピペと写経の違いが何かや,
|
30
|
+
チャンキングとカプセル化や,隠蔽とトグル表示が何かも,
|
31
|
+
クラス化(オブジェクト指向)を
|
32
|
+
実感できてない人には,ピンと来てないんでしょう.
|
33
|
+
そんな人でも,
|
34
|
+
Rubyを「忘れず」(記憶することではなく),
|
35
|
+
codingできるようなシステムを目指します.
|
36
|
+
|
37
|
+
梅棹忠夫の「知的生産の技術」で紹介されている
|
38
|
+
京大カードシステムの中に,そのヒントがあるように思います.
|
39
|
+
|
40
|
+
同じところと違うところ?
|
41
|
+
|
42
|
+
* Installation
|
43
|
+
|
44
|
+
TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
|
45
|
+
|
46
|
+
Install the gem and add to the application's Gemfile by executing:
|
47
|
+
|
48
|
+
$ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
|
49
|
+
|
50
|
+
If bundler is not being used to manage dependencies, install the gem by executing:
|
51
|
+
|
52
|
+
$ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
|
53
|
+
|
54
|
+
* Usage
|
55
|
+
|
56
|
+
TODO: Write usage instructions here
|
57
|
+
|
58
|
+
* Development
|
59
|
+
|
60
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test-unit` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
61
|
+
|
62
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
63
|
+
|
64
|
+
* Contributing
|
65
|
+
|
66
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hyper_card. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/hyper_card/blob/main/CODE_OF_CONDUCT.md).
|
67
|
+
|
68
|
+
* License
|
69
|
+
|
70
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
71
|
+
|
72
|
+
## Code of Conduct
|
73
|
+
|
74
|
+
Everyone interacting in the HyperCard project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/hyper_card/blob/main/CODE_OF_CONDUCT.md).
|
75
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "bundler/gem_tasks"
|
4
|
+
require "rake/testtask"
|
5
|
+
|
6
|
+
Rake::TestTask.new(:test) do |t|
|
7
|
+
t.libs << "test"
|
8
|
+
t.libs << "lib"
|
9
|
+
t.test_files = FileList["test/**/*_test.rb"]
|
10
|
+
end
|
11
|
+
|
12
|
+
task :default do
|
13
|
+
system "rake -T"
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
# -*- coding: utf-8 -*-
|
18
|
+
require "colorize"
|
19
|
+
require 'command_line/global'
|
20
|
+
|
21
|
+
desc 'git automatic pull and push'
|
22
|
+
task :git_auto do
|
23
|
+
print "Input comments: "
|
24
|
+
comment = STDIN.gets.chomp
|
25
|
+
comment = comment == "" ? "auto pull and push" : comment.gsub("\'", "\\'")
|
26
|
+
["git add -A",
|
27
|
+
"git commit -m '#{comment}'",
|
28
|
+
"git pull origin main",
|
29
|
+
"git push origin main"].each do |comm|
|
30
|
+
puts comm.cyan
|
31
|
+
res = command_line comm
|
32
|
+
puts res.stderr.red
|
33
|
+
puts res.stdout.green
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
@@ -0,0 +1,175 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="jp" xml:lang="jp">
|
5
|
+
<head>
|
6
|
+
<!-- 2024-07-24 Wed 12:33 -->
|
7
|
+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
9
|
+
<title>title</title>
|
10
|
+
<meta name="author" content="Shigeto R. Nishitani" />
|
11
|
+
<meta name="generator" content="Org Mode" />
|
12
|
+
<link rel="stylesheet" type="text/css" href="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/css/htmlize.css"/>
|
13
|
+
<link rel="stylesheet" type="text/css" href="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/css/readtheorg.css"/>
|
14
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
|
15
|
+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
|
16
|
+
<script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/lib/js/jquery.stickytableheaders.min.js"></script>
|
17
|
+
<script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/js/readtheorg.js"></script>
|
18
|
+
</head>
|
19
|
+
<body>
|
20
|
+
<div id="content" class="content">
|
21
|
+
<h1 class="title">title</h1>
|
22
|
+
<div id="table-of-contents" role="doc-toc">
|
23
|
+
<h2>Table of Contents</h2>
|
24
|
+
<div id="text-table-of-contents" role="doc-toc">
|
25
|
+
<ul>
|
26
|
+
<li><a href="#org7fb0aa2">1. 2-4-2 a,b,cの置換</a>
|
27
|
+
<ul>
|
28
|
+
<li><a href="#orgfb00f4a">1.1. 課題</a></li>
|
29
|
+
<li><a href="#orgbda918e">1.2. メモ</a>
|
30
|
+
<ul>
|
31
|
+
<li><a href="#org4c6cd8a">1回目</a></li>
|
32
|
+
<li><a href="#org1133abe">2回目</a></li>
|
33
|
+
</ul>
|
34
|
+
</li>
|
35
|
+
</ul>
|
36
|
+
</li>
|
37
|
+
<li><a href="#orgc652892">2. 2_5 分度器</a>
|
38
|
+
<ul>
|
39
|
+
<li><a href="#org0671e26">2.1. 課題</a></li>
|
40
|
+
<li><a href="#org9392f8e">2.2. メモ</a>
|
41
|
+
<ul>
|
42
|
+
<li><a href="#org679972d">1回目</a></li>
|
43
|
+
<li><a href="#org5b42c15">2回目-</a></li>
|
44
|
+
</ul>
|
45
|
+
</li>
|
46
|
+
</ul>
|
47
|
+
</li>
|
48
|
+
</ul>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
<div id="outline-container-org7fb0aa2" class="outline-2">
|
53
|
+
<h2 id="org7fb0aa2"><span class="section-number-2">1.</span> 2-4-2 a,b,cの置換</h2>
|
54
|
+
<div class="outline-text-2" id="text-1">
|
55
|
+
</div>
|
56
|
+
<div id="outline-container-orgfb00f4a" class="outline-3">
|
57
|
+
<h3 id="orgfb00f4a"><span class="section-number-3">1.1.</span> 課題</h3>
|
58
|
+
<div class="outline-text-3" id="text-1-1">
|
59
|
+
<p>
|
60
|
+
変数a,b,cがある。a←b←cとプログラムで3つの値を入れ替えてみよ
|
61
|
+
</p>
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
|
65
|
+
<div id="outline-container-orgbda918e" class="outline-3">
|
66
|
+
<h3 id="orgbda918e"><span class="section-number-3">1.2.</span> メモ</h3>
|
67
|
+
<div class="outline-text-3" id="text-1-2">
|
68
|
+
</div>
|
69
|
+
<div id="outline-container-org4c6cd8a" class="outline-4">
|
70
|
+
<h4 id="org4c6cd8a">1回目</h4>
|
71
|
+
<div class="outline-text-4" id="text-org4c6cd8a">
|
72
|
+
<p>
|
73
|
+
授業で習ったtempを用いて考える、簡単に入れ替えることができた
|
74
|
+
</p>
|
75
|
+
</div>
|
76
|
+
</div>
|
77
|
+
|
78
|
+
<div id="outline-container-org1133abe" class="outline-4">
|
79
|
+
<h4 id="org1133abe">2回目</h4>
|
80
|
+
<div class="outline-text-4" id="text-org1133abe">
|
81
|
+
<ul class="org-ul">
|
82
|
+
<li>tmp=a; 代入のために用意したtempにaを代入</li>
|
83
|
+
<li>a=b; aにbを代入</li>
|
84
|
+
<li>b=c; bにcを代入</li>
|
85
|
+
<li>c=tmp; cにtempを代入</li>
|
86
|
+
</ul>
|
87
|
+
</div>
|
88
|
+
</div>
|
89
|
+
</div>
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<div id="outline-container-orgc652892" class="outline-2">
|
93
|
+
<h2 id="orgc652892"><span class="section-number-2">2.</span> 2_5 分度器</h2>
|
94
|
+
<div class="outline-text-2" id="text-2">
|
95
|
+
</div>
|
96
|
+
<div id="outline-container-org0671e26" class="outline-3">
|
97
|
+
<h3 id="org0671e26"><span class="section-number-3">2.1.</span> 課題</h3>
|
98
|
+
<div class="outline-text-3" id="text-2-1">
|
99
|
+
<p>
|
100
|
+
度数法の2つの角度a,b(0<=a,b<360)の和(a+b)と差(a-b)の値を、それぞれ0以上360未満で求めよ。(つまり、例えば360なら0、-1なら359にせよ。)
|
101
|
+
</p>
|
102
|
+
</div>
|
103
|
+
</div>
|
104
|
+
|
105
|
+
<div id="outline-container-org9392f8e" class="outline-3">
|
106
|
+
<h3 id="org9392f8e"><span class="section-number-3">2.2.</span> メモ</h3>
|
107
|
+
<div class="outline-text-3" id="text-2-2">
|
108
|
+
<p>
|
109
|
+
度数法の2つの角度a,b(0<=a,b<360)の和(a+b)と差(a-b)の値を、それぞれ0以上360未満で求めよ。(つまり、例えば360なら0、-1なら359にせよ。)(2_5)
|
110
|
+
二つの角度a,b(0<=a,b<360)の和と差の値を0~360未満で求める
|
111
|
+
</p>
|
112
|
+
</div>
|
113
|
+
|
114
|
+
<div id="outline-container-org679972d" class="outline-4">
|
115
|
+
<h4 id="org679972d">1回目</h4>
|
116
|
+
<div class="outline-text-4" id="text-org679972d">
|
117
|
+
<p>
|
118
|
+
和と差がそれぞれ0より上の数であればそれぞれを360で割った数を表示
|
119
|
+
負の値となるときどのように表示するか。
|
120
|
+
和と差が負の値を取るとき360にそれぞれを360で割った数を足して表示
|
121
|
+
</p>
|
122
|
+
</div>
|
123
|
+
</div>
|
124
|
+
|
125
|
+
<div id="outline-container-org5b42c15" class="outline-4">
|
126
|
+
<h4 id="org5b42c15">2回目-</h4>
|
127
|
+
<div class="outline-text-4" id="text-org5b42c15">
|
128
|
+
<p>
|
129
|
+
int sum=a+b; sumにはaとbの和
|
130
|
+
int dif=a-b; difにはaとbの差
|
131
|
+
</p>
|
132
|
+
|
133
|
+
|
134
|
+
<p>
|
135
|
+
sum=(sum%360+360)%360; sumを360で割った余りに360を足しそれを360で割った余りをsumに代入
|
136
|
+
dif=(dif%360+360)%360; difも同様
|
137
|
+
</p>
|
138
|
+
|
139
|
+
<p>
|
140
|
+
こうすることによって構文をスッキリさせることができ、無駄な計算を省ける
|
141
|
+
二回目で気付くことができた
|
142
|
+
</p>
|
143
|
+
|
144
|
+
<div class="org-src-container">
|
145
|
+
<pre class="src src-c"><span class="linenr"> 1: </span><span style="color: #cdad00;">#include</span><span style="color: #8b7355;"><stdio.h></span>
|
146
|
+
<span class="linenr"> 2: </span>
|
147
|
+
<span class="linenr"> 3: </span><span style="color: #00688b;">int</span> <span style="color: #cd9b1d;">main</span>(<span style="color: #00688b;">void</span>)
|
148
|
+
<span class="linenr"> 4: </span>{
|
149
|
+
<span class="linenr"> 5: </span> <span style="color: #00688b;">int</span> <span style="color: #2e8b57;">a</span>=10;
|
150
|
+
<span class="linenr"> 6: </span> <span style="color: #00688b;">int</span> <span style="color: #2e8b57;">b</span>=-15;
|
151
|
+
<span class="linenr"> 7: </span> <span style="color: #00688b;">int</span> <span style="color: #2e8b57;">sum</span>=a+b;
|
152
|
+
<span class="linenr"> 8: </span> <span style="color: #00688b;">int</span> <span style="color: #2e8b57;">dif</span>=a-b;
|
153
|
+
<span class="linenr"> 9: </span>
|
154
|
+
<span class="linenr">10: </span>
|
155
|
+
<span class="linenr">11: </span> sum=(sum%360+360)%360;
|
156
|
+
<span class="linenr">12: </span> dif=(dif%360+360)%360;
|
157
|
+
<span class="linenr">13: </span>
|
158
|
+
<span class="linenr">14: </span> printf(<span style="color: #8b7355;">"sum=%d dif=%d\n"</span>,sum,dif);
|
159
|
+
<span class="linenr">15: </span>
|
160
|
+
<span class="linenr">16: </span> <span style="color: #1c86ee;">return</span> 0;
|
161
|
+
<span class="linenr">17: </span>}⏎
|
162
|
+
</pre>
|
163
|
+
</div>
|
164
|
+
</div>
|
165
|
+
</div>
|
166
|
+
</div>
|
167
|
+
</div>
|
168
|
+
</div>
|
169
|
+
<div id="postamble" class="status">
|
170
|
+
<p class="author">Author: Shigeto R. Nishitani</p>
|
171
|
+
<p class="date">Created: 2024-07-24 Wed 12:33</p>
|
172
|
+
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
|
173
|
+
</div>
|
174
|
+
</body>
|
175
|
+
</html>
|
@@ -0,0 +1,67 @@
|
|
1
|
+
#+OPTIONS: ^:{}
|
2
|
+
#+STARTUP: indent nolineimages overview num
|
3
|
+
#+TITLE: title
|
4
|
+
#+AUTHOR: Shigeto R. Nishitani
|
5
|
+
#+EMAIL: (concat "shigeto_nishitani@mac.com")
|
6
|
+
#+LANGUAGE: jp
|
7
|
+
#+OPTIONS: H:4 toc:t num:2
|
8
|
+
# +OPTIONS: toc:nil
|
9
|
+
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
|
10
|
+
|
11
|
+
* 2-4-2 a,b,cの置換
|
12
|
+
** 課題
|
13
|
+
変数a,b,cがある。a←b←cとプログラムで3つの値を入れ替えてみよ
|
14
|
+
|
15
|
+
** メモ
|
16
|
+
*** 1回目
|
17
|
+
授業で習ったtempを用いて考える、簡単に入れ替えることができた
|
18
|
+
|
19
|
+
*** 2回目
|
20
|
+
- tmp=a; 代入のために用意したtempにaを代入
|
21
|
+
- a=b; aにbを代入
|
22
|
+
- b=c; bにcを代入
|
23
|
+
- c=tmp; cにtempを代入
|
24
|
+
|
25
|
+
* 2_5 分度器
|
26
|
+
** 課題
|
27
|
+
度数法の2つの角度a,b(0<=a,b<360)の和(a+b)と差(a-b)の値を、それぞれ0以上360未満で求めよ。(つまり、例えば360なら0、-1なら359にせよ。)
|
28
|
+
|
29
|
+
** メモ
|
30
|
+
度数法の2つの角度a,b(0<=a,b<360)の和(a+b)と差(a-b)の値を、それぞれ0以上360未満で求めよ。(つまり、例えば360なら0、-1なら359にせよ。)(2_5)
|
31
|
+
二つの角度a,b(0<=a,b<360)の和と差の値を0~360未満で求める
|
32
|
+
|
33
|
+
*** 1回目
|
34
|
+
和と差がそれぞれ0より上の数であればそれぞれを360で割った数を表示
|
35
|
+
負の値となるときどのように表示するか。
|
36
|
+
和と差が負の値を取るとき360にそれぞれを360で割った数を足して表示
|
37
|
+
|
38
|
+
*** 2回目-
|
39
|
+
int sum=a+b; sumにはaとbの和
|
40
|
+
int dif=a-b; difにはaとbの差
|
41
|
+
|
42
|
+
|
43
|
+
sum=(sum%360+360)%360; sumを360で割った余りに360を足しそれを360で割った余りをsumに代入
|
44
|
+
dif=(dif%360+360)%360; difも同様
|
45
|
+
|
46
|
+
こうすることによって構文をスッキリさせることができ、無駄な計算を省ける
|
47
|
+
二回目で気付くことができた
|
48
|
+
|
49
|
+
#+begin_src c -n
|
50
|
+
#include<stdio.h>
|
51
|
+
|
52
|
+
int main(void)
|
53
|
+
{
|
54
|
+
int a=10;
|
55
|
+
int b=-15;
|
56
|
+
int sum=a+b;
|
57
|
+
int dif=a-b;
|
58
|
+
|
59
|
+
|
60
|
+
sum=(sum%360+360)%360;
|
61
|
+
dif=(dif%360+360)%360;
|
62
|
+
|
63
|
+
printf("sum=%d dif=%d\n",sum,dif);
|
64
|
+
|
65
|
+
return 0;
|
66
|
+
}⏎
|
67
|
+
#+end_src
|
@@ -0,0 +1,104 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="jp" xml:lang="jp">
|
5
|
+
<head>
|
6
|
+
<!-- 2024-08-16 Fri 14:09 -->
|
7
|
+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
9
|
+
<title>title</title>
|
10
|
+
<meta name="author" content="Shigeto R. Nishitani" />
|
11
|
+
<meta name="generator" content="Org Mode" />
|
12
|
+
<link rel="stylesheet" type="text/css" href="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/css/htmlize.css"/>
|
13
|
+
<link rel="stylesheet" type="text/css" href="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/css/readtheorg.css"/>
|
14
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
|
15
|
+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
|
16
|
+
<script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/lib/js/jquery.stickytableheaders.min.js"></script>
|
17
|
+
<script type="text/javascript" src="https://fniessen.github.io/org-html-themes/src/readtheorg_theme/js/readtheorg.js"></script>
|
18
|
+
</head>
|
19
|
+
<body>
|
20
|
+
<div id="content" class="content">
|
21
|
+
<h1 class="title">title</h1>
|
22
|
+
|
23
|
+
<div id="outline-container-orgaa9072c" class="outline-2">
|
24
|
+
<h2 id="orgaa9072c"><span class="section-number-2">1.</span> Schizophrenia vs Paranoia</h2>
|
25
|
+
<div class="outline-text-2" id="text-1">
|
26
|
+
<a href="./schizophrenia_vs_paranoia/TetsugakuRenshu20_296.html"
|
27
|
+
class="example">
|
28
|
+
<img src="./images/HyperCard_24f-12.jpg"
|
29
|
+
width=500
|
30
|
+
alt=finite_temp
|
31
|
+
>
|
32
|
+
</a>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div id="outline-container-org91a3af1" class="outline-2">
|
37
|
+
<h2 id="org91a3af1"><span class="section-number-2">2.</span> multiple Rakefile</h2>
|
38
|
+
<div class="outline-text-2" id="text-2">
|
39
|
+
<p>
|
40
|
+
<a href="./multiple_rake.html">./multiple_rake.html</a>
|
41
|
+
</p>
|
42
|
+
</div>
|
43
|
+
</div>
|
44
|
+
<div id="outline-container-orgb70c22d" class="outline-2">
|
45
|
+
<h2 id="orgb70c22d"><span class="section-number-2">3.</span> memo for sources and target dir</h2>
|
46
|
+
<div class="outline-text-2" id="text-3">
|
47
|
+
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
48
|
+
|
49
|
+
|
50
|
+
<colgroup>
|
51
|
+
<col class="org-left" />
|
52
|
+
</colgroup>
|
53
|
+
<tbody>
|
54
|
+
<tr>
|
55
|
+
<td class="org-left"><img src="./images/HyperCard_24f-10.jpg" alt="HyperCard_24f-10.jpg" /></td>
|
56
|
+
</tr>
|
57
|
+
</tbody>
|
58
|
+
</table>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="outline-container-org1128b83" class="outline-2">
|
63
|
+
<h2 id="org1128b83"><span class="section-number-2">4.</span> Discuss sources</h2>
|
64
|
+
<div class="outline-text-2" id="text-4">
|
65
|
+
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
|
66
|
+
|
67
|
+
|
68
|
+
<colgroup>
|
69
|
+
<col class="org-left" />
|
70
|
+
|
71
|
+
<col class="org-left" />
|
72
|
+
|
73
|
+
<col class="org-left" />
|
74
|
+
</colgroup>
|
75
|
+
<tbody>
|
76
|
+
<tr>
|
77
|
+
<td class="org-left"><img src="./images/HyperCard_24f-1.jpg" alt="HyperCard_24f-1.jpg" /></td>
|
78
|
+
<td class="org-left"><img src="./images/HyperCard_24f-2.jpg" alt="HyperCard_24f-2.jpg" /></td>
|
79
|
+
<td class="org-left"><img src="./images/HyperCard_24f-3.jpg" alt="HyperCard_24f-3.jpg" /></td>
|
80
|
+
</tr>
|
81
|
+
|
82
|
+
<tr>
|
83
|
+
<td class="org-left"><img src="./images/HyperCard_24f-4.jpg" alt="HyperCard_24f-4.jpg" /></td>
|
84
|
+
<td class="org-left"><img src="./images/HyperCard_24f-5.jpg" alt="HyperCard_24f-5.jpg" /></td>
|
85
|
+
<td class="org-left"><img src="./images/HyperCard_24f-6.jpg" alt="HyperCard_24f-6.jpg" /></td>
|
86
|
+
</tr>
|
87
|
+
|
88
|
+
<tr>
|
89
|
+
<td class="org-left"><img src="./images/HyperCard_24f-7.jpg" alt="HyperCard_24f-7.jpg" /></td>
|
90
|
+
<td class="org-left"><img src="./images/HyperCard_24f-8.jpg" alt="HyperCard_24f-8.jpg" /></td>
|
91
|
+
<td class="org-left"><img src="./images/HyperCard_24f-9.jpg" alt="HyperCard_24f-9.jpg" /></td>
|
92
|
+
</tr>
|
93
|
+
</tbody>
|
94
|
+
</table>
|
95
|
+
</div>
|
96
|
+
</div>
|
97
|
+
</div>
|
98
|
+
<div id="postamble" class="status">
|
99
|
+
<p class="author">Author: Shigeto R. Nishitani</p>
|
100
|
+
<p class="date">Created: 2024-08-16 Fri 14:09</p>
|
101
|
+
<p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p>
|
102
|
+
</div>
|
103
|
+
</body>
|
104
|
+
</html>
|