TECH |
Engadget Japanese |
『フォートナイト』、Switch以外でもパッドのジャイロ機能に対応。瞬時に向きを変えるフリック操作も可能に |
https://japanese.engadget.com/fortnite-adds-gyro-and-flick-stick-aiming-215022482.html
|
epicgames |
2022-02-15 21:50:22 |
TECH |
Engadget Japanese |
仕掛け満載のタワーに挑め!繰り返し遊べる2Dアクション『Tower Fortress』:発掘!スマホゲーム |
https://japanese.engadget.com/tower-fortress-211016903.html
|
towerfortress |
2022-02-15 21:10:16 |
IT |
ITmedia 総合記事一覧 |
[ITmedia News] Meta(旧Facebook)、「ニュースフィード」を「フィード」に改称 “社訓”も更新 |
https://www.itmedia.co.jp/news/articles/2202/16/news073.html
|
facebook |
2022-02-16 06:27:00 |
Google |
カグア!Google Analytics 活用塾:事例や使い方 |
「Strikingly」はクリエイターにおすすめのモバイルファーストなウェブサイト制作ツールです。 |
https://www.kagua.biz/marke/marketool/20220216a1.html
|
strikingly |
2022-02-15 21:00:25 |
AWS |
AWS Database Blog |
Migration options for MySQL to Amazon RDS for MySQL or Amazon Aurora MySQL |
https://aws.amazon.com/blogs/database/migration-options-for-mysql-to-amazon-rds-for-mysql-or-amazon-aurora-mysql/
|
Migration options for MySQL to Amazon RDS for MySQL or Amazon Aurora MySQLMySQL is one of the most popular open source relational databases in the world Many customers choose to run their MySQL workload in Amazon Relational Database Service Amazon RDS for MySQL because it takes care of heavy lifting tasks such as hardware provisioning database setup patching configuration monitoring backups and scaling Amazon Aurora is a great … |
2022-02-15 21:23:33 |
技術ブログ |
Developers.IO |
리액트 프로젝트 셋업 |
https://dev.classmethod.jp/articles/react-project-setup/
|
리액트프로젝트셋업리액트를사용하는프로젝트를생성할때마다create react app 이하CRA 를사용하게되었었는데요 scratch 부터자주사용하는구성을템플릿으로남겨두고싶은마음이생겼습니다 |
2022-02-15 21:00:24 |
海外TECH |
Ars Technica |
Android 13 virtualization hack runs Windows (and Doom) in a VM on Android |
https://arstechnica.com/?p=1834447
|
android |
2022-02-15 21:25:36 |
海外TECH |
DEV Community |
Developer Quickstart: PHP Data Object (PDO) and MariaDB |
https://dev.to/probablyrealrob/developer-quickstart-php-data-object-pdo-and-mariadb-gb1
|
Developer Quickstart PHP Data Object PDO and MariaDBIn a previous article I introduced you to the process of connecting to and communicating with MariaDB databases using the MySQL improved extension MySQLi for PHP Ultimately when you re writing PHP code to connect to and interact with MariaDB you re likely going to use one of two popular options MySQLi or PHP data objects PDO The gist of the PDO extension is that it defines a lightweight consistent interface for accessing databases in PHP just like MySQLi In fact both PDO and MySQLi both offer an object oriented API but MySQLi also offers a procedural API which can make it easier for PHP newbies to understand Now if you re familiar with the native PHP MySQL driver you might find the migration to the procedural MySQLi interface to be easier On the other hand once you ve mastered PDO you can use it with any database you desire which can be incredibly useful when switching from another database to say MariaDB In this article I m going to dive into PDO and how you can use it to communicate with MariaDB So let s get to it and jump into an application to get an idea of how to connect to and query a MariaDB database using PDO In this article I m going to highlight some of the fundamental details of using PDO to connect to and communicate with a MariaDB database Everything I ll be exploring is based on the code for the Rolodex application and if you d like to dive into the code you can check it out here Prepare the databaseBefore jumping into the code for the application it s important to note that it uses a single database called rolodex CREATE DATABASE rolodex The rolodex database contains a single table contacts that is used to store basic information CREATE TABLE rolodex contacts id INT NOT NULL AUTO INCREMENT name VARCHAR NOT NULL age INT NOT NULL email VARCHAR NOT NULL PRIMARY KEY id The SQL necessary to run the Rolodex application can be found in the schema sql file Configuring the applicationTo facilitate the use of a MariaDB database within the Rolodex PHP application I ve created a new file called config php that contains the configuration settings and database connection object that can be reused across PHP pages Connecting to and communicating with an underlying MariaDB database is facilitated by the PDO extension config php lt php dsn mysql host lt insert host address here gt dbname rolodex charset utfmb options PDO ATTR EMULATE PREPARES gt false Disable emulation mode for real prepared statements PDO ATTR ERRMODE gt PDO ERRMODE EXCEPTION Disable errors in the form of exceptions PDO ATTR DEFAULT FETCH MODE gt PDO FETCH ASSOC Make the default fetch be an associative array try pdo new PDO dsn lt insert user here gt lt insert password here gt options catch Exception e error log e gt getMessage exit Something bad happened gt Within the config php file I ve started by defining variables that hold the host address username password and default database that are used to create a new PDO connection object which contains a variety of configuration options that you can use to tailor to your environment Executing SQLUsing and reusing the PDO connection within config php is as easy as including it within a PHP code block on another PHP page lt php Include the database connection fileinclude once config php gt Then with an established connection you have the ability to use a plethora of capabilities from the PDO extension including executing queries using PDO query Note that I ve also demonstrated how you can map the results directly into a class called Contact Selecting data lt php Include the database connection fileinclude once config php PHP class class Contact public id public name public age public email Fetch contacts in descending order contacts pdo gt query SELECT FROM contacts ORDER BY id DESC gt fetchAll PDO FETCH CLASS Contact gt Selecting contacts using PDO queryOr in the case that you need to handle dynamically inserted parameter values you can use PDO prepare Inserting data stmt pdo gt prepare INSERT INTO contacts name age email VALUES stmt gt execute name age email Inserting contacts using PDO prepareUpdating data stmt pdo gt prepare UPDATE contacts SET name age email WHERE id stmt gt execute name age email id Updating contacts using PDO prepareDeleting data stmt pdo gt prepare DELETE FROM contacts WHERE id stmt gt execute id Deleting contacts using PDO prepareAs you can see getting started with PDO and MariaDB is easy but we ve only scratched the surface of what s possible If you d like to see for yourself what else is possible with PHP and MariaDB start by checking out the full source code for the Rolodex application in the new PHP Data Object Quickstart GitHub repository Learn moreAnd if you d like to learn even more about what s possible with MariaDB be sure to check out the Developer Hub and our new Developer Code Central GitHub organization There you can find much more content just like this spanning a variety of other technologies use cases and even programming languages You can also dive even deeper into MariaDB capabilities in the official documentation And as always we d be nothing without our awesome community If you d like to help contribute you can check out the open source projects on the MariaDB GitHub send feedback directly to us at developers mariadb com or join the conversation in the new MariaDB Community Slack |
2022-02-15 21:47:13 |
海外TECH |
DEV Community |
Renaming a table in production in PostgreSQL |
https://dev.to/katafrakt/renaming-a-table-in-production-in-postgresql-3gjf
|
Renaming a table in production in PostgreSQLSometimes you don t get it right in the first attempt When some time ago I announced that we need to rename one of the database tables in our recently launched service some of my colleagues looked at me like I said something really stupid Their argument was that is won t work without causing a downtime and generally it s not worth it Their stance was that it s better to live with a too generic table name than to attempt a risky operation In my opinion it was worth it and I pushed the change through without any downtime Their instincts were right however If you do it naively by simply calling ALTER TABLE RENAME it will harm your production Fortunately with a little more ceremony you can do it right and here is how What s the problem really Most of deployment processes these days consist of few sequential steps to get a new version up and running They vary from project to project but usually contain these three in this order Make the new code ready build a Docker image compile copy to server Run migrationsRestart application instances to use new codeThe problem is that there is a non zero gap between and are finished In fact it s not that uncommon to take a minute or longer as you have to let the servers finish serving existing requests etc Now when migrations are run and your renaming the table migration among them the old table does not exist but the old application instances still reference it As a result they still try to query a non existing table resulting in an exception most likely This is something we want to avert View to the rescueSo if only we could use some kind of an alias to route requests to old table name to a new name Fortunately we can Since a couple of versions PostgreSQL supports usage of a regular dynamic views along its old materialized views These views are in essence an alias for a query Every time you select from a view it is translated to an underlying query What s even better Simple views are updatable which means you can insert to them or update them and it will be perfectly reflected in an underlying table Specifically we can use them to just create aliases Armed with that knowledge we may write our migration as something like this def up rename table old name new name execute CREATE VIEW old name AS SELECT FROM new name also rename sequences indices etc for consistency execute ALTER SEQUENCE old name id seq RENAME TO new name id seq execute ALTER INDEX old name something id index RENAME TO new name something id index endThis will be fast Renaming a table is fast Creating a view is fast Actually our migrator reported s for this migration which means less that ms IIRC for a table with few million records Most likely it won t cause any negative side effects for your application You just want to remember to delete the view next time the deployment is done Note that because of using execute the migration is irreversible You definitely should write a corresponding down method in case things go wrong And that s it We renamed the table Now we can move on with our lives without having weird legacy names and have BI Analytics team ask questions about it every now and then UpdateAs u fatkodima noted on Reddit this approach might still cause some trouble because by default ActiveRecord cannot read columns from views He also is a creator of a gem online migrations which helps with that issue in Rails |
2022-02-15 21:20:13 |
海外TECH |
DEV Community |
React Native date picker |
https://dev.to/msaadqureshi/react-native-date-picker-150d
|
React Native date pickerHow to add Placeholder in Date Picker How to use react native date picker as component Mostly we should have to use every thing as child component Install via npm or yarnnpm install react native date pickeryarn add react native date pickerInstall podscd ios amp amp pod installRebuild the projectnpx react native run androidnpx react native run iosnow create a component folder in your project if you ha already that just open it and create Picker component name as Picker jscopy the code given below and paste it in your file Picker js moment Library use for Date formattingimport React useState useCallback from react import StyleSheet Text TextInput View TouchableOpacity from react native import DatePicker from react native date picker import moment from moment export const MydatePicker customstyles dateFormat placeholder onSetDate gt const date setDate useState new Date const open setOpen useState false const placeHolderText setPlaceHolderText useState true return lt View gt lt TouchableOpacity style styles pickerStyle customstyles onPress gt setOpen true gt lt Text style styles pickerText gt placeHolderText placeholder moment date format dateFormat dateFormat DD MMM YYYY lt Text gt lt TouchableOpacity gt lt DatePicker modal mode date open open date date onDateChange setDate onConfirm date gt const newDate moment date format dateFormat dateFormat DD MMM YYYY setOpen false setDate date onSetDate newDate setPlaceHolderText false onCancel gt setOpen false gt lt View gt const styles StyleSheet create pickerStyle alignSelf center justifyContent center width height padding margin borderWidth borderBottomColor black borderRadius color black backgroundColor white pickerText color block backgroundColor white now move to your Screen where you want to use date picker and import Picker component like import MydatePicker from components picker copy the code given below and paste it in your file Screen lt MydatePicker placeholder hello place holder onSetDate date gt setSelectedValue date gt You also can change the picker style There are multiple modes of picker date picker mode datetime date time More information about date picker can be found in the react native date pickerLeave a comment if you have any questions or feedback |
2022-02-15 21:05:19 |
海外TECH |
DEV Community |
Introduction to JavaScript Strings |
https://dev.to/naftalimurgor/introduction-to-javascript-strings-fmb
|
Introduction to JavaScript Strings IntroductionJavaScript Strings provide a way of representing and handling characters JavaScript StringsA JavaScript string is a set of character s written inside quotes with single quotelet emptyString an empty stringlet name Elon Musk with double quoteslet project SpaceX Declaring a String in JavaScript does not restrict usage of single and double quotes Acess characterString objects provide a useful method for accessing a character in a stringlet catName Anita console log catName charAt prints A character at a position Strings behave like Array like objects so above can be let catName Anita console log catName prints A looping throug each characterfor let i i lt catName length i console log catName i A n i t a Get length of a JavaScript Stringconst THREAD NAME Moonspiracy console log THREAD NAME length prints number of characters SummaryJavaScript Strings provide a way of presenting strings using double or single quotes Both syntaxes are valid and usage is based on project style guide and preferences |
2022-02-15 21:00:53 |
Apple |
AppleInsider - Frontpage News |
Lifetime Microsoft Office for Mac Home & Business 2021 license is back for $49.99 (85% off) while supplies last |
https://appleinsider.com/articles/22/02/15/lifetime-microsoft-office-for-mac-home-business-2021-license-is-back-for-4999-85-off-while-supplies-last?utm_medium=rss
|
Lifetime Microsoft Office for Mac Home amp Business license is back for off while supplies lastAfter initially selling out the popular Microsoft Office for Mac deal has returned delivering a lifetime Home Business license for ーand matching the steepest discount on record at off Save on Microsoft Office for Mac or WindowsHigher than expected demand resulted in the deal previously selling out but StackCommerce has replenished inventory of the digital lifetime license of Microsoft Office Select between Microsoft Office Home Business for Mac or Office Professional Plus for Windows ーeach option is Read more |
2022-02-15 21:04:21 |
海外TECH |
Engadget |
Valve's Steam Deck might be easier to repair than you think |
https://www.engadget.com/valve-steam-deck-teardown-ifixit-212520323.html?src=rss
|
Valve x s Steam Deck might be easier to repair than you thinkValve may have cautioned Steam Deck buyers about repairing the handheld themselves but you might not have to be quite so wary in practice iFixit which provides official parts for Valve hardware has torn down the production model Steam Deck and discovered that it s relatively easy to repair with a few notable exceptions It doesn t require much effort to get inside with clear labels for quot basically everything quot The design is modular enough that you can repair many elements without replacing or dismantling more components than necessary You can replace the SSD with a similarly small equivalent using one screw and removing the display doesn t require much more than a suction cup and some heat Valve is also keenly aware that Steam Deck owners may be worried about thumbstick drift ーyou can replace both sticks just by removing three screws While drift won t necessarily be a real problem you won t have to send in your machine if that problem ever crops up This isn t quite a self repair paradise Battery replacements are quot rough quot according to iFixit with elaborate procedures that include draining most of the pack for safety s sake That s a problem when the battery can drain in as little as minutes You may also want to be gentle with the USB C port and microSD slot as both are soldered to the Steam Deck s custom motherboard Despite this iFixit found the Steam Deck easier to repair than some modern laptops That might be heartening if you either prefer to fix devices yourself or hope to upgrade the storage You might only need to send the Deck away for service if there s a truly serious failure |
2022-02-15 21:25:20 |
海外TECH |
Engadget |
Twitter opens up its anti-harassment Safety Mode to millions more users |
https://www.engadget.com/twitter-safety-mode-beta-expanded-feature-211037149.html?src=rss
|
Twitter opens up its anti harassment Safety Mode to millions more usersTwitter is expanding access to its Safety Mode by bringing the beta to around percent of accounts in the US UK Canada Australia Ireland and New Zealand The company started testing the feature in September with a small number of people It s expanding the beta to additional English speaking countries to gain more insights and look into ways of making further improvements Remember when we began testing a new feature called Safety Mode After months of feedback from beta users we re excited to expand this to some of you in several new English speaking markets to gain more feedback and insights pic twitter com AqVOUwyNQvーTwitter Safety TwitterSafety February Safety Mode is a setting that will automatically block accounts that Twitter thinks may be using harmful language Those accounts won t be able to interact with you for seven days There s a way for users to manually review the tweets and accounts Twitter found questionable and to unblock that account if there wasn t actually a problem Accounts that users follow or interact with often are never autoblocked The idea is to cut down on harassment and prevent people from having to go through the process of manually reporting offending tweets and accounts and waiting for Twitter to take action A Twitter spokesperson told Engadget that since the company started testing the feature in September it discovered some people need or want more help to snuff out unwanted interactions Going forward its systems will keep a look out for possibly harmful or uninvited replies and prompt users in the beta to switch on Safety Mode if it believes they might benefit The idea is that there ll be fewer instances of people having to endure unwanted interactions |
2022-02-15 21:10:37 |
海外科学 |
NYT > Science |
Sigal Barsade, 56, Dies; Argued That It’s OK to Show Emotions at Work |
https://www.nytimes.com/2022/02/13/business/sigal-barsade-dead.html
|
leaders |
2022-02-15 21:14:34 |
金融 |
ニュース - 保険市場TIMES |
「アフラックの休職保険」発売へ |
https://www.hokende.com/news/blog/entry/2022/02/16/070000
|
「アフラックの休職保険」発売へ年未満の休職状態を保障アフラック生命保険株式会社以下、アフラックは年月日、「アフラックの休職保険」を発売する。 |
2022-02-16 07:00:00 |
ニュース |
BBC News - Home |
Prince Andrew settles US civil sex assault case with Virginia Giuffre |
https://www.bbc.co.uk/news/uk-60393843?at_medium=RSS&at_campaign=KARANGA
|
court |
2022-02-15 21:43:59 |
ニュース |
BBC News - Home |
Ukraine crisis: Russian attack still a possibility - Biden |
https://www.bbc.co.uk/news/world-us-canada-60396947?at_medium=RSS&at_campaign=KARANGA
|
human |
2022-02-15 21:50:03 |
ニュース |
BBC News - Home |
Jury rules against Sarah Palin in New York Times libel lawsuit |
https://www.bbc.co.uk/news/world-us-canada-60396231?at_medium=RSS&at_campaign=KARANGA
|
lawsuitms |
2022-02-15 21:14:27 |
ニュース |
BBC News - Home |
Grenfell Tower: Earlier cladding fire test was 'catastrophic failure' |
https://www.bbc.co.uk/news/uk-england-london-60396834?at_medium=RSS&at_campaign=KARANGA
|
hears |
2022-02-15 21:05:08 |
ニュース |
BBC News - Home |
Managerless Aberdeen salvage point as St Johnstone stay bottom |
https://www.bbc.co.uk/sport/football/60093486?at_medium=RSS&at_campaign=KARANGA
|
premiership |
2022-02-15 21:46:04 |
ビジネス |
ダイヤモンド・オンライン - 新着記事 |
ロシア反体制派ナワリヌイ氏、刑期15年延長も - WSJ発 |
https://diamond.jp/articles/-/296496
|
反体制派 |
2022-02-16 06:10:00 |
北海道 |
北海道新聞 |
ゼムール氏、トランプ氏から助言 極右の仏大統領候補 |
https://www.hokkaido-np.co.jp/article/646213/
|
大統領候補 |
2022-02-16 06:18:00 |
北海道 |
北海道新聞 |
鹿児島・奄美に珍種ウツボ 国内初か、3月下旬公開へ |
https://www.hokkaido-np.co.jp/article/646212/
|
奄美大島 |
2022-02-16 06:08:00 |
北海道 |
北海道新聞 |
日本海側、大雪に警戒 低気圧と寒気が影響 |
https://www.hokkaido-np.co.jp/article/646211/
|
警戒 |
2022-02-16 06:08:00 |
ビジネス |
東洋経済オンライン |
「脱炭素世界一」を目指す中国の超したたかな戦略 表の顔と裏の顔を使い分ける中国の思惑 | 資源・エネルギー | 東洋経済オンライン |
https://toyokeizai.net/articles/-/511383?utm_source=rss&utm_medium=http&utm_campaign=link_back
|
東洋経済オンライン |
2022-02-16 06:30:00 |
コメント
コメントを投稿