python |
Pythonタグが付けられた新着投稿 - Qiita |
「ありそうでない言葉」をたくさん作る【RNN】 |
https://qiita.com/masaka_programming/items/619b3e36fe1b569f701f
|
これは、ありそうな単語かどうかの判定基準が単語の長さに強く依存しそうであること、および文字数の多い単語ほど識別がしやすそうであることに拠りました。 |
2022-02-24 23:44:06 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
Python マルチスレッド処理 |
https://qiita.com/Yusuke_Pipipi/items/5ca66ede614666903a8c
|
本日はPythonでのマルチスレッドについてです。 |
2022-02-24 23:31:27 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
Deno Deep Dive - Denoでのアプリケーション実装Tips / Node.jsとの比較 |
https://qiita.com/Yuki_Oshima/items/fd15df9196387f8b4e7c
|
TypeScriptがoutofbox、つまり設定なしで実行できるESModules対応で依存モジュールはURLによってインポートする権限管理が厳密フォーマッタやテストランナなどの便利機能がランタイムに付属まずTypeScriptについて、DenoはTypeScriptで書いたスクリプトを直接実行することができます。 |
2022-02-24 23:36:40 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
【Rails】ログイン機能をGem 'devise'で実装 |
https://qiita.com/iloveomelette/items/f46ec39069ef03ee6110
|
Gemfilegemdevise挿入ができましたら次はターミナルにて以下のコマンドを実行してgemをインストールします。 |
2022-02-24 23:47:01 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
[AtCoder 初心者] Rubyで競プロ!!! 標準入力 |
https://qiita.com/bashiddd/items/4cbf6e2f10bdb0a9513a
|
testrbAgetschomptoiBgetspApB例Aに、Bにを入力標準入力出力n行の複数の要素を取得testrbAgetschompspiltpA例を入力標準入力出力・splitメソッドは引数に従って、文字列を分割し、分割された文字列を要素とする配列をつくる。 |
2022-02-24 23:15:00 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
docker-composeするまでに行うこと |
https://qiita.com/keistudyfight/items/b57809adca82f99e5080
|
dockerrundpdockergettingstarted再度、dockerpsを試してみます。 |
2022-02-24 23:21:16 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
【Rails】ログイン機能をGem 'devise'で実装 |
https://qiita.com/iloveomelette/items/f46ec39069ef03ee6110
|
Gemfilegemdevise挿入ができましたら次はターミナルにて以下のコマンドを実行してgemをインストールします。 |
2022-02-24 23:47:01 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
クエリパラメータ |
https://qiita.com/takapashi/items/becf2aa03d7d570c342c
|
キーパラメータキーパラメータの値はURLエンコード値の表記に使用できない文字を含めたい場合は、「URLエンコード」あるいは「パーセントエンコーディング」と呼ばれる方式で安全な文字列に変換。 |
2022-02-24 23:13:49 |
技術ブログ |
Developers.IO |
L@EやCF2を使わずにレスポンスヘッダーを設定するCloudFront DistributionをAWS CDKで構築してみた |
https://dev.classmethod.jp/articles/build-cloudfront-distribution-with-the-aws-cdk-with-aws-cdk/
|
cloudfrontdis |
2022-02-24 14:40:10 |
技術ブログ |
Developers.IO |
Gatsbyは静的サイトだけじゃない。Gatsby Funcstionsで問い合わせフォームを作ってみた。 |
https://dev.classmethod.jp/articles/gatsby-functions-contact/
|
functions |
2022-02-24 14:13:40 |
技術ブログ |
Developers.IO |
[Snowflake新機能]タスクがEXECUTE TASKコマンドにより手動実行できるようになりました #SnowflakeDB |
https://dev.classmethod.jp/articles/snowflake-execute-task-command/
|
executetask |
2022-02-24 14:09:50 |
海外TECH |
Ars Technica |
1.7 million Hondas are being investigated for phantom braking |
https://arstechnica.com/?p=1836373
|
automatic |
2022-02-24 14:20:30 |
海外TECH |
Ars Technica |
Intel NUC 12 Extreme review: Alder Lake makes for a pricey, portable powerhouse |
https://arstechnica.com/?p=1836270
|
canyon |
2022-02-24 14:00:37 |
海外TECH |
MakeUseOf |
How to Change the Email and Phone Number on Your Facebook Account |
https://www.makeuseof.com/how-to-change-email-phone-number-facebook/
|
facebook |
2022-02-24 14:45:13 |
海外TECH |
MakeUseOf |
How to Calculate the Area Under a Plotted Curve in Excel |
https://www.makeuseof.com/how-to-calculate-area-under-plotted-curve-excel/
|
information |
2022-02-24 14:30:13 |
海外TECH |
MakeUseOf |
Drowning in Tweets? Here’s How to Use Twitter Lists to Unclutter Your Feed |
https://www.makeuseof.com/tag/drowning-in-tweets-how-to-use-twitter-lists-to-unclutter-your-feed/
|
excellent |
2022-02-24 14:16:12 |
海外TECH |
MakeUseOf |
What Do "Dual Core" and "Quad Core" Mean? |
https://www.makeuseof.com/tag/what-does-dual-core-and-quad-core-mean-makeuseof-explains/
|
What Do amp quot Dual Core amp quot and amp quot Quad Core amp quot Mean These days most CPUs are dual core quad core or octo core But what does that even mean Here s everything explained |
2022-02-24 14:05:13 |
海外TECH |
DEV Community |
Paracetamol.js💊| #63: Explica este código JavaScript |
https://dev.to/duxtech/paracetamoljs-63-explica-este-codigo-javascript-57ph
|
Paracetamol js Explica este código JavaScript Explica este código JavaScriptlet name Lydia function getName console log name let name Sarah getName A Lydia B Sarah C undefined D ReferenceErrorRespuesta en el primer comentario |
2022-02-24 14:34:20 |
海外TECH |
DEV Community |
External code in Unreal Engine game source |
https://dev.to/goals/external-code-in-unreal-engine-game-source-414o
|
External code in Unreal Engine game sourceIntroductionAs many game developers know the Git MB files size limit renders vanilla Git useless For us LFS did not seem like a viable option we may post our full report regarding selecting version tracker later and we ended up gong with Plastic SCM So what we have now is A game build on Unreal Engine We are using the source version of the engine as we need to touch engine code Full game and engine source as well as game data stored in a Plastic SCM repository All cloud services backend code and shared code stored in our GitHub repository To be able to work with faster iteration times outside the engine use the Git workflows and tool sets and potentially share code with other Goals services we have introduced the External Packages Workflow In a nutshell it is a GitHub repository inside the Goals game source and it allows for a couple of workflows Iterate rapidly on a library and its tests outside the engine source Iterate on a library committing to the GitHub repository but while testing it as part of the game source Iterate on a library when using it as part of another goals service Allow packages to be both Bazel packages and Unreal source at the same time without interfering with each other For the remainder of this article I will use the Goals game ai library as an example It could also be used for instance for shared Protobuf definitions files or something similar The key is that you can put anything there that does not interfere with Unreal build system Defining which packages to useSince there was no natural place to add a list of external packages that we needed to use we introduced the Packages goals file that lives in the root of the Game source This is a text file with a pretty self explanatory syntax Defines which external Goals packages should be added to the source If the Commit hash releaese is omitted latests will be fetched Format Package name Remote git url Commit hash Release tag Game AIgame ai adedbaccceccaWrapping Setup sh batTo achieve this without adding an extra thing you have to do each time you sync we introduced GoalsSetup sh bat What GoalsSetup does is Wrap the Setup sh bat files shipped with Unreal and only run it if needed Check if there are any missing external code repositories missing as defined by the Packages goals file and if there are fetch or update Check if one of the external repositories have been touched locally i e git status porcelain and if it has leave it alone So as a coder the only thing you have to do after you sync the main game repository is run GoalsSetup and everything should be dandy It is our goal to not have any other dependencies that are needed on your machine apart from the ones dictated by working with unreal which is essentially a compiler Hooking into Unreal build systemThe easiest way to hook into unreal build system is to look at all external packages as one Packages module This way unreal build system can parse the source for the needed files and add them as dependencies for the game So create a new module by adding a build file in your source For example Packages Build cs using UnrealBuildTool public class Packages ModuleRules public Packages ReadOnlyTargetRules Target base Target PCHUsage PCHUsageMode UseExplicitOrSharedPCHs PrivateDependencyModuleNames AddRange new string Now in your game add this module as a dependency For example in Game Build cs using UnrealBuildTool public class Game ModuleRules public Game ReadOnlyTargetRules Target base Target PCHUsage PCHUsageMode UseExplicitOrSharedPCHs PublicDependencyModuleNames AddRange new string Packages Now each time you build your game project the source of the Packages module will be parsed and needed files added to the project Here is what it could look like in your source Note that the external package game ai has some Git and Bazel related files in it but that is fine And now for each package we add to the Packages goals text file a new directory is created on the side of the game ai directory above and its files included in the game build Left to do and caveatsWe still need to be able to handle including more complex packages This could be for instance packages with source files that should not be included test files or files that are disruptive to the Unreal build system This could be handled in Packages Build cs above by excluding certain directories Maybe ones the include the word test for example See how this is done in for instance RuntimeMeshLoader If we want to include packages that depend on other packages we would have to make sure the include paths are the same and the libraries available but ideally all the external packages are atomic and do not rely on other things |
2022-02-24 14:30:07 |
海外TECH |
DEV Community |
Tutorial: build DApp with Web3-React and SWR |
https://dev.to/yakult/tutorial-build-dapp-with-web3-react-and-swr-1fb0
|
Tutorial build DApp with Web React and SWRIn the tutorial build DAPP with hardhat React and Ethers js we connect and interact with the blockchain using ethers js directly It is OK but there are too many works need to be done by ourselves We would rather use frameworks to help us with three jobs maintain context and connect with blockchain connect to different kinds of blockchain providers manage query to blockchain more efficiently Web React a connecting framework for React and Ethereum can help us with job amp Web React is an open source framework developed Uniswap engineering Lead Noah Zinsmeister We will focus on job SWR can help us read blockchains more efficiently SWR stale while revalidate is a library of react hooks for data fetching I learn SWR from the Consensys tutorial by Lorenzo Sicilia How to Fetch and Update Data From Ethereum with React and SWR I am still trying to find a framework to help us with Event The Graph sub graph is one of the good choices The Graph is widely used by DeFi applications In Nader Dabit s guide The Complete Guide to Full Stack Web Development he gives us great advice on how to use sub graph Special thanks to Lorenzo Sicilia and his tutorial I adapted the flow and some code snippets from him only changed to using Web React You can find the code repos for this tutorial Hardhat project Webapp project Let s begin to build with our DApp using Web React Task Prepare webapp project and smartcontractFirst half of Task is the same as the ones in Tutorial build DApp with Hardhat React and ethers js Please refer to that tutorial Tutorial build DApp with Hardhat React and ethers js Task setup development environment Task Install Hardhat and init a Hardhat project Task Development Circle in Hardhat Task MetaMask Switch Local testnet Task Create webapp with Next js and Chakra UI Task Edit webapp header layout app tsx index tsxWe choose to download the webapp code from github repo In your hhproject directory git clone webappcd webappyarn installyarn devWe have a project directory to build hhproject chain working dir for hardhat contracts test scripts webapp working dir for NextJS app src pages components We also need to prepare an ERC token ClassToken for DApp to interact with This is the second half of Task This job can be done same as Task of Tutorial build DApp with Hardhat React and ethers js Task Build ERC smart contract using OpenZeppelin Task Write ERC smart contract Task Compile smart contract Task Add unit test script Task Add deploy script Task Run stand alone testnet again and deploy to it Task Interact with ClassToken in hardhat console Task Add token to MetaMaskNow we have ClassToken deployed to local testnet xFbDBafecbfdFfaa Task Add Web React to our webapp Connect button Task Understanding Web ReactFrom my point of view Web React is a web blockchain connecting framework which provides three features we need WebReactProvder a react context we can access throughout our web app useWebReact handy react hook to interact with blockchain Connectors of several kinds of blockchain providers such as MetaMask browser extension RPC connector Alchemy and Infura QR code connector WalletConnect Hardware connector Ledger Trezor Currently Web React has stable V and beta V We will use V in our tutorial Task install Web React Ethers js and add WebReactProvderSTEP install dependenciesIn the webapp directory run yarn add web react coreyarn add web react injected connectoryarn add ethersyarn add swrWe will use swr later STEP edit pages app tsx src pages app tsximport ChakraProvider from chakra ui react import type AppProps from next app import Layout from components layout import WebReactProvider from web react core import WebProvider from ethersproject providers function getLibrary provider any WebProvider const library new WebProvider provider return library function MyApp Component pageProps AppProps return lt WebReactProvider getLibrary getLibrary gt lt ChakraProvider gt lt Layout gt lt Component pageProps gt lt Layout gt lt ChakraProvider gt lt WebReactProvider gt export default MyAppExplanations We add a react context provider WebReactProvider in app tsx Blockchain provider library is an ethers js WebProvider which we can add connector and activate later using hooks Task add an empty ConnectMetamask componentThe relationship between connector provider and signer in ethers js is illustrated in the graph In this sub task we will add an empty ConnectMetamask component STEP Add src components ConnectMetamask tsx import useEffect from react import useWebReact from web react core import WebProvider from ethersproject providers import Box Button Text from chakra ui react import injected from utils connectors import UserRejectedRequestError from web react injected connector import formatAddress from utils helpers const ConnectMetamask gt const chainId account activate deactivate setError active library connector useWebReact lt WebProvider gt const onClickConnect gt activate injected error gt if error instanceof UserRejectedRequestError ignore user rejected error console log user refused else setError error false const onClickDisconnect gt deactivate useEffect gt console log chainId account active library connector return lt div gt active amp amp typeof account string lt Box gt lt Button type button w onClick onClickDisconnect gt Account formatAddress account lt Button gt lt Text fontSize sm w my align center gt ChainID chainId connected lt Text gt lt Box gt lt Box gt lt Button type button w onClick onClickConnect gt Connect MetaMask lt Button gt lt Text fontSize sm w my align center gt not connected lt Text gt lt Box gt lt div gt export default ConnectMetamaskSTEP define a injected connector in uitls connectors tsx import InjectedConnector from web react injected connector export const injected new InjectedConnector supportedChainIds STEP add a helper in utils helpers tsxexport function formatAddress value string length number return value substring length value substring value length length STEP add ConnectMetamask component to index tsximport ConnectMetamask from components ConnectMetamask lt ConnectMetamask gt STEP run web app by running yarn devExplanation of what we do here We get hooks from useWebReact chainId account activate deactivate setError active library connectorWhen a user clicks connect we call activate injected inject is InjectedConnector mostly it means window ethereum injected by MetaMask that we can configure When user click disconnect we call decativate The library is the ethers js WebProvider we can use Specifically the library is an ethers js provider which can be used to connect and read blockchain If we want to send transaction to blockchain write we will need to get ethers js signer by call provider getSiger Task Read from blockchain ETHBalanceWe will use Web React to read from smart contract Task Add ETHbalance tsx first attemp Add a component to get the ETH balance of current account Add components ETHBalance tsximport useState useEffect from react import useWebReact from web react core import WebProvider from ethersproject providers import Text from chakra ui react import formatEther from ethersproject units const ETHBalance gt const ethBalance setEthBalance useState lt number undefined gt undefined const account active library chainId useWebReact lt WebProvider gt const provider library useEffect gt if active amp amp account provider getBalance account then result gt setEthBalance Number formatEther result return lt div gt active lt Text fontSize md w my align left gt ETH in account ethBalance toFixed chainId Test ETH lt Text gt lt Text fontSize md w my align left gt ETH in account lt Text gt lt div gt export default ETHBalanceEdit pages index tsx to display ETHBalance lt Box mb p w borderWidth px borderRadius lg gt lt Heading my fontSize xl gt ETH Balance lt Heading gt lt ETHBalance gt lt Box gt The problem with this is how to constantly sync the results ETH balance with blockchain Lorenzo Sicilia suggests to use SWR with events listening to get data more efficiently The SWR project homepage says SWR is a strategy to first return the data from cache stale then send the fetch request revalidate and finally come with the up to date data With SWR components will get a stream of data updates constantly and automatically The UI will always be fast and reactive Task Add ETHBalanceSWR tsx second attemp Add components ETHBalanceSWR tsximport useState useEffect from react import useWebReact from web react core import WebProvider from ethersproject providers import Text from chakra ui react import formatEther from ethersproject units import useSWR from swr const fetcher library any gt args any gt const method params args return library method params const ETHBalanceSWR gt const account active library chainId useWebReact lt WebProvider gt const data balance mutate useSWR getBalance account latest fetcher fetcher library console log ETHBalanceSWR balance useEffect gt if library return listen for changes on an Ethereum address console log listening for blocks library on block gt console log update balance mutate undefined true remove listener when the component is unmounted return gt library removeAllListeners block trigger the effect only on component mount changed to library prepared library return lt div gt active amp amp balance lt Text fontSize md w my align left gt ETH in account parseFloat formatEther balance toFixed chainId Test ETH lt Text gt lt Text fontSize md w my align left gt ETH in account lt Text gt lt div gt export default ETHBalanceSWRAdd ETHBalanceSWR component to index tsx lt Box mb p w borderWidth px borderRadius lg gt lt Heading my fontSize xl gt ETH Balance lt b gt using SWR lt b gt lt Heading gt lt ETHBalanceSWR gt lt Box gt Explanations We use SWR to fetch data which calls provider getBalance address blockTag latest ethers docs link The library is a web provider const data balance mutate useSWR getBalance account latest fetcher fetcher library The fetcher is constructed as const fetcher library any gt args any gt const method params args return library method params We get mutate of SWR to change its internal cache in the client We mutate balance to undefined in every block so SWR will query and update for us library on block gt console log update balance mutate undefined true When library provider changes and we have a provider the side effect useEffect will add a listener to blockchain new block event Block events are emitted on every block change Let s play with the webapp Send test ETH from Hardhat local testnet Account xfFdeaadFFceaBcffFb to Account xCdcACdbeddcC Check that the ETH balance of current account Account changes accordingly More explanations about SWR can be found at Lorenzo Sicilia s blockchain tutorial link SWR documents link Task Read Listen Interact with smart contractIn this task we will read data using SWR from smart contract We use smart contract event listening to get updates Task Add ERCABI tsxAdd abi ERCABI tsx for standard ERC export const ERCABI Read Only Functions function balanceOf address owner view returns uint function totalSupply view returns uint function decimals view returns uint function symbol view returns string Authenticated Functions function transfer address to uint amount returns bool Events event Transfer address indexed from address indexed to uint amount Add components ReadERC tsximport React useEffect useState from react import useWebReact from web react core import WebProvider from ethersproject providers import Contract from ethersproject contracts import formatEther from ethersproject units import Text from chakra ui react import useSWR from swr import ERCABI as abi from abi ERCABI interface Props addressContract string const fetcher library WebProvider undefined abi any gt args any gt if library return const arg arg params args const address arg const method arg const contract new Contract address abi library return contract method params export default function ReadERC props Props const addressContract props addressContract const symbol setSymbol useState lt string gt const totalSupply setTotalSupply useState lt string gt const account active library useWebReact lt WebProvider gt const data balance mutate useSWR addressContract balanceOf account fetcher fetcher library abi useEffect gt if active amp amp account amp amp library return const erc Contract new Contract addressContract abi library library getCode addressContract then result string gt check whether it is a contract if result x return erc symbol then result string gt setSymbol result catch error console error erc totalSupply then result string gt setTotalSupply formatEther result catch error console error called only when changed to active active useEffect gt if active amp amp account amp amp library return const erc Contract new Contract addressContract abi library listen for changes on an Ethereum address console log listening for Transfer const fromMe erc filters Transfer account null erc on fromMe from to amount event gt console log Transfer sent from to amount event mutate undefined true const toMe erc filters Transfer null account erc on toMe from to amount event gt console log Transfer received from to amount event mutate undefined true remove listener when the component is unmounted return gt erc removeAllListeners toMe erc removeAllListeners fromMe trigger the effect only on component mount active account return lt div gt lt Text gt ERC Contract addressContract lt Text gt lt Text gt token totalSupply totalSupply symbol lt Text gt lt Text my gt ClassToken in current account balance parseFloat formatEther balance toFixed symbol lt Text gt lt div gt Add ReadERC to index tsx const addressContract xfbdbafecbfdffaa lt Box my p w borderWidth px borderRadius lg gt lt Heading my fontSize xl gt ClassToken ERC Smart Contract lt Heading gt lt ReadERC addressContract addressContract gt lt Box gt Some explanations We query data from blockchain and smart contract by calling contract balanceOf const data balance mutate useSWR addressContract balanceOf account fetcher fetcher library ERCABI The fetcher is constructed as const fetcher library WebProvider undefined abi any gt args any gt if library return const arg arg params args const address arg const method arg const contract new Contract address abi library return contract method params When ethereum network connection is changed to active query symbol and totalSupply Since these two are non changable constants we only query them once Add listener when change to active or account change Two listeners are added events transfer ERC token to account and from account listen for changes on an Ethereum address console log listening for Transfer const fromMe erc filters Transfer account null erc on fromMe from to amount event gt console log Transfer sent from to amount event mutate undefined true const toMe erc filters Transfer null account erc on toMe from to amount event gt console log Transfer received from to amount event mutate undefined true Result Task Write Interact with smart contractIn this task we will add TransferERC tsx Edit components TransferERC tsximport React useState from react import useWebReact from web react core import WebProvider from ethersproject providers import Contract from ethersproject contracts import parseEther from ethersproject units import Button Input NumberInput NumberInputField FormControl FormLabel from chakra ui react import ERCABI from abi ERCABI interface Props addressContract string export default function TransferERC props Props const addressContract props addressContract const toAddress setToAddress useState lt string gt const amount setAmount useState lt string gt const account active library useWebReact lt WebProvider gt async function transfer event React FormEvent event preventDefault if active amp amp account amp amp library return new contract instance with signer const erc new Contract addressContract ERCABI library getSigner erc transfer toAddress parseEther amount catch error console error const handleChange value string gt setAmount value return lt div gt lt form onSubmit transfer gt lt FormControl gt lt FormLabel htmlFor amount gt Amount lt FormLabel gt lt NumberInput defaultValue amount min max onChange handleChange gt lt NumberInputField gt lt NumberInput gt lt FormLabel htmlFor toaddress gt To address lt FormLabel gt lt Input id toaddress type text required onChange e gt setToAddress e target value my gt lt Button type submit isDisabled account gt Transfer lt Button gt lt FormControl gt lt form gt lt div gt Add TransferERC in index tsx lt Box my p w borderWidth px borderRadius lg gt lt Heading my fontSize xl gt Transfer ClassToken ERC token lt Heading gt lt TransferERC addressContract addressContract gt lt Box gt You can find that the web app is structured well and simply by using Web React Web React gives us context provider and hooks we can use easily From now on you can begin to write your own DAPPs Tutorial list A Concise Hardhat Tutorial parts Understanding Blockchain with ethers js parts Tutorial build your first DAPP with Remix and Etherscan Tasks Tutorial build DApp with Hardhat React and ethers js Tasks Tutorial build DAPP with Web React and SWR Tutorial write upgradeable smart contract proxy using OpenZeppelin Tasks If you find this tutorial helpful follow me at Twitter fjun |
2022-02-24 14:18:38 |
海外TECH |
DEV Community |
Ownership and borrowing. Rust Tutorial:4 |
https://dev.to/dumboprogrammer/ownership-and-borrowing-rust-tutorial4-2hik
|
Ownership and borrowing Rust Tutorial Understanding OwnershipOwnership is Rust s most unique and famous feature and has deep implications for the rest of the language It enables Rust to make memory safety guarantees without needing a garbage collector so it s important to understand how ownership works In this blog we ll talk about ownership as well as several related features borrowing slices and how Rust lays data out in memory What Is Ownership Ownership is a set of rules that governs how a Rust program manages memory All programs have to manage the way they use a computer s memory while running Some languages have garbage collection that constantly looks for no longer used memory as the program runs in other languages the programmer must explicitly allocate and free the memory Rust uses a third approach memory is managed through a system of ownership with a set of rules that the compiler checks If any of the rules are violated the program won t compile None of the features of ownership will slow down your program while it s running Because ownership is a new concept for many programmers it does take some time to get used to The good news is that the more experienced you become with Rust and the rules of the ownership system the easier you ll find it to naturally develop code that is safe and efficient Keep at it When you understand ownership you ll have a solid foundation for understanding the features that make Rust unique In this chapter you ll learn ownership by working through some examples that focus on a very common data structure strings The Stack and the Heap Many programming languages don t require you to think about the stack and the heap very often But in a systems programming language like Rust whether a value is on the stack or the heap affects how the language behaves and why you have to make certain decisions Parts of ownership will be described in relation to the stack and the heap later in this chapter so here is a brief explanation in preparation Both the stack and the heap are parts of memory available to your code to use at runtime but they are structured in different ways The stack stores values in the order it gets them and removes the values in the opposite order This is referred to as last in first out Think of a stack of plates when you add more plates you put them on top of the pile and when you need a plate you take one off the top Adding or removing plates from the middle or bottom wouldn t work as well Adding data is called pushing onto the stack and removing data is called popping off the stack All data stored on the stack must have a known fixed size Data with an unknown size at compile time or a size that might change must be stored on the heap instead The heap is less organized when you put data on the heap you request a certain amount of space The memory allocator finds an empty spot in the heap that is big enough marks it as being in use and returns a pointer which is the address of that location This process is called allocating on the heap and is sometimes abbreviated as just allocating Pushing values onto the stack is not considered allocating Because the pointer to the heap is a known fixed size you can store the pointer on the stack but when you want the actual data you must follow the pointer Think of being seated at a restaurant When you enter you state the number of people in your group and the staff finds an empty table that fits everyone and leads you there If someone in your group comes late they can ask where you ve been seated to find you Pushing to the stack is faster than allocating on the heap because the allocator never has to search for a place to store new data that location is always at the top of the stack Comparatively allocating space on the heap requires more work because the allocator must first find a big enough space to hold the data and then perform bookkeeping to prepare for the next allocation Accessing data in the heap is slower than accessing data on the stack because you have to follow a pointer to get there Contemporary processors are faster if they jump around less in memory Continuing the analogy consider a server at a restaurant taking orders from many tables It s most efficient to get all the orders at one table before moving on to the next table Taking an order from table A then an order from table B then one from A again and then one from B again would be a much slower process By the same token a processor can do its job better if it works on data that s close to other data as it is on the stack rather than farther away as it can be on the heap Allocating a large amount of space on the heap can also take time When your code calls a function the values passed into the function including potentially pointers to data on the heap and the function s local variables get pushed onto the stack When the function is over those values get popped off the stack Keeping track of what parts of code are using what data on the heap minimizing the amount of duplicate data on the heap and cleaning up unused data on the heap so you don t run out of space are all problems that ownership addresses Once you understand ownership you won t need to think about the stack and the heap very often but knowing that the main purpose of ownership is to manage heap data can help explain why it works the way it does Ownership Rules First let s take a look at the ownership rules Keep these rules in mind as we work through the examples that illustrate them Each value in Rust has a variable that s called its owner There can only be one owner at a time When the owner goes out of scope the value will be dropped Variable Scope Now that we re past basic Rust syntax we won t include all the fn main code in examples so if you re following along make sure to put the following examples inside a main function manually As a result our examples will be a bit more concise letting us focus on the actual details rather than boilerplate code As a first example of ownership we ll look at the scope of some variables A scope is the range within a program for which an item is valid Take the following variable let s hello The variable s refers to a string literal where the value of the string is hardcoded into the text of our program The variable is valid from the point at which it s declared until the end of the current scope Listing shows a program with comments annotating where the variable s would be valid s is not valid here it s not yet declared let s hello s is valid from this point forward do stuff with s this scope is now over and s is no longer valid A variable and the scope in which it is validIn other words there are two important points in time here When s comes into scope it is valid It remains valid until it goes out of scope At this point the relationship between scopes and when variables are valid is similar to that in other programming languages Now we ll build on top of this understanding by introducing the String type The String Type To illustrate the rules of ownership we need a data type that is more complex than those we covered before The types covered previously are all a known size can be stored on the stack and popped off the stack when their scope is over and can be quickly and trivially copied to make a new independent instance if another part of code needs to use the same value in a different scope But we want to look at data that is stored on the heap and explore how Rust knows when to clean up that data and the String type is a great example We ll concentrate on the parts of String that relate to ownership These aspects also apply to other complex data types whether they are provided by the standard library or created by you We ll discuss String in more depth in Chapter We ve already seen string literals where a string value is hardcoded into our program String literals are convenient but they aren t suitable for every situation in which we may want to use text One reason is that they re immutable Another is that not every string value can be known when we write our code for example what if we want to take user input and store it For these situations Rust has a second string type String This type manages data allocated on the heap and as such is able to store an amount of text that is unknown to us at compile time You can create a String from a string literal using the from function like so let s String from hello The double colon operator allows us to namespace this particular from function under the String type rather than using some sort of name like string from We ll discuss this later This kind of string can be mutated let mut s String from hello s push str world push str appends a literal to a String println s This will print hello world So what s the difference here Why can String be mutated but literals cannot The difference is how these two types deal with memory Memory and AllocationIn the case of a string literal we know the contents at compile time so the text is hardcoded directly into the final executable This is why string literals are fast and efficient But these properties only come from the string literal s immutability Unfortunately we can t put a blob of memory into the binary for each piece of text whose size is unknown at compile time and whose size might change while running the program With the String type in order to support a mutable growable piece of text we need to allocate an amount of memory on the heap unknown at compile time to hold the contents This means The memory must be requested from the memory allocator at runtime We need a way of returning this memory to the allocator when we re done with our String That first part is done by us when we call String from its implementation requests the memory it needs This is pretty much universal in programming languages However the second part is different In languages with a garbage collector GC the GC keeps track of and cleans up memory that isn t being used anymore and we don t need to think about it In most languages without a GC it s our responsibility to identify when memory is no longer being used and call code to explicitly return it just as we did to request it Doing this correctly has historically been a difficult programming problem If we forget we ll waste memory If we do it too early we ll have an invalid variable If we do it twice that s a bug too We need to pair exactly one allocate with exactly one free Rust takes a different path the memory is automatically returned once the variable that owns it goes out of scope Here s a version of our scope example from Listing using a String instead of a string literal let s String from hello s is valid from this point forward do stuff with s this scope is now over and s is no longer valid There is a natural point at which we can return the memory our String needs to the allocator when s goes out of scope When a variable goes out of scope Rust calls a special function for us This function is called drop and it s where the author of String can put the code to return the memory Rust calls drop automatically at the closing curly bracket Return Values and ScopeReturning values can also transfer ownership Listing shows an example of a function that returns some value with similar annotations as those in Listing Filename src main rs fn main let s gives ownership gives ownership moves its return value into slet s String from hello s comes into scopelet s takes and gives back s s is moved into takes and gives back which also moves its return value into s Here s goes out of scope and is dropped s was moved so nothing happens s goes out of scope and is dropped fn gives ownership gt String gives ownership will move its return value into the function that calls itlet some string String from yours some string comes into scope This function takes a String and returns one fn takes and gives back a string String gt String a string comes int scopea string a string is returned and moves out to the calling function Transferring ownership of return values The ownership of a variable follows the same pattern every time assigning a value to another variable moves it When a variable that includes data on the heap goes out of scope the value will be cleaned up by drop unless ownership of the data has been moved to another variable While this works taking ownership and then returning ownership with every function is a bit tedious What if we want to let a function use a value but not take ownership It s quite annoying that anything we pass in also needs to be passed back if we want to use it again in addition to any data resulting from the body of the function that we might want to return as well Rust does let us return multiple values using a tuple Filename src main rs fn main let s String from hello let s len calculate length s println The length of is s len fn calculate length s String gt String usize let length s len len returns the length of a String s length Returning ownership of parameters But this is too much ceremony and a lot of work for a concept that should be common Luckily for us Rust has a feature for using a value without transferring ownership called references |
2022-02-24 14:10:48 |
海外TECH |
DEV Community |
Learn JavaScript Arrays |
https://dev.to/mwendwabundi/learn-javascript-arrays-36o6
|
Learn JavaScript ArraysIn JavaScript we use arrays to store a list of values Arrays are always numbered starting from This means that the nd element in your array is at number while the last element is always the total number minus We will first create an array check its length and access its contents Then we will learn the methods you can use to modify your array We will finally see how you can check for the presence of an element with indexOf Let s say you want an array showing the countries you would like to visit let countries morocco kenya malawi eritrea ghana ethiopia Now lets check the length of our array console log countries length The console log returns Now lets say you quickly want to access the third country in your array It will be denoted with a remember what we said about the denoting the first index in our array its always a zero console log countries In the above case the console log will return malawiAccessing the first country console log countries The above code returns morroco which is the first country in our array Let s see how arrays can easily be modified You have decided that Egypt needs to be on the list of countries you re visiting Let s use the push method to add Egypt countries push egypt In the above case the console log countries will return morocco kenya malawi eritrea ghana ethiopia egypt The push method adds elements at the end of the array while the unshift method adds elements at the beginning Lets see the unshift works now countries unshift egypt The console log will return egypt morocco kenya malawi eritrea ghana ethiopia Sometimes you might want to remove an element In that case you use the pop and shift methods How You already guessed it right Just as push and unshift adds elements at the end and the beginning of the array respectively the pop removes at the end while shift remove elements at the beginning But you might want to add or remove elements at the middle or more than one element all at once In such a case you use the splice method Other times you might want to copy or extract elements from an array as a new array object whereby you use the slice method In my next article I will explain splice and slice intensively Checking for the presence of an element with indexOf indexOf is quite useful when say you have mutated your array so much and aren t sure if a given element exists It returns its index if it is found and returns if the element is not found Remember the countries Take a look below let countries morocco kenya malawi eritrea ghana ethiopia console log countries indexOf tanzania The console log will return because we do not have such a country in our array console log countries indexOf morocco The above console log will return because that s the index of Morocco in our array Arrays come in handy when storing your data in a tabular form For example a strict queue application or even your phone contacts among many other applications Thank you for reading comment and let me know your thoughts and I ll see you in my next article Bye |
2022-02-24 14:09:46 |
海外TECH |
DEV Community |
It *IS* possible to get a voice here! [tips to grow on DEV.to + a mini rant!] |
https://dev.to/inhuofficial/it-is-possible-to-get-a-voice-here-tips-to-grow-on-devto-a-mini-rant-27n6
|
It IS possible to get a voice here tips to grow on DEV to a mini rant I was reading a post about how hard it is to gain traction on DEV a couple of days ago go give it a read and see if you feel the same way or not It s impossible to get a voice in here Rasmus Schultz・Feb ・ min read meta I found it interesting as lots of the comments agreed and I too used to feel the same way and even catch myself feeling that way now about some of the points raised so I thought I would share my thoughts on how to grow your engagement anywhere but mainly on DEV hopefully I can give some motivation to those who find themselves lost in a sea of voices and are feeling like you will never gain traction And just to show I kind of know what I am on about views post reactions followers posts comments yeah those who know me know I am opinionated And that was in months as I haven t released much this year I have been writing just building up a buffer you will see me back in full force in March Anyway with the humble brag out of the way here are my tips and if you fancy it a rant at the end on content creation and my views on the frustration many of us experience Enjoy Consistency is keyIt doesn t matter if you are trying to feed the beast that is Twitter or writing once a month as a hobby on DEV consistency is the number priority What I say to a lot of new writers content creators is to work out how much content you think you can create in a week then halve it It is much better to release an article regularly every or weeks than it is to release sporadically I should know I was guilty of this People quickly pick up on patterns even subconsciously so if you post at a certain time at a regular interval people will start anticipating your articles Know what your goals are and write accordinglyA lot of new writers want views There is nothing wrong with that in fact you get a lot of people advising just write what you want to write Those people have forgotten the frustration of releasing an epic piece of content and getting views Something you have poured your blood sweat and tears into over numerous hours or even days and crickets So what do we do One for them one for youYet again I made this mistake and certainly hurt my early engagement I wrote what I wanted to write Instead I would recommend that if you are a new writer who wants to grow and still write about what interests you to write one for them a pandering article more on that in a second and one for you something you are passionate about but it might be a bit too niche for the platform So what is a pandering article what will get engagement on DEV Anything for beginners and code newbies and anything JavaScript specifically React Or listicles everyone loves a amazing tips listicle as it is low effort to read and you might learn something I may not like these kinds of articles but they garner engagement and followers and followers and engagement means growth Also don t be fooled that just because people click on these low brow articles they won t engage with your more complex stuff they will generally people will engage with your content once they follow you and that is where the true and meaningful engagement starts to happen Quantity firstYet again this is a beginners guide to growth Here is a little secret nobody will care what you write or remember your name for the first few months of writing you need to build a reputation and earn the right to expect people to invest time consuming your content It might seem like a bad thing but it is actually a great thing You can produce lower effort posts in higher quantities and get those all important early eyeballs The trick is to produce quality quantity and that takes practice And how do we practice By writing of course So while you are starting out just practice writing structuring your content to make it easy to consume etc You are aiming for half decent articles as quickly as possible for them and for you Don t worry about perfection early on just get your points across and make sure they add value in some way yes even a listicle can add value if you put in a tiny bit of effort This gives you a good base to grow from and means that when people discover you they can see that you have plenty to say Then once you have a base you can put more time into crafting higher quality content as you will get more views so you worry about that less As long as you stay on topic you will not lose many followers Plus this early stage of getting to critical mass will help you hone your writing style and structuring articles etc I mentioned quality quantity if you want to see an example of quality quantity check out ltag user id follow action button background color cbba important color cddd important border color cbba important Chris BongersFollow Looking to get into development As a full stack developer I guide you on this journey and give you bite sized tips every single day Chris is a content machine an article every single day but also writes very well That is why you should just write Chris s writing improved with effort and repetition to the point now where you would be hard pressed to find a flaw in any of his work If you look at Chris s early writing it wasn t raw talent although he certainly has some of it but repetition and practice that turned him into such a great writer Note I am not suggesting you release as much content as Chris or even that you should consider putting that kind of pressure on your content creation Chris is a bit of a unicorn just do what you feel you can do comfortably and enjoy yourself Engage with a communityLook you might be lucky and get a mega viral article in your first week on DEV I can tell you that it is unlikely to happen In fact I have never had a single article break k views No instead I engaged with other authors You see authors want that engagement it is one of the reasons people write to make connections So if you are the one engaging with their content they are far more likely to check out your profile and see that you produce content too Additionally it gives you a quick way to get more eyeballs on what you have to say For example Here is what many would call a low effort post What are your tips for an effective developer resumé Ben Halpern・Jan ・ min read beginners discuss career resume And they are right the post itself would not have taken Ben long to write and it got a lot of engagement But bear in mind that Ben has released loads of different types of content in various formats nearly all of it super high quality he has earned high engagement through consistent effort and that is what you need to do Anyway the point wasn t the post itself it was my comment there likes on a comment that is more than most of my articles I can tell you because I watch my notifications carefully I got about followers from that one comment it is a rough guess but I see a like from someone then a follow immediately after plus a couple of article likes from them and I can guess that comment was the discovery point of my work But for the other comments they may only get like from the post author But that post author if I comment on their stuff often will likely follow me They may even mention me in their article and get more some views if I have written something relevant Hell if you comment often enough and people start to recognise you as someone who contributes to a particular subject you might even get summoned to comment This happens to me on accessibility articles quite often someone will me to come and check the accuracy of an article You don t think that would happen if I just wrote an article every months and didn t engage do you It all takes effort and time in fact if you look at my comments you will see I have written essays in some of them I want to add value in my comments and by adding value I gain engagement it is a win win Also I like commenting on articles just to show support as a fellow author Writing takes effort with very little reward at first I am now at the stage I get paid to write and job offers it took time so don t underestimate how much of a boost even a single comment can give an author especially in the dark days of engagement tumbleweed posts Also if people take the time to comment on your article respond to them and put effort into your responses engagement works both ways and you have to earn follows Quick fire round tips and tricksThis article is getting long so here are a few tips that don t need as much detail people have written about extensively so I don t need to cover the same ground just as an interlude Learn to structure articlesUse proper headings lists etc Your goal is to make content easy to skim as well as read cover to cover But more than that it makes your articles more accessible and rank better for SEO learn to use HTML and markdown properly Here are some tips to write better contentBuild a social media followingI literally just turned up my Twitter game and will ramp up even more when I start releasing articles again Social media gets you a few early eyeballs on your articles Those early likes and unicorns make the article appear further up the feed so you get more likes etc I made the mistake of only building a following on one platform recycle content onto other platforms they all feed each other Make an engaging coverYour cover image will show on social media shares and in the timeline if you are lucky Make it engaging and relevant I cheated and just created a standard template for mine branding is important too But if you don t want to do that pick an interesting image or a GIF if appropriate visuals get more engagement Write in conversational styleWrite to the person reading your article you we us as if you are chatting with them it will increase engagement Ask for follows and sharesI made this mistake basically this whole article is don t do what I used to do if you want followers ask for them Just a simple call to action at the end of your article with what you want people to do Follow you share on social media etc etc Also try and give them a reason I write every week about XXX follow me so you don t miss out Recycle contentWriting content takes time and effort So recycle it Pick out key sentences and tweet them create an infographic if appropriate etc The more different mediums you can create your content in the better Put time into promotionAnother one of my mistakes seeing a pattern here Don t release content and expect it to magically go viral Make it happen In fact I have changed my whole release schedule so of my time is spent on promoting what I write and building connections with people who might enjoy my content promote it naturally Build it and they will come is a complete myth shout about it and grow is what I say A dirty little secretHere is a tip that is as close to a growth hack as you will get from me Heart unicorn and bookmark your own article and leave a comment on it the second your publish It helps your feed position it makes the article more attractive in the feed people are more likely to skip your article if it has no reactions and it gives you a tiny boost It feels a bit weird at first but for the sake of seconds it is worth it OK did you enjoy that interlude Back to the main tips Develop your tone of voice I am or was recent events mean those are not going to happen here on DEV anymore the angry rants person I developed a writing style that worked for me I showed some personality and you should too Whether that is with comedic GIFs please don t overdo it emojis same again a couple is fine jokes or dark humour not suitable for DEV find what works for you People read your content as much for your writing style as they do for your content People also read your content because they get to like you as a person and want to support you Make it interesting make it engaging give people a reason to come back for more and a reason to read your stuff over the other articles about the same subject Tags matter a lotI know DEV are trying to improve their feed but it will nearly always revolve around tags So if you write in a quiet tag be prepared for fewer views I write in ay often I always expect my articles there to perform worse than articles in javascript Going back to the one for them method write articles that fit with popular tags and use those tags JavaScript Beginners Tutorial CSS React they all perform well Oh and for nearly any article the webdev tag is likely to fit so use that as a fall back Take some time to look at the tags page they are ordered by popularity well number of posts which indirectly affects the people who read here and therefore content that will perform well is popular Unless you are really struggling to justify it try and use all tags you are allowed to add to an article and try and go for the more popular ones without just choosing randomly find the balance My personal take on DEV content creation and the frustrations of growth my turn to rant Note the article is over I just felt like ranting on this point and my personal views I rambled a bit but I want to leave it in and unedited as it gives you an accurate picture of my thought process Please do not read this bit if you are a person who doesn t cope well with strong opinions that differ to your own or are critical of your views instead jump down to the comments if you want and share some of your tips as I would love to hear them My rant Look we can all point fingers I have done it many times in the past but overall you can t blame DEV for your own failings That is a harsh truth but every time someone says DEV is not the place to grow or why bother writing decent content as it gets no engagement etc what they are actually saying is it didn t work for them with the way they approached it Trust me I have said it I still catch myself comparing my article s number of likes to that of a minute top productivity apps post I share the same frustrations I am one of the first to see some grifter writing listicles each week and getting thousands of views and feel myself getting annoyed But it is only when I look inward and see why I am not creating the same content as them then look outward and see why creating that type of content works so well that I can safely say I am the problem Is this what growing as a person looks like Am I finally maturing I doubt it To show you what I mean let s take the DEV feed It certainly does promote low quality crap too often So that is obviously DEVs fault right Right Well if you take a step back you realise that any algorithm will be influenced by what people want to read or at least any algorithm designed to grow a site It isn t DEVs fault that VS code plugins you have to use right now gets thousands of upvotes while a monster article on accessibility only gets a few hundred Digital Accessibility ay tips and tricks InHuOfficial・Jul ・ min read webdev html ay beginners You want high effort It took over hours You want quality Pretty sure it delivered It still did not perform well and that is just unfair surely Don t get me wrong it is top for ay for the year so it did OK but I would have expected more than views on a piece like that But is that just an unrealistic expectation Almost certainly yes This is where you need to take a step back It certainly isn t DEVs fault that listicles do well I am aware that article is technically a listicle but you hopefully know what I mean and long form content doesn t it is all about interests and attention spans etc DEV certainly can t fix that It also isn t DEVs fault that accessibility is still a secondary subject in the Developer community so doesn t have the same interest level It also isn t DEVs fault that I expected a lot more views No it is my fault I want to write about those things that are less popular I want to write long form content fewer people want to read that stuff And I might add despite the moaning it does not matter that it got low views really it got high engagement per view and helped people the views are just vanity making a difference even to just one person is what matters When you start looking at these things you start to consider things like the fact that some people don t have time to read your well crafted long form article They may be waiting for a train or eating their breakfast while doom scrolling social media feeds They might have just minutes to read something anything so a listicle will do and deliver on their expectations of time required or effort required to read it A minute read time article is not going to suit what they need This probably answers why questions do well people can start forming their thoughts on a question instantly scan read the responses and get loads of hopefully differing opinions in just a few seconds It adds value to their day and fits their current needs We can take this further as to why certain content performs better than other content The reason you get more comments on a quick question that took seconds to post rather than a long article that took hours is actually quite straight forward People write comments to share an opinion if you ask a question or make a bold statement it invites opinions So of course you will get more comments on an article like that and it will do better in the feed as comments make up part of the ranking algorithm But with all that being said there is a key factor that is less tangible does asking questions and creating listicles help your personal brand does it help build up your authority in a subject Probably not Long term that personal brand value does start to add up and results in opportunities and meaningful conversations If that is what you really want from your writing then focus on that and ignore the numbers At the same time don t see it is a bad thing asking questions and writing quick articles see it as an opportunity to grow quickly and establish a base the one for them Take the time to engage with some stuff you might see as low effort you will be surprised at the exposure you can gain for your high effort work just from participating in things that others find interesting and throwing your thoughts into the mix It took me a long time to realise I am a slow learner just because I want in depth and high quality pieces doesn t mean that everybody does I realised I should not hate on people who write listicles they are giving the people what they want Creating content takes effort even low effort content is someone sharing things with and adding things to the world I have infinitely more respect for someone who creates rather than someone who purely consumes I also do not know their personal circumstances Are they short on time and that is all they have time to create Is English a second language so listicles with less text and more graphics is in their comfort zone etc They may create that content because that is all they can create at the moment due to their own circumstances Who am I to criticise even though I do but that is my character flaw All I wish is that we could move the needle a little encourage people to engage with high effort content more Give those authors who add depth to subjects and answer those tougher questions the exposure they deserve for their effort DEV are working hard to do that and I will defend their efforts to try and move that needle in what is an almost impossible task And that is from someone who often clashes with the DEV team due to our differing ideologies Will low effort short form content ever stop cluttering your feed Given the rise of TikTok YouTube shorts twitter etc you have to take a step back and realise people like quick and short content things that are easy to consume things that are low risk do I want to read a minute article from an unknown author that might be full of errors vs a second video that may also be full of errors but I have invested far less time in Long form content is a harder thing to sell in a fast paced and over crowded space so you need to be prepared to play the long game if you want to write high effort pieces all the time I think low effort content is going to be in a feed anywhere that allows people the freedom to post without an editorial process You just have to learn to live with that and the by product that it makes it harder to get noticed in the noise So after all of that I suppose the real question is are you willing to play the game a little bit and pander Create the content people want to see and casually engage with in exchange for more meaningful engagement on your more thought provoking higher quality pieces in the future I think the answer is yes you should The short term pain of writing things that may not be for you is more than offset by the growth and the small platform it allows you to build for yourself In summary if you aren t growing it is your fault it is down to choices you make That is not saying those choices are bad but you certainly need to put in the effort and adjust your content creation if views and growth are your primary concern Once you reach a certain size pivot to writing more and more content you want to see you should hopefully have the community around you at that point to support it Thanks for reading please let me know your thoughts and any tips you have for growth in the comments Oh and don t forget to give this article a and a it really does help and is appreciated |
2022-02-24 14:08:12 |
Apple |
AppleInsider - Frontpage News |
Apple & Big Tech stocks hammered as Russian invasion breeds uncertainty |
https://appleinsider.com/articles/22/02/24/apple-big-tech-stocks-hammered-as-russian-invasion-breeds-uncertainty?utm_medium=rss
|
Apple amp Big Tech stocks hammered as Russian invasion breeds uncertaintyThe Russian invasion of Ukraine has sparked a Black Swan event in the stock market and a sell off of Apple other big tech stocks and Bitcoin is continuing on Thursday morning AAPL tumbles upon Russia invasion newsAs the United States and Europe prepare to launch more sanctions against Russia the stock market is seeing the effects of the invasion Any stock belonging to futures indexes like Dow or NASDAQ are seeing a big impact due to what is likely an approaching bear market Read more |
2022-02-24 14:50:06 |
海外TECH |
Engadget |
'OlliOlli World' is a great Switch experience, despite a few flaws |
https://www.engadget.com/olliolli-world-nintendo-switch-gameplay-143025193.html?src=rss
|
x OlliOlli World x is a great Switch experience despite a few flawsOlliOlli World the delightfully offbeat skateboarding platformer launched a few weeks ago on basically every gaming console you could ask for It s a clean break for the series taking familiar gameplay but putting it in a totally redesigned world that allows for more exploration competition and tricks You may not recall but the original OlliOlli was released in exclusively for the PS Vita before hitting more platforms over the following years That was my first exposure to the game and I played it non stop whenever I traveled for a few years the Vita was a constant companion on work trips and vacations alike I sunk untold hours into the two OlliOlli games on the Vita mastering almost everything they threw at me I was never able to hack the insane “Rad mode where you had to make every single landing perfectly or else you d slam and have to start the level over So while I was thrilled to try OlliOlli World on the PS I ve also been wondering how it works on the Switch ーwould this be my new on the go gaming addiction or do the compromises of playing on aging hardware degrade the experience After a couple weeks I m happy to say that OlliOlli World looks and plays great on the Switch Still there are a few things you ll want to know as you decide which platform to buy it on Of course the game gives up some visual fidelity on the Switch ーas with all games p when docked to a TV and p on the console s built in display is as good as it gets a far cry from the beautifully detailed K visuals you ll get on the PS or Xbox Series X OlliOlli World on the Switch does target fps similar to other consoles RollNone of these changes are surprising we all know the Switch is less powerful than modern systems But fortunately these changes largely don t make a difference The character models of your skater as well as the many people you meet across the skateboarding haven of Radlandia are indeed less detailed on the Switch What s most important is that the game s gorgeous art style still shines OlliOlli World is one of the most vibrant games I ve ever played and it looks especially vibrant on the OLED Switch s screen While it took me a few minutes to adjust to the lower resolution experience here I mostly didn t think about it once I got down to the game s core skateboarding action The difference in frame rate is more noticeable OlliOlli World is an extremely fast game one that really benefits from running at fps But despite the fact that developer Roll targeted fps for the Switch there were times that I felt like it dipped even below fps Roll did a great job of making the Switch version feel smooth enough that gameplay isn t usually impacted but sometimes the game would drop frames in a crucial moment that led to me unceremoniously slamming after a trick The vast majority of the time things stayed steady enough that it didn t impact my gameplay But there s no doubt that you ll notice dropped frames compared to how the game plays on the PS I also came across frame rate drops in other parts of the game like the animation that happens when your skater kicks off a run or the loading screen transitions that take place when moving from the map into a level These don t affect gameplay but they re hard to ignore and add to the feeling that the Switch struggles a bit to keep up with the action But the fact that the frame rate usually stays solid when you re on a course is far more important Probably the most significant compromise that comes when playing on the Switch are the Joy Con s relatively tiny analog sticks Compared to the spacious sticks on PlayStation and Xbox controllers it s a bit harder to pull off the game s more complex tricks when playing on the Switch Again though it s not a deal breaker I ve thrown down plenty of impressive runs and beat nearly every single challenge the game has thrown at me over the course of dozens of levels That said I m getting far enough into OlliOlli World on the Switch that levels are getting increasingly difficult and I m a little worried about keeping up with the more difficult levels that ll come over the two worlds I have yet to conquer yet I m confident that I ll be able to make it through basically any level the game throws at me But each level has a number of specific challenges you can optionally complete ーto truly master those I might end up docking my Switch to the TV and playing with the Switch Pro Controller which has much better analog sticks than the Joy Con On the other hand the PS Vita analog sticks are even smaller than those on the Switch and I eventually mastered two OlliOlli games on that system There s no doubt that bigger controllers make pulling off the game s tricks more comfortable and probably easier but OlliOlli World is still extremely playable on the Switch To sum it up there are a handful of compromises across graphics and gameplay if you choose to play on the Switch rather than a more powerful console But I don t think that they should stop you from playing the game on Nintendo s handheld It s a great pick up and play game the kind of title you can spend a rewarding minutes with or get lost in for multiple hours The experience is a little more refined on Sony and Microsoft s more powerful consoles but you can t easily take that on the go with you If you don t care about that snap it up on the PS or Xbox Series X S But if you re looking for a game that s at home both on your TV and away from it OlliOlli World on the Switch fits the bill perfectly |
2022-02-24 14:30:25 |
ラズパイ |
Raspberry Pi |
Computer science education for what purpose? Some perspectives |
https://www.raspberrypi.org/blog/computer-science-education-equity-change-purpose/
|
Computer science education for what purpose Some perspectivesAs we re coming to the end of Black History Month in the USA this year we ve been amazed by the variety of work the computing education community is doing to address inequities in their classrooms For our part we have learned a huge amount about equitable STEM and computer science CS education from the community The post Computer science education for what purpose Some perspectives appeared first on Raspberry Pi |
2022-02-24 14:18:31 |
海外TECH |
CodeProject Latest Articles |
ColoredText - How to Print Colored Text using Java |
https://www.codeproject.com/Tips/5322537/ColoredText-How-to-Print-Colored-Text-using-Java
|
console |
2022-02-24 14:17:00 |
Linux |
OMG! Ubuntu! |
Nautilus 42 Arrives in Ubuntu 22.04 Daily Builds |
https://www.omgubuntu.co.uk/2022/02/nautilus-42-arrives-in-ubuntu-22-04-daily-builds
|
Nautilus Arrives in Ubuntu Daily BuildsThe latest version of the Nautilus file manager is winging its way to Ubuntu A number of new features and improvements are included as a result This post Nautilus Arrives in Ubuntu Daily Builds is from OMG Ubuntu Do not reproduce elsewhere without permission |
2022-02-24 14:01:54 |
海外TECH |
WIRED |
Elden Ring Is the Game of the Year |
https://www.wired.com/story/elden-ring-review
|
world |
2022-02-24 14:29:59 |
金融 |
RSS FILE - 日本証券業協会 |
株券等貸借取引状況(週間) |
https://www.jsda.or.jp/shiryoshitsu/toukei/kabu-taiw/index.html
|
貸借 |
2022-02-24 15:30:00 |
金融 |
RSS FILE - 日本証券業協会 |
株主コミュニティの統計情報・取扱状況 |
https://www.jsda.or.jp/shiryoshitsu/toukei/kabucommunity/index.html
|
株主コミュニティ |
2022-02-24 15:30:00 |
ニュース |
BBC News - Home |
UK will not look away from Russia invasion in Ukraine - PM |
https://www.bbc.co.uk/news/uk-60508671?at_medium=RSS&at_campaign=KARANGA
|
ukraine |
2022-02-24 14:45:58 |
ニュース |
BBC News - Home |
Blackpool mother jailed for starving daughter to death |
https://www.bbc.co.uk/news/uk-england-lancashire-60507814?at_medium=RSS&at_campaign=KARANGA
|
emaciation |
2022-02-24 14:48:34 |
ニュース |
BBC News - Home |
Ukraine invasion: Russia's attack in maps |
https://www.bbc.co.uk/news/world-europe-60506682?at_medium=RSS&at_campaign=KARANGA
|
attack |
2022-02-24 14:20:31 |
ニュース |
BBC News - Home |
Ukraine crisis: Uefa to move Champions League final after Russian invasion |
https://www.bbc.co.uk/sport/football/60504979?at_medium=RSS&at_campaign=KARANGA
|
emergency |
2022-02-24 14:49:05 |
ニュース |
BBC News - Home |
Wales recall Faletau and Adams for game against England |
https://www.bbc.co.uk/sport/rugby-union/60505897?at_medium=RSS&at_campaign=KARANGA
|
england |
2022-02-24 14:34:52 |
北海道 |
北海道新聞 |
北京パラリンピック 日本選手団が結団式 |
https://www.hokkaido-np.co.jp/article/649409/
|
日本選手 |
2022-02-24 23:18:33 |
北海道 |
北海道新聞 |
NATO、部隊派遣せず 抑止・防衛強化に追加措置 |
https://www.hokkaido-np.co.jp/article/649573/
|
北大西洋条約機構 |
2022-02-24 23:08:00 |
北海道 |
北海道新聞 |
JR不手際認める 除雪車故障、発表も遅く |
https://www.hokkaido-np.co.jp/article/649557/
|
記者会見 |
2022-02-24 23:07:29 |
北海道 |
北海道新聞 |
NY円、114円後半 |
https://www.hokkaido-np.co.jp/article/649567/
|
外国為替市場 |
2022-02-24 23:02:00 |
仮想通貨 |
BITPRESS(ビットプレス) |
東京ハッシュ、3/25に「Web 3.0への投資:NFT、DeFi、メタバース2022年以降の展望」開催 |
https://bitpress.jp/count2/3_15_13083
|
東京 |
2022-02-24 23:31:25 |
コメント
コメントを投稿