Google |
カグア!Google Analytics 活用塾:事例や使い方 |
「PIXAR」は経営や戦略を理解したいビジネス書としておすすめで、さらにAppleファンの人はジョブズのあまり語られていないエピソードもあって読み応え十分です。 |
https://www.kagua.biz/review/book/20211114a3.html
|
「PIXAR」は経営や戦略を理解したいビジネス書としておすすめで、さらにAppleファンの人はジョブズのあまり語られていないエピソードもあって読み応え十分です。 |
2021-11-14 08:00:39 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
Tensorflow チュートリアルのStyle Transferを読み解く |
https://qiita.com/ToppaD/items/a75556f34da08c4ae959
|
そのためには、入力される生の画像データを複雑な理解ができるような特徴に変換するような、内部表現が必要となります。 |
2021-11-14 17:44:22 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
【PySimpleGUI】PythonでオリジナルGUIアプリを作成 |
https://qiita.com/ku_a_i/items/20004800adc78fa94a0b
|
sizeは「列×行」を表しているsgMLinefontメイリオsizekeyOUTPUTsize左と右のレイアウトを合体させた全体レイアウトlayoutframeframeGUIタイトルと全体レイアウトをのせたWindowを定義するwindowsgWindow日本語OCR実行アプリlayoutresizableTrueGUI表示実行部分whileTrueウィンドウ表示eventvalueswindowreadクローズボタンの処理ifeventisNoneprintexitbreakwindowclose実行すると、初期画面が完成していることが確認できる。 |
2021-11-14 17:32:06 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
JavaScriptのコールスタックを理解する |
https://qiita.com/cotton11aq/items/28e5d38f34a5eff888b2
|
コンテキストを積む順番グローバルコンテキスト⇨cのコンテキスト⇨bのコンテキスト⇨aのコンテキスト実行する順番aのコンテキスト⇨bのコンテキスト⇨cのコンテキスト⇨グローバルコンテキストまとめJavaScriptエンジンはコールスタックという仕組みを通して、JavaScriptがどのように実行されたか追跡しています。 |
2021-11-14 17:40:37 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
【Nuxt.js】アプリテンプレート(カスタマイズ) |
https://qiita.com/Yudai_35_/items/1f06b32d03a94d7948f2
|
【Nuxtjs】アプリテンプレートカスタマイズはじめにこんにちは今回は【Vuejs】についてアウトプットしていきますアプリテンプレートとはまずデフォルトのテンプレートを確認します。 |
2021-11-14 17:18:57 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
セレクトボックスで何も選択されていない場合、警告を出したい。 |
https://teratail.com/questions/369270?rss=all
|
前提・実現したいこと問い合わせフォームを作っていて、入力されていなかったりすると警告が出るようになっていますが、セレクトボックスで何も選択されていない場合、警告を出したい。 |
2021-11-14 17:53:14 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
makefile でlibファイルを作成する方法が知りたい。 |
https://teratail.com/questions/369269?rss=all
|
makefileでlibファイルを作成する方法が知りたい。 |
2021-11-14 17:44:04 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Advanced Custom Fieldsの使い方 |
https://teratail.com/questions/369268?rss=all
|
AdvancedCustomFieldsの使い方AdvancednbspCustomnbspFieldsというものをインストールし、bbpressにてカスタムフィールドを表示させたいため、pluginsnbspgtnbspbbpressnbspgtnbsptemplatesnbspgtnbspdefaultnbspgtnbspbbpressnbspgtnbsploopsingletopicphpに下記の通りltココに挿入という部分挿入してみたのですが、結果に反映されないので困っています。 |
2021-11-14 17:40:43 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
ナビゲーションコントローラによるナビゲーションバーの常時表示方法について |
https://teratail.com/questions/369267?rss=all
|
ナビゲーションコントローラによるナビゲーションバーの常時表示方法についてswift初学者です。 |
2021-11-14 17:39:10 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
[h]:mm表示形式の数値をDAY関数から正しく抽出できるようにする方法 |
https://teratail.com/questions/369266?rss=all
|
hmm表示形式の数値をDAY関数から正しく抽出できるようにする方法現在実験の結果をまとめる集計表を作成しており、合計ポイントの乖離を出すために日と時、分それぞれの要素取り出して合計ポイントを求めたいもののDAY関数が正しい数値を抽出できていないため正しい数値が得られません。 |
2021-11-14 17:24:22 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
二重ループを用いて九九の表を作る |
https://teratail.com/questions/369265?rss=all
|
rjinrangeprintijendprint |
2021-11-14 17:23:46 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
csコードを実行するWebAPIを作りたい! |
https://teratail.com/questions/369264?rss=all
|
csコードを実行するWebAPIを作りたい実現したいことCで作られたコードを解析されたくないので、APIとして使用できるようにしたいです。 |
2021-11-14 17:16:00 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
ステージに家具やアイテム、ゴールをランダムに配置したい |
https://teratail.com/questions/369263?rss=all
|
unity |
2021-11-14 17:10:37 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
中小企業のIT管理について |
https://teratail.com/questions/369262?rss=all
|
|
2021-11-14 17:10:06 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Pytorchを用いたニューラルネットワークによる分類 |
https://teratail.com/questions/369261?rss=all
|
Pytorchを用いたニューラルネットワークによる分類前提・実現したいことPytorch初心者です。 |
2021-11-14 17:06:29 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
検索結果を表示させたい |
https://teratail.com/questions/369260?rss=all
|
検索結果を表示させたいGraphqlを用いてgithubのレポジトリの検索結果を取得するミニアプリを作成中です。 |
2021-11-14 17:00:43 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
【クラウドエンジニア向け】無償公開されている講義資料・研修資料リンク集 |
https://qiita.com/yoshiyama_hana/items/96dbe0b82ca783c86be0
|
【クラウドエンジニア向け】無償公開されている講義資料・研修資料リンク集はじめに本記事は無償で公開されている講義資料・研修資料をまとめた記事になります。 |
2021-11-14 17:01:19 |
GCP |
gcpタグが付けられた新着投稿 - Qiita |
【BigQuery】standardSQLのLanguage Serverを公開した(VSCode拡張機能だけどVimもOK) |
https://qiita.com/dr666m1/items/7a5737c472ce663cb300
|
BeforeAfterセットアップ️Windowsの場合、WSLの利用を推奨このあたりが参考になるかと手順GoogleCloudSDKをインストールgcloudauthapplicationdefaultloginコマンドを実行sqliteをインストールVSCodeでこの拡張機能をインストールBigQueryExtensionforVSCodeで検索VSCodeでファイルを開く拡張子はbqもしくはbigqueryコマンドパレットからBQExtensionVSCodeUpdateCacheを実行補足BQExtensionVSCodeUpdateCacheは、テーブル名などを補完するために必要な情報を取得し、ローカルのsqliteに保存するコマンド。 |
2021-11-14 17:54:56 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
rails6.1でActionTextやってみた |
https://qiita.com/taiki-nd/items/556b804fc367ba30ca15
|
bundleexecbinrailsgscaffoldposttitlestringbundleexecbinrailsdbcreatedbmigrateここまでくると、postモデルにテーブルがつできているかと思います。 |
2021-11-14 17:48:24 |
技術ブログ |
Developers.IO |
検証に使うための内部ネットワーク(自己署名証明書Webサーバー+内部DNS)をCloudFormationでテンプレート化してみた |
https://dev.classmethod.jp/articles/cloudformation-private-network/
|
cloudformation |
2021-11-14 08:59:35 |
海外TECH |
DEV Community |
Future of Ruby – AST Tooling |
https://dev.to/baweaver/future-of-ruby-ast-tooling-9i1
|
Future of Ruby AST ToolingThis is a series meant to explore the potential future of the Ruby programming language by visiting current technologies and ideas around them and how those might apply to the future In this series you ll find some tools which can be used today some which may be used tomorrow and a collection of aspirations of what could be As this is a look into a potential future you may or may not see these things come to pass and that s ok This is not meant to be prescriptive but to start conversations on what things could be With that being said let s take a look into the potential future of Ruby AST ToolingPrograms are at their core text with special semantic meaning Using Regex we can certainly treat Ruby as just plain text but in doing so we lose the semantic meaning of what makes Ruby Ruby Enter in ASTs or Abstract Syntax Trees ASTs are a data structure that represents a Ruby program as a series of nested nodes broken into relevant pieces using knowledge of the language Ruby has a few different implementations of this the core implementation being Ripper pp Ripper sexp def hello world Hello world end program def ident hello paren params ident world nil nil nil nil nil nil bodystmt string literal string content tstring content Hello string embexpr var ref ident world tstring content nil nil nil The AST is represented as a series of nested arrays The problem with this of course is that it can be difficult to work on programmatically for tooling developers Enter the Whitequark parser which you can experiment with here ruby code def hello world Hello world end expression Parser CurrentRuby parse ruby code s def hello s args s arg world s dstr s str Hello s begin s lvar world s str There are a few others like Melbourne JRubyParser and ruby parser but we ll focus on the Whitequark parser for the sake of this article Put simply I believe that it s more accessible and easily usable than Ripper and will be the base of a lot of what could be the future of Ruby tooling That s what we re going to explore today We ll be covering the following topics Find and Replace Regex and literal F amp R is limited and prone to accidental replacements Can we be more precise EmberJS Style Codemods EmberJS uses Codemods to upgrade itself and ships with them every major version Think that but Rails or other major Ruby gems Babel Transpilation JS evolves so quickly because you can fairly easily try out experimental syntax via Babel and get proofs of concept out fast A to B Inferred Transforms Given code A find the transformations necessary to get to code B Macros The Whitequark parser has a dual Unparser If Parser was standard Ruby and any live code could be turned into an AST we could rearrange it for some dramatic effects Now that s a lot of ground to cover so shall we get started Find and ReplaceLet s say you wanted to replace every instance of a certain piece of text in your program with another one Most editors have a find and replace function with added regex support which can be very handy For this example let s say you decided that you had named a variable hash and want to replace it with something more descriptive such as person hash HTTP get some site people json then JSON parse puts hash name was found Sure it d work for this case but say that right below that code was something like this puts test object name is currently test object hash A global find and replace would be a real bad idea in this case changing the meaning of your program This is because the text hash has no semantic meaning but a node related to hash definitely does HEREDOCs surrounded in single quotes prevents interpolation which we need here Parser CurrentRuby parse lt lt RUBY hash HTTP get some site people json then JSON parse puts hash name was found puts test object name is currently test object hash RUBY This generates the following AST s begin s lvasgn hash s numblock s send s send s const nil HTTP get s str some site people json then s send s const nil JSON parse s lvar s send nil puts s dstr s begin s send s lvar hash s str name s str was found s send nil puts s dstr s begin s send s send nil test object name s str is currently s begin s send s send nil test object hash Now we have hash referring to a node of type lvasgn local variable assign and lvar local variable as opposed to the later node s send s send nil test object hash which relates to the hash method being called on the test object ASTs gave distinct meaning to each part of that text and given that we could more easily do replacements in a much more descriptive way Think of it in a way like static typing for manipulating a program and ensuring your intent is more clearly expressed and executed Editors currently have regex support but who s to say that we couldn t have AST or NodePattern support in the future Using MarcAndre s NodePattern tool we can even use a regular language designed for ASTs known as NodePattern to find any local variable or assignment related to hash borrowing some from src require rubocop require parser current def ruby parser builder RuboCop AST Builder new parser Parser CurrentRuby new builder parser diagnostics all errors are fatal true parserenddef ast of s buffer Parser Source Buffer new ruby source s ruby parser parse buffer enddef node pattern s RuboCop NodePattern new s hash match node pattern lt lt NODE OR pattern lvasgn lvar hash Either a local var or assignment send nil hash or a call to that variable End OR patternNODEhash match match ast of hash gt trueIn fact this is how RuboCop autocorrect works by searching for a certain node and doing something when it s found Some of these tools have even already been wrapped like Jonatas s work on FFast which works on top of NodePattern and some of RuboCop s previous work Really the only things between us and this future is a bit more wrapping and polish as well as integrations into something like VSCode Any takers I may well wrap some of this in a more minimalist gem that provides an easier to use interface to build on as the current parts are non intuitive unless you re willing to dig into the code on a non trivial basis EmberJS Style CodemodsThere are a lot and I mean a lot of ideas we can and should be taking from Javascript in the Ruby community One of them is the idea of code mods for migrating syntaxes and especially for upgrades from old versions When I was working with EmberJS there were multiple codemods designed to make migrating from one version to the next and it was a very pleasant experience The idea was that after you upgraded dependencies you ran one command and most if not all of the upgrade was done for your syntax Why can t we have that in Ruby Why not especially for Rails Turns out the answer is that there are indeed some of these things already Notice that several of those support autocorrection meaning that running RuboCop with a will fix them for you rubocop aLet s take a glance at the action filter cop real quick here but just a quick part of it def check method node node method name node method name return unless bad methods include method name message format MSG prefer preferred method method name current method name add offense node loc selector message message do corrector corrector replace node loc selector preferred method node loc selector source endendNotice that after add offense it uses corrector replace to replace with a preferred method source Not only that but if we went over to the specs described class FILTER METHODS each do method it registers an offense for method do offenses inspect source method name expect offenses size to eq end we can see that there are even tests for it meaning that we can not only describe and implement transformations but programmatically test them so we don t have to manually rerun them on our entire codebases That s a lot of power Imagine with me that new versions of Rails were bundled with autocorrectors which got people done with a Rails upgrade just from running one more command or potentially even bundling it in the official Rails upgrade process itself We could dramatically reduce the potential for manual errors and make upgrading a substantially more seamless and painless process The secret here is that I do not believe this is far off and there may well be people already doing this on the Rails core team Babel TranspilerAnother lesson we can and should take from Javascript is the Babel traspiler Babel allows for the introduction of syntax before it s officially in the language making it extremely effective for testing and experimentation of new language features Proof of concepts can be more easily verified and frequently TC uses them in formal proposals Not only that but the language can polyfill older versions with new features and enhancements allowing developers to use features only present in newer versions more easily For Javascript that s a huge deal as they have to deal with such variance in web browser support As it would happen the folks behind Ruby Next have some ideas here and have done a significant amount of work in enabling this very vision to become a reality They wrote quite a bit on that very topic here and a lot of those terms are going to look very familiar to what you ve been reading already and there s a very good reason for that A to B Inferred TransformsPerhaps the most troublesome part of writing regex and really any regular language is getting the syntax right The same is true of NodePatterns Why can t we just say that we have code A here select v v even and have it figure out the syntax to go to code B here select amp even For us as humans that seems pretty straightforward If the block argument matches the body and only one operation is happening directly on it we can replace that with the shorthand block syntax What if we had a way to give code A and B and have Ruby find the transformations between the two For simple cases that algorithm might look like this Match the original syntaxFind similarities with the desired target syntaxFind what has changedIdentify which parts of the code moved whereCreate matchers to capture moved parts in the original codeCreate code to generate the target codeProfit but those are tree algorithms which are unfortunately beyond me at the moment The implications however are staggering if this is pulled off Having a meta language that allows one to quickly generate code migration syntax would lower the barrier to entry of code migrations that can be bundled with upgrades and also allow whole new methods of refactoring Perhaps I ll experiment with this more later but at the moment it is most certainly beyond my skills I would venture a guess that algorithms used to solve word ladders or perhaps levenshtein word distances could be used here though MacrosHaving a method to express A to B is great even in static files but what if such things could be done in a running program If ASTs were accessible in running Ruby programs we could potentially create syntax which could rewrite syntax Now if you re not familiar with the idea of macros from Crystal or LISP like languages you might wonder why you might care One of the primary advantages is unfolding loops allowing algorithms to go from O n to O n meaning massive performance benefits I d written on this some time ago with matchable The particularly relevant part is replacing the idea of public send with a directly inlined code path valid keys each do key deconstructed values key key enddeconstructed values as public send is slow compared to directly calling a method If taken to logical extremes one could not only inline the actual method call but extract the method code and interpolate it directly into such a method There are already some techniques capable of doing just this by combining Parser with Unparser but of course such things can only be done on Ruby files read in rather than in a REPL session which is where a lot more fun could happen A live AST could really make a very interesting future here Wrapping UpNow you might have noticed something particularly interesting with this article Almost all of these items are either not that far off or are already being used in production by several major players in the Ruby ecosystem The truth is the future has already been coming and perhaps our issues are not as much around tooling but in making the tooling more accessible and well understood to our community If this is combined with more official support from the Ruby core team especially around the Whitequark and RuboCop parsers I believe we ll take a great step forward The challenge now is documentation education advocacy and support I believe all of those are very possible |
2021-11-14 08:22:39 |
海外科学 |
BBC News - Science & Environment |
COP26: New global climate deal struck in Glasgow |
https://www.bbc.co.uk/news/world-59277788?at_medium=RSS&at_campaign=KARANGA
|
glasgow |
2021-11-14 08:47:07 |
ニュース |
BBC News - Home |
COP26: New global climate deal struck in Glasgow |
https://www.bbc.co.uk/news/world-59277788?at_medium=RSS&at_campaign=KARANGA
|
glasgow |
2021-11-14 08:47:07 |
ニュース |
BBC News - Home |
Remembrance Sunday: Queen to attend Cenotaph service |
https://www.bbc.co.uk/news/uk-59276572?at_medium=RSS&at_campaign=KARANGA
|
london |
2021-11-14 08:27:44 |
北海道 |
北海道新聞 |
日本ハムの近藤健介らFA資格取得 NPB、97選手を公示 |
https://www.hokkaido-np.co.jp/article/611525/
|
日本ハム |
2021-11-14 17:18:13 |
北海道 |
北海道新聞 |
全日空機で圧力低下、けが人なし 緊急事態を宣言、大阪空港に着陸 |
https://www.hokkaido-np.co.jp/article/611540/
|
大阪空港 |
2021-11-14 17:16:00 |
北海道 |
北海道新聞 |
競馬、アカイイトがG1初勝利 エリザベス女王杯 |
https://www.hokkaido-np.co.jp/article/611539/
|
阪神 |
2021-11-14 17:07:00 |
コメント
コメントを投稿