IT |
ITmedia 総合記事一覧 |
[ITmedia News] TikTok、クリエイターに収益分配の新広告サービス「Pulse」 |
https://www.itmedia.co.jp/news/articles/2205/05/news031.html
|
itmedianewstiktok |
2022-05-05 08:23:00 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
pythonで「データ解析のための統計モデリング入門」1 確率分布と統計モデリングの最尤推定 |
https://qiita.com/tanaka_benkyo/items/8baaf25bbe6b098bb556
|
最尤推定 |
2022-05-05 08:47:17 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
Markdownエディタ Webアプリを作成する |
https://qiita.com/Stchan/items/6785892b4a7e6105f157
|
markdown |
2022-05-05 08:58:47 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
バニラな JavaScript や p5.js で Leap Motion の情報を取得する(leap.js ではなく WebSocket を利用) |
https://qiita.com/youtoy/items/efc4da1feee26186f565
|
pjswebedit |
2022-05-05 08:48:56 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
RubyエンジニアだけどRuby Silver の対策練習問題を解いてみたい |
https://qiita.com/YumaInaura/items/aa81a88893d65ce4f56c
|
silver |
2022-05-05 08:53:23 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
Dockerが有料化!? |
https://qiita.com/kazuya-ho2/items/78c3aca254a072d4af59
|
docker |
2022-05-05 08:24:00 |
海外TECH |
Ars Technica |
This is what the Salisbury Plain looked like before Stonehenge |
https://arstechnica.com/?p=1852278
|
dense |
2022-05-04 23:39:46 |
海外TECH |
Ars Technica |
Despite unknowns, FDA officials make the case for annual fall COVID shots |
https://arstechnica.com/?p=1852318
|
booster |
2022-05-04 23:09:58 |
海外TECH |
DEV Community |
Implementation of Azure IoT Hub |
https://dev.to/umar_abdulqadri_3e900d548/implementation-of-azure-iot-hub-3l31
|
Implementation of Azure IoT HubTask Creating IoT HubSign in to the Azure portal search for and select IoT Hubclick Create and fill in the fields as shown in the image belowGo to the Management tab and use the dropdown to set the Pricing and scale tier to S Standard tier Click the Review create button Click the Create button to begin creating your new Azure IoT Hub instance Wait until the Azure IoT Hub instance is deployed Task Adding an IoT DeviceWhen the deployment has completed click Go to resource from the deployment blade Alternatively search for and select IoT Hub and locate your new IoT Hub instanceGo to resource scroll down to the Device management section and click Devices Then click Add Device Provide a name for your new IoT device qadriumar and click the Save button This will create a new IoT device identity in your Azure IoT Hub If you do not see your new device Refresh the IoT Devices page Select qadriumar and copy the Primary Connection String value You will use this key in the next task to authenticate a connection to the Raspberry Pi simulator Task Testing the device using a Raspberry Pi SimulatorOpen a new tab in the web browser and type this shortcut link It will take you to a Raspberry Pi Simulator site When done select “X to close the pop up window In the code area on the right side locate the line with const connectionString line Replace it with the connection string you copied from the Azure portal Note that the connection sting includes the DeviceId qadriumar and SharedAccessKey entries Click Run below the code area to run the application The console output should show the sensor data and messages that are sent from the Raspberry Pi simulator to your Azure IoT Hub Data and messages are sent each time the Raspberry Pi simulator LED flashes Click Stop to stop sending data Return to Azure PortalSwitch the IoT Hub Overview blade and scroll down to the IoT Hub Usage information to view usage Change your timeframe in the show data for last to see data in the last hour Congratulations You have set up Azure IoT Hub to collect sensor data from an IoT device Note To avoid additional costs you can optionally remove this resource group Search for resource groups click your resource group and then click Delete resource group Verify the name of the resource group and then click Delete Monitor the Notifications to see how the delete is proceeding Thank you all |
2022-05-04 23:45:29 |
海外TECH |
DEV Community |
Fetch API is new old version of AJAX |
https://dev.to/diogorodrigues/fetch-api-is-new-old-version-of-ajax-1m14
|
Fetch API is new old version of AJAXIf you started your developer career about a decade ago you probably know how complicated it was to use AJAX in our web applications However by now we all know that modern vanilla JavaScript introduces us to several powerful functionalities including the Fetch API an easier way to get data from the server without reloading the page The term AJAX Asynchronous JavaScript and XML emerged in the late s as a programming concept that allowed parts of the HTML DOM to be updated without completely refreshing the page making our projects more dynamic and interactive And it was made possible by the XMLHttpRequest API introduced by Internet Explorer in As its name says this API was designed to get XML via HTTP and some time later it added support for other formats like JSON HTML and plain text But working with XMLHttpRequest was a pain back then and because of that some libraries like jQuery created in abstracted it to make it easier to use Following the evolution of JS the Fetch API was introduced in and has become the standard for handling data requests today Until February of this year the Fetch API only worked on the browser side but now it s also working on the Node js side but it s just an experiment for now we need to use libraries such as Axios API to work better with data requests in Node js Important JS concepts async callback functions promiseBefore we jump into the Fetch API let s understand some JavaScript concepts for a complete explanation see the references in the end of this article What is async in JavaScript By default JavaScript works synchronously as a single threaded programming language which means that one process must complete before another starts However there are a few ways to ensure processes work together at the same time in JS by making our code asynchronous For ease of understanding let s imagine that you go to a pizzeria to order a pizza The attendant takes your order and delivers it to the kitchen Synchronously the attendant have to wait until your pizza is cooked bring it to you and then go to another customer to take another order waiting for their pizza get ready and so on As you can see it s not a good approach On another hand asynchronously the attendant doesn t need to wait for the pizza get ready to move to the next customer they just simply moves to another customer taking more orders and delivering them to the kitchen as the pizzas get ready to be delivered to customers This is the difference between a synchronous and asynchronous systems Callback functionsOne of the oldest and most common ways of dealing with asynchronous code in JS is to use callback functions It s a JS concept to say a function wait to run in the future not now And there are many ways to implement it for example when we need to get some external data and wait for the server to respond then do another thing This is where AJAX comes into play and jQuery makes it easy by using its library s ajax method But the problem with callbacks starts when we need to nest them to execute different processes which is called callback hell making our code very difficult to read and maintain Promise in JSES introduced Promise a modern alternative to avoid callback hells The Promise object represents the eventual completion or failure of an asynchronous operation and its resulting value MDNIn a nutshell a promise acts as a proxy for an unknown value that will eventually become available at some point ending up as a resolved state if everything goes well or a rejected state if something goes wrong Using a Promise we call then to be executed if the result is resolved or catch if it is rejected In addition we can also chain Promises making one Promise return another Promise Have a look at the example below let myPromise new Promise function myResolve myReject Producing Code May take some time myResolve when successful myReject when error Consuming Code Must wait for a fulfilled Promise myPromise then function value code if successful function error code if some error The example above is from WSchool What s Fetch API in JavaScript and how to use it Before any explanation about Fetch API I want to show you its syntax fetch The code above will simply make an HTTP request to the GitHub API domain to get some json data What a wonderful and concise code isn t it Also introduced in ES the Fetch API emerged as a modern successor to XMLHttpRequest and the fetch method takes a path to a resource as input and returns a Promise making it possible to execute a function if resolved or rejected fetch then response gt response json then data gt console log data catch err gt console log err In the example above you can see the fetch method working together with then and catch as the Fetch API uses Promise behind the scenes Make an HTTP request to the GitHub API domainIf resolved convert it into JSON data by using json methodAs json method returns another Promise if resolved display the result in the console In case any of the steps above fail display the error in the console Async Await and Fetch APIAsync Await was introduced in ES and works as a syntactic sugar for promises making it possible to work with asynchronous functions See the code and its description below to better understand how to implement Async Await with Fetch API async function getUserData try const response await fetch const data await response json console log data catch err console log err The code above works on the same way that the previous one The difference here is that we no longer need to use promise syntax instead of it we use a wrapper to restyle the promise making it easier to read and use We use the keyword async to make this function asynchronous and await to block the execution of code inside the asynchronous function until the process terminates Then we use try catch to handle the resolved and rejected status Another way to use try catch with async functions is to handle the catch outside the function when it runs async function getUserData const response await fetch const data await response json console log data getUserData catch err console log err ReferencesAJAX on wikipediaXMLHttpRequest API on MDNJavaScript Asynchronous Programming and Callbacks on Node jsCallbacks on MDNPromises on MDNUnderstanding JavaScript Promises on Node jsFetch on JavaScript InfoAsync await on JavaScript Info ConclusionIn the early days of the web AJAX concept was strongly used along with XMLHttpRequest API Nowadays we have a better and modern way to handle data asynchronously by using Fetch API I hope you understood some important JavaScript concepts and how to implement fetch in this article Feel free to make any questions and don t stop here take a look at the references above to a better understanding See you next time |
2022-05-04 23:02:37 |
Apple |
AppleInsider - Frontpage News |
Outlook bug self-downloads empty 'TokenFactoryIframe' file to Macs |
https://appleinsider.com/articles/22/05/04/outlook-bug-self-downloads-empty-tokenfactoryiframe-file-to-macs?utm_medium=rss
|
Outlook bug self downloads empty x TokenFactoryIframe x file to MacsA faulty server side update released to Outlook causes TokenFactoryIframe to automatically download itself when Safari users visit the web version of Microsoft Outlook The file which has a size of KB is automatically downloaded to the Mac s hard drive The file does not have a file extension and cannot be opened The download occurs when visiting Outlook via Safari on macOS Sometimes the file may attempt to redownload itself every few seconds The problem does not appear to exist on Windows based machines Read more |
2022-05-04 23:52:01 |
海外TECH |
CodeProject Latest Articles |
Cryptographic Hashes: What They Are, and Why You Should be Friends |
https://www.codeproject.com/Articles/1044042/Cryptographic-Hashes-What-They-Are-and-Why-You-Sho
|
examples |
2022-05-04 23:29:00 |
海外ニュース |
Japan Times latest articles |
Biden to talk with G7 leaders this week about further sanctions on Russia |
https://www.japantimes.co.jp/news/2022/05/05/world/politics-diplomacy-world/g7-russia-new-sanctions/
|
Biden to talk with G leaders this week about further sanctions on RussiaBiden was asked about U S plans after the European Union proposed its toughest sanctions yet against Russia including a phased oil embargo |
2022-05-05 08:48:11 |
ニュース |
BBC News - Home |
The papers: Footie anthem 'faces axe' and Falkland inquiry call |
https://www.bbc.co.uk/news/blogs-the-papers-61328826?at_medium=RSS&at_campaign=KARANGA
|
anthem |
2022-05-04 23:36:07 |
ニュース |
BBC News - Home |
Richarlison: The work ethic and humble origins behind Everton forward's rise |
https://www.bbc.co.uk/sport/football/61245518?at_medium=RSS&at_campaign=KARANGA
|
league |
2022-05-04 23:03:53 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
EUのロシア原油禁輸、報復リスクも - WSJ発 |
https://diamond.jp/articles/-/302822
|
禁輸 |
2022-05-05 08:20:00 |
GCP |
Cloud Blog |
Google's Cloud Console vs Admin Console |
https://cloud.google.com/blog/topics/developers-practitioners/googles-cloud-console-vs-admin-console/
|
Google x s Cloud Console vs Admin ConsoleIf you ve worked in any facet of IT you know all too well how rapidly technology changes You ve probably seen some trendy industry buzz words lately like “cloud native “containers or “infrastructure as code just to name a few The CloudAnd then there s Cloud ーthe buzzword to rule them all If you are coming from a different cloud platform or even an on prem environment it can be a little intimidating and confusing to get started Read on to learn how to set up and secure your Google Cloud account and your resources A tale of two consoles Google Cloud gives you access to two consoles to help secure your account and resources The Admin console Allows you to manage people groups access controls and Google Workspace domains and The cloud console Allows you to implement granular access controls via Identity and Access Management IAM enable APIs and services create and manage infrastructure and resources like virtual machines networking and much more It s easy to get these two portals mixed up as they are both so important to managing who can access resources Let s take a look at the differences between them and their respective functions Our architectTo help us understand the difference we are going to use the help of Ramalton Ramalton just got a job at a SaaS company called Big Horn Inc building apps and software specifically for the city of Ramsville The company is expanding their IT department and hired a cloud architect to help them use Google Cloud and make their applications and infrastructure safer and more reliable Ramalton s first job is to set up the company s Google Cloud account so he holds a meeting with the Executive Board of Rams EBORs and decides to start with the basics He proceeds to give a crash course about setting up a Super Admin account and about Identity and Access Management IAM Ramalton goes into detail about how super admins have irrevocable administrative permissions This option made some executives a little nervous at first “That s too much power for one Ram to have they said Ramalton assured them that the super admin account would not be used for the day to day administration of the organization he would set up an org admin account for that Next he explained to the EBORs how IAM allows Rams to give specific people groups or identities access to specific cloud resources or capabilities IAM gives Rams the ability to keep their cloud infrastructure safe by restricting who can read edit or modify it So back to our hero…Ramalton s meeting was a success The EBORs were very impressed They wanted to get their Google Cloud account set up right away Ramalton s next tasks Create the super admin to set up Big Horn s account then create users and groups Ramalton knew that the initial account set up could be done from the Admin console What is the Admin console The Admin console allows an administrator like Ramalton to add users create groups manage devices configure billing and manage security settings All these Google Cloud administration tasks can be done from a single location Ramalton knew his company was already using Google Workspace so he knew it would be a good idea to set up an organization to manage their Google Cloud account What is an organization I am glad you asked An organization is the root node in the Google Cloud resource hierarchy which means it sits at the top above all your folders projects and resources Existing policies or restrictions made at the organization level are inherited by the folders projects and resources below it Organizations are available for Google Workspace or through Cloud Identity for Google Cloud customers and you can create an organization today if you don t have one Back to our friend Now it was time to set up the company s billing account along with users and groups What is a billing account In the Google Cloud console you can set up billing accounts which allows you to create new services and pay for them and decide which users in your organization have view only or admin access to billing View only access allows a user to only see billing details while admin access allows the user to make changes and or adjustments to the account billing It s a good idea to understand each person s responsibility in order to give appropriate access as needed Note that you may have a billing account if you are already a Google Maps Platform customer Now that billing has been set up Ramalton needs to create users and groups in the admin console UsersA user is a person that you want to give access to so that they can do a specific task or access specific resources in your account Under your organization you can invite people to become users GroupsGroups are a way to manage users and their permissions Usually you will put users into groups based on the tasks they normally complete need to do or by resources they regularly access You can attach a role also known as permissions to groups For example if you have several users who only need read only access to compute resources you can place them in a group and attach the compute viewer role to it Now each user in that group will be able to inherit compute viewer permissions Then it was time for a late day snack Ramalton headed to the vending machine and decided to buy a bag of salt licks and some grass chips They were his favorite While daydreaming Ramalton thought about how he could provide additional security to the company s Google Cloud account He decided it would be a good idea to set up some guardrails He wanted certain users to only have access to specific services in the company s account He found an article on organizational policies which explained how to set high level rules that help provide governance within Rams account Organizational policies allow customers to do things like restrict resource creation to certain regions restrict the APIs that can be enabled and limit resource creation to only specific configurations Ramalton was all done setting up the organization billing users and group and organizational policies Now he was ready to get into the account and set up the infrastructure so he logged into the Cloud Console What is the Cloud Console As your main gateway to creating monitoring and changing Google Cloud VMs storage buckets and everything else the Cloud Console allows you to access and provision a wide variety of services Within the Cloud Console you will find a navigation menu that logically groups services based on category The Cloud Console provides the tools and settings you need to configure and secure your applications and the infrastructure they run on VPC Ramalton took a look at his whiteboard where he took notes from his meeting with the networking and security teams He remembered they spoke about the need to set up a virtual private cloud VPC From an infrastructure networking and security standpoint you will need one or more VPCs to build resources VPCs allow you to create your own private network within the cloud set up routing and define firewall rules A VPC is like your own section of a Google datacenter with its own networking that you build your resources in By default Google Cloud gives you an initial “default VPC to group your resources Google Cloud s best practice is to set up and configure your own VPC so you can fine tune your network to your specific needs and maintain complete control over the network Authenticating Workloads Ramalton hears the thud of a hoove bamming on his office door A burly voice then says “Hey wassup Ramalton It s his supervisor Ramsey Ramsey starts to go on and on about how one of his horns is starting to curl and how it s hard to find hats now After complaining to Ramalton he switches the conversation to one of their apps In Big Horn s on prem data center there is an application called Sheepdreams Sheepdreams keeps track of all the baby sheep that have jumped over the moon This app is mission critical for Big Horn as it s their biggest source of revenue It helps millions sleep better at night and without it the world as we know it would be doomed Ramalton needs to give their on prem database access to a workload in their Google Cloud account Due to state regulations the customer data needs to stay on prem Ramalton doesn t want to use long lived service keys because they can become a secret management headache After reading Google Cloud docs Ramalton thinks that Workload Identity Federation would be a great option to use He can use his current on prem identity provider to call Google Cloud s short token service STS to exchange identities for an access token that will then impersonate a service account configured within his Google Cloud account This option will allow him to avoid the headache of managing and securing service keys Workload identity federation allows external workloads of your applications to securely obtain access to your workload in Google Cloud by providing short lived access as opposed to long lived service account keys It s been a couple of months now and Ramalton has made some really great progress with adapting and using Google Cloud One day while talking to new manager Hamilton they began to discuss the newest craze sweeping social media called the tough horn challenge Hamilton came up with an idea to build an application that would allow rams all over the world to post pictures so they could show how much damage their horns could do This idea could potentially add a new stream of revenue to Big Horn Inc The application would need to have a database web server and persistent storage along with load balancing They wanted to make use of containers because they require less overhead and provide increased portability Ramalton remembers watching a YouTube video from Google Cloud Next that highlighted Google Kubernetes Engine GKE as a quick and easy way to create and manage containerized workloads He knew it would be perfect to use for this project because as a container orchestration tool it can deploy manage and scale containers Tools like Google Kubernetes Engine allow Ramalton to create and deploy cloud native applications securely Securing all the thingsDue to the ongoing pandemic Ramalton has spent months working from home He feels confident going back to the office after getting his last dose of the COVID vaccine Before he could get his hooves in his cubicle he gets called to the new CISO s office He has been impressed with Ramalton s progress and Google Cloud knowledge and wants help with a new project to modernize Big Horn s security practices Recently one of Big Horn s compute resources was compromised and an attacker obtained access to company credentials letting them start some crypto mining Ramir suggested that Ramalton look into using Identity Aware Proxy IAP for access to apps running on Compute Engine instances and secure the apps using identity controls In addition Google BeyondCorp Enterprise allows them to give access to critical applications and services whether they run on prem or in the public cloud BeyondCorp Enterprise allows access decisions to be made on a per request basis using the context of the request rather than the network it came from BeyondCorp Enterprise is flexible scalable and most of all helps secure more than a traditional perimeter model it also easily integrates with existing device management systems to help make good context based access decisions Get startedNow that you can tell these two consoles apart frolic freely and secure your Google Cloud account and resources You can sign up for a Google Cloud account here Happy clouding |
2022-05-04 23:30:00 |
コメント
コメントを投稿