投稿時間:2022-03-25 15:44:26 RSSフィード2022-03-25 15:00 分まとめ(47件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
TECH Engadget Japanese Dell XPS 15/17が第12世代Coreプロセッサに海外アプデ https://japanese.engadget.com/dell-xps-1517-053013217.html dellxps 2022-03-25 05:30:13
TECH Engadget Japanese 『ELDEN RING』PC版、侵入者による「死の無限ループ送り」バグを修正 https://japanese.engadget.com/elden-ring-updates-fix-bug-endless-death-loop-050039118.html eldenring 2022-03-25 05:00:39
ROBOT ロボスタ ソニー銀行 テレプレゼンスシステムを活用したリモート相談を開始 住宅ローンや資産運用の対面相談を実現 https://robotstart.info/2022/03/25/sony-bank-telepresence-window.html 2022-03-25 05:20:17
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 最初からリボ払い設定になっているクレカは? カード別注意ランキング https://www.itmedia.co.jp/business/articles/2203/25/news105.html itmedia 2022-03-25 14:50:00
IT ITmedia 総合記事一覧 [ITmedia PC USER] MSIが第12世代Coreプロセッサ搭載のビジネス&ライトクリエイター向けノートPCを発表 https://www.itmedia.co.jp/pcuser/articles/2203/25/news104.html intel 2022-03-25 14:30:00
IT ITmedia 総合記事一覧 [ITmedia PC USER] デル、第12世代Coreプロセッサを採用した24型/27型液晶一体型デスクトップPC https://www.itmedia.co.jp/pcuser/articles/2203/25/news111.html itmediapcuser 2022-03-25 14:22:00
IT ITmedia 総合記事一覧 [ITmedia News] ソニーの謎プロジェクト「雨宮天とポイック」始動 予告動画を公開 https://www.itmedia.co.jp/news/articles/2203/25/news109.html itmedia 2022-03-25 14:07:00
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 渋谷駅東側の再開発 二丁目西地区にバスターミナルや歩行者デッキ 29年度竣工予定 https://www.itmedia.co.jp/business/articles/2203/25/news106.html itmedia 2022-03-25 14:05:00
TECH Techable(テッカブル) 床や鏡が健康管理デバイスに! 生活動線上で自然に健康情報を収集・蓄積する「cheercle」 https://techable.jp/archives/175900 cheercle 2022-03-25 05:00:53
IT 情報システムリーダーのためのIT情報専門サイト IT Leaders ラック、自動診断でスピードを重視したセキュリティ診断「DiaForce」、最短2営業日で結果を報告 | IT Leaders https://it.impress.co.jp/articles/-/22895 ラック、自動診断でスピードを重視したセキュリティ診断「DiaForce」、最短営業日で結果を報告ITLeadersラックは年月日、セキュリティ診断ブランド「DiaForceディアフォース」を発表した。 2022-03-25 14:17:00
AWS AWS - Webinar Channel 2022_VW_s29e01-MCL https://www.youtube.com/watch?v=Ih608fa1vFg vw 2022-03-25 05:38:29
Ruby Rubyタグが付けられた新着投稿 - Qiita テックキャンプ卒業、不安で仕方なかった自分が内定を獲得するまで https://qiita.com/yuhi_taka/items/62e8038951687b74909e 今まで学習をするということに苦手意識のある自分が、独学をするということは現実的ではないとも思いました。 2022-03-25 14:45:41
AWS AWSタグが付けられた新着投稿 - Qiita AWS Fargateについて調べてみた。(コンテナについてもちょっと触れます) https://qiita.com/shular/items/3dc6a6ae679f078bb93d ここでコンテナとは何なのかというと、アプリケーションを動かすための色々な働きをするものを詰め込んだ一つの塊のことです。 2022-03-25 14:08:57
AWS AWSタグが付けられた新着投稿 - Qiita AWSユーザのためのAzure入門①(基本構成) https://qiita.com/Toru_Kubota/items/6ff2101c3e72e2b43ff1 NSGは仮想マシンのNICにも関連付けが可能ですが、今回は同一サブネットのセキュリティポリシーは同じと考えサブネットのみに適用します。 2022-03-25 14:08:10
Linux CentOSタグが付けられた新着投稿 - Qiita OracleVM VirtualBox_CentOS設定方法 https://qiita.com/uksmeq/items/6456e1db8487745455b7 OracleVMVirtualBoxCentOS設定方法OracleVMVirtualBoxのインストールVirtualBoxをインストール※今回使用するverは過去のインストーラ※現在最新※現在拡張パッケージAllsupportedplatform→USBやに対応できるようになるexeをクリックしてデフォルトのままセットアップを完了させる。 2022-03-25 14:59:17
Azure Azureタグが付けられた新着投稿 - Qiita AWSユーザのためのAzure入門①(基本構成) https://qiita.com/Toru_Kubota/items/6ff2101c3e72e2b43ff1 NSGは仮想マシンのNICにも関連付けが可能ですが、今回は同一サブネットのセキュリティポリシーは同じと考えサブネットのみに適用します。 2022-03-25 14:08:10
Git Gitタグが付けられた新着投稿 - Qiita Git HookでSpotlessとktlintを使った自動コードチェック https://qiita.com/a-Mana/items/f1f67b0aaaf7dc6c8e8c これでフォーマットとコードチェックが出来るようになりました。 2022-03-25 14:50:26
技術ブログ Developers.IO NumPyのブロードキャストを図で理解する https://dev.classmethod.jp/articles/numpy-broadcast-visualize/ numpy 2022-03-25 05:46:36
技術ブログ Developers.IO Lambda Layersで参照する環境変数は、それぞれのLambdaの環境変数であることを確認する(複数のLambdaがある場合) https://dev.classmethod.jp/articles/lambda-layers-use-lambda-environment/ lambda 2022-03-25 05:03:39
海外TECH MakeUseOf How to Access Twitter's Onion Service via Tor https://www.makeuseof.com/access-twitter-onion-tor/ access 2022-03-25 05:19:49
海外TECH DEV Community Exception during converting a standalone spring-hibernate based application to web application using Springboot(STS 4) https://dev.to/lekshmigvarrier/exception-during-converting-a-standalone-spring-hibernate-based-application-to-web-application-using-springbootsts-4-19pp Exception during converting a standalone spring hibernate based application to web application using Springboot STS Hi We are trying to convert a standalone spring hibernate based application to web application using Springboot STS We are using applicationcontext xml file for bean creation and configuration We configured libraries in pom xml which is attached here When running the application using Maven following error is showing Please helpDescription An attempt was made to call a method that does not exist The attempt was made from the following location org springframework orm jpa support PersistenceAnnotationBeanPostProcessor findPersistenceMetadata PersistenceAnnotationBeanPostProcessor java The following method did not exist org springframework beans factory annotation InjectionMetadata lt init gt Ljava lang Class VThe calling method s class org springframework orm jpa support PersistenceAnnotationBeanPostProcessor was loaded from the following location jar file C Users CIG Lekshmi m repository org springframework spring orm spring orm jar org springframework orm jpa support PersistenceAnnotationBeanPostProcessor classThe called method s class org springframework beans factory annotation InjectionMetadata is available from the following locations jar file C Users CIG Lekshmi m repository org springframework spring beans spring beans jar org springframework beans factory annotation InjectionMetadata classThe called method s class hierarchy was loaded from the following locations org springframework beans factory annotation InjectionMetadata file C Users CIG Lekshmi m repository org springframework spring beans spring beans jarAction Correct the classpath of your application so that it contains compatible versions of the classes org springframework orm jpa support PersistenceAnnotationBeanPostProcessor and org springframework beans factory annotation InjectionMetadata 2022-03-25 05:16:40
海外TECH DEV Community Serverless Design Principles https://dev.to/transienterror/serverless-design-principles-4jl7 Serverless Design Principles IntroductionServerless is becoming more and more popular these days It has alwaysbeen an interesting space for me because I m interested in thestateless functional style of programming I started working on Lambdafunctions essentially as my first project as an SDE at Amazon back in worked with one of our purely serverless data storage services atAmazon Fashion eventually made my way to the actual Lambda backendteam and now at Microsoft I find myself working with Azure Functionsagain Obviously Lambda has not really existed for that long so Ithink I ve basically maxed out on possible number of years ofServerless experience I hope to highlight some of the more interestingdifferences between more classic design with servers and serverlessdesign MotivationsI wanted to start with why we would use Lambda Functions over classicVMs or Kubernetes clusters The original motivation for Lambda wasmostly to save costs but later on we noticed some efficiencies thatcould only be realized at Lambda scale Saving costsThere are a lot of web services out there that generally serve less than transaction per second but were still costing a lot in VM usage Theidea was that there should be an efficient way for us to schedule a lotof these web services on the same hardware so that we can save a lot ofmoney Efficiencies at scale minimizing resource contention with dataAfter running Lambda for a while Lambda realized there were ways thatwe could schedule work really efficiently Lambda has the data toanalyze different workflows to see what their bottleneck resource is and schedule them such that the functions would not have to contend forthe same resource at the same time For example it would be optimal toschedule a memory heavy workflow with a compute heavy workflow so theyare much less likely to contend for the same resources There is anexcellent talk by Marc Brooker about this you can find here It s just easierI d be remiss if I didn t include this but a lot of the time Lambdaand its ilk are just the easiest services to set up requiring littleknowledge of server infrastructure and that makes it much easier to useto a broad audience Last year I threw together a demo of a bookstoreto give a talk on design for the CS department at my alma mater and itwas just easier to use API Gateway backed by Lambda and DynamoDB so Ididn t have to really think about servers at all Key ideasThese are some key ideas that will come up repeatedly in our bestpractices I m highlighting these specifically because they differ fromtraditional serverful architecture ConcurrencyWe use the number of concurrent invocations to talk about the scale of aFunction not requests per second or capacity which is moretraditional You can calculate your concurrency by multiplying yourrequests per second by the expected latency of the request seeLittle s Law There isactually quite a lot of content in Marc s talk that I linked to earlierabout this if you want a deeper dive on why this is the case The mainreason is that concurrency is a measure that doesn t depend on hardware hence serverless right Concurrency also takes into account howefficiently you re responding to requests rather than just how manyrequests you re getting One common ticket I d see at Lambda would bea team wondering why they were being throttled when they had lowrequests per second more on this later Cold startsThe big issue with serverless that people like to talk about is higherlatency from cold starts A cold start is essentially when yourexecution environment needs to both prepare for the execution and thenactually perform the execution At Lambda we called these stages Initand Invoke It s not uncommon to see cold starts that are over seconds especially if you re not careful I ve also seen many ticketsabout this in my time at Lambda Quick detour on code data reuse I also wanted to include a quick interlude about how persistentresources get reused because I think it s practical for those new atwriting these Functions Class membersWe talked a little bit about init and invoke Intuitively you dthink well I m creating some resources let s say a DB client duringthe init phase but how does it get reused Do I instantiate a newclient per request or can we reuse resources across invokes Theanswer thankfully is that you do in fact reuse these resourcesacross invokes If you initialize your DB client outside of yourfunction definition it will be reused the next time you invoke somembers of your class probably behave as you would expect coming from amore serverful background Let me illustrate this with a quick example class Function db client None def handle invoke event context if db client is None db client DbClient return db client get some stuff On your first invoke you will instantiate a new DbClient verbatim but on subsequent requests to the same execution environment db client verbatim will continue to already be instantiated so youwill be able to get some stuff verbatim directly The more perceptive readers may notice a potential problem here Ifyou re following security best practices using ephemeral credentialsthat expire after some hours you could experience credentials issues byreusing these clients If you re using the AWS SDK this will begenerally handled for you but otherwise it s something to keep in mindas you re developing File SystemThis is a quick one If you use EFS with Lambda or by default with AzureFunctions your invokes all share the same file system This wasoriginally meant for machine learning workflows where people haverelatively large training models they want to load but has plenty ofother uses Best practicesHere are a collection of best practices that I found to be less commonlyreported but are really helpful with design Keep functions short like less than minutes If you read the Azure Functions best practices they say that you shouldkeep your functions short because they timeout This is true of course Lambda used to time out at minutes but now has extended to minutes So you might think well if I limit my function to minutes I should be pretty safe Unfortunately there is more nuance here Earlier I introduced the concept of concurrency and Little s Law centerL lambdaW latex L verbatim is the concurrency λis the effective arrival rate requests per second and W verbatim is the wait time latency For example the largest throttling point for Lambda in one of theregions is concurrent invokes If you consider a minute function seconds we can calculate the λ or requests per second at whichyou ll be throttled center λ   λ    λ    Oops just From the equation itself you can see that the higher the latency thelower the requests per second your function will be able to handle Evenusing the default numbers the λdecreases unintuitively quickly as Wincreases Generally speaking Lambda is designed to execute short functions andother tools such as AWS Batch or ECS are better suited for longerrunning jobs Cold start relatedLet s dig a little deeper on the steps to init Generally speaking no matter the serverless environment we have to do these things Acquire an execution sandbox Pull the code executable into the sandbox Start the executable runtime e g JVM or CLR Run your init code Keep functions small like under MB We ve also already talked about cold starts One of the mostunintuitively slow parts of a cold start is actually pulling yourcode binary I suggested the limit of MB or so mainly because lots ofpeople insist on using Java or C to write functions but in reality ifyou re using an interpreted runtime like python or node you can easilykeep your code under MB I mean in this case Java and C will be likex slower and that s just to download the executable Use an interpreted runtime for more predictable resultsWhile we re on the topic of runtimes try to use a fast runtime JVMand CLR have a reputation of taking a long time to initialize I wouldroutinely see such functions take upwards of seconds to initialize While JVM and CLR languages generally execute faster than node orpython if you re following the earlier advice about functionduration you are spending a much higher proportion of your time ininit causing more latency instability when you do hit a cold start Inmy experience node has been a good choice for having a more consistentexperience You can also bypass the runtime completely and pick acompiled language like Golang or Rust I ve also been on teams thatused Golang to great effect with Lambda as well Be mindful of priceIt s easy to get lost in the ease of using Functions and forget howmuch you re spending I ve accidentally spent thousands of dollars ofAmazon s money in just a few days The pricing model is a constantcost per invoke and then a rate on GBs where GB is how much memoryyou ve allocated not how much you re using and seconds of invocationrounded to the nearest millisecond This means the less you use theless you pay but also conversely the more you use the more you pay It d be good to look up how much it would cost to get a VM orKubernetes to do the same job and make sure you re willing to pay theexcess I ve found that the point where Lambda starts costing morehappens at a much lower concurrency than people generally think Ofcourse functions do more than VMs They scale automagically do OSpatching etc so it may be worth it to you but you should at leastknow how much you re paying for that Assorted Tips Lambda currently doesn t charge for inits under sLambda doesn t really like people spreading this particular tidbit butthis is relatively widely known now In order to optimize cold starttimes your init phase is generally run on a more powerful sandboxand you don t have to pay for it The caveat is that if you spendmore than seconds in the init phase the sandbox is restarted andyou will be charged for init There is a blog post that wentrelatively viral about this phenomenon Init can happen before you actually make an invoke requestThis one surprises customers from time to time but in order to optimizecold starts the platform can initialize your execution environment wellbefore you actually make an invoke Especially if you make use of thedependency injection features Reworking the previous example a littlebit to show a common way that this comes up class Function def init self logger SomeCustomLogger self db client DbClient logger logInfo db client is initialized def handle invoke event context return db client get some stuff If we log the initialization of db client verbatim you can see thatlog statement even if you did not make a request Don t use Task without returning something in Azure Functions when you can This is more off a quirk of how async await works in dotnet but plainTask verbatim functions are syntactic sugar for void verbatim But since execution metadata is saved in the Task verbatim object if you use just plain Task verbatim you return void verbatim and you lose all your execution metadata For example if you returnTask verbatim all Exceptions are suppressed because there isno way to return them to the caller For that reason I suggest at leastreturning something like Task lt bool gt verbatim which will throwExceptions as expected Actually within Lambda we had several levels of cold starts which I get into a little bit later but we re keeping it simplefor now  Shoutout to But probably you ll have issues with Rust s really large compiledbinaries 2022-03-25 05:15:48
海外TECH DEV Community Auto CORS Preflight Handle wih Gorilla/Mux and Go https://dev.to/evillord666/auto-cors-preflight-handle-wih-gorillamux-and-go-855 Auto CORS Preflight Handle wih Gorilla Mux and Go IntroductionNowadays big backend solutions typically look like a set of microservices interacting with each other and with one or more frontend typically browser applications These services could be distributed across multiple virtual or physical machines and as a result every application means server that hosts application would get a different domain name ip address A frontend application typically uses Javascript or Typescript to interact with the backend but if a request goes to a different from the frontend server server a browser might assume that it poses a potential risk to security and block it To solve this issue the backend API should provide headers with a valid origin a domain name or ip where the frontend application is located Today we gonna learn how to properly setup Gorilla mux Web API to forever forget about CORS What we should provide from backendConsider the following REST resource i e user GET api user for getting all usersGET api user id for getting single user by idPOST api user for creating new userPUT api user id for update existing userDELETE api user id for delete existing userBasically we have to implement the following things Add response to OPTIONS to endpoints OPTIONS api user and OPTIONS api user id with the following headers Access Control Allow Origin domain name ip or for any origin Access Control Allow Headers here we could simply set Access Control Allow Methods we could simply list all methods but i think it is better to send OPTIONS GET POST as a value for api user and OPTIONS GET PUT DELETE for api user id Add optional origin check on server side if neccessary Today s article is about the first one you can find the second one github com gorilla handlers it It has a middleware that restricts access only to specific origins Perhaps you noticed that your backend is not always required to respond to OPTIONS request because OPTIONS request is not being sent by browsers for simple requests But in the above example we have to do this When your api is quite big you have to constantly add preflight handlers see example below and every once in a while you could forget to do that especially when you have just finished designing some complicated endpoints Using our Wissance LLC solution open source github package you can forget about adding preflight handlers because our package does this automatically Please give us a star if you find our package useful for you it s very important to us How to make all these works easilyWe implemented our own HandlerFunc that has a signature similar to mux Router HandlerFunc but with some minor differences We are passing a pointer to mux Router as a first parameter We did this because we have a requirement to work with subrouters too take a look at this unit test you can use a reference We are passing handler methods parameters as a last variardic parameter instead of calling Methods when assigning route handler we think this also makes things simpler Basically for auto preflight handling we need to create WebApiHandler instance and pass the required origin value to it as its second argument Access Control Allow Origin header supports only single value and use our HandlerFunc instead of gorilla mux see example handler NewWebApiHandler true AnyOrigin Get only method baseUrl configResource baseUrl api config handler HandleFunc handler Router configResource webApi GetConfigHandler GET full crud functionResourceRoot baseUrl api function handler HandleFunc handler Router functionResourceRoot webApi GetAllFunctions GET handler HandleFunc handler Router functionResourceRoot webApi CreateFunction POST functionResourceById baseUrl api function id handler HandleFunc handler Router functionResourceById webApi GetFunctionById GET handler HandleFunc handler Router functionResourceById webApi UpdateFunction PUT handler HandleFunc handler Router functionResourceById webApi DeleteFunction DELETE For the snippet above we have to add additional preflight Handlers api config api function api function id Before we created our package we always were writing handlers like this router HandleFunc functionResourceRoot webApi PreflightRoot Methods OPTIONS router HandleFunc functionResourceById webApi PreflightByID Methods OPTIONS func webApi WebApiContext PreflightRoot respWriter http ResponseWriter request http Request rest EnableCors amp respWriter respWriter Header Set Access Control Allow Methods POST GET OPTIONS func webApi WebApiContext PreflightByID respWriter http ResponseWriter request http Request rest EnableCors amp respWriter respWriter Header Set Access Control Allow Methods GET PUT DELETE OPTIONS We also should show what the webApi object is and how some of its request handler functions look type WebApiContext struct Db gorm DB passing gorm to Context Config config AppConfig other fields func webApi WebApiContext GetAllFunctions respWriter http ResponseWriter request http Request return here array of functions body omitted func webApi WebApiContext GetFunctionById respWriter http ResponseWriter request http Request return function by id body omitted Let s see how our code changed after we added the library webApi rest WebApiContext Db appContext ModelContext Context Config appContext Config WebApiHandler gr NewWebApiHandler true gr AnyOrigin webApi WebApiHandler Router Use keycloakAuthService KeycloakAuthMiddleware webApi WebApiHandler Router Use r InspectorMiddleware router webApiContext WebApiHandler Router router StrictSlash true function resource webApi WebApiHandler HandleFunc router baseUri function webApi GetAllFunctions GET webApi WebApiHandler HandleFunc router baseUri function find webApi FindFunctions GET Queries query query webApi WebApiHandler HandleFunc router baseUri function name webApi GetFunctionsNames GET webApi WebApiHandler HandleFunc router baseUri function id webApi GetFunctionById GET webApi WebApiHandler HandleFunc router baseUri function id body webApi GetFunctionWithBodyById GET webApi WebApiHandler HandleFunc router baseUri function webApi CreateFunction POST webApi WebApiHandler HandleFunc router baseUri function id webApi UpdateFunction PUT webApi WebApiHandler HandleFunc router baseUri function id webApi DeleteFunction DELETE webApi WebApiHandler HandleFunc router baseUri function filter webApi FilterFunctions GET ConclusionWe made this package not because we have a lot of spare time on our hands but because we were forced to do that because of a huge amount of CORS related errors we were getting every time we worked on something big Now that we have this solution CORS is no longer a problem 2022-03-25 05:15:13
海外TECH DEV Community How To Print & Write Array Values to Files in PHP https://dev.to/codeanddeploy/how-to-print-write-array-values-to-files-in-php-105 How To Print amp Write Array Values to Files in PHPOriginally posted visit and download the sample code In this post I will share a short and simple code on how to print and write array values to files in PHP If you have a task or problem that needs to write the array value to a file then this is for you In this example I m using file put contents to put the value to a file And PHP EOL to newline after loop the array values lt php contents programmingLanguages PHP PYTHON C C foreach programmingLanguages as programmingLanguage contents programmingLanguage PHP EOL file put contents filename txt contents true gt Thanks for reading I hope this tutorial can help you Kindly visit here if you want to download this code Happy coding 2022-03-25 05:14:39
海外TECH DEV Community Laravel 8 File Upload Example https://dev.to/codeanddeploy/laravel-8-file-upload-example-chk Laravel File Upload ExampleOriginally posted visit and download the sample code In this post I will be going to share how to implement a simple Laravel file upload with a database implementation We will save the generated file name base on time size mime type and associate it with the current user logged When developing an application using Laravel usually the file upload is always present even on a simple system Just follow my simple steps and learn from them I assume that you have your Laravel Project already in your local so we will skip that process For more information on how to install Laravel just visit their documentation Okay let s start Step Create file upload migrationsFirst we will create our files table migrations for our File model Run the following command to do it php artisan make migration create files tableThen we will add our migrations field See below the complete code for our migrations lt phpuse Illuminate Database Migrations Migration use Illuminate Database Schema Blueprint use Illuminate Support Facades Schema class CreateFilesTable extends Migration Run the migrations return void public function up Schema create files function Blueprint table table gt id table gt unsignedBigInteger user id table gt string name table gt string type table gt string size table gt timestamps table gt foreign user id gt references id gt on users gt onDelete cascade Reverse the migrations return void public function down Schema dropIfExists files Next you have to run php artisan migrate Step Create file upload controller and modelUse the command below to create your FileController with File model php artisan make controller FilesController model File Step Create file upload routesNow let s create your routes for our file upload File Upload Routes Route get files FilesController index gt name files index Route get files add FilesController create gt name files create Route post files add FilesController store gt name files store Step Setup ModelNext we will set up our File model See below the completed setup lt phpnamespace App Models use Illuminate Database Eloquent Factories HasFactory use Illuminate Database Eloquent Model class File extends Model protected table files protected fillable user id name type size use HasFactory Step Setup ControllerKindly see below the complete code of our controller including the file upload in store method lt phpnamespace App Http Controllers use App Models File use Illuminate Http Request use Illuminate Http UploadedFile use App Http Requests StoreFileRequest class FilesController extends Controller Display a listing of the resource return Illuminate Http Response public function index files File all return view files index files gt files Show the form for creating a new resource return Illuminate Http Response public function create return view files create Store a newly created resource in storage param StoreFileRequest request return Illuminate Http Response public function store StoreFileRequest request fileName auth gt id time request gt file gt extension type request gt file gt getClientMimeType size request gt file gt getSize request gt file gt move public path file fileName File create user id gt auth gt id name gt fileName type gt type size gt size return redirect gt route files index gt withSuccess File added successfully Step Create StoreFileRequestNow let s create a request class for a store uploading file Run the command below php artisan make request StoreFileRequestAfter the StoreFileRequest class is generated kindly check the code below for our validation lt phpnamespace App Http Requests use Illuminate Foundation Http FormRequest class StoreFileRequest extends FormRequest Determine if the user is authorized to make this request return bool public function authorize return true Get the validation rules that apply to the request return array public function rules return file gt required file mimes jpg jpeg bmp png doc docx csv rtf xlsx xls txt pdf zip Step Create ViewFirst we will create our index blade php see below the complete code extends layouts app master section content lt div class bg light p rounded gt lt h gt Files lt h gt lt a href route files create class btn btn primary float right mb gt Add file lt a gt include layouts partials messages lt table class table table striped gt lt thead gt lt tr gt lt th scope col gt lt th gt lt th scope col gt Name lt th gt lt th scope col gt Size lt th gt lt th scope col gt Type lt th gt lt th scope col gt Action lt th gt lt tr gt lt thead gt lt tbody gt foreach files as file lt tr gt lt td width gt file gt id lt td gt lt td gt file gt name lt td gt lt td width gt file gt size lt td gt lt td width gt file gt type lt td gt lt td width gt lt a href file gt type class btn btn danger btn sm gt Delete lt a gt lt td gt lt tr gt endforeach lt tbody gt lt table gt lt div gt endsectionSecond create blade php for our uploading file extends layouts app master section content lt div class bg light p rounded gt lt h gt Add file lt h gt lt form action route files store method post enctype multipart form data gt include layouts partials messages csrf lt div class form group mt gt lt input type file name file class form control accept jpg jpeg bmp png gif doc docx csv rtf xlsx xls txt pdf zip gt lt div gt lt button class w btn btn lg btn primary mt type submit gt Save lt button gt lt form gt lt div gt endsectionAs you can see from our input file we added accept attribute with a value of jpg jpeg bmp png gif doc docx csv rtf xlsx xls txt pdf zip it will help to only accept base on specified file extensions I hope this tutorial can help you Kindly visit here if you want to download this code Happy coding 2022-03-25 05:11:16
海外TECH DEV Community APT sucks, use Nala instead! https://dev.to/mohammadtaseenkhan/apt-sucks-use-nala-instead-3083 APT sucks use Nala instead canonical url APT sucks use Nala instead APT Documentation What is APT apt is a command line utility for installing updating removing and otherwise managing deb packages on Ubuntu Debian and related Linux distributions It combines the most frequently used commands from the apt get and apt cache tools with different default values of some options apt is designed for interactive use Prefer using apt get and apt cache in your shell scripts as they are backward compatible between the different versions and have more options and features Most of the apt commands must be run as a user with sudo privileges This guide serves as a quick reference for the apt commands Updating package index apt update The APT package index is basically a database that holds records of available packages from the repositories enabled in your system To update the package index run the command below This will pull the latest changes from the APT repositories sudo apt updateAlways update the package index before upgrading or installing new packages Upgrading packages apt upgrade Regularly updating your Linux system is one of the most important aspects of overall system security To upgrade the installed packages to their latest versions run sudo apt upgradeThe command doesn t upgrade packages that require removal of installed packages If you want to upgrade a single package pass the package name sudo apt upgrade package nameIt is always a good idea to configure automatic security updates Full Upgrading apt full upgrade The difference between upgrade and full upgrade is that the later will remove the installed packages if that is needed to upgrade the whole system sudo apt full upgradeBe extra careful when using this command Installing packages apt install Installing packages is as simple as running the following command sudo apt install package nameIf you want to install multiple packages with one command specify them as a space separated list sudo apt install package packageTo install local deb files provide the full path to file Otherwise the command will try to retrieve and install the package from the APT repositories sudo apt install full path file deb Removing Packages apt remove To remove an installed package type the following sudo apt remove package nameYou can also specify multiple packages separated by spaces sudo apt remove package packageThe remove command will uninstall the given packages but it may leave some configuration files behind If you want to remove the package including all configuration files use purge instead of remove sudo apt purge package name Remove Unused Packages apt autoremove Whenever a new package that depends on other packages is installed on the system the package dependencies will be installed too When the package is removed the dependencies will stay on the system This leftover packages are no longer used by anything else and can be removed To remove the unneeded dependencies use the following command sudo apt autoremove Listing Packages apt list The list command allows you to list the available installed and upgradeable packages To list all available packages use the following command sudo apt listThe command will print a list of all packages including information about the versions and architecture of the package To find out whether a specific package is installed you can filter the output with the grep command sudo apt list grep package name To list only the installed packages type sudo apt list installed Getting a list of the upgradeable packages may be useful before actually upgrading the packages sudo apt list upgradeable Searching Packages apt search This command allows you to search for a given package in the list of the available packages sudo apt search package nameIf found the command will return the packages which name matches the search term Package Information apt show The information about the package dependencies installation size the package source and so on might be useful before removing or installing a new package To retrieve information about a given package use the show command sudo apt show package nameapt amd Usage apt options commandapt is a commandline package manager and provides commands forsearching and managing as well as querying information about packages It provides the same functionality as the specialized APT tools like apt get and apt cache but enables options more suitable forinteractive use by default Most used commands list list packages based on package names search search in package descriptions show show package details install install packages reinstall reinstall packages remove remove packages autoremove Remove automatically all unused packages update update list of available packages upgrade upgrade the system by installing upgrading packages full upgrade upgrade the system by removing installing upgrading packages edit sources edit the source information file satisfy satisfy dependency stringsSee apt for more information about the available commands Configuration options and syntax is detailed in apt conf Information about how to configure sources can be found in sources list Package and version choices can be expressed via apt preferences Security details are available in apt secure This APT has Super Cow Powers Nala Documentation What is Nala Nala is a front end for libapt pkg Specifically we interface using the python apt api Especially for newer users it can be hard to understand what apt is trying to do when installing or upgrading We aim to solve this by not showing some redundant messages formatting the packages better and using color toshow specifically what will happen with a package during install removal or an upgrade usage nala options lt command gt commands install install packages remove remove packages purge purge packages update update package list and upgrade the system upgrade alias for update fetch fetches fast mirrors to speed up downloads show show package details history show transaction history clean clears out the local repository of retrieved package files optional arguments h help show this help message and exit y assume yes assume yes to all prompts and run non interactively d download only package files are only retrieved not unpacked or installed v verbose logs extra information for debugging no update skips updating the package list no autoremove stops nala from autoremoving packages remove essential allows the removal of essential packages raw dpkg skips all formatting and you get raw dpkg output update updates the package list debug logs extra information for debugging version show program s version number and exit license reads the licenses of software compiled in and then reads the GPLv Steps to install git clone cd nala python setup py build sudo python setup py installIt also has a apt repo echo deb arch amd arm armhf scar main sudo tee etc apt sources list d volian archive scar unstable listwget qO sudo tee etc apt trusted gpg d volian archive scar unstable gpg gt dev nullsudo apt update amp amp sudo apt install nala 2022-03-25 05:09:20
海外TECH DEV Community Laravel 8 - Simple Custom Validation Rules Example https://dev.to/codeanddeploy/laravel-8-simple-custom-validation-rules-example-3gai Laravel Simple Custom Validation Rules ExampleOriginally posted visit and download the sample code In this post I will share how to create simple custom validation rules on Laravel Laravel provides out of box validations that help to fast our web application development But sometimes we need to create our own validation that beyond the Laravel default that is suitable for our needs So in my example in this post I will validate the inputted birth year and only accept from to the current year If the user provides less than or more than the current year it will throw a validation error So I assume that you have your Laravel installed already so I skip the installation process and I will create my sample Controller Step Create the controllerRun the following command to create a controller php artisan make controller CustomValidationController Step Create routes for custom validation rulesBelow are the sample routes or our custom validation rules Custom validation routes Route get custom validation CustomValidationController show Route post custom validation CustomValidationController perform gt name custom validation Step Create a requestWe need to create our request to call the custom validation rule next Run the following command to do it php artisan make request InfoRequest Step Create our controller methodsSee below our custom validation rules controller methods lt phpnamespace App Http Controllers use Illuminate Http Request use App Http Requests InfoRequest class CustomValidationController extends Controller public function show return view test custom validation public function perform InfoRequest request Save after validated Step Creating our viewsSee my sample view below extends layouts app master section content lt div class bg light p rounded gt lt h gt Laravel Custom Validation Rule by CodeAndDeploy com lt h gt lt form method post action route custom validation gt lt input type hidden name token value csrf token gt lt div class form group form floating mb gt lt div class form group gt lt label gt Full name lt label gt lt input type text name name placeholder Name class form control value old name gt if errors gt has name lt span class text danger text left gt errors gt first name lt span gt endif lt div gt lt div class form group mt gt lt label gt Birth Year lt label gt lt input type number name birth year placeholder E g class form control value old birth year maxlength gt if errors gt has birth year lt span class text danger text left gt errors gt first birth year lt span gt endif lt div gt lt div gt lt button class w btn btn lg btn primary type submit gt Save lt button gt lt form gt lt div gt endsection Step Adding validation rules and custom rulesFirst run the following command below php artisan make rule BirthYearRuleSecond let s add custom rules to our BirthYearRule lt phpnamespace App Rules use Illuminate Contracts Validation Rule class BirthYearRule implements Rule Create a new rule instance return void public function construct Determine if the validation rule passes param string attribute param mixed value return bool public function passes attribute value return value gt amp amp value lt date Y Get the validation error message return string public function message return The attribute must be between to date Y Third let s write our form validation from Laravel default and also our custom validation See below for our complete code lt phpnamespace App Http Requests use App Rules BirthYearRule use Illuminate Foundation Http FormRequest class InfoRequest extends FormRequest Determine if the user is authorized to make this request return bool public function authorize return true Get the validation rules that apply to the request return array public function rules return name gt required birth year gt required new BirthYearRule As you can see in the birth year array value we added a new BirthYearRule class to call our custom validation rules Now apply and run it I hope this tutorial can help you Kindly visit here if you want to download this code Happy coding 2022-03-25 05:02:47
海外TECH Engadget Reddit is reportedly exploring the addition of TikTok-like video features https://www.engadget.com/reddit-exploring-tiktok-like-video-features-045505515.html?src=rss Reddit is reportedly exploring the addition of TikTok like video featuresReddit is looking into the possibility of introducing some video features reminiscent of TikTok s according to TechCrunch While the project is still in its very early stages and hasn t even entered the testing phase yet TechCrunch says it could include TikTok like video editing tools that make it easy for you to quot react quot to another person s post or to incorporate it into your content On TikTok you can use a feature called Duet to put your video side by side with another user s to create remixes parodies and the like In the service also introduced Stitch which lets you integrate scenes from another video into your own It enabled the quick creation of funny responses to viral videos and even responses that fact check wrong information going around on the platform Reddit does allow you to post videos on its website but it doesn t have features like Duet and Stitch yet You probably wouldn t think of Reddit if you re made to list social networks with a focus on video And the goal of this project isn t to create a TikTok competitor but rather to provide its users another way to engage in discussions especially if the original post is also a video Reddit did purchase TikTok rival Dubsmash back in but it shut down the service in February this year and incorporated video features from the defunct video sharing platform This particular project will also use video technology from Dubsmash nbsp A spokesperson told TechCrunch that Reddit is now reaching out to individual communities to see if they re interested in the new video features It will only take steps to begin initial testing after they receive most likely positive feedback from the communities quot In line with our work to help people engage in the topics that matter to them through social audio video text memes and more we re in the process of reaching out to a few Reddit communities to see if a new video feature we re working on is something they find useful and fun After getting feedback from Redditors we ll explore an initial test for this new capability quot 2022-03-25 05:01:26
海外TECH CodeProject Latest Articles Reflection with IDispatch-based COM objects https://www.codeproject.com/Articles/523417/Reflection-with-IDispatch-based-COM-objects idispatch 2022-03-25 05:23:00
金融 ニッセイ基礎研究所 社会保障から見たESGの論点と企業の役割(2)-試金石となる?障害者の合理的配慮義務化に向けた対応 https://www.nli-research.co.jp/topics_detail1/id=70651?site=nli 以上のつのキーワードを使い、障害者差別解消法のコンセプトを説明すると、社会で少数派である障害者の社会参加を排除する「社会的障壁」の除去に向け、多数を占める障害のない人が「過重な負担」にならない範囲で、「合理的配慮」の提供を義務付けた法律ということになります。 2022-03-25 14:09:06
金融 ニッセイ基礎研究所 社会保障から見たESGの論点と企業の役割(1)-福祉多元主義などで改めて幅広く考える https://www.nli-research.co.jp/topics_detail1/id=70600?site=nli 筆者は企業経営や投資の専門家ではありませんが、医療・介護を中心に社会保障政策・制度の動向をウオッチしている研究者として、ESGの「S」は社会保障制度・制度の議論で語られているテーマと重複している部分が大きいと考えています。 2022-03-25 14:37:41
ニュース @日本経済新聞 電子版 日野自動車データ不正、対象エンジン型式指定取り消しへ https://t.co/GafR16sfnL https://twitter.com/nikkei/statuses/1507221654807605248 取り消し 2022-03-25 05:03:39
ニュース @日本経済新聞 電子版 「かぼちゃの馬車」債務者物件、米ファンド700億円で取得 https://t.co/GFYo6Ijm45 https://twitter.com/nikkei/statuses/1507221327018545152 物件 2022-03-25 05:02:21
ニュース ジェトロ ビジネスニュース(通商弘報) 大連市中心部の新型コロナ感染者判明で日系企業に影響 https://www.jetro.go.jp/biznews/2022/03/af5e667aa2f1e0b9.html 日系企業 2022-03-25 05:35:00
ニュース ジェトロ ビジネスニュース(通商弘報) ゼレンスキー・ウクライナ大統領がフランス議会で演説、ルノーはロシア工場を停止 https://www.jetro.go.jp/biznews/2022/03/1843a77ed5f6d02f.html 議会 2022-03-25 05:20:00
ニュース ジェトロ ビジネスニュース(通商弘報) 欧州委、ウクライナ情勢を受けて農業従事者や消費者向け緊急対応を発表 https://www.jetro.go.jp/biznews/2022/03/a5fee8464549cdbe.html 農業従事者 2022-03-25 05:15:00
ニュース BBC News - Home Ukraine: Nato will respond if Russia uses chemical weapons, warns Biden https://www.bbc.co.uk/news/world-europe-60870771?at_medium=RSS&at_campaign=KARANGA brussels 2022-03-25 05:23:43
北海道 北海道新聞 こどものくに 久々の歓声 函館公園、今季の営業開始 https://www.hokkaido-np.co.jp/article/661096/ 函館公園 2022-03-25 14:27:00
北海道 北海道新聞 伊藤詩織さんの請求棄却 杉田水脈議員への損害賠償訴訟 https://www.hokkaido-np.co.jp/article/661095/ 伊藤詩織 2022-03-25 14:27:00
北海道 北海道新聞 KAT―TUN元メンバー追起訴 名古屋地検、覚醒剤使用罪 https://www.hokkaido-np.co.jp/article/661080/ 元メンバー 2022-03-25 14:22:03
北海道 北海道新聞 表現の不自由展、4月東京開催へ 街宣車抗議で昨年6月から延期 https://www.hokkaido-np.co.jp/article/661084/ 開催 2022-03-25 14:12:05
北海道 北海道新聞 千葉八街の飲酒事故、懲役14年 下校中の児童5人死傷 https://www.hokkaido-np.co.jp/article/661090/ 千葉八街 2022-03-25 14:04:00
ビジネス プレジデントオンライン 「あなたの息苦しさの原因は"社会的洗脳"だ」女装して1年暮らした男がみた現代社会の正体 - 「社会のまなざし」を意識していると、幸せにはなれない https://president.jp/articles/-/55674 現代社会 2022-03-25 15:00:00
IT 週刊アスキー 新作RPG『ソウルハッカーズ2』のキャラクターPV第1弾「アロウ(CV:石川界人さん)」が公開 https://weekly.ascii.jp/elem/000/004/087/4087302/ 石川界人 2022-03-25 14:30:00
IT 週刊アスキー PC『ガンダムネットワーク大戦』でイベントバトル「激突!ネオ・ジオンの強化人間」が開催中! https://weekly.ascii.jp/elem/000/004/087/4087285/ 強化人間 2022-03-25 14:15:00
マーケティング AdverTimes ブランド横断型のビューティアドバイザーを設置、大松松坂屋が「DEPACO」をリニューアル https://www.advertimes.com/20220325/article379851/ depaco 2022-03-25 05:45:20
マーケティング AdverTimes ビックカメラ×CAMPFIRE クラウドファンディングの資金調達から販売のプロモーションまでをサポート https://www.advertimes.com/20220325/article379846/ campfire 2022-03-25 05:35:10

コメント

このブログの人気の投稿

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