投稿時間:2023-08-28 02:16:09 RSSフィード2023-08-28 02:00 分まとめ(18件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita WSL + vscode 環境でJupyter Notebookを使えるまでの設定 https://qiita.com/gen4pen/items/1252282faa2db22386be hosto 2023-08-28 01:23:06
Git Gitタグが付けられた新着投稿 - Qiita GraphQL: Resource not accessible by personal access token (repository.defaultBranchRef)の解決法 https://qiita.com/kaizinZ/items/323ffcce6b833851ca2d iblebypersonalaccesstoken 2023-08-28 01:16:16
海外TECH MakeUseOf 7 Fixes for an iPhone Not Receiving Texts https://www.makeuseof.com/iphone-not-receiving-texts/ fixes 2023-08-27 16:30:27
海外TECH MakeUseOf How to Watch Apple's iPhone 15 Event https://www.makeuseof.com/how-to-watch-apple-iphone-15-event/ iphone 2023-08-27 16:20:42
海外TECH MakeUseOf Can VoIP Be Hacked? https://www.makeuseof.com/can-voip-be-hacked/ hackers 2023-08-27 16:01:25
海外TECH DEV Community Comprehensive Guide on Using Platform Channels in Flutter https://dev.to/yatendra2001/comprehensive-guide-on-using-platform-channels-in-flutter-1865 Comprehensive Guide on Using Platform Channels in FlutterYo Wassup Flutter dev Today we re diving deep into the world of platform channels in Flutter If you ve ever wondered how to harness native capabilities not yet available in the Flutter framework this guide is for you Let s get started What are Platform Channels In the simplest terms platform channels provide a bridge between your Dart code and the native code of the host platform Android or iOS This bridge allows Flutter apps to utilize platform specific features such as accessing device sensors invoking native UI components or integrating third party SDKs Setting the StageBefore we jump into the code ensure you have the following A Flutter app up and running Basic knowledge of native development Kotlin Java for Android and Swift Objective C for iOS Step by Step Guide to Using Platform Channels Define the ChannelIn your Dart code you ll start by defining a MethodChannel This channel will have a unique name to prevent any conflicts import package flutter services dart const platform MethodChannel com example myapp someChannel Invoke a MethodTo request information from the native side you ll use the invokeMethod function String batteryLevel try final int result await platform invokeMethod lt int gt getBatteryLevel if result null batteryLevel Battery level result else batteryLevel Failed to get battery level on PlatformException catch e batteryLevel Failed to get battery level e message Handle the Method Call on the Native Side Android In your MainActivity Kotlin override the onMethodCall method override fun onMethodCall call MethodCall result Result if call method getBatteryLevel val batteryLevel getBatteryLevel if batteryLevel result success batteryLevel else result error UNAVAILABLE Battery level not available null else result notImplemented private fun getBatteryLevel Int val batteryManager getSystemService Context BATTERY SERVICE as BatteryManager return batteryManager getIntProperty BatteryManager BATTERY PROPERTY CAPACITY iOS In your AppDelegate Swift add if call method getBatteryLevel self getBatteryLevel result result else result FlutterMethodNotImplemented private func getBatteryLevel result FlutterResult let device UIDevice current device isBatteryMonitoringEnabled true if device batteryState UIDevice BatteryState unknown result FlutterError code UNAVAILABLE message Battery info unavailable details nil else result Int device batteryLevel Responding to the Dart CallOnce the native side processes the request it sends the result back to Dart using the Result object You can send a success response with result success an error with result error or indicate that a method isn t implemented with result notImplemented Event ChannelsFor continuous communication or streams use EventChannel This is perfect for features like location updates or sensor data const eventChannel EventChannel com example myapp locationUpdates On the Dart side you can then listen to this channel eventChannel receiveBroadcastStream listen updateLocation Wrapping UpPlatform channels are a powerful tool in the Flutter developer s toolkit They bridge the gap between the Flutter framework and native capabilities ensuring that you can always access the full power of the underlying platform Remember while platform channels are potent always consider if there s a Flutter package available that can meet your needs The Flutter community is vibrant and there s a good chance someone has already tackled a similar challenge Happy coding and until next time keep fluttering Before We Go Hey thanks for sticking around If this post was your jam imagine what s coming up next I m launching a YouTube channel and trust me you don t want to miss out Give it a look and maybe even hit that subscribe button Tap to subscribe Until we meet again code on and stay curious Got any doubt or wanna chat React out to me on twitter or linkedin 2023-08-27 16:29:13
海外TECH DEV Community Excelize 2.8.0 Released - Powerful open-source library for spreadsheet (Excel) document https://dev.to/xuri/excelize-280-released-powerful-open-source-library-for-spreadsheet-excel-document-5a0d 2023-08-27 16:16:00
海外TECH DEV Community DevContainer and Makefile: A Duo for Simplified GCP Workflows https://dev.to/tanvirrahman/devcontainer-and-makefile-a-duo-for-simplified-gcp-workflows-ii9 DevContainer and Makefile A Duo for Simplified GCP WorkflowsSetting up a development environment can sometimes feel like orchestrating a symphony with disparate instruments given how many moving parts are involved However DevContainers within Visual Studio Code VSCode are here to change that tune Below let s explore how to streamline this process and create a seamless shareable and consistent development environment Step Installing the DevContainer Extension in VSCodeBefore diving into the code ensure that the DevContainer extension is installed within your VSCode setup This extension is your gateway to crafting isolated and reproducible development environments Step Setting Up the Directory StructureCreate a new folder which will act as the root of your project Inside this folder create another directory named devcontainer Within devcontainer create two essential files devcontainer json and Dockerfile Step Crafting the DockerfileThe Dockerfile is like a recipe dictating the ingredients and steps required to create your development environment Below is an example using Ubuntu as the base image and installing Google Cloud SDK among other packages Use an official Ubuntu as a parent imageFROM ubuntu latest Set environment variables to non interactive this prevents some prompts ENV DEBIAN FRONTEND non interactive Run package updates install packages and clean upRUN apt get update y Install common packages and openssh client amp amp apt get install y ca certificates curl gnupg openssh client python make Add Google Cloud SDK repo and its key amp amp echo deb signed by usr share keyrings cloud google gpg cloud sdk main tee a etc apt sources list d google cloud sdk list amp amp curl apt key keyring usr share keyrings cloud google gpg add amp amp apt get update amp amp apt get install y google cloud sdk Remove unnecessary files amp amp rm rf var lib apt lists Generate SSH Key amp amp ssh keygen t rsa b f root ssh id rsa N WORKDIR automationCOPY automation Step Configuring devcontainer jsonThis JSON file is the control center for the DevContainer It specifies how the container should behave when we open VSCode inside it For format details see For config options see the README at name Code space configuration build dockerfile Dockerfile args Update VARIANT to pick a NET Core version VARIANT Options INSTALL NODE true NODE VERSION lts INSTALL AZURE CLI true INSTALL TERRAFORM true TERRAFORM FILE terraform linux amd zip TERRAFORM VERSION Set default container specific settings json values on container create settings terminal integrated shell linux bin zsh Add the IDs of extensions you want installed when the container is created extensions ms dotnettools csharp hashicorp terraform ms vscode azure account ms azuretools vscode azurefunctions ms azuretools vscode azureresourcegroups github copilot ms mssql mssql hookyqr beautify ms azuretools vscode docker Use forwardPorts to make a list of ports inside the container available locally forwardPorts Use postCreateCommand to run commands after the container is created postCreateCommand uname a Comment out connect as root instead More info remoteUser root Step Initiating the DevContainerRun the Dev Containers Reopen in Container command from VSCode If everything is set up correctly you ll land inside the container where you can check the Google Cloud SDK version among other things If you encounter issues you can debug by running docker run it ubuntu latest bin bash and manually inputting the commands from your Dockerfile for analysis Step Automating Tasks with MakefileYou can further enhance your DevContainer experience by utilizing a Makefile This file serves as a task runner that can execute a series of commands for you Here s a sample that demonstrates printing a simple hello greet helloecho echo greet Step Integrating Google Cloud PlatformTo start working with Google Cloud Platform GCP obtain service credentials and place them in a auth json file Then update your Makefile to interact with GCP resources Makefile for Google Cloud Platform GCP VariablesKEY FILE auth jsonPROJECT ID playground s bebfbVPC NAME vpc trSUBNET NAME subnet trREGION us centralCOMPUTE ZONE us central aCIDR BLOCK VM NAME vm trVM TYPE n standard VM IMAGE FAMILY debian VM IMAGE PROJECT debian cloudINTERNAL IP RANGE SSH KEY PATH root ssh id rsa pub Read the SSH public key into a variableSSH PUBLIC KEY root shell cat SSH KEY PATH Default ruledefault gcloud login gcloud set project gcloud list networks Rule for logging into GCPgcloud login gcloud auth activate service account key file KEY FILE Rule for setting GCP projectgcloud set project gcloud config set project PROJECT ID Rule for setting GCP compute zonegcloud set zone gcloud config set compute zone COMPUTE ZONE Rule for listing GCP networksgcloud list networks gcloud compute networks list Rule for creating a custom VPCcreate vpc gcloud compute networks create VPC NAME subnet mode custom Rule for creating a custom VPC with subnetscreate vpc with subnets create vpc gcloud compute networks subnets create SUBNET NAME network VPC NAME region REGION range CIDR BLOCK Rule for deleting a VPCdelete vpc gcloud compute networks delete VPC NAME quiet Rule for creating firewall rule for internal trafficcreate firewall internal gcloud compute firewall rules create allow internal network VPC NAME allow tcp udp icmp source ranges INTERNAL IP RANGE Rule for creating firewall rule to allow all IP rangescreate firewall allow all gcloud compute firewall rules create allow all VPC NAME network VPC NAME allow tcp udp icmp source ranges Rule for creating firewall rule for SSH RDP and ICMPcreate firewall ssh rdp icmp echo Creating firewall rules for VPC VPC NAME gcloud compute firewall rules create allow ssh rdp icmp VPC NAME network VPC NAME allow tcp tcp icmp Rule for describing a specific GCP networkdescribe network gcloud compute networks describe VPC NAME Rule for listing subnets in the VPCgcloud list subnets gcloud compute networks subnets list filter network VPC NAME Rule for creating a VM instancegcloud create vm gcloud compute instances create VM NAME zone COMPUTE ZONE machine type VM TYPE image family VM IMAGE FAMILY image project VM IMAGE PROJECT boot disk size GB metadata ssh keys SSH PUBLIC KEY Rule for deleting a VM instancegcloud delete vm gcloud compute instances delete VM NAME zone COMPUTE ZONE quiet Rule for deploying a GCP functiondeploy function gcloud functions deploy FUNCTION NAME runtime RUNTIME trigger http allow unauthenticated Phony targets PHONY gcloud login gcloud set project gcloud set zone gcloud list networks create vpc delete vpc create firewall internal create firewall allow all create firewall ssh rdp icmp describe network create vpc with subnets gcloud list subnets gcloud create vm gcloud delete vm deploy function Running Any FileYou re not limited to specific languages or files The DevContainer allows you to run any script be it Shell Python or even a simple HTTP server hello shecho hello DockerfileFROM nginx makefileimage name tanvir webtag vcontainer name webbuild docker build t image name tag run docker run name container name d p image name tag b chmod x hello sh hello shfiles hello sh hello sh hello shchmod chmod x files run hello sh hello shWith that you have a modular version controlled and fully functional development environment The best part is that all of this is contained within a DevContainer ensuring that each team member can replicate the exact environment thereby eliminating the it works on my machine syndrome Happy coding 2023-08-27 16:12:45
海外科学 NYT > Science The Joys of Sketching Birds https://www.nytimes.com/2023/08/27/science/birds-birdwatching-drawing-art.html avian 2023-08-27 16:59:51
海外科学 NYT > Science La posibilidad de la guerra nuclear y el cerebro que toma la decisión https://www.nytimes.com/es/2023/08/27/espanol/guerra-nuclear-cerebro-toma-decision.html La posibilidad de la guerra nuclear y el cerebro que toma la decisiónAlgunos expertos quieren aplicar investigaciones recientes del campo de la neurociencia al proceso de toma de decisiones que podría conducir al día del juicio final 2023-08-27 16:06:49
海外科学 NYT > Science C.D.C. Sets New Standards for Hospitals to Combat Sepsis https://www.nytimes.com/2023/08/24/health/sepsis-hospitals-cdc.html elements 2023-08-27 16:53:24
海外TECH WIRED The Cheap Radio Hack That Disrupted Poland's Railway System https://www.wired.com/story/poland-train-radio-stop-attack/ The Cheap Radio Hack That Disrupted Poland x s Railway SystemThe sabotage of more than trains in Poland by apparent supporters of Russia was carried out with a simple “radio stop command anyone could broadcast with in equipment 2023-08-27 16:06:34
ニュース BBC News - Home Nessie hunters hear sounds but fail to record them https://www.bbc.co.uk/news/uk-scotland-highlands-islands-66633215?at_medium=RSS&at_campaign=KARANGA monster 2023-08-27 16:34:54
ニュース BBC News - Home Dorset Police open murder probe in Bournemouth after remains are found https://www.bbc.co.uk/news/uk-england-dorset-66634060?at_medium=RSS&at_campaign=KARANGA bournemouth 2023-08-27 16:50:09
ニュース BBC News - Home In pictures: Children's day at Notting Hill Carnival https://www.bbc.co.uk/news/uk-england-london-66634654?at_medium=RSS&at_campaign=KARANGA children 2023-08-27 16:42:12
ニュース BBC News - Home The Hundred 2023: Southern Brave beat Northern Superchargers to win first title - highlights https://www.bbc.co.uk/sport/av/cricket/66634298?at_medium=RSS&at_campaign=KARANGA The Hundred Southern Brave beat Northern Superchargers to win first title highlightsWatch highlights as Southern Brave beat the Northern Superchargers by runs at Lords to win the women s Hundred in captain Anya Shrubsole s final game 2023-08-27 16:23:37
ニュース BBC News - Home Dutch Grand Prix: Max Verstappen survives losing lead to equal all-time consecutive wins record https://www.bbc.co.uk/sport/formula1/66633708?at_medium=RSS&at_campaign=KARANGA Dutch Grand Prix Max Verstappen survives losing lead to equal all time consecutive wins recordRed Bull s Max Verstappen survives losing the lead in early rain and a red flag for a late torrential downpour to take victory in a chaotic Dutch Grand Prix 2023-08-27 16:32:56
ニュース BBC News - Home The Hundred: Southern Brave beat Northern Superchargers to win women's title https://www.bbc.co.uk/sport/cricket/66631053?at_medium=RSS&at_campaign=KARANGA The Hundred Southern Brave beat Northern Superchargers to win women x s titleSouthern Brave led by Anya Shrubsole in her last game as a professional finally won the women s Hundred by outclassing Northern Superchargers at Lord s 2023-08-27 16:23: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件)