投稿時間:2023-08-12 23:13:19 RSSフィード2023-08-12 23:00 分まとめ(22件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita 知識0の初心者が2年で1万鯖導入を達成したBotを作るまでに経験したこと https://qiita.com/CinnamonSea2073/items/b2ff39d085c7994a2e02 高校 2023-08-12 22:16:23
js JavaScriptタグが付けられた新着投稿 - Qiita 自分的に考えたテストを意識したコンポーネント設計(Vue + TypeScript) https://qiita.com/masakun1150/items/ab3ae1ff5b56f198bd85 react 2023-08-12 22:43:11
Ruby Rubyタグが付けられた新着投稿 - Qiita Ruby言語 (ruby/ruby) のビルド時に、`make miniruby`がこけた https://qiita.com/kudojp/items/2f0038a43b2b996c83e4 makeminiruby 2023-08-12 22:35:17
Docker dockerタグが付けられた新着投稿 - Qiita Cygwin環境でDockerを快適に使うために https://qiita.com/makiuchi-d/items/546b7aeab43f6150ec65 cygwin 2023-08-12 22:44:31
golang Goタグが付けられた新着投稿 - Qiita SQLを含めたユニットテストにgo-mysql-serverが便利 https://qiita.com/makiuchi-d/items/395a96d094ae2c1cb81d databasesqldriver 2023-08-12 22:44:48
golang Goタグが付けられた新着投稿 - Qiita Go Conference登壇、そしてGoにジェネリクスが必要だと思う理由 https://qiita.com/makiuchi-d/items/32c326d84be16f62f3ca httpmakiuchi 2023-08-12 22:43:51
Git Gitタグが付けられた新着投稿 - Qiita Githubリポジトリに既存プロジェクトを後から追加する7つのステップ https://qiita.com/takubii/items/2cadca0a52de269f5928 github 2023-08-12 22:24:47
海外TECH MakeUseOf 4 Tips for Selling Vintage Items on eBay https://www.makeuseof.com/ebay-vintage-selling-tips/ items 2023-08-12 13:30:25
海外TECH MakeUseOf How to Translate Emails in the Gmail Mobile App https://www.makeuseof.com/translate-emails-in-gmail-mobile-app/ steps 2023-08-12 13:15:23
海外TECH MakeUseOf The Nigerian Prince Scam Has Evolved: How to Spot This Phishing Email https://www.makeuseof.com/nigerian-prince-scam-evolved-phishing-email/ The Nigerian Prince Scam Has Evolved How to Spot This Phishing EmailMost of us recognize the Nigerian Prince or quot quot scam but with a change in the political landscape this phishing scam has altered too 2023-08-12 13:11:41
海外TECH MakeUseOf 10 Things That Will Get You Banned From TikTok https://www.makeuseof.com/things-that-will-get-you-banned-tiktok/ permanent 2023-08-12 13:05:25
海外TECH DEV Community Streaming Large Files with PHP to Save Memory https://dev.to/accreditly/streaming-large-files-with-php-to-save-memory-4nmk Streaming Large Files with PHP to Save MemoryHandling large files is a common task for web developers However if not done properly it can lead to high memory usage and slow performance In this tutorial we will look at how to stream large files to the browser in a memory efficient way using PHP PrerequisitesBasic knowledge of PHPAn active PHP development environment Step File Streaming BasicsBefore we dive into the code let s first understand what file streaming is When you open a file in PHP with fopen you can read it line by line or character by character with fgets or fgetc instead of loading the entire file into memory This is known as file streaming Step Setting Up the PHP ScriptLet s create a new PHP script download php In this script we will Open the file we want to stream Read a portion of the file and output it to the browser Repeat step until the entire file has been read and sent Here s the code lt php file path to your largefile pdf Make sure the file existsif file exists file die File not found Set headers to tell the browser to download the fileheader Content Type application octet stream header Content Disposition attachment filename basename file header Content Length filesize file Open the file in binary mode fp fopen file rb Output the filewhile feof fp Read and output a chunk of the file echo fread fp Flush the output buffer to free up memory ob flush flush Close the filefclose fp exit In the above code we use fopen to open the file and fread to read a chunk of bytes at a time which is approximately KB We then output this chunk using echo and flush the output buffer to free up the memory used This process repeats until the end of the file feof fp returns true In this tutorial you ve learned how to stream large files to the browser in a memory efficient way using PHP This method is very useful when dealing with large files that could otherwise consume significant server memory and lead to performance issues Always remember to close any open file handles and flush the output buffer to free up memory 2023-08-12 13:24:52
海外TECH DEV Community createFactory in React. 🏭 important function in React https://dev.to/diwakarkashyap/createfactory-in-react-important-function-in-react-1gn7 createFactory in React important function in ReactTo create a factory in React you can use the createFactory function from the React library The createFactory function takes a component class as its argument and returns a factory function The factory function can then be used to create new instances of the component class Here is an example of how to create a factory in React import React createFactory from react const MyComponent name gt return lt div gt Hello name lt div gt const MyFactory createFactory MyComponent export default function App return lt MyFactory name John Doe gt In this example we first create a component class called MyComponent The MyComponent class takes a name prop as its argument and renders a greeting to the user Next we use the createFactory function to create a factory function for the MyComponent class The factory function is called MyFactory Finally we use the MyFactory function to create a new instance of the MyComponent class and render it to the DOM The factory pattern is a useful design pattern in React when you need to create different objects based on different conditions or inputs For example you could use the factory pattern to create different types of buttons or to create different types of forms The factory pattern can also be used to decouple the object creation logic from the client code This can make your code more modular and easier to maintain Thank you for reading I encourage you to follow me on Twitter where I regularly share content about JavaScript and React as well as contribute to open source projects I am currently seeking a remote job or internship Twitter GitHub Portfolio 2023-08-12 13:19:39
海外TECH DEV Community Creating a Custom URL Protocol in .NET https://dev.to/jamiemcmanus/creating-a-custom-url-protocol-in-net-322h Creating a Custom URL Protocol in NETYou open a Teams link and it prompts you to open the Teams Desktop Application and you sit back and wonder how this works Well wonder no more This process is possible because of URL protocols similar to how Windows sets the default web browser or the default email app You have probably seen it in actions a few times from apps like Teams or Zoom Windows has a few of these built in but we can create our own custom protocols too You can create these by manually adding a Reg Key but we ll do this via NET We ll create a simple app and a custom protocol that will open this app when a user clicks on a URL with the protocol Lets go SetupLets start with creating a desktop application for simplicity I ve chosen a WPF app Open Visual Studio with Administrator privilege s I ll explain later and create a new WPF project App StartupIn the App xaml cs file create a new method called RegisterProtocol We ll run this on startup to create our protocol We ll need to do check if the protocol exists and if not then create it We set the name of our protocol and assign to a variable string customProtocol CustomProtocol Then add we check if a Registry Key exists for this value RegistryKey key Registry ClassesRoot OpenSubKey customProtocol if key null If the key is null then we will have to create one if key null key Registry ClassesRoot CreateSubKey customProtocol key SetValue string Empty URL customProtocol key SetValue URL Protocol string Empty key key CreateSubKey shell open command key SetValue string Empty applicationPath key Close Now to explain it a bit key Registry ClassesRoot CreateSubKey customProtocol This line creates a new subkey in the HKEY CLASSES ROOT registry This is where file associations and protocol handlers are registered key SetValue string Empty URL customProtocol This line sets a value for the subkey we just created The value s name is an empty string indicating the default value for the key and the value s data is a string that specifies the type of URL and the custom protocol name key SetValue URL Protocol string Empty This line sets a value named URL Protocol within the same subkey key key CreateSubKey shell open command This line creates a new subkey within our key The subkey is named shell open command This is where you specify the command to be executed when a URL matching our protocol is opened key SetValue string Empty applicationPath This line sets the default value for the shell command key we just created The data is the filepath to the EXE for our application and represents any parameters sent key Close We simply close the key to finish We now have one last thing before the key can be registered We have to make sure the application has the correct privilege s to edit the registry In your app manifest file add one if you dont have one Add the below lt requestedPrivileges xmlns urn schemas microsoft com asm v gt lt requestedExecutionLevel level requireAdministrator gt lt requestedPrivileges gt This will make the application ask the user for admin the privilege s that we need to create the key GUINext up we ll edit the application to display any arguments that are passed to the app when opened via the custom protocol We don t need to do this part but it will show you that any parameters you sent are indeed working In your MainWindow xaml cs add the below string to display the arguments passed in public string ArgumentsText get return argumentsTextBlock Text set argumentsTextBlock Text value And within the MainWindow xaml file add a textblock to display the string lt TextBlock x Name argumentsTextBlock Margin gt Next we need to edit the app xaml cs to pass the arguments into the MainWindow Edit the OnStartup like so protected override void OnStartup StartupEventArgs e base OnStartup e RegisterProtocol MainWindow mainWindow new MainWindow if e Args Length gt string arguments string Join e Args mainWindow ArgumentsText Arguments arguments else mainWindow ArgumentsText No arguments provided mainWindow Show We first call our RegisterProtocol method and then check for any arguments passed in on startup before manually creating our main window Now you can publish the application and click the EXE to run it You should see something like the below image This is what we expect there are no parameters passed when clicking the EXE WebNext we re going to create a simple HTML file to simulate opening our protocol from the web lt DOCTYPE html gt lt html gt lt head gt lt title gt Custom Protocol Test lt title gt lt head gt lt body gt lt p gt Click the link below to test your custom protocol lt p gt lt a href CustomProtocol myargument gt Test Custom Protocol lt a gt lt body gt lt html gt Like I said pretty simple The value for the href is the name of your protocol followed by along with any parameters you want to pass I am passing in the string myargument In ActionLets open up the file in browser and try it out Click on the link and you should be greeted with a prompt like the below Perfect Click Open and our application should open as expected Finishing UpThere we have it its not a glamourous example but who said programming would be eh You can see the sample application here JamieMcManus CustomProtocolAppExample Sample Project for a Registering a Custom URL Protocol Got any improvements Then feel free to comment below And if you re feeling generous you can buy me a coffee with the link below and yes its all for coffee I drink a copious amount of it while writing 2023-08-12 13:11:11
海外TECH DEV Community Deployment - Kubernetes https://dev.to/daniellcas/deployment-kubernetes-1ja4 Deployment Kubernetes Pré requisitosPodsReplicaSet O que édeployment Éum gerenciador de Pods e ReplicaSet vocêpode definir o state desejado e ele trabalharápara atualizar o seu state Criação de um deploymentsintaxeapiVersion apps vkind Deploymentmetadata name nginx deployment labels app nginxspec replicas selector matchLabels app nginx template metadata labels app nginx spec containers name nginx image nginx ports containerPort O script acima irácriar um deployment que cria um ReplicaSet com replicas como definido que cria pods que terão o template definido com a imagem do nginx e o label de app nginx Comandos para criar e observarPara aplicar o código acima kubectl apply f nome do arquivo Para verificar se o deploment foi criadokubectl get deploymentsAo rodar o kubectl get deployments apareceráos seguintes nomes NAMEnome do deployment que foi criado no namespace READYexibe quantas réplicas do aplicativo estão disponíveis pronto desejado UP TO DATEexibe o número de réplicas que foram atualizadas para atingir o state desejado AVAILABLEexibe quantas réplicas do aplicativo estão disponíveis AGEexibe a quantidade de tempo que o aplicativo estáem execução Para verificar o status de lançamento do deploymentkubectl rollout status deployment nome do deployment Atualizações de Pods O deployment garante que apenas um determinado número de pods fiquem inativos enquanto eles são atualizados Por padrão dos pods devem ficar ativos e somente inativos para atualizações ele primeiro cria novos pods para então começar a destruir os antigos Ele não mata pods antigos atéque um número suficiente de novos pods surjam e não cria novos pods atéque um número suficiente de pods antigos tenha sido eliminado Caso de criação de deployment s com erros Para esses casos a gente consegue ter o histórico de alterações do deployment pelo comando a seguir kubectl rollout history deployment nome do deployment esse comando mostraráo history de alteração do deployment para voltar a uma versão anterior basta kubectl rollout undo deployment nome do deployment para voltar a uma versão específica kubectl rollout undo deployment nome do deployment revision numero da revisao Política de limpezaVocêpode definir um campo na criação do seu deployment para especificar quantos ReplicaSets antigos para esta implantação vocêdeseja reter por padrão e spec revisionHistoryLimit lt Esse e o campo de definição Conclusao Observe a imagem a seguir Basicamento deployment vai fazer o controle de seus ReplicaSets e Pods por você pode ser configurado da melhor maneira ao seu negócio Podendo tanto fazer o controle atédefinir seus recursos máximos e mínimos também tem como trabalhar com suas escalas tanto vertical quanto horizontal junto com um serviço de HorizontalPodAutoscaler ReferênciasKubernetes 2023-08-12 13:06:18
Apple AppleInsider - Frontpage News Upgrading an Apple Silicon Mac mini SSD is possible, but a slog https://appleinsider.com/articles/23/08/12/upgrading-an-apple-silicon-mac-mini-ssd-is-possible-but-a-slog?utm_medium=rss Upgrading an Apple Silicon Mac mini SSD is possible but a slogOwners of the M Mac mini can upgrade the storage but with a tricky process involving desoldering chips it s a difficult path that most users should avoid taking in the first place Removing the old NAND chips from a Mac mini logic board YouTube Luke Miani In previous generations before Apple Silicon was introduced Apple s design of the Mac mini allowed for various components to be changed including storage drives As part of Apple Silicon Apple switched entirely over to chips soldered directly to the logic board locking users into using a specific capacity of internal storage for the life of the Mac Read more 2023-08-12 13:20:48
ニュース BBC News - Home Migrant boat sinks in Channel killing six people https://www.bbc.co.uk/news/uk-66484699?at_medium=RSS&at_campaign=KARANGA authorities 2023-08-12 13:15:35
ニュース BBC News - Home England 2-1 Colombia: Lionesses book Women's World Cup semi-final with Australia https://www.bbc.co.uk/sport/football/66470403?at_medium=RSS&at_campaign=KARANGA England Colombia Lionesses book Women x s World Cup semi final with AustraliaEngland set up a Women s World Cup semi final with co hosts Australia as they come from behind against a dangerous Colombia side 2023-08-12 13:26:17
ニュース BBC News - Home Harry Kane joins Bayern Munich ending record-breaking Tottenham career https://www.bbc.co.uk/sport/football/66484550?at_medium=RSS&at_campaign=KARANGA Harry Kane joins Bayern Munich ending record breaking Tottenham careerEngland captain Harry Kane joins German champions Bayern Munich on a four year deal ending his record breaking career at Tottenham 2023-08-12 13:13:26
ニュース BBC News - Home Perseid meteor shower to light up night sky https://www.bbc.co.uk/news/uk-66486813?at_medium=RSS&at_campaign=KARANGA astronomical 2023-08-12 13:46:14
ニュース BBC News - Home Women's World Cup 2023: England beat Colombia to set up Australia semi-final- highlights https://www.bbc.co.uk/sport/av/football/66470701?at_medium=RSS&at_campaign=KARANGA Women x s World Cup England beat Colombia to set up Australia semi final highlightsWatch highlights as England progress to the Women s World Cup semi finals where they will face co hosts Australia after coming from behind to beat Colombia in Sydney 2023-08-12 13:06:43
ニュース BBC News - Home The Hundred 2023: Nat Sciver-Brunt blasts Trent Rockets past London Spirit for first win of 2023 https://www.bbc.co.uk/sport/cricket/66486535?at_medium=RSS&at_campaign=KARANGA The Hundred Nat Sciver Brunt blasts Trent Rockets past London Spirit for first win of Nat Sciver Brunt smashes four sixes in a row to power Trent Rockets past London Spirit for their first win of The Hundred this year 2023-08-12 13:24:02

コメント

このブログの人気の投稿

投稿時間: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件)