投稿時間:2022-05-23 03:08:16 RSSフィード2022-05-23 03:00 分まとめ(10件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
js JavaScriptタグが付けられた新着投稿 - Qiita Chrome拡張機能(MV3) × Firebase(RealTime Database) https://qiita.com/Waka0830/items/354660ee13c64bbbde7b htmlcssjavascr 2022-05-23 02:27:04
海外TECH DEV Community What is AWS Ground Station? https://dev.to/kcdchennai/what-is-aws-ground-station-1jnn What is AWS Ground Station AWS Ground Station is a fully managed service that lets us control satellite communications downlink and process satellite data and scale our satellite operations quickly easily and cost effectively without having to worry about building or managing our own ground station infrastructure Satellites are used for a wide variety of use cases including weather forecasting surface imaging communications and video broadcasts Ground stations are facilities that provide communications between the ground and the satellite by using antennas to receive satellite data and control systems to command and control the satellites Today we must either build our own ground stations and antennas or obtain long term leases with ground station providers often in multiple countries to provide enough opportunities to contact the satellites as they orbit the globe Once all this data is downlinked we need servers storage and networking in close proximity to the antennas to process store and transport the data from the satellites AWS Ground Station eliminates these problems by delivering a satellite ground station as a service AWS Ground Station provide the AWS Cloud and their low latency global fiber network right where our data is downlinked into our ground stations This enables us to easily control satellite communications quickly ingest and process our satellite data and rapidly integrate that data with our applications and other services running in the AWS Cloud For example we can useAmazon EBS Amazon EFS or Amazon S to store and share the data hunt for real time business insights with Amazon Kinesis Data Streams and Amazon EMR apply machine learning algorithms and models with Amazon SageMaker add image analysis with Amazon Rekognition and improve data sets by combining satellite data with IoT sensor data from AWS Greengrass AWS Ground Station can help us save up to on the cost of our ground station operations by using a fully managed ground station instead of building and operating our own global ground station infrastructure There are no long term commitments we pay only for how long we schedule the antennas and we gain the ability to rapidly scale our satellite communications on demand when our business needs it For more information on AWS Ground Station refer here Thanks 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-22 17:51:31
海外TECH DEV Community Data Structures: Trees II https://dev.to/m13ha/data-structures-trees-ii-4kng Data Structures Trees IIThis is part of the article on Tree data structures In the first part of this article we looked at the types of trees how they work and their uses In this part we are going to implement a Binary Search Tree BST and General Tree using Javascript Before we get into the coding aspect we need to first address two very important concepts Recursion and Tree Traversal RecursionRecursion is when a function solves a problem by repeatedly calling itself Recursion is used in algorithms where the amount of data we are working with is unknown Recursion involves solving a problem by repeatedly solving small parts of the problem until the complete problem is solved A good analogy for recursion is this one given by Aaron Krolik on QuoraSomeone in a movie theater asks you what row you re sitting in You don t want to count so you ask the person in front of you what row they are sitting in knowing that you will respond one greater than their answer The person in front will ask the person in front of them This will keep happening until word reaches the front row and it is easy to respond I m in row From there the correct message incremented by each row will eventually make its way back to the person who asked The reason why we need to understand recursion before making our tree data structures is because some of the methods are easier and faster to write recursively because trees can have anything from just a few to thousands of nodes An example of a recursive function is this addAll n function that adds all numbers that are less than a given number to said number function addAll n if n return else return n addAll n recursion When the above function is called it first checks if the value of n is and returns it if true this is known as the base case and is the condition that ends the function if n is greater than then the function adds n to the result of calling itself again Most languages make use of the call stack or stack frame to keep track of the order in which the function calls itself Tree TraversalTree traversal refers to the process of searching and accessing nodes in a tree Trees do not have direct access so we use algorithms to locate and access nodes in a tree Tree traversal algorithms ensure that nodes in a tree are only visited once data is only accessed once when searching through a tree There are main categories of tree traversal algorithms Depth First Search DFS and Breadth First Search BFS also known as Level Order Traversal DFS DFS algorithms work in a branch by branch manner meaning they visit each subtree in a tree and their subtrees in turn The name Depth first refers to how the algorithms go from the deepest leaf node in a subtree and back to the root for each child of the root node There are main types of Depth First Traversal algorithms Inorder Traversal This is when the subtrees of a tree are visited from the left most node to the root and then the right most node In order traversal algorithms follow a left root and then right approach when traversing the tree we can see this in action below Preorder Traversal In this type of algorithm the root node is visited first then from the left most subtree and its subtrees to the right most subtree and its subtrees Postorder Traversal In this type of algorithm all subtrees starting from the left going to the right are visited before the root node BFS BFS also known as level order traversal is when nodes in a tree are visited level by level In the algorithm a queue is used to keep track of the nodes in a tree and ensure they are visited in a FIFO first in first out manner A level order traversal would look like this in action Both the BFS and DFS are both algorithms used in graph data structures which we shall cover in the future trees are considered a form of graph Now that we have an understanding of recursion and traversal we can start building our Trees General Tree In JavascriptThe first tree we will be building is a general tree and we will be using a linked list to keep track of the child nodes of each node Our general tree is going to have main methods Insert This method adds a node to the tree Contains This method checks if a data is present in a tree Print This function prints the value of each node in the tree using a level order traversal Size This function returns the number of nodes in the tree First lets create a node with properties the value of the node a linked list of children and a pointer to the next sibling node class Node constructor data this value data this children new LinkedList this next null The linked list is going to have properties the pointers for the head and tail of the list and a size property to keep track of the size of the linked list The linked list will have a method called append to add a new node to the list class LinkedList constructor this head this tail null this size append node if this tail this tail node this head this tail else let oldTail this tail this tail node oldTail next this tail this size Our Tree will have properties a pointer to the root node of the tree and a count of the nodes in the tree class Tree constructor this root null this count A few of our tree methods will require us to use traversal to find a node so lets make a traversal method first Method break down Create an array called queue and push the root node into the array Create a currentNode variable but leave it undefined Initializes a while loop that will run as long as there is a value in the queue array Inside the loop remove and set the head of the queue array to currentNode If currentNode has children then we push them to the queue as well using a while loop Else we check if currentNode is the node we are looking for if yes return it and end the function other wise we keep looping through the tree till we find it if we don t find it we return false The function should look like below bfsFindNode data let queue queue push this root let currentNode while queue length gt node queue shift if node children size gt let currentChild node children head while currentChild queue push currentChild currentChild currentChild next if currentNode value data return node return false Insert MethodThe insert method adds a node into the tree under a specified parent node Method Break DownCreate a new node using the given data as the value Create an undefined variable called parentNode Check if we have a root node if no set the new node as the root increase the count by and end the method If we have a root node check that a parent value is specified if not let the user know and end the function If yes search for it using our previously created bfsFindNode method if the node is present append the new node to its children linked list if not let the user know the node does not exist in the tree The function should look like below insert data parent let node new Node data let parentNode if this root this root node this count return if parent console log please specify a parent return parentNode this bfsFindNode parent if parentNode console log that node does not exist return parentNode children append node this count Contains MethodThe contains method checks if a node is present in a tree or not and returns true or false contains data if data let parentNode this bfsFindNode data if parentNode return true return false Size MethodThe size method returns the count property of the tree which tells us how many nodes are in the tree size console log this count return this count Print MethodThe print method uses the same logic as our bfsFindNode method the only difference being that it logs each node to the console as it traverses through the tree print if this count let queue queue push this root let node while queue length gt node queue shift if node children size gt let currentNode node children head while currentNode queue push currentNode currentNode currentNode next console log node value Complete General Tree Codeclass Node constructor data this value data this children new LinkedList this next null class LinkedList constructor this head this tail null this size append node if this tail this tail node this head this tail else let oldTail this tail this tail node oldTail next this tail this size class Tree constructor this root null this count bfsFindNode data let queue queue push this root let node while queue length gt node queue shift if node children size gt let currentNode node children head while currentNode queue push currentNode currentNode currentNode next if node value data return node return false insert data parent let node new Node data let parentNode if this root this root node this count return if parent console log please specify a parent return parentNode this bfsFindNode parent if parentNode console log that node does not exist return parentNode children append node this count contains data let parentNode this bfsFindNode data if parentNode return true return false print if this count let queue queue push this root let node while queue length gt node queue shift if node children size gt let currentNode node children head while currentNode queue push currentNode currentNode currentNode next console log node value size console log this count return this count You can find the code here try adding some of your own methods Binary Search Tree In JavascriptOur BST is going to have methods Insert Adds a node to the tree Min Returns the lowest value in the tree Max Returns the highest value in a tree Print Prints all the nodes in the tree Size The the number of nodes in the tree In this tree we won t be needing a linked list because BST s have a finite amount of children per node to be exact usually called left and right The left node always has a lesser value than it s parent while the right node has a higher value The BST nodes will have properties a value and pointers to the left and right child nodes while our tree will have same as before class Node constructor data this value data this left null this right null class Tree constructor this root null this count Insert MethodThe insert method will make use of a recursive function to search through the tree I will be using the preorder traversal method Method Break DownCheck that the given data is a number if not let the user know Create new node using the given number Check if the tree is empty if it is set the new node as the root of the tree If the tree is not empty then we will have to compare the given data to the each node in the tree starting from the root to find a parent for the data First we check if the root data is equal to the root if it is then let the user know that node already exists If the data is not equal to the root we will check if the data is less than or greater than the root node If it is less and the left pointer is null we can set the new node as the left child of root If the data is greater than the root and the right pointer is null we can set the new node as the right child of root If the left pointer is occupied we will repeat the process again using the left child as root If the right pointer is occupied we will repeat the process again using the right child as root insert data if typeof data number let newNode new Node data if this root this root newNode this count return let dftSearch node gt check root if data node value console log node already exist return check left if data lt node value if node left dftSearch node left else node left newNode this count check right if data gt node value if node right dftSearch node right else node right newNode this count dftSearch this root Min MethodThe min method simply returns the lowest value in the tree this means all we have to do is traverse left down the tree till we reach the last leaf node min let currentNode this root while currentNode left currentNode currentNode left console log currentNode value return currentNode value Max MethodThe Max Method returns the highest value in the tree similar to the min method the difference being we go right instead of left max let currentNode this root while currentNode right currentNode currentNode right console log currentNode value return currentNode value Print MethodThe print method traverses the whole tree in a preorder manner and prints the value of each node The method uses a recursive function to do this Method Break DownStarting from root we log the value of the node to the console Check for a left child Check for a right child If left child is present call function with left child as root If right child is present call function with right child as root print let dftPrint node gt check root console log node value check left if node left dftPrint node left check right if node right dftPrint node right dftPrint this root Size MethodThe method simply logs the number of nodes in the tree to the console size console log this count return this count Complete Binary Search Tree Codeclass Node constructor data this value data this left null this right null class Tree constructor this root null this count insert data if typeof data number let newNode new Node data if this root this root newNode this count return let dftSearch node gt check root if data node value console log node already exist return check left if data lt node value if node left dftSearch node left else node left newNode this count check right if data gt node value if node right dftSearch node right else node right newNode this count dftSearch this root min let currentNode this root while currentNode left currentNode currentNode left console log currentNode value return currentNode value max let currentNode this root while currentNode right currentNode currentNode right console log currentNode value return currentNode value print let dftPrint node gt check root console log node value check left if node left dftPrint node left check right if node right dftPrint node right dftPrint this root size console log this count return this count You can find the code hereIf this article was helpful please give it a ️i would really appreciate it 2022-05-22 17:26:42
海外TECH DEV Community New AWS Config Rules - LambdaLess and rusty https://dev.to/aws-builders/new-aws-config-rules-lambdaless-and-rusty-hbe New AWS Config Rules LambdaLess and rustyAWS Config checks all your resources for compliance With managed rules it covers a lot of ground But if you need additional checks until now you had to write a complex Lambda function With the new Custom Policy type it is possible to use declarative Guard rules Custom Policy rules use less lines of code and are so much easier to read AWS CloudFormation Guard is a general purpose policy as code evaluation tool which means it interprets rules The Guard tool is used inside AWS Config and you can use it offline which makes development easy It is written in Rust The first part of this post shows you the example from the AWS documentation which checks a DynamoDB table In the second part I will show you how to create these rules yourself What is AWS Config AWS ConfigAWS Config checks your resources and provides configuration snapshots All changes of these Configuration Items are stored in a timeline So you may exactly see when resource configuration changes In addition to that you may query the config database for resources What types of rules exist AWS managed RulesThere are managed rules You can apply them quickly and no code is needed A list is provided in the Config documentation Custom Lambda RulesSometimes you need additional or special checks Until April you had to write a custom Lambda rule The AWS rdk rule development kit supports the development of custom Lambda rules I have built some of those rules for several projects and found the development process quite complex If you want to check only an attribute of a resource you need about lines of code Checking DynamoDB with a custom Lambda rule For instance if you want to check a DynamoDB table in the Lambda function the first thing you have to do is check the table status like in the DYNAMODB ENCRYPTED Rule status table configuration item configuration tableStatus if status table DELETING return build evaluation from config item configuration item NOT APPLICABLE You can see the whole line Lambda function in the AWS Config Rules repository on github Custom Policy RulesThis is the same check as Guard rule fragment when configuration tableStatus ACTIVE There is also a change in the programming logic You do not think in programm steps you think in rules and filters With the Guard rules you filter the not applicable items with the when query These query are documented in the CloudFormation Guard repository First complete rule Checking DynamoDB for point in time backup anablesIn the Creating Custom Policy Rules documentation the example checks a Table for point in time recovery let status ACTIVE rule tableisactive when resourceType AWS DynamoDB Table configuration tableStatus status rule checkcompliance when resourceType AWS DynamoDB Table tableisactive let pitr supplementaryConfiguration ContinuousBackupsDescription pointInTimeRecoveryDescription pointInTimeRecoveryStatus pitr ENABLED Let s break this down In the first rule tableisactive Tables are filtered for being ACTIVE The second rule called checkcompliance uses a variable pitr point in time recovery to check the supplementaryConfiguration This supplementaryConfiguration is the DynamoDB backup configuration You read it with the AWS CLI aws dynamodb describe continuous backups table name tableThe output is for example ContinuousBackupsDescription ContinuousBackupsStatus ENABLED PointInTimeRecoveryDescription PointInTimeRecoveryStatus ENABLED EarliestRestorableDateTime T LatestRestorableDateTime T So supplementaryConfiguration ContinuousBackupsDescription pointInTimeRecoveryDescription pointInTimeRecoveryStatus reads ENABLED which evaluates to passing the check for this example table Unfortunately I have not yet found any documentation on the supplementaryConfiguration for different resourceType Development Steps for a simple exampleNow for a simpler example how to develop custom Guard rules which only checks the base configuration of the resource not the supplementaryConfiguration I will take the well known Lambda Runtime example This example is also covered as a managed rule lambda function settings check The check evaluates to compliant if the Lambda Function uses the newest runtime of the development languages Guard Rule development stepsStep Find configuration item and the structureStep Create the rule codeStep Create Rule resource with debug optionStep Create a PASS and a FAIL resource for testingStep Debug and change code with Logs Step Find configuration itemsThe structure of the configuration item can be found with the AWS CLI describe commands like aws lambda get function function name name Configuration FunctionName compare py FunctionArn arn aws lambda eu central function compare py Runtime python As the structure is correct the case of the names is wrong We need to look at the Runtime attribute but is is stored as runtime How do I know this The better way is to use the Config Resource Inventory Youd find items in the Config Dashboard Open a Lambda Function item The rules are checked against this configuration item This is a fragment of the Config Configuration Item version accountId resourceType AWS Lambda Function resourceId compare py resourceName compare py configuration functionName compare py functionArn arn aws lambda eu central function compare py runtime python So the field we check in Config is configuration runtime Now I create the rule You find the documentation for Guard in the github repositoryYou will see that there are mostly CloudFormation examples because Guard is used for CloudFormation template checks in the first place But it can be used for any structures Step Create the rule codeThe first part of the rule is to filter for the Resource type resourceType AWS Lambda Function If you check at the deepest configuration level it is a good idea to check the API documentation for the allowed values The allowed runtime values are Valid Values nodejs nodejs nodejs nodejs nodejs x nodejs x nodejs x nodejs x java java al java python python python python python dotnetcore dotnetcore dotnetcore dotnetcore dotnet nodejs edge go x ruby ruby provided provided alAs this attribute is not required Required No I need to check for the existence at first WHEN configuration runtime EMPTY For the values itself there is the IN function configuration runtime IN python go x nodejs x So the whole check is lines long rule lambdaruntimenewest when resourceType AWS Lambda Function WHEN configuration runtime EMPTY configuration runtime IN python go x nodejs x Step Create Rule resource with debug optionOpen the Config Service in the AWS console and create a rule with type Create custom rule using Guard For this example the name is LambdaRuntime Be sure to add a description which tells the reader what attributes are checked The Name of the rule the CloudWatch debug log will be named accordingly here LambdaRuntime A descriptive description Checks runtime of Lambda for newest runtime Enable logs disable them later Rule content Limit to Lambda resources AWS Resources not third party Choose Lambda You do not need a picture for these steps do you Click Next Click Add rule in the Review and create step Step Create a PASS and a FAIL resource for testingNow you create a Lambda Function which passes the check Save the configuration item as pass json Save the failing Lambda Function configuration as fail json You can use these files for local development later Step Debug and change code with LogsYou will find the debug log in CloudWatch Log The log group will have the name of the rule prepended like aws config config rule LambdaRuntime config rule awytio Make sure to set a retention time and disable the debug output option later because a lot of log entries are generated Now you can Re Evaluate the new rule to trigger an execution If your pass Function passes and your fail Function fails you are done This was development with the AWS console Now I will show you the local development First you have to install Guard according to Guard on github Local DevelopmentWith installed Guard tool you can develop rules locally if the do not use supplementaryConfiguration Save fail configuration item as fail json and passed item as pass json If you just want to test Guard you can use the code at megaproaktiv on github config guard Validate failcfn guard validate data fail json rules LambdaRuntime ruleThe data parameter points to the data file and the rules parameter to the rules file Output fail json Status FAILFAILED rulesLambdaRuntime rule lambdaruntimenewest FAIL Evaluation of rules LambdaRuntime rule against data fail json Property configuration runtime in data fail json is not compliant with LambdaRuntime rule lambdaruntimenewest because provided value nodejs x did not match expected value python Error Message Property configuration runtime in data fail json is not compliant with LambdaRuntime rule lambdaruntimenewest because provided value nodejs x did not match expected value go x Error Message Property configuration runtime in data fail json is not compliant with LambdaRuntime rule lambdaruntimenewest because provided value nodejs x did not match expected value nodejs x Error Message Validate Passcfn guard validate data pass json rules LambdaRuntime ruleOutput pass json Status PASSPASS rulesLambdaRuntime rule lambdaruntimenewest PASS Evaluation of rules LambdaRuntime rule against data pass json Rule LambdaRuntime rule lambdaruntimenewest is compliant for template pass json ConclusionThe new Custom Policy Rules type makes the writing of simple checks very easy The existence of the rules engine as a local open source tool simplifies rules development The supplementaryConfiguration should be documented which is not the case now Also it is the first AWS Rust backend service I have seen so this is an exciting trend What do you think about rusty Custom Policy Rules For more AWS development stuff follow me on twitter megaproaktiv See alsoCode on GithubAWS Labs Lambda Config rules AWS Documentation Creating AWS Config Custom Policy RulesCloudFormation Guard 2022-05-22 17:24:53
Apple AppleInsider - Frontpage News Apple Health VP promotes Apple Watch monitoring in wearables TV spot https://appleinsider.com/articles/22/05/22/apple-health-vp-promotes-apple-watch-monitoring-in-wearables-tv-spot?utm_medium=rss Apple Health VP promotes Apple Watch monitoring in wearables TV spotDr Sumbul Desai Apple s VP of Health took part in a CBS Sunday Morning segment on health trackers with the piece showing not only the utility of hardware like the Apple Watch in health but also the potential of wearable devices to do more The opening segment of CBS Sunday Morning on Sunday had correspondent David Pogue talking to a trio of experts about wearable devices Dr Desai was prominently featured using the time to show off many features of the Apple Watch in relation to health monitoring and tracking The features covered include heart rate tracking irregular heart rate notifications blood oxygen monitoring walking steadiness noise notifications and hand washing Demonstrations included showing Pogue s heart rate sound level warnings and an electrocardiogram Read more 2022-05-22 17:53:56
海外TECH Engadget ‘Stalker 2’ is reportedly back in development after Ukraine invasion forced studio to relocate https://www.engadget.com/stalker-reportedly-back-in-development-172547282.html?src=rss Stalker is reportedly back in development after Ukraine invasion forced studio to relocateGSC Game World has reportedly resumed work on Stalker Heart of Chornobyl after Russia s invasion of Ukraine forced the studio to pause development On March nd the Kyiv based developer announced it was putting the game on hold while it worked to help its employees and their families “survive the conflict According to reports from Czech media the studio relocated its staff to Prague that same month Now it would appear the game is back on track Responding to a question from a member of Stalker sDiscord community asking if development had resumed a GSC Game World employee said “it continues in a message spotted by Polish gaming outlet GRYOnline We ve reached out to the studio for confirmation Following a delay at the start of the year GSC Game World said it would release Stalker on December th The announcement came before Russia s invasion of Ukraine sidelined the studio Since the war began the company also subtly changed the game s name Its subtitle now reads “Heart of Chornobyl instead of “Chernobyl with the former reflecting the local Ukrainian spelling of the site of the nuclear disaster 2022-05-22 17:25:47
ニュース BBC News - Home Man City 3-2 Aston Villa: Pep Guardiola's side win Premier League after amazing fightback https://www.bbc.co.uk/sport/football/61453540?at_medium=RSS&at_campaign=KARANGA Man City Aston Villa Pep Guardiola x s side win Premier League after amazing fightbackManchester City win the Premier League for the sixth time after a stunning fightback from two goals down to beat Aston Villa 2022-05-22 17:47:16
ニュース BBC News - Home Burnley 1-2 Newcastle: Callum Wilson scores twice as Clarets are relegated to Championship https://www.bbc.co.uk/sport/football/61453542?at_medium=RSS&at_campaign=KARANGA Burnley Newcastle Callum Wilson scores twice as Clarets are relegated to ChampionshipBurnley are relegated from the Premier League on a dramatic final day as a home defeat by Newcastle United condemns them to the Championship 2022-05-22 17:39:47
ニュース BBC News - Home Liverpool 3-1 Wolverhampton Wanderers: Reds victory not enough as Man City win title https://www.bbc.co.uk/sport/football/61453543?at_medium=RSS&at_campaign=KARANGA Liverpool Wolverhampton Wanderers Reds victory not enough as Man City win titleLiverpool s hopes of winning a quadruple are ended on the final day of the Premier League season as a tense victory over Wolves proves too little to deny Manchester City the title 2022-05-22 17:27:15
ビジネス ダイヤモンド・オンライン - 新着記事 テレビ「土曜はナニする!?」で脳トレが話題に! すぐネガティブになる人がポジティブ発想に変わるトレーニング - 1分間瞬読ドリル https://diamond.jp/articles/-/303591 2022-05-23 02:55:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)