海外TECH |
Ars Technica |
Producer: Star Trek: Strange New Worlds will connect to a famous wrathful villain |
https://arstechnica.com/?p=1831036
|
paramount |
2022-02-02 21:44:40 |
海外TECH |
MakeUseOf |
Uber Suffered Major Breaches: Take These Steps to Secure Your Account Now |
https://www.makeuseof.com/uber-breaches-steps-secure-account/
|
Uber Suffered Major Breaches Take These Steps to Secure Your Account NowThe popular ride sharing app has suffered numerous data breaches in the past So how can you keep your Uber account and data safe |
2022-02-02 22:00:12 |
海外TECH |
MakeUseOf |
The 9 Best Ways to Use Google Workspace Apps for HR Management |
https://www.makeuseof.com/best-ways-to-use-google-workspace-for-hr-management/
|
google |
2022-02-02 21:45:12 |
海外TECH |
MakeUseOf |
The 8 Best Android Video Chat Apps |
https://www.makeuseof.com/android-video-chat-apps/
|
android |
2022-02-02 21:30:12 |
海外TECH |
MakeUseOf |
How to Convert Date and Time to Numbers in Google Sheets |
https://www.makeuseof.com/how-to-convert-date-time-to-numbers-google-sheets/
|
hours |
2022-02-02 21:15:12 |
海外TECH |
DEV Community |
ToDo APP |
https://dev.to/dever404/todo-app-54ee
|
ToDo APPCheck my new app using reactjs and tailwindcssI am a beginner in reactjs and I need your feedback |
2022-02-02 21:30:05 |
海外TECH |
DEV Community |
Blues Wireless - Just Like React, but For IoT |
https://dev.to/blues/blues-wireless-just-like-react-but-for-iot-4eah
|
Blues Wireless Just Like React but For IoTWelcome to the start of a new blog series where I ll attempt to show other people with web development backgrounds like my own just how simple Internet of Things IoT development can be with the help of the right tools like Blues Wireless How you ask Why by using an analogy many web developers are familiar with comparing the unfamiliar IoT and hardware to the familiar JavaScript and the web In this first post I ll be showing how Blues Wireless makes getting started with IoT development easier in the same way that popular JavaScript frameworks like React make building websites easier Two different pieces of tech solving for the same sorts of problemsIt might not be immediately obvious but React and Blues Wireless actually have a lot in common While neither is absolutely essential to building tech today there s no reason not to use them both make the process infinitely easier Let s face it most of the time the hardest part of anything is getting started Whether it s a blank IDE staring at you as you gaze at your keyboard willing the code to appear or an IoT connected device but no path to get the data from the real world where it originates to your virtual world where it will be useful It s the worst but that s where these two seemingly unrelated pieces of tech converge For websites it s JS frameworks to the rescueTo get you started JavaScript frameworks like React Vue Angular and Svelte all have simple templates to give devs a starting point and let them get over that first hurdle of getting something anything in the browser Once that s been accomplished developers are free to focus on the more important and fun stuff solving business problems and building useful tools and less on if the server s running on the right port the code s compiling or they ve correctly bound event handlers to clicks in the DOM React s quick start template Create React App It takes care of the hard stuff so we can get to fun stuff faster For IoT it s Blues Wireless and its device to cloud data pumpBlues Wireless does the same thing just for Internet of Things engineers and especially the ones who know that where their hardware is going reliable Internet connectivity is not just not a guarantee it might not even be an option Instead of learning the archaic language of AT commands negotiating exorbitant fees with cellular companies to transmit data to the cloud and figuring out how to turn that cryptic cloud data into something useful Blues takes care of all of that for you Just buy a Notecard attach it to a Notecarrier issue a few simple JSON commands and you re ready to roll It just works This is a simple diagram showing the flow of data from a Blues Wireless Notecard in the field to the Blues Wireless Notehub cloud Again development made easier No Really Blues Wireless Just WorksIf you re like me you re rolling your eyes right now after that last sentence I get it I too would think what I m saying is too good to be true But it s not Let me list my lack of IoT qualifications when I joined Blues Wireless When I started I Did not own a Raspberry Pi Did not know what a breadboard was Could not write much less debug Arduino code After working at Blues Wireless for close to months I still can t write or debug Arduino code Yet despite this within weeks of starting I built a fully functional asset tracker This little guy collects GPS and temperature data sends that data to the Blues Wireless cloud Notehub and Notehub pumps that data to the low code IoT platform Datacake where it decodes the data and displays it With the help of the detailed asset tracking documentation on the Blues developer site in less than minutes I d configured a Notecarrier AF equipped it with a Notecard to record its GPS coordinates temperature and motion data at an interval of once an hour and pumped that data in an easy to understand JSON data object to a project I d set up in the Blues Notehub cloud Behold my asset tracker in all its glory a Notecard Notecarrier and LiPo battery This is the Notehub dashboard The Asset Tracker project in the center is where all my sensor data was sent to In another minutes I had my data in Notehub being sent to the Datacake platform still in readable JSON format and being interpreted to display the relevant GPS coordinates on a map These are two of the widgets I put on my Datacake dashboard the map plotting my course over time and the temperature tracker Some of the fields I was setting from the JSON being delivered to Datacake via Notehub The Datacake HTTP payload decoder which took in the raw JSON from Notehub and assigned the correct pieces of info to the fields I d defined in the image above The single URL link I added to my Notehub project so it knew which data files to send to my Datacake dashboard The best part about all this Notehub doesn t just work with Datacake It works with and has documentation to connect to all the most popular cloud platforms AWS IoT AnalyticsGoogle Cloud PlatformAzurePlus lots of low code IoT platforms too UbidotsThingSpeakInitialStateOnce that sensor data is in Notehub it s simple to send it anywhere else And once it s anywhere else just hook into that platform like you would with any other third party API service providing data Easy peasy Just look at all the possible cloud providers Blues Wireless has provided routing tutorials for to get the data out of Notehub and to your app How does this relate to React Again I ll admit this post is much more about the IoT side of things than in depth look at web development but I m operating under the assumption that if you re reading this you re already fairly familiar with JavaScript React and the web development world What I m trying to do is connect the dots React makes web development easier and Blues Wireless makes IoT development easier Could I have set up this neat little asset tracker myself without Blues Wireless Yes probably Would it have taken me an exponentially longer time and probably turned into such a frustrating landmine strewn obstacle course that I very well might have quit before achieving my goal Also yes quite likely Just like with JavaScript I could spend a lot of time on the unfun nitty gritty details that JS frameworks take care of for me but why would I Why spend time and energy on things already solved for in these frameworks when I could spend that same time building cool useful stuff instead And the same can now be said of IoT prototyping and development Spend time on the low level details or choose Blues Wireless solutions and get to building the cool useful stuff a whole lot sooner I m sold Are you Where to go from HereIf you re ready to get started with your own IoT project I recommend you check out our Getting Started documentation on our developer experience site It s what I used to get up and running with my project in no time at all What s Next Stay tuned for the next installment in this series I plan to show you how to send data from Notehub to a cloud provider and then display it in your own React app with D We are developers after all building cool data visualizations is fun |
2022-02-02 21:29:41 |
海外TECH |
DEV Community |
Decoupling the logic from the UI in React using the BLoC pattern |
https://dev.to/jbaez/decoupling-the-logic-from-the-ui-in-react-using-the-bloc-pattern-41e6
|
Decoupling the logic from the UI in React using the BLoC patternSoftware evolves and changes in time and sooner or later this means that the library or framework used for the UI could be changed as well The amount of work and refactoring needed when switching to another UI library or framework depends on how hard coupled is the code and business logic to it Writing React functional components can be fast and convenient using hooks for the local state business logic etc There are even libraries that makes it easier to write tests for our components where the logic of the component can be tested However if in the future we were to change to another library we would need to completely refactor all the components and the tests spending more time on it than if we had the logic separated from the UI in this case the React functional component In this article I show one way of decoupling the logic from the UI using React functional components and MobX Introduction to BLoC pattern BLoC stands for Business Logic Component and was introduced by Google on the DartConf The initial idea behind the BLoC pattern was to decouple the business logic from the component so it could be reused between Flutter and Angular Dart The idea of separation of concerns between the view and it s logic has been around for many years with other patterns like for example MVC Model View Controller MVP Model View Presenter and MVVM Model View View Model BLoC would be the equivalent to the Controller in MVC Presenter in MVP and View Model in MVVM For a component based library like React we would be using BLoC as the pattern for separating the business logic from the component UI Some of the benefits that we would achieve by using this pattern are Better testabilityIt s easier to write tests only for the business logic of the component Also it s great for TDD Components and screens logic become UI library framework agnosticSwitching libraries becomes so much easier Reuse the BLoC in different componentsA BLoC could be reused in components that share the same logic but have a different UI not only for Web but also for React Native Extend the BLoC for similar componentsBLoCs could extend other BLoCs that share the same base logic but add more features Cleaner codeThe BLoC contains all the business logic and the Functional Component is only responsible of UI logic like adding removing CSS classes conditionally rendering elements subscribing to events and notifying the BLoC etc Which makes the component more readable and thinner specially on components with more complex business logic Implementing the BLoC pattern with MobXMobX is a state management library that brings nonintrusive and transparent reactive functional programming to a standard JavaScript class What this means is that when applied to normal JavaScript Classes it makes properties and functions reactive without changing the way they are used This is great because it means that all the business logic is in a normal JavaScript class and the coupling to MobX is loose allowing for an easier change of library if needed in the future MobX has bindings for the most popular libraries frameworks like React Vue Angular and Preact so switching between any these libraries in the UI would not require any change in the BLoC The basic concepts of MobX are observable Holds and tracks a state value and informs of any change to it s subscriberscomputed Returns a derived value from other states which are being tracked so it can automatically recompute and inform of changes to it s subscribersactions Used to update the observables state observer Subscribes the Component to the observables and computed in the BLoC making it rerender on a change The BLoC holds all the logic properties and state of the component The component sends events to the BLoC by calling a method that would be normally internally configured as action if the method changes the state and gets notified of changes through the component s observer that is subscribed to the BLoC s observables and computed properties that hold the state MobX has more advanced features like reactions which are basically subscriptions to observables or computed that can be useful for components or screens with more complex business logic Installing MobXInstalling MobX requires libraries the mobx library which it s used in the BLoC to setup the observables computed actions etc and the UI bindings library that glues the BLoC to the component which in this case since we are using functional components would be mobx react lite npm i mobx mobx react lite Using BLoC with React hooksWith this pattern we want the BLoC object to be instantiated and kept durning the life of the component updated on a rerender or re created and disposed automatically if needed of any subscriptions timers references etc when the component it s unmounted For this we can use the useBloc custom hook that I have published as a NPM package To install it npm i use blocIt has parameters First the BLoC constructorSecond the BLoC parameters props Third an optional array of properties from the params that will re create the BLoC This will normally be params that are used for the state ExampleLet s create a simple Checkbox component that has an isChecked state an optional label with some text to show and an optional onChange callback For this example we would be using TypeScript Apart from the libraries mentioned above it uses BlocInterface with the optional methods that useBloc expects BlocInterface bloc interface d ts type BlocInterface lt P gt dispose gt void updateParams params P gt void amp object It also uses a global TypeScript generic type for defining the default properties Global types global d ts From TypeScript globals md Returns the optional keys of T as a union of string literalsdeclare type OptionalKeys lt T gt Exclude lt K in keyof T T extends Record lt K T K gt never K keyof T undefined gt Makes all optional properties in T requireddeclare type OptionalParams lt T gt Required lt Pick lt T OptionalKeys lt T gt gt gt Returns a Readonly type with all optional properties in T requireddeclare type OptionalDefaults lt T gt Readonly lt OptionalParams lt T gt gt Returns a Readonly type with all optional properties in T required excluding keys from Kdeclare type OptionalDefaultsPartial lt T K extends keyof T gt Omit lt OptionalDefaults lt T gt K gt BLoC checkbox bloc ts import action makeObservable observable from mobx import BlocInterface from bloc interface type OnChange checked boolean gt void export interface CheckboxParams checked boolean label string onChange OnChange const defaults OptionalDefaultsPartial lt CheckboxParams onChange gt checked false label class CheckboxBloc implements BlocInterface lt CheckboxParams gt isChecked boolean label string defaults label onChange OnChange constructor params CheckboxParams this isChecked params checked defaults checked this updateParams params makeObservable this isChecked observable setChecked action updateParams params CheckboxParams this label params label defaults label this onChange params onChange setChecked checked boolean this isChecked checked if this onChange this onChange checked export default CheckboxBloc Component checkbox tsx import React from react import CheckboxBloc CheckboxParams from checkbox bloc import useBloc from use bloc import observer from mobx react lite const Checkbox observer props CheckboxParams gt const bloc useBloc CheckboxBloc props checked return lt label gt lt input type checkbox checked bloc isChecked onChange e gt bloc setChecked e target checked gt bloc label lt label gt export default Checkbox As we can see the Checkbox component is wrapped into an observer effectively subscribing the component to the observable and computed changes which would cause a rerender The isChecked observable state from the bloc instance is passed into the input checked attribute When the onChange event is triggered it calls the setChecked action in the bloc with the new value which updates the isChecked observable causing the Checkbox component to rerender updating the checked attribute A change to the label prop would also cause a rerender and useBloc would call updateParams in the CheckboxBloc s instance updating it s label property from the updated props so when the JSX is built it would use the updated label from the bloc instance If the checked prop is updated it would also cause a rerender but since this prop was used in the rd parameter of useBloc it would cause the CheckboxBloc instance to be re created with the new checked value ConclusionsDecoupling the business logic from the component might seem like extra work and additional libraries to install and learn but the benefits in the long run are usually greater I find that MobX simplifies the implementation of the BLoC pattern making the state of the component reactive by just calling one method The learning curve is easy as it s just a few concepts to understand It s great for TDD when defining the BLoC behaviour as you don t need to think about the component UI structure before writing the test only the required behaviour |
2022-02-02 21:05:43 |
海外TECH |
Engadget |
A new competitor to AppleCare offers cheaper insurance for smartphones |
https://www.engadget.com/zagg-phone-protection-plan-applecare-alternative-215635273.html?src=rss
|
A new competitor to AppleCare offers cheaper insurance for smartphonesGiven the steep costs it s easy to see why some customers forgo AppleCare Preferred Care or similar protection plans Dropping your phone down a stairwell or spilling liquid on it is no longer the end of the world the newest devices are more resilient But accidents still happen and an out of warranty fix can set you back several hundred dollars As an alternative Zagg a smartphone case company unveiled a plan this week that covers repairs on most mobile devices for a year Zagg Protect includes a deductible which you will need to pay any time you take it in for repairs It covers both accidents and internal failures including cracked screens liquid damage battery failure power failures and more nbsp But the third party plan is still much cheaper than other such device protection plans such as AppleCare and Samsung Care Plus Samsung offers one year of Samsung Care Plus for free after you purchase your device after that the cost ranges anywhere from to per month Even with that plan a cracked screen for any Samsung mobile phone will set you back The free year of AppleCare that comes with any new iPhone is extremely limited and essentially only covers malfunctions that are the manufacturer s fault Two years of AppleCare which offers screen repairs on most iPhones for and other accidents for can still set you back anywhere between to for the latest models While Zagg s plan is significantly more extensive than most it s not unlimited The coverage only covers two repairs per month period You can also only use the plan at a list of authorized repair providers Finally the plan only covers repairs up to and requires that you use a phone case Is a protection plan for phone repairs worth it Thanks to the right to repair movement consumers can opt for cheaper options like third party repair shops and self repair kits While it s harder nowadays to completely obliterate your phone see this video of a still functioning iPhone X found in the bottom of a river any eventual mishap can pose a serious annoyance to your daily life nbsp That device that most of us carry on our person at all times became our credit card transportation access and vaccine passport not to mention our sole means of contacting other humans All told whether or not you cough up the extra bucks for AppleCare or another protection plan like Zagg largely depends on your lifestyle as well as how often you plan to upgrade |
2022-02-02 21:56:35 |
海外TECH |
Engadget |
Watch the 'Gran Turismo 7' State of Play here at 5PM ET |
https://www.engadget.com/gran-turismo-7-state-of-play-how-to-watch-211328268.html?src=rss
|
Watch the x Gran Turismo x State of Play here at PM ETPlayStation has a busy few weeks ahead with both Horizon Forbidden West and Gran Turismo both set to arrive by the beginning of March Sony Interactive Entertainment has previewed Horizon Forbidden West nbsp extensively over the last several months and now it s time for a deep dive into Polyphony Digital s racing game in the latest State of Play showcase Sony will show off a little over minutes worth of new Gran Turismo PS footage and details about the modes and features Don t expect to learn too much if anything about other PlayStation titles in the pipeline though I m holding out hope for a teaser for HBO s The Last of Us series You can watch the Gran Turismo focused State of Play below at PM ET Gran Turismo is coming to PS and PS on March th |
2022-02-02 21:13:28 |
ニュース |
BBC News - Home |
NI Protocol: Irish Sea border checks ordered to end at midnight |
https://www.bbc.co.uk/news/uk-northern-ireland-60236169?at_medium=RSS&at_campaign=KARANGA
|
advice |
2022-02-02 21:38:49 |
ニュース |
BBC News - Home |
Four charged in drug death of The Wire actor Michael K Williams |
https://www.bbc.co.uk/news/world-us-canada-60238194?at_medium=RSS&at_campaign=KARANGA
|
overdose |
2022-02-02 21:20:38 |
ニュース |
BBC News - Home |
Holders Chelsea beat Man Utd to reach third successive Continental League Cup final |
https://www.bbc.co.uk/sport/football/60215061?at_medium=RSS&at_campaign=KARANGA
|
Holders Chelsea beat Man Utd to reach third successive Continental League Cup finalHolders Chelsea see off Manchester United in the semi finals of the Women s Continental League Cup to maintain their challenge of a third successive title |
2022-02-02 21:12:35 |
ニュース |
BBC News - Home |
Mane helps Senegal reach Afcon final with win over Burkina Faso |
https://www.bbc.co.uk/sport/football/60135796?at_medium=RSS&at_campaign=KARANGA
|
Mane helps Senegal reach Afcon final with win over Burkina FasoSenegal are through to their third Africa Cup of Nations final after three second half goals including one from Sadio Mane gives them victory over Burkina Faso |
2022-02-02 21:33:21 |
ニュース |
BBC News - Home |
Celtic replace Rangers at top after comfortable derby win |
https://www.bbc.co.uk/sport/football/60135789?at_medium=RSS&at_campaign=KARANGA
|
Celtic replace Rangers at top after comfortable derby winCeltic storm to the Scottish Premiership summit at the expense of a shell shocked Rangers after a monumental Old Firm victory ends their rivals recent derby dominance |
2022-02-02 21:39:34 |
ビジネス |
東洋経済オンライン |
AMGの電動車「EQS53」乗ってわかった破格の実力 走りは強烈かつ滑らか、ただし情緒はいま一歩 | 電動化 | 東洋経済オンライン |
https://toyokeizai.net/articles/-/505475?utm_source=rss&utm_medium=http&utm_campaign=link_back
|
世界初公開 |
2022-02-03 06:30:00 |
Azure |
Azure の更新情報 |
General Availability: The Azure Sphere OS 22.01 release is cancelled |
https://azure.microsoft.com/ja-jp/updates/general-availability-the-azure-sphere-os-2201-release-is-cancelled/
|
azure |
2022-02-02 21:21:36 |
海外TECH |
reddit |
Getting Exorcism in Japan |
https://www.reddit.com/r/japanlife/comments/sizsxc/getting_exorcism_in_japan/
|
|
2022-02-02 21:02:26 |
コメント
コメントを投稿