投稿時間:2022-12-25 00:23:18 RSSフィード2022-12-25 00:00 分まとめ(27件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita PADはPythonが使える人に助けてもらうと機能を追加出来て更に便利になるという実用的な使い方の紹介1 https://qiita.com/NSsystems_DX/items/67d02fc95cedf8b40cbd microsoft 2022-12-24 23:45:09
python Pythonタグが付けられた新着投稿 - Qiita FiftyOneでリモートマシンにデータをダウンロードして閲覧するまでのメモ https://qiita.com/yamash73/items/329cf3eb688a62afd524 fiftyone 2022-12-24 23:31:33
js JavaScriptタグが付けられた新着投稿 - Qiita 未経験から始めるReact学習ロードマップ https://qiita.com/zonoryo03/items/c88f068e0056385d6037 react 2022-12-25 00:00:18
js JavaScriptタグが付けられた新着投稿 - Qiita 【ProtoPedia 2022】自分の 2022年のヒーローズ・リーグとの関わりなどを振り返る(作品応募とサポーターの活動、作品で使った技術について) https://qiita.com/youtoy/items/4b894a8e609d07fe9431 protopedia 2022-12-24 23:25:21
Ruby Rubyタグが付けられた新着投稿 - Qiita [Fediverse]テーマ鯖構築のススメ https://qiita.com/guskma/items/51dc2f40ce32eedec3c9 fediverse 2022-12-24 23:33:18
Ruby Rubyタグが付けられた新着投稿 - Qiita test投稿(すぐ消します) https://qiita.com/utibori-jp/items/13cc5966bcc28cc4ad45 投稿 2022-12-24 23:10:54
Docker dockerタグが付けられた新着投稿 - Qiita ワンコマンドで立ち上がるDApp開発環境をDockerで生成する(Truffle&Ganache) https://qiita.com/PoKoPoKoTa2ry/items/452b8c5e021924de4cba docker 2022-12-24 23:57:00
Git Gitタグが付けられた新着投稿 - Qiita Git Scalarで巨大リポジトリを高速cloneする https://qiita.com/taquaki-satwo/items/bf8393dc9707639bea4f clone 2022-12-24 23:59:34
技術ブログ Developers.IO ワークショップ「AWS IoT TwinMaker workshop for beginners」を実施してTwinMakerの基本を学んでみた https://dev.classmethod.jp/articles/aws-iot-twinmaker-workshop-for-workshops/ makerworkshopforbeginners 2022-12-24 14:56:07
技術ブログ Developers.IO Google Colabからタイタニック号データセットをアップロードしてBigQuery MLで予測してみた https://dev.classmethod.jp/articles/biqquery-ml-prediction-using-titanic-dataset-from-google-colab/ sagemakerdatawrangler 2022-12-24 14:30:05
海外TECH MakeUseOf The Top 7 Free Adventure Games on the Mac App Store https://www.makeuseof.com/top-free-adventure-games-mac/ decent 2022-12-24 14:30:15
海外TECH DEV Community gRPC file transfer with GO https://dev.to/dimk00z/grpc-file-transfer-with-go-1nb2 gRPC file transfer with GO TaskNot long ago I was looking for an additional work project as GO developer and found a vacancy of a no name company with the test task to write a simple client server app for uploading large files with gRPC connection I thought OK why not Spoiler I got an offer but declined it Solution PreparationOfficial docs of gRPC protocol says that there are two ways of communication unary and streaming For uploading big files we could use streaming some bytes of a part of a file from a user to the server Let s write simple proto file for it grpc filetransfer pkg protosyntax proto package proto option go package uploadpb message FileUploadRequest string file name bytes chunk message FileUploadResponse string file name uint size service FileService rpc Upload stream FileUploadRequest returns FileUploadResponse As you see FileUploadRequest contains file name and file chunk FileUploadResponse simple response after correct uploading The service has the only method Upload Let s generate go file in your proto dir protoc go out go opt paths source relative upload protoOk we have generated go code and can start to write our services Server sideServer side can read its config listen to incoming gRPC clients by Upload procedure and write files parts and answers after clients streams ends The server should embed UnimplementedFileServiceServer that has been generated by protoc type FileServiceServer struct uploadpb UnimplementedFileServiceServer l logger Logger cfg config Config and implements Upload method that takes stream as argument func g FileServiceServer Upload stream uploadpb FileService UploadServer error file NewFile var fileSize uint fileSize defer func if err file OutputFile Close err nil g l Error err for req err stream Recv if file FilePath file SetFile req GetFileName g cfg FilesStorage Location if err io EOF break if err nil return g logError status Error codes Internal err Error chunk req GetChunk fileSize uint len chunk g l Debug received a chunk with size d fileSize if err file Write chunk err nil return g logError status Error codes Internal err Error fileName filepath Base file FilePath g l Debug saved file s size d fileName fileSize return stream SendAndClose amp uploadpb FileUploadResponse FileName fileName Size fileSize I used simple File stuct that has three methods for files operation SetFile Write and Closetype File struct FilePath string buffer bytes Buffer OutputFile os File func f File SetFile fileName path string error err os MkdirAll path os ModePerm if err nil log Fatal err f FilePath filepath Join path fileName file err os Create f FilePath if err nil return err f OutputFile file return nil func f File Write chunk byte error if f OutputFile nil return nil err f OutputFile Write chunk return err func f File Close error return f OutputFile Close The server writes file parts to the hard drive right away as soon as they are received from the client That is why the file size doesn t matter it depends only on file system I know that using log Fatal isn t a good idea so don t do that in your production apps Now we have a fully written server side As I didn t put here the whole code you can check it on my github Client sideOur client app is a simple CLI with two required options a gRPC server address and a path for uploading file For CLI interface I chose cobra framework just because it s simple to use and shows that I know it But it s overhead for two params app An example of the client app usage grpc filetransfer client a f GB binLet s write client uploading logic The app should connect to server upload a file and close connection after transferring it type ClientService struct addr string filePath string batchSize int client uploadpb FileServiceClient The client reads the file by chuck size batchSize and sends it to gRPC steam func s ClientService upload ctx context Context cancel context CancelFunc error stream err s client Upload ctx if err nil return err file err os Open s filePath if err nil return err buf make byte s batchSize batchNumber for num err file Read buf if err io EOF break if err nil return err chunk buf num if err stream Send amp uploadpb FileUploadRequest FileName s filePath Chunk chunk err nil return err log Printf Sent batch v size v n batchNumber len chunk batchNumber res err stream CloseAndRecv if err nil return err log Printf Sent v bytes s n res GetSize res GetFileName cancel return nil ConclusionWe wrote the client server gRPC file transfer app that could upload a file of any size The speed of uploading depends on a batch size you can try to find the best value for that Full code on my githubI used some code from those tutorials Upload file in chunks with client streaming gRPC GoTransferring files with gRPC client side streams using GolangGot cover image from that place It was my first article so any comments would be welcomed 2022-12-24 14:17:21
海外TECH DEV Community Merry Christmas Developers! https://dev.to/ecaterinateodo3/merry-christmas-developers-1p60 Merry Christmas Developers Merry Christmas Happy Holidays to everyone img source 2022-12-24 14:07:30
海外TECH DEV Community Flutter "Farkları Ne? 😕" Serisi https://dev.to/gulsenkeskin/flutter-farki-ne-serisi-5fd7 Flutter quot FarklarıNe quot SerisiMerhaba Flutter da benzer görünen işlevlerin farklarınıirdelemeye yönelik bir seri oluşturmaya karar verdim Sizin de aklınıza takılan Bunlar aynıdeğil mi Ne farklarıvar ki diye düşündüren konularıyorum yapın birlikte araştırıp öğrenelim D Bölüm Navigator pop context ve Navigator of context pop arasındaki fark nedir Her iki yöntemde mevcut rotayıyığından çıkararak bir önceki rotayıgösterir ancak Navigator of context methodunun Navigator widget ına doğrudan bir referansıyoktur ve rotalar üzerinde işlem yapabilmek için verilen BuildContext in en yakın atasıolan Navigator ıkullanır Bu özellikle içiçe rotalarla çalışırken veya Navigator widget ağacında birkaçseviye yukarıdayken yararlıolabilir Navigator pop context yöntemi ise çağrıldığıyerde geçerli olan BuildContext nesnesini kullanarak Navigator sınıfının bir örneğini elde eder ve bu örneği kullanarak yönlendirme işlemlerini gerçekleştirir Navigator widget ına doğrudan referansınız olmadığında Bu Navigator içiçe rotalarla çalışıyorsanız ve Navigator a doğrudan erişilemiyorsa olabilir Bu durumlarda verilen BuildContext in en yakın atasıolan Navigator ıelde etmek için Navigator of context yöntemini kullanabilirsiniz Bu örnekte MyWidget widget ının Navigator widget ına doğrudan bir referansıyoktur Navigator MaterialApp widget ının içinde widget ağacının birkaçseviye yukarısındadır Navigator of context methodu sayesinde verilen BuildContext in en yakın atasıNavigator ıelde edebilirsiniz import package flutter material dart class MyApp extends StatelessWidget override Widget build BuildContext context return MaterialApp home MyHomePage class MyHomePage extends StatelessWidget override Widget build BuildContext context return Scaffold appBar AppBar title const Text My App body Center child MyWidget class MyWidget extends StatelessWidget override Widget build BuildContext context return Scaffold appBar AppBar title const Text My Widget body Center child TextButton onPressed Burada navigator widget ına doğrudan bir referansınız yoktur child const Text Go to another screen Kaynaklar 2022-12-24 14:05:41
Apple AppleInsider - Frontpage News How to stay healthy while traveling with Apple Fitness+ https://appleinsider.com/inside/apple-fitness-plus/tips/best-ways-to-stay-healthy-while-traveling-with-apple-fitness?utm_medium=rss How to stay healthy while traveling with Apple Fitness Traveling doesn t have to sabotage your fitness goals when you know how to use Apple Fitness to maximize your workouts Here s how to use it best when on the road A major part of staying healthy is consistency and Apple Fitness is a perfect exercise companion as you travel around the world Read more 2022-12-24 14:38:46
Apple AppleInsider - Frontpage News Best apps & websites to track Santa this Christmas Eve https://appleinsider.com/articles/22/12/24/the-best-apps-and-websites-to-track-santa-this-christmas-eve?utm_medium=rss Best apps amp websites to track Santa this Christmas EveCome Christmas Eve when the kids demand to know where Santa is at that moment there are great ways to keep track of Saint Nick s sleigh ride from the North Pole straight to your chimney on Mac iPhone and iPad The tree is up the stockings are over the fireplace and the milk and cookies are ready to go ーas long as the dog doesn t get to them first Before sending the kiddos to bed increase the joy and anticipation of the evening by gathering around to track Santa Indeed everybody s waiting for the man with the bag full of gifts and a penchant for cookies and milk Read more 2022-12-24 14:41:20
Apple AppleInsider - Frontpage News Get AirPods Pro 2 for $199 with deals from Verizon & Amazon https://appleinsider.com/articles/22/12/23/get-airpods-pro-2-for-199-with-deals-from-verizon-amazon?utm_medium=rss Get AirPods Pro for with deals from Verizon amp AmazonVerizon and Amazon have the nd generation AirPods Pro on sale for which is the lowest price we ve seen Both discounts are well below Apple s retail price of Save when you buy with Verizon or Amazon Buying from Verizon lands you the possibility of free pickup in store where stock is available Otherwise you can get free two day shipping but they will arrive after the holiday Read more 2022-12-24 14:39:52
ニュース BBC News - Home US winter storm: Icy blast hits 250m Americans and Canadians https://www.bbc.co.uk/news/world-us-canada-64083129?at_medium=RSS&at_campaign=KARANGA canada 2022-12-24 14:16:59
ニュース BBC News - Home Paris shooting: Protests after deadly attack on Kurds https://www.bbc.co.uk/news/world-europe-64086680?at_medium=RSS&at_campaign=KARANGA shootings 2022-12-24 14:29:03
ニュース BBC News - Home Rob Burrow's wheelchair accessible van vandalised in Castleford https://www.bbc.co.uk/news/uk-england-leeds-64086021?at_medium=RSS&at_campaign=KARANGA christmas 2022-12-24 14:33:09
ニュース BBC News - Home Afghanistan protests: Taliban use water cannon on women opposing university ban https://www.bbc.co.uk/news/world-asia-64086257?at_medium=RSS&at_campaign=KARANGA female 2022-12-24 14:17:56
北海道 北海道新聞 道内暴風雪 大規模停電なお700戸 遠軽の女性、落雪で死亡か https://www.hokkaido-np.co.jp/article/780333/ 遠軽 2022-12-24 23:48:48
北海道 北海道新聞 大停電、暮らし直撃 食料品薄、給油に列 大半復旧で安堵の声も https://www.hokkaido-np.co.jp/article/780336/ 食料 2022-12-24 23:42:21
北海道 北海道新聞 なでしこリーグ苦境 経営難、広島でチーム解散/プロWE発足で存在感低下 関係者「アマは競技の土台」 https://www.hokkaido-np.co.jp/article/780339/ 関係者 2022-12-24 23:13:00
北海道 北海道新聞 レバンガ連勝ならず 琉球に66―80 https://www.hokkaido-np.co.jp/article/780292/ 連勝 2022-12-24 23:09:08
北海道 北海道新聞 米で心臓移植の11歳男児帰国 長野の家族出迎え、再会喜ぶ https://www.hokkaido-np.co.jp/article/780252/ 心臓移植 2022-12-24 23:08:05
北海道 北海道新聞 バスケットボール全国高校選手権 白樺、東海大札幌高が敗退 札山の手は3回戦へ https://www.hokkaido-np.co.jp/article/780338/ 東京体育館 2022-12-24 23:05: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件)