AWS |
AWS Database Blog |
Gartner® recognizes Amazon RDS in new report |
https://aws.amazon.com/blogs/database/gartner-recognizes-amazon-rds-in-new-report/
|
Gartnerrecognizes Amazon RDS in new reportIndustry analyst firm Gartner has published Solution Scorecard for Amazon Relational Database Service with AWS earning an industry best rating including of required criteria by Gartner for an operational database platform as a service dbPaaS The report focuses on Amazon Relational Database Service Amazon RDS the AWS managed relational database service designed to dramatically … |
2022-05-16 17:14:20 |
AWS |
AWS Machine Learning Blog |
Personalize your machine translation results by using fuzzy matching with Amazon Translate |
https://aws.amazon.com/blogs/machine-learning/personalize-your-machine-translation-results-by-using-fuzzy-matching-with-amazon-translate/
|
Personalize your machine translation results by using fuzzy matching with Amazon TranslateA person s vernacular is part of the characteristics that make them unique There are often countless different ways to express one specific idea When a firm communicates with their customers it s critical that the message is delivered in a way that best represents the information they re trying to convey This becomes even more important when … |
2022-05-16 17:48:28 |
AWS |
AWS |
Novartis - Buying Engine: AI-powered Procurement Portal |
https://www.youtube.com/watch?v=vp8oPiHN4cA
|
Novartis Buying Engine AI powered Procurement PortalProcuring lab supplies required manual comparison of item prices in several vendor catalogs Overspending inventory mismanagement and delays for R amp D and production Novartis Buying Engine solves this challenge by providing a centralized purchasing platform with search and recommendations Catalog data is automatically extracted from unstructured vendor catalogs using Machine Learning with Amazon SageMaker Data is stored in DynamoDB Neptune and OpenSearch The shopping portal itself is fully serverless being hosted on Lambda and Api Gateway Check out more resources for architecting in the AWScloud AWS AmazonWebServices CloudComputing ThisIsMyArchitecture |
2022-05-16 17:52:36 |
AWS |
AWS - Webinar Channel |
Using artificial intelligence to automate content moderation and compliance with AWS services |
https://www.youtube.com/watch?v=yMN3Xx0DcoU
|
Using artificial intelligence to automate content moderation and compliance with AWS servicesCustomers are learning that content moderation processes by humans alone cannot scale to meet safety regulatory and operational needs in the user generated content era Artificial intelligence can help gaming social media e commerce and advertising organizations moderate the deluge of content to reclaim up to of the time their teams spend moderating content manually Financial healthcare and education organizations can streamline the detection and protection of personally identifiable information PII across environments and processes Learning Objectives Objective Scale to moderate high volumes of User Generated Content UGC efficiently Objective Save content moderation time and costs Objective Get started to streamline your content moderation processes To learn more about the services featured in this talk please visit |
2022-05-16 17:00:35 |
golang |
Goタグが付けられた新着投稿 - Qiita |
インターフェースとローカルな構造体 |
https://qiita.com/ytmycat17yo/items/44d6f0be8782846fbd64
|
typesession |
2022-05-17 02:02:08 |
GCP |
gcpタグが付けられた新着投稿 - Qiita |
ARCore Geospatial APIのサンプルを実行する |
https://qiita.com/matchyy/items/47df07b59043b46e1b62
|
arcoregeospatialapi |
2022-05-17 02:01:29 |
海外TECH |
Ars Technica |
Citizen scientists help discover more than 1,000 new asteroids |
https://arstechnica.com/?p=1853760
|
hubble |
2022-05-16 17:24:55 |
海外TECH |
Ars Technica |
Supreme Court urged to block “shocking” reinstatement of Texas social media law |
https://arstechnica.com/?p=1854405
|
texas |
2022-05-16 17:06:05 |
海外TECH |
MakeUseOf |
Kali Linux 2022.2 Lands With Desktop Tweaks, Hilarious Hollywood-Hacking-Homaging Screensaver |
https://www.makeuseof.com/kali-linux-2022-2-released-with-hacking-screensaver/
|
Kali Linux Lands With Desktop Tweaks Hilarious Hollywood Hacking Homaging ScreensaverThe latest version of Kali Linux shows that developers like to kick back and have fun while developing powerful hacking tools |
2022-05-16 17:56:38 |
海外TECH |
MakeUseOf |
New Leak Reveals Ecobee’s New Smart Thermostats |
https://www.makeuseof.com/new-ecobee-smart-thermostats-leaked-online/
|
enhanced |
2022-05-16 17:30:14 |
海外TECH |
MakeUseOf |
8 Best Apps for Listening to Calming Nature Sounds on iOS |
https://www.makeuseof.com/best-apps-listening-nature-sounds-ios/
|
Best Apps for Listening to Calming Nature Sounds on iOSBring the soothing sounds of nature to you to help you relax focus and fall asleep You can even mix your own sound combinations with these apps |
2022-05-16 17:30:13 |
海外TECH |
MakeUseOf |
Show Your Love of Bluetti By Earning Bluetti Bucks |
https://www.makeuseof.com/bluetti-earn-bluetti-bucks/
|
power |
2022-05-16 17:23:35 |
海外TECH |
DEV Community |
JavaScript Promise Chaining - Avoid Callback Hell |
https://dev.to/hunghvu/javascript-promise-chaining-avoid-callback-hell-16ef
|
JavaScript Promise Chaining Avoid Callback HellIf you work in JavaScript web development I guess you re already familiar with a Promise and have faced callback hell multiple times before Promise chaining in JavaScript is one way to solve the callback hell issue and we will discuss it in this article However let s recap a little bit for those who are not familiar with the concepts What is a JavaScript Promise In JavaScript ES and above a Promise is an object representing the state and result of asynchronous operations such as an API call or IO read write The states include pending fulfilled and rejected Pending An operation is in progress and no result has been returned Fulfilled An operation was a success and the result was returned Rejected An operation was a failure and the error was returned A Promise has two methods then and catch The then method accepts a callback of an action to be initiated after a promise is fulfilled meanwhile the catch runs whenever a promise is rejected Asynchronous API call operationgetWeatherTodayPromise then weatherForecast gt Fulfilled Synchronous operation display weatherForecast catch error gt Rejected console error error What is callback hell In short it is when your callbacks have been nested multiple levels to the point it becomes unmanageable This can happen in any programming language and is more common in asynchronous operations A deeply nested promise and callback in JavaScript is just one flavor of callback hell and examples in the article are based on this callback hell variance A typical callback hell which involves multiple JavaScript promisesfirstPromise then secondPromise then thirdPromise then catch catch catch Readability is one thing but callback hell can cause other scoping issues A typical one is error hiding swallowing when an error raised by an inner promise was not caught Asynchronous API call operationgetWeatherTodayPromise then weatherForecast gt Asynchronous IO operation writeWeatherForecastToLogFilePromise weatherForecast FAILED Unlike try catch there is no outer catch all solution You must have a catch at every nested promise Or else the promise is not terminated and the error information is lost catch error gt IO error is caught here console error Inner promise error catch error gt IO error is NOT caught here console error Outer promise error What is promise chaining in JavaScript You just learned a callback hell indicates unmanageable nested levels of callbacks With that said one way to solve the issue is to make the callbacks NOT nested anymore Make it shallow Promise chaining in JavaScript is when multiple then and catch methods are called successively to completely removes the nested levels while still maintaining the intended outputs You can say it is one way to refactor your codebase Promise chainingfirstPromise then gt secondPromise then gt thirdPromise then catch catch catch then A typical callback hell which involves multiple JavaScript promisesfirstPromise then secondPromise then thirdPromise then catch catch catch If you are dealing with regular callback based functions NOT promises you need to promisify the functions first to apply promise chaining There are ways to do so such as using an es promisify library How does promise chaining work in JavaScript then and catch are methods of a Promise object so to create a chain a callback in the then method must return a new Promise Correct implementation gt something is a shorthand for gt return something const secondPromise firstPromise then gt newPromise secondPromise then gt anotherPromise then Wrong implementation and an exception is raisedfirstPromise then gt null then The result of a promise is carried to the next then getWeatherTodayPromise then weatherForecastResult gt writeWeatherForecastToLogFilePromise weatherForecastResult writeWeatherForecastToLogFilePromise weatherForecastResult if fulfilled will provide ioWriteResult then ioWriteResult gt Promise all anotherPromise ioWriteResult andSomethingElsePromise then listOfResults gt We can manually initiate and return a new Promise object to form promise chaining Rather than doing tasks in one callback you can apply this technique to segment the codebase into smaller chunks firstPromise then gt const isSuccess synchronousOperation boolean return isSuccess Promise resolve Success Promise reject new Error then result gt console log result Print Success catch error gt console error error Print an error with messageA then method has a second and optional onRejectedCallback argument but as we don t use it whenever an exception is raised the browser looks down the whole promise chain to find the first acceptable catch for a given error By using promise chaining you can have one outer catch all solution like try catch so no more possibility of error swallowing You can have a conditional statement in one catch for multiple errors or you can segment them into multiple separated catch as shown below rejectedxxPromise catch HTTP xx Browser Not here catch HTTP xx Browser Okay this catches the xx error catch Other unexpected errors SkipYou can chain a then after catch This means always operate no matter what rejectedxxPromise catch HTTP xx then console log This line is always printed out Wrap upJavaScript promise chaining is a simple but powerful feature to resolve a common nested callback issue callback hell To chain promises there are two main points you need to remember Multiple then and catch can be called successively such as promise then then catch catch A call back in the then method must return a new Promise object so the chain can be continued The rule also applies to TypeScript In ES a k a ES the async await function was introduced and it makes our life even easier That said if you cannot use the ES feature for some reason then promise chaining is a great choice to refactor your codebase Interested in web development My other articles might be helpful to you Front end top frameworks and libraries you should knowGitHub CLI in minutes |
2022-05-16 17:42:42 |
海外TECH |
DEV Community |
A Simple TypeScript Class to query information from DynamoDB |
https://dev.to/zerquix18/a-simple-typescript-class-to-query-information-from-dynamodb-2hce
|
A Simple TypeScript Class to query information from DynamoDBI wrote a wrapper for DocClient which I think some people might find useful The main purpose is to simplify retreiving and inserting data especially for Lambda functions that call DynamoDB You can see the code here It requires the aws sdk lodash and uuid which you can download with npm install aws sdk lodash uuidIt also assumes that you use id as your main key which is most likely the case Let s see how it works maybe you find it interesting ConstructorYou need to start a new instance of the class with the name of the table const posts new DynamoTable posts us east the region is optionalOne of the advantages of storing the name in the class is that you can use the same variable for both production and development const posts new DynamoTable isProd posts dev posts us east MethodsThis instance now contains the following methods addItem item updateItem item deleteItem id getItem id batchGetItem ids batchWriteItem ids scan nextToken limit filter simpleScan filter scanAll filter query index queryExpression nextToken limit filter simpleQuery index queryExpression filter queryAll index queryExpression filter Let s see how to use them InsertingYou can add single items with addItem It will automatically generate an ID if you pass one import DynamoTable from DynamoTable const posts new DynamoTable posts us east the region is optionalasync function main const post title New post content I am the body const newPost await posts addItem post console log newPost id dac ac fc a fbcfdaaba title New post content I am the body main You can insert multiple items using batchWriteItem import DynamoTable from DynamoTable const posts new DynamoTable posts us east the region is optionalasync function main const post title New post content I am the body of post const post title New post content I am the body of post await posts batchWriteItem post post main UpdatingYou can update a post using the updateItem which allows you to specify the fields you want to update only It also returns the full item so you can pass it as a response to your API import DynamoTable from DynamoTable const posts new DynamoTable posts us east the region is optionalasync function main const postUpdated id dac ac fc a fbcfdaaba title New post updated const newPost await posts updateItem postUpdated console log newPost content I am the body id dac ac fc a fbcfdaaba title New post updated main RetrievingThe class supports ways of retreiving data A single item multiple items and listing by scanning or querying The simplest one is getting a simple item using its ID import DynamoTable from DynamoTable const posts new DynamoTable posts us east the region is optionalasync function main const post await posts getItem dac ac fc a fbcfdaaba console log post content I am the body id dac ac fc a fbcfdaaba title New post updated main But you can also get a bunch of items using their IDs const items await posts batchGetItem af b d bf adbfbd dfceab f b af fcdbfc console log items authorId content Title id af b d bf adbfbd title Post authorId content Title id dfceab f b af fcdbfc title Post There are three methods to scan a table A base scan method which is friendly to the way you probably use scan A simpleScan method which ignores pagination and a scanAll method which will continue to retrieve data until there s nothing more The scan method accepts one parameter with fields nextToken limit and filter nextToken tells DynamoDB to retrieve items after this key limit determines the maximum amount of items to retrieve filter can either be an object like key value for key value or expression and values for something like attribute not exists example The method returns items an array and nextToken a string or null You can retrieve all items from a table like this const postsScan await posts scan console log postsScan items content I am the body id dac ac fc a fbcfdaaba title New post updated content I am the body of post id bd e cc ab cada title New post content I am the body of post id fbdab ffd d ef bbab title New post nextToken null You can do a scanAll to keep retrieving items until there are no more const postsScan await posts scanAll console log postsScan content I am the body id dac ac fc a fbcfdaaba title New post updated content I am the body of post id bd e cc ab cada title New post content I am the body of post id fbdab ffd d ef bbab title New post A simple simpleScan will return the first batch of scan without pagination information FilteringBefore moving into queries let s add an authorId key to our posts table so we scan and filter using it const postsToInsert authorId content Title title Post authorId content Title title Post authorId content Title title Post authorId content Title title Post await posts batchWriteItem postsToInsert We can now scan and filter for authorId const postsByAuthor await posts scan filter authorId expression would be authorId console log postsByAuthor items authorId content Title id af b d bf adbfbd title Post authorId content Title id aec e cc ae dddf title Post nextToken null For more complex or even custom filters you can use an expression and values const postsByAuthor await posts scan filter expression authorId authorId values authorId console log postsByAuthor items authorId content Title id af b d bf adbfbd title Post authorId content Title id aec e cc ae dddf title Post nextToken null QueryingNow we can create an index for our authorId field called authorId index const postsByAuthor await posts query index authorId index queryExpression authorId console log postsByAuthor items content Title authorId id af b d bf adbfbd title Post content Title authorId id aec e cc ae dddf title Post nextToken null query also accepts a filter nextToken and limit much like a scan for the results after the query You can also use simpleQuery like simpleScan const postsByAuthor await posts simpleQuery authorId index authorId console log postsByAuthor content Title authorId id af b d bf adbfbd title Post content Title authorId id aec e cc ae dddf title Post simpleQuery doesn t deal with pagination so there may be more items and it accepts a filter as a third parameter You also have a queryAll method which does deal with pagination and keeps querying until all items have been retrieved const postsByAuthor await posts queryAll authorId index authorId console log postsByAuthor content Title authorId id af b d bf adbfbd title Post content Title authorId id aec e cc ae dddf title Post DeletingYou can delete an item using the deleteItem method const deletedPost await posts deleteItem aec e cc ae dddf console log deletedPost authorId content Title id aec e cc ae dddf title Post Hope this is useful |
2022-05-16 17:40:33 |
海外TECH |
DEV Community |
How to use AWS EC2 with Boto3 & Python - Part 1 |
https://dev.to/kcdchennai/how-to-use-aws-ec2-with-boto3-python-part-1-i48
|
How to use AWS EC with Boto amp Python Part Boto is the Python SDK for AWS It can be used to directly interact with AWS resources from Python scripts In this article we will look at how we can use the Boto EC Python SDK to perform various operations on AWS EC PrerequisitesAWS accountPython v or later need to be installed on our local machine A code editor We can use any text editor to work with Python files AWS IAM user an access key ID and a secret key should be set up on our local machine with access to create and manage EC instances Boto Python AWS SDK should be already installed on the local machine If not refer this Boto documentation Creating EC Instances with BotoOpen code editor code ec create instance pyCopy and paste the Python script into code editor and save the file The Python script creates a single AWS EC instance using an image ID ami dfabb using an instance type of t micro Open command line and execute the ec create instance script If successful we should see a single message of AWS EC Instance Launched successfully python ec create instance py Tagging EC Instance with BotoIn a AWS environment an organization could have hundreds of resources to manage To simplify managing resources AWS provides a feature called tagging that allows us to categorize resources based on environment department or any other organization specific criteria Open code editor code tag ec instance pyCopy and paste the Python script into code editor and save the file The Python script tags the instance ID created above with the Name of KCDCHENNAI DEMO using the create tags method Open command line and execute the ec manage instance script python tag ec instance py Describing EC Instance with BotoWe can use describe instances to find EC instances matching a specific architecture image ID instance type or tags Using the describe API and Boto we can build a Python script to query EC instances by tag Open code editor code ec describe instance pyCopy and paste the Python script into code editor and save the file Using the describe instances method this script uses a filter defined in JSON to find all attributes associated with all EC instances with a tag called Name tag Name with a value of KCDCHENNAI DEMO Values KCDCHENNAI DEMO Open command line and execute the ec describe instance script python ec describe instance pyTo know more about using EC in Boto refer Boto documentationThanks for reading my article till end I hope you learned something special today If you enjoyed this article then please share to your friends and if you have suggestions or thoughts to share with me then please write in the comment box |
2022-05-16 17:14:37 |
海外TECH |
DEV Community |
Build a simple dApp using truffle, ganache, Ethers,js and React(1) |
https://dev.to/yongchanghe/build-a-simple-dapp-using-truffle-ganache-ethersjs-and-react1-52bl
|
Build a simple dApp using truffle ganache Ethers js and React This tutorial is meant for those with a basic knowledge of Ethereum and smart contracts who have some knowledge of HTML and JavaScript but who are new to dApps The purpose of building this blog is to write down the detailed operation history and my memo for learning the dApps If you are also interested and want to get hands dirty just follow these steps below and have fun PrerequisitesNode jsTruffleGanacheMetaMaskVSCode Intro amp reviewIn this tutorial we will build a dApp Home owners can auction their home and accept and withdraw the highest bids from a buyer to their MetaMask account using ETH Buyers can make transactions sending their bids to smart contract We will complete the following steps Create truffle projectCreate smart contractTest smart contractBuild user interfaceDeploy smart contract to GanacheTest running project using MetaMask Getting started create truffle projectNavigate to your favourite directory and run the following command mkdir action housecd action houseOpen the folder action house using VSCode NOTE At this point we should have no file in this directory Let s run the following command at action house truffle initWe should get the following message if running correctly Our folder action house now should have the files and directories like the following Update the truffle config js file with the following code module exports networks development host port network id compilers solc version NOTE My compiler version is You might need to have it updated to adapt to your situation create smart contractNext we create a file named Auction sol in the directory action house contracts copy and paste the following code SPDX License Identifier MITpragma solidity contract Auction Properties address private owner uint public startTime uint public endTime mapping address gt uint public bids struct House string houseType string houseColor string houseLocation struct HighestBid uint bidAmount address bidder House public newHouse HighestBid public highestBid Insert modifiers here Insert events here Insert constructor and function here NOTE My compiler version is You might need to have it updated to adapt to your situation We have defined the owner property private so that owner can only be accessed from within the contract Auction We have also defined the auction startTime endTime and bids as public meaning they can be accessed anywhere The two structs House and HighestBid have defined the house s and the highestBid s properties Lastly we initialized both structs Insert the following code right next the above code Modifiers modifier isOngoing require block timestamp lt endTime This auction is closed modifier notOngoing require block timestamp gt endTime This auction is still open modifier isOwner require msg sender owner Only owner can perform task modifier notOwner require msg sender owner Owner is not allowed to bid In solidity modifiers are functions used to enforce security and ensure certain conditions are met before a function can be called Insert events into our smart contract Events event LogBid address indexed highestBidder uint highestBid event LogWithdrawal address indexed withdrawer uint amount It allows our frontend code to attach callbacks which would be triggered when our contract state changes Insert constructor and functions Assign values to some properties during deployment constructor owner msg sender startTime block timestamp endTime block timestamp hours newHouse houseColor FFFFFF newHouse houseLocation Sask SK newHouse houseType Townhouse function makeBid public payable isOngoing notOwner returns bool uint bidAmount bids msg sender msg value require bidAmount gt highestBid bidAmount Bid error Make a higher Bid highestBid bidder msg sender highestBid bidAmount bidAmount bids msg sender bidAmount emit LogBid msg sender bidAmount return true function withdraw public notOngoing isOwner returns bool uint amount highestBid bidAmount bids highestBid bidder highestBid bidder address highestBid bidAmount bool success payable owner call value amount require success Withdrawal failed emit LogWithdrawal msg sender amount return true function fetchHighestBid public view returns HighestBid memory HighestBid memory highestBid highestBid return highestBid function getOwner public view returns address return owner Till now our smart contract is ready to be tested and deployed Let s run the following command at action house to compile our contract truffle compileWe should get the following message if compilation is correct Next step we will deploy our smart contract In the auction house migrations directory we create a new file named initial migrations js copy and paste the following code into it const Auction artifacts require Auction module exports function deployer deployer deploy Auction Test smart contractWe can go to auction house test directory create Auctioin test js and add the following code const Auction artifacts require Auction contract Auction async accounts gt let auction const ownerAccount accounts const userAccountOne accounts const userAccountTwo accounts const amount ETH const smallAmount ETH beforeEach async gt auction await Auction new from ownerAccount it should make bid async gt await auction makeBid value amount from userAccountOne const bidAmount await auction bids userAccountOne assert equal bidAmount amount it should reject owner s bid async gt try await auction makeBid value amount from ownerAccount catch e assert include e message Owner is not allowed to bid it should require higher bid amount async gt try await auction makeBid value amount from userAccountOne await auction makeBid value smallAmount from userAccountTwo catch e assert include e message Bid error Make a higher Bid it should fetch highest bid async gt await auction makeBid value amount from userAccountOne const highestBid await auction fetchHighestBid assert equal highestBid bidAmount amount assert equal highestBid bidder userAccountOne it should fetch owner async gt const owner await auction getOwner assert equal owner ownerAccount To run the test cases above using truffle developtest Build user interfaceWe will be using the create react app CLI Still in our root directory auction house we run the following command npx create react app clientThis command sets up a react project with all the dependencies to write modern javascript inside the folder we created client Next we navigate into client and install ethers js and the ethersproject s unit package using the following command cd clientyarn add ethers ethersproject unitsNOTE use npm install global yarn if prompt command not found yarnNext step we open auction house client src App js and update it using the following code import App css import useEffect useState from react import ethers from ethers import parseEther formatEther from ethersproject units import Auction from contracts Auction json const AuctionContractAddress “CONTRACT ADDRESS HERE const emptyAddress x function App Use hooks to manage component state const account setAccount useState const amount setAmount useState const myBid setMyBid useState const isOwner setIsOwner useState false const highestBid setHighestBid useState const highestBidder setHighestBidder useState Sets up a new Ethereum provider and returns an interface for interacting with the smart contract async function initializeProvider const provider new ethers providers WebProvider window ethereum const signer provider getSigner return new ethers Contract AuctionContractAddress Auction abi signer Displays a prompt for the user to select which accounts to connect async function requestAccount const account await window ethereum request method eth requestAccounts setAccount account async function fetchHighestBid if typeof window ethereum undefined const contract await initializeProvider try const highestBid await contract fetchHighestBid const bidAmount bidder highestBid Convert bidAmount from Wei to Ether and round value to decimal places setHighestBid parseFloat formatEther bidAmount toString toPrecision setHighestBidder bidder toLowerCase catch e console log error fetching highest bid e async function fetchMyBid if typeof window ethereum undefined const contract await initializeProvider try const myBid await contract bids account setMyBid parseFloat formatEther myBid toString toPrecision catch e console log error fetching my bid e async function fetchOwner if typeof window ethereum undefined const contract await initializeProvider try const owner await contract getOwner setIsOwner owner toLowerCase account catch e console log error fetching owner e async function submitBid event event preventDefault if typeof window ethereum undefined const contract await initializeProvider try User inputs amount in terms of Ether convert to Wei before sending to the contract const wei parseEther amount await contract makeBid value wei Wait for the smart contract to emit the LogBid event then update component state contract on LogBid gt fetchMyBid fetchHighestBid catch e console log error making bid e async function withdraw if typeof window ethereum undefined const contract await initializeProvider Wait for the smart contract to emit the LogWithdrawal event and update component state contract on LogWithdrawal gt fetchMyBid fetchHighestBid try await contract withdraw catch e console log error withdrawing fund e useEffect gt requestAccount useEffect gt if account fetchOwner fetchMyBid fetchHighestBid account return lt div style textAlign center width margin auto marginTop px gt isOwner lt button type button onClick withdraw gt Withdraw lt button gt lt div style textAlign center marginTop px paddingBottom px border px solid black gt lt p gt Connected Account account lt p gt lt p gt My Bid myBid lt p gt lt p gt Auction Highest Bid Amount highestBid lt p gt lt p gt Auction Highest Bidder highestBidder emptyAddress null highestBidder account Me highestBidder lt p gt isOwner lt form onSubmit submitBid gt lt input value amount onChange event gt setAmount event target value name Bid Amount type number placeholder Enter Bid Amount gt lt button type submit gt Submit lt button gt lt form gt lt div gt lt div gt export default App Deploy smart contract to GanacheFirst we update code inside the truffle config js module exports contracts build directory client src contracts networks development host port network id compilers solc version Next let s launch the Ganache application and click the QUICKSTART option to get a development blockchain running and modify the RPC SERVER PORT NUMBER to then click RESTART Then we can navigate to auction house and run the following command to deploy our smart contract to local network truffle migrateWe will find the following message if run successfully And we will also find new contracts directory has been created inside auction house client src Next step we copy our unique contract address for Auction shown in CLI and paste that into auction house client src App js in line We will do the rest steps in the next blog |
2022-05-16 17:12:15 |
海外TECH |
DEV Community |
🔗 Blockchain Basics |
https://dev.to/envoy_/blockchain-basics-2j2d
|
Blockchain Basics History of BlockchainThe blockchain was first introduced in as a public ledger for keeping records of transactions for Bitcoin This method of recording transactions was transparent Every record was timestamped immutable meaning no one could change remove a record after it had been added and decentralized It was invented by a guy or probably a group of people or even an AI who goes by the name Dorian Satoshi Nakamoto Around the year the blockchain started to gain traction and attention People began to invest in it after seeing that it had more applications than just cryptocurrency It could be used in various fields such as insurance and finance healthcare voting transportation and others What is a blockchain The blockchain is a distributed database or record keeping system for storing digital records in a structure that makes it difficult to hack the system The blockchain does not store data in a centralized location unlike a traditional database Instead each node computer on the network has a complete copy of the blockchain When data is saved on the system it is distributed to thousands of network nodes How does the blockchain work The blockchain stores sets of data in collections known as blocks Blocks are like containers Every container has a limit or a maximum amount of content it can hold In terms of blocks the total amount of data it can contain is known as block size limitThe capacity of each block is referred to as the block size and it varies depending on the blockchain ranging from a few kilobytes to roughly megabyte The block size of Bitcoin is around MB and that of Ethereum is roughly KB Although the block sizes appear small they can carry up to transactions Every block is stored linearly and chronologically with each new block added to the end of the chain When a block reaches its maximum block size it s closed and connected to another block using a hashing algorithm a type of cryptographic validation As a result a continuous chain of blocks is formed giving rise to the name blockchain However if a block exceeds the block size the network rejects it and is not added to the chain What makes the blockchain secure and immutable The immutability of the blockchain is due to the hashes of the blocks A hash is similar to a fingerprint Humans all have different fingerprints In the case of blocks hashes serve as unique identifiers fingerprints Each block is digitally signed with a unique hash generated by a hashing algorithm a hash function The current block the previous block and a timestamp are used to generate these hashes and the slightest change of input will result in a whole new hash Hash values normally look like this ackddcbbuyddeaflbdefeThink of a hash function as a grinding machine A grinding machine only works in one direction It starts with a raw item and grinds it down into smaller pieces A hash function functions similarly in that it takes raw data and converts it into an encrypted format that cannot be reverse engineered There is no way to recover the original values generated into the hash just as ground meat cannot be converted back to its original form after passing through a grinding machine Assume a hacker wanted to change a blockchain record First the hacker must run his node and locate the block he wants to modify If he is successful in changing this block making this change the newly generated hash will not match the original hash rendering the block invalid in the chain Keep in mind that this modification is currently only available on his node What s more before a record is added to the main public chain it must be verified by the other nodes If the majority of nodes at least per cent confirm the validity of the new change it can be added to the chain otherwise it is considered invalid and rejected As a result for this to be possible the hacker will need to perform this exact change on most nodes computers which will require a large number of resources and is practically impossible Characteristics of blockchainDecentralized This is one of the key features of the blockchain Except for private blockchains the blockchain does not have a central authority managing the network s activities instead the nodes maintain the network and validate transactions You can store your important digital assets on the chain and you have direct control over these assets via your private keys Private keys are like cryptographically generated passwords used for signing transactions and proving ownership of a blockchain address Transparent and open The blockchain stores all records and transactions publicly making them accessible to anyone at any time The blockchain is designed so that no one can cover up anything and use it for personal gain Enhanced Security and immutability Every piece of data on the blockchain is hashed That is you cannot specify the actual content of the data Furthermore since the hashes cannot be reverse engineered it adds an extra layer of security And because of the advanced cryptography and uniqueness of the block hashes tampering with any block will require changing all the hashes of the other blocks on the majority of the nodes which is a lot of work and a lot of resources NodesA blockchain node is a computer or device that runs blockchain client software has a complete copy of the blockchain data and can validate transactions messages and blocks on the blockchain Types of nodesBlockchain nodes are classified into two main kinds Lightweight nodes and Full nodes There are a variety of types of nodes They are Light Nodes Masternodes Pruned Full Nodes Archival Full Nodes Mining Nodes Lightning Nodes Full nodes vs Lightweight nodesFull nodes validate transactions by downloading all transactions on the blockchain In contrast lightweight nodes keep a partial essential list of blockchain transactions mainly the block headers rather than the whole transaction history A full node can be set up on the cloud or run locally How to run a nodeRunning your own node is super simple Choose a blockchain e g Bitcoin Ethereum etc Download the client software of your preferred blockchain The client will connect to all other peers nodes computers running the same client software and will copy the blockchain from them Types of BlockchainsBlockchains are classified into two main types permissioned and permissionless However there are several variations with each serving a specific function Let us take a closer look at each of them Private blockchains Permissioned Blockchains Public blockchains Permissionless Blockchains Hybrid blockchains Consortium blockchains Federated blockchains Public blockchains Permissionless Blockchains Public blockchains also known as permissionless blockchains are fully decentralized and open to the public Any random person can add data and join the network as a node to participate in transaction validation and so on Private blockchains Permissioned Blockchains Companies that provide services frequently interact with third party services resulting in extended processing times As a result these businesses need a blockchain that is Private Secure Fully permissioned FastThis is where private blockchains come into play Unlike public blockchains which enable anybody to be a node and interact with the network private blockchains are fully permissioned and require each node to be validated before joining the network allowing only a few authenticated individuals to become nodes and interact with the blockchain These types of blockchains are usually run by an authority known as the trusted intermediate who has the power to alter the content of the blockchain Examples of private blockchains are Ripple XRP Hyperledger R Corda Hybrid blockchainsHybrid blockchains are peculiar Despite being permissioned or controlled they offer freedom You should have a good idea of what hybrid blockchains are if you ve ever crossed a wolf and a man to create a werewolf Hybrid blockchains combine the features of both private and public blockchains You must have a special invitation to access this database and sometimes the blockchain members decide who to add to the blockchain Still it ensures transparency freedom and security Some activities are kept private whiles others are open to the public only accessible by members of the blockchain Consortium blockchains Federated blockchains Consortium blockchains like hybrid blockchains are a mix of the two public and private blockchains The only difference is that members from multiple organizations can collaborate on the networks instead of single individuals Consortium blockchains are essentially private blockchains with restricted access to organizations This eliminates the need for a centralized control structure and is appropriate for banks working together to validate transactions |
2022-05-16 17:06:17 |
海外TECH |
DEV Community |
What do you look for on a team page? |
https://dev.to/sylwiavargas/what-do-you-look-for-on-a-team-page-h5i
|
What do you look for on a team page I am working on adding a team page to our company s website and I m wondering can you recall an example of a team page that d just really lovely informative awesome what information do you look for on such a page is it helpful at all when do you typically check team page Thank you From my side I remember that React team page helped me with my OSS contributions because I noticed they are just humans with hobbies I also remember visiting UPchieve s team page and getting to know the folks who make the team when I interviewed there I looked at the skills distribution and roles as well as the demographics I wanted to imagine what working there could be like given the size of different working groups not relevant but while I decided to take another offer I think about the UPchieve interviewing experience only fondly |
2022-05-16 17:05:24 |
Apple |
AppleInsider - Frontpage News |
Apple releases macOS Big Sur 11.6.6 & Catalina 10.15.7 security update |
https://appleinsider.com/articles/22/05/16/apple-releases-macos-big-sur-1166-with-bug-fixes-for-older-macs?utm_medium=rss
|
Apple releases macOS Big Sur amp Catalina security updateApple has released macOS Big Sur and a security update to macOS Catalina bringing minor updates to the last generation Mac operating systems likely focused on security fixes and under the hood improvements macOS Big SurThe macOS Big Sur update was released alongside Apple s current slate of software updates including macOS Monterey and iOS Read more |
2022-05-16 17:39:00 |
Apple |
AppleInsider - Frontpage News |
Apple releases iOS 15.5, iPadOS 15.5, watchOS 8.6, tvOS 15.5 with bug fixes |
https://appleinsider.com/articles/22/05/16/apple-releases-ios-155-ipados-155-watchos-86-tvos-155-with-bug-fixes?utm_medium=rss
|
Apple releases iOS iPadOS watchOS tvOS with bug fixesApple has made its updates to iOS iPadOS watchOS tvOS and Studio Display update available to download by the public with the releases largely consisting of bug and performance changes The updates for iOS iPadOS watchOS and tvOS arrive after a month of beta testing for the operating systems which involved a total of five beta builds being issued to developer testers Apple has also made the Studio Display update available to the public It can be downloaded as a separate update via the macOS System Preferences Read more |
2022-05-16 17:26:48 |
Apple |
AppleInsider - Frontpage News |
Apple releases macOS Monterey 12.4 to the public |
https://appleinsider.com/articles/22/05/16/apple-releases-macos-monterey-124-to-the-public?utm_medium=rss
|
Apple releases macOS Monterey to the publicApple has shipped macOS Monterey with the latest update provided to the public containing minor fixes and performance improvements rather than feature changes Arriving after five beta cycles and just over a month of testing macOS Monterey is now downloadable by users to other Macs and MacBooks Unlike the previous update version seems to be less a feature based refresh and more one primarily involving bug fixes and performance enhancements Few feature changes were discovered in the beta builds save for an update for the Studio Display s webcam Given that Apple is working towards the WWDC presentation and the expected reveal of the next major macOS update it seems unlikely any updates before then will contain many visible changes Read more |
2022-05-16 17:19:56 |
Apple |
AppleInsider - Frontpage News |
Compared: Pixel Buds Pro versus AirPods 3 & AirPods Pro |
https://appleinsider.com/articles/22/05/15/compared-pixel-buds-pro-versus-airpods-3-airpods-pro?utm_medium=rss
|
Compared Pixel Buds Pro versus AirPods amp AirPods ProGoogle is now gunning for the AirPods Pro by adding active noise cancelation to the Pixel Buds Pro Here s how the search company s audio accessories fare compared to Apple s current gen AirPods lineup Google s Pixel Buds Pro flanked by the AirPods and AirPods ProDuring its Google I O developer event the search giant introduced an update in its Pixel Buds lineup The Pixel Buds Pro are Google s attempt to take on Apple s AirPods Pro complete with active noise cancelation aimed at a primarily Android based audience Read more |
2022-05-16 17:31:17 |
海外TECH |
Engadget |
Spotify is testing NFT galleries on artist pages |
https://www.engadget.com/spotify-nft-gallery-test-173558481.html?src=rss
|
Spotify is testing NFT galleries on artist pagesIn addition to their latest tracks and playlists musicians can use Spotify s artist profile pages to promote merchandise and concert dates Soon they may be able to use those pages to promote NFTs as well As first reported by Music Ally Spotify has begun testing NFT galleries The feature is available to a select group of US users on Android and includes Web enthusiasts like Steve Aoki If you have access to the test you can view the galleries by visiting one of the included artist pages and scrolling past the song list Tapping on an NFT allows you to see a larger version of it in addition to a short description Per The Verge a “See More option redirects you to the NFT s OpenSea listing page where you can purchase the token According to Music Ally Spotify isn t collecting a commission on sales it helps facilitate during the test “Spotify is running a test in which it will help a small group of artists promote their existing third party NFT offerings via their artist profiles Spotify told the outlet “We routinely conduct a number of tests in an effort to improve artist and fan experiences Some of those tests end up paving the way for a broader experience and others serve only as an important learning We ve reached out to Spotify for more information The test comes as other major platforms like Instagram incorporate their own NFT features even as the market cools down Citing data from NonFungible The Wall Street Journal nbsp recently found that daily NFT sales are down percent from their peak in September The number of active wallets is also down by about percent nbsp |
2022-05-16 17:35:58 |
海外TECH |
Engadget |
'Fall Guys' lands on Switch, Xbox and Epic Games Store on June 21st |
https://www.engadget.com/fall-guys-nintendo-switch-xbox-172125114.html?src=rss
|
x Fall Guys x lands on Switch Xbox and Epic Games Store on June stIt s been over a year since Mediatonic confirmed Fall Guys Ultimate Knockout nbsp was coming to Xbox and Nintendo Switch After somedelays the wait is almost over The ridiculously fun battle royale platformer is coming to those platforms as well as Epic Games Store on June st A dedicated PlayStation version is on the way too Full cross play and cross progression will be available across all platforms as well What s more Fall Guys is going free to play Epic pulled a similar move with Rocket League after snatching up Psyonix Existing players on PlayStation and Steam will receive a legacy pack which includes three costumes and some other bonuses Newcomers who pre register can claim some swag as well nbsp It s not a huge shock that Fall Guys is coming to the Epic Games Store ーEpic bought Mediatonic parent Tonic Games Group last year Users have needed an Epic account to play Fall Guys since November when cross progression was added IT S HAPPENING Soon you ll be able to play Fall Guys for free on ALL PLATFORMS See you on PlayStation Nintendo Switch Xbox and EGS on June pic twitter com gLLzdMDDQーFall Guys BIG Announcement TODAY FallGuysGame May A new season will also get underway on June st Mediatonic is resetting the counter and calling it season one It will be the first seasonal update since November and as ever there will be new levels and more cosmetics For the first time there will be a premium i e paid season pass with tiers and extra cosmetic items Those who receive the legacy pass will get free access to the premium season pass for season one A free season pass will still be available with other items to unlock nbsp Crowns will no longer be used for currency to buy items in the store The crown rank feature will be boosted with more rewards Unspent crowns will be converted into kudos which will be the sole in game currency moving forward Costumes that are on the way include Ezio from the Assassin s Creed series along with Mecha Godzilla and Mothra There s one more big update on the way a level creator This was announced as being quot under construction quot and while it won t be arriving any time soon it s an exciting feature to look forward to The game debuted on PS and Steam in August and was an instant hit racking up millions of players on PC in just a few days and becoming the most claimed game in the history of PlayStation Plus at the time It seems player numbers have dropped quite a ways since the early days ーhaving increasingly lengthy seasons likely hasn t helped However the arrival of Fall Guys on more platforms the free to play shift and a new season should all bring new and lapsed players into the fold |
2022-05-16 17:21:25 |
海外TECH |
Engadget |
Cadillac's Lyriq EV will start at $62,990 |
https://www.engadget.com/cadillacs-lyriq-crossover-ev-will-start-at-62990-170815636.html?src=rss
|
Cadillac x s Lyriq EV will start at Cadillac has released more details about the vehicle and its features ahead of online orders reopening for its highly anticipated Lyriq EV on May th The crossover will start at and just more for its WD variant What s more Cadillac is sweetening the deal by including either two years of unlimited public charging through EV Go or up to a credit for a home charging unit through QMerit Orders will open for both the RWD and AWD versions at the end of this week Customers will have two additional exterior paint options ーOpulent Blue Metallic and Crystal White Tricoat ーto choose from that happens Customers should expect the RWD models to arrive first ーit s coming this fall after the summer production run of the Lyriq Debut Edition concludes The AWD models should hit dealerships by early next year Cadillac also unveiled the EPA rated mileage of miles for the RWD Lyric no official word yet on the AWD version but assume it to be a bit lower nbsp The company also announced on Monday that it is partnering with both charging station network EV Go and home charging system installers QMerit to help reticent buyers overcome their range anxiety through the judicious application of cash Lyric shoppers will have their pick of two included charging options two years of unlimited charging sessions at EV Go s plus stations or they ll receive up to a rebate for the installation of a Level AC home charging unit Opting for the public charging option will be faster with a kW max rate on a Level DC charger the Lyric will add miles of range in about minutes while the home charging method won t require you to hang around a parking lot for minutes while the Lyric s batteries refill nbsp nbsp |
2022-05-16 17:08:15 |
ニュース |
BBC News - Home |
Jake Daniels: Blackpool player says coming out will allow him to be 'free' and 'confident' |
https://www.bbc.co.uk/sport/football/61467159?at_medium=RSS&at_campaign=KARANGA
|
Jake Daniels Blackpool player says coming out will allow him to be x free x and x confident x Blackpool s Jake Daniels said his decision to come out as the UK s only openly gay active male professional footballer will allow him to be free and confident |
2022-05-16 17:50:50 |
ニュース |
BBC News - Home |
Julia James: Callum Wheeler guilty of PCSO murder |
https://www.bbc.co.uk/news/uk-england-kent-61434459?at_medium=RSS&at_campaign=KARANGA
|
wheeler |
2022-05-16 17:34:00 |
ニュース |
BBC News - Home |
Northern Ireland protocol: Legislative solution needed, says PM |
https://www.bbc.co.uk/news/uk-northern-ireland-61456677?at_medium=RSS&at_campaign=KARANGA
|
parties |
2022-05-16 17:01:22 |
ニュース |
BBC News - Home |
Johnny Depp hit me on honeymoon, says Amber Heard |
https://www.bbc.co.uk/news/world-us-canada-61467766?at_medium=RSS&at_campaign=KARANGA
|
wouldn |
2022-05-16 17:15:28 |
ニュース |
BBC News - Home |
Coleen Rooney says texts between Vardy and agent were evil |
https://www.bbc.co.uk/news/entertainment-arts-61458158?at_medium=RSS&at_campaign=KARANGA
|
rebekah |
2022-05-16 17:11:02 |
ニュース |
BBC News - Home |
Monkeypox: Four more cases detected in England |
https://www.bbc.co.uk/news/health-61470940?at_medium=RSS&at_campaign=KARANGA
|
infection |
2022-05-16 17:25:45 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
【あなたはどこに座る?】ビュッフェの選ぶ席で肥満度が変わる! - 超習慣力 |
https://diamond.jp/articles/-/302853
|
【あなたはどこに座る】ビュッフェの選ぶ席で肥満度が変わる超習慣力ダイエット、禁煙、節約、勉強ー。 |
2022-05-17 02:55:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
英語ができる人とできない人「勉強のやり方」に現れる差 - 独学大全 |
https://diamond.jp/articles/-/303072
|
英語 |
2022-05-17 02:50:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
捨てにくい 家の中の「個人情報」は どうすればいい? - 人生が変わる 紙片づけ! |
https://diamond.jp/articles/-/302960
|
捨てにくい家の中の「個人情報」はどうすればいい人生が変わる紙片づけ一番大事なのに、誰も教えてくれなかった「家の中の紙の片づけ方」を書いて、発売即重版となった石阪京子著「人生が変わる紙片づけ」。 |
2022-05-17 02:45:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
深夜のファストフード店でナンパに出くわした女が内心思っていること - 私の居場所が見つからない |
https://diamond.jp/articles/-/302914
|
|
2022-05-17 02:40:00 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
人生で一番後悔していること - 勉強が面白くなる瞬間 |
https://diamond.jp/articles/-/303308
|
韓国で社会現象を巻き起こした『勉強が面白くなる瞬間』。 |
2022-05-17 02:35:00 |
IT |
週刊アスキー |
iOS 15.5配信開始 Podcastでの機能追加やバグ修正 |
https://weekly.ascii.jp/elem/000/004/091/4091629/
|
iphone |
2022-05-17 02:25:00 |
コメント
コメントを投稿