投稿時間:2021-12-26 08:11:22 RSSフィード2021-12-26 08:00 分まとめ(13件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
TECH Engadget Japanese ジェイムズ・ウェッブ宇宙望遠鏡、打上げ成功。太陽電池パネルも展開 https://japanese.engadget.com/nasa-has-finally-launched-the-james-webb-space-telescope-223054581.html 太陽電池 2021-12-25 22:30:54
IT ITmedia 総合記事一覧 [ITmedia News] NASA、巨大宇宙望遠鏡「ジェームズ・ウェッブ」打ち上げ成功 最初の画像はうまくいけば半年後に https://www.itmedia.co.jp/news/articles/2112/26/news029.html itmedianewsnasa 2021-12-26 07:20:00
python Pythonタグが付けられた新着投稿 - Qiita conda VS pip ~どちらを使うかはYOU次第~ https://qiita.com/naccchan/items/c36ea9f32878479b5f72 pipinstallパッケージ名condaとpipの違いpipとcondaの違いは、PyPIとAnacondaのそれぞれに付随したインストール・管理ツールであることです。 2021-12-26 07:42:18
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) active_storageでimage画像が表示されない https://teratail.com/questions/375574?rss=all activestorageでimage画像が表示されないRubynbsponnbspRailsで紹介するアプリを作っています。 2021-12-26 07:30:04
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) プロットを画像にする https://teratail.com/questions/375573?rss=all 2021-12-26 07:21:06
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) githubからcloneし、dockerを使ってrailsで使用する方法 https://teratail.com/questions/375572?rss=all githubからcloneし、dockerを使ってrailsで使用する方法前提・実現したいことdockerについてつほどわからないことがあるので教えて欲しいのですが、githubからcloneしてきたソースコードをdockerを使って開き、それをVScodeでrailsデータとして読み込み、編集したいと思っております。 2021-12-26 07:08:14
技術ブログ Developers.IO Amazon ConnectにShopifyの顧客情報や購入履歴を連携させる https://dev.classmethod.jp/articles/amazon-connect-shopify-integration/ amazon 2021-12-25 22:41:38
海外TECH DEV Community 100 Languages Speedrun: Episode 33: Logo https://dev.to/taw/100-languages-speedrun-episode-33-logo-3gb8 Languages Speedrun Episode LogoLogo is a programming language all the way from the s aimed at teaching kids programming The most notable feature of Logo are turtle graphics simple commands that draw lines on screen by moving an imaginary turtle One issue with covering Logo is that it s meant for interactive use in some Logo GUI environment and these are platform specific and don t last very long so every variant of Logo will be quite different And it s not just their fancy features like D graphics interactivity and so on Even very basic commands like like changing color are going to be different in each Logo I ll be using in browser papert Logo so all examples will work in papers Different Logo implementations will need some adjustments I ll try to mention when something is implementation specific I ll post a few of the pictures generated by the programs if you want to see some that I skipped just try them out in papert Other Logo implementations I ll mention are SLogo also in browser and ACSLogo for OSX Basic Drawing CommandsWe re not printing anything we re controlling a turtle A turtle has position on a screen as well as orientation To draw a square we can tell the turtle to move forward steps turn degrees to the right four times Squareforward right forward right forward right forward right Line comments use As these commands are a bit long and we ll be using them all the time there are shorter versions too fd for forward rt for right and lt for left Trianglefd rt fd rt fd rt Logo implementation differencesWe can also control color and thickness of lines In papert we can use color R G B and penwidth WIDTH For very simple loops we can do repeat N COMMANDS Blue Hexagon Papertcscolor penwidth repeat fd rt htLogo programs tend to show the turtle on the screen To show or hide the turtle we can use st and ht commands Logo doesn t clear the screen by default when you start the program so if you want to do so you should use cs command explicitly Anyway here s the same program in JSLogo which has RGB instead of and slightly different commands Blue Hexagon JSLogocssetpencolor setpensize repeat fd rt htAnd here s more traditional ACSLogo which only has fixed colors and doesn t have comments cssetpencolor setpenwidth repeat fd rt htAs you can see there s zero hope of writing any kind of portable Logo programs ProceduresWe can define procedures with to name end Like this draws three letters I to draw i draw line forward penup go to next character right forward right forward reset to facing up pen down pendown right endcsrepeat draw i To move the turtle without touching the screen we can use penup and pendown commands or pu and pd Step by step turtle faces up at some point let s say Logo normally doesn t use coordinates at all but let s say these are normal computer graphics coordinates X points right Y points down Pen is down forward makes turtle draw line up to penup ends drawing but we still need to position turtle at the next letterright and forward makes turtle turn clockwise by degrees so it s pointing right for us and advance to without drawing right and forward makes turtle turn clockwise by degrees so it s pointing down for us and advance to without drawing pendown and right makes turtle press the pen down turn clockwise by degrees so it s pointing up for us so we end up pixels to the right from where we started in same orientation and pen state FizzYou can probably see where this is going here s a program that says FIZZ three times to draw i fd main stroke go to next character pu rt fd rt fd reset pen state pd rt endto draw f fd main line rt fd top stroke pu rt fd lt fd move to next stroke pd lt fd middle stroke go to next character pu fd rt fd reset pen state pd rt endto draw z rt fd bottom line pu rt fd return pd rt fd diagonal stroke lt fd top line advance to next character pu rt fd rt fd lt fd reset pen state pd lt endto draw fizz draw f draw i draw z draw zendcsrepeat draw fizz I could explain it step by step but it s probably easier if you try to run it in Papert using run slowly button to see how turtle moves step by step As we didn t use any special commands this program runs in JSLogo as well It doesn t work with ACSLogo as it doesn t support comments and it needs its GUI to define procedures BuzzDrawing BUZZ is basically saem as drawing FIZZ except loops work weird way instead of drawing starting where the turtle is the arc degrees radius command draws an arc around the turtle starting where the turtle is facing and going up to draw b fd main stroke a bit arc bottom loop fd more main stroke arc top loop fd finish main stroke pu rt fd go back go to next character lt fd reset pen state pd lt endto draw u pu fw pd fd left stroke pu rt fd move to right stroke pd rt fd right stroke pu rt fd move to center of arc pd rt arc arc go to next character pu fd rt fd reset pen state pd rt endto draw z rt fd bottom line pu rt fd return pd rt fd diagonal stroke lt fd top line advance to next character pu rt fd rt fd lt fd reset pen state pd lt endto draw buzz draw b draw u draw z draw zendcsrepeat draw buzz DigitsDoing this more times with proper loops for each digit would be a bit much so let s do them in style of segment display For I ll use the I code instead to avoid awkward spacing Here s the code C B D G A E Fto seven seg a b c d e f g ifelse a pd pu fd ifelse b pd pu fd rt ifelse c pd pu fd rt ifelse d pd pu fd ifelse e pd pu fd rt ifelse f pd pu fd pu rt fd rt ifelse g pd pu fd pu fd rt fd rt pdendto draw seven seg true true true true true true falseendto draw fd pu rt fd rt fd pd rt endto draw seven seg true false true true false true trueendto draw seven seg false false true true true true trueendto draw seven seg false true false true true false trueendto draw seven seg false true true false true true trueendto draw seven seg true true true false true true trueendto draw seven seg false false true true true false falseendto draw seven seg true true true true true true trueendto draw seven seg false true true true true true trueendto draw digits draw draw draw draw draw draw draw draw draw draw endresetcsdraw digitshtAnd here are the digits As you can see procedures can take parameters and ifelse condition then else can do some simple logic NumbersTo draw numbers we just need to add a bit of code and some recursion to draw digit digit if digit draw if digit draw if digit draw if digit draw if digit draw if digit draw if digit draw if digit draw if digit draw if digit draw endto draw number number make a number make b number a make c b if c gt draw number c draw digit aendresetcsdraw number htmake var is how you can assign variables We need to use a bunch of extra variables as Logo lacks integer division FizzBuzzAnd here s the moment we ve all been waiting for the FizzBuzz in Logo Here s the complete program mostly the code we wrote before C B D G A E Fto seven seg a b c d e f g ifelse a pd pu fd ifelse b pd pu fd rt ifelse c pd pu fd rt ifelse d pd pu fd ifelse e pd pu fd rt ifelse f pd pu fd pu rt fd rt ifelse g pd pu fd pu fd rt fd rt pdendto draw seven seg true true true true true true falseendto draw fd pu rt fd rt fd pd rt endto draw seven seg true false true true false true trueendto draw seven seg false false true true true true trueendto draw seven seg false true false true true false trueendto draw seven seg false true true false true true trueendto draw seven seg true true true false true true trueendto draw seven seg false false true true true false falseendto draw seven seg true true true true true true trueendto draw seven seg false true true true true true trueendto draw digit digit if digit draw if digit draw if digit draw if digit draw if digit draw if digit draw if digit draw if digit draw if digit draw if digit draw endto draw number number make a number make b number a make c b if c gt draw number c draw digit aendto draw i fd main stroke go to next character pu rt fd rt fd reset pen state pd rt endto draw f fd main line rt fd top stroke pu rt fd lt fd move to next stroke pd lt fd middle stroke go to next character pu fd rt fd reset pen state pd rt endto draw b fd main stroke a bit arc bottom loop fd more main stroke arc top loop fd finish main stroke pu rt fd go back go to next character lt fd reset pen state pd lt endto draw u pu fw pd fd left stroke pu rt fd move to right stroke pd rt fd right stroke pu rt fd move to center of arc pd rt arc arc go to next character pu fd rt fd reset pen state pd rt endto draw z rt fd bottom line pu rt fd return pd rt fd diagonal stroke lt fd top line advance to next character pu rt fd rt fd lt fd reset pen state pd lt endto draw fizz draw f draw i draw z draw zendto draw buzz draw b draw u draw z draw zendto draw fizzbuzz draw fizz draw buzzendto draw line i setxy i ifelse i draw fizzbuzz ifelse i draw buzz ifelse i draw fizz draw number i endresetcsmake i repeat draw line i make i i htWhich generates the FizzBuzz we want We had to do a few more things setxy x y moves the turtle to specific point on the screen we use turtle position to go to the next letter so we don t really know how far it went it s a lot easier this waymake i there s no for loops in Logo so we make a weird while for hybrid by defining i and increasing it timesThat s enough Logo for now Should you use Logo No Turtle graphics is easier for children only in some evil mirror universe where children s favorite subject is trigonometry In this universe coordinate graphics with damn graph paper is drastically more approachable And if you absolutely need to do turtle graphics there s packages for that in every regular language anyway Even disregarding turtle vs coordinate graphics issue Logo is absolutely dreadful as a programming language and learning Logo teaches no useful skill As for teaching programming to total beginners the easiest ways are either HTML CSS then Javascript path the junior web dev path or spreadsheets then SQL path the business analyst path Or do what ambitious bootcamps do and start with Ruby or Python with proper TDD from right away and so on These approaches are all proven to work Nobody teaches programming with Logo as it would be horribly ineffective and completely ridiculous CodeAll code examples for the series will be in this repository Code for the Logo episode is available here 2021-12-25 22:22:49
海外科学 NYT > Science Last Known Slave Ship, Clotilda, Is Remarkably Well Preserved, Researchers Say https://www.nytimes.com/2021/12/25/us/clotilda-slaveship-africa-alabama.html Last Known Slave Ship Clotilda Is Remarkably Well Preserved Researchers SayDNA may be extracted from the Clotilda which was sunk in the Mobile River in Alabama in after it arrived from West Africa carrying enslaved people researchers said 2021-12-25 22:57:30
海外科学 NYT > Science Robert H. Grubbs, 79, Dies; His Chemistry Breakthrough Led to a Nobel https://www.nytimes.com/2021/12/24/science/robert-h-grubbs-dead.html Robert H Grubbs Dies His Chemistry Breakthrough Led to a NobelHe helped perfect the manufacturing of compounds that are now used to make everything from plastics to pharmaceuticals marking an advance in “green chemistry 2021-12-25 22:18:38
金融 ニュース - 保険市場TIMES ジブラルタ生命調べ、家族愛に関する調査2021の集計結果公開 https://www.hokende.com/news/blog/entry/2021/12/26/080000 ジブラルタ生命調べ、家族愛に関する調査の集計結果公開既婚者の男女名を対象に実施ジブラルタ生命保険株式会社以下、ジブラルタ生命は、歳の事実婚を含む既婚者の男女名を対象とした「家族愛に関する調査」をインターネットリサーチにて実施し、年月日水に集計結果を公開した。 2021-12-26 08:00:00
北海道 北海道新聞 <安倍元首相単独インタビュー>2島返還軸への転換認める 「100点狙って0点なら何の意味もない」 https://www.hokkaido-np.co.jp/article/627638/ 北方領土問題 2021-12-26 07:15:42
ビジネス 東洋経済オンライン 日本人の考えがコロナで180度変わった根本理由 今こそ「自分の感情」と向き合いライフシフトを | リーダーシップ・教養・資格・スキル | 東洋経済オンライン https://toyokeizai.net/articles/-/477978?utm_source=rss&utm_medium=http&utm_campaign=link_back lifeshift 2021-12-26 07:30:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)