投稿時間:2022-09-18 08:11:58 RSSフィード2022-09-18 08:00 分まとめ(12件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 東急バスのEV自動運転バス 当面の目標は「路線バスの先」にある https://www.itmedia.co.jp/business/articles/2209/18/news029.html itmedia 2022-09-18 07:17:00
技術ブログ Developers.IO Flutter3 と Amplify UI Components で作成したログイン画面でユーザによるサインアップを無効化してみました https://dev.classmethod.jp/articles/flutter3-amplify-ui-components-without-signup/ amplifyuicomponents 2022-09-17 22:50:54
海外TECH DEV Community PHP 8 attribute quirks https://dev.to/shalvah/php-8-attribute-quirks-1984 PHP attribute quirksA quick post to document some specific behaviours I encountered with PHP s Attributes that aren t in the official docs Inheriting from an attribute does not make you an attribute This is an attribute Attribute class ParentAttribute ParentAttribute function functionWithParent But this isn t class ChildAttribute extends ParentAttribute So this has no effect ChildAttribute function functionWithChild We can prove this by trying to instantiate the attributes using the Reflection API reflectionFunction new ReflectionFunction functionWithParent attributes reflectionFunction gt getAttributes print r array map fn a gt a gt newInstance attributes reflectionFunction new ReflectionFunction functionWithChild attributes reflectionFunction gt getAttributes print r array map fn a gt a gt newInstance attributes This prints Array gt ParentAttribute Object Fatal error Uncaught Error Attempting to use non attribute class ChildAttribute as attributeTo make ChildAttribute an attribute itself you ll need to mark it with the Attribute attribute even though it s already on its parent ‍ ️ Attribute class ChildAttribute extends ParentAttribute But why I m not sure but I think there s a good argument that explicitly labelling each class with the specific attributes it has makes its behaviour obvious Also having attribute data be inherited by child classes might be undesirable It would mean that for example SomeAttributeMarker class SomeClass class SomeOtherClass extends SomeClass SomeOtherClass would be treated as if it had SomeAttributeMarker applied to it which may or may not be what you want Even worse what happens with inherited methods Do they inherit attributes too class SomeClass SomeAttributeMarker public function m class SomeOtherClass extends SomeClass public function m Does m in the child inherit the attributes from m in the parent What about if it s protected or private You could say to follow the normal rules of class inheritance but with complex object trees those can get tricky pretty quickly and it s probably not worth it for a feature that s meant to be purely static more on that later But ultimately manually adding a new attribute is easy but removing an automatically inherited one would be complicated I think it was the right call by the devs Inheriting from a class with an attribute doesn t inherit its attributesI had this listed as my second point but I ve realized it s completely covered by the explanation in the first Leaving it here just because Any class can be an attributeAt first this sounds contradictory to our earlier discovery But here s what I mean This code compiles and executes fine stdClass SomeNonexistentClass SomeNonexistentClass you can even pass in arguments function fnWithAttributes despite the fact that stdClass is a default PHP class that is not marked as an attribute and SomeNonexistentClass does not exist What happens when we try to access the attributes via reflection Well depending on what you re doing it still works reflectionFunction new ReflectionFunction fnWithAttributes attributes reflectionFunction gt getAttributes array map fn a gt a gt getName a gt getArguments attributes stdClass SomeNonexistentClass SomeNonexistentClass you can even pass in arguments We re still good The problems finally surface when we try to instantiate them array map function a try return a gt newInstance catch Throwable e return e gt getMessage attributes Attempting to use non attribute class stdClass as attribute Attribute class SomeNonexistentClass not found Attribute class SomeNonexistentClass not found So why did PHP let us get this far The first reason is that the atttribute syntax re purposes an old PHP syntax so it had to be non breaking PHP s commenting style is but it also supports so when attributes were introduced they needed to do nothing by default otherwise if the compiler tried to validate that the attribute class actually existed older PHP code might start crashing A more significant reason is that attributes are purely static code They are meant to be used as markers or holders of metadata for other entities like functions and objects so they do nothing until some consumer who s interested in that metadata actively requests it A third and definitely the main reason is that attributes aren t required to be classes I thought they were but while writing this I noticed the doc says it literally the first sentence While not strictly required it is recommended to create an actual class for every attribute I d read that before but didn t understand it Now I realize what it means you can use anything as an attribute It doesn t have to be a class as long as the consumer isn t trying to instantiate it So the first set of examples was fine In essence attributes are a sort of standardized format for specifying metadata along with inbuilt parsing via the Reflection API So packages no longer need to define their own custom formats and parsers for docblock tags They can simply use attributes even if they aren t actual classes Cool By default reflection does not return attribute subclassesThe final thing I discovered which it turns out is actually documented is that the Reflection API s getAttributes method when given the name of an attribute class will only return attributes matching that class name So in this case ChildAttribute function functionWithChild reflectionFunction new ReflectionFunction functionWithChild attributes reflectionFunction gt getAttributes ParentAttribute class print r array map fn a gt a gt getName attributes we always get an empty array since the function doesn t have any ParentAttribute attributes But it turns out you can pass an argument that will tell it to include subclasses ChildAttribute function functionWithChild reflectionFunction new ReflectionFunction functionWithChild attributes reflectionFunction gt getAttributes ParentAttribute class ReflectionAttribute IS INSTANCEOF print r array map fn a gt a gt getName attributes With this you get ChildAttribute And this works whether or not the ChildAttribute is marked with Attribute or not Don t ask me why All in all I m pretty impressed I came in expecting to find bugs or UX gaps but digging through this stuff has shown me how much thought the devs put into this feature 2022-09-17 22:18:25
Apple AppleInsider - Frontpage News 24 years after original iMac, there's still big demand for floppies https://appleinsider.com/articles/22/09/16/24-years-after-original-imac-theres-still-big-demand-for-floppies?utm_medium=rss years after original iMac there x s still big demand for floppiesThe iMac was the first mass produced computer to ditch the inch floppy disk and the rest of the industry followed soon after ーbut that doesn t mean there isn t a market for them While the floppy disk reigned supreme for nearly years Apple chose to abandon the format in when it introduced the iMac G The company believed that user writeable CDs high speed networking and the internet would render the disks obsolete And to a degree that s true By the inch floppy disk was decidedly legacy By it was nearly extinct Read more 2022-09-17 22:26:41
海外TECH Engadget Apollo update transforms the iPhone 14 Pro’s Dynamic Island into a home for ‘Pixel Pals’ https://www.engadget.com/apollo-reddit-iphone-14-pro-dynamic-island-pixel-pals-update-221206984.html?src=rss Apollo update transforms the iPhone Pro s Dynamic Island into a home for Pixel Pals The iPhone Pro and Pro Max may have only arrived yesterday but developers are already dreaming up fun and interesting use cases for Apple s new Dynamic Island interface Take Apollo creator Christian Selig for instance On Friday he updated his Reddit client to implement support for “Pixel Pals The feature adds a Tamagotchi like critter that does cute things on top of your phone s Dynamic Island while you have Apollo open You can even choose between multiple creatures including a cat dog hedgehog fox or axolotl Okay y all I think I found the best idea for the Dynamic Island on the iPhone Pro I added a cat that lives up there like a tamagotchi and just hangs out and does cute stuff as you browse Reddit in my app Apollo pic twitter com xJJlazHHEーChristian Selig ChristianSelig September If you don t have an iPhone Pro or Pro Max don t worry You can also add the creatures to your phone as lock screen widgets provided you have iOS installed On the subject of iPhone widgets Google teased one that will function as a shortcut to Chrome s Dino game Selig isn t the only person doing something creative with the iPhone Pro s Dynamic Island In a tweet spotted by The Verge WaterMinder creator Kriss Smolka showed off Hit the Island a game that uses the UI element for a Pong style game You can download it from the App Store I can only speak for myself but these apps make me a bit jealous I m still rocking an iPhone nbsp nbsp Who has an iPhone Pro right now Need to test this on device asap ️Hit The Island our game concept for iPhone Pro still laggy but it s turning out nice iPhonePro iOSpic twitter com kWLUgkdーKriss Smolka ksmolka September 2022-09-17 22:12:06
ニュース BBC News - Home William and Harry lead historic coffin vigil https://www.bbc.co.uk/news/uk-62938463?at_medium=RSS&at_campaign=KARANGA military 2022-09-17 22:53:20
ニュース BBC News - Home The Papers: 'Together for Granny' and 'surrounded by love' https://www.bbc.co.uk/news/blogs-the-papers-62943872?at_medium=RSS&at_campaign=KARANGA front 2022-09-17 22:42:13
ニュース BBC News - Home Queen's lying-in-state: How long is the queue? https://www.bbc.co.uk/news/uk-62872323?at_medium=RSS&at_campaign=KARANGA thames 2022-09-17 22:55:12
ニュース BBC News - Home What time is the Queen's funeral? Who will wear military uniform? And other questions https://www.bbc.co.uk/news/uk-62844663?at_medium=RSS&at_campaign=KARANGA daily 2022-09-17 22:54:46
北海道 北海道新聞 鹿児島暴風域、九州上陸か 台風14号、高波や高潮警戒 https://www.hokkaido-np.co.jp/article/732869/ 非常に強い台風 2022-09-18 07:13:00
ビジネス 東洋経済オンライン 営業利益が大きく上振れしそうな50社ランキング 『会社四季報』秋号の独自予想を徹底分析 | 企業ランキング | 東洋経済オンライン https://toyokeizai.net/articles/-/618754?utm_source=rss&utm_medium=http&utm_campaign=link_back 会社四季報 2022-09-18 07:30:00
海外TECH reddit Smash Ultimate Summit 5 - Pool D - Moist | Light vs. CR | ProtoBanham https://www.reddit.com/r/smashbros/comments/xgzgo0/smash_ultimate_summit_5_pool_d_moist_light_vs_cr/ Smash Ultimate Summit Pool D Moist Light vs CR ProtoBanhamWatch Live Pool D Paris quot Light quot Ramirez Garcia Twitch Twitter Wiki Team vs Naoto quot ProtoBanham quot Tsuji Twitter Wiki Team Fox Light ProtoBanham LucinaMinMin Fox Pokémon Stadium MinMin stock stocks Fox Pokémon Stadium MinMin Fox Town and City Lucina stock Fox Battlefield Lucina stock submitted by u Tery to r smashbros link comments 2022-09-17 22:22:40

コメント

このブログの人気の投稿

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

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

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)