IT |
気になる、記になる… |
画像生成AI『Adobe Firefly』のWeb版、日本語に対応 |
https://taisy0.com/2023/07/12/174058.html
|
adobe |
2023-07-12 13:56:32 |
AWS |
AWS Architecture Blog |
IBM Consulting creates innovative AWS solutions in French Hackathon |
https://aws.amazon.com/blogs/architecture/ibm-consulting-creates-innovative-aws-solutions-in-french-hackathon/
|
IBM Consulting creates innovative AWS solutions in French HackathonIn March IBM Consulting delivered an Innovation Hackathon in France aimed at designing and building new innovative solutions for real customer use cases using the AWS Cloud In this post we briefly explore six of the solutions considered and demonstrate the AWS architectures created and implemented during the Hackathon Hackathon solutions Solution Optimize … |
2023-07-12 13:05:15 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
Demucs v4の簡単インストーラ |
https://qiita.com/rynan4818/items/027fcad54d3fea3e4b31
|
beatsaber |
2023-07-12 22:48:06 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
【AWS】DBSに合格しました |
https://qiita.com/nobkovskii/items/29c1845b311308759f0e
|
専門知識 |
2023-07-12 22:18:51 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
【備忘録】AWSのサブネットのIPとサブネットマスクについて |
https://qiita.com/tkms13/items/4867687aa0ac4ee9fffe
|
過程 |
2023-07-12 22:18:33 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
AWSで負荷テストを試した(Distributed Load Testing on AWS) |
https://qiita.com/sekijum/items/9a1b998b0c140d34da47
|
distributedlo |
2023-07-12 22:10:34 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
Go言語でDockerで立てたPostgreSQLを操作してみた |
https://qiita.com/RYO_/items/b55f8dcbc03bb5016b93
|
dockerc |
2023-07-12 22:58:22 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
Rust+Hyper |
https://qiita.com/manymanyuni/items/85ca8c642b78a7181baa
|
estdenvusestdnetsocketadd |
2023-07-12 22:46:08 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
Harborからイメージをpullしてkubernetesクラスタにデプロイしてみる |
https://qiita.com/ohtsuka-shota/items/3fdfeb2c3efa8cf79829
|
django |
2023-07-12 22:07:03 |
golang |
Goタグが付けられた新着投稿 - Qiita |
Go言語でDockerで立てたPostgreSQLを操作してみた |
https://qiita.com/RYO_/items/b55f8dcbc03bb5016b93
|
dockerc |
2023-07-12 22:58:22 |
golang |
Goタグが付けられた新着投稿 - Qiita |
【備忘録】Go言語フレームワークechoを使ってAPIサーバーを構築する |
https://qiita.com/resu_opserli/items/5b89711a4075e9a941fe
|
週間 |
2023-07-12 22:42:36 |
海外TECH |
MakeUseOf |
How to Password Protect Your USB Drive: 7 Easy Ways |
https://www.makeuseof.com/tag/how-to-password-protect-your-usb-stick-3-easy-ways/
|
password |
2023-07-12 13:30:17 |
海外TECH |
MakeUseOf |
Best Prime Day Laptop Deals: Save Big On a New Laptop |
https://www.makeuseof.com/best-amazon-prime-day-laptop-deals/
|
deals |
2023-07-12 13:20:44 |
海外TECH |
MakeUseOf |
How to Find and Manage Your TikTok Favorites |
https://www.makeuseof.com/how-to-find-and-manage-tiktok-favorites/
|
tiktok |
2023-07-12 13:15:17 |
海外TECH |
DEV Community |
Health and Fruit |
https://dev.to/elitesuper/health-and-fruit-3hm6
|
Health and FruitWhen it comes to fruits there are several options that offer great health benefits and nutrition Here are some popular fruits and their benefits Apples Rich in fiber antioxidants and vitamin C They can help improve heart health and digestion Bananas High in potassium vitamin C and vitamin B They support heart health aid digestion and provide energy Berries such as blueberries strawberries and raspberries Packed with antioxidants fiber and vitamins They can boost brain health support the immune system and improve heart health Oranges A great source of vitamin C folate and antioxidants They help boost immunity aid in collagen production and support heart health Kiwis High in vitamin C vitamin K and fiber They promote digestion boost the immune system and support skin health Avocados While technically a fruit avocados are rich in healthy fats fiber and vitamins They support heart health aid in weight management and provide various nutrients Grapes Contain antioxidants vitamins and minerals They promote heart health support brain function and may have anti aging effects Pineapple Rich in vitamin C manganese and bromelain an enzyme It aids digestion supports immune function and has anti inflammatory properties It s important to note that while fruits offer numerous health benefits individual reactions can vary Some people may have allergies or sensitivities to certain fruits Additionally consuming excessive amounts of certain fruits can lead to digestive issues or blood sugar spikes in some individuals Moderation and variety are key for a balanced diet |
2023-07-12 13:40:23 |
海外TECH |
DEV Community |
Exploring ERC20 Tokens: The Powerhouse Behind Ethereum's Tokenized World4 |
https://dev.to/sahil_4555/exploring-erc20-tokens-the-powerhouse-behind-ethereums-tokenized-world4-emj
|
Exploring ERC Tokens The Powerhouse Behind Ethereum x s Tokenized WorldTokens used to refer to small insignificant objects like transportation or arcade game tokens But now with blockchain technology tokens have a new meaning They represent assets currency or access rights and are not limited to specific places Blockchain tokens can be used globally and have multiple functions They can also be easily traded on global markets In this chapter we will learn about how tokens are created and used We will also discuss important characteristics of tokens like how they can be exchanged with each other and their inherent value Lastly we will explore the standards and technologies behind tokens and even try creating our own How Token Are UsedTokens have many different uses not just as a digital currency They can do multiple things at the same time Here are some examples Currency Tokens can be used like money for buying and selling things Resource Tokens can represent things you earn or produce in a sharing economy For example tokens could show how much storage or computer power you have to share with others Asset Tokens can show that you own something valuable like gold real estate or even a virtual item in a video game Access Tokens can give you permission to use something like a special website a discussion forum a hotel room or a rental car Equity Tokens can show that you have a share of a digital organization or a regular company Voting Tokens can let you take part in making decisions in a digital system or in a legal system Collectible Tokens can be special digital or physical items that people like to collect such as unique digital artwork or rare physical objects Identity Tokens can show who you are in the digital world or in the real world It could be a picture or an official ID card Attestation Tokens can be proof that something is true like a certificate or a degree from a college Utility Tokens can be used to get access to a specific service or to pay for it Sometimes one token can do many of these things together It can be hard to tell them apart because in the physical world they are usually connected But in the digital world we can separate them and make them work independently For example we can have a token that proves something without showing who you are Tokens amp FungibilityFungibility refers to the ability to interchange individual units of a token without any difference in value or function Tokens are considered fungible when each unit can be substituted with another unit However if a token s historical origin can be traced it may not be entirely fungible The ability to track the origin can lead to actions like blacklisting or whitelisting which reduces or eliminates fungibility Non fungible tokens NFTs are different because each token represents a unique item whether tangible or intangible For instance a token representing ownership of a specific Van Gogh painting is not the same as a token representing a Picasso painting even if they are part of the same art ownership token system Similarly a token representing a specific digital collectible like a CryptoKitty is not interchangeable with other CryptoKitties Each non fungible token has a unique identifier such as a serial number to differentiate it from others Fungibility refers to the property of a good or asset where its individual units are essentially interchangeable and indistinguishable from one another In simple terms it means that each unit of the item is the same as any other unit For example traditional currencies like dollars or euros are fungible If you have a bill you can exchange it for another bill and they hold the same value and function Non fungibility on the other hand refers to the uniqueness and non interchangeability of individual units of a particular item Each unit is distinct and cannot be substituted for another unit without differences in value or characteristics A common example of non fungible items are collectibles such as trading cards or rare coins Each trading card or coin has unique features or attributes that make it different from others making them non fungible Counterparty RiskCounterparty risk means the risk that the other party involved in a transaction won t fulfill their obligations Sometimes transactions involve more than two parties which increases this risk For instance if you sell a certificate of deposit for a precious metal there are three parties involved the seller the buyer and the custodian who holds the metal The custodian s involvement adds extra risk because they have control over the physical asset When assets are traded using ownership tokens there s also a risk related to the custodian It s important to know if they actually have the asset and if they ll recognize the token transfer as a valid ownership transfer Whether in the digital or physical world understanding who holds the underlying asset and the rules that apply to it is crucial Tokens and IntrinsicalityThe word intrinsic derives from the Latin intra meaning from within Some tokens represent digital items that are inherent to the blockchain itself These assets are governed by the consensus rules of the blockchain meaning that there is no additional counterparty risk involved For example if you own the private keys to a CryptoKitty you directly own the digital asset without relying on any other party The ownership is determined by the blockchain s rules and there is no intermediary involved Consensus rules are a set of agreed upon rules in a blockchain network that determine how transactions are approved and added to the blockchain These rules ensure that everyone in the network agrees on which transactions are valid and in what order they should be recorded On the other hand many tokens are used to represent external assets like real estate voting shares trademarks or gold bars The ownership of these assets is governed by laws customs and policies outside the blockchain This means that token issuers and owners may still rely on traditional legal contracts and systems These external assets carry additional counterparty risk because they are held by custodians recorded in external registries or subject to laws and policies beyond the blockchain One significant benefit of blockchain based tokens is the potential to convert external assets into intrinsic assets thereby eliminating counterparty risk For example transitioning from equity in a traditional corporation external to an equity or voting token in a decentralized autonomous organization DAO intrinsic removes the need for intermediaries and reduces counterparty risk Using Tokens Utility or EquityNot all projects necessarily require tokens and there are potential disadvantages to their use While the idea of tokenizing everything may sound appealing practical limitations exist when integrating blockchain platforms like Ethereum into existing societal structures Let s clarify the role of tokens in new projects Most projects use tokens in two main ways utility tokens and equity tokens although these roles are often mixed up Utility tokens are used to gain access to specific services applications or resources For instance they might be required to use shared storage or access social media networks Equity tokens represent ownership or control in something like a startup They can range from shares that don t have voting rights but allow for dividends to voting shares in a decentralized organization where token holders have a say in decision making In summary while tokens have utility and equity roles in projects not all projects require tokens The integration of blockchain platforms has limitations in their practical applicability within existing structures It s A DuckMany startups face a problem they want to use tokens to raise funds but offering equity to the public is regulated in most places To work around this some startups try to call their equity tokens utility tokens and present them as service access vouchers However it s unclear if regulators will accept this strategy There s a saying If something looks and sounds like a duck it probably is a duck Regulators are unlikely to be fooled by these word games They may see these attempts as trying to deceive the public by pretending the tokens are something they re not Tokens on EthereumTokens existed before Ethereum including the first blockchain currency Bitcoin Other token platforms were also built on different cryptocurrencies However Ethereum introduced the first token standard which led to a huge increase in token creation Vitalik Buterin one of Ethereum s founders saw tokens as a valuable use of a programmable blockchain like Ethereum In the early days it was common to see Vitalik and others wearing T shirts with the Ethereum logo and an example of a smart contract on the back often showcasing a token implementation On Ethereum tokens work differently from the native cryptocurrency called ether The Ethereum protocol doesn t have built in support for tokens While sending ether is a basic function of Ethereum tokens require the use of smart contracts Smart contracts handle ownership transfers and access rights for tokens To create a new token on Ethereum a new smart contract needs to be developed and deployed The smart contract defines how the token functions It s generally recommended to follow existing token standards for compatibility and ease of use We will discuss these standards later in the chapter and explore their benefits and drawbacks The ERC Token StandardThe first token standard on Ethereum was introduced in November by Fabian Vogelsteller as an Ethereum Request for Comments ERC It was given the number and became known as the ERC token Most tokens today are based on this ERC standard ERC is a standard for fungible tokens which means that each unit of the token is interchangeable with others and has no unique properties The ERC standard defines a common interface for token contracts allowing compatible tokens to be accessed and used in the same way It includes a set of required functions and events that every implementation of the standard must have as well as optional functions and attributes that developers can add The required functions and events of an ERC compliant token contract include totalSupply Returns the total number of tokens in existence balanceOf Returns the token balance of a specific address transfer Transfers a certain amount of tokens from the sender s address to another address transferFrom Transfers tokens from one address to another with approval approve Authorizes a specific address to withdraw tokens from the sender s account allowance Returns the remaining amount of tokens that a spender is allowed to withdraw from an owner s account Transfer Event triggered when a transfer of tokens occurs Approval Event logged when an approval is made In addition to these required functions there are optional functions defined by the ERC standard name Returns the human readable name of the token symbol Returns a symbol representing the token decimals Specifies the number of decimal places used for token amounts These functions help ensure compatibility and consistency among ERC tokens Here s what an ERC interface specification looks like in Solidity contract ERC function totalSupply constant returns uint theTotalSupply function balanceOf address owner constant returns uint balance function transfer address to uint value returns bool success function transferFrom address from address to uint value returns bool success function approve address spender uint value returns bool success function allowance address owner address spender constant returns uint remaining event Transfer address indexed from address indexed to uint value event Approval address indexed owner address indexed spender uint value ERC Workflows transfer and approve amp transferFrom The ERC token standard has two transfer functions to support different ways of using tokens The first way is a simple one step process using the transfer function It is commonly used by wallets to send tokens from one wallet to another This is how most token transactions happen For example if Alice wants to send tokens to Bob her wallet sends a transaction to the token contract using the transfer function with Bob s address and tokens as the inputs The token contract then updates the token balances subtracting tokens from Alice s account and adding tokens to Bob s account It also records this transfer as a Transfer event The second way is a two step process using the approve and transferFrom functions This method allows token owners to delegate control of their tokens to another address It is often used when a token owner wants to allow a specific contract or entity to distribute their tokens For example during an ICO a company may approve a crowdsale contract to distribute tokens to buyers The crowdsale contract can then use the transferFrom function to transfer tokens from the owner s account to each buyer s account These different approaches give flexibility in how tokens are used allowing for direct transfers or delegation of control in specific scenarios like ICOs A Token Sale Event TSE is a way for companies and organizations to raise money by selling digital tokens It is similar to when a company sells shares to investors in a stock exchange which is called an Initial Public Offering IPO However unlike IPOs that have strict rules and regulations TSEs are more open global and not as organized To allow the AliceICO contract to sell AliceCoin tokens Alice follows two steps First she creates the AliceCoin contract and keeps all the AliceCoin tokens for herself Then she creates the AliceICO contract which can sell tokens for ether Now Alice wants to enable the AliceICO contract to sell tokens She sends a special request to the AliceCoin contract telling it to allow the AliceICO contract to sell of all the AliceCoin tokens This request is recorded in an event When someone like Bob buys tokens from the AliceICO contract using ether the contract needs to send AliceCoin tokens to Bob The AliceICO contract has a set rate for converting ether to tokens It uses this rate to calculate how many tokens Bob will receive based on the amount of ether he sends To make the transfer the AliceICO contract uses a special function provided by the AliceCoin contract It specifies Alice as the sender and Bob as the recipient It also includes the calculated number of tokens to transfer This transfer is recorded in an event The AliceICO contract can repeat this process multiple times as long as it doesn t sell more tokens than what Alice approved It can keep track of the available tokens by checking the approved amount In simple terms Alice allows the AliceICO contract to sell her AliceCoin tokens When someone buys tokens the AliceICO contract calculates how many tokens to give based on the amount of ether The tokens are transferred from Alice to the buyer using special functions and the contract can sell tokens as long as it doesn t go over the approved limit Issues with ERC TokensERC tokens have become very popular with many tokens being created for various purposes like crowdfunding and auctions However there are some issues and differences compared to regular ether transactions When you transfer ether you send it directly to someone s address But with ERC tokens the transfers happen within the token contract itself not directly to the recipient s address The token contract keeps track of balances and events So when you transfer tokens no transaction is actually sent to the recipient Instead the recipient s address is added to a list within the token contract This means that the token contract changes but not the recipient s address Some wallets may not show your token balance unless you add the specific token contract to the wallet There are differences between tokens and ether Ether can be sent and received easily but tokens need special functions like transfer or approve amp transferFrom that exist only in the ERC contract These token transfers don t trigger any actions in the recipient s contract It can be confusing because tokens are meant to function like cryptocurrencies but they have these differences Another issue is that even when you want to send tokens you still need to have some ether to pay for transaction fees Tokens cannot be used to directly pay for fees and the token contract can t pay for fees on your behalf This can create confusion especially if you didn t realize you needed ether to send tokens These issues are specific to ERC tokens and can be challenging to handle They may require changes to the token interface or even to the Ethereum network itself Some issues may not have a perfect solution so user interfaces may need to be designed to make things easier and provide a consistent experience for users ERC A Proposed Token Contract Interface StandardThe ERC proposal addresses the issue of accidentally sending tokens to contracts that may not support them It does this by checking whether the destination address is a contract or not In ERC contracts that want to receive tokens must have a function called tokenFallback implemented If the recipient of a token transfer is a contract and it doesn t have support for tokens meaning it doesn t have the tokenFallback function the transfer will fail This helps prevent tokens from being lost or stuck in contracts that cannot handle them properly The ERC contract interface specification is interface ERCToken uint public totalSupply function balanceOf address who public view returns uint function name public view returns string name function symbol public view returns string symbol function decimals public view returns uint decimals function totalSupply public view returns uint supply function transfer address to uint value public returns bool ok function transfer address to uint value bytes data public returns bool ok function transfer address to uint value bytes data string custom fallback public returns bool ok event Transfer address indexed from address indexed to uint value bytes indexed data ERC is not widely implemented and there is some debate in the ERC discussion thread about backward compatibility and trade offs between implementing changes at the contract interface level versus the user interface ERC A Proposed Token Contract Interface StandardERC is a proposal to make token contracts better It has a few goals It works with existing ERC tokens so they can still be used Tokens can be sent using a send function just like how we send ether It can be registered with ERC which helps keep track of token contracts Contracts and addresses can decide which tokens to send using a special function called tokensToSend Contracts and addresses can know when they receive tokens by having a function called tokensReceived This prevents tokens from getting stuck in contracts Existing contracts can use proxy contracts for the special token functions It doesn t matter if tokens are sent to a contract or a regular address it works the same way There are specific events for creating and destroying tokens so we can keep track of what happens to them Trusted third parties called operators can move tokens for token holders Extra information can be added to token transactions using special fields called userData and operatorData In simple terms ERC aims to improve token contracts by making them work better with existing tokens allowing easier token transfers giving more control over tokens and adding useful features like events and extra transaction information The ERC contract interface specification is interface ERCToken function name public constant returns string function symbol public constant returns string function totalSupply public constant returns uint function granularity public constant returns uint function balanceOf address owner public constant returns uint function send address to uint amount bytes userData public function authorizeOperator address operator public function revokeOperator address operator public function isOperatorFor address operator address tokenHolder public constant returns bool function operatorSend address from address to uint amount bytes userData bytes operatorData public event Sent address indexed operator address indexed from address indexed to uint amount bytes userData bytes operatorData event Minted address indexed operator address indexed to uint amount bytes operatorData event Burned address indexed operator address indexed from uint amount bytes userData bytes operatorData event AuthorizedOperator address indexed operator address indexed tokenHolder event RevokedOperator address indexed operator address indexed tokenHolder Using Token StandardsIn the previous section we discussed various proposed and widely used standards for token contracts Now let s explore what these standards do whether you should use them how to use them and if you should add extra functionality beyond these standards We will also consider which standards to use What Are Token Standards What Is Their Purpose Token standards provide a set of rules that token contracts must follow For example the ERC standard specifies the functions and behavior a token contract should have You can also add extra features if you want The main purpose of these standards is to make different contracts work together smoothly Wallets exchanges and other tools can easily interact with contracts that follow the standard If you create a token contract that follows the ERC standard people can use it with existing wallets without any extra work These standards describe what contracts should do but not how they should be made You have the freedom to decide how to implement the functions inside your contract The standards provide some requirements for how the contract should behave in certain situations but they don t give specific instructions For example they might specify how the transfer function should handle a zero value In simple terms token standards are like a set of rules that token contracts should follow They help different contracts work well together You can add more features if you want and the standards describe what the contract should do but not how to make it Should You Use These Standards Every developer faces a tough decision should they stick to existing standards or go beyond them to create something new and innovative This decision is not easy to make Standards by their nature limit your ability to innovate because they provide a specific framework that you must follow However these standards have been developed based on the experience of many applications and usually work well for most use cases There is a bigger issue to consider as well the importance of interoperability and widespread adoption If you choose to use an existing standard you benefit from the existing systems and tools designed to work with that standard If you deviate from the standard you have to consider the cost of building your own support infrastructure or convincing others to support your new standard Choosing to ignore existing standards and creating everything from scratch is known as Not Invented Here syndrome and it goes against the principles of open source culture However progress and innovation sometimes require breaking away from tradition It s a challenging choice that requires careful consideration Security by MaturityWhen implementing a standard like ERC you have two options use an existing implementation or create your own This choice has important security implications Existing implementations have been thoroughly tested and used in real world scenarios They have proven to be secure and reliable handling millions of dollars worth of tokens Creating your own implementation is challenging and risky as there are many ways it can be compromised It is safer to use a well established implementation like OpenZeppelin s ERC which focuses on security If you choose an existing implementation you can still add your own custom features if needed However be cautious as adding complexity increases the chance of introducing vulnerabilities Each line of code you add expands the potential risks You might not discover problems until your contract holds significant value and someone exploits it Security by MaturityWhen implementing a standard like ERC you have two options use an existing implementation or create your own This choice has important security implications Existing implementations have been thoroughly tested and used in real world scenarios They have proven to be secure and reliable handling millions of dollars worth of tokens Creating your own implementation is challenging and risky as there are many ways it can be compromised It is safer to use a well established implementation like OpenZeppelin s ERC which focuses on security If you choose an existing implementation you can still add your own custom features if needed However be cautious as adding complexity increases the chance of introducing vulnerabilities Each line of code you add expands the potential risks You might not discover problems until your contract holds significant value and someone exploits it Extensions to Token Interface StandardsThe token standards we discussed provide a basic set of functions but many projects have created their own versions with more features These additional features include Owner control The ability to give specific addresses special powers like blacklisting or minting tokens Burning The ability to intentionally destroy tokens by sending them to an unspendable address or reducing the total supply Minting The ability to create new tokens and increase the total supply Crowdfunding The ability to sell tokens through auctions or other methods Caps Setting limits on the maximum token supply Recovery backdoors Allowing designated addresses to recover funds or reverse transactions if needed Whitelisting Restricting token transfers to specific addresses often used for vetted investors Blacklisting Preventing token transfers to specific addresses There are example implementations available but no widely accepted standard for these features When deciding whether to add extra features to a token standard developers need to consider the trade off between innovation and risk as well as interoperability and security It s important to carefully weigh the benefits and potential drawbacks before implementing additional functionality Tokens and ICOsTokens have become an important part of Ethereum but not all tokens are trustworthy Many tokens being offered now are scams or schemes to make quick money It s important to understand that the long term impact and potential of tokens and the technology behind them is different from the current situation Some tokens are fraudulent or designed to trick people We should recognize the potential of tokens and the platform they are built on but also be aware of the scams and fraudulent activities happening now Token standards and the platform have the potential to bring big changes in the future but we need to be cautious and careful in the present ConclusionTokens are a really useful thing in Ethereum They can be the starting point for many important applications that work without any central control In this chapter we learned about different kinds of tokens and standards You even got to make your own token and build something with it |
2023-07-12 13:20:53 |
海外TECH |
DEV Community |
Using Mixins with SCSS to Create Breakpoints |
https://dev.to/oler/using-mixins-with-scss-to-create-breakpoints-8g6
|
Using Mixins with SCSS to Create BreakpointsTable of ContentsIntroductionWhat are Breakpoints Creating a Mixin for BreakpointsUsing the Breakpoint MixinHTML ExampleConclusion IntroductionOne of the main challenges in web development is creating a responsive design that perfectly adapts to all types of devices In this context Sass Syntactically Awesome Stylesheets and more specifically SCSS Sassy CSS have proven to be powerful tools for efficient control of CSS styles One of the most useful features of SCSS is the ability to create mixins which are reusable blocks of code What are Breakpoints Breakpoints are points where the content of a website or application responds with layout changes to adapt to different screen sizes They are essential for adjusting the appearance of a site to mobile devices tablets and desktops Creating a Mixin for BreakpointsSCSS allows the creation of mixins to encapsulate styles that will be reused Let s see how to create a mixin for breakpoints mixin breakpoint point if point small media max width px content elseif point medium media max width px content elseif point large media max width px content This mixin allows you to specify different styles for three different breakpoints small medium and large The content allows you to pass style blocks to the mixin which will be applied at the specified breakpoint Using the Breakpoint MixinNow that we ve created our mixin let s use it For example we might want to change the background color of a div when the screen is smaller than px small div example background color blue include breakpoint small background color red In this example the div will have a blue background on screens larger than px However when the screen is smaller than px the mixin will apply the style inside the breakpoint small block changing the background color to red HTML ExampleNow applying this to HTML we have lt div class div example gt This is an example of a responsive design div lt div gt With our SCSS compiled to CSS and correctly included on the page the example div will respond according to the screen sizes we defined earlier ConclusionThe use of mixins with SCSS to create breakpoints is an effective strategy for managing responsive CSS It helps keep your code clean readable and easy to maintain while providing an optimized viewing experience for users regardless of the device they are using Remember however that each project is unique and may require different numbers or values of breakpoint Adapt this strategy to your specific needs and always remember to test your design on different devices to ensure a consistent and enjoyable user experience using mixins with scss to create breakpoints |
2023-07-12 13:19:25 |
海外TECH |
DEV Community |
# Mocking useSearchParams() and useRouter() with Jest in Next 13 (next/navigation) |
https://dev.to/peterlidee/-mocking-usesearchparams-and-userouter-with-jest-in-next-13-nextnavigation-15bd
|
Mocking useSearchParams and useRouter with Jest in Next next navigation Here is our custom hook again hooks useSort tsimport SortOrder from types import usePathname useRouter useSearchParams from next navigation import getSortOrderFromUseSearchParams from lib getSortOrderFromUseSearchParams export default function useSort const params useSearchParams const pathname usePathname const router useRouter const sortOrder getSortOrderFromUseSearchParams params const handleSort value SortOrder gt const newParams new URLSearchParams params toString newParams set sortOrder value router push pathname newParams toString return sortOrder handleSort This hook does things It extracts sortOrder from our the query string We tested the function that is responsible for this getSortOrderFromUseSearchParams in the previous part Secondly it returns a handleSort function This function will be used as an onClick event handler for our sort buttons It will be called as handleSort asc or handleSort desc handleSort creates a new URLSearchParams object from the old readonly URLSearchParams object that useSearchParams provides us It then sets sortOrder to asc or desc on this new URLSearchParams object creates a route and pushes that to router Good news this is actually not that hard to test Bad news there is a complication and we start with that Testing custom hooksYou cannot test a custom hook function in the same way you would test another function The reason custom hooks only work inside functional components So in order to test our custom hooks we have to call it inside a functional component mount this component in our test and then perform our tests So we write a functional component function TestComponent const sortOrder handleSort useSort return lt gt lt h gt sortOrder lt h gt lt button onClick gt handleSort bbbb gt sort lt button gt lt gt We render sortOrder inside an lt h gt this makes it easy to query and we attach handleSort to a button And we are ready to test sortOrderWe have already tested the function getSortOrderFromUseSearchParams so we can simply mock it and then return a value from this mock If we then mount our lt TestComponent gt this return value should appear inside our lt h gt We will perform this test in a bit This is also all the testing we need to do for sortOrder handleSort handleSort makes use of hooks useSearchParams usePathname and useRouter Since we mount lt TestComponent gt in jest dom we don t actually have a router searchParams or a pathname So we have to mock all of them This is easy with Jest automatic mocking import usePathname useSearchParams useRouter from next navigation jest mock next navigation We add a setup function and write our first test function setup render lt TestComponent gt const heading screen getByRole heading level const button screen getByRole button return heading button Our setup function renders lt TestComponent gt queries the lt h gt and lt button gt and returns these Our first test is this test TestComponent renders gt const heading button setup expect useSearchParams toHaveBeenCalled expect usePathname toHaveBeenCalled expect useRouter toHaveBeenCalled expect heading toHaveTextContent aaaa expect button toBeInTheDocument And it passes successfully All the hooks we just mocked got called On top of that our lt h gt correctly displays the aaaa value we returned from our mock jest mock lib getSortOrderFromUseSearchParams getSortOrderFromUseSearchParams mockReturnValue aaaa In other words we tested sortOrder as we said we would But now we run into problems because we actually need return values from our mocked hooks useSearchParams useSearchParams returns a URLSearchParams object We already know how to mock this because we did it to test the getSortOrderFromUseSearchParams function This means we already know how to mock useSearchParams useSort only calls one method toString So from the useSearchParams mock we will return an object with this method What this method returns depends on the test so we will have to use our setup function for this function setup toString useSearchParams mockReturnValue toString gt toString render lt TestComponent gt const heading screen getByRole heading level const button screen getByRole button return heading button We added a toString argument to setup with a default empty string value The toString argument becomes the return value of the toString method on the object we return from of our useSearchParams mock We will use this setup in later tests Looking at our handleSort function inside useSort const handleSort value SortOrder gt const newParams new URLSearchParams params toString newParams set sortOrder value router push pathname newParams toString You may be wondering don t we also use the set method The answer is no We have URLSearchParams objects One returned from useSearchParams hook that we will mock and a second new one that we save into the newParams variable We do not need to mock this second one I m not even sure we can Why not mock Because we are not testing the URLSearchParams constructor We assume it is stable and we just use it in the same way we don t mock useState or useEffect Also note that we mocked params toString but this does not mock newParams toString usePathname usePathname simply return a string f e localhost sortList We only use it to construct a route So for testing purposes we will return a value example com from it We will use this in a bit in a test usePathname mockReturnValue example com useRouter We already mocked useRouter and successfully ran a test on it But handleSort calls the router push method and we want to test that This means we have to Add a mock for this push function Test if the mocked push function was called Test if the mocked push function was called with the correct route Right now mocked useRouter return nothing undefined We need it to return a push method useRouter mockReturnValue push jest fn This setup would work lt TestComponent gt will be successfully rendered But there is a flaw We don t have access to push This test expect push toHaveBeenCalled Would lead to this error ReferenceError push is not defined Why is this Because we don t have a reference to jest fn It s like an anonymous function The solution is simple We create a reference to jest fn and pass that reference const pushMock jest fn jest mock next navigation useRouter mockReturnValue push pushMock Now we are able to test push by using pushMock expect pushMock toHaveBeenCalled And that s it we ve returned values from all our mocks Here is an overview of where we are at import screen render from testing library react import useSort from useSort import usePathname useRouter useSearchParams from next navigation import getSortOrderFromUseSearchParams from lib getSortOrderFromUseSearchParams jest mock next navigation const pushMock jest fn usePathname mockReturnValue example com useRouter mockReturnValue push pushMock jest mock lib getSortOrderFromUseSearchParams getSortOrderFromUseSearchParams mockReturnValue aaaa function setup toString useSearchParams mockReturnValue toString gt toString render lt TestComponent gt const heading screen getByRole heading level const button screen getByRole button return heading button function TestComponent const sortOrder handleSort useSort return lt gt lt h gt sortOrder lt h gt lt button onClick gt handleSort bbbb gt sort lt button gt lt gt describe hooks useSort in TestComponent gt test TestComponent renders gt const heading button setup expect useSearchParams toHaveBeenCalled expect usePathname toHaveBeenCalled expect useRouter toHaveBeenCalled expect heading toHaveTextContent aaaa expect button toBeInTheDocument The only thing there is left to do is actually write our tests for handleSort Let s look at handleSort one more time const handleSort value SortOrder gt const newParams new URLSearchParams params toString newParams set sortOrder value router push pathname newParams toString And here is the test test handleSort calls router push mock with the correct string async gt const user userEvent setup const button setup await user click button expect pushMock toHaveBeenCalledWith example com sortOrder bbbb This test compiles everything we talked about We simulate a button click in lt TestComponent gt This will call handleSort bbbb We called our setup function with no argument This means that the toString method will return an empty string This is the equivalent of a route with no parameters f e localhost sortList sortOrder passes this empty string into a new URLSearchParams and then adds parameter sortOrder with the value passed from handleSort bbbb to this new object Finally the push method is called with a route router push pathname newParams toString We mocked the return value of usePathname to be example com And our newParams toString will return sortOrder bbbb And that is what we expected pushMock to have been called with don t forget expect pushMock toHaveBeenCalledWith example com sortOrder bbbb We wrote more tests In the next test we return a parameter from the useSearchParams mock This simulates this url localhost sortList foo bar We then test if the new sortOrder parameter was correctly added test handleSort adds our sortOrder parameter to existing parameters async gt const user userEvent setup const button setup foo bar await user click button expect pushMock toHaveBeenCalledWith example com foo bar amp sortOrder bbbb In our last test we return the value sortOrder cccc from the useSearchParams hook We want to test if it gets correctly overwritten The test succeeds test handleSort adds overwrites an existing sortOrder parameter async gt const user userEvent setup const button setup sortOrder cccc await user click button expect pushMock toHaveBeenCalledWith example com sortOrder bbbb Here is our final full test file hooks test useSort test jsimport screen render from testing library react import userEvent from testing library user event import useSort from useSort import usePathname useRouter useSearchParams from next navigation import getSortOrderFromUseSearchParams from lib getSortOrderFromUseSearchParams jest mock next navigation const pushMock jest fn usePathname mockReturnValue example com useRouter mockReturnValue push pushMock jest mock lib getSortOrderFromUseSearchParams getSortOrderFromUseSearchParams mockReturnValue aaaa function setup toString useSearchParams mockReturnValue toString gt toString render lt TestComponent gt const heading screen getByRole heading level const button screen getByRole button return heading button function TestComponent const sortOrder handleSort useSort return lt gt lt h gt sortOrder lt h gt lt button onClick gt handleSort bbbb gt sort lt button gt lt gt describe hooks useSort in TestComponent gt test TestComponent renders gt const heading button setup expect useSearchParams toHaveBeenCalled expect usePathname toHaveBeenCalled expect useRouter toHaveBeenCalled expect heading toHaveTextContent aaaa expect button toBeInTheDocument describe handleSort function returned from useSort works correctly gt test It calls router push mock with the correct string async gt const user userEvent setup const button setup await user click button expect pushMock toHaveBeenCalledWith example com sortOrder bbbb test It adds our sortOrder parameter to existing parameters async gt const user userEvent setup const button setup foo bar await user click button expect pushMock toHaveBeenCalledWith example com foo bar amp sortOrder bbbb test It adds overwrites an existing sortOrder parameter async gt const user userEvent setup const button setup sortOrder cccc await user click button expect pushMock toHaveBeenCalledWith example com sortOrder bbbb ConclusionTo test custom hooks you need to call them inside a functional component Mocking useSearchParams equals mocking a URLSearchParams object You do this by creating an object and adding all the methods you need on it Finally mocking useRouter is not that hard Return an object with all the methods you need from the useRouter mock To test these methods individually you will need to manually create a mocking function for each method |
2023-07-12 13:17:00 |
海外TECH |
DEV Community |
Frontend development skills for Product based companies 🔥 |
https://dev.to/gaurbprajapati/frontend-development-skills-for-product-based-companies-2120
|
Frontend development skills for Product based companies A roadmap is the best way to kick start your attempt to become a frontend developer Bare minimum topics for working on product based organisation 𝗕𝗮𝘀𝗶𝗰𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁𝗖𝗼𝗻𝗰𝗲𝗽𝘁𝘀 Data typesFunctionsScope in JavaScriptClosureEvent loopPrototype and prototype chainClass and inheritanceDOMbind call applyPromiseWebAPITask queueCall stackAsync awaitGeneratorsTypescript𝗕𝗮𝘀𝗶𝗰𝗛𝗧𝗠𝗟𝗖𝗼𝗻𝗰𝗲𝗽𝘁𝘀 block elementimportetc infinite questions𝗕𝗮𝘀𝗶𝗰𝗖𝗦𝗦𝗖𝗼𝗻𝗰𝗲𝗽𝘁𝘀 Class and other selectorsPseudo ClassesBox ModelPseudo ElementsCSS type flex grid normalHow to centrepseudo classes and elementsAll element states active hoverMedia queriesPre processors SCSS or LESSmixinsCSS constantsBEMImport𝗕𝗮𝘀𝗶𝗰𝗪𝗲𝗯𝗖𝗼𝗻𝗰𝗲𝗽𝘁𝘀 Page rendering cyclehttp https httpsCORSLocal storage Session storageCookieJWTXHRMicro FrontendREST GraphQL Socket connectionBrowser ConceptsDebugging ApplicationChrome Dev Tool Features𝗔𝗱𝘃𝗮𝗻𝗰𝗲𝗱𝗝𝗮𝘃𝗮𝗦𝗰𝗿𝗶𝗽𝘁𝗖𝗼𝗻𝗰𝗲𝗽𝘁𝘀 OOPs conceptDesign Patternsa Singletonb Providerc Prototyped Observere Modulef HOC Understanding V in deptha JITb Interpreterc Executiond CompilerCurrying𝗕𝗮𝘀𝗶𝗰𝗥𝗲𝗮𝗰𝘁𝗝𝗦𝗖𝗼𝗻𝗰𝗲𝗽𝘁𝘀 bonus Introduction JSXReact ComponentComponent State and PropsAdding Style CSS Functional and Class componentsReact Lifecycle MethodsVirtual DOMReact HooksCustom HooksContext APISynthetic EventsRoutingData Flow Redux Flux Server Side RenderingUnit TestingJest amp React Testing libraryMocking DataUnderstanding Webpack Bundler Babel env prettier linterSave it for future reference ️𝐃𝐨𝐋𝐢𝐤𝐞 𝐒𝐡𝐚𝐫𝐞𝐚𝐧𝐝𝐂𝐨𝐦𝐦𝐞𝐧𝐭 |
2023-07-12 13:09:09 |
海外TECH |
Engadget |
The best Amazon Prime Day deals under $50 for 2023 |
https://www.engadget.com/best-amazon-prime-day-deals-under-50-134515288.html?src=rss
|
The best Amazon Prime Day deals under for Amazon Prime Day is a great time to grab the little things accessories dongles chargers and other tech we all need but don t always think about until things get dire We ve reviewed and tested plenty of less expensive tech and quite a few of our recommendations are currently seeing discounts during Amazon s big sale We rounded up the best tech gear and devices we could find that come in under with Prime Day savings Here are the best Prime Day deals under that you can get this year Echo DotThe latest generation of Amazon s smart speaker the Echo Dot usually retails for but for Prime Day it s down to which is a percent discount and its lowest price ever We think it s the best sub smart speaker you can buy because it pumps out decent sound for its size while delivering all that Alexa can do The Echo Dot with clock is also on sale coming in at instead of nbsp Echo Dot Kids nbsp The kids edition of the Echo Dot is on sale for rather than It s the same size as the standard Dot with equal audio powers You can get it with an owl or dragon themed exterior and it offers parental controls and comes with a year s subscription to Amazon Kids with kid appropriate content Echo PopAmazon s newest Echo is also its smallest The half sphere Echo Pop is now more than half off going for just for Prime Day when it usually retails for It s designed to bring casual listening and Alexa s help to small spaces Roku Streaming Stick KWe think Roku s Streaming Stick K is the best streaming device on the market and right now you can get it for instead of the usual It packs a lot of features into a small and affordable package and has a straightforward user interface Anker W ft cableAnker s W cable is the one our reviewer used to test out the fast chargers in our guide and right now Prime members can get it for instead of It s rated to W which can properly deliver power from a W USB C power bank port or a fast charger brick BitDo Pro controllerThis bundle with the BitDo Pro controller and its storage case is down to for Prime Day which is a great price We generally like BitDo controllers and the Pro has been one of our favorites since it came out It offers a lot at an affordable price point adjustable stick and trigger sensitivity vibration control and customize button mapping just to name a few features It also works with a bunch of different platforms including Switch Steam Deck PC iOS Mac and Android It s part of a larger sale that includes the BitDo Ultimate Wired Controller for Xbox for and the Sn Pro Bluetooth controller for Fire TV Stick LiteThe budget pick in Engadget s streaming device guide is Amazon s Fire TV Stick Lite which is even cheaper for Prime Day as long as you re a Prime member Typically it s now half price at just It supports Full HD streaming with HDR and comes with an Alexa voice remote ーbut keep in mind it can t control the volume or power on your TV Fire TV Stick KThe Fire TV Stick K is down to which is a considerable percent savings over its list price It s capable of streaming K video to your TV or monitor as long as it supports that resolution and supports HDR Dolby Vision and Dolby Atmos It also puts Amazon s Fire OS interface on your screen which we found to be easy enough to figure out though it does prioritize Amazon Prime Video content Fire TV Stick K MaxLike the standard K stick the Fire TV Stick K Max streams K content to your compatible screen of choice has an Alexa remote and supports HDR Dolby Vision and Dolby Atmos It also has access to WiFi and packs a faster processor Right now it s which is percent off of the typical Anker PowerConf C K WebcamThe runner up in our guide to the best webcams is Anker s PowerConf C K The list price is but is discounted to for Prime members during the sale It s easy to set up has a built in lens cover for privacy and captures sharp and clear K resolution video with a degree field of view Amazon Echo BudsThe latest Echo Buds just arrived in May yet they re already percent off at Amazon for Prime members You can get them for which is off and ties the lowest price we ve seen We recommended the Echo Buds to those who prefer an open design in our best budget wireless earbuds guide ElevationLab GoStandWe recommend Elevation Lab s GoStand in our gift guide for people who work from home and right now it s percent off It folds into a pocket and can prop up a smartphone in either portrait or landscape orientation and adjusts to just about any viewing angle you d like nbsp TP Link Kasa Smart WiFi Light BulbOur favorite budget smart light bulbs are TP Link Kasa Smart WiFi Bulbs which are percent off right now for the two pack bringing it to Installation is easy and the lights stayed reliably connected during testing plus the companion app is simple SAMSUNG EVO Select microSDWe named the Samsung EVo Select microSD card the overall best value in our guide to those storage devices and the largest GB capacity model is now just a percent discount over its typical price tag The larger capacity cards including the GB model is on sale as well It doesn t have the fastest write speeds but is good for adding extra storage on the cheap SAMSUNG PRO Plus microSD Memory CardEngadget s top pick overall for micro SD cards is Samsung s Pro Plus micro SD and Prime Day is bringing even the GB model to and the largest GB model to under after a percent Prime only discount It had the best sequential write performance of the cards we tested and should work well as extra storage for a camera tablet or gaming handheld Blink Video DoorbellThe list price on Blink s Video Doorbell is but a half price discount for Prime members puts it comfortably under at just The unit can be used wired or on battery and will keep an eye on your front door sending p video to your phone or smart display triggered by motion The add on Sync Module is required for on demand viewing otherwise video and audio is only available when motion is sensed Amazon Fire tabletAmazon s Fire tablet has an MSRP of but Prime Day is discounting it to after a percent Prime member only discount A sub tablet is a rare thing and the Fire isn t a high performer But if you just need a no frills way to check email stream and browse social media this won t break the bank Echo Show The recently updated Echo Show is half price for Prime Day dropping it to The smaller smart display can act as a bedside alarm clock and even has a snooze button or you can set it up in a smaller kitchen to show you recipes and provide Alexa s help Blink Mini smart security camera pack The wired indoor Blink mini security cam is listed at most days but Prime members can snag it for In fact a two pack falls beneath the mark at just The smart cameras are motion activated sending live p video to your smartphone or smart display and allowing for two way audio to boot Belkin Wireless Charging StandOne of our favorite wireless chargers is Belkin s Wireless Charging Stand which is just for Prime members right now and a percent discount We like it because it s a good value comes with a power adapter and lets you charge in either landscape or portrait orientation Amazon Smart PlugIn Engadget s guide to smart plugs we named Amazon s Smart Plug the best option for people who already use Alexa enabled devices like Echo speakers It s easy to set up using the Alexa app and reliably controls any lamps or fans you plug into it Right now Prime Members can snag one for just which is nearly half price nbsp Anker GaN PrimeAnker s GaN Prime is just for Prime members and usually It s the best W charging brick you can buy according to our testing because it s fast compact and offers a total of three charging ports two USB C and one USB A OtterBox Fast Charge Power BankThe stylish and fast charging OtterBox Fast Charge Power Bank is currently just for the mAh model the best medium capacity portable battery you can buy This one has even more juice to revive your dying smartphone or tablet Belkin Apple Watch ChargerBelkin s Apple Watch Charger is one of our favorite accessories for the smartwatch and down to for Prime members The square pad can flip up so you can use the watch in nightstand mode and uses Apple s new fast wireless charging module to power a Series from to percent in about minutes Anker charger Nano Anker s Nano charging brick is one of our recommendations for Apple Watch users and is now on sale for instead of New watches don t come with power adapters so if you need one this is a good option ーit s compact with foldable prongs and has ActiveShield to keep it from overheating Kasa Smart Plug EP pack Prime Day is a good time to pick up the best smart plug you can buy according to our testing A four pack of Kasa s Smart Plug EP is now for Prime members when the set is usually It s reliable relatively easy to set up and works with Alexa Google Assistant Samsung SmartThings and even Apple HomeKit Logitech Signature MLogitech s Signature M wireless mouse is seeing a moderate percent discount for Prime Day It s a good pick for a compact mouse you can easily take with you when you re computing on the go It has a precision scroll wheel clicks quietly and features two programmable buttons Spigen ArcHybrid MagSafe Battery PackThe top MagSafe compatible battery in our tests turned out to be Spigen s ArcHybrid MagSafe pack and Prime Day pricing brings it down to after a solid percent discount It s a a little larger than Apple s own MagSafe battery and was able to fill an iPhone Plus to percent in about an hour and minutes Considering it s regularly cheaper than Apple s battery pack it s easy to recommend ーparticularly at this price nbsp Your Prime Day Shopping Guide See all of our Prime Day coverage Shop the best Prime Day deals on Yahoo Life Follow Engadget for the best Amazon Prime Day tech deals Learn about Prime Day trends on In the Know Hear from Autoblog s car experts on must shop auto related Prime Day deals and find Prime Day sales to shop on AOL handpicked just for you This article originally appeared on Engadget at |
2023-07-12 13:45:15 |
海外TECH |
Engadget |
The best educational toys for kids |
https://www.engadget.com/best-educational-toys-for-kids-123055311.html?src=rss
|
The best educational toys for kidsIt s tempting to get your kid every shiny new toy they ask for But some toys are better than others when it comes to actually stimulating your child s brain while also keeping them entertained The parents on the Engadget staff know this well and we ve tried out a bunch of educational toys with our kids with various results These are some of the ones that have had staying power with our children ーand even we adults have to admit we found them pretty fun too Magna TilesThere are tons of building toys out there from LEGO to Tegu to the classic wooden block But one of my favorites and my kid s are Magna Tiles These large colorful construction toys come in a variety of sizes and shapes and click together or to other surfaces with the aid of powerful magnets They can be combined to form simple shapes like cubes and pyramids or arranged to make magnetic art on a garage door Plus there are themed packs that can add windows staircases or even functional cranes to the playsets These are open ended building toys that don t have set instructions for making a particular scene or item They re safe for a three year old and fun for much older kids too Honestly as a nearly year old man even I have a blast finding new and interesting ways to create ever more elaborate structures with my son We ve built castles spaceships racecars and even a ferry terminal complete with a moveable boarding ramp At for a piece set Magna Tiles certainly aren t cheap but they re definitely the sort of toy that will keep your child entertained for years to come while also helping them learn valuable problem solving skills ー Terrence O Brien Managing EditorKindle Kids EditionI can tell you first hand that Amazon s Fire tablets for kids are great for little ones They can withstand the carelessness of a young child and offer access to tons of content with parental controls However once your kid gets a little older a dedicated device for books with fewer distractions is a better option And for exactly that reason Amazon makes a kid friendly version of its Kindle e reader The device comes with a protective cover and one year of the company s Kids service for unlimited access to books a month afterwards There are no videos or games on the Kindle Kids but it does offer access to Audible It can store books for offline reading and battery life lasts for weeks at a time Most importantly parental controls allow you to monitor content and a dedicated dashboard keeps tabs on their reading habit over time ーBilly Steele Senior News EditorLovevery play kitsIt can be a daunting task picking the best toys to help your baby learn and develop through the toddler and preschool years Lovevery tries to reduce the stress by doing all the picking for you It s a mail order service that delivers specifically timed play kits designed around Montessori tenets for different developmental windows Each box is a mix of toys and books or cards for little babies that start at birth and go all the way up to four years old The kits come every two months through the first year At this point things get understandably more complex and the boxes arrive every three months The kits aren t cheap The boxes for babies are each and when you hit one year they go up to I can attest after nearly a year and a half that the service is great It has been nice to refresh our child s toys with things that are more appropriate for his developmental stage on a regular basis Everything is safe and well built and most importantly highly engaging ーB S Smart Lab Smart CircuitsWhen it comes to introducing kids to electronics there are a ton of options but I personally like the Smart Circuits kit It can take a kid from simple blinking lights to complex motion controlled games The snap together baseboard can lie flat on a table like a regular breadboard but it can also be folded into a cube or the pieces can be attached at a degree angle This gives kids an extra element to play with when they graduate to designing their own circuits The kit itself only has a few pieces but they re quite flexible And they re all housed in large colorful plastic that should be easy for a kid to handle There s the usual electronics kid fare like LEDs a speaker a potentiometer and two buttons But there s also a tilt switch a light sensor and a microprocessor capable of handling some relatively robust tasks The kit comes with instructions for projects but with the parts available a creative child could build quite a few more My one critique is that the jumper wires can be tough to insert and might require a bit of patience ーsomething we know not every eight year old has an abundance of nbsp ー T O Amazon Fire HD Kids Pro tabletAmazon Fire HD Kids Pro is our pick for the best tablet for kids because it s easy to navigate for first time users and at it s one of the most affordable tablets from a major brand It s also easy to manage as a parent a dedicated dashboard includes adjustable web browsing features filters and blocks plus the ability to control purchases and browsing time limits You get a free year of Amazon Kids included too which provides thousands of ad free games shows books and apps tailored for kids aged three to twelve An included protective case packs its own stand critical for getting kids to hold the screen more than three inches from their eyeballs plus the p display is sharp and the storage space is upgradable to a full terabyte ーAmy Skorheim Commerce WriterPlayskool Shape SorterA shape sorter is an awesome toy for younger kids because it encourages hand eye coordination fine motor skills problem solving and even vocabulary by identifying the names of shapes and colors My kids have a few of them but the one I like most is this Playskool model and here s why The lid latches which means they can t just dump the shapes out easily they have to learn how to work the mechanics of the lid as well Also the multi colored shapes have tactile patterns on them that match the area of the box they re supposed to fit into and that gives me another teaching opportunity The whole thing is durable too ーmy son likes to chew on the shapes and my daughter likes to stand on the box but despite that abuse there s not so much as a dent or a scratch on it And because it s only it makes a great gift if you re buying for someone else s kiddo ー Amber Bouman Associate Editor ParentingYoto PlayerThe Yoto Player is the perfect toy for a young child who wants to play their own tunes and stories but who isn t ready for an iPad or smart speaker of their own Yoto s cute design and blocky pixel like display looks distinctly retro It s detailed enough for kids to make out images but it s insufficient for video which should actually be good news for parents worried about too much screen time Yoto calls the player a “carefully connected speaker You bring it online during the initial setup but from there kids can access safe songs and other content through physical cards ーDevindra Hardawar Senior EditorKiwi Crates subscriptionI am admittedly a sucker for a good subscription box But Kiwi Crate is the only one that doesn t feel like an indulgence Each month my kid receives a collection of simple DIY toys crafts and games built around a theme For instance one box was all about bioluminescent animals Inside was a plush lightning bug that we had to stuff ourselves and shape using hair ties a mushroom that had us painting a Slurpee lid and then dotting it with glow in the dark stickers and a dancing glowing jellyfish as well as several window clings of sea creates for him to create scenes with Past kits have covered farm life dinosaurs and simple machines like ramps The stuff inside the box is usually pretty simple think cardboard felt and wood It s definitely not built to last but my kid has gotten plenty of use out of each piece The best part is the crates will grow with him As he gets older the projects will get more complex and the price will go up Later boxes include everything from screen printing tools to trebuchet kits and even robots ー T O Playtime Engineering BlipbloxThe Blipblox may look like a simple noise maker for kids but this gadget is much more than just a toy While the device is loaded with melodies and a synchronized light show it also packs a capable digital synthesizer engine There s an oscillator with the usual assortment of synth parameters along with an amp envelope two LFOs modulation envelope and a low pass filter The Blipblox also has a MIDI input for use with a keyboard or other accessories in addition to a ¼ inch output Lastly it runs on three AA batteries or plugged in via a USB cable Blipblox can teach kids about music through a basic approach to instruments and synthesis but its features are advanced enough to offer noise making magic for parents too ーB S Montessori Busy BoardMy kids are currently fascinated with snaps zippers and closures which is fun because it means it s easy to amuse them but awkward too because they often decide to undo the closures on the shirt I m wearing A busy board capitalizes on this curiosity by offering several different clasps snaps zippers buttons and openings for little ones to work their fingers on It intrigues children by activating their senses and helps them develop their fine motor skills and problem solving by using real world obstacles It also adheres to the Montessori philosophy of simple wooden toys that help children explore the world around them through play The deMoca busy board is one of my favorites because it has bright eye catching colors and sensory activities including a zipper a buckle a latch and Velcro It s easy to bring along on trips and deMoca also makes a “Quiet Book ーa soft cover fabric version that s washable ー A B Lego Minecraft Fox LodgeMy first grader starts the morning talking about Minecraft His final topic before nodding off is also Minecraft Outside of his screen time allotment Legos are one of the few toys that can capture his attention nearly as well as mobs and enchanted netherite swords Lego s Minecraft Fox Lodge combines two definitive fascinations in one and adds foxes which are always adorable The D instructions in the Lego Builder app make it easier for younger kids to build on their own ーas long as you re cool fudging what constitutes “screen time ーA S This article originally appeared on Engadget at |
2023-07-12 13:20:07 |
海外TECH |
Engadget |
Apple's M1 MacBook Air is on sale for $750 for Prime Day 2023 |
https://www.engadget.com/apples-m1-macbook-air-is-on-sale-for-750-for-prime-day-2023-130034996.html?src=rss
|
Apple x s M MacBook Air is on sale for for Prime Day Were you hoping to score a good deal on a laptop for Prime Day Apple s MacBook Air is currently on sale for ーa record low for the computer which typically goes for It s powered by the company s M chip with an core CPU and while Apple has since come out with an M MacBook Air we found the older version s performance to be impressive when we reviewed it This MacBook Air was very responsive and running apps built for Apple s silicon such as Safari and GarageBand felt as fast as launching them on an iPad Safari also loaded sites instantly and scrolling through them felt effortless We gave the MacBook Air a score of in our review In addition to its impressively speedy performance we also praised it for having the capabilities it has without the need for a fan Its inch Retina Display looked fantastic with thin bezels around the high res screen and we found its keyboard to be excellent with a satisfying amount of depth The laptop ran efficiently during our tests and lasted hours and minutes including periods wherein we looped HD videos nbsp In addition since this MacBook Air is powered by Apple s silicon it can run iPhone and iPad apps though not every app for your mobile device will be available for the computer The chip gives it decent gaming performance as well and allows it to run some games as smoothly as on a gaming PC You can get any of the color options ーgold silver and space gray ーfor but due to the nature of the event you ll have to be a Prime member to enjoy the discount Take note that if you re not currently subscribed to Amazon Prime you can avail of a day trial for free when you check out Your Prime Day Shopping Guide See all of our Prime Day coverage Shop the best Prime Day deals on Yahoo Life Follow Engadget for the best Amazon Prime Day tech deals Learn about Prime Day trends on In the Know Hear from Autoblog s car experts on must shop auto related Prime Day deals and find Prime Day sales to shop on AOL handpicked just for you This article originally appeared on Engadget at |
2023-07-12 13:00:34 |
海外科学 |
NYT > Science |
Florida Ocean Temperatures Are in the 90s Fahrenheit, Posing Risk to Coral |
https://www.nytimes.com/2023/07/12/climate/florida-ocean-temperatures-reefs.html
|
marine |
2023-07-12 13:59:21 |
海外TECH |
WIRED |
15 Best Prime Day Sex Toy Deals on Vibrators and Strokers (2023) |
https://www.wired.com/story/best-amazon-prime-day-sex-toy-deals-2023-1/
|
makers |
2023-07-12 13:38:00 |
海外TECH |
WIRED |
47 Best Prime Day Phone and Tablet Deals (2023): Accessories and Chargers |
https://www.wired.com/story/best-amazon-prime-day-phone-tablet-deals-2023-1/
|
amazon |
2023-07-12 13:09:00 |
金融 |
金融庁ホームページ |
鈴木財務大臣兼内閣府特命担当大臣閣議後記者会見の概要(令和5年7月7日)を掲載しました。 |
https://www.fsa.go.jp/common/conference/minister/2023b/20230707-1.html
|
内閣府特命担当大臣 |
2023-07-12 14:00:00 |
ニュース |
BBC News - Home |
Mortgage payments set to jump by £500 for one million households |
https://www.bbc.co.uk/news/business-66172954?at_medium=RSS&at_campaign=KARANGA
|
interest |
2023-07-12 13:51:48 |
ニュース |
BBC News - Home |
Iowa's Republican legislature passes six-week abortion ban |
https://www.bbc.co.uk/news/world-us-canada-66178728?at_medium=RSS&at_campaign=KARANGA
|
abortion |
2023-07-12 13:33:26 |
ニュース |
BBC News - Home |
The Ashes: England's Sophie Ecclestone takes brilliant catch to remove Australia's Litchfield |
https://www.bbc.co.uk/sport/av/cricket/66178718?at_medium=RSS&at_campaign=KARANGA
|
The Ashes England x s Sophie Ecclestone takes brilliant catch to remove Australia x s LitchfieldEngland bowler Sophie Ecclestone takes a stunning one handed catch to dismiss Australia opener Phoebe Litchfield for in the first Women s Ashes ODI |
2023-07-12 13:13:43 |
コメント
コメントを投稿