投稿時間:2022-04-04 04:21:14 RSSフィード2022-04-04 04:00 分まとめ(22件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
海外TECH DEV Community AAD auth for Plotly Dash https://dev.to/kummerer94/aad-auth-for-plotly-dash-3m57 AAD auth for Plotly DashThis article shows you how to use Azure Active Directory authentication to protect your dashboards We will implement SSO using the OAuth flow that is supported by AAD The rise of data science and dashboardsThe usage of dashboards to visualize and explain data to a number of internal and external clients has increased heavily in the last few years Together with the strong buzz around data science topics this has resulted in a lot of interesting new software including many open source libraries On one side Tableau is as a large provider of ready made solutions around data visualizations On the other side there is also a strong DIY community that bets on open source technology that is sometimes assisted by paid offerings or paid consulting One particular interesting case is Dash by Plotly While I myself have previously used Bokeh I quickly made the transition to Dash since I felt it was more ready for usage as a deployed application Additionally having access to Plotly as a charting library is a big plus because it is such a successful open source project with a strong community and a fantastic library One important thing to being able to deploy our application is of course authentication I wanted to use SSO via AAD to secure our Dash apps The hurdles for that are There is both a huge number of articles detailing AAD integration and not very many useful articles There are so many usecases for authentication and authorization with AAD that it is hard to find exactly what you are looking for There are multiple packages that claim to support AAD authentication for flask But some of them are very heavily built around one usecase that may not fit yours Authentication with AAD uses the OpenID flow of the OAuth protocol The OAuth procotol is quite difficult to understand already and it is not helped by the fact that every provider implements it a little different I want to present my usecase and then show you how I implemented it What I wanted is Implement SSO using AAD so that a user can authenticate to the Dash app using his AAD account I want to read the user s name and email from the issued OpenID token so that I can use this in my app Using flask danceThe OpenID flow is not an easy thing to implement correctly and it usually is a good idea to reloy on implementations that are used by many people instead of using your own I have found flask dance to be a great choice for this integration It will take care of the whole OAuth protocol flow the dance for you and all you need to do is configure the library the right way Let s look at the basic setup from flask import Flaskfrom flask dance contrib azure import make azure blueprintblueprint make azure blueprint client id your client id client secret your client secret tenant your tenant id scope openid email profile app Flask name app register blueprint blueprint url prefix login Here we have a flask instance and the blueprint from the flask dance library to activate the AAD authentication What you need to do now is the following You need to create an app registration in your AAD blade in the Azure portal This will give you a client ID and a tenant ID Microsoft has a great tutorial that will guide you through the process Follow the part of the tutorial that is called Register an application You need to create a client secret for usage in your deployment or local development This is described in the Add credentials section Replace the placeholders in the make azure blueprint call with your values Add localhost login azure authorized to your redirect URIs in the app registration It is good to know what flask dance is doing in the background And to understand that you need to know that is necessary for the OpenID flow to work The first step is to send a request for authentication to Microsoft For that you redirect the user to some login site by Microsoft where he inputs his credentials and authenticates with his Microsoft account Flask dance adds a route to your flask app that redirects you to the Microsoft endpoint for authentication Then if the user logged in on the Microsoft page you will eventually get different tokens in the the form of JWTs that serve the purpose to verify the authentication open id token allow access to Microsoft services access token and renew the access token refresh token If you are only interested in the login only the open id token is of interest to you Flask dance will add a route to your flask server so that the response from Microsoft can be parsed and with the help of the response the tokens are retrieved and verified Optional if you want you can use one of these tokens to authenticate as the user to Microsoft APIs if the user has given you access If you only want SSO make sure your scope is only scope openid email profile and nothing else Putting your Dash app behind authenticationThe next step is to make sure that your users can only access the Dash app if they are logged in This means we need to verify the login and if the user is not logged in prompt him to login This can be done using decorators for the flask routes that you want to protect Let s take a look at the decorator that we want to use from flask import redirect url forfrom flask dance contrib azure import azuredef login required func Require a login for the given view function def check authorization args kwargs if not azure authorized or azure token get expires in lt return redirect url for azure login else return func args kwargs return check authorizationWe have done multiple things here We wrap the given function so that we first check if the user is authorized If the user is authorized we call the original function and return the result If the user is not authorized or the token is expired we redirect the user to login again Now what is left is actually protecting the routes For this we assume that your flask instance is called app for view func in app view functions if not view func startswith azure app view functions view func login required app view functions view func You need to protect all the routes of your dash server except for the login routes To make sure to hit all the views that Dash adds without actually specifying them we can simply cycle through all views and protect them with the login required decorator We iterate over all your view functions and protect the ones that do not start with azure This way we make sure that we do not protect the view functions that accept the authentication result from Microsoft and the login route that redirects the user to the Microsoft login site This is important because the user will not be authenticated when we receive the result and only after we verified it Putting everything togetherA full example of this would then be from dash import Dash htmlfrom werkzeug middleware proxy fix import ProxyFixfrom flask import Flask redirect url forfrom flask dance contrib azure import azure make azure blueprintdef login required func Require a login for the given view function def check authorization args kwargs if not azure authorized or azure token get expires in lt return redirect url for azure login else return func args kwargs return check authorizationblueprint make azure blueprint client id your client id client secret your client secret tenant your tenant id scope openid email profile app Flask name app config SECRET KEY secretkey app register blueprint blueprint url prefix login dash app Dash name server app use this in your production environment since you will otherwise run into problems proxies and httpsapp wsgi app ProxyFix app wsgi app x proto x host for view func in app view functions if not view func startswith azure app view functions view func login required app view functions view func dash app layout html Div children html H children Hello Dash html Div children You are logged in if name main dash app run server debug True Note a few things that were previously missing that I have added now Make sure to use a long string for the SECRET KEY and consult the flask documentation You will need to set it because flask dance uses the session to store the tokens for the user You can only access the app via localhost not because otherwise the authorization will not work This is due to the redirect URIs that Microsoft allows Make sure to apply the proxy fix if you are using this in production behind an SSL proxy In production you will need to add the URL to your redirect URIs for your AD registered app Of course make sure to use the actual URL of your app instead of To make the authentication work you need to add OAUTHLIB RELAX TOKEN SCOPE to your environment variables configuration for development and production This is because AAD does not guarantee to return the scope in the same order as we requested it Only and only for local development will you need to add OAUTHLIB INSECURE TRANSPORT to your environment variables to make the authentication work This is because locally the login token will not be transported via SSL If you have followed my instructions you should be able to run the above code and when you visit localhost you should be forwarded to localhost login azure that then redirects you to the login site for Microsoft After you login you are redirected to localhost login azure authorized and then finally to localhost where you should see the text You are logged in Extracting the user informationOne nice touch is to display the name of the user that is logged in This is easily doable using the token that we get after the authentication flow I am leaving it up to you how you want to integrate the token in your app just make sure that you only use the azure variable in the context of a request as it is tied to a session that is only available when you have an actual request This may for example interfere when you include the username directly in your Dash layout The Dash layout is rendered before the request comes in and therefore you do not yet know who your user is You have two options then Make the Dash layout a function that is then rendered each time a user visits the page and therefore you have a request context Make the username the output of a callback Callbacks live in request contexts and therefore you can use the azure variable there Now let us take a look at the code that decods the usename from the token I am using the pyjwt library to work with the token import jwtfrom flask dance contrib azure import azure no need to verify the token here that was already done beforeid claims jwt decode azure token get id token options verify signature False name id claims get name There is more information available in the token like the email of the user For that just look at the claims of the token yourself or use the website jwt ms by Microsoft to inspect your token your token which essentially is a credential never leaves your browser Wrap upMaking AAD authentication work with flask is basically all you need to do to also make it work with your Dash setup For that we have used flask dance and configured it to work with an AAD registered app The final touches are some details to make the OAuth flow work locally and in production and you are all set You can then extract further details from the token like the name or the email of the user 2022-04-03 18:28:51
海外TECH DEV Community INTRODUCTION TO SEABORNS. https://dev.to/violakithinji/introduction-to-seaborns-5ha9 INTRODUCTION TO SEABORNS Seaborn is a library for making statistical graphics in Python It builds on top of matplotlib and integrates closely with pandas data structures Seaborn helps you explore and understand your data Its plotting functions operate on dataframes and arrays containing whole datasets and internally perform the necessary semantic mapping and statistical aggregation to produce informative plots Its dataset oriented declarative API lets you focus on what the different elements of your plots mean rather than on the details of how to draw them One has to be familiar with Numpy and Matplotlib and Pandas to learn about Seaborn Seaborn offers the following functionalities Dataset oriented API to determine the relationship between variables Automatic estimation and plotting of linear regression plots It supports high level abstractions for multi plot grids Visualizing univariate and bivariate distribution Using Seaborn we can plot wide varieties of plots like Heat maps The heatmap represents the data in a dimensional form The ultimate goal of the heatmap is to show the summary of information in a colored graph It utilizes the concept of using colors and color intensities to visualize a range of values Pair Plots are used when we want to see the relationship pattern among more than different numeric variables For example let s say we want to see how a company s sales are affected by three different factors in that case pair plots will be very helpful pie chart and bar charts Pie Chart is generally used to analyze the data on how a numeric variable changes across different categories scatter plots Scatter Plot is used when we want to plot the relationship between any two numeric columns from a dataset These plots are the most powerful visualization tools that are being used in the field of machine learning distributions plots We can compare the distribution plot in Seaborn to histograms in Matplotlib They both offer pretty similar functionalities here use sns distplot Regression plots Regression plots create a regression line between numerical parameters in the jointplot scatterplot and help to visualize their linear relationships How to learn Seaborn Do a thorough research on seaborns the basics it s importance in data visualization and how it relates with other libraries and why they do Try out plotting using seaborn this way you will grasp more lets agree on this one practice makes perfect So first start by looking for a dataset Try reading some articles about seaborns and looking for a worked out problem to master the techniques lastly make use of galleries and YouTube Installation of seabornI find Jupyter notebook efficient in doing data visualization hope you like it too for the ones using local machine you run this command on your terminal If you are using google colab or jupyter notebooks worry not about installation pip install seabornImporting the libraryimport seaborn as snsLoading datasetfor demonstration am using a dataset in my local machine and we will see how seaborn helps us to visualize the distribution of each feature This shows the relationship between matplotlib and seaborn ConclusionData visualization is fun to work with and you get to work with different python libraries and makes your plots and graphs more appealing Go through seaborn attentively and make sure you practice using all those graphs and libraries Consistency is key 2022-04-03 18:22:25
海外TECH DEV Community Building GCS Buckets and BigQuery Tables with Terraform https://dev.to/cemkeskin84/building-gcs-bucket-and-bigquery-tables-with-terraform-4hf4 Building GCS Buckets and BigQuery Tables with TerraformTerraform helps data scientists and engineers to build an infrastructure and to manage its lifecyle There are two ways to use it on local amp cloud Below is the description how to install and use it in local to build an infrastructure on Google Cloud Platform GCP Initial Installations Terraform and Google Cloud SDKFor installing Terraform pick the proper guide for your operating system provided in their webpage Once completing the Terraform installation you also need to have a GCP account and initiate a project The ID of the project is importrant to note while proceeding with Terraform The following step is to get key to access and control your GCP project Pick the project you just created from the pull down menu on the header of GCP and go to the Navigation Menu gt gt IAM amp Admin gt gt Service Accounts gt gt Create Service Accountand floow the steps Step Assign the name of your preferenceStep Pick the role “Viewer for initiationStep Skip this optional step for your personal projects Then you should see a new account on your Service Accounts list Click on Actions gt gt Manage Keys gt gt Add Key gt gt JSON to download the key on your local machine Next Step is installing Google Cloud SDK to your local machine following the straight forward instractions given here Then open your terminal below is a GNU Linux example to set the environmental variable on your local machine to link with the key you downloaded Json file with the following instructions export GOOGLE APPLICATION CREDENTIALS path to your JSON XXXXX dadasacff jsongcloud auth application default loginThis redirects you to the browser in order to select your corresponding Google account Now your local SDK has credentials to reach and configure your cloud services However having these initial authentications you still need to modify your service account permissions specific for the GCP services you intended to build namely Google Cloud Storage GCP and BigQuery Navigation Menu gt gt IAM amp Admin gt gt IAMand pick your project to edit its permissions as following Next step is enabling the APIs for your project by following the links IAM APIIAM Credentials Take care of the GCP account and the project name while enabling APIs Building GCP Services with TerraformCompleting necessary installations Teraform and Google Cloud SDK and authentications we are ready to build these two GCP services via Terraform from your local machine Basically two files are needed to configure the installations main tf and variables tf The former one requires the code given below to create GCP services with respect to variables provided in latter the following code snippet The code below is from terraform required version gt backend local google source hashicorp google provider google project var project region var region credentials file var credentials Use this if you do not want to set env var GOOGLE APPLICATION CREDENTIALS Data Lake Bucket Ref resource google storage bucket data lake bucket name local data lake bucket var project Concatenating DL bucket amp Project name for unique naming location var region Optional but recommended settings storage class var storage class uniform bucket level access true versioning enabled true lifecycle rule action type Delete condition age days force destroy true DWH Ref resource google bigquery dataset dataset dataset id var BQ DATASET project var project location var region The code for variables tf The code below is from The comments are added by the authorlocals data lake bucket BUCKET NAME Write a name for the GCS bucket to be created variable project description Your GCP Project ID Don t write anything here it will be prompted during installation variable region description Region for GCP resources Choose as per your location default europe west Pick a data center location in which your services will be located type string variable storage class description Storage class type for your bucket Check official docs for more info default STANDARD variable BQ DATASET description BigQuery Dataset that raw data from GCS will be written to type string default Dataset Name Write a name for the BigQuery Dataset to be created Once the files given above are located to a folder it is time to execute them THere few main commands for Terraform CLI Main commands init prepares the directory by adding necessary folders and files for following commandsvalidate checks the existing configuration if it is validplan shows planned changes for the given configurationapply creates the infrastructure for the given configurationdestroy destroys existing infrastructureTHe init plan and apply commands will give the following outputs shortened x y terraform terraform init Initializing the backend Successfully configured the backend local Terraform will automaticallyuse this backend unless the backend configuration changes x y terraform terraform plan var project Your GCP Project ID Enter a value xxx yyy write yor GCP project ID herex y terraform terraform apply var project Your GCP Project ID Enter a value xxx yyy write yor GCP project ID hereTerraform used the selected providers to generate the following execution plan Resource actions are indicated with the followingsymbols createTerraform will perform the following actions After executing the three simple codes above you will see A new GCS bucket and BigQuery table in your GCP account 2022-04-03 18:20:40
海外TECH DEV Community Text Classification with HMS ML Kit Custom Model https://dev.to/hdgurkey/text-classification-with-hms-ml-kit-custom-model-ob7 Text Classification with HMS ML Kit Custom ModelWe will see how we can classify texts with the Huawei HMS ML Kit custom model What is Text Classification Text Classification text tagging or text categorization provides to organize unstructured data by dividing the texts into groups in a certain way in order to extract values from these data with certain classifications While it is an expensive process that causes a lot of time and resource consumption when done manually the text can be automatically analyzed by machine learning method and quickly divided into predefined categories according to its content easily Huawei ML Kit ーCustom ModelOne of the best features that ML Kit provides that allows you to customize models is the Custom Model feature You can train your model quickly flexibly and at low cost with the AI Create feature to quickly train and create the model you will use in your application Let s see how we do text classification using Huawei ML Kit Custom Model Before the start Developer AccountYou must have an AppGallery Console developer account If you do not have an account you must create an account HMS ToolkitAndroid Studio HMS Toolkit Plugin must be installed in order to use AI Create where we will create our model Android Studio File →Settings →Plugins →HMS Toolkit IDE must be restarted after installationImportant HMS Toolkit is expected to support Android Studio Bumblebee version from June It is currently available in the Android Arctic Fox version Python for ML KitAI Creator requires Python v for ML Kit use Complete your installation by downloading the Python version from the Link Notes Automatically select the process of adding the path during installationMake sure to install with pip selected during installation The path may conflict if there is another python version already installed You have to uninstall the old version and install the new one If Android Studio is open after installing Python it must be restarted Data PreparationYou can use two types of text data in HMS ML Kit Text Classification Training text in JSON format The JSON text format is “label ““ “text ““ “label ““ “text ““ “label “category “text “sample text “label “category “text “sample text “label “category “text “sample text Training text in TXT format Classify the TXT files by category of your data as train and as test dataset should be foldered in the same wayNow we can start development Text Classification Demo AppApp When we provide news text it will categorize the news text sports technology etc Project Steps Create Android ProjectLet s start with creating an empty android project Attention The min sdk for text classification should be App Gallery Connection A project is created from My Projects gt Add new project by going to the App Gallery Connect Console Enable data processing location Adding App to Project Integrating the AppGallery Connect SDK in Android Studio SDKs are added to the gradle file before the agconnect services json file because we haven t activated the ML kit service yet a Project level build gradleallprojects repositories Add the Maven address maven url …buildscript repositories Add the Maven address maven url dependencies Add dependencies classpath com huawei agconnect agcp b App level build gradledependencies Add dependencies implementation com huawei agconnect agconnect core … Add the information to the bottom of the file apply plugin com huawei agconnect Enable ML Kit ServiceMy projects →Project →Build →ML Kit in left menu Then click enable now button Add agconnect services jsontop left menu project settings →app information →download agconnect services json fileThen add it on your project to app directory in project view Model CreationRequirements The number of image categories is at least Each category contains at least files More files will guarantee a higher model precision The text size does not exceed MB The file encoding format is UTF Coding AssistantAfter installing HMS Toolkit Plugin in Android studio as we mentined earlier you can see the HMS option HMS →Coding Assistant →AI →AI Create →Text Classification Attention After this point Mindspore that ML Kit uses in the base will be loaded but you may encounter the following situation After clicking the ok button here it will ask you to choose a path and save the mindspore file whl to the location you selected Open CMD from your computer and go to the path where the mindspore file iscd Mindspore Paththen install it with pippip install Mindspore filename Creating ModelIn this section we add the train dataset we prepared Currently only Chinese and English are supported When you press the Case and Case options you can obtain a sample data set Case IMDB dataset json format Case News Categories TXT format If you are experienced in this field you can change the iteration count and learning rate values with Advanced settings Testing ModelTrain and validate is and when it is completed you will see the accuracy values obtained as a result of the training in detail You can also see your Final Test Accuracy value in Android Studio Event Logs We will upload the test model we have prepared to test the model we have created Again with Case and Case test datasets of the sample dataset given in the train can also be downloaded When the test process is complete you will see the Test average accuracy value If you are not satisfied with the success of the model you can increase your success rate by repeating the training steps with changes related to your data or advanced values To use your model you can use your saved model in your application by checking the open model location option You can get a sample app file in java language integrated into your model by clicking Generate Demo Build an AppAdd following dependencies to app level gradle fileimplementation com huawei hms ml computer model executor implementation mindspore mindspore lite implementation com huawei hms base In addition the aar file added to the libs file is implemented in the gradle file at the App level implementation files libs ms textclassifier aar And the following section must be added under the app level android section for our model file with ms extension to work android aaptOptions noCompress ms tflite After training the model our mc extension model file is added to our project by creating the assets folder Required permissions are also added to the Android Manifest file lt uses permission android name android permission WRITE EXTERNAL STORAGE gt lt uses permission android name android permission READ EXTERNAL STORAGE gt lt uses permission android name android permission INTERNET gt First of all let s prepare our XML file where our application will find the category by classifying the news after the text is entered lt xml version encoding utf gt lt LinearLayout xmlns android xmlns tools android layout width match parent android layout height match parent android orientation vertical tools context MainActivity gt lt LinearLayout android layout width match parent android layout height wrap content android background DFFF gt lt TextView android layout width wrap content android layout height dp android textSize sp android text News Classification android gravity center vertical android layout marginTop dp android layout marginLeft dp gt lt LinearLayout gt lt LinearLayout android layout width match parent android layout height match parent android orientation vertical android background FFFFFF android padding dp gt lt EditText android id id input data edt android layout width match parent android layout height dp android textSize sp android gravity top android padding dp android background drawable edittext background android layout marginTop dp gt lt LinearLayout android layout width match parent android layout height wrap content android layout marginTop dp gt lt Button android id id clear btn android layout width dp android layout height dp android layout weight android textSize sp android textColor color red android text CLEAR android background drawable btn background gray gt lt Button android id id identification btn android layout width dp android layout height dp android layout weight android textSize sp android textColor BBA android text PREDICT android layout marginLeft dp android background drawable btn background gray gt lt LinearLayout gt lt TextView android id id label data txt android layout width match parent android layout height wrap content android textSize sp android layout marginTop dp android visibility gone gt lt LinearLayout gt lt LinearLayout gt Next let s create a ModelDetector class In this class after the user enters the text when triggered we will take our model from the asset and make it predict with mindspore fun loadFromAssets classifier TextClassifier context MODEL NAME if classifier isHighAccMode val resName text classifier mc if classifier loadHighAccModelRes context assets open resName Log e TAG load high acc model res error return load minspore model loadMindsporeModel The loadFromAssets method calls our model that we added to the assets and triggers Mindspore private fun loadMindsporeModel val resDir context filesDir val resFilePath resDir toString File separator news classification ms val fos FileOutputStream resFilePath fos write classifier msModelBytes classifier msModelBytes size fos close val localModel MLCustomLocalModel Factory mModelName setLocalFullPathFile resFilePath create val settings MLModelExecutorSettings Factory localModel create try modelExecutor MLModelExecutor getInstance settings loadMindsporeModelOk true catch error MLException error printStackTrace loadMindsporeModel method fun getMaxProbLabel probs FloatArray String Log d TAG Arrays toString probs var maxLoc var maxValue Float MIN VALUE for loc in probs indices if probs loc gt maxValue maxLoc loc maxValue probs loc return classifier labels maxLoc fun softmax logits FloatArray FloatArray var maxValue Float MIN VALUE for i in logits indices maxValue Math max maxValue logits i val ans FloatArray logits size var sumExp f for i in ans indices ans i Math exp logits i maxValue toDouble toFloat sumExp ans i for i in ans indices ans i ans i sumExp return ans softmax provides us with the calculation of probabilities for each category while getMaxProbLabel determines the label with the highest probability In MainActivity class we trigger it to predict when the buttons we initiate are clicked private fun bindEvents identificationBtn setOnClickListener View OnClickListener if detector isReady Toast makeText this MainActivity Model not ready Toast LENGTH SHORT show else val inputData inputEdt text toString if TextUtils isEmpty inputData Toast makeText this MainActivity Please enter the text to be recognized Toast LENGTH SHORT show return OnClickListener getLabelResult inputData clearBtn setOnClickListener inputEdt setText labelTxt visibility View GONE When identificationBtn is clicked it returns us the result When clearBtn is clicked we ensure that the text is cleared private fun getLabelResult inputData String val start System currentTimeMillis detector predict inputData mlModelOutputs gt Log i hiai interpret get result val result mlModelOutputs getOutput lt Array lt FloatArray gt gt val probabilities detector softmax result val resultLabel detector getMaxProbLabel probabilities showResult resultLabel Toast makeText this MainActivity success Toast LENGTH SHORT show Log i hiai result resultLabel e gt e printStackTrace Log e hiai interpret failed because e message Toast makeText this MainActivity failed Toast LENGTH SHORT show Log i hiai time cost System currentTimeMillis start labelTxt visibility View VISIBLE getLabelResult returns the result by calling the prediction methods we wrote on the ModelDetector side Thats it App ResultFor full code GithubConclusionAs a result HMS ML Kit Custom Model ーText Classification enables us to integrate machine learning into our project to help developers quickly easily and at low cost Glad if it helped thanks for reading I ll be waiting for your comments and claps ReferencesTextClassificationHMS ToolkitAiCreatedeveloper huawei comGitHub HMS Core hms ml demo 2022-04-03 18:16:38
海外TECH DEV Community Router Security Settings: Wi-Fi and Access Password, WPS, MAC and IP Filtering, Remote Access https://dev.to/hetmansoftware/router-security-settings-wi-fi-and-access-password-wps-mac-and-ip-filtering-remote-access-8d7 Router Security Settings Wi Fi and Access Password WPS MAC and IP Filtering Remote AccessRead this article to learn more about Wi Fi security settings for your router How to secure a Wi Fi network from unauthorized access by strangers and set a password for accessing the Wi Fi network and the settings panel How to restrict access to your Wi Fi network by MAC or IP address filtering Many users neglect to configure their network security settings believing that their network is of no interest to anyone Why would an intruder try to access it Unfortunately this is a false assumption proper security settings can protect you from identity theft as well as from unintended damage caused by other users of your network Just out of curiosity hackers may change something in your settings which can leave you stranded offline That is why we recommend checking your security settings right now I will show you how to configure router security settings with the example of a popular model TP LINK WRN However almost all routers have similar functionality so this guide will be useful for other devices as well With the exception of some differences in the menu interface of course YouTube Modifying the Login and Password to Access Your RouterThe first thing to do is to change the default password protecting access to the router settings Such password will prevent strangers from gaining unauthorized access to your router So when you change the default password no one else will be able to connect to the Internet or modify network settings To make changes to the router s name and password connect to this device by Wi Fi or cable and open a browser to enter its network address The router s network address is given on a sticker which you can find on the bottom of the device Usually it looks like or tplinkwifi net or tplinklogin net etc In this window type the username and password by default they are admin and admin The default login and password can be found on the same sticker as before If you do everything right the screen will show you the settings menu Go to the tab System Tools and find the Password line You will have to give the previous username and password and then enter the new data and click Save That is all the password for accessing the router has been modified You have just completed the first goal on the way to configuring security settings Let s move on Setting a Password for Wi FiThe second important step is to set a password for accessing your Wi Fi network It will prevent strangers from connecting to this network Many people believe this option is unnecessary and so they leave their networks open to anyone However by connecting to your network other users can use torrent clients to download content or play online games which eats up the traffic and puts pressure on your router Talking of the router it can have various issues the connection speed will drop and the overall quality of Internet access will deteriorate To change the password go to the tab Wireless Look for the line Wireless Security If wireless security is disabled turn it on To do it choose one of the suggested options For standard situations the recommended option WPA WPA would be enough Type the desired password into the field Wireless Password Don t use simple passwords consisting of eight digits or or digits from to Think about a reliable password having both capital and lowercase letters digits and special symbols Write down the new password just in case you may forget it Read another article for a very detailed description of other Wi Fi settings Disabling the WPS FunctionThe third step is to disable the WPS function This function allows connecting to a wireless network quickly and without a password In real life it is rarely used and as it is too vulnerable to hackers I recommend disabling it To do it go to the WPS tab sometimes you can find it in the Wireless menu and select Disable WPS Hiding the Wireless Network NameHide your network from the eyes of strangers There is a special option in the router settings that allows you to hide your network When you turn it on other devices will no longer see your Wi Fi In order to connect they will have to give not only the password but also the network name SSID You can enable this function in the wireless network settings by unchecking the box next to Enable SSID Broadcast As you do it other devices won t be able to see it and from a Windows computer you will see a hidden network among other networks If you try connecting you will have to enter the network name SSID and then the password only if everything is right you will be able to connect From a smartphone this network is just invisible in order to connect you should go to W Fi settings and create a new network Give the network name SSID and password Filtering Devices by MAC AddressThe next stage is filtering the devices trying to connect by their MAC addresses MAC address is a unique identifier of a device as every gadget has its own MAC address In the router settings you can add MAC addresses of the devices which are allowed to connect to your network When this function is enabled only devices which are on this list can connect Alternatively you can list the devices for which access should be blocked This is a most efficient way to protect your router but it is only suitable for organizations with a specific number of users for a home network though you will have to connect new users by entering the router settings and adding their MAC addresses which is not too convenient To enable this option open Wireless MAC Filtering which you can find in the Wireless settings tab When you are there click Enable and check the box next to Deny the stations specified by any enabled entries in the list to access or Allow… then add MAC addresses of such devices To add them click on Add New Read the full article with all additional video tutorials Also visit our Youtube channel there are over video tutorials 2022-04-03 18:13:05
海外TECH DEV Community 3 Things You Should Try to Avoid in Vue.js https://dev.to/alexxiyang/3-things-you-should-try-to-avoid-in-vuejs-27b6 Things You Should Try to Avoid in Vue js Try not to write the inline script in the template if there are more than lines of codeVSCode cannot check any syntax error of the inline script in the template So try not to write the inline script in the template If you write the inline script in the template it s no different than writing code in Notepad There are drawbacks VS Code cannot check the syntax errorIf you are using Typescript VS Code can identify the syntax error for you You might think I d be able to spot those syntax errors but actually we don t For example in this code the inline script only has lines of code lt div click alert hello world doSomething gt The even handler isdoSomething event Event do something There is no errors in VS Code But when you run this code you will find that the event parameter is undefined If you extract the line move console log do something doSomething into a method letsDoSomething letsDoSomething console log do something this doSomething Then you will see there is an errorIt turns out that doSomething has a required parameter event The worse thing is this inline script seems to be working fine But the parameter event of doSomething arguments is undefined We create a defect in this way This example looks dumb But there similar cases I ve met at work Hard to debug the code in productionThe inline script will be compiled in line js code in production It s not able to debug this code If you put the code in a method computed of the component You can still be able to debug it even it s already minified If there is an error we can still debug this code It s not difficult to know what is the e or n variable based on the source code Imagine how convenient it will be if you can debug the code in production That really help me for several times So try to extract inline script code into component method computed it will help you eventually Try not to use watcherVue js documentation already suggest us not to use watcher Why Because watcher is an implicit dependency Implicit dependency brings the following problems Logic becomes more scattered and there is no explicit correlation between them It makes it difficult to understand the code This is especially difficult when troubleshooting When you update the feature you won t be able to notice that somewhere a logic has been broken Just because this logic is triggered by a watcher In addition to the problems brought by implicit dependencies watcher has other problems of his own The watcher won t be triggered when Vue js rendering the component as watch is lazy by default unless you use immediate true So if you expect some logic in a watcher will be called when v if turn to true you may be disappointed We did meet a defect caused by this The watcher cannot be paused Sometimes we don t want to disable the watcher we just want to pause it Unfortunately watcher doesn t provide the pause feature this comment mentioned that the only way to pause the watcher is doing a conditional check That s why I added a flag watcherEnabled to pause the filter and sort watchers in some scenarios But this flag also brought us some defects There are better approaches than watcher From child to parent Use custom eventsIf you need to trigger the method of the parent component You can use custom event Move method from child to parentIf the metod you want to trigger is in child method Instead of using refs it will be better to move the method to the parent component Then you can directly call it or use custom event From parent to child Use ref attributeIf the method you want to trigger cannot be moved to the parent Or you don t want to take the risk to refactor the task You can use ref attributeBut remember that using refs is not a good practice refs has its own problem as well The component refs is undefined when the component is rendering So if you use refs it in the template it might be undefined If you are using refs in the computed The computed might be broken For example there is a computed to get the child component scrollLeft attribute get childScollLeft return this refs child scrollLeft This computed won t work as you expect Because when the variable you want to watch in the computed is undefined at the beginning then this computed will not be reactive Not even after the refs loaded Use propsIf you want to update the child component UI You can use props From anywhere Use VuexIf you want to update the parent child sibling component UI You can use Vuex The only downside is that this may increase code complexity Try not to pass functions as propsPassing functions as props an anti pattern in Vue js There is a sentence in the article that is really good As the application grows larger in size and other developers come on board they will look at the child component code and have to figure out which callback function prop it is and where it is from That s the issue that I meet in muse v Sometimes I need to figure out where are those methods come fromimage pngI agree with it But this is not the main reason I don t recommend passing functions as props The main reason is when I read the code it takes some effort to get familiar with the context of this component If there is a function was passed as a prop then I need to be familiar with the context of another component If that were all it was it wouldn t be so bad The worse is I need to switch between different components contexts when reading the method I recommend using custom event instead of passing functions as props 2022-04-03 18:07:44
Apple AppleInsider - Frontpage News WhatsApp beta trials limits on forwarding messages to group chats https://appleinsider.com/articles/22/04/03/whatsapp-beta-trials-limits-on-forwarding-messages-to-group-chats?utm_medium=rss WhatsApp beta trials limits on forwarding messages to group chatsWhatsApp is seemingly introducing new limits to forwarding messages to other group chats in its iOS messaging app a change that could help cut down on the spread of misinformation Social media platforms are known to be a hotbed for the spread of spam and misinformation with it easily able to be shared with other users In what seems to be an attempt to curtail misinformation the Meta owned WhatsApp is starting to test out limits to how messages spread Previously seen in a beta for the Android app WABetaInfo reports the beta of WhatsApp for iOS now has a feature limiting how far a forwarded message can travel While users under the beta can forward a message to a group chat once that same message cannot be forwarded onto further group chats Read more 2022-04-03 18:30:36
海外TECH Engadget Twitter’s Android app may finally get tweet text selection https://www.engadget.com/twitter-android-tweet-text-selection-183525857.html?src=rss Twitter s Android app may finally get tweet text selectionTwitter s Android app has lagged behind its iOS counterpart for years but at least in one way the two clients could soon be on equal footing In a tweet spotted by Android Police Jane Manchun Wong who s known for reverse engineering apps to find new features before they re released said the company is working on allowing Android users to freely select text within tweets That s something Twitter s iOS client has allowed you to do for a while Huh Good I always assumed the lack was some kind of Dark Pattern to encourage the built in link sharingーDieter Bohn backlon April The discovery initially lead to some confusion among Android users as a handful of devices already allow you to do that For instance Google s Pixel phones come with a feature called Overview Selection that lets you select text from any screen for copying and pasting but as former XDA Developers editor and Android expert Mishaal Rahman points out that tool isn t available everywhere “Apart from Google Pixels I don t know if any other devices have it he said in response to a question from one developer who thought Twitter already supported text selection on Android We re reached out to Twitter to find out when the company plans to roll out the feature to Android users It s strange that it took Twitter so long to add something so simple but now that it s on its way Android users are sure to appreciate it 2022-04-03 18:35:25
海外科学 NYT > Science In Wisconsin: Stowing Mowers, Pleasing Bees https://www.nytimes.com/2022/03/28/travel/no-mow-may-wisconsin.html grass 2022-04-03 18:13:15
ニュース BBC News - Home Sacramento shooting: At least six dead in centre of California state capital https://www.bbc.co.uk/news/world-us-canada-60974119?at_medium=RSS&at_campaign=KARANGA capital 2022-04-03 18:45:41
ニュース BBC News - Home MP David Warburton admitted to hospital after sexual harassment claims https://www.bbc.co.uk/news/uk-60975624?at_medium=RSS&at_campaign=KARANGA david 2022-04-03 18:10:24
ニュース BBC News - Home Watch: Sportscene - Rangers v Celtic highlights https://www.bbc.co.uk/sport/av/football/60853444?at_medium=RSS&at_campaign=KARANGA sportscene 2022-04-03 18:13:05
ビジネス ダイヤモンド・オンライン - 新着記事 あるオリガルヒへの米制裁、「特例」で緩い訳 - WSJ PickUp https://diamond.jp/articles/-/300813 wsjpickup 2022-04-04 03:50:00
ビジネス ダイヤモンド・オンライン - 新着記事 ウクライナ危機で加速する原油価格の高騰、第3次オイルショック到来か? - 数字は語る https://diamond.jp/articles/-/300350 世界経済 2022-04-04 03:45:00
ビジネス ダイヤモンド・オンライン - 新着記事 あいおいニッセイ同和損保・新納社長に聞く、「新中計は『やろうぜ!』精神で突破する」 - ダイヤモンド保険ラボ https://diamond.jp/articles/-/300817 あいおいニッセイ同和損保・新納社長に聞く、「新中計は『やろうぜ』精神で突破する」ダイヤモンド保険ラボMSampADインシュアランスグループホールディングス傘下の、あいおいニッセイ同和損害保険で月日、取締役常務執行役員だった新納啓介にいろ・けいすけ氏が社長に就任した。 2022-04-04 03:40:00
ビジネス ダイヤモンド・オンライン - 新着記事 アクティビジョン株のインサイダー疑い、CEOと投資家の会合調査 - WSJ PickUp https://diamond.jp/articles/-/300814 wsjpickup 2022-04-04 03:35:00
ビジネス ダイヤモンド・オンライン - 新着記事 アジア諸国「コロナ共生」へ舵 感染高止まりも - WSJ PickUp https://diamond.jp/articles/-/300815 wsjpickup 2022-04-04 03:30:00
ビジネス ダイヤモンド・オンライン - 新着記事 ひろゆきが明かす、超コスパいい「すぐ寝る勉強法」その中身とは? - 1%の努力 https://diamond.jp/articles/-/300405 youtube 2022-04-04 03:25:00
ビジネス ダイヤモンド・オンライン - 新着記事 超天才起業家が「赤ちゃんになりたい」と熱弁する理由 - 起業家の思考法 https://diamond.jp/articles/-/300463 2022-04-04 03:20:00
ビジネス ダイヤモンド・オンライン - 新着記事 「年収600万円」から「年収800万円」への転職は本当に喜ぶべきか? - 東大金融研究会のお金超講義 https://diamond.jp/articles/-/300827 「年収万円」から「年収万円」への転職は本当に喜ぶべきか東大金融研究会のお金超講義年月に発足した東大金融研究会。 2022-04-04 03:15:00
ビジネス ダイヤモンド・オンライン - 新着記事 【全世界700万人が感動したプログラミングノートで学ぶ】データのエンコードとは - アメリカの中学生が学んでいる14歳からのプログラミング https://diamond.jp/articles/-/300772 【全世界万人が感動したプログラミングノートで学ぶ】データのエンコードとはアメリカの中学生が学んでいる歳からのプログラミング年の発売直後から大きな話題を呼び、中国・ドイツ・韓国・ブラジル・ロシア・ベトナムなど世界各国にも広がった「学び直し本」の圧倒的ロングセラーシリーズ「BigFatNotebook」の日本版が刊行された。 2022-04-04 03:10:00
ビジネス ダイヤモンド・オンライン - 新着記事 2分でわかる!「ベラルーシはどんな国?」ヨーロッパ最後の独裁国家 - 読むだけで世界地図が頭に入る本 https://diamond.jp/articles/-/299652 2022-04-04 03: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件)