投稿時間:2021-11-12 00:26:04 RSSフィード2021-11-12 00:00 分まとめ(34件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
AWS AWS Architecture Blog Field Notes: Clear Unused AWS SSO Mappings Automatically During AWS Control Tower Upgrades https://aws.amazon.com/blogs/architecture/field-notes-clear-unused-aws-sso-mappings-automatically-during-aws-control-tower-upgrades/ Field Notes Clear Unused AWS SSO Mappings Automatically During AWS Control Tower UpgradesIncreasingly organizations are using AWS Control Tower to manage their multiple accounts as well as an external third party identity source for their federation needs Cloud architects who use these external identity sources needed an automated way to clear the unused maps created by AWS Control Tower landing zone as part of the launch or during … 2021-11-11 14:31:51
Google Official Google Blog Explore Brasilia: the designed city https://blog.google/outreach-initiatives/arts-culture/explore-brasilia-designed-city/ Explore Brasilia the designed cityIn the highlands of Brazil sits an architectural and cultural gem the capital city of Brasília designed and developed in the s by architects and urban planners Lúcio Costa and Oscar Niemeyer The designed city was part of the plan to move the capital from Rio de Janeiro to a more central location in the country I am very happy to see the city where I grew up featured on Google Arts amp Culture after years of cultivating a unique culture from its designed origins Google Arts amp Culture invites everyone around the world to learn more about the extraordinary architecture the bustling art and culture scene and the amazing history of Brasilia a city designed for the future Here are five things about Brasilia to get you started How did Brasilia come to life The first documented idea of transferring the capital from Rio de Janeiro to the interior of Brazil dates back to the th century and in the change of the country s capital was included in the Constitution It is only many years later that inspired by an image of industrial progress the newly elected Brazilian President Juscelino Kubitschek finally began implementing the project of creating a new capital for Brazil During his election campaign Kubitschek had promised fifty years of progress in the span of his five year term Discover more about the history of the conception and construction of the city of Brasilia here Meet the architects and artists that made Brasilia an open air museumMany of the landmark buildings in Brasilia were designed by iconic architect Oscar Niemeyer Through the project you can learn about his pioneering life and work and discover some of his most iconic creations in D In addition to government buildings which constitute some of the most magnificent creations the work of great artists and architects like Oscar Niemeyer impacted the life of the new capital integrating buildings of every kind religious cultural and commercial In this sense Brasilia becomes an open air museum The encounter between Niemeyer with the artist Athos Bulcão left a legacy of the most successful examples of the integration of different arts in the panorama of modern Brazilian architecture all around the city Itamaraty Detalhes do Pilar Bento Viana from the collection of Instituto dos Arquitetos do Brasil Departamento Distrito FederalItamaraty Detalhes do Pilar Bento Viana from the collection of Instituto dos Arquitetos do Brasil Departamento Distrito FederalTile Panel at the Green Hall at the National Congress by Athos Bulcão Fundação Athos BulcãoTile Panel at the Green Hall at the National Congress by Athos Bulcão Fundação Athos BulcãoMuseu Nacional by Joana França from the collection of Instituto dos Arquitetos do Brasil Departamento Distrito FederalMuseu Nacional by Joana França from the collection of Instituto dos Arquitetos do Brasil Departamento Distrito FederalChichá do cerrado Sterculia striata Museu do CerradoChichá do cerrado Sterculia striata Museu do CerradoVerão by Marysia Portinari from the collection of the Chamber of Deputies BrazilVerão by Marysia Portinari from the collection of the Chamber of Deputies BrazilCapturing Verão by Marysia Portinari with Art Camera technology at the Chamber of DeputiesCapturing Verão by Marysia Portinari with Art Camera technology at the Chamber of DeputiesRetrato de Zumbi dos Palmares by Juarez Venancio from the collection of the Chamber of Deputies BrazilRetrato de Zumbi dos Palmares by Juarez Venancio from the collection of the Chamber of Deputies BrazilTambor de Crioula de Seu Teodoro Complexo Cultural SamambaiaTambor de Crioula de Seu Teodoro Complexo Cultural Samambaia Explore Brasilia museumsThe capital offers a great deal of museums committed to preserving art From the National Museum of the Republic to the Athos Bulcão Foundation and the art collection of the Chamber of Deputies start exploring with works from the five artists from Brazil whose work can be found in Brasília s art collections Discover the hidden details of “Buffalo and the Siouxies by Alice Lara or peek into the art details inside the Chamber of Deputies Dive into the cultural lifeThe city of Brasilia and its surroundings are home to a bustling cultural life Discover institutions such as the Brasilia Public Library which gathers the communities of Brasilia with its programs since the year of its foundation and the Cultural Complex of Samambaia a beacon for Brazilian culture that organizes festivals and events Brasilia is also home to many exhibitions Chiharu Shiota or the VAIVÉM a retrospective about history and perspectives of a simple object the hammock both hosted at the Centro Cultural Banco do Brasil Brasília Discover the natureThe Cerrado a vast tropical savanna ecoregion in the center of Brazil is home to a vast natural environment The stories of this ecosystem date back to the beginning of human history and it is one of the richest and oldest biomes on the planet The Brazilian savanna has native plant species that depend on the Cerrado s bird speciesー of which are native to the Cerradoーto spread their seeds and pollinate their flowers You can go on a bird watching tour or explore the diversity of frogs that inhabit the region We invite everyone to get new perspectives on the city s stunning designs history and culture visiting the project at g co explorebrasilia and on the Google Arts amp Culture app on iOS or Android 2021-11-11 15:00:00
Google Official Google Blog Welcoming US-EU collaboration on cybersecurity https://blog.google/outreach-initiatives/public-policy/welcoming-us-eu-collaboration-cybersecurity/ Welcoming US EU collaboration on cybersecurityArmistice Day is a perennial reminder of the perils of unchecked escalation and the sacrifices of prior generations to protect peace and security Multilateralism borne out of the th century s conflicts is just as relevant in a world of st century threats That s particularly true for one of the most pressing multi stakeholder challenges today cybersecurity The internet itself is a multi stakeholder system and protecting citizens online requires cooperation among governments and businesses For example this week s crackdown on ransomware operators by Europol and the U S Department of Justice resulting in the arrests of two REvil operators capped off an enforcement effort that spanned a year and as many as nations These actions coming just ahead of the th anniversary of the Budapest Convention highlight the value of cross border cooperation in fighting cybercrime as well as the importance of protecting individuals and their rights online Likewise we applaud the news announced by U S Vice President Kamala Harris in Paris that the United States is expanding its efforts to advance international cooperation in cybersecurity by joining the Paris Call for Trust and Security in Cyberspace ーa voluntary commitment to work with the international community to advance cybersecurity and preserve the open interoperable secure and reliable Internet Google was among the first signatories to the Paris Call in when it was initially advanced by the government of President Macron of France The Paris Call s principles are something we should all agree to but it is past time to put them into action Google has unique expertise supporting many of these principles To name a few Defend electoral processes Through our Advanced Protection Program APP we partner with organizations around the world to protect elected officials campaign offices and other high risk users such as human rights workers and journalists During the United States elections APP was the go to choice for federal campaigns Since the launch of APP there have been zero identified instances of a successful targeted attack on an APP user Lifecycle Security The Solarwinds attack underscored the real risks and ramifications of supply chain attacks To improve our own security and support the broader community we worked with the Open Source Security Foundation OpenSSF to develop and release Supply chain Levels for Software Artifacts SLSA or “salsa a proven framework for securing the software supply chain We also pledged to provide million to support third party foundations like OpenSSF that manage open source security priorities and help fix vulnerabilities Cyber Hygiene Advancing cyber hygiene is a simple way to reduce the majority of successful attacks At our Google Safety Engineering Center GSEC in Munich and at Google security engineering hubs around the world we are making it easier for our users to stay safe For example Google has been at the forefront of innovation in two step verification SV for years And because we know the best way to keep our users safe is to turn on our security protections by default we have started to automatically configure our users accounts into a more secure state By the end of we plan to auto enroll an additional million Google users in SV and require million YouTube creators to turn it on Though there is much we can do as a community what we have learned in the wake of SolarWinds Hafnium and other attacks is that companies need to contribute more of their technology and expertise to solving these challenges In that vein we are doubling down to develop solutions to protect users organizations and society Earlier this year we announced that we will invest billion over the next five years to keep users and customers safer including expanding access to zero trust security tools and offering free security skills training programs for workers in the U S and Europe Google keeps more people safe online than anyone else by putting security at the core of everything we do We are committed to advancing community driven multi stakeholder approaches to cybersecurity We look forward to expanding our work with governments and the private sector to develop security technologies and standards that make us all safer 2021-11-11 14:30:00
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) fclose(fp)ではファイルポインタはNULLにならないのでしょうか? https://teratail.com/questions/368920?rss=all fclosefpではファイルポインタはNULLにならないのでしょうか困っていること業務アプリの中で下記機能があります。 2021-11-11 23:59:29
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 格納されたリストから表を表示させる https://teratail.com/questions/368919?rss=all 2021-11-11 23:44:46
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) ファンクショナルAPIのエラーについて https://teratail.com/questions/368918?rss=all ファンクショナルAPIのエラーについて前提・実現したいことLSTMを使ったモデルを入力時点の重みを出力前の全結合層にて共有する「重み共有」という手法を使って精度が上がるか試してみたいと考えてコーディング中です。 2021-11-11 23:36:39
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 複数のサーバーで構成されているシステムの名称 https://teratail.com/questions/368917?rss=all 複数 2021-11-11 23:35:17
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Unityでスコアの加算がうまくいかない。 https://teratail.com/questions/368916?rss=all Unityでスコアの加算がうまくいかない。 2021-11-11 23:23:13
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) ターミナルが起動しない https://teratail.com/questions/368915?rss=all ターミナルが起動しない前提・実現したいことここに質問の内容を詳しく書いてください。 2021-11-11 23:15:07
Docker dockerタグが付けられた新着投稿 - Qiita VSCodeを使ってSSHを経由してDockerコンテナの中で開発する。 https://qiita.com/m-dev672/items/c5d48b1e81ed36e0e23f リモートエクスプローラのContainerTargetsからビルドしたコンテナを右クリックしてConnecttoHostinCurrentNewWindow※VSCodeのRemoteContainerのOpenFolderinContainerはクライアント側BravoやDeltaにコードがある場合は使えるがサーバー側AlphaやCharlieにコードがある場合は使えない。 2021-11-11 23:45:34
技術ブログ Developers.IO JestでToBe()マッチャ−によるテストが失敗する時の代替策 https://dev.classmethod.jp/articles/alternative-solution-when-tests-with-tobe-matcher-fail-in-jest/ 若槻 2021-11-11 14:54:29
海外TECH MakeUseOf Anker PowerHouse II 400 Review: A Potent Portable Power Station https://www.makeuseof.com/anker-powerhouse-ii-400-review/ powerhouse 2021-11-11 14:56:21
海外TECH MakeUseOf 7 Key Steps to Building a Great Website https://www.makeuseof.com/key-steps-build-great-website/ things 2021-11-11 14:30:21
海外TECH MakeUseOf The 7 Best Tools to Organize Your Emails and Boost Productivity https://www.makeuseof.com/best-tools-organize-emails-boost-productivity/ boost 2021-11-11 14:15:36
海外TECH MakeUseOf The 7 Best Trackball Mouse Options for Precision and Ergonomics https://www.makeuseof.com/best-trackball-mouse/ mouse 2021-11-11 14:05:11
海外TECH DEV Community Create a Discord Bot in Minutes with Python https://dev.to/codesphere/create-a-discord-bot-in-minutes-with-python-2jgp Create a Discord Bot in Minutes with PythonIf there s any platform that s become the darling of online communities it s Discord Its intuitive UX vibrant communities and diverse feature set have allowed it to grow rapidly over the years Among developers at least a lot of the love for Discord comes from its high programmability In this tutorial we are going to be making a simple Discord Bot with Python that you can add to your servers Setting Up Your Bot in the Developer PortalTo get started first head toAnd Create a New ApplicationFrom there head to the Bot tab and create a new bot Finally to add our bot to a server go to the oAuth tab scroll down to scopes check bot and visit the generated URL You can then select the server you want to add the bot to and you should see it on your server under offline usersThat s all we need to do from the Discord side Project SetupNow let s code our bot First install discord py with pip install discordAnd create a new file called main pyWe can then authenticate our discord like so You can find your authentication token in the Bot Tab in your developer portal Responding to MessagesNow let s read and respond to messages that people send in channels We need to include the bot process commands at the end in order to make sure the bot also checks if the message is a valid command And here you can see it working Creating CommandsNow let s add commands Commands are just responses that are specifically invoked We designated at the beginning that each command has to start with which will act as the Alexa to start listening for a command We are going to add two commands one that returns the square of a number and one that tells us the scrabble points for a specific word And here we can see it working Deploying Your BotNow of course you re not going to want to be running your script from your local machine That s why it s crucial to deploy your script in the cloud If you want to skip the whole cumbersome cloud setup process try out Codesphere On Codesphere you can just import your project and run it from a virtual machine as if it was being deployed locally It only takes minutes to deploy So what are you going to build Let us know down below 2021-11-11 14:48:03
海外TECH DEV Community Migrating our scripts to Node.js v16 using codemod https://dev.to/entria/migrating-our-scripts-to-nodejs-v16-using-codemod-5534 Migrating our scripts to Node js v using codemodAt Entria we have a lot of Node js scripts to automate common taskswe also make a script for any migration and to make it easy to run a single migration for test purposes and each script starts with anonymous async functions that is auto executed Like this templateconst run async gt migration code async gt try await run catch err eslint disable next line console log err err process exit process exit This works well but not enough for our use case Because we create tests for our scripts and migrations if they are used in production If you import the run function in your test files it will run the async functions in your tests which is not the behavior you wanna So we have a check async function that is only auto executed when we are running directly To make this check we used module parent propriety but it will be deprecated on Node v Context of Node v and vIn October th Node js v replaced v as the LTS release And with these changes we on Entria bring to us breaking changes into our codebase on Entria like a module parent module parent has used on Node v to locate if script is a module or executable like if module parent running like node myfile js else running like require myfile js We had files that use module parentAnd we want changes all occurrences of module parent to require main that allows we check the same thing of module parent if require main module running like node myfile js else running like require myfile js To change all occurrences of module parent we used a codemod with jscodeshift Codemod is a tool library to assist our with large scale codebase refactors that can be partially automated But Eduardo why you not use find and replace of your IDE R Because this require a lot of attention and time of our developers and if we not used codemod can t sure that can exists more module parent on the future Time of codeWe want changeif module parent toif require main module How We used jscodeshift to codemod First you should add jscodeshift in your node modules withnpm install g jscodeshiftAfter this you should create an archive that contains our codemod in this case replace module parent js First we should create a function that is used in all files of the folder that we select and pass two arguments fileInfo and api The fileInfo argument represents information of the currently processed file and api is object that exposes the jscodeshift library and helper functions from the runner replace module parent jsfunction transform fileInfo api module exports transform Now we want to get jscodeshift helpers from api jscodeshift and transform our code to AST Abstract System Types And you can explore more of our AST here AST Explorer const j api jscodeshift const root j fileInfo source Now we want find all occurrences of if module parent and replace to if require main module finding all ocurrences of if module parent root find j IfStatement type IfStatement test type UnaryExpression operator argument type MemberExpression object type Identifier name module property type Identifier name parent filter path gt if path node test type UnaryExpression return false return true Replacing all to require main forEach path gt const requireMain j ifStatement j binaryExpression j memberExpression j identifier require j identifier main j identifier module path node consequent path node alternate j path replaceWith requireMain return root toSource And on final our codemod isfunction transform fileInfo api const j api jscodeshift const root j fileInfo source root find j IfStatement type IfStatement test type UnaryExpression operator argument type MemberExpression object type Identifier name module property type Identifier name parent filter path gt if path node test type UnaryExpression return false return true forEach path gt const requireMain j ifStatement j binaryExpression j memberExpression j identifier require j identifier main j identifier module path node consequent path node alternate j path replaceWith requireMain return root toSource module exports transform module exports parser ts To run this code you can use this on your terminal jscodeshift t replace module parent js your input files d p 2021-11-11 14:25:17
海外TECH DEV Community Working MongoDB with Golang https://dev.to/bseyhan/working-mongodb-with-golang-2g76 Working MongoDB with GolangEvery tutorial has a story In that tutorial you ll find out different contents that is related to MongoDB GoLang and working with mock data and deployment Here is my content Project structurePS Here is the one different folder that name is dummy api That folder has own main file What does it mean When I run the main go file before I ll add mock data If you didn t catch up Working with the marshal and unmarshal tutorial you should read it Another important topics is context Essential Gocontext TODO TODO returns a non nil empty Context Code should use context TODO when it s unclear which Context to use or it is not yet available because the surrounding function has not yet been extended to accept a Context parameter TODO is recognized by static analysis tools that determine whether Contexts are propagated correctly in a program context Background Background returns a non nil empty Context It is never canceled has no values and has no deadline It is typically used by the main function initialization and tests and as the top level Context for incoming requests Another different package is about MongoDb Client however I ll talk about below package mainimport context encoding json io ioutil os github com bburaksseyhan contact api src pkg client mongodb github com bburaksseyhan contact api src pkg model github com sirupsen logrus func main contactsJson err os Open contacts json if err nil logrus Error contact json an error occurred err defer contactsJson Close var contacts model Contact byteValue ioutil ReadAll contactsJson unmarshall data if err json Unmarshal byteValue amp contacts err nil logrus Error unmarshall an error occurred err logrus Info Data n len contacts import mongo client client mongodb ConnectMongoDb mongodb localhost logrus Info client defer client Disconnect context TODO collection client Database ContactDb Collection contacts logrus Warn Total data count amp contacts for item range contacts collection InsertOne context TODO item logrus Info Data import finished Firstly let s open the terminal and goes to dummy api directory Another important thing is database running Let s have look docker compose updocker container ls Working with mock dataI was creating mock data from Mockaroo Working with MongoDB queriesdocker exec it addf mongo connect to mongodb clihelpshow dbs return all database namesuse ContactDb show collections return collection namedb contacts find return all collectionsdb contacts find count return row countdb contacts find pretty return rows with a formatdb contacts find email db dropDatabase remove database Using packages go get u go mongodb org mongo driver bson go get u go mongodb org mongo driver mongo go get u go mongodb org mongo driver mongo options go get u github com gin gonic gin go get github com sirupsen logrus Implementation main go fileThat file read config yml or env file after that call the Init function package mainimport os github com bburaksseyhan contact api src cmd utils github com bburaksseyhan contact api src pkg server log github com sirupsen logrus github com spf viper func main config read log Info Config yml config Database Url mongoUri os Getenv MONGODB URL if mongoUri config Database Url mongoUri log Info MONGODB URL mongoUri server Init config Database Url func read utils Configuration Set the file name of the configurations file viper SetConfigName config Set the path to look for the configurations file viper AddConfigPath Enable VIPER to read Environment Variables viper AutomaticEnv viper SetConfigType yml var config utils Configuration if err viper ReadInConfig err nil log Error Error reading config file s err err viper Unmarshal amp config if err nil log Error Unable to decode into struct v err return config ConnectMongoDb function takes the MongoDB URL parameter so this function opens the connection and check the status Related Documentationpackage mongodbimport context log github com sirupsen logrus go mongodb org mongo driver mongo go mongodb org mongo driver mongo options func ConnectMongoDb url string mongo Client clientOptions options Client ApplyURI url Connect to MongoDB client err mongo Connect context TODO clientOptions if err nil log Fatal err Check the connection err client Ping context TODO nil if err nil log Fatal err log Info MongoClient connected return client unfinished contact handler go file HealthCheck function is not only health check That function checks the MongoDb database status with a timeout If any cancellation comes from the server context will be triggered and response will be un health Let s think the opposite result will be pong package handlerimport context net http time github com gin gonic gin github com sirupsen logrus go mongodb org mongo driver mongo type ContactHandler interface GetAllContacts gin Context GetContactByCity gin Context HealthCheck gin Context type contactHandler struct client mongo Client func NewContactHandler client mongo Client ContactHandler return amp contactHandler client client func ch contactHandler GetAllContacts c gin Context ctxErr context WithTimeout c Request Context time Second defer ctxErr request on repository c JSON http StatusOK gin H contacts pong func ch contactHandler GetContactByCity c gin Context ctxErr context WithTimeout c Request Context time Second defer ctxErr request on repository c JSON http StatusOK gin H contacts pong func ch contactHandler HealthCheck c gin Context ctx ctxErr context WithTimeout c Request Context time Second defer ctxErr if ctxErr nil logrus Error somethig wrong ctxErr if err ch client Ping ctx nil err nil c JSON http StatusOK gin H status unhealty c JSON http StatusOK gin H status pong Completed codes mainpackage mainimport os github com bburaksseyhan contact api src cmd utils github com bburaksseyhan contact api src pkg server log github com sirupsen logrus github com spf viper func main config read log Info Config yml config Database Url mongoUri os Getenv MONGODB URL serverPort os Getenv SERVER PORT dbName os Getenv DBNAME collection os Getenv COLLECTION if mongoUri config Database Url mongoUri config Server Port serverPort config Database DbName dbName config Database Collection collection log Info MONGODB URL mongoUri server Init config func read utils Configuration Set the file name of the configurations file viper SetConfigName config Set the path to look for the configurations file viper AddConfigPath Enable VIPER to read Environment Variables viper AutomaticEnv viper SetConfigType yml var config utils Configuration if err viper ReadInConfig err nil log Error Error reading config file s err err viper Unmarshal amp config if err nil log Error Unable to decode into struct v err return config configpackage utilstype Configuration struct Database DatabaseSetting Server ServerSettings type DatabaseSetting struct Url string DbName string Collection string type ServerSettings struct Port string serverpackage serverimport github com bburaksseyhan contact api src cmd utils github com bburaksseyhan contact api src pkg client mongodb github com bburaksseyhan contact api src pkg handler repository github com bburaksseyhan contact api src pkg repository mongodb github com gin gonic gin log github com sirupsen logrus func Init config utils Configuration Creates a gin router with default middleware logger and recovery crash free middleware router gin Default client mongodb ConnectMongoDb config Database Url repo repository NewContactRepository amp config client handler handler NewContactHandler client repo router GET handler GetAllContacts router GET contacts email handler GetContactByEmail router POST contact delete id handler DeleteContact router GET health handler HealthCheck log Info port is n config Database Url PORT environment variable was defined router Run config Server Port handlerpackage handlerimport context net http strconv time github com bburaksseyhan contact api src pkg model db github com bburaksseyhan contact api src pkg repository mongodb github com gin gonic gin github com sirupsen logrus go mongodb org mongo driver mongo type ContactHandler interface GetAllContacts gin Context GetContactByEmail gin Context DeleteContact gin Context HealthCheck gin Context type contactHandler struct client mongo Client repository db ContactRepository func NewContactHandler client mongo Client repo db ContactRepository ContactHandler return amp contactHandler client client repository repo func ch contactHandler GetAllContacts c gin Context ctx ctxErr context WithTimeout c Request Context time Second defer ctxErr var contactList model Contact request on repository if result err ch repository Get ctx err nil logrus Error err else contactList result c JSON http StatusOK gin H contacts amp contactList func ch contactHandler GetContactByEmail c gin Context ctx ctxErr context WithTimeout c Request Context time Second defer ctxErr var contactList model Contact get parameter email c Param email request on repository if result err ch repository GetContactByEmail email ctx err nil logrus Error err else contactList result c JSON http StatusOK gin H contacts contactList func ch contactHandler HealthCheck c gin Context ctx ctxErr context WithTimeout c Request Context time Second defer ctxErr if ctxErr nil logrus Error somethig wrong ctxErr if err ch client Ping ctx nil err nil c JSON http StatusOK gin H status unhealty c JSON http StatusOK gin H status pong func ch contactHandler DeleteContact c gin Context ctx ctxErr context WithTimeout c Request Context time Second defer ctxErr get parameter id err strconv Atoi c Param id if err nil logrus Error Can not convert to id err request on repository result err ch repository Delete id ctx if err nil logrus Error err c JSON http StatusOK gin H deleteResult DeletedCount result repositorypackage repositoryimport context github com bburaksseyhan contact api src cmd utils github com bburaksseyhan contact api src pkg model github com sirupsen logrus log github com sirupsen logrus go mongodb org mongo driver bson go mongodb org mongo driver bson primitive go mongodb org mongo driver mongo go mongodb org mongo driver mongo options type ContactRepository interface Get ctx context Context model Contact error GetContactByEmail email string ctx context Context model Contact error Delete id int ctx context Context int error type contactRepository struct client mongo Client config utils Configuration func NewContactRepository config utils Configuration client mongo Client ContactRepository return amp contactRepository config config client client func c contactRepository Get ctx context Context model Contact error findOptions options Find findOptions SetLimit var contacts model Contact collection c client Database c config Database DbName Collection c config Database Collection Passing bson D as the filter matches all documents in the collection cur err collection Find ctx bson D findOptions if err nil log Fatal err return nil err Finding multiple documents returns a cursor Iterating through the cursor allows us to decode documents one at a time for cur Next context TODO create a value into which the single document can be decoded var elem model Contact if err cur Decode amp elem err nil log Fatal err return nil err contacts append contacts amp elem cur Close ctx return contacts nil func c contactRepository GetContactByEmail email string ctx context Context model Contact error findOptions options Find findOptions SetLimit var contacts model Contact collection c client Database c config Database DbName Collection c config Database Collection filter bson D primitive E Key email Value email logrus Info Filter filter collection FindOne ctx filter Decode amp contacts return contacts nil func c contactRepository Delete id int ctx context Context int error collection c client Database c config Database DbName Collection c config Database Collection filter bson D primitive E Key id Value id deleteResult err collection DeleteOne ctx filter if err nil log Fatal err return err return deleteResult DeletedCount nil Deploymentdocker compose upRepositoryThank you 2021-11-11 14:23:47
海外TECH DEV Community Build 7 Pages Complete Responsive Educational Website Using HTML CSS & JavaScript https://dev.to/fahimkabir/build-7-pages-complete-responsive-educational-website-using-html-css-javascript-353o Build Pages Complete Responsive Educational Website Using HTML CSS amp JavaScriptFull responsive multipage educational website LMS website with HTML CSS amp JavaScript This website will have different pages Like Home page About page Blog page Post Page Course Page Course Details Page Contact Page etc We will be creating a completely responsive website design for online course website LMS website Full Professional looking and creative design website tutorial for beginners We will be creating this website part by part It will be easier for you to get all the details I m going to add to this website Excited Meh too Part Create Home Page Using HTM CSS amp JavaScript Including different sections After creating the home page we will make this page responsive for mobile devices too Build Responsive Online Course Websites With HTML CSS JavaScript Part Let s create the About us page too We will add some descriptions about our website or institution Then we will make this page responsive also Responsive Website Design Using HTML CSS amp JavaScript Educational Website Part Part After creating the about us page We will create a Blog page On this page we will add a few blog posts Only the blog images heading some details and a read more button Then we will add a categories section too So that user can navigate through them After creating the blog page we will create the posting page also Remember we added a read more button on the blog page Now we will use that button so that the user can click and view read the full post No I m not forgetting to make those pages responsive too Responsive Blog Portal Website Design With HTML CSS Part In this part we will create our course page On this page we will add courses including course thumbnail the course title reviews and pricing Then what After creating the courses page now we have to make a page for complete course details And of course we will make these pages fully responsive How To Make Responsive Educational Website Design Using HTML And CSS Step By Step Part Part After creating all the web pages using HTML CSS and JS It s mandatory to create a contact page So that anyone can contact with you On our contact page we will add a form including a name field email field etc Then we will learn how to embed a live google map in your HTML website How To Make Responsive Education Website Using HTML CSS amp JavaScript Harvard UniversityEnjoyed this post What Should I Bring Next Please Let Me Know In The Comment You can always use this project to learn and improve your skills or for your portfolio Previous Posts Html CSS JavaScript Bootstrap Website Tutorial Step By Step fahim kabir・Jun ・ min read html css javascript webdev JavaScript Projects For Beginners fahim kabir・Jun ・ min read javascript beginners webdev programming Python Projects For Beginners fahim kabir・Jun ・ min read python beginners graphql resume Feel free to visit my YouTube channel TechetcFollow me on Instagram where I m sharing lots of useful resources fahimkabir hamim 2021-11-11 14:14:51
Apple AppleInsider - Frontpage News Best deals Nov. 11: up to 36% off 4K Samsung TVs, 15% off 'The Office' Blu-ray set, and more! https://appleinsider.com/articles/21/11/11/best-deals-nov-11-up-to-36-off-4k-samsung-tvs-15-off-the-office-blu-ray-set-and-more?utm_medium=rss Best deals Nov up to off K Samsung TVs off x The Office x Blu ray set and more Thursday s best deals include a Moment lens and gear sale off a Roomba robot vacuum and off a TB Samsung SSD Best deals for November There are a lot of sales each day but only a handful are worth pursuing So rather than sifting through miles of advertisements we ve hand picked a bunch just for the AppleInsider audience Read more 2021-11-11 15:00:09
Apple AppleInsider - Frontpage News Best Photo, Audio, and Video Apps for Mac https://appleinsider.com/articles/21/11/11/best-photo-audio-and-video-apps-for-mac?utm_medium=rss Best Photo Audio and Video Apps for MacNeed a good Mac app for your photo video or audio needs We ve collected a list of the best apps for audio and visual tasks on macOS Credit Andrew O Hara AppleInsiderEven if you re not a photographer graphic designer or podcaster there might come a time when you ll need access to a quality app Whether that s retouching a photo for posting to social media or recording an important Zoom call a good toolkit of audio visual apps is a must have for Mac users Read more 2021-11-11 14:29:15
海外TECH Engadget Rittenhouse defense incorrectly claims iPad pinch-to-zoom modifies footage https://www.engadget.com/kyle-rittenhouse-ipad-pinch-to-zoom-lawyers-claim-142110207.html?src=rss Rittenhouse defense incorrectly claims iPad pinch to zoom modifies footageA lack of technical knowledge may have just influenced an important court case The New York Timesreports the defense for shooter Kyle Rittenhouse incorrectly claimed that an iPad s pinch to zoom function could modify footage of the incident quot creating what it thinks is there not what necessarily is there quot That sparked a debate between lawyers and Judge Schroeder who maintained the burden was on the prosecution to show the imagery remained in its quot virginal state quot not on the defense to prove manipulation The judge may have accepted the argument He denied the prosecution s request for an adjournment and instead called for a minute recess suggesting the team could find an expert to support their claim in that space of time They didn t and The Vergenoted that the trial resumed with the jury watching zoom free video on a Windows PC connected to the courtroom TV As you might imagine the defense s claim played fast and loose with the truth Pinch to zoom on all devices may use algorithms but only to scale the image ーit doesn t change the content itself This was an attempt to prevent the jury from getting a clearer view of the action not a genuine challenge to the integrity of the video The court scene underscored a recurring problem with technical inexperience in criminal cases When judges and law enforcement don t understand how technology works they may set unrealistic expectations or even skew the outcome of a case Police have repeatedly asked for Alexa recordings on the unfounded assumption that smart speakers are always recording for instance While it s not clear if the inaccurate pinch to zoom claim will significantly affect Rittenhouse s fate it certainly didn t help jurors 2021-11-11 14:21:10
海外TECH CodeProject Latest Articles Building Microsoft Teams Tabs Apps with Java Part 2: Creating a Channel or Group Tab with SSO https://www.codeproject.com/Articles/5317290/Building-Microsoft-Teams-Tabs-Apps-with-Java-Par-2 creating 2021-11-11 14:34:00
海外科学 NYT > Science States Sue U.S. Over Vaccine Mandate for Health Care Workers. https://www.nytimes.com/2021/11/10/health/vaccine-mandate-state-lawsuit.html health 2021-11-11 14:42:01
金融 RSS FILE - 日本証券業協会 株券等貸借取引状況(週間) https://www.jsda.or.jp/shiryoshitsu/toukei/kabu-taiw/index.html 貸借 2021-11-11 15:30:00
金融 金融庁ホームページ スチュワードシップ・コードの受入れを表明した機関投資家のリストを更新しました。 https://www.fsa.go.jp/singi/stewardship/list/20171225.html 機関投資家 2021-11-11 15:00:00
金融 金融庁ホームページ 金融審議会「資金決済ワーキング・グループ」(第2回)議事次第について公表しました。 https://www.fsa.go.jp/singi/singi_kinyu/shikinkessai_wg/shiryou/shikinkessai_wg2.html 金融審議会 2021-11-11 15:00:00
ニュース BBC News - Home Armistice Day: UK gathers for remembrance of deaths in military conflicts https://www.bbc.co.uk/news/uk-59246093?at_medium=RSS&at_campaign=KARANGA lockdown 2021-11-11 14:45:02
ニュース BBC News - Home Black women four times more likely to die in childbirth https://www.bbc.co.uk/news/health-59248345?at_medium=RSS&at_campaign=KARANGA maternal 2021-11-11 14:39:26
ニュース BBC News - Home Steven Gerrard: Aston Villa name Rangers boss as new manager https://www.bbc.co.uk/sport/football/59238635?at_medium=RSS&at_campaign=KARANGA rangers 2021-11-11 14:06:58
ニュース BBC News - Home Smith starts at 10 for England v Australia with Tuilagi on wing https://www.bbc.co.uk/sport/rugby-union/59249025?at_medium=RSS&at_campaign=KARANGA australia 2021-11-11 14:06:21
ニュース BBC News - Home Covid: What are the vaccine rules for NHS staff and can I get a booster? https://www.bbc.co.uk/news/health-55045639?at_medium=RSS&at_campaign=KARANGA england 2021-11-11 14:23:50
北海道 北海道新聞 縄文世界遺産 登録後も「切磋琢磨を」 道新東京懇話会 岡田さん講演 https://www.hokkaido-np.co.jp/article/610719/ 国連教育科学文化機関 2021-11-11 23:09:00
北海道 北海道新聞 W杯予選、日本はベトナム下す 伊東のゴールで1―0 https://www.hokkaido-np.co.jp/article/610702/ 日本 2021-11-11 23:04:21

コメント

このブログの人気の投稿

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