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

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
TECH Engadget Japanese 2015年12月11日、バッテリーを搭載した小型デスクトップ「ワリキリPC」が発売されました:今日は何の日? https://japanese.engadget.com/today-203024995.html 税別 2021-12-10 20:30:24
AWS AWS Machine Learning Blog Live transcriptions of F1 races using Amazon Transcribe https://aws.amazon.com/blogs/machine-learning/live-transcriptions-of-f1-races-using-amazon-transcribe/ Live transcriptions of F races using Amazon TranscribeThe Formula F live steaming service F TV has live automated closed captions in three different languages English Spanish and French For the season FORMULA has achieved another technological breakthrough building a fully automated workflow to create closed captions in three languages and broadcasting to territories using Amazon Transcribe Amazon Transcribe … 2021-12-10 20:08:24
AWS AWS Podcast #494: [INTRODUCING] The AWS AI & ML Scholarship Program with Special Guest Adriana Gascoigne https://aws.amazon.com/podcasts/aws-podcast/#494 INTRODUCING The AWS AI amp amp ML Scholarship Program with Special Guest Adriana GascoigneArtificial Intelligence AI and Machine learning ML is poised to transform virtually every industry however there are currently not enough trained ML developers to meet this demand and far fewer from backgrounds underrepresented in tech In this episode Nicki talks with Adriana Gascoigne CEO and Founder of GirlsInTech and Maryam Rezapoor Sr Product Manager at AWS about opportunities to close this gap with the AWS AI ML Scholarship Program in collaboration with Intel and Udacity best practices within the space and more Read the blog Learn more  DeeprRacer Student GirlsInTech 2021-12-10 20:32:53
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) SQLiteのSELECTの仕方 https://teratail.com/questions/373292?rss=all 2021-12-11 05:48:19
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) バッチファイルで、jarファイルを起動したまま自動でコマンドプロンプトを閉じたい https://teratail.com/questions/373291?rss=all バッチファイルで、jarファイルを起動したまま自動でコマンドプロンプトを閉じたいバッチファイルで、jarファイルを実行しているのですが、アプリケーション起動中にコマンドプロンプト画面を閉じたいですが、start→exitコマンドを記載しても解決できなかったため質問させていただきます。 2021-12-11 05:12:46
海外TECH MakeUseOf The 6 Best Apps for Hosting a Webinar on Your Smartphone https://www.makeuseof.com/best-apps-for-hosting-webinar-android-ios/ perfect 2021-12-10 20:46:38
海外TECH MakeUseOf The 12 Best Ways to Use Mind Maps as a Student https://www.makeuseof.com/best-ways-use-mind-maps-as-student/ studentfind 2021-12-10 20:16:41
海外TECH DEV Community What was your win this week? https://dev.to/devteam/what-was-your-win-this-week-fhe What was your win this week Hey there Looking back on this past week what was something you were proud of accomplishing All wins count ーbig or small Examples of wins include Starting a new projectFixing a tricky bugFinishing a great book or whatever else might spark joy ️Congrats on your accomplishments this week 2021-12-10 20:29:50
海外TECH DEV Community How to create an interactive SVG donut chart using Angular https://dev.to/mustapha/how-to-create-an-interactive-svg-donut-chart-using-angular-19eo How to create an interactive SVG donut chart using AngularIn this post we will create an SVG donut chart with clickable slices parts I will first explain the problem with the common way to implement an SVG donut chart using stroke dasharray and stroke dashoffset Then we will talk about a new way to do it I will walk you through the math in great detail and finally we will use Angular to implement the solution The problem with the stroke dasharray implementationSalomone Baquis talks about this in this post This method uses the stroke dasharray and stroke dashoffset properties to draw a slice of border around SVG circles Read the post to see how he do it The problem is that we can t interact we the slices For example we can t change the color of the slice on hover or do something when the slice is clicked Because to draw the slices we have to draw an entire circle and color parts of its border So the circles go on top of each other and only the last circle is interactive Think of this as positioning multiple HTML elements in the same spot The element with the highest z index hides all the other elements below it Have a look at the illustration below and pay attention to the ID of the circle that is highlighted Path to the rescueWhat we want is something like this To do this we will draw each donut slice using a lt path gt The lt path gt element is the most powerful element in the SVG library of basic shapes It can be used to create lines curves arcs and more The shape of a lt path gt element is defined by one parameter d The d attribute contains a series of commands and parameters used by those commands Docs here To draw the slices we need only three commands M x y Move to the x y positionL x y Draw line from the previous position to the x y positionA x radius y radius x axis rotation large arc flag sweep flag x y Draw an arc from the previous position to the x y positionThe move and line commands are pretty straightforward The arc command is more complex but don t worry we will see how to use each of its params Let s say we have an SVG with the following viewBox viewBox The most top left point is and the most bottom right point is Let s build a quarter of a circle multiple of a quarter are the easiest because we know their x y positions lt svg viewBox gt lt path fill tomato d M A L gt lt svg gt So we moved to the point then we drew an arc with a radius of to the point And finally we drew a line back to the center ️The SVG closes automatically so we don t have to draw a line back to the starting position So far we have this I outlined the SVG with a black border Now let s play with the different flags to understand them Let s start with the sweep flag Say we set it to true we have this The arc went from convex to concave This flag determines if the arc should begin moving at positive angles or negative ones which essentially picks which of the two circles will be traveled around We will talk more about this in a second Let s move on to the large arc flag if we set it to we have this This flag determines if the arc should be greater than or less than degrees in the end this flag determines whether we take the short route to the point or the long one Now let s enable both of these flags This is what we get We get this because we took the longest route to the point and we move there while taking a negative angle direction With this we are set to move on to the drawing of the chart But before we do we have to talk about some basic trigonometry Trigonometry Pie chart sliceLet s say we want the position of this point at ° To find its position we have to do some trigonometry For now left put aside the radius and the positions of the SVG viewBox Let s say we have a circle of a radius of one To get the coordinate of the point we have to do cos angle for the horizontal position and sin angle for the verticle position The angle must be in radiants so if we want the position of our point that is placed at degrees we have to first transform it to radiant To do this we multiply it by PI and we divide by So the point position is the following const position Math cos Math PI Math sin Math PI Now if we want to place this point in our SVG we have to transform the horizontal and vertical positions to make sure our point is positioned correctly in our circle For this we should multiply the x position by the radius then add the horizontal size of the SVG And for the vertical position we have to multiply it by minus the radius and then we add the vertical size of the SVG If we implement a function to do this we would have the following function getCoordFromDegrees angle radius svgSize const x Math cos angle Math PI const y Math sin angle Math PI const coordX x radius svgSize const coordY y radius svgSize return coordX coordY getCoordFromDegree If we use this in our SVG we would have this lt svg viewBox gt lt path fill tomato d M A L gt lt svg gt Donut chart sliceTo go from the pie slice to the donut slice we have to calculate two more points Instead of going back to the center we stop before Let s say we want a donut border to be units large remember the view box is by so we need to draw a line to getCoordFromDegrees because radius Finally we go back to starting position minus horizontal units Remember to set the sweep flag to because of the negative direction Have a look at the illustration below lt svg viewBox gt lt path fill tomato d M A L A gt lt svg gt A slice bigger than degreesIf a slice is bigger than degrees remember that we have to tell the SVG to take the longest route by default it will take the shortest For that we set the large arc flag to Final implementationWe are almost there we now need to place the slices where they should be Let s say the first slice is the green one with degrees the next one is the purple with degrees and then the blue one also with degrees So we need to rotate the second one by degrees and the third one by degrees So to do this using angular we first need to set up the interface that we will expose to the other components and an internall interface that the component needs to work correctly export interface DonutSlice id number percent number color string label string onClickCb gt void This interface will implemented in the pipeinterface DonutSliceWithCommands extends DonutSlice offset number This is the offset that we will use to rotate the slices commands string This will be what goes inside the d attribute of the path tag Then we implement the component Component selector app donut chart styleUrls donut chart component scss changeDetection ChangeDetectionStrategy OnPush template lt svg viewBox ngIf data gt lt path ngFor let slice of data slicesWithCommandsAndOffset radius viewBox borderSize trackBy trackByFn let index index attr fill slice color attr d slice commands attr transform rotate slice offset click slice onClickCb slice onClickCb null gt lt title gt slice label lt title gt lt path gt lt svg gt export class DonutChartComponent implements OnInit Input radius Input viewBox Input borderSize Input data DonutSlice ngOnInit const sum this data reduce accu slice gt accu slice percent if sum throw new Error All slices of the donut chart must equal to Found sum trackByFn index number slice DonutSlice return slice id Finally we create the pipe interface DonutSliceWithCommands extends DonutSlice offset number commands string Pipe name slicesWithCommandsAndOffset pure true export class DonutChartPipe implements PipeTransform transform donutSlices DonutSlice radius number svgSize number borderSize number DonutSliceWithCommands let previousPercent return donutSlices map slice gt const sliceWithCommands DonutSliceWithCommands slice commands this getSliceCommands slice radius svgSize borderSize offset previousPercent previousPercent slice percent return sliceWithCommands getSliceCommands donutSlice DonutSlice radius number svgSize number borderSize number string const degrees this percentToDegrees donutSlice percent const longPathFlag degrees gt const innerRadius radius borderSize const commands string commands push M svgSize radius svgSize commands push A radius radius longPathFlag this getCoordFromDegrees degrees radius svgSize commands push L this getCoordFromDegrees degrees innerRadius svgSize commands push A innerRadius innerRadius longPathFlag svgSize innerRadius svgSize return commands join getCoordFromDegrees angle number radius number svgSize number string const x Math cos angle Math PI const y Math sin angle Math PI const coordX x radius svgSize const coordY y radius svgSize return coordX coordY join percentToDegrees percent number number return percent You can find the stackBlitz here That s it for this post I hope you liked it If you did please share it with your friends amp colleagues and follow me on Twitter at theAngularGuy where I tweet about web development and computer science Cheers What to read next Angular unit testing with examples Mustapha Aouas・Aug ・ min read angular testing javascript webdev 2021-12-10 20:04:47
海外TECH Engadget Twitter reportedly knew Spaces could be misused due to a lack of moderation https://www.engadget.com/twitter-reportedly-knew-spaces-would-be-misused-due-to-lack-of-moderation-201501061.html?src=rss Twitter reportedly knew Spaces could be misused due to a lack of moderationSince Twitter Spaces debuted earlier this year hundreds of people have reportedly joined live audio discussions led by quot Taliban supporters white nationalists and anti vaccine activists sowing coronavirus misinformation quot According to The Washington Post Twitter didn t have the moderation tools necessary to combat bullying calls for violence and hate speech in Spaces before rolling out the Clubhouse competitor ーdespite executives knowing that would likely lead to misuse Spaces doesn t have human moderators or tech that can monitor audio in real time It s much more difficult to automatically review audio than text So far Twitter has relied on the community to report Spaces they think violates the company s rules However if a host uses the feature as a soapbox to share transphobic racist or otherwise bigoted views as has reportedly happened and their audience agrees with them it seems unlikely that a listener will report the discussion to Twitter s safety team According to the report Twitter s technology helped some of these discussions to go viral Because these Spaces were amassing large audiences the systems understood them to be popular and promoted them to more users Twitter spokesperson Viviana Wiewall told the Post the supposed bug has been dealt with “Ensuring people s safety and encouraging healthy conversations while helping hosts and listeners to control their experience have been key priorities since the beginning of Spaces development Wiewall told the publication Wiewall noted that the company is quot exploring avenues quot in terms of moderating Spaces in real time quot but it s not something that we have available at this time The spokesperson noted that Twitter did have some protections in place It can scan the titles of Spaces to look for keywords that raise red flags but modified spellings can ensure problematic words bypass the filters Twitter employees are said to have raised concerns about unmoderated live audio rooms but some of those who suggested the company should slow down and work on technology to improve safety were reportedly dismissed from or left out of meetings Leaders forged ahead with the Spaces feature anyway at least in part to appease investors by speeding up product development and generating more revenue Since August hosts who meet certain criteria have been able to charge for access to Spaces with Twitter taking a cut The company has been chasing other revenue streams beyond advertising including newsletters and the Twitter Blue premium subscription There have been issues with some of those products too The Tip Jar feature through which users can send payments to each other as tips exposed some tippers home addresses via certain types of PayPal transactions Engadget has contacted Twitter for comment 2021-12-10 20:15:01
ニュース BBC News - Home Omicron: Three vaccine doses key for protection against variant https://www.bbc.co.uk/news/health-59615005?at_medium=RSS&at_campaign=KARANGA omicron 2021-12-10 20:34:44
ニュース BBC News - Home US Supreme Court says Texas abortion clinics can sue over law https://www.bbc.co.uk/news/world-us-canada-59381081?at_medium=RSS&at_campaign=KARANGA abortion 2021-12-10 20:51:18
ビジネス ダイヤモンド・オンライン - 新着記事 名古屋“戸建て王国”崩壊!建設業「倒産・廃業ラッシュ」の焦点は勝ち組だったあのエリア - ゼネコン 地縁・血縁・腐れ縁 https://diamond.jp/articles/-/288622 一戸建て 2021-12-11 05:25:00
ビジネス ダイヤモンド・オンライン - 新着記事 「農協界のドン」が政治家から“陰のフィクサー“に転身した意外な裏事情 - 農協の大悪党 野中広務を倒した男 https://diamond.jp/articles/-/290130 2021-12-11 05:15:00
ビジネス ダイヤモンド・オンライン - 新着記事 みずほ「経営トップ総退陣」は2001年にも、繰り返す戦略なき人事すげ替えの末路 - みずほ 退場宣告 https://diamond.jp/articles/-/289240 みずほ「経営トップ総退陣」は年にも、繰り返す戦略なき人事すげ替えの末路みずほ退場宣告相次ぐシステム障害により行政処分を受け、金融庁からガバナンス不全を痛烈に批判されたみずほフィナンシャルグループ。 2021-12-11 05:10:00
ビジネス ダイヤモンド・オンライン - 新着記事 東京・上野の「西郷隆盛」像が犬を連れている意外な理由 - 新説・新発見!今こそ学ぶ「歴史・地理」 https://diamond.jp/articles/-/290082 上野公園 2021-12-11 05:05:00
北海道 北海道新聞 米物価上昇は今後「鈍化」 バイデン大統領、解消へ尽力 https://www.hokkaido-np.co.jp/article/621744/ 物価上昇 2021-12-11 05:12:00
北海道 北海道新聞 阪神、ケラー投手と合意 今季パイレーツ、救援で期待 https://www.hokkaido-np.co.jp/article/621743/ 阪神 2021-12-11 05:02:00
北海道 北海道新聞 授賞式で亡き同僚記者に黙とう 平和賞ムラトフ氏「敬意」 https://www.hokkaido-np.co.jp/article/621742/ 黙とう 2021-12-11 05:02:45
北海道 北海道新聞 10万円給付 クーポンは疑問尽きぬ https://www.hokkaido-np.co.jp/article/621690/ 給付 2021-12-11 05:01:00
北海道 北海道新聞 民主主義サミット、米主導の招待国選別、国際社会分断の懸念。中ロ猛反発、「民主主義の私物化だ」 https://www.hokkaido-np.co.jp/article/621628/ 国際社会 2021-12-11 05:01:31
北海道 北海道新聞 アイスホッケー全道高校選手権大会 11日開幕 13チームが熱戦 https://www.hokkaido-np.co.jp/article/621552/ 帯広の森アイスアリーナ 2021-12-11 05:01:27
ビジネス 東洋経済オンライン 高島屋、「百貨店存亡の危機」から脱する絶対条件 村田社長「取引先と一緒に再生することが第一」 | 百貨店・量販店・総合スーパー | 東洋経済オンライン https://toyokeizai.net/articles/-/475596?utm_source=rss&utm_medium=http&utm_campaign=link_back 東洋経済オンライン 2021-12-11 05:30:00
GCP Cloud Blog Scale your Ruby applications with Active Record support for Cloud Spanner https://cloud.google.com/blog/topics/developers-practitioners/scale-your-ruby-applications-active-record-support-cloud-spanner/ Scale your Ruby applications with Active Record support for Cloud SpannerWe re very excited to announce the general availability of the Ruby Active Record Adapter for Google Cloud Spanner Ruby Active Record is a powerful Object Relational Mapping ORM library bundled with Ruby on Rails Active Record provides an abstraction over the underlying database and includes capabilities such as automatically generating schema changes and managing schema version history Even though Active Record is commonly used with a Rails project it can be used with other frameworks like Sinatra or as a standalone library in your Ruby application With the GA of the adapter Ruby applications can now take advantage of Cloud Spanner s high availability and external consistency at scale through an ORM The adapter is released as the Ruby gem ruby spanner activerecord Currently it supports ActiveRecord x with Ruby and ActiveRecord x with Ruby and higher In this post we will cover how to start with the adapter with a Rails application and highlight the supported features  InstallationTo use Active Record with a Cloud Spanner database you need an active Google Cloud project with the Cloud Spanner API enabled For more details on getting started with Cloud Spanner see the Cloud Spanner getting started guide You can use your existing Cloud Spanner instance in the project If you don t already have one or want to start from scratch for a new Ruby application you can create a Cloud Spanner instance using the Google Cloud SDK for example To install the adaptor edit the Gemfile of your Rails application and add the activerecord spanner adapter gem Next run bundle to install the gem Adapter configurationIn a Rails app you need to configure the database adapter by setting the Spanner project instance and database names Since Cloud Spanner uses Cloud Identity and Access Management to control user and group access to its resources you can use a Cloud Service Account with proper permissions to access the databases The configuration changes can be made in the config database yml file for a Rails project  To run your code locally during development and testing for a Cloud Spanner database you can authenticate with Application Default Credentials or set the GOOGLE APPLICATION CREDENTIALS environment variable to authenticate using a service account This adapter delegates authentication to the Cloud Spanner Ruby client library If you re already using this or another client library successfully you shouldn t have to do anything new to authenticate from your Ruby application For more information see the client library s documentation on setting up authentication  Besides using a database in the Cloud you can also use Google s Cloud Spanner Emulator The acceptance tests for the adapter run against the emulator If needed you can use the configuration in the Rakefile as an example In the example below a service account key is used for the development environment For the production environment the application uses the application default credential Working with the Spanner AdapterOnce you have configured the adapter you can use the standard Rails tooling to create and manage databases Following the Rails tutorial in the adapter repository you ll see how the client interacts with the Cloud Spanner API Create a database with tablesFirst you can create a database by running the following command Next you can generate a data model for example The command above will generate a database migration file as the following Active Record provides a powerful schema version control system known as migrations Each migration describes a change to an Active Record data model that results in a schema change Active Record tracks migrations in an internal schema migrations table and includes tools for migrating data between schema versions and generating migrations automatically from an app s models  If you run migration with the file above it will indeed create an articles table with two columns title and body After migration completes you can see the tables Active Record created in the GCP Cloud Spanner Console Alternatively you can inspect information schema tables to display the tables Ruby created using the Google Cloud SDK Interact with the database using RailsAfter the database and tables are created you can interact with them from your code or use the Rails CLI To start with the CLI youThis command will start a command prompt and you can run Ruby code within it For example to query the articles table You can see a SELECT SQL query runs under the hood As expected no record is returned since the table is still empty  At the prompt you can initialize a new Article object and save the object to the database You can see the adapter creates a SQL query to start a transaction and insert a new record into the database table  If you review the object you can see the field id created at and updated at have been set You can also modify existing records in the database For example you can change the article body to something else and save the change This code results in an UPDATE SQL statement to change the value in the database You can verify the result from the Spanner console under the Data page The adapter supports the Active Record Query Interface to retrieve data from the database For example you can query by the title or id using the following code Both generate corresponding SQL statements to get the data back Migrating an Existing DatabaseThe Cloud Spanner Active Record adapter also supports migrations for existing databases  For instance if you want to add two new columns to an existing table you can create a migration file using the rails generate migration command The command will produce a migration file like the following one Finally you can run the rails db migrate command to commit the schema change Again you could verify the change from the Spanner console If you want to rollback the migration you can run rails db rollback For more details about migration you can read the Active Record Migrations doc We also recommend you review theSpanner schema update documentation before you implement any migration Notable FeaturesTransaction supportSometimes when you need to read and update the database you want to group multiple statements in a single transaction For those types of use cases you can manually control the read write transactions following this example If you need to execute multiple consistent reads and no write operations it is preferable to use a read only transaction as shown in this example Commit timestampsCommit timestamp columns can be configured during model creation using the commit timestamp symbol as shown in this example The commit timestamps can be read after an insert and or an update transaction is completed MutationsDepending on the transaction type the adapter automatically chooses between mutations and DML for executing updates For efficiency it uses mutations instead of DML where possible If you want to know how to use the buffered mutations isolation level to instruct the adapter to use mutations explicitly  you can read this example Query hintsCloud Spanner supports various statement hints and table hints which are also supported by the adapter This example shows how to use the optimizer hints method to specify statement and table hints You can also find a join hint in the example which cannot use the method but a join string instead  Stale readsCloud Spanner provides two read types By default all read only transactions will default to performing strong reads You can opt into performing a stale read when querying data by using an explicit timestamp bound as shown in this example Generated columnsCloud Spanner supports generated columns which can be configured in the migration classes using the as keyword This example shows how a generated column is used and the as keyword is used in the class LimitationsThe adapter has a few limitations For example it doesn t auto generate values for primary keys due to Cloud Spanner not supporting sequences identity columns or other value generators in the database If your table does not contain a natural primary key a good practice is to use a client side UUID generator for a primary key We recommend that you go through the list of limitations before deploying any projects using this adapter These limitations are documented here  Customers using the Cloud Spanner Emulator may see different behavior than the Cloud Spanner service For instance the emulator doesn t support concurrent transactions See the Cloud Spanner Emulator documentation for a list of limitations and differences from the Cloud Spanner service Getting involvedWe d love to hear from you especially if you re a Rails user considering Cloud Spanner or an existing Cloud Spanner customer who is considering using Ruby for new projects The project is open source and you can comment report bugs and open pull requests on Github We would like to thank Knut Olav Løite and Jiren Patelfor their work on this project See alsoBefore you get started you need to have a Rails project For a complete example you can find it in the gem s GitHub repo or Ruby Cloud Spanner Active Record adapter documentationCloud Spanner Ruby client library documentationCloud Spanner product documentationRuby Active Record BasicsCommunity tutorial for Spanner and Active Record on Medium Related ArticleGoogle Cloud Spanner Dialect for SQLAlchemyEnabling Python SQLAlchemy applications to use Google Cloud Spanner as a database Read Article 2021-12-10 21:00:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

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

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