投稿時間:2022-02-20 08:17:41 RSSフィード2022-02-20 08:00 分まとめ(21件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
TECH Techable(テッカブル) SteamVR向けVRテニスゲーム『CYBER TENNIS』、大幅アップデートで配信開始 https://techable.jp/archives/173182 cybertennis 2022-02-19 22:00:35
AWS AWS Partner Network (APN) Blog How KNIME Users Can Build Intelligent Workflows By Accessing AWS Services Through Boto3 SDK Integration https://aws.amazon.com/blogs/apn/how-knime-users-can-build-intelligent-workflows-by-accessing-aws-services-through-boto3-sdk-integration/ How KNIME Users Can Build Intelligent Workflows By Accessing AWS Services Through Boto SDK IntegrationTo quickly build intelligent data driven workflows organizations need business analysts to work with data scientists and development teams to unlock useful insights from unstructured or semi structured data Learn how KNIME s end to end data science product portfolio helps bridge the gap between the ideation and productionalization steps of data science projects while also assisting in the communication of key data science aspects between teams 2022-02-19 22:59:33
海外TECH MakeUseOf Tiny Core Linux: The Smallest Linux Distro Ever Made https://www.makeuseof.com/what-is-tiny-core-linux/ linux 2022-02-19 23:00:12
海外TECH MakeUseOf Badges, Banners, and Alerts: iPhone and iPad Notification Types Explained https://www.makeuseof.com/iphone-notification-alert-types-explained/ Badges Banners and Alerts iPhone and iPad Notification Types ExplainedWe ll explain all the different types of notification alerts you can get on an iPhone or iPad how to change them and how to best use each option 2022-02-19 22:30:12
海外TECH DEV Community Webauthn - Registration https://dev.to/dagnelies/webauthn-registration-ned Webauthn RegistrationThe Webauthn appears simple on the surface but the more you dig into it the more its complexity will surprise you Without further ado let s dig into the code It s written so that you can simply open the browser dev tools and run it in the console let credential await navigator credentials create publicKey challenge UintArray from random string from server c gt c charCodeAt rp name Try it in the console id dev to user name John Doe displayName Johny id UintArray from for the device to identify user c gt c charCodeAt pubKeyCredParams if empty either ES or RSA will be used by default This is the bare minimum There are many more options that can be used However it should be OK for the default use case If you run this snippet a browser specific popup should appear and will ask to proove your identity In my case german locale in looks like this Depending on your case you might use the device directly your smartphone nearby or some security key to proove your identity using it How exactly you proove your identity depends on the device capabilities the OS the browser At some point you will to either use some biometric or PIN on the device This device is then called the authenticator and will produce a cryptographic private public key pair The private key will be kept secret stored on the device and protected by your biometric or PIN code The public key will ulimately be sent to the server so that it can authentify you next time So what s the result of this call A PublicKeyCredential and the start of your headhaches It s not some JSON that you can send over it s an object with encoded byte buffers PublicKeyCredential  id AQtKmY rawId lt ArrayBuffer gt response attestationObject lt ArrayBuffer gt clientDataJSON lt ArrayBuffer gt authenticatorAttachment cross platform type public key And not only are the byte buffers but in particular the attestationObject is tricky since it is encoded using the exotic CBOR format So you cannot even decode that without an external library There were several discussions in the working group of this specification argumenting in favor of plain JSON instead of these impractical byte buffers and CBOR encoding like for example However they simply stated On the call of it was decided that the use of ArrayBuffers is reflecting WC direction as we understand it and that revisiting that would be too much So well the burden falls on everyone wanting to use this instead Instead of trying to decode stuff on the client side a common approach is to encode the bytes as text using baseurl since several parts of the protocol already use baseurl too Here is a method to do so function baseurl buffer return btoa String fromCharCode new UintArray buffer replace replace replace You can also directly test it credential id baseurl credential rawId gt trueSo one way to simply send it over the to the server is as follows let jsonCred id credential id clientData baseurl credential response clientDataJSON attestation baseurl credential response attestationObject type credential type This would leave the burden of the tricky CBOR decoding of the attestation to the server But first let s analyze the content of the response id the id of the generated key pairrawId the same in raw formatresponse attestationObject a cryptic object in CBOR format containing among others the public keyresponse clientDataJSON an encoded JSON object containing challenge origin type and crossOrigin flag This should be preserved in its original form since it is also the signed data authenticatorAttachment either platform authentified through the device itself or cross platform authentified through an external device type always public key for this kind of authentication I guess it is to provides leeway for future extensions Here is an example of the credential response clientDataJSON object let utfDecoder new TextDecoder utf let clientData JSON parse utfDecoder decode credential response clientDataJSON type webauthn create challenge cmFuZGtLXNcmluZymcmtLXNlcnZlcg origin crossOrigin false Note here that the challenge this time is the baseurl encoded version of the original challenge The credential response attestationObject is much more tricky It is doubly CBOR encoded its structure depends on the authenticator and there are several different ways to parse it Luckily some other people faced the same challenge and wrote some great articles about it Introduction to verifying assertionsPackedFIDO UFAndroid KeystoreAndroid SafetyNetTPMApple Anonymous AttestationIn other words how to verify the authenticity of the message is not standard The webauthn Standard just tells the authenticators to put what s necessary inside to verify it And well each device OS sees it differently The takeaway is that you cannot verify this easily by yourself Not by a long shot This is due to the large diversity of attestations sometimes with outdated exotic formats and their underlying complexity of the whole That is why the next article in this series will focus on server side libraries to validate verify these attestations 2022-02-19 22:42:09
海外TECH DEV Community How to farm GitHub followers on autopilot https://dev.to/correiajpv/how-to-farm-github-followers-on-autopilot-4dcm How to farm GitHub followers on autopilot TL DR Correia jpv github follow bot Automated follow unfollow bot for GitHub Follow from multiple sources Choose which users to unfollow Custom options to control bot speed and maximum actions IntroSo you want to have more people following your open source work or maybe bring attention to some interesting and cool projects you have highlighted on your profile Perhaps you want to show off more authority or you just want to see that followers count grow bigger for the heck of it Well you can achieve this by many ways When your projects are interesting well made and with good documentation you ll get organic followers Also if you engage in others projects with welcome contributions discussions and relevant issues Automation to the rescueHowever you might want to try to get more followers in a more automated way Follow back is a decent strategy and this Python GitHub Follow Bot has options for you to choose the follow sources and how the bot will operate You can selectively unfollow too For example follow followers of the most popular users from Germany Other follow sources are Followers of a target userUsernames from a fileHere s another example for unfollowing everyone who doesn t follow you back with a custom random delay between unfollows from to seconds Download instructions and more details on the project s repository Correia jpv github follow bot Automated follow unfollow bot for GitHub Follow from multiple sources Choose which users to unfollow Custom options to control bot speed and maximum actions 2022-02-19 22:29:35
海外TECH DEV Community Publicando site no Github Pages https://dev.to/acaverna/publicando-seu-site-no-github-pages-433b Publicando site no Github Pages IniciandoQuando estava iniciando em desenvolvimento web escutava muito sobre a criação de um portfólio para mostrar meus conhecimentos mas na época não tinha a mínima ideia de como colocar meus projetos online para que outras pessoas pudessem ver Depois de um tempo eu descobri que eu precisava colocar o meu projeto em um servidor para que outras pessoas pudessem acessar mas daívinha o problema de não ter grana para poder contratar algum desses serviços Mas graças a comunidade eu descobri o Github Pages O que éo Github Pages O Github Pages éuma funcionalidade disponibilizada pelo github para poder hospedar projetos web de uma forma gratuita No GH Pages vocêconsegue hospedar apenas projetos com tecnologias de frontend não épossível utilizar para hospedar seus projetos utilizando alguma tecnologia server side como por exemplo PHP Node js ou Ruby Hospedando o seu primeiro siteO objetivo desse artigo não éexplicar do zero Git e Github então éimportante vocêter o conhecimento básico sobre essas duas ferramentas e possuir uma conta no Github Se vocênão tiver esse conhecimento básico pode dar uma olhada nesse tutorial da WoMakersCode O primeiro passo écriar um novo repositório no github Para isso na sua página inicial do github vocêpode clicar em criar um novo repositório Configure as informações do seu repo e clique em salvar Subindo projeto para o githubApós criar o seu repositório o próximo passo ésubir o seu projeto para o github Para fazer isso acesse pela linha de comando o diretório do projeto que vocêquer hospedar No meu caso irei utilizar um site simples para fazer esse tutorial Iremos inicializar um repositório git com o seguinte comando git initAdicionar os arquivos do seu projeto para commit utilizando git add Adicionar uma mensagem de commit com o comando git commit m Subindo o nosso site Sincronizar o nosso repositório local com o remoto utilizando o comando git remote add origin git github com KastroWalker github pages tutorial gitImportante configurar conforme as informações do seu repositório Subir os arquivos para a branch main do nosso repositório remoto git push u origin mainUtilizamos u origin main pois esse éo nosso primeiro commit para a nossa branch main remota e nesse momento éque estamos configurando a nossa main local com a branch main remota Vocêpode ver nesse gif todos os passos acima que eu utilizei para subir o projeto para o Github Configurando github pagesAgora éa hora de configurar o nosso repositório para funcionar no Github Pages para isso precisamos acessar as configurações do nosso repositório Iremos agora acessar a parte de configurações do github pages acessando a seção pages Precisamos configurar a branch com o código que vai ficar rodando no nosso site Para isso iremos clicar no select na parte de source e escolher a branch main Depois ésóclicar no botão de salvar Iráaparecer uma mensagem avisando que o seu site estápronto para ser publicado Após alguns minutos vocêjávai conseguir acessar o seu site No meu caso sódemorou minuto Quando o seu site estiver hospedado iráaparecer essa mensagem nas configurações de pages Pronto agora vocêjátem o seu site hospedado gratuitamente no github pages Configurando domínio personalizadoProvavelmente vocêdeve estar estranhado por estar aparecendo kastro dev na minha URI e na sua tem o nick do seu github seguido de github io por exemplo kastrowalker github io isso acontece pois configurei um DNS para o meu domínio do github por padrão o github te disponibiliza um domínio com o seu nick Caso vocêtenha um domínio vocêconsegue configurar ele no github pages para fazer isso ésóir novamente na parte de configurações do github pages e no final vai ter uma seção para adicionar o link do seu domínio e clicar em salvar Vocêtambém iráconfigurar no serviço do seu domínio para funcionar com o github mas isso muda de serviço para serviço então seria inviável abordar nesse tutorial Contudo basta procurar no google como configurar domínio do servidor insira aqui o nome do seu servidor de domínio no github pages que provavelmente vocêvai encontrar um tutorial ensinado a configurar essa parte Se vocêquiser criar um site para ser seu portfólio e ficar com a URI apenas lt seu nick do github gt github io ésócriar o repositório com o nome do seu domínio por exemplo kastrowalker github io ConclusãoAgora vocêjásabe como hospedar os seus projetos web gratuitamente Uma dica que tenho para vocêque estáiniciando no mundo de desenvolvimento web éque coloque os seus projetos de estudos hospedados no github pages essa éuma forma de mostrar para outras pessoas as coisas que vocêsabe fazer Caso queira ver o site usado nesse tutorial vocêconsegue acessando esse link Obrigado por ler esse artigo e espero ter te ajudado de alguma forma Qualquer dúvida que vocêtiver pode me mandar mensagem lána DM do meu twitter Não esquece de curtir aqui no dev to e compartilhar esse artigo com outras pessoas que vocêacha que pode também gostar de saber como hospedar um site gratuitamente Atéuma próxima lt 2022-02-19 22:18:30
海外TECH DEV Community Flutter Linter Kuralları Bölüm 1: Hata Kuralları 💫 🌌 ✨ https://dev.to/gulsenkeskin/flutter-linter-kurallari-bolum-1-hata-kurallari-3d4j Flutter Linter KurallarıBölüm Hata Kuralları“Where there are rules there s law “ Linting Nedir Linting Programatik Stilistik hatalar ve biçimlendirilmemişkod için kaynak kodunu kontrol etme işlemidir Mantıksal hatalar kullanılmayan değişkenler boşif else ifadeleri gibi kodlama sırasında yapılan bazıyaygın ve yaygın olmayan hatalarıbelirlemede yardımcıolur Linting in amacı kod kalitesini iyileştirebilecek gizli hatayıveya uygulamayıçalıştırırken sorunlara neden olabilecek hatalarıbelirleme konusunda gerçek zamanlıöneriler almaktır Linter kuralları gruba ayrılır Bunlar Hatalar Olasıkodlama hataları StilBar Pub paketi kurulumuyla ilgili olasısorunlar Her kuralın ayrıca bir olgunluk düzeyi vardır Kuralların olgunluk düzeyleri de e ayrılır Bunlar Kararlı StableBu kuralların kullanımıgüvenlidir ve Dart dilinin en son sürümleriyle işlevsel olduklarıdoğrulanmıştır Deneysel olarak işaretlenmedikçe veya kullanımdan kaldırılmadıkça tüm kurallar kararlıolarak kabul edilir Deneysel ExperimentalBu kurallar halen değerlendirme aşamasındadır ve hiçbir zaman istikrara kavuşturulamayabilir Bunlarıdikkatli kullanmanız gerekir Kullanımdan kaldırıldı DeprecatedBu kurallar artık kullanım için önerilmemektedir ve gelecekteki bir linter yayınında kaldırılabilir Hata kurallarıHata kuralları kodunuzdaki olasıhatalarıve diğer hatalarıtanımlar Always use package importslib içindeki dosyalar için relative imports dan göreli içe aktarmalardan kaçının Aynıüyeyi iki farklışekilde içe aktarmaktan kaçınmak için lib dizindeki dosyalar için mutlak içe aktarmayı absolute imports kullandığınızdan emin olun Doğru kullanım import package foo bar dart import package foo baz dart import package foo src baz dart Yanlışkullanım import baz dart import src bag dart import lib baz dart avoid dynamic calls dynamic bir hedefte method çağrılarından veya property erişimlerinden kaçının Açıkça veya dolaylıolarak statik olarak yazılan dynamic bir obje üzerindeki method çağrılarından veya özellik properties erişimlerinden kaçının Dinamik çağrılar her çalışma zamanıortamında ve derleyicide biraz farklıolarak ele alınır ancak çoğu üretim modu ve hatta bazıgeliştirme modları dinamik çağrılarla ilişkili hem derleme boyutu hem de çalışma zamanıperformansıcezalarına sahiptir Ek olarak dynamic yazılan hedefler çoğu statik analizi devre dışıbırakır Yanlışkullanım void explicitDynamicType dynamic object print object foo void implicitDynamicType object print object foo abstract class SomeWrapper T doSomething lt T gt void inferredDynamicType SomeWrapper wrapper var object wrapper doSomething print object foo void callDynamic dynamic function function void functionType Function function function Doğru kullanım void explicitType Fooable object object foo void castedType dynamic object object as Fooable foo abstract class SomeWrapper T doSomething lt T gt void inferredType SomeWrapper wrapper var object wrapper doSomething lt Fooable gt object foo void functionTypeWithParameters Function function function avoid empty elseBoşelse ifadelerinden kaçının Yanlışkullanım if x gt y print else print avoid printÜretim kodunda print çağrılarından kaçının void f int x print debug x avoid returning null for futureFuture için null döndürmekten kaçının avoid slow async ioYavaşasenkron dart io yöntemlerinden kaçının Aşağıdaki asenkron dosya I O methodlarınıkullanmaktan kaçının çünkübunlar senkron emsallerinden çok daha yavaştır •Directory exists•Directory stat•File lastModified•File exists•File stat•FileSystemEntity isDirectory•FileSystemEntity isFile•FileSystemEntity isLink•FileSystemEntity typeYanlışkullanım import dart io Future lt Null gt someFunction async var file File path to my file var now DateTime now if await file lastModified isBefore now print before LINT Doğru kullanım import dart io Future lt Null gt someFunction async var file File path to my file var now DateTime now if file lastModifiedSync isBefore now print before OK avoid type to stringSonuçlar küçültülebileceğinden üretim kodunda toString kullanmaktan kaçının Yanlışkullanım void bar Object other if other runtimeType toString Bar doThing Object baz Thing myThing return getThingFromDatabase key myThing runtimeType toString Doğru kullanım void bar Object other if other is Bar doThing class Thing String get thingTypeKey gt Object baz Thing myThing return getThingFromDatabase key myThing thingTypeKey avoid types as parameter namesTipleri paremetre adıolarak kullanmaktan kaçının Yanlışkullanım m f int Doğru kullanım m f int v avoid web libraries in flutterFlutter Flutter web plugin paketleri dışında yalnızca web kitaplıklarıkullanmaktan kaçının Web eklentileri olmayan Flutter paketlerinde web kitaplıkları dart html dart js ve dart js util kullanmaktan kaçının Bu kitaplıklar bir web context dışında desteklenmez bunlara bağlıolan işlevsellik Flutter mobilde runtime da başarısız olur ve Flutter web de kullanılmalarıgenellikle önerilmez Web kitaplığıerişimine şu durumlarda izin verilir •web i desteklenen bir context olarak bildiren plugin paketleriaksi takdirde dart html dart js ve dart js util in import edilmesine izin verilmez cancel subscriptionsdart async StreamSubscription örneklerini iptal edin StreamSubscription örneklerinin instances iptal edilmesi bellek sızıntılarınıve beklenmeyen davranışları unexpected behavior önler YanlışKullanım class A StreamSubscription subscriptionA LINT void init Stream stream subscriptionA stream listen Yanlışkullanım void someFunction StreamSubscription subscriptionF LINT Doğru kullanım class B StreamSubscription subscriptionB OK void init Stream stream subscriptionB stream listen void dispose filename subscriptionB cancel Doğru kullanım void someFunctionOK StreamSubscription subscriptionB OK subscriptionB cancel close sinksSink örneklerini kapatmak bellek sızıntılarını memory leaks ve beklenmeyen davranışları unexpected behavior önler Yanlışkullanım class A IOSink sinkA void init filename sinkA File filename openWrite LINT Yanlışkullanım void someFunction IOSink sinkF LINT Doğru kullanım class B IOSink sinkB void init filename sinkB File filename openWrite OK void dispose filename sinkB close Doğru kullanım void someFunctionOK IOSink sinkFOK OK sinkFOK close comment referencesYalnızca belge yorumlarındaki kapsam tanımlayıcılarına scope identifiers başvurun Değişken method veya köşeli parantez içinde adlar yazarsanız dartdoc adıarar ve belgelerine bağlanır Tüm bunların işe yaramasıiçin parantez içine alınmışbelgelerdeki tüm tanımlayıcıların kapsam içinde olduğundan emin olun Örneğin Doğru kullanım a veya b den büyük olanıdöndürün int max int int a int b Öte yandan outOfScopeId in kapsam dışıolduğunu varsayarsak Yanlışkullanım value outOfScopeId değerinden büyükse true değerini döndürün bool isOutOfRange int value Köşeli parantez yorum biçiminin açıklamaların oldukça doğal bir biçim kullanarak bildirimlere başvurmasına izin verecek şekilde tasarlandığını ancak keyfi ifadelere izin vermediğini unutmayın Özellikle köşeli parantez içindeki kod referansları aşağıdakilerden herhangi birini içerebilir •Tanımlayıcının comment kapsamındaki herhangi bir tanımlayıcı identifier olduğu tek bir tanımlayıcı doküman yorumlarında kapsamda ne olduğuna ilişkin spesifikasyona bakın •ilk tanımlayıcının kapsamdaki bir sınıfın adıve ikincisinin sınıfta bildirilen bir üyenin adıolduğu bir nokta ile ayrılmışiki tanımlayıcı •tek bir tanımlayıcıve ardından bir parantez çifti burada tanımlayıcıkapsamdaki bir sınıfın adıdır sınıfın adsız constructor ına atıfta bulunmak için kullanılır •veya bir nokta ile ayrılmışve ardından bir çift parantez ile ayrılmışiki tanımlayıcı burada ilk tanımlayıcıkapsamdaki bir sınıfın adıve ikincisi adlandırılmışbir constructor ın adıdır kesinlikle gerekli değildir ancak tutarlılık için izin verilir control flow in finallySon bloklarda kontrol akışıkullanmaktan kaçının Son bloklarda kontrol akışının kullanılması kaçınılmaz olarak hata ayıklamasızor olan beklenmeyen davranışlara neden olacaktır Doğru kullanım class Ok double compliantMethod var i try i catch e print e OK return i Yanlışkullanım class BadReturn double nonCompliantMethod try return catch e print e finally return LINT Yanlışkullanım class BadContinue double nonCompliantMethod for var o in try print o catch e print e finally continue LINT return Yanlışkullanım class BadBreak double nonCompliantMethod for var o in try print o catch e print e finally break LINT return diagnostic describe all propertiesDebug methodlarında tüm public property leri implemente edin Diagnosticable ın uygulayıcıları çalışma zamanında hata ayıklanabilirliğini iyileştirmek için bir debugFillProperties veya debugDescribeChildren methodu tüm public özelliklere başvurmalıdır Yanlışkullanım class Absorber extends Widget bool get absorbing gt absorbing bool absorbing bool get ignoringSemantics gt ignoringSemantics bool ignoringSemantics override void debugFillProperties DiagnosticPropertiesBuilder properties super debugFillProperties properties properties add DiagnosticsProperty lt bool gt absorbing absorbing Missing reference to ignoringSemantics Doğru kullanım class Absorber extends Widget bool get absorbing gt absorbing bool absorbing bool get ignoringSemantics gt ignoringSemantics bool ignoringSemantics override void debugFillProperties DiagnosticPropertiesBuilder properties super debugFillProperties properties properties add DiagnosticsProperty lt bool gt absorbing absorbing properties add DiagnosticsProperty lt bool gt ignoringSemantics ignoringSemantics empty statementsBoşifadelerden kaçının Boşifadeler neredeyse her zaman bir hatayıgösterir Örneğin Yanlışkullanım if complicated expression foo bar Dart formatıile biçimlendirilen hata bariz hale gelir if complicated expression foo bar Doğru kullanım if complicated expression foo bar invariant booleansKoşullu ifadeler koşulsuz olarak true veya false olarak değerlendirilmemelidir Bu kural şu anda deneyseldir experimental Derleme zamanında çıkarılabilecek koşullarıtest ETMEYİN veya aynıkoşulu iki kez test etmeyin False dan başka bir şey olamayacak bir koşul kullanan koşullu ifadeler kod bloklarınıişlevsiz hale getirme etkisine sahiptir Koşul true dışında hiçbir şeyi değerlendiremezse koşullu ifade tamamen gereksizdir ve kodu daha az okunabilir hale getirir Kodun programcının amacıile uyuşmamasıoldukça olasıdır Ya koşul kaldırılmalıya da her zaman true veya false olarak değerlendirilmemesi ve gereksiz testler yapmamasıiçin güncellenmelidir Yanlışkullanım foo aynıifadede bara hem eşitdir hem de eşit olamazif foo bar amp amp something amp amp foo bar Yanlışkullanım void compute int foo if foo doSomething bu noktada foo nun e eşit olduğunu biliyoruz bu nedenle sonraki koşul her zaman false if foo gt Yanlışkullanım void compute bool foo if foo return doSomething burada foo nun değeri her zaman false dır if foo Doğru kullanım void nestedOK if foo bar foo baz if foo bar Doğru kullanım void nestedOk if foo bar return foo baz if foo bar OK Doğru kullanım void nestedOk if foo null if bar null return if bar null OK iterable contains unrelated typeİlişkisiz unrelated türlerin referanslarıyla Iterable contains çağrısı Yanlışkullanım void someFunction var list lt int gt if list contains print someFunction LINT Yanlışkullanım void someFunction List lt int gt list lt int gt if list contains print someFunction LINT Yanlışkullanım void someFunction List lt DerivedClass gt list lt DerivedClass gt DerivedClass instance if list contains instance print someFunction LINT Yanlışkullanım abstract class SomeIterable lt E gt implements Iterable lt E gt abstract class MyClass implements SomeIterable lt int gt bool badMethod String thing gt this contains thing LINT Doğru kullanım void someFunction var list if list contains print someFunction OK Doğru kullanım void someFunction var list lt int gt if list contains print someFunction OK Doğru kullanım void someFunction List lt int gt list lt int gt if list contains print someFunction OK Doğru kullanım void someFunction List lt ClassBase gt list lt ClassBase gt DerivedClass instance if list contains instance print someFunction OK abstract class ClassBase class DerivedClass extends ClassBase Doğru kullanım void someFunction List lt Mixin gt list lt Mixin gt DerivedClass instance if list contains instance print someFunction OK abstract class ClassBase abstract class Mixin class DerivedClass extends ClassBase with Mixin Doğru kullanım void someFunction List lt Mixin gt list lt Mixin gt DerivedClass instance if list contains instance print someFunction OK abstract class ClassBase abstract class Mixin class DerivedClass extends ClassBase implements Mixin list remove unrelated typeİlişkisiz türlerin referanslarıyla remove çağrısı Parametre türünden farklıtürde bir örnekle instance Listede remove yöntemini çağırmayın Bunu yapmak liste elemanlarıüzerinde öğesini çağırır ve büyük olasılıkla false döndürür Yanlışkullanım void someFunction var list lt int gt if list remove print someFunction LINT Yanlışkullanım void someFunction List lt int gt list lt int gt if list remove print someFunction LINT Yanlışkullanım void someFunction List lt DerivedClass gt list lt DerivedClass gt DerivedClass instance if list remove instance print someFunction LINT Yanlışkullanım abstract class SomeList lt E gt implements List lt E gt abstract class MyClass implements SomeList lt int gt bool badMethod String thing gt this remove thing LINT Doğru kullanım void someFunction var list if list remove print someFunction OK Doğru kullanım void someFunction var list lt int gt if list remove print someFunction OK Doğru kullanım void someFunction List lt int gt list lt int gt if list remove print someFunction OK Doğru kullanım void someFunction List lt ClassBase gt list lt ClassBase gt DerivedClass instance if list remove instance print someFunction OK abstract class ClassBase class DerivedClass extends ClassBase Doğru kullanım void someFunction List lt Mixin gt list lt Mixin gt DerivedClass instance if list remove instance print someFunction OK abstract class ClassBase abstract class Mixin class DerivedClass extends ClassBase with Mixin Doğru kullanım void someFunction List lt Mixin gt list lt Mixin gt DerivedClass instance if list remove instance print someFunction OK abstract class ClassBase abstract class Mixin class DerivedClass extends ClassBase implements Mixin literal only boolean expressionsBoole ifadesi yalnızca literal lerden oluşur False dan başka bir şey olamayacak bir koşulu kullanan koşullu ifadeler conditional statements kod bloklarınıişlevsiz hale getirme etkisine sahiptir Koşul true dışında hiçbir şeyi değerlendiremezse koşullu ifade tamamen gereksizdir ve kodu daha az okunabilir hale getirir Kodun programcının amacıile uyuşmamasıoldukça olasıdır Ya koşul kaldırılmalıya da her zaman true veya false olarak değerlendirilmemesi için güncellenmelidir Yanlışkullanım void bad if true LINT Yanlışkullanım void bad if true amp amp LINT Yanlışkullanım void bad if amp amp true LINT Yanlışkullanım void bad if lt amp amp true LINT Yanlışkullanım void bad if true amp amp false LINT Yanlışkullanım void bad if LINT Yanlışkullanım void bad if true amp amp lt LINT Yanlışkullanım void bad if lt amp amp true LINT NOT eşdeğerine tercih edilen while true deyimi için bir istisna yapılmıştır Doğru kullanım void good while true Do stuff no adjacent strings in listListede bitişik dizeleri kullanmayın Doğru kullanım List lt String gt list lt String gt a b c Yanlışkullanım List lt String gt list lt String gt a b c no duplicate case valuesAynıdeğerde birden fazla case kullanmayın Bu genellikle bir yazım hatasıveya constant ın değiştirilmişdeğeridir Doğru kullanım const int A switch v case A case Yanlışkullanım const int A switch v case case case A case no logic in create state createState içine herhangi bir mantık koymayın createState uygulamaları bir state nesnesinin yeni bir örneğini instance döndürmeli ve başka bir şey yapmamalıdır Widget alanıaracılığıyla durum erişimi tercih edildiğinden verilerin özel constructor parametreleri kullanılarak state nesnelerine iletilmesinden de kaçınılmalıdır ve state constructor ına hiçbir argüman iletilmemelidir Yanlışkullanım MyState global class MyStateful extends StatefulWidget override MyState createState global MyState return global class MyStateful extends StatefulWidget override MyState createState gt MyState field class MyStateful extends StatefulWidget override MyState createState gt MyState Doğru kullanım class MyStateful extends StatefulWidget override MyState createState return MyState prefer relative importslib altındaki dosyalar için relative import u tercih edin Relative göreceli ve absolute mutlak içe aktarmaların her ikisini birden kullanırken aynıüyenin iki farklışekilde içe aktarıldığıbir durumla karşılaşılmasımümkündür Bundan kaçınmak için lib klasöründeki dosyalar için sürekli olarak relative importları göreceli içe aktarmaları kullandığınızdan emin olun Doğru kullanım import bar dart Yanlışkullanım import package my package bar dart prefer void to nullVoid in çalışacağıyerlerde Null türünükullanmayın Yanlışkullanım Null f Future lt Null gt f Stream lt Null gt f f Null x Doğru kullanım void f Future lt void gt f Stream lt void gt f f void x Bazıistisnalar özel işlev türlerinin formüle edilmesini içerir Null Function Null Null ve herhangi bir map veya list türüiçin read only konumlara geçmek için güvenli olan empty literal ler değişmezler yapmak için lt Null gt lt int Null gt test types in equalsTürlerin test edilmemesi sınıfınızın tüketicileri için beklenmeyen null pointer boşişaretçi istisnalarına exceptions neden olabilir Doğru kullanım class Field class Good final Field someField Good this someField override bool operator Object other if identical this other return true return other is Good amp amp this someField other someField override int get hashCode return someField hashCode Yanlışkullanım class Field class Bad final Field someField Bad this someField override bool operator Object other Bad otherBad other as Bad LINT bool areEqual otherBad null amp amp otherBad someField someField return areEqual override int get hashCode return someField hashCode throw in finallySon bloklarda istisna exceptions atmaktan kaçının Nihai bloklarda istisnalar atmak hata ayıklamasızor olan beklenmeyen davranışlara unexpected behavior neden olacaktır Doğru kullanım class Ok double compliantMethod var i try i catch e print e OK return i Yanlışkullanım class BadThrow double nonCompliantMethod try print hello world catch e print e finally throw Find the hidden error P LINT unnecessary statementsGereksiz ifadeler kullanmaktan kaçının Açık bir etkisi olmayan ifadeler genellikle gereksizdir veya bölünmelidir Örneğin Yanlışkullanım myvar list clear methodOne methodTwo foo bar baz Bunun gibi kodlar eksik bir düşünceyi gösterir ve bir hatadır Doğru kullanım some method const SomeClass methodOne methodTwo foo bar baz return myvar unrelated type equality checksEşitlik operatörünüilişkisiz türlerin referanslarınıkarşılaştırırken kullanmayın Hiçbirinin diğerinin alt türüolmadığıbir türün referanslarınıkarşılaştırmak büyük olasılıkla false döndürür ve programcının amacınıyansıtmayabilir package fixnum daki Int ve Int intin sağtarafta olmasıkoşuluyla int ile karşılaştırmaya izin verir Lint buna özel bir durum olarak izin verir Yanlışkullanım void someFunction var x if x print someFunction LINT Yanlışkullanım void someFunction String x if x print someFunction LINT Yanlışkullanım void someFunction DerivedClass instance var other DerivedClass if other instance print someFunction LINT class ClassBase class DerivedClass extends ClassBase abstract class Mixin class DerivedClass extends ClassBase with Mixin class DerivedClass extends ClassBase implements Mixin Doğru kullanım void someFunction var x var y if x y print someFunction OK Doğru kullanım void someFunction for var i i lt i if i print someFunction OK Doğru kullanım void someFunction var x if x null print someFunction OK Doğru kullanım void someFunction List someList if someList length print someFunction OK Doğru kullanım void someFunction ClassBase instance DerivedClass other if other instance print someFunction OK Doğru kullanım void someFunction unknown var what unknown for var index index lt unknown index if what index print someFunction OK Doğru kullanım void someFunction Mixin instance var other DerivedClass if other instance print someFunction OK if other instance print someFunction OK class ClassBase abstract class Mixin class DerivedClass extends ClassBase with Mixin unsafe htmlGüvenli olmayan HTML API lerinden kaçının •Bir AnchorElement öğesinin href alanına doğrudan atama•Bir EmbedElement IFrameElement ImageElement veya ScriptElement •öğesinin src alanına doğrudan atama•Bir IFrameElement öğesinin srcdoc alanına doğrudan atama•Element in createFragment yöntemini çağırma•Window open methodunu çağırma•Element in setInnerHtml yöntemini çağırma•Element html constructor ınıçağırma•DocumentFragment html constructor ınıçağırmaYanlışkullanım var script ScriptElement src foo js use build context synchronouslyAsenkron boşluklarda BuildContexts kullanmayın BuildContext i daha sonra kullanmak üzere saklamak teşhis edilmesi zor çökmelere yol açabilir Asenkron boşluklar örtük olarak BuildContext i depolar ve kod yazarken gözden kaçırılır Bir StatefulWidget tan bir BuildContext kullanıldığında asenkron bir boşluktan sonra mounted property kontrol edilmelidir Doğru kullanım void onButtonTapped BuildContext context Navigator of context pop Yanlışkullanım void onButtonTapped BuildContext context async await Future delayed const Duration seconds Navigator of context pop Doğru kullanım class MyWidgetState extends State lt MyWidget gt void onButtonTapped async await Future delayed const Duration seconds if mounted return Navigator of context pop use key in widget constructorsWidget constructor larında key kullanın Public widget lar oluştururken key kullanmak iyi bir yoldur Yanlışkullanım class MyPublicWidget extends StatelessWidget Doğru kullanım class MyPublicWidget extends StatelessWidget MyPublicWidget Key key super key key valid regexpsGeçerli bir regular expression syntax ıkullanın Regular expression normal ifade örnekleri oluştururken geçerli regular expression söz dizimini kullanın Invalid syntax ile oluşturulan regular ifadeler çalışma zamanında bir FormatException oluşturacaktır bu nedenle bundan kaçınılmalıdır Yanlışkullanım print RegExp r hasMatch foo Doğru kullanım print RegExp r hasMatch foo Bu makalede Linter kurallarının ilk grubu olan error kurallarınıinceledik Bir sonraki makalede Stil kurallarınıinceleyeceğiz References directives ordering 2022-02-19 22:17:10
Apple AppleInsider - Frontpage News Google Drive users stung by macOS '.DS_Store' copyright infringement issue https://appleinsider.com/articles/22/02/19/google-drive-users-stung-by-macos-dsstore-copyright-infringement-issue?utm_medium=rss Google Drive users stung by macOS x DS Store x copyright infringement issueGoogle Drive is causing problems for some macOS users as the ubiquitous DS Store files are being misinterpreted by the cloud storage service as documents that infringe copyright Users of Google Drive can potentially receive an email warning that a file of theirs violates Google Drive s Terms of Service specifically its copyright infringement policy However it appears that Google s automated file scanning system has deemed a fairly common file as a false positive In posts to Reddit as reported by Bleeping Computer the system is being tripped up by DS Store Specific to macOS DS Store holds custom attributes relating to the folder it is contained within Read more 2022-02-19 22:35:23
Apple AppleInsider - Frontpage News Roblox players face hours of downtime over the long weekend https://appleinsider.com/articles/22/02/19/roblox-players-face-hours-of-downtime-over-the-long-weekend?utm_medium=rss Roblox players face hours of downtime over the long weekendChild focused game and creation platform Roblox has gone offline with a major outage preventing its sizable player base from getting into the game in the middle of a long Presidents Day weekend On Saturday many systems that make up Roblox went down For players the vast majority were not able to get into the game at all while Twitter reports indicate some were able to play but that the game was extremely slow The developers know about the outages the official Roblox status page indicates with a Service Disruption message stating We are aware of the issues with accessing Roblox Our team is actively working on it Read more 2022-02-19 22:42:56
金融 ニュース - 保険市場TIMES チューリッヒ、栃木銀行と提携しテレマーケティングで保険商品の案内開始 https://www.hokende.com/news/blog/entry/2022/02/20/080000 2022-02-20 08:00:00
ニュース @日本経済新聞 電子版 航空、世界で200社創業 コロナ禍で人員・機材割安に https://t.co/lUU4lkNigE https://twitter.com/nikkei/statuses/1495160430313938945 航空 2022-02-19 22:16:39
ニュース BBC News - Home Covid isolation laws set to end in England https://www.bbc.co.uk/news/uk-60446908?at_medium=RSS&at_campaign=KARANGA englandboris 2022-02-19 22:30:05
ニュース BBC News - Home Ukraine: Russia plans biggest war in Europe since 1945 - Boris Johnson https://www.bbc.co.uk/news/uk-politics-60448162?at_medium=RSS&at_campaign=KARANGA boris 2022-02-19 22:49:51
ニュース BBC News - Home Storm Eunice: Power cuts continue amid new yellow warnings https://www.bbc.co.uk/news/uk-60442797?at_medium=RSS&at_campaign=KARANGA wales 2022-02-19 22:10:34
ニュース BBC News - Home Canada protests: Police push back demonstrators in Ottawa https://www.bbc.co.uk/news/world-us-canada-60420469?at_medium=RSS&at_campaign=KARANGA capital 2022-02-19 22:22:36
ニュース BBC News - Home Ferry fire: Search for 12 missing off Corfu continues https://www.bbc.co.uk/news/world-europe-60443517?at_medium=RSS&at_campaign=KARANGA drivers 2022-02-19 22:29:58
ニュース BBC News - Home GB's Jonas jumps three weight classes to win world title https://www.bbc.co.uk/sport/boxing/60436222?at_medium=RSS&at_campaign=KARANGA GB x s Jonas jumps three weight classes to win world titleNatasha Jonas is a world champion at the third time of asking after stopping Christian Namus to win the vacant WBO super welterweight title 2022-02-19 22:42:34
ビジネス ダイヤモンド・オンライン - 新着記事 アウトソーシング(2427)、2期連続「増配」を発表し、 配当利回り3.3%に! 年間配当は2年で4.5倍に急増、 2022年12月期は前期比14円増の「1株あたり45円」に - 配当【増配・減配】最新ニュース! https://diamond.jp/articles/-/296898 アウトソーシング、期連続「増配」を発表し、配当利回りに年間配当は年で倍に急増、年月期は前期比円増の「株あたり円」に配当【増配・減配】最新ニュースアウトソーシングが期連続の「増配」を発表し、配当利回りがにアウトソーシングは年月期の配当予想を「株あたり円」と発表し、前期比「円」の増配で「期連続増配」の見通しとなった。 2022-02-20 08:00:00
北海道 北海道新聞 サンプドリア吉田はベンチ外 イタリア1部、チームは勝利 https://www.hokkaido-np.co.jp/article/647879/ 負傷 2022-02-20 07:13:00
北海道 北海道新聞 奥川が今季8ゴール目 ドイツ1部、勝利に貢献 https://www.hokkaido-np.co.jp/article/647880/ 貢献 2022-02-20 07:13:00

コメント

このブログの人気の投稿

投稿時間: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件)