投稿時間:2023-07-23 23:17:49 RSSフィード2023-07-23 23:00 分まとめ(21件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… M3 Pro/M3 Max搭載「MacBook Pro 14/16インチ」は来年半ばまで、M3搭載「Mac mini」は来年後半に登場か https://taisy0.com/2023/07/23/174383.html bloomberg 2023-07-23 13:20:22
python Pythonタグが付けられた新着投稿 - Qiita 【Flet】Fletで簡単なWEBアプリケーションのレイアウトを作成 https://qiita.com/oriefield/items/473049ca2cbc05ce4c6a 記事 2023-07-23 22:58:31
python Pythonタグが付けられた新着投稿 - Qiita 画像をURLからダウンロードして、gzipで圧縮し、base85でエンコードして軽量化したのち、復元してnp.arraybufferで読み込んで表示 https://qiita.com/nokonoko_1203/items/cad7328d9d368cbb832f ortrequestsfrompilimporti 2023-07-23 22:35:31
python Pythonタグが付けられた新着投稿 - Qiita Pyhon 辞書(dict)のループ処理(for)をするときのメソッド(keys(),values(),items())の使用例 https://qiita.com/Y-RIN/items/c8d76b51e6668f09f7d9 keysvaluesitems 2023-07-23 22:10:22
Ruby Rubyタグが付けられた新着投稿 - Qiita いいコード悪いコードまとめ16章設計を妨げる開発プロセスとの戦い https://qiita.com/YokoYokoko/items/a8443933859cd4e3af51 開発プロセス 2023-07-23 22:30:48
AWS AWSタグが付けられた新着投稿 - Qiita Webエンジニアが必要なAWSの主要サービス35選 https://qiita.com/Hashimoto-Noriaki/items/684eab7de9b43f01cd0b 資料 2023-07-23 22:52:10
AWS AWSタグが付けられた新着投稿 - Qiita 東京リージョンにやってきた MySQL HeatWave on AWS を試す (2) サンプルクエリ実行編 https://qiita.com/hmatsu47/items/0979f877ad596cf3cf67 mysqlheatwaveonaws 2023-07-23 22:37:10
技術ブログ Developers.IO Alteryx Inspire On Tour Tokyoが開催されました #Alteryx https://dev.classmethod.jp/articles/alteryx-inspire-on-tour-tokyo-20230720/ alteryx 2023-07-23 13:18:00
海外TECH MakeUseOf How to See Your Tesla Safety Score https://www.makeuseof.com/see-tesla-safety-score/ tesla 2023-07-23 13:16:22
海外TECH MakeUseOf What Is an NFT Floor Price? https://www.makeuseof.com/what-is-nft-floor-price/ floor 2023-07-23 13:00:24
海外TECH MakeUseOf What Is a Use-After-Free (UAF) Vulnerability? https://www.makeuseof.com/what-is-use-after-free-uaf-vulnerability/ specific 2023-07-23 13:00:24
海外TECH DEV Community Migration to .NET Core. Mission Complete https://dev.to/elanatframework/migration-to-net-core-mission-complete-2bc5 Migration to NET Core Mission CompleteBy using Code Behind Elanat managed to migrate from NET standard version to NET Core version in a very short time Elanat is the largest NET system that migrates from NET Standard to NET Core It is interesting to know that the duration of Elanat s migration from NET Standard Version to NET Core was completed in less than weeks and this is an extraordinary record and a unique success for Elanat We maintain the Elanat source repository of the standard NET version so that its comparison with the Elanat source repository of the NET Core version is an important resource for computer systems researchers In addition to the advantages that NET Core has over standard NET such as cross platform what benefits did the transition to NET Core bring to Elanat The complexity of the add on oriented structure was reducedComplete control over requests and the possibility of changing incoming requests from the client sideIncreased server side independenceThe system became more agile and fasterWe went through a lot of pains to create a add on oriented structure at Elanat But by using the Code Behind infrastructure we left all the complications to bypass the loop which existed in standard NET Fortunately all the data remained unchanged and the source code of the server side also had minor changesFor example the App Data directory remains as a relic of the NET standardChanges Ionic Zip dll was removedZipFileConnector dll was removedPathHandlersLoader aspx was removedPageHandlersLoader aspx was removedAdded a ListItem classWe created some methods that were in standard NET but not in NET using Extension methods and the codes remained intact Example of SaveAs method on IFormFile public static void SaveAs this IFormFile PostedFile string FilePath using Stream TmpFileStream new FileStream FilePath FileMode Create FileAccess ReadWrite PostedFile CopyTo TmpFileStream Code Behind creates the least load on the server and setting the IgnoreViewAndModel attribute to false makes even the Model and View not be called Currently Elanat is fully implemented on NET Core version and is undergoing software testing In August a new version ready to be installed and the source code of Elanat will be provided The codes below show the differences between model view and controller in Elanat NET standard version and Elanat NET Core version These are login page codes and they are a bit long and are provided for computer system researchers and programming lovers Controller in NET Standardusing System using System Collections Generic namespace elanat public partial class SiteLogin System Web UI Page public SiteLoginModel model new SiteLoginModel protected void Page Load object sender EventArgs e Login Redirect CurrentClientObjectClass ccoc new CurrentClientObjectClass if ccoc RoleDominantType member Response Redirect StaticObject SitePath page content member if ccoc RoleDominantType admin Response Redirect StaticObject AdminPath Set Login Delay int LoginDelay int Parse ElanatConfig GetNode delay login Attributes value Value System Threading Thread Sleep LoginDelay if string IsNullOrEmpty Request Form btn Login btn Login Click sender e if string IsNullOrEmpty Request QueryString el return url model ReturnUrlValue Request QueryString el return url model SetValue protected void btn Login Click object sender EventArgs e model UserNameOrUserEmailValue Request Form txt UserNameOrUserEmail model PasswordValue Request Form txt Password model CaptchaTextValue Request Form txt Captcha model LanguageOptionSelectedListValue Request Form ddlst Language model SecretKeyValue Request Form txt SecretKey model ReturnUrlValue Request Form hdn ReturnUrl if model CaptchaTextValue MatchByCaptcha model CaptchaIncorrectErrorView return CurrentClientObjectClass ccoc new CurrentClientObjectClass Set User Admin Language DataUse Language dul new DataUse Language string CurrentLanguageId model LanguageOptionSelectedListValue dul FillCurrentLanguage CurrentLanguageId ccoc AdminLanguageId dul LanguageId ccoc AdminLanguageGlobalName dul LanguageGlobalName ccoc AdminLanguageIsRightToLeft dul LanguageIsRightToLeft if string IsNullOrEmpty model UserNameOrUserEmailValue string IsNullOrEmpty model PasswordValue ResponseForm WriteLocalAlone Language GetAddOnsLanguage you should fill all options StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem Check Secret Key if ElanatConfig GetNode security use secret key for login Attributes active Value true if model SecretKeyValue Security GetCodeIni secret key ResponseForm WriteLocalAlone Language GetAddOnsLanguage you should fill secret key StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem if Security LoginActiveCheck ResponseForm WriteLocalAlone Language GetAddOnsLanguage login is inactive StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem Security se new Security DataBaseSocket db new DataBaseSocket DataBaseDataReader dbdr new DataBaseDataReader dbdr dr db GetProcedure user login check new List lt string gt user name or user email password new List lt string gt model UserNameOrUserEmailValue ToLower se GetHash model PasswordValue if dbdr dr null dbdr dr HasRows db Close ResponseForm WriteLocalAlone Language GetAddOnsLanguage the information you entered is incorrect StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem dbdr dr Read string UserId dbdr dr user id ToString db Close DataUse User duu new DataUse User duu FillCurrentUser UserId if string IsNullOrEmpty duu UserId ResponseForm WriteLocalAlone Language GetAddOnsLanguage user is not existed StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem if duu UserActive ZeroOneToBoolean ResponseForm WriteLocalAlone Language GetAddOnsLanguage user is inactive StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem DataUse Group dug new DataUse Group if dug GroupActiveCheck duu GroupId ResponseForm WriteLocalAlone Language GetAddOnsLanguage your group is inactive StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem DataUse Role dur new DataUse Role if dur RoleActiveCheckByGroupId duu GroupId ResponseForm WriteLocalAlone Language GetAddOnsLanguage your role is inactive StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem if ElanatConfig GetNode security registered user after accept active email Attributes active Value true If Email Is Not Confirmed if duu UserEmailIsConfirm ZeroOneToBoolean ResponseForm WriteLocalAlone Language GetAddOnsLanguage user email is not confirm StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem model Login UserId model SuccessView Controller in NET Coreusing CodeBehind namespace Elanat public partial class SiteLoginController CodeBehindController public SiteLoginModel model new SiteLoginModel public void PageLoad HttpContext context Login Redirect CurrentClientObjectClass ccoc new CurrentClientObjectClass if ccoc RoleDominantType member context Response Redirect StaticObject SitePath page content member if ccoc RoleDominantType admin context Response Redirect StaticObject AdminPath Set Login Delay int LoginDelay int Parse ElanatConfig GetNode delay login Attributes value Value Thread Sleep LoginDelay if string IsNullOrEmpty context Request Form btn Login btn Login Click context return if string IsNullOrEmpty context Request Query el return url model ReturnUrlValue context Request Query el return url model SetValue View model protected void btn Login Click HttpContext context model UserNameOrUserEmailValue context Request Form txt UserNameOrUserEmail model PasswordValue context Request Form txt Password model CaptchaTextValue context Request Form txt Captcha model LanguageOptionSelectedListValue context Request Form ddlst Language model SecretKeyValue context Request Form txt SecretKey model ReturnUrlValue context Request Form hdn ReturnUrl if model CaptchaTextValue MatchByCaptcha Write model CaptchaIncorrectErrorView IgnoreViewAndModel true return CurrentClientObjectClass ccoc new CurrentClientObjectClass Set User Admin Language DataUse Language dul new DataUse Language string CurrentLanguageId model LanguageOptionSelectedListValue dul FillCurrentLanguage CurrentLanguageId ccoc AdminLanguageId dul LanguageId ccoc AdminLanguageGlobalName dul LanguageGlobalName ccoc AdminLanguageIsRightToLeft dul LanguageIsRightToLeft if string IsNullOrEmpty model UserNameOrUserEmailValue string IsNullOrEmpty model PasswordValue Write GlobalClass Alert Language GetAddOnsLanguage you should fill all options StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem IgnoreViewAndModel true return Check Secret Key if ElanatConfig GetNode security use secret key for login Attributes active Value true if model SecretKeyValue Security GetCodeIni secret key Write GlobalClass Alert Language GetAddOnsLanguage you should fill secret key StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem IgnoreViewAndModel true return if Security LoginActiveCheck Write GlobalClass Alert Language GetAddOnsLanguage login is inactive StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem IgnoreViewAndModel true return Security se new Security DataBaseSocket db new DataBaseSocket DataBaseDataReader dbdr new DataBaseDataReader dbdr dr db GetProcedure user login check new List lt string gt user name or user email password new List lt string gt model UserNameOrUserEmailValue ToLower se GetHash model PasswordValue if dbdr dr null dbdr dr HasRows db Close Write GlobalClass Alert Language GetAddOnsLanguage the information you entered is incorrect StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem IgnoreViewAndModel true return dbdr dr Read string UserId dbdr dr user id ToString db Close DataUse User duu new DataUse User duu FillCurrentUser UserId if string IsNullOrEmpty duu UserId Write GlobalClass Alert Language GetAddOnsLanguage user is not existed StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem IgnoreViewAndModel true return if duu UserActive ZeroOneToBoolean Write GlobalClass Alert Language GetAddOnsLanguage user is inactive StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem IgnoreViewAndModel true return DataUse Group dug new DataUse Group if dug GroupActiveCheck duu GroupId Write GlobalClass Alert Language GetAddOnsLanguage your group is inactive StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem IgnoreViewAndModel true return DataUse Role dur new DataUse Role if dur RoleActiveCheckByGroupId duu GroupId Write GlobalClass Alert Language GetAddOnsLanguage your role is inactive StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem IgnoreViewAndModel true return if ElanatConfig GetNode security registered user after accept active email Attributes active Value true If Email Is Not Confirmed if duu UserEmailIsConfirm ZeroOneToBoolean Write GlobalClass Alert Language GetAddOnsLanguage user email is not confirm StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem IgnoreViewAndModel true return model Login UserId model SuccessView View model Model in NET Standardusing System Web namespace elanat public class SiteLoginModel public string LoginLanguage get set public string LoginToSiteLanguage get set public string UserNameOrUserEmailLanguage get set public string PasswordLanguage get set public string SecretKeyLanguage get set public string LanguageLanguage get set public string ForgetPasswordLanguage get set public string ConfirmEmailLanguage get set public string SignUpLanguage get set public string UserNameOrUserEmailValue get set public string PasswordValue get set public string CaptchaTextValue get set public string LanguageOptionListValue get set public string LanguageOptionSelectedListValue get set public string SecretKeyValue get set public string ReturnUrlValue get set public string SecretKeyCssClass get set public void SetValue Set Language AddOnsLanguage aol new AddOnsLanguage StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login LoginLanguage aol GetAddOnsLanguage login LoginToSiteLanguage aol GetAddOnsLanguage login to site LanguageLanguage aol GetAddOnsLanguage language PasswordLanguage aol GetAddOnsLanguage password UserNameOrUserEmailLanguage aol GetAddOnsLanguage user name or user email SignUpLanguage aol GetAddOnsLanguage sign up ForgetPasswordLanguage aol GetAddOnsLanguage forget password ConfirmEmailLanguage aol GetAddOnsLanguage confirm email Check Secret Key if ElanatConfig GetNode security use secret key for login Attributes active Value true SecretKeyLanguage aol GetAddOnsLanguage secret key else SecretKeyCssClass SecretKeyCssClass AddHtmlClass el hidden string TmpCurrentSiteLanguageId string IsNullOrEmpty LanguageOptionSelectedListValue StaticObject GetCurrentSiteLanguageId LanguageOptionSelectedListValue Set Language Item ListClass lc new ListClass lc FillActiveLanguageListItem StaticObject GetCurrentSiteGlobalLanguage LanguageOptionListValue lc ActiveLanguageListItem HtmlInputToOptionTag TmpCurrentSiteLanguageId public void Login string UserId CurrentClientObjectClass ccoc new CurrentClientObjectClass Set Current Client Object ccoc FillUserClientSetting UserId false Increase Visit Statistics if StaticObject RoleSubmitVisitCheck DataUse VisitStatistics duvs new DataUse VisitStatistics duvs IncreaseVisit DataUse User duu new DataUse User duu SetUserLastLogin UserId StaticObject OnlineUser Set Secure Value Security sc new Security sc SetUserLogin UserId Add Reference ReferenceClass rc new ReferenceClass rc StartEvent login UserId public void CaptchaIncorrectErrorView ResponseForm WriteLocalAlone Language GetAddOnsLanguage the captcha you entered is incorrect StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem public void SuccessView if string IsNullOrEmpty ReturnUrlValue ReturnUrlValue amp el return url ReturnUrlValue HttpContext Current Response Redirect StaticObject SitePath page login action SuccessMessage aspx use retrieved true ReturnUrlValue false Model in NET Coreusing CodeBehind namespace Elanat public partial class SiteLoginModel CodeBehindModel public string LoginLanguage get set public string LoginToSiteLanguage get set public string UserNameOrUserEmailLanguage get set public string PasswordLanguage get set public string SecretKeyLanguage get set public string LanguageLanguage get set public string ForgetPasswordLanguage get set public string ConfirmEmailLanguage get set public string SignUpLanguage get set public string UserNameOrUserEmailValue get set public string PasswordValue get set public string CaptchaTextValue get set public string LanguageOptionListValue get set public string LanguageOptionSelectedListValue get set public string SecretKeyValue get set public string ReturnUrlValue get set public string SecretKeyCssClass get set public void SetValue Set Language AddOnsLanguage aol new AddOnsLanguage StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login LoginLanguage aol GetAddOnsLanguage login LoginToSiteLanguage aol GetAddOnsLanguage login to site LanguageLanguage aol GetAddOnsLanguage language PasswordLanguage aol GetAddOnsLanguage password UserNameOrUserEmailLanguage aol GetAddOnsLanguage user name or user email SignUpLanguage aol GetAddOnsLanguage sign up ForgetPasswordLanguage aol GetAddOnsLanguage forget password ConfirmEmailLanguage aol GetAddOnsLanguage confirm email Check Secret Key if ElanatConfig GetNode security use secret key for login Attributes active Value true SecretKeyLanguage aol GetAddOnsLanguage secret key else SecretKeyCssClass SecretKeyCssClass AddHtmlClass el hidden string TmpCurrentSiteLanguageId string IsNullOrEmpty LanguageOptionSelectedListValue StaticObject GetCurrentSiteLanguageId LanguageOptionSelectedListValue Set Language Item ListClass lc new ListClass lc FillActiveLanguageListItem StaticObject GetCurrentSiteGlobalLanguage LanguageOptionListValue lc ActiveLanguageListItem HtmlInputToOptionTag TmpCurrentSiteLanguageId public void Login string UserId CurrentClientObjectClass ccoc new CurrentClientObjectClass Set Current Client Object ccoc FillUserClientSetting UserId false Increase Visit Statistics if StaticObject RoleSubmitVisitCheck DataUse VisitStatistics duvs new DataUse VisitStatistics duvs IncreaseVisit DataUse User duu new DataUse User duu SetUserLastLogin UserId StaticObject OnlineUser Set Secure Value Security sc new Security sc SetUserLogin Add Reference ReferenceClass rc new ReferenceClass rc StartEvent login UserId public string CaptchaIncorrectErrorView return GlobalClass Alert Language GetAddOnsLanguage the captcha you entered is incorrect StaticObject GetCurrentSiteGlobalLanguage StaticObject SitePath page login problem public void SuccessView if string IsNullOrEmpty ReturnUrlValue ReturnUrlValue amp el return url ReturnUrlValue new HttpContextAccessor HttpContext Response Redirect StaticObject SitePath page login action SuccessMessage aspx use retrieved true ReturnUrlValue false View in NET Standard lt Page Language C AutoEventWireup true CodeBehind Default aspx cs Inherits elanat SiteLogin gt lt DOCTYPE html gt lt html xmlns dir lt elanat AspxHtmlValue CurrentSiteLanguageDirection gt gt lt head gt lt title gt lt model LoginLanguage gt lt title gt lt meta name viewport content width device width initial scale gt lt link rel shortcut icon href lt elanat AspxHtmlValue SitePath gt page login favicon ico gt lt Start Client Variant gt lt elanat AspxHtmlValue CurrentSiteClientVariant gt lt End Client Variant gt lt script src lt elanat AspxHtmlValue SitePath gt client script global js gt lt script gt lt script type text javascript src lt elanat AspxHtmlValue SitePath gt client script site site js gt lt script gt lt elanat AspxHtmlValue CurrentSiteStyleTag gt lt link rel stylesheet type text css href lt elanat AspxHtmlValue SitePath gt client style global css gt lt link rel stylesheet type text css href lt elanat AspxHtmlValue SitePath gt client style site global css gt lt head gt lt body onload el PartPageLoad el LoadCaptcha gt lt div class el page center gt lt div class el head gt lt model LoginLanguage gt lt div gt lt form id frm SiteLogin method post action lt elanat AspxHtmlValue SitePath gt page login Default aspx defaultbutton btn Login gt lt div class el part row gt lt div id div LoginTitle class el title onclick el HidePart this el SetIframeAutoHeight gt lt model LoginToSiteLanguage gt lt div class el dash gt lt div gt lt div gt lt div class el item gt lt model UserNameOrUserEmailLanguage gt lt div gt lt div class el item gt lt input id txt UserNameOrUserEmail name txt UserNameOrUserEmail type text value lt model UserNameOrUserEmailValue gt class el text input el important field gt lt div gt lt div class el item gt lt model PasswordLanguage gt lt div gt lt div class el item gt lt input id txt Password name txt Password type password class el text input el important field gt lt div gt lt div id pnl SecretKey gt lt div class el item gt lt model SecretKeyLanguage gt lt div gt lt div class el item gt lt input id txt SecretKey name txt SecretKey type password autocomplete off readonly true onfocus this removeAttribute readonly class el text input lt model SecretKeyCssClass gt gt lt div gt lt div gt lt div class el item gt lt div class el captcha value gt lt div gt lt div gt lt div class el item gt lt model LanguageLanguage gt lt div gt lt div class el item gt lt select id ddlst Language name ddlst Language class el alone select input gt lt model LanguageOptionListValue gt lt select gt lt input id btn Login name btn Login type submit class el button input value lt model LoginLanguage gt onclick el AjaxPostBack this true gt lt div gt lt div gt lt div class el part row gt lt div class el item gt lt a href lt elanat AspxHtmlValue SitePath gt page content forget password gt lt model ForgetPasswordLanguage gt lt a gt lt div gt lt div class el item gt lt a href lt elanat AspxHtmlValue SitePath gt page content confirm email gt lt model ConfirmEmailLanguage gt lt a gt lt div gt lt div class el item gt lt a href lt elanat AspxHtmlValue SitePath gt page content sign up gt lt model SignUpLanguage gt lt a gt lt div gt lt div gt lt input id hdn ReturnUrl name hdn ReturnUrl type hidden value lt model ReturnUrlValue gt gt lt form gt lt div gt lt body gt lt html gt View in NET Core lt Page Controller Elanat SiteLoginController Model Elanat SiteLoginModel gt lt DOCTYPE html gt lt html xmlns dir lt Elanat AspxHtmlValue CurrentSiteLanguageDirection gt gt lt head gt lt title gt lt model LoginLanguage gt lt title gt lt meta name viewport content width device width initial scale gt lt link rel shortcut icon href lt Elanat AspxHtmlValue SitePath gt page login favicon ico gt lt Start Client Variant gt lt Elanat AspxHtmlValue CurrentSiteClientVariant gt lt End Client Variant gt lt script src lt Elanat AspxHtmlValue SitePath gt client script global js gt lt script gt lt script type text javascript src lt Elanat AspxHtmlValue SitePath gt client script site site js gt lt script gt lt Elanat AspxHtmlValue CurrentSiteStyleTag gt lt link rel stylesheet type text css href lt Elanat AspxHtmlValue SitePath gt client style global css gt lt link rel stylesheet type text css href lt Elanat AspxHtmlValue SitePath gt client style site global css gt lt head gt lt body onload el PartPageLoad el LoadCaptcha gt lt div class el page center gt lt div class el head gt lt model LoginLanguage gt lt div gt lt form id frm SiteLogin method post action lt Elanat AspxHtmlValue SitePath gt page login Default aspx defaultbutton btn Login gt lt div class el part row gt lt div id div LoginTitle class el title onclick el HidePart this el SetIframeAutoHeight gt lt model LoginToSiteLanguage gt lt div class el dash gt lt div gt lt div gt lt div class el item gt lt model UserNameOrUserEmailLanguage gt lt div gt lt div class el item gt lt input id txt UserNameOrUserEmail name txt UserNameOrUserEmail type text value lt model UserNameOrUserEmailValue gt class el text input el important field gt lt div gt lt div class el item gt lt model PasswordLanguage gt lt div gt lt div class el item gt lt input id txt Password name txt Password type password class el text input el important field gt lt div gt lt div id pnl SecretKey gt lt div class el item gt lt model SecretKeyLanguage gt lt div gt lt div class el item gt lt input id txt SecretKey name txt SecretKey type password autocomplete off readonly true onfocus this removeAttribute readonly class el text input lt model SecretKeyCssClass gt gt lt div gt lt div gt lt div class el item gt lt div class el captcha value gt lt div gt lt div gt lt div class el item gt lt model LanguageLanguage gt lt div gt lt div class el item gt lt select id ddlst Language name ddlst Language class el alone select input gt lt model LanguageOptionListValue gt lt select gt lt input id btn Login name btn Login type submit class el button input value lt model LoginLanguage gt onclick el AjaxPostBack this true gt lt div gt lt div gt lt div class el part row gt lt div class el item gt lt a href lt Elanat AspxHtmlValue SitePath gt page content forget password gt lt model ForgetPasswordLanguage gt lt a gt lt div gt lt div class el item gt lt a href lt Elanat AspxHtmlValue SitePath gt page content confirm email gt lt model ConfirmEmailLanguage gt lt a gt lt div gt lt div class el item gt lt a href lt Elanat AspxHtmlValue SitePath gt page content sign up gt lt model SignUpLanguage gt lt a gt lt div gt lt div gt lt input id hdn ReturnUrl name hdn ReturnUrl type hidden value lt model ReturnUrlValue gt gt lt form gt lt div gt lt body gt lt html gt 2023-07-23 13:46:38
海外TECH DEV Community GitLab Dev Deletes Entire Production Database https://dev.to/kanani_nirav/gitlab-dev-deletes-entire-production-database-59bb GitLab Dev Deletes Entire Production DatabaseIn this article we ll look at how a developer s mistake caused GitLab to lose six hours of data from their website we ll see what happened at that time how they fixed it and what they learned from it For GitLab and its users this issue was terrible deGitLab is one of the most popular platforms But on January GitLab had a big problem one of their developers accidentally erased the whole production database wiping out six hours worth of data from GitLab com which was one of GitLab s greatest nightmares The Problem Too Much DataThe problem started around pm UTC when GitLab saw that some bad people were making a lot of snippets small pieces of code on GitLab com making the database very busy and unstable GitLab started blocking the bad people by their IP address and deleting their users and snippets Around pm UTC the database got worse making it hard to write anything and making the website go down GitLab saw that one user was using a project as a CDN making IPs sign in with the same account This made the database very busy too They deleted this user as well Around pm UTC GitLab got an alert because the database was not copying itself to another database which is important for backup This happened because there was too much data to copy and the other database could not keep up GitLab tried to fix the other database by deleting its data folder and starting the copy again Mistake Wrong CommandBut the copy did not work giving some errors GitLab tried to change some settings on the main database but this made PostgreSQL not start because of too many things open Around pm UTC one of the developers team member thought that maybe the copy was not working because the data folder was there even though it was empty on the other database He decided to delete the folder using rm rf var opt gitlab postgresql data But he made a big mistake he ran the command on the main database instead of the other one This deleted all the data from the website database leaving GitLab com with no data at all The Solution Use an Old BackupAs soon as team member knew what he did he told his team member and stopped everything on GitLab com They started looking for backups to get the data back They found out that they had some backup methods but none of them worked well The disk snapshots were not turned onThe S backups were not foundThe DB dumps were oldThe copy process was brokenThe only backup that worked was one that team member made by hand six hours before the problem This backup had most of the data from GitLab com but not things like issues merge requests users comments snippets etc that people made or changed in those six hours GitLab decided to use this backup to make GitLab com work again as soon as possible They also asked their users to help them get back any lost data by sending them pictures or copies of their recent work The backup process took a long time and had many steps Putting the backup on a new database serverMaking GitLab use the new database serverChecking and fixing the backup dataStarting GitLab services and testing if everything worksTalking to users and telling them what s going onGitLab com was finally working again around pm UTC on February st more than hours after the problem started The Lesson Learn from MistakesGitLab looked at the problem very carefully and wrote a blog post about it They found out why the problem happened and what made it worse such as Human error team member deleted the wrong folderLack of verification none of the backup methods were tested or watchedLack of documentation there was no clear way to use the backupsLack of communication there was no good way to talk and work togetherLack of sleep team member was working late at night and was tiredThey also made a list of things to do and make better to stop such problems from happening again such as Turning on disk snapshots and checking S backupsMaking backup documents and testing ways betterMaking alerts and watching for backup problemsMaking role based access control and audit logging for database serversTeaching and helping with PostgreSQL copyMaking a blameless culture and a way to learn from mistakesGitLab s problem was very bad for them and their users It showed that they needed to have good and tested backups and a clear and written way to use them GitLab was open and honest about the problem and they shared what they found and learned with everyone They also said sorry to their users and gave them something for the data loss They got a lot of feedback and support from their community who liked their openness and work ConclusionGitLab messed up and lost data but they fixed it and learned from it GitLab s problem is a reminder for all of us who work with data and databases to be careful smart and ready We should always check our commands test our backups write our ways talk with team members and learn from our mistakes ReferenceDev Deletes Entire Production Database ーYouTubeGitLab com database incidentPostmortem of database outage of January If You are using Medium Please support and follow me for interesting articles Medium ProfileStay updated with my latest and most interesting articles by following me If this guide has been helpful to you and your team please share it with others 2023-07-23 13:33:36
海外TECH DEV Community Unlocking the Power of PyScript: A Guide to Running Python Code in Your HTML https://dev.to/scofieldidehen/unlocking-the-power-of-pyscript-a-guide-to-running-python-code-in-your-html-2376 Unlocking the Power of PyScript A Guide to Running Python Code in Your HTMLAre you looking for a way to add more interactivity and functionality to your websites Do you want to incorporate machine learning or data analysis capabilities without relying on external APIs or libraries Look no further than PyScript a revolutionary tool that allows you to run Python code directly in your HTML files In this guide we will explore the basics of PyScript showcase some of its powerful features and provide tips and best practices for using it effectively in your web development projects Common Use Cases for PyScript in Web DevelopmentPyScript s versatility and capabilities make it a valuable asset for an array of web development projects Here are some of the common use cases where PyScript excels Data Analysis and VisualizationPyScript enables developers to seamlessly integrate Python s data analysis and visualization libraries into web applications such as NumPy and Matplotlib This empowers developers to present data driven insights visually engaging and interactively Machine Learning ApplicationsWith the increasing prominence of machine learning PyScript offers a powerful platform for integrating Python based machine learning models into web applications Developers can provide real time predictions and personalized experiences to users Interactive Games and SimulationsPython s simplicity and readability make it an attractive choice for game development PyScript allows developers to create interactive games and simulations elevating user engagement and entertainment on web pages Server Side ProcessingPyScript can also be leveraged for server side processing where Python code runs on the server to handle complex tasks and data manipulation This optimizes the performance of web applications and enhances user experiences Getting Started with PyScriptBefore we dive into the nitty gritty details of PyScript let s first cover how to get started with it Installing PyScript is relatively straightforward and there are several methods to do so Using npm Open your terminal and run the following command npm install pyscript This will download and install PyScript globally on your system Using yarn Run the following command in your terminal yarn global add pyscript This will also download and install PyScript globally on your system Manual installation Download the PyScript package from the official GitHub repository and follow the manual installation instructions provided there Once you have installed PyScript you can start using it in your web development projects by simply adding the lt script gt tag to your HTML file along with the PyScript library xml   lt title gt My Website lt title gt    lt script src dist pyscript min js gt lt script gt lt head gt Understanding PyScript BasicsNow that we have covered how to get started with PyScript let s closely examine its core concepts and how they work together At its heart PyScript is a JavaScript library that bridges Python and JavaScript allowing developers to call Python functions and modules directly within their web pages Here are some key points to understand about PyScript Python scripts These are the actual Python files that contain the logic and functionality you want to execute on your web page You can write these scripts using any text editor including any valid Python code including imports functions and classes JavaScript integration Once you have written your Python script you must integrate it into your HTML file using JavaScript This involves creating a lt script gt tag that references the PyScript library and includes your Python script as a string Calling Python functions To call your Python functions from within your web page you need to use the py Script object and specify the name of your function For example suppose you have a Python function named add numbers that takes two arguments and returns their sum To call this function from JavaScript you would use the py object as follows xml lt DOCTYPE html gt lt html gt lt head gt    lt title gt PyScript Example lt title gt lt head gt lt body gt    lt Include the PyScript library gt    lt script src pyscript js gt lt script gt    lt script gt      Call the Python function using PyScript    var result py add numbers     console log result This will print the sum to the browser console   lt script gt lt body gt lt html gt In this example the py object bridges JavaScript and Python allowing you to call Python functions from within your JavaScript code The add numbers function is called with arguments and and the function call result is stored in the variable result Handling return values When you call a Python function from JavaScript you can handle the return values like any other JavaScript function call You can assign the result to a variable or use it directly in your JavaScript code Data exchange PyScript enables data exchange between Python and JavaScript You can pass data from JavaScript to Python functions as arguments and receive data from Python functions back into JavaScript as return values Error handling When calling Python functions from JavaScript it s essential to handle potential errors gracefully If an error occurs in the Python code it will be caught by PyScript and you can handle it using try catch blocks in JavaScript Python module support Besides calling Python functions directly PyScript also allows you to import and use Python modules in your web pages This lets you leverage existing Python libraries and functionality within your JavaScript code It s important to note that PyScript requires both Python and JavaScript environments to be set up properly The Python environment should have installed the required libraries and modules and the PyScript library should be properly referenced in your HTML file Overall PyScript provides a powerful way to combine the strengths of both Python and JavaScript in web development allowing developers to leverage Python s rich ecosystem and JavaScript s versatility for building interactive and dynamic web applications Getting Started with PyScriptTo demonstrate using PyScript in a real life project let s consider a simple web application that performs sentiment analysis on user provided text using a pre trained Python machine learning model We will integrate PyScript into the project to handle the sentiment analysis tasks on the client side sending the text data to Python for analysis and displaying the results back to the user We ll use Flask as the Python web framework for server side implementation for this example Prerequisites Install Flask and PyScript Download a pre trained sentiment analysis model e g using libraries like nltk or scikit learn Project Structure sentiment analysis app   static     pyscript js  templates     index html  app py  sentiment model pysentiment model py sentiment model py Assuming you have a pre trained sentiment analysis modeldef analyze sentiment text     Your code to analyze sentiment using the model    Return the sentiment positive negative neutral as a string    return positive   Replace this with the actual sentiment resulttemplates index html templates index html amp gt amp lt DOCTYPE html amp gt amp lt html amp gt amp lt head amp gt amp lt title amp gt Sentiment Analysis App amp lt title amp gt amp lt head amp gt amp lt body amp gt amp lt h amp gt Sentiment Analysis App amp lt h amp gt amp lt textarea id text input rows cols placeholder Enter text for sentiment analysis amp gt amp lt textarea amp gt amp lt button onclick analyzeSentiment amp gt Analyze amp lt button amp gt amp lt p id result amp gt amp lt p amp gt amp lt script src url for static filename pyscript js amp gt amp lt script amp gt amp lt script amp gt function analyzeSentiment var text document getElementById text input value Call the Python function using PyScript py analyze sentiment text then function result document getElementById result innerText Sentiment result catch function error console error Error occurred during sentiment analysis error amp lt script amp gt amp lt body amp gt amp lt html amp gt app pyfrom flask import Flask render templatefrom pyscript import PyScriptfrom sentiment model import analyze sentimentapp Flask name pyscript PyScript app app route def index return render template index html pyscript bridgedef analyze sentiment text return analyze sentiment text if name main app run debug True static pyscript jsYou can find the latest version of PyScript from the official PyScript repository or package manager Running the Application Save the above files in their respective directories Make sure you have Flask and PyScript installed in your Python environment Download or create a pre trained sentiment analysis model and update sentiment model py accordingly Run the Flask application using python app py Access the web application at Enter some text in the textarea and click the Analyze button to see the sentiment analysis result In this example we used PyScript to integrate Python code the analyze sentiment function into a simple sentiment analysis web application The web application runs on Flask and uses PyScript to call the Python function analyze sentiment from the client side JavaScript The Python function analyzes the sentiment of the user provided text and returns the result to be displayed back to the user on the web page This example highlights the ease of using PyScript to seamlessly integrate Python functionality into web applications making it a powerful tool for real life projects involving Python and JavaScript integration When To Use PyScript Data Analytics and VisualizationInteractive Data Visualization Dashboards A financial services company wants to create an interactive dashboard for their clients to view and analyze their investment portfolios They want to use Python for data manipulation and visualization but also need to deploy the application on the web With PyScript they can write the Python code once and run it in the browser creating an interactive and responsive dashboard that updates in real time as the user interacts with it Machine Learning ModelsTime Predictions and Recommendations An e commerce website wants to provide personalized product recommendations to its customers based on their browsing history and purchase behavior They can use PyScript to deploy machine learning models written in Python directly in the browser generating real time recommendations that update as the customer navigates the site Game DevelopmentBrowser Based Games with Complex Logic A game development studio wants to create a multiplayer online game with complex logic and calculations They can use PyScript to write the game s core logic in Python then deploy it in the browser using PyScript This approach allows them to focus on developing the gameplay and user experience rather than worrying about the underlying technology Scientific Computing and SimulationsInteractive Science Applications A research institution wants to create an interactive science application for exploring complex scientific phenomena such as climate modeling or molecular dynamics They can use PyScript to deploy Python codes for these simulations directly in the browser allowing users to interact with the models in real time and gain insights into the underlying physics and mathematics Education and Training Interactive Code Lessons and Tutorials  A coding bootcamp or online education platform that wants to create interactive lessons and tutorials for teaching programming concepts such as data structures or algorithm design They can use PyScript to deploy Python codes for these lessons directly in the browser allowing students to work through exercises and get immediate feedback on their progress ConclusionPyScript is a powerful tool that allows developers to run Python code directly in their HTML files seamlessly integrating front end and back end development With PyScript developers can leverage the strengths of both Python and JavaScript to create robust scalable and maintainable web applications The guide provided in this document has covered the basics of PyScript including installation basic syntax and advanced features We have also discussed some real world use cases for PyScript highlighting its potential for a variety of applications from data analytics and machine learning to game development and educational projects As the web development landscape continues to evolve PyScript is poised to play a significant role in shaping the future of the web With its ability to combine the power of Python and JavaScript PyScript offers a unique and compelling solution for developers looking to push the boundaries of what is possible on the web If you find this post exciting find more exciting posts on Learnhub Blog we write everything tech from Cloud computing to Frontend Dev Cybersecurity AI and Blockchain Resource Getting started with PyScript  Build with Pyscript 2023-07-23 13:27:30
海外TECH DEV Community Jokeday Funday Part #3 https://dev.to/soumyadeepdey/jokeday-funday-part-3-481e Jokeday Funday Part Jokeday Funday Part Keep the Laughter Rolling with More Programming Jokes Joke The Unending LoopWhy do programmers always carry an umbrella In case it starts raining while they re stuck in an infinite loop Joke The Password ConundrumWhy did the programmer s password get rejected It didn t have enough characters to make a secure key to the heart of the system Joke The Parallel UniverseWhy do programmers always mix up Christmas and Halloween Because they believe that Oct and Dec are running in parallel universes Joke The Memory SnatcherWhy did the memory module break up with the CPU It couldn t handle the CPU s commitment issues always forgetting things Joke The Language of CrowdsWhy do programming languages get invited to parties Because they can always bring a large crowd whether it s Java Python or C Joke The Time Traveling CoderWhy did the programmer start using a time machine while coding To debug issues from the past and prevent bugs in the future Joke The Math MysteryWhy was the math book sad when it became a programmer s best friend Because it knew all the problems would be solved with code not formulas Joke The Job of a CompilerWhy did the compiler refuse to go on vacation It didn t want to leave its source code without proper supervision Joke The Robotic LoveWhy did the robot become a programmer Because it found its if statement was always true when it came to loving coding Joke The Lost DeveloperWhy did the developer get lost on the way to the Git repository Because they didn t commit to the right path Bonus Joke The Programming ProdigyWhy did Soumya become a computer programmer at such a young age Because she saw all the byte sized snacks programmers could have while coding Enjoy the jokes and may the laughter be with you 2023-07-23 13:04:12
海外TECH DEV Community What are the most essential variables in SQL? https://dev.to/faridteymouri/what-are-the-most-essential-variables-in-sql-51d0 What are the most essential variables in SQL In SQL there are several essential variables that play a crucial role in managing and configuring the behavior of the database system These variables can vary depending on the specific database management system DBMS you are using However I ll provide some common essential variables that are found in many SQL based DBMS DATABASEUSE my database SELECT DATABASE In this example we first select the database named my database using the USE statement Then we use the DATABASE function to retrieve the name of the currently selected database SERVERVERSIONSELECT version This query will return the version of the MySQL server you are connected to The version variable holds information about the server version AUTO INCREMENTCREATE TABLE users id INT AUTO INCREMENT PRIMARY KEY username VARCHAR INSERT INTO users username VALUES john doe SELECT LAST INSERT ID In this example we create a table called users with an AUTO INCREMENT column named id We insert a new user into the table and use the LAST INSERT ID function to retrieve the last automatically generated ID sql modeSET sql mode strict trans tables This statement sets the SQL mode to strict trans tables in MySQL enabling strict transactional mode for table operations max connectionsSHOW VARIABLES LIKE max connections This query displays the value of the max connections variable in MySQL indicating the maximum number of concurrent connections allowed to the server innodb buffer pool sizeSHOW VARIABLES LIKE innodb buffer pool size This query shows the value of the innodb buffer pool size variable in MySQL which represents the size of the InnoDB buffer pool sort buffer size and join buffer sizeSHOW VARIABLES LIKE sort buffer size SHOW VARIABLES LIKE join buffer size These queries display the values of sort buffer size and join buffer size variables in MySQL controlling the size of temporary buffers used for sorting and joining operations respectively max allowed packetSHOW VARIABLES LIKE max allowed packet This query shows the value of the max allowed packet variable in MySQL determining the maximum size of a single packet or query that the server will accept NOCOUNT Microsoft SQL Server SET NOCOUNT ON Your SQL statements hereSET NOCOUNT OFF In Microsoft SQL Server NOCOUNT is not a system variable but a command The SET NOCOUNT ON statement suppresses the messages about the number of affected rows It can be useful in stored procedures or triggers Keep in mind that the syntax and available variables may vary across different database management systems so always consult the documentation of your specific DBMS for accurate details and examples 2023-07-23 13:04:01
Apple AppleInsider - Frontpage News Apple Store EasyPay Online Ordering brings shipment options to retail sales https://appleinsider.com/articles/23/07/23/apple-store-easypay-online-ordering-brings-shipment-options-to-retail-sales?utm_medium=rss Apple Store EasyPay Online Ordering brings shipment options to retail salesApple Store employees will be able to complete a sale for products out of stock at a location by allowing for EasyPay point of sale machines to be used for home delivery orders A problem with visiting any store is that if a product is out of stock the salesperson may lose the sale entirely if there s no way to offer customers an alternative order method In a change rolling out in early August Apple Store staff will be given just such an option According to a memo sent to retail employees seen by Bloomberg s Mark Gurman the EasyPay Online Ordering program will allow store staff to sell products and ship them to customers directly using their EasyPay point of sale machines Read more 2023-07-23 13:33:13
Apple AppleInsider - Frontpage News M3 Mac, 14-inch &16-inch MacBook Pro aren't coming in the fall https://appleinsider.com/articles/23/07/23/m3-mac-mini-may-join-14-inch-16-inch-macbook-pro-in-mid-2024-update?utm_medium=rss M Mac inch amp inch MacBook Pro aren x t coming in the fallThe first wave of M models may not include the usual suspects a report claims with an M equipped Mac mini and upgraded inch and inch MacBook Pro likely to arrive later than originally thought Mac miniApple is expected to introduce its M chip in the fall along with the first Mac models to use it While the Mac mini is usually among the first to receive the initial salvo of Apple Silicon chips in a new generation it may not be the case for the M Read more 2023-07-23 13:01:50
ニュース BBC News - Home Rhodes fires: Jet2 and TUI flights cancelled as British tourists in limbo https://www.bbc.co.uk/news/uk-66282387?at_medium=RSS&at_campaign=KARANGA hotels 2023-07-23 13:44:16
ニュース BBC News - Home Residents flee burning homes in Rhodes https://www.bbc.co.uk/news/world-europe-66283658?at_medium=RSS&at_campaign=KARANGA greek 2023-07-23 13:29:51
ニュース BBC News - Home France 0-0 Jamaica: Underdogs celebrate first Women's World Cup point https://www.bbc.co.uk/sport/football/66277049?at_medium=RSS&at_campaign=KARANGA France Jamaica Underdogs celebrate first Women x s World Cup pointManager Lorne Donaldson hails the number one result in Jamaican football history after they draw with France at the Women s World Cup 2023-07-23 13:49:43

コメント

このブログの人気の投稿

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