By continuing you indicate that you have read and agree to our Terms of service and Privacy policy
By continuing you indicate that you have read and agree to our Terms of service and Privacy policy
Popular Releases
Popular Libraries
New Libraries
Top Authors
Trending Kits
Trending Discussions
Learning
Explore Related Topics
hugo | v0.97.3 |
gatsby | v4.12 |
strapi | v4.1.8 |
jekyll | v3.9.2 |
Ghost | 4.45.0 |
hugo v0.97.3 |
gatsby v4.12 |
strapi v4.1.8 |
jekyll v3.9.2 |
Ghost 4.45.0 |
by gohugoio go
58416 Apache-2.0
The world’s fastest framework for building websites.
by gatsbyjs javascript
52745 MIT
Build blazing fast, modern apps and websites with React
by strapi javascript
44444 NOASSERTION
🚀 Open source Node.js Headless CMS to easily build customisable APIs
by jekyll ruby
44432 MIT
:globe_with_meridians: Jekyll is a blog-aware static site generator in Ruby
by TryGhost javascript
39959 MIT
Turn your audience into a business. Publishing, memberships, subscriptions and newsletters.
by discourse ruby
35516 NOASSERTION
A platform for community discussion. Free, open, simple.
by hexojs javascript
34576 MIT
A fast, simple & powerful blog framework, powered by Node.js.
by excalidraw typescript
28761 MIT
Virtual whiteboard for sketching hand-drawn like diagrams
by mastodon ruby
27588 AGPL-3.0
Your self-hosted, globally interconnected microblogging community
by gohugoio go
58416 Apache-2.0
The world’s fastest framework for building websites.
by gatsbyjs javascript
52745 MIT
Build blazing fast, modern apps and websites with React
by strapi javascript
44444 NOASSERTION
🚀 Open source Node.js Headless CMS to easily build customisable APIs
by jekyll ruby
44432 MIT
:globe_with_meridians: Jekyll is a blog-aware static site generator in Ruby
by TryGhost javascript
39959 MIT
Turn your audience into a business. Publishing, memberships, subscriptions and newsletters.
by discourse ruby
35516 NOASSERTION
A platform for community discussion. Free, open, simple.
by hexojs javascript
34576 MIT
A fast, simple & powerful blog framework, powered by Node.js.
by excalidraw typescript
28761 MIT
Virtual whiteboard for sketching hand-drawn like diagrams
by mastodon ruby
27588 AGPL-3.0
Your self-hosted, globally interconnected microblogging community
by excalidraw typescript
28761 MIT
Virtual whiteboard for sketching hand-drawn like diagrams
by medusajs javascript
11158 MIT
The open-source Shopify alternative ⚡️
by vercel typescript
5580 MIT
Next.js Commerce
by brick-design typescript
4218 MIT
全场景流式布局,可视化拖拽、随意嵌套组合、实时渲染、实时辅助线展示,实时组件间距展示、实时拖拽排序、状态域管理,可视化属性配置、可视化样式配置、多设备适配展示,支持逻辑渲染、模板字符变量、表达式、自定义方法、自定义状态
by achannarasappa go
4150 GPL-3.0
Terminal stock ticker with live updates and position tracking
by google javascript
3551 MIT
A high performance blog template for the 11ty static site generator.
by pretzelhammer rust
3543 NOASSERTION
Educational blog posts for Rust beginners
by shuding javascript
3346 MIT
The Next.js Static Site Generator
by gnebbia python
2726 GPL-3.0
A minimalist command line knowledge base manager
by excalidraw typescript
28761 MIT
Virtual whiteboard for sketching hand-drawn like diagrams
by medusajs javascript
11158 MIT
The open-source Shopify alternative ⚡️
by vercel typescript
5580 MIT
Next.js Commerce
by brick-design typescript
4218 MIT
全场景流式布局,可视化拖拽、随意嵌套组合、实时渲染、实时辅助线展示,实时组件间距展示、实时拖拽排序、状态域管理,可视化属性配置、可视化样式配置、多设备适配展示,支持逻辑渲染、模板字符变量、表达式、自定义方法、自定义状态
by achannarasappa go
4150 GPL-3.0
Terminal stock ticker with live updates and position tracking
by google javascript
3551 MIT
A high performance blog template for the 11ty static site generator.
by pretzelhammer rust
3543 NOASSERTION
Educational blog posts for Rust beginners
by shuding javascript
3346 MIT
The Next.js Static Site Generator
by gnebbia python
2726 GPL-3.0
A minimalist command line knowledge base manager
1
394 Libraries
1457
2
303 Libraries
9468
3
135 Libraries
33734
4
77 Libraries
5740
5
68 Libraries
6171
6
63 Libraries
1631
7
59 Libraries
642
8
54 Libraries
12104
9
54 Libraries
619
10
53 Libraries
2446
Judge Yvonne Gonzalez Rogers ordered that iOS apps must be allowed to support non Apple payment options in the Epic v. Apple case. In this case, Apple also scored a partial victory as the judge stopped short of calling it a monopoly. The judge also ordered Epic Games to pay Apple 30% of its revenue through the direct payment system. Epic is fighting a similar lawsuit against Google. Countries like South Korea have passed laws requiring Apple and Google to offer alternative payment systems to their users in the country.
While the jury is still out on the Epic v. Apple case, it brings out two aspects. Is what is often referred to by developers as the "Apple Tax" of 30% indeed justified? For this reason, Epic launched the Epic Games Store to demonstrate that they could operate at a lower revenue cut of 12%.
The second aspect is platform and payments interoperability. When platform interoperability becomes mandated or a global best practice, developers should be ready to bring in payment gateways of their choice. The kandi kit for App Store Payment Alternatives showcases the popular open source payment gateways such as Omnipay, Active Merchant, and CI Merchant and libraries available to connect with leading payment platforms such as Stripe, Braintree, and Razorpay. Omnipay Core libraries and samples from Omnipay, a framework agnostic, multi-gateway payment processing library for PHP. Active Merchant Libraries on Active Merchant, a simple payment abstraction library extracted from Shopify. CI Merchant Though no longer actively supported use the library to build and support your own gateway. If you are not looking to build but to use, then leverage other frameworks. Braintree Libraries for Braintree integration. Razorpay Libraries for Razorpay integration. Stripe Libraries for Stripe integration.
Carousels (slideshows) are containers with images or information that users can select by clicking a button that forwards or backward through the slideshow. The image carousel is a container (slideshow) that users choose by clicking a button that is used to direct them to the next or previous image in the slideshow. A timer can automatically change the images, or they can be manually changed by clicking the buttons displayed.
Following are the steps to be followed for building Carousel And Screen Saver builder,
1. Transition Effect And Touch slider
2. Multiple Layout
3. Slider Libraries
4. Screen Saver Libraries Transition Effect And Touch slider These libraries are used to process the transition effect .
Slider Libraries These libraries are used to build the carousel .
Multiple Layout These libraries are used to build multiple layout in website.
Screen Saver Libraries These libraries are used to process the screen saver.
Amazon was recently fined $886 million for EU data privacy. The Luxembourg National Commission for Data Protection (CNPD) imposed the fine on Amazon Europe in a July 16 decision, the company disclosed in a regulatory filing. Amazon further stated that they strongly disagree with the CNPD’s ruling, and intended to appeal against it. In 2019, Google was fined a GDPR penalty of €50 million. GDPR Frameworks and Checklists GDPR-Transparency-and-Consent-Framework by InteractiveAdvertisingBureau and gdpr-checklist by privacyradius can help you understand the GDPR requirements and implementation approach. GDPR Scanners Use the below libraries for scanning GDPR compliance across different technologies and providers. GDPR Compliance Libraries Leverage the below libraries for implementing GDPR compliance, privacy policies and cookie consent in your website across specific technologies.
The penalty stems from the 2018 complaint by French privacy rights group La Quadrature du Net, to ensure Big Tech companies don’t use consumer data to manipulate their behavior for political or commercial purposes. It was filed on behalf of more than 10,000 customers and alleged that Amazon manipulates customers for commercial means by choosing what advertising and information they receive. The complaint also targeted Apple, Facebook, Google, and LinkedIn.
The General Data Protection Regulation (GDPR) is the strictest privacy and security law in the world. The regulation was put into effect on May 25, 2018. While it has been in effect for a while, complying to its 99 Articles and 173 Recitals of the Regulation could be difficult as seen with the case with the tech majors. The GDPR has inspired other legislations, such as Brazil’s LGPD to the CCPA in California. Hence compliance is critical for businesses around the world.
kandi collection on GDPR Compliance Solutions showcases popular open source libraries that help you in achieving GDPR compliance. The use cases span across frameworks and checklists, data scanners, and compliance toolkits. Do not construe this as legal advice.
Over 850 footballers in the UK have threatened to sue over 17 sports data processing companies over using their personal data without consent. While they have initially identified companies across sports data analytics, entertainment and betting, they believe over 150 companies could be using players' data without consent.
The core of the plea is non-compliance under Article 4 of the GDPR, which prohibits using personal data such as physical, physiological, location information without consent. To highlight the scale of the issue, about 7,000 pieces of information on one player are being used in analytics and other uses. If this legal action is successful, it can reshape how data is used in sports and across many industries. It can even create a new economy around 'data trading'.
While GDPR adherence and PII usage guidelines shape up globally over the next many years, it is essential for developers to proactively comply with current GDPR and develop strong practices around PII data governance. kandi kit on GDPR Review and Compliance showcases popular libraries that provide frameworks, scanners, best practices, and implementation utilities for GDPR compliance.
News source: https://www.bbc.com/news/uk-wales-58873132 GDPR Frameworks and Audits Solutions for understanding the GDPR framework, audit tools, and scanners. GDPR Compliance Implementation Utilities that enable you to implement GDPR compliance in our solutions.
Node.js is a flexible and lightweight platform that allows developers to build fast and scalable applications that work brilliantly in real-time. Its event-driven, non-blocking I/O model makes it highly efficient for data-intensive applications that need to run across multiple devices. Ecommerce applications often run on Node payment processing software components. These components work towards ensuring the integration of payment gateways, thereby enabling multiple payment options and risk-free authentication. Some of these payment processing platforms may include PayPal, Apple Pay, Google Pay, UnionPay, and similar applications. JavaScript’s dynamic and flexible environment ensures that every payment system runs smoothly and efficiently in real-time.
Here are our picks of the 15 best JavaScript Node.js payment processing libraries that are open source in 2022. expressCart - fully functioning Node.js shopping cart; stripe-node - Node.js library for the Stripe API; stripe-billing-typographic - Typographic is a complete, full-stack example of a Stripe Billing integration.
Technology has always been evolving at a breakneck speed, but the pace of change today is surely unprecedented. Applications of blockchain, for instance, go beyond cryptocurrencies into industries like finance, healthcare, supply chain and logistics, asset management, etc. It is one of the most disruptive technologies of the 21st century, and now you can program blockchain web apps using JavaScript.
With that in mind, here are some of the JavaScript libraries to help you in the process. ccxt - A cryptocurrency trading API; ZeroNet - Decentralized websites using Bitcoin crypto and the BitTorrent network; truffle - A tool for developing smart contracts. The following is a list of the most popular open-source libraries for building and scaling JavaScript Blockchain Applications.
In this digital world, the internet has changed the way we do our shopping. Online shopping is the act of purchasing products or services over the internet. It gathers all the information that will make all your internal and external recommendation processes, sales, and distribution based on the chronology of what you have been buying and bought earlier. Some of the libraries below can help you to achieve this as DIY. Data Collection Ecommerce Websites Ecommerce Services
The Trump Media and Technology Group is being investigated by Software Freedom Conservancy for non-compliance with copyleft licensing. The issue stems from President Donald Trump’s new social network, Truth Social appearing to be forked from Mastodon. While Mastodon is open source and available to use, it is licensed under Affero General Public License (or AGPLv3) that requires The Trump Media and Technology Group to share its source code with all who used the site. If they fail to do this within 30 days, their rights and permissions in the software are automatically and permanently terminated, making their platform inoperable.
So if you are just a developer or a former POTUS, copyleft provisions apply to all. If you want to use open source, use kandi.openweaver.com. All libraries are matched to SPDX license definitions and highlighted clearly for appropriate use.
Privacy, regulation, bias, and many other issues are weighing down popular social networks. Users are seeking self-hosted social platforms that can be governed by themselves. But do use them with the appropriate licenses. The kandi kit on Opensource Social Platforms lists popular opensource libraries that you can use to host private social channels.
Essential components for a Wordpress site with payment
Membuat prediksi akan ketepatan dengan adanya histori yang telah lalu dalam menentukan harga bertaruh dengan nominal tertentu seperti halnya kamu memberlakukankan dalam jual-beli saham, crypto dan yang terhubung dengan suatu indeks. Informasi akan bandar togel online dengan upaya penerapan jangkauan anda bisa langsung masuk dalam suatu unggahan di chicagoarealaceguild. Disitu kamu akan dibekali berbagai macam cara serta berikut adanya pemahaman yang dikembangkan oleh penulis untuk menjelaskan kepada pembaca secara lebih detail terkait prediksi yang akan membuat penentuan nilai taruhan. Bandar Togel Online Temukan bandar togel online terpercaya sekarang ini!
WebGL is a JavaScript API used to render 3D graphics within any compatible web browser without the use of plug-ins. It allows developers to create applications that display complex, photo-realistic 3D scenes within a web browser window. The WebGL library uses an array of functions that run on the GPU to create graphics. While this is great for gaming, it does not have the same level of functionality as OpenGL or DirectX.
Three.js is a library that makes it easy to create 3D interactive scenes in a web browser. It includes a scene graph, a custom lighting engine, and helper functions for common tasks such as loading assets, animating character models, and more. Three.js is currently the most popular library for managing 3D graphics on the Web. PixiJS is another popular library for working with WebGL graphics, which allows you to easily manage all aspects of your game, including animation, physics simulation, particle systems, and more, through its intuitive API, which is built around an object model. Full list of the best open source WebGL libraries are given below
If you are a Bitcoin enthusiast, then you need to know about the importance of Python Bitcoin Wallet libraries. These libraries help you to make your own wallet and store your Bitcoins. They are very useful for developers who want to create their own Bitcoin wallet application.
The freqtrade library is one of the most popular open-source crypto trading bot used to write Bitcoin wallets in Python. The Electrum library has been around for quite some time and has many features like two-factor authentication, multi-signature support, HD wallets; Plutus - automated bitcoin wallet collider and more! Discover 13 of the top and Popular Python Bitcoin Wallet open-source libraries for developers:
Java E-Commerce Libraries are used to build e-commerce websites. These libraries provide various frameworks, tools, and utilities for developing online shopping websites. There are many Java E-Commerce libraries available in the market, which enable you to write your own e-commerce website in easy steps. Java E-Commerce Libraries like shopizer, micro-ecommerce, and keyist-ecommerce are also used for developing an eCommerce website. These libraries are used in e-commerce applications since they provide a platform for making payment gateways, shopping carts, and other functionalities of an eCommerce website.
Shopizer is the most popular Java e-commerce library that allows you to create a customized online store without any coding. It comes with integrated payment gateways, shipping plugins, and many other features, which make it one of the best options for small businesses looking to start an online store. Keyist-Ecommerce is an open-source Java library that allows you to build an online store with minimal effort and time. The library supports multiple languages, including English, Chinese, Japanese and Korean. It also offers integrated payment gateways, shipping plugins, and other features that make it easy for developers to build custom websites without having to write any code themselves. Micro-eCommerce is an open-source Java library that allows you to build an online store without any coding knowledge required by developers. It has over 350 features built in along with integrated payment gateways, shipping plugins, and many other features that make it easy for developers to create custom websites. Some of the most popular Java E-Commerce Libraries among developers are given below
Build high quality encrypted wallets with other incredible features for your Bitcoin. Get ratings, code snippets & documentation for each library.
Judge Yvonne Gonzalez Rogers ordered that iOS apps must be allowed to support non Apple payment options in the Epic v. Apple case. In this case, Apple also scored a partial victory as the judge stopped short of calling it a monopoly. The judge also ordered Epic Games to pay Apple 30% of its revenue through the direct payment system. Epic is fighting a similar lawsuit against Google. Countries like South Korea have passed laws requiring Apple and Google to offer alternative payment systems to their users in the country.
While the jury is still out on the Epic v. Apple case, it brings out two aspects. Is what is often referred to by developers as the "Apple Tax" of 30% indeed justified? For this reason, Epic launched the Epic Games Store to demonstrate that they could operate at a lower revenue cut of 12%.
The second aspect is platform and payments interoperability. When platform interoperability becomes mandated or a global best practice, developers should be ready to bring in payment gateways of their choice. The kandi kit for App Store Payment Alternatives showcases the popular open source payment gateways such as Omnipay, Active Merchant, and CI Merchant and libraries available to connect with leading payment platforms such as Stripe, Braintree, and Razorpay. Omnipay Core libraries and samples from Omnipay, a framework agnostic, multi-gateway payment processing library for PHP. Active Merchant Libraries on Active Merchant, a simple payment abstraction library extracted from Shopify. CI Merchant Though no longer actively supported use the library to build and support your own gateway. If you are not looking to build but to use, then leverage other frameworks. Braintree Libraries for Braintree integration. Razorpay Libraries for Razorpay integration. Stripe Libraries for Stripe integration.
Carousels (slideshows) are containers with images or information that users can select by clicking a button that forwards or backward through the slideshow. The image carousel is a container (slideshow) that users choose by clicking a button that is used to direct them to the next or previous image in the slideshow. A timer can automatically change the images, or they can be manually changed by clicking the buttons displayed.
Following are the steps to be followed for building Carousel And Screen Saver builder,
1. Transition Effect And Touch slider
2. Multiple Layout
3. Slider Libraries
4. Screen Saver Libraries Transition Effect And Touch slider These libraries are used to process the transition effect .
Slider Libraries These libraries are used to build the carousel .
Multiple Layout These libraries are used to build multiple layout in website.
Screen Saver Libraries These libraries are used to process the screen saver.
Amazon was recently fined $886 million for EU data privacy. The Luxembourg National Commission for Data Protection (CNPD) imposed the fine on Amazon Europe in a July 16 decision, the company disclosed in a regulatory filing. Amazon further stated that they strongly disagree with the CNPD’s ruling, and intended to appeal against it. In 2019, Google was fined a GDPR penalty of €50 million. GDPR Frameworks and Checklists GDPR-Transparency-and-Consent-Framework by InteractiveAdvertisingBureau and gdpr-checklist by privacyradius can help you understand the GDPR requirements and implementation approach. GDPR Scanners Use the below libraries for scanning GDPR compliance across different technologies and providers. GDPR Compliance Libraries Leverage the below libraries for implementing GDPR compliance, privacy policies and cookie consent in your website across specific technologies.
The penalty stems from the 2018 complaint by French privacy rights group La Quadrature du Net, to ensure Big Tech companies don’t use consumer data to manipulate their behavior for political or commercial purposes. It was filed on behalf of more than 10,000 customers and alleged that Amazon manipulates customers for commercial means by choosing what advertising and information they receive. The complaint also targeted Apple, Facebook, Google, and LinkedIn.
The General Data Protection Regulation (GDPR) is the strictest privacy and security law in the world. The regulation was put into effect on May 25, 2018. While it has been in effect for a while, complying to its 99 Articles and 173 Recitals of the Regulation could be difficult as seen with the case with the tech majors. The GDPR has inspired other legislations, such as Brazil’s LGPD to the CCPA in California. Hence compliance is critical for businesses around the world.
kandi collection on GDPR Compliance Solutions showcases popular open source libraries that help you in achieving GDPR compliance. The use cases span across frameworks and checklists, data scanners, and compliance toolkits. Do not construe this as legal advice.
Over 850 footballers in the UK have threatened to sue over 17 sports data processing companies over using their personal data without consent. While they have initially identified companies across sports data analytics, entertainment and betting, they believe over 150 companies could be using players' data without consent.
The core of the plea is non-compliance under Article 4 of the GDPR, which prohibits using personal data such as physical, physiological, location information without consent. To highlight the scale of the issue, about 7,000 pieces of information on one player are being used in analytics and other uses. If this legal action is successful, it can reshape how data is used in sports and across many industries. It can even create a new economy around 'data trading'.
While GDPR adherence and PII usage guidelines shape up globally over the next many years, it is essential for developers to proactively comply with current GDPR and develop strong practices around PII data governance. kandi kit on GDPR Review and Compliance showcases popular libraries that provide frameworks, scanners, best practices, and implementation utilities for GDPR compliance.
News source: https://www.bbc.com/news/uk-wales-58873132 GDPR Frameworks and Audits Solutions for understanding the GDPR framework, audit tools, and scanners. GDPR Compliance Implementation Utilities that enable you to implement GDPR compliance in our solutions.
Node.js is a flexible and lightweight platform that allows developers to build fast and scalable applications that work brilliantly in real-time. Its event-driven, non-blocking I/O model makes it highly efficient for data-intensive applications that need to run across multiple devices. Ecommerce applications often run on Node payment processing software components. These components work towards ensuring the integration of payment gateways, thereby enabling multiple payment options and risk-free authentication. Some of these payment processing platforms may include PayPal, Apple Pay, Google Pay, UnionPay, and similar applications. JavaScript’s dynamic and flexible environment ensures that every payment system runs smoothly and efficiently in real-time.
Here are our picks of the 15 best JavaScript Node.js payment processing libraries that are open source in 2022. expressCart - fully functioning Node.js shopping cart; stripe-node - Node.js library for the Stripe API; stripe-billing-typographic - Typographic is a complete, full-stack example of a Stripe Billing integration.
Technology has always been evolving at a breakneck speed, but the pace of change today is surely unprecedented. Applications of blockchain, for instance, go beyond cryptocurrencies into industries like finance, healthcare, supply chain and logistics, asset management, etc. It is one of the most disruptive technologies of the 21st century, and now you can program blockchain web apps using JavaScript.
With that in mind, here are some of the JavaScript libraries to help you in the process. ccxt - A cryptocurrency trading API; ZeroNet - Decentralized websites using Bitcoin crypto and the BitTorrent network; truffle - A tool for developing smart contracts. The following is a list of the most popular open-source libraries for building and scaling JavaScript Blockchain Applications.
In this digital world, the internet has changed the way we do our shopping. Online shopping is the act of purchasing products or services over the internet. It gathers all the information that will make all your internal and external recommendation processes, sales, and distribution based on the chronology of what you have been buying and bought earlier. Some of the libraries below can help you to achieve this as DIY. Data Collection Ecommerce Websites Ecommerce Services
The Trump Media and Technology Group is being investigated by Software Freedom Conservancy for non-compliance with copyleft licensing. The issue stems from President Donald Trump’s new social network, Truth Social appearing to be forked from Mastodon. While Mastodon is open source and available to use, it is licensed under Affero General Public License (or AGPLv3) that requires The Trump Media and Technology Group to share its source code with all who used the site. If they fail to do this within 30 days, their rights and permissions in the software are automatically and permanently terminated, making their platform inoperable.
So if you are just a developer or a former POTUS, copyleft provisions apply to all. If you want to use open source, use kandi.openweaver.com. All libraries are matched to SPDX license definitions and highlighted clearly for appropriate use.
Privacy, regulation, bias, and many other issues are weighing down popular social networks. Users are seeking self-hosted social platforms that can be governed by themselves. But do use them with the appropriate licenses. The kandi kit on Opensource Social Platforms lists popular opensource libraries that you can use to host private social channels.
Essential components for a Wordpress site with payment
Membuat prediksi akan ketepatan dengan adanya histori yang telah lalu dalam menentukan harga bertaruh dengan nominal tertentu seperti halnya kamu memberlakukankan dalam jual-beli saham, crypto dan yang terhubung dengan suatu indeks. Informasi akan bandar togel online dengan upaya penerapan jangkauan anda bisa langsung masuk dalam suatu unggahan di chicagoarealaceguild. Disitu kamu akan dibekali berbagai macam cara serta berikut adanya pemahaman yang dikembangkan oleh penulis untuk menjelaskan kepada pembaca secara lebih detail terkait prediksi yang akan membuat penentuan nilai taruhan. Bandar Togel Online Temukan bandar togel online terpercaya sekarang ini!
WebGL is a JavaScript API used to render 3D graphics within any compatible web browser without the use of plug-ins. It allows developers to create applications that display complex, photo-realistic 3D scenes within a web browser window. The WebGL library uses an array of functions that run on the GPU to create graphics. While this is great for gaming, it does not have the same level of functionality as OpenGL or DirectX.
Three.js is a library that makes it easy to create 3D interactive scenes in a web browser. It includes a scene graph, a custom lighting engine, and helper functions for common tasks such as loading assets, animating character models, and more. Three.js is currently the most popular library for managing 3D graphics on the Web. PixiJS is another popular library for working with WebGL graphics, which allows you to easily manage all aspects of your game, including animation, physics simulation, particle systems, and more, through its intuitive API, which is built around an object model. Full list of the best open source WebGL libraries are given below
If you are a Bitcoin enthusiast, then you need to know about the importance of Python Bitcoin Wallet libraries. These libraries help you to make your own wallet and store your Bitcoins. They are very useful for developers who want to create their own Bitcoin wallet application.
The freqtrade library is one of the most popular open-source crypto trading bot used to write Bitcoin wallets in Python. The Electrum library has been around for quite some time and has many features like two-factor authentication, multi-signature support, HD wallets; Plutus - automated bitcoin wallet collider and more! Discover 13 of the top and Popular Python Bitcoin Wallet open-source libraries for developers:
Java E-Commerce Libraries are used to build e-commerce websites. These libraries provide various frameworks, tools, and utilities for developing online shopping websites. There are many Java E-Commerce libraries available in the market, which enable you to write your own e-commerce website in easy steps. Java E-Commerce Libraries like shopizer, micro-ecommerce, and keyist-ecommerce are also used for developing an eCommerce website. These libraries are used in e-commerce applications since they provide a platform for making payment gateways, shopping carts, and other functionalities of an eCommerce website.
Shopizer is the most popular Java e-commerce library that allows you to create a customized online store without any coding. It comes with integrated payment gateways, shipping plugins, and many other features, which make it one of the best options for small businesses looking to start an online store. Keyist-Ecommerce is an open-source Java library that allows you to build an online store with minimal effort and time. The library supports multiple languages, including English, Chinese, Japanese and Korean. It also offers integrated payment gateways, shipping plugins, and other features that make it easy for developers to build custom websites without having to write any code themselves. Micro-eCommerce is an open-source Java library that allows you to build an online store without any coding knowledge required by developers. It has over 350 features built in along with integrated payment gateways, shipping plugins, and many other features that make it easy for developers to create custom websites. Some of the most popular Java E-Commerce Libraries among developers are given below
Build high quality encrypted wallets with other incredible features for your Bitcoin. Get ratings, code snippets & documentation for each library.
QUESTION
Create new color scheme for dark-light mode in bootstrap sass
Asked 2022-Jan-16 at 19:50I want to create dark mode for a web site which use bootstrap. I have to add new root class which includes all boostrap colors. Here is my colors.scss:
1$primary:#065FC6;
2$secondary:#263C5C;
3$success:#49C96D;
4$danger:#FD7972;
5$warning:#FF965D;
6$light:#F8F8F8;
7$body-color: #263C5C;
8
9$custom-colors: (
10 "brd-default": $body-color
11 );
12
13
I want create new class like this:
1$primary:#065FC6;
2$secondary:#263C5C;
3$success:#49C96D;
4$danger:#FD7972;
5$warning:#FF965D;
6$light:#F8F8F8;
7$body-color: #263C5C;
8
9$custom-colors: (
10 "brd-default": $body-color
11 );
12
13:root.dark{
14 // override colors and classes for dark mode
15 $primary:#012345;
16 $secondary:#111111;
17 $success:#222222;
18}
19
So how can i copy and paste all bootstrap colors for new color scheme?
If i can add colors, i will change HTML class so my root(color scheme) will be:
in my styles.scss:
1$primary:#065FC6;
2$secondary:#263C5C;
3$success:#49C96D;
4$danger:#FD7972;
5$warning:#FF965D;
6$light:#F8F8F8;
7$body-color: #263C5C;
8
9$custom-colors: (
10 "brd-default": $body-color
11 );
12
13:root.dark{
14 // override colors and classes for dark mode
15 $primary:#012345;
16 $secondary:#111111;
17 $success:#222222;
18}
19@import "./colors";// custom colors
20@import "bootstrap/scss/functions";
21@import "bootstrap/scss/variables";
22@import "bootstrap/scss/utilities";
23
ANSWER
Answered 2021-Aug-07 at 20:32As explained here, there's no way to attach a class to :root
. However, you don't need this to achieve what you want.
Simply make a dark
class then you can add that as desired to the html or body tag.
Make all the needed theme color changes inside .dark{}, and then @import "bootstrap". When .dark
doesn't exist on the body, the theme colors will return to Bootstrap defaults.
1$primary:#065FC6;
2$secondary:#263C5C;
3$success:#49C96D;
4$danger:#FD7972;
5$warning:#FF965D;
6$light:#F8F8F8;
7$body-color: #263C5C;
8
9$custom-colors: (
10 "brd-default": $body-color
11 );
12
13:root.dark{
14 // override colors and classes for dark mode
15 $primary:#012345;
16 $secondary:#111111;
17 $success:#222222;
18}
19@import "./colors";// custom colors
20@import "bootstrap/scss/functions";
21@import "bootstrap/scss/variables";
22@import "bootstrap/scss/utilities";
23@import "functions";
24@import "variables";
25@import "mixins";
26
27
28.dark {
29
30 /* redefine theme colors for dark theme */
31 $primary: #012345;
32 $secondary: #111111;
33 $success: #222222;
34 $dark: #000;
35
36 $theme-colors: (
37 "primary": $primary,
38 "secondary": $secondary,
39 "success": $success,
40 "danger": $danger,
41 "info": $indigo,
42 "dark": $dark,
43 "light": $light,
44 );
45
46 /* redefine theme color variables */
47 @each $color, $value in $theme-colors {
48 --#{$variable-prefix}#{$color}: #{$value};
49 }
50
51 /* redefine theme color rgb vars (used for bg- colors) */
52 $theme-colors-rgb: map-loop($theme-colors, to-rgb, "$value");
53 @each $color, $value in $theme-colors-rgb {
54 --#{$variable-prefix}#{$color}-rgb: #{$value};
55 }
56
57 $body-color: #eeeeee;
58 $body-bg: #263C5C;
59
60 --#{$variable-prefix}body-color: #{$body-color};
61 --#{$variable-prefix}body-bg: #{$body-bg};
62
63 @import "bootstrap";
64}
65
66
QUESTION
The "(optional)" marker in cppreference.com documentation
Asked 2022-Jan-04 at 14:27Last week, I had a discussion with a colleague in understanding the documentation of C++ features on cppreference.com. We had a look at the documentation of the parameter packs, in particular the meaning of the (optional)
marker:
(Another example can be found here.)
I thought it means that this part of the syntax is optional. Meaning I can omit this part in the syntax, but it is always required to be supported by the compiler to comply with the C++ standard. But he stated that it means that it is optional in the standard and that a compiler does not need to support this feature to comply to the standard. Which is it? Both of these explanations make sense to me.
I couldn't find any kind of explanation on the cppreference web site. I also tried to google it but always landed at std::optional
...
ANSWER
Answered 2021-Aug-21 at 20:22It means that particular token is optional. For instance both these declarations work:
1template <class... Args>
2void foo();
3
4template <class...>
5void bar();
6
QUESTION
Why does this footer element just disappear when it has fixed positioning?
Asked 2022-Jan-02 at 08:12I'm experimenting with CSS in a codecademy project, and I noticed that when I set a footer to have fixed positioning (with no left/right/top/bottom properties set), it just disappears. I would expect it to just shrink the way it does with absolute positioning, but it doesn't. Without fixed positioning the footer is there where it should be, but with it, it's gone. Why is it behaving this way?
The footer in question is selected in the CSS in the footer
ruleset.
Here's the codepen: https://codepen.io/megas4ever/pen/ExwEEzv
And here's the full code:
1 <!DOCTYPE html>
2 <html>
3
4 <head>
5 <link href='https://fonts.googleapis.com/css?family=Raleway:400, 600' rel='stylesheet' type='text/css'>
6 <link href='style.css' rel='stylesheet' type='text/css'/>
7<style>
8
9html, body {
10 margin: 0;
11 padding: 0;
12 }
13
14 header {
15 background-color: #333333;
16 position: fixed;
17 top: 0;
18 width: 100%;
19 z-index: 1;
20 }
21
22 nav {
23 margin: 0;
24 padding: 20px 0;
25 }
26
27 nav li {
28 display: inline-block;
29 width: 80px;
30 color: #fff;
31 font-family: 'Raleway', sans-serif;
32 font-weight: 600;
33 font-size: 12px;
34 }
35
36 main {
37 text-align: center;
38 position: relative;
39 top: 80px;
40 }
41
42 main h1 {
43 color: #333;
44 font-family: 'Raleway', sans-serif;
45 font-weight: 600;
46 font-size: 70px;
47 margin-top: 0px;
48 padding-top: 80px;
49 margin-bottom: 80px;
50 text-transform: uppercase;
51 }
52
53 footer {
54 background-color: #333;
55 color: #fff;
56 padding: 30px 0;
57 position: fixed;
58 }
59
60 footer p {
61 font-family: 'Raleway', sans-serif;
62 text-transform: uppercase;
63 font-size: 11px;
64 }
65
66 .container {
67 max-width: 940px;
68 margin: 0 auto;
69 padding: 0 10px;
70 text-align: center;
71 }
72
73 .jumbotron {
74 height: 800px;
75 background-image: url("https://content.codecademy.com/projects/broadway/bg.jpg");
76 -webkit-background-size: cover;
77 -moz-background-size: cover;
78 -o-background-size: cover;
79 background-size: cover;
80 }
81
82 .btn-main {
83 background-color: #333;
84 color: #fff;
85 font-family: 'Raleway', sans-serif;
86 font-weight: 600;
87 font-size: 18px;
88 letter-spacing: 1.3px;
89 padding: 16px 40px;
90 text-decoration: none;
91 text-transform: uppercase;
92 }
93
94 .btn-default {
95 font-family: 'Raleway', sans-serif;
96 font-weight: 600;
97 font-size: 10px;
98 letter-spacing: 1.3px;
99 padding: 10px 20px;
100 text-decoration: none;
101 text-transform: uppercase;
102 margin-bottom: 20px;
103 }
104
105 .supporting {
106 padding-top: 80px;
107 padding-bottom: 100px;
108 }
109
110 .supporting .col {
111 font-family: 'Raleway', sans-serif;
112 text-align: center;
113 display: inline-block;
114 width: 200px;
115 height: 200px;
116 }
117
118 .supporting img {
119 height: 32px;
120 }
121
122 .supporting h2 {
123 font-weight: 600;
124 font-size: 23px;
125 text-transform: uppercase;
126 }
127
128 .supporting p {
129 font-weight: 400;
130 font-size: 14px;
131 line-height: 20px;
132 padding: 0 20px;
133 margin-bottom: 20px;
134 }
135
136 .supporting a {
137 background-color: white;
138 color: #333333;
139 font-family: 'Raleway', sans-serif;
140 font-weight: 600;
141 font-size: 12px;
142 letter-spacing: 1.3px;
143 text-decoration: none;
144 text-transform: uppercase;
145 padding: 10px;
146 margin-bottom: 10px;
147 border: 2px solid #333333;
148 }
149
150 @media (max-width: 500px) {
151 main h1 {
152 font-size: 50px;
153 padding: 0 40px;
154 }
155
156 .supporting .col {
157 width: 100%;
158 }
159 }
160
161</style>
162 </head>
163
164 <body>
165
166 <header>
167 <nav>
168 <ul>
169 <li> About </li> <li> Work </li> <li> Team </li> <li> Contact </li>
170 </ul>
171 </nav>
172 </header>
173
174 <main>
175 <div class="jumbotron">
176 <div class="container">
177 <h1>We are Broadway</h1>
178 <a href="#" class="btn-main"> Get Started </a>
179 </div>
180 </div>
181 </main>
182
183 <section class="supporting">
184 <div class="container">
185
186 <div class="col">
187 <img src="https://content.codecademy.com/projects/broadway/design.svg">
188 <h2>Design</h2>
189 <p>Make your projects look great and interact beautifully.</p>
190 <a href="#"> Learn More</a><br>
191 </div>
192
193 <div class="col">
194 <img src="https://content.codecademy.com/projects/broadway/develop.svg">
195 <h2>Develop</h2>
196 <p>Use modern tools to turn your design into a web site</p>
197 <a href="#"> Learn More</a><br>
198 </div>
199
200 <div class="col">
201 <img src="https://content.codecademy.com/projects/broadway/deploy.svg">
202 <h2>Deploy</h2>
203 <p>Use modern tools to turn your design into a web site</p>
204 <a href="#"> Learn More</a><br>
205 </div>
206
207 </div>
208 </section>
209
210 <footer>
211 <div class="container">
212 <p>&copy; Broadway 2017</p>
213 </div>
214 </footer>
215
216 </body>
217 </html>
218
ANSWER
Answered 2022-Jan-02 at 04:55Well, you've kind of hinted at the problem yourself already.
I noticed that when I set a footer to have fixed positioning (with no left/right/top/bottom properties set), it just disappears.
Just because you haven't provided left/right/top/bottom
properties, doesn't mean they are not in effect.
In this case, the default values (which most likely reflect the effective top/left values with the default position: static
) are just not ideal.
Since the footer takes up the full width of the screen, the left
value likely defaults to 0; this is fine and that's not the source of the problem.
But, since the footer is located on the bottom of your site, its auto/default top
value max well be like 2000px
-> you have to scroll down to even be able to see it.
Once you enabled fixed
positioning, and didn't provide any top
value yourself, that number would still be top: 2000px
. And since it's now fixed
in place, scrolling has no effect on it, which means its permanently located outside of your viewport. If your browser window was to be >2000px high, you would be able to see it, just hovering along by itself way below the rest of the site.
QUESTION
How to store text of tag "a" of a div in an arrray
Asked 2021-Dec-24 at 16:07I'm working on API, which extracts data from a web site. and the website is like - >
1<div id="mainContainer">
2<a class="item">text1</a>
3<a class="item">text2</a>
4<a class="item">text3</a>
5<a class="item">text4</a>
6<a class="item">text5</a>
7</div>
8
I want to store all text in an object like {"item1":"text1","item2":"text2"......}; here is what I'm doing
1<div id="mainContainer">
2<a class="item">text1</a>
3<a class="item">text2</a>
4<a class="item">text3</a>
5<a class="item">text4</a>
6<a class="item">text5</a>
7</div>
8var prediction = $('#mainContainer > item');
9console.log(prediction);
10
output
1<div id="mainContainer">
2<a class="item">text1</a>
3<a class="item">text2</a>
4<a class="item">text3</a>
5<a class="item">text4</a>
6<a class="item">text5</a>
7</div>
8var prediction = $('#mainContainer > item');
9console.log(prediction);
10<a class="item">text1</a><a class="item">text2</a><a class="item">text3</a>....
11
How do I do it ??
ANSWER
Answered 2021-Dec-24 at 11:07You can create an object and then populate it with an each
1<div id="mainContainer">
2<a class="item">text1</a>
3<a class="item">text2</a>
4<a class="item">text3</a>
5<a class="item">text4</a>
6<a class="item">text5</a>
7</div>
8var prediction = $('#mainContainer > item');
9console.log(prediction);
10<a class="item">text1</a><a class="item">text2</a><a class="item">text3</a>....
11values = {};
12$('#mainContainer a.item').each((i,x) => values['item'+(i+1)] = $(x).text())
13
QUESTION
Is there any way we can use flex instead of float to keep the boxes right and left in between the content?
Asked 2021-Dec-08 at 08:53I want to create a UI something like this example image by using flex and without negative margin -
The challenge is that I have used float and negative margin to create the same layout. But I don't want to use a negative value to set the green div outside the content. Also, I have used the float to keep the contents around the green boxes. But I want to use flex instead of float.
So, to summarize my question - Create a reference layout that will not use any float or negative value to align the boxes in green.
I have added the code snapshot here to take a look at my HTML and CSS.
Any help would be appreciated. Thanks in Advance.
1.container {
2 width: 50%;
3 text-align: justify;
4 margin: auto;
5}
6
7.box {
8 background-color: green;
9 width: 20%;
10 padding: 15px;
11 margin: 15px;
12}
13
14.right {
15 float: right;
16 margin-right: 0 !important;
17 margin-right: -15% !important;
18}
19
20.left {
21 float: left;
22 margin-left: 0 !important;
23 margin-left: -15% !important;
24}
1.container {
2 width: 50%;
3 text-align: justify;
4 margin: auto;
5}
6
7.box {
8 background-color: green;
9 width: 20%;
10 padding: 15px;
11 margin: 15px;
12}
13
14.right {
15 float: right;
16 margin-right: 0 !important;
17 margin-right: -15% !important;
18}
19
20.left {
21 float: left;
22 margin-left: 0 !important;
23 margin-left: -15% !important;
24}<div class="container">
25 <div class="paragrah">
26 electronictypesetting,remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheetscontainingLorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker includingversionsof Lorem
27 Ipsum. It is a long established fact that a reader will be distracted by the readable content of apage
28
29 <div class="box right"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque porttitor aliquet leo, et suscipit nulla sodales at. Praesent dictum imperdiet lacus nec pharetra.
30 </div>
31
32 when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distributionofletters, as opposed to using 'Content here, content here', making it look like readable English. Manydesktoppublishing packages and web page
33 editors now use Lorem Ipsum as their default model text, and a search for'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over theyears,sometimes by accident, sometimes on purpose (injected humour and
34 the like).Contrary to popular belief, Lorem Ipsum is not simply random text. Ithasroots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. RichardMcClintock, aLatin professor at Hampden-Sydney College in Virginia,
35 looked up one of the more obscure Latin words,consectetur,from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered theundoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus
36 Bonorum et Malorum"(TheExtremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics,verypopular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from alineinsection
37 1.10.32. There are many variations of passages of Lorem Ipsum available, but the majority havesufferedalteration in some form, by injected humour, or randomised words which don't look even slightly believable.Ifyou
38
39 <div class="box left"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque porttitor aliquet leo, et suscipit nulla sodales at. Praesent dictum imperdiet lacus nec pharetra. Ut ut risus ipsum ac leo auctor convallis.
40 </div>
41
42 are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden inthemiddle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks asnecessary,makingthis the first true generator
43 on the Internet. It uses a dictionary of over 200 Latin words, combined with ahandfulof model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum isthereforealways free from repetition, injected humour, or
44 non-characteristic words etc.he standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested.Sections1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exactoriginalform,accompanied
45 by English versions from the 1914 translation by H. Rackham. But I must explain to you how allthismistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account ofthesystem, and expound the actual teachings
46 of the great explorer of the truth, the master-builder of humanhappiness.No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do notknowhowto pursue pleasure rationally encounter consequences that are
47 extremely painful. Nor again is there anyonewholovesor pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstancesoccurinwhich toil and pain can procure him some great pleasure. To take a trivial example,
48 which of us everundertakeslaborious physical exercise, except to obtain some advantage from it? But who has any right to find faultwith amanwho chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces noresultant
49 pleasure? who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids apain that produces noresultant pleasure?who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids apain that produces noresultant
50 pleasure? who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids apain that produces noresultant pleasure? who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids apain that produces noresultant
51 pleasure? who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids apain that produces noresultant pleasure? who chooses to enjoy a pleasure that has no.
52 </div>
53</div>
ANSWER
Answered 2021-Dec-08 at 08:42No.
Flexbox is for laying boxes out in a row or column.
Float is for making text wrap around boxes.
You need float for this.
QUESTION
Error 400: redirect_uri_mismatch trying to access Google Drive
Asked 2021-Nov-29 at 16:21I know there are a ton of questions like this already, but none of the answers have helped me. I've listed all the suggested points at the end, please read there to see if I've missed anything.
I'm using the Google Drive C# API, and have a web site (Blazor, .NET5 in case it makes any difference) that has been working fine. I was using the client's Google credentials for this, had downloaded a JSON file (following instructions here) and all was well. When I first ran the web site in Visual Studio, I got the Google auth screen, in which I entered his email and password, and it worked. This created a JSON file in my web site which then allowed me to run the site next time without having to auth again.
In the credentials JSON file, I added the redirect URI, using the URI that VS uses when I debug the site. This gave me JSON file like this...
1{
2 "web": {
3 "client_id": "xxxxxxxxxxxxxxxx",
4 "project_id": "xxxxxxxxxxxxxxx",
5 "auth_uri": "https://accounts.google.com/o/oauth2/auth",
6 "token_uri": "https://oauth2.googleapis.com/token",
7 "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
8 "client_secret": "xxxxxxxxxxxxxxxxxxxxx",
9 "redirect_uris": [
10 "https://localhost:44378/authorize/",
11 "https://localhost:44378/authorize"
12 ],
13 "javascript_origins": [
14 "https://developers.google.com"
15 ]
16 }
17}
18
The code I use to create the Google service is quite closely copied from their .NET Quickstart (step 2)...
1{
2 "web": {
3 "client_id": "xxxxxxxxxxxxxxxx",
4 "project_id": "xxxxxxxxxxxxxxx",
5 "auth_uri": "https://accounts.google.com/o/oauth2/auth",
6 "token_uri": "https://oauth2.googleapis.com/token",
7 "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
8 "client_secret": "xxxxxxxxxxxxxxxxxxxxx",
9 "redirect_uris": [
10 "https://localhost:44378/authorize/",
11 "https://localhost:44378/authorize"
12 ],
13 "javascript_origins": [
14 "https://developers.google.com"
15 ]
16 }
17}
18UserCredential credential;
19using (FileStream stream = new(credJson, FileMode.Open, FileAccess.Read)) {
20 credential = GoogleWebAuthorizationBroker
21 .AuthorizeAsync(GoogleClientSecrets.FromStream(stream).Secrets,
22 new[] { DriveService.Scope.Drive },
23 "user",
24 CancellationToken.None,
25 new FileDataStore(tokenPath, true))
26 .Result;
27}
28DriveService service = new(new BaseClientService.Initializer {
29 HttpClientInitializer = credential,
30 ApplicationName = ""
31});
32
That all worked fine. Now the client has set up another Google account specially for this site, and wants me to use that instead. No problem, I went to the Google developer console for the new account and did the same as before, ie configured the OAuth screen, created a new OAuth credential, downloaded the JSON file, added the redirect URIs as shown above, and replaced the existing JSON file with the new one.
When I try to debug, I get the error shown in the title.
Having read loads of other questions about this error, I have checked and double-checked the following...
/authorize
with and without the trailing slash127.0.0.1
instead of localhost
None of this helped, I always get the same error.
The weird thing is that if I now revert my credentials JSON file back to what it was before (with the client's own Google account), I get the same error.
Anyone any ideas? As far as I can see, I've tried everything mentioned in other answers, but still get this error.
ANSWER
Answered 2021-Nov-29 at 16:21Hmm, reading your (very clear by the way!) question gives me the impression that all the changes you made were in the JSON file, not in the Google console. Correct me if I'm wrong, but I think that could be where you're hitting issues.
My (admittedly limited) experience leads me to believe that the redirect URIs in the JSON file are ignored, and it's the one(s) in the Google console that are used.
Forgive me if you already tried this, but try adding the following four URIs to your console, and then downloading the JSON file again...
1{
2 "web": {
3 "client_id": "xxxxxxxxxxxxxxxx",
4 "project_id": "xxxxxxxxxxxxxxx",
5 "auth_uri": "https://accounts.google.com/o/oauth2/auth",
6 "token_uri": "https://oauth2.googleapis.com/token",
7 "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
8 "client_secret": "xxxxxxxxxxxxxxxxxxxxx",
9 "redirect_uris": [
10 "https://localhost:44378/authorize/",
11 "https://localhost:44378/authorize"
12 ],
13 "javascript_origins": [
14 "https://developers.google.com"
15 ]
16 }
17}
18UserCredential credential;
19using (FileStream stream = new(credJson, FileMode.Open, FileAccess.Read)) {
20 credential = GoogleWebAuthorizationBroker
21 .AuthorizeAsync(GoogleClientSecrets.FromStream(stream).Secrets,
22 new[] { DriveService.Scope.Drive },
23 "user",
24 CancellationToken.None,
25 new FileDataStore(tokenPath, true))
26 .Result;
27}
28DriveService service = new(new BaseClientService.Initializer {
29 HttpClientInitializer = credential,
30 ApplicationName = ""
31});
32http://127.0.0.1/authorize/
33http://127.0.0.1/authorize
34https://127.0.0.1/authorize/
35https://127.0.0.1/authorize
36
As you've realised, you seem to need to include versions with and without a trailing slash. I've found you often need to include the non-SSL versions as well. Don't ask me why, as VS uses https when debugging, but this is Google!
Once you've updated the console, download the JSON and include the new version in your app.
Anyway, try that and see if it works.
QUESTION
Azure App Service .net6 Deploy - Error: EISDIR: illegal operation on a directory, open '/home/site/wwwroot/wwwroot/Identity/lib/bootstrap/LICENSE'
Asked 2021-Nov-28 at 13:03I updated my Asp.net core Blazor WebAssembly app to .net 6. Everything is fine, but the deploy from github actions doesn't work and throws this error:
1...
2Copying file: 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer.dll'
3Copying file: 'Microsoft.AspNetCore.Authentication.JwtBearer.dll'
4Omitting next output lines...
5Error: EISDIR: illegal operation on a directory, open '/home/site/wwwroot/wwwroot/Identity/lib/bootstrap/LICENSE'
6An error has occurred during web site deployment.
7Kudu Sync failed
8\n/opt/Kudu/Scripts/starter.sh "/home/site/deployments/tools/deploy.sh"
9Error: Failed to deploy web package to App Service.
10Error: Deployment Failed with Error: Package deployment using ZIP Deploy failed. Refer logs for more details.
11
What could be a problem here?
EDIT/SOLUTION:
Previously the path to licence file was: /home/site/wwwroot/wwwroot/Identity/lib/bootstrap/LICENSE/LICENSE
new file was without the LICENSE
dir. So when the new version of app arrived it tried to update the LICENSE file, which was actually a directory. Removing LICENSE/LICENSE
helped.
ANSWER
Answered 2021-Nov-15 at 05:26On Linux, it's important that any bash deployment scripts that get run have Unix line endings (LF) and not Windows line endings (CRLF).
Kuduscript will generate scripts with platform-appropriate line endings, but if those scripts are modified, or if you provide your own custom deployment scripts, it's important to make sure that your editor doesn't change the line endings.
If something seems off with your deployment script, you can always use the Kudu console to delete the contents of /home/site/deployments/tools.
This is the directory where Kudu caches kuduscript-generated deployment scripts. On the next deployment, the script will be regenerated.
The error you're currently seeing is a Kudu issue with running node/npm for deployments.
The easiest and fastest resolution for what you are currently seeing is to specify engines.node in your package.json.
Error: EISDIR: illegal operation on a directory, open '/home/site/wwwroot/wwwroot/Identity/lib/bootstrap/LICENSE'
EISDIR stands for "Error, Is Directory". This means that NPM is trying to do something to a file but it is a directory. In your case, NPM is trying to "read" a file which is a directory. Since the operation cannot be done the error is thrown.
Three things to make sure here
Note: You are giving Read, Write and Execute permissions to every one on that file.
QUESTION
How to access XML data with Coldfusion
Asked 2021-Oct-22 at 15:46A client wants me to add a weather forecast to his web site. The official weather report comes in an XML file and I need help accessing some of the elements in the file.
I can download the two XML files that contain the data needed on the site, and I can parse them into ColdFusion XML variables.
I can extract the data I need from the top levels, but it's lower levels that are causing me some heartburn. The XML files contain weather observations and forecasts for every location in the state. We don't need that - we just want to access the data about my client's location.
Here's a sample of the XML data I'm talking about
1<area aac="NSW_PT123" description="Richmond" type="location" parent-aac="NSW_PW005">
2 <forecast-period index="0" start-time-local="2021-10-16T17:00:00+11:00" end-time-local="2021-10-17T00:00:00+11:00" start-time-utc="2021-10-16T06:00:00Z" end-time-utc="2021-10-16T13:00:00Z">
3 <element type="forecast_icon_code">2</element>
4 <text type="precis">Clear.</text>
5 <text type="probability_of_precipitation">5%</text>
6 </forecast-period>
7 <forecast-period index="1" start-time-local="2021-10-17T00:00:00+11:00" end-time-local="2021-10-18T00:00:00+11:00" start-time-utc="2021-10-16T13:00:00Z" end-time-utc="2021-10-17T13:00:00Z">
8 <element type="forecast_icon_code">1</element>
9 <element type="air_temperature_minimum" units="Celsius">7</element>
10 <element type="air_temperature_maximum" units="Celsius">24</element>
11 <text type="precis">Sunny.</text>
12 <text type="probability_of_precipitation">0%</text>
13 </forecast-period>
14 <forecast-period index="2" start-time-local="2021-10-18T00:00:00+11:00" end-time-local="2021-10-19T00:00:00+11:00" start-time-utc="2021-10-17T13:00:00Z" end-time-utc="2021-10-18T13:00:00Z">
15 <element type="forecast_icon_code">1</element>
16 <element type="air_temperature_minimum" units="Celsius">7</element>
17 <element type="air_temperature_maximum" units="Celsius">28</element>
18 <text type="precis">Sunny.</text>
19 <text type="probability_of_precipitation">5%</text>
20 </forecast-period>
21
In this snippet, index="0"
indicates 'today' and index="1"
indicates 'tomorrow'. The client wants outlook for 7 days.
So currently out of all that XML data I need to identify which day it's about, the icon code (for the pretty pictures) and the Precis (usually a single word or short phrase), probability_of_precipitation (is it gonna rain?) and the times. The rest I can throw away.
In another file with similar structure, there's a long form forecast for another version of the page.
I've been able to access the attributes in the first line (aac
and description
) but what I need help with is how to access the forecast-period elements under that line. There are forecast-period
elements for all the other districts too, which we don't want to access.
I get to this part of the XML file with the ColdFusion XmlSearch/XPATH expression
1<area aac="NSW_PT123" description="Richmond" type="location" parent-aac="NSW_PW005">
2 <forecast-period index="0" start-time-local="2021-10-16T17:00:00+11:00" end-time-local="2021-10-17T00:00:00+11:00" start-time-utc="2021-10-16T06:00:00Z" end-time-utc="2021-10-16T13:00:00Z">
3 <element type="forecast_icon_code">2</element>
4 <text type="precis">Clear.</text>
5 <text type="probability_of_precipitation">5%</text>
6 </forecast-period>
7 <forecast-period index="1" start-time-local="2021-10-17T00:00:00+11:00" end-time-local="2021-10-18T00:00:00+11:00" start-time-utc="2021-10-16T13:00:00Z" end-time-utc="2021-10-17T13:00:00Z">
8 <element type="forecast_icon_code">1</element>
9 <element type="air_temperature_minimum" units="Celsius">7</element>
10 <element type="air_temperature_maximum" units="Celsius">24</element>
11 <text type="precis">Sunny.</text>
12 <text type="probability_of_precipitation">0%</text>
13 </forecast-period>
14 <forecast-period index="2" start-time-local="2021-10-18T00:00:00+11:00" end-time-local="2021-10-19T00:00:00+11:00" start-time-utc="2021-10-17T13:00:00Z" end-time-utc="2021-10-18T13:00:00Z">
15 <element type="forecast_icon_code">1</element>
16 <element type="air_temperature_minimum" units="Celsius">7</element>
17 <element type="air_temperature_maximum" units="Celsius">28</element>
18 <text type="precis">Sunny.</text>
19 <text type="probability_of_precipitation">5%</text>
20 </forecast-period>
21XmlSearch(IDN10064XML, "//area[@aac='NSW_PT123']")
22
So here's my question. In the example code above, (which i have no control over - it's what the government puts out) how do I create a variable that will give me the results
"Clear."
from the above precis element?"5%"
from the probability of precipitation element?"2"
from the forecast_icon_code element?ANSWER
Answered 2021-Oct-19 at 09:221<area aac="NSW_PT123" description="Richmond" type="location" parent-aac="NSW_PW005">
2 <forecast-period index="0" start-time-local="2021-10-16T17:00:00+11:00" end-time-local="2021-10-17T00:00:00+11:00" start-time-utc="2021-10-16T06:00:00Z" end-time-utc="2021-10-16T13:00:00Z">
3 <element type="forecast_icon_code">2</element>
4 <text type="precis">Clear.</text>
5 <text type="probability_of_precipitation">5%</text>
6 </forecast-period>
7 <forecast-period index="1" start-time-local="2021-10-17T00:00:00+11:00" end-time-local="2021-10-18T00:00:00+11:00" start-time-utc="2021-10-16T13:00:00Z" end-time-utc="2021-10-17T13:00:00Z">
8 <element type="forecast_icon_code">1</element>
9 <element type="air_temperature_minimum" units="Celsius">7</element>
10 <element type="air_temperature_maximum" units="Celsius">24</element>
11 <text type="precis">Sunny.</text>
12 <text type="probability_of_precipitation">0%</text>
13 </forecast-period>
14 <forecast-period index="2" start-time-local="2021-10-18T00:00:00+11:00" end-time-local="2021-10-19T00:00:00+11:00" start-time-utc="2021-10-17T13:00:00Z" end-time-utc="2021-10-18T13:00:00Z">
15 <element type="forecast_icon_code">1</element>
16 <element type="air_temperature_minimum" units="Celsius">7</element>
17 <element type="air_temperature_maximum" units="Celsius">28</element>
18 <text type="precis">Sunny.</text>
19 <text type="probability_of_precipitation">5%</text>
20 </forecast-period>
21XmlSearch(IDN10064XML, "//area[@aac='NSW_PT123']")
22<cffunction name="WeatherForecast" returntype="struct">
23 <cfargument name="weatherData" type="xml" required="yes">
24 <cfargument name="areaCode" type="string" required="yes">
25
26 <cfset var areas = XmlSearch(weatherData, "//area[@aac='#areaCode#']")>
27 <cfif ArrayLen(areas) eq 0>
28 <cfthrow message="WeatherForecast: area code #areaCode# not found.">
29 </cfif>
30
31 <cfset var textOnly = function (node) {
32 return node.XmlType == 'ATTRIBUTE' ? node.XmlValue : node.XmlText;
33 }>
34
35 <cfreturn {
36 icons: XmlSearch(areas[1], "./forecast-period/element[@type='forecast_icon_code']").map(textOnly),
37 precis: XmlSearch(areas[1], "./forecast-period/text[@type='precis']").map(textOnly),
38 precipitation: XmlSearch(areas[1], "./forecast-period/text[@type='probability_of_precipitation']").map(textOnly)
39 }>
40</cffunction>
41
Usage:
1<area aac="NSW_PT123" description="Richmond" type="location" parent-aac="NSW_PW005">
2 <forecast-period index="0" start-time-local="2021-10-16T17:00:00+11:00" end-time-local="2021-10-17T00:00:00+11:00" start-time-utc="2021-10-16T06:00:00Z" end-time-utc="2021-10-16T13:00:00Z">
3 <element type="forecast_icon_code">2</element>
4 <text type="precis">Clear.</text>
5 <text type="probability_of_precipitation">5%</text>
6 </forecast-period>
7 <forecast-period index="1" start-time-local="2021-10-17T00:00:00+11:00" end-time-local="2021-10-18T00:00:00+11:00" start-time-utc="2021-10-16T13:00:00Z" end-time-utc="2021-10-17T13:00:00Z">
8 <element type="forecast_icon_code">1</element>
9 <element type="air_temperature_minimum" units="Celsius">7</element>
10 <element type="air_temperature_maximum" units="Celsius">24</element>
11 <text type="precis">Sunny.</text>
12 <text type="probability_of_precipitation">0%</text>
13 </forecast-period>
14 <forecast-period index="2" start-time-local="2021-10-18T00:00:00+11:00" end-time-local="2021-10-19T00:00:00+11:00" start-time-utc="2021-10-17T13:00:00Z" end-time-utc="2021-10-18T13:00:00Z">
15 <element type="forecast_icon_code">1</element>
16 <element type="air_temperature_minimum" units="Celsius">7</element>
17 <element type="air_temperature_maximum" units="Celsius">28</element>
18 <text type="precis">Sunny.</text>
19 <text type="probability_of_precipitation">5%</text>
20 </forecast-period>
21XmlSearch(IDN10064XML, "//area[@aac='NSW_PT123']")
22<cffunction name="WeatherForecast" returntype="struct">
23 <cfargument name="weatherData" type="xml" required="yes">
24 <cfargument name="areaCode" type="string" required="yes">
25
26 <cfset var areas = XmlSearch(weatherData, "//area[@aac='#areaCode#']")>
27 <cfif ArrayLen(areas) eq 0>
28 <cfthrow message="WeatherForecast: area code #areaCode# not found.">
29 </cfif>
30
31 <cfset var textOnly = function (node) {
32 return node.XmlType == 'ATTRIBUTE' ? node.XmlValue : node.XmlText;
33 }>
34
35 <cfreturn {
36 icons: XmlSearch(areas[1], "./forecast-period/element[@type='forecast_icon_code']").map(textOnly),
37 precis: XmlSearch(areas[1], "./forecast-period/text[@type='precis']").map(textOnly),
38 precipitation: XmlSearch(areas[1], "./forecast-period/text[@type='probability_of_precipitation']").map(textOnly)
39 }>
40</cffunction>
41<cfset IDN10064XML = XmlParse(weatherXml, true)>
42<cfset forecast = WeatherForecast(IDN10064XML, "NSW_PT123")>
43
returns this struct:
1<area aac="NSW_PT123" description="Richmond" type="location" parent-aac="NSW_PW005">
2 <forecast-period index="0" start-time-local="2021-10-16T17:00:00+11:00" end-time-local="2021-10-17T00:00:00+11:00" start-time-utc="2021-10-16T06:00:00Z" end-time-utc="2021-10-16T13:00:00Z">
3 <element type="forecast_icon_code">2</element>
4 <text type="precis">Clear.</text>
5 <text type="probability_of_precipitation">5%</text>
6 </forecast-period>
7 <forecast-period index="1" start-time-local="2021-10-17T00:00:00+11:00" end-time-local="2021-10-18T00:00:00+11:00" start-time-utc="2021-10-16T13:00:00Z" end-time-utc="2021-10-17T13:00:00Z">
8 <element type="forecast_icon_code">1</element>
9 <element type="air_temperature_minimum" units="Celsius">7</element>
10 <element type="air_temperature_maximum" units="Celsius">24</element>
11 <text type="precis">Sunny.</text>
12 <text type="probability_of_precipitation">0%</text>
13 </forecast-period>
14 <forecast-period index="2" start-time-local="2021-10-18T00:00:00+11:00" end-time-local="2021-10-19T00:00:00+11:00" start-time-utc="2021-10-17T13:00:00Z" end-time-utc="2021-10-18T13:00:00Z">
15 <element type="forecast_icon_code">1</element>
16 <element type="air_temperature_minimum" units="Celsius">7</element>
17 <element type="air_temperature_maximum" units="Celsius">28</element>
18 <text type="precis">Sunny.</text>
19 <text type="probability_of_precipitation">5%</text>
20 </forecast-period>
21XmlSearch(IDN10064XML, "//area[@aac='NSW_PT123']")
22<cffunction name="WeatherForecast" returntype="struct">
23 <cfargument name="weatherData" type="xml" required="yes">
24 <cfargument name="areaCode" type="string" required="yes">
25
26 <cfset var areas = XmlSearch(weatherData, "//area[@aac='#areaCode#']")>
27 <cfif ArrayLen(areas) eq 0>
28 <cfthrow message="WeatherForecast: area code #areaCode# not found.">
29 </cfif>
30
31 <cfset var textOnly = function (node) {
32 return node.XmlType == 'ATTRIBUTE' ? node.XmlValue : node.XmlText;
33 }>
34
35 <cfreturn {
36 icons: XmlSearch(areas[1], "./forecast-period/element[@type='forecast_icon_code']").map(textOnly),
37 precis: XmlSearch(areas[1], "./forecast-period/text[@type='precis']").map(textOnly),
38 precipitation: XmlSearch(areas[1], "./forecast-period/text[@type='probability_of_precipitation']").map(textOnly)
39 }>
40</cffunction>
41<cfset IDN10064XML = XmlParse(weatherXml, true)>
42<cfset forecast = WeatherForecast(IDN10064XML, "NSW_PT123")>
43{
44 "PRECIPITATION": ["5%", "0%", "5%"],
45 "PRECIS": ["Clear.", "Sunny.", "Sunny."],
46 "ICONS": ["2", "1", "1"]
47}
48
Each part will contain as many values as there are <forecast-period>
elements for that <area>
in the XML, in the order they appear in the XML. In other words, forecast.precipitation[1]
will refer to "today", unless there is a chance that the XML ever arrives out of order (I doubt it).
Things like the time attribute values can be extracted in the same way:
1<area aac="NSW_PT123" description="Richmond" type="location" parent-aac="NSW_PW005">
2 <forecast-period index="0" start-time-local="2021-10-16T17:00:00+11:00" end-time-local="2021-10-17T00:00:00+11:00" start-time-utc="2021-10-16T06:00:00Z" end-time-utc="2021-10-16T13:00:00Z">
3 <element type="forecast_icon_code">2</element>
4 <text type="precis">Clear.</text>
5 <text type="probability_of_precipitation">5%</text>
6 </forecast-period>
7 <forecast-period index="1" start-time-local="2021-10-17T00:00:00+11:00" end-time-local="2021-10-18T00:00:00+11:00" start-time-utc="2021-10-16T13:00:00Z" end-time-utc="2021-10-17T13:00:00Z">
8 <element type="forecast_icon_code">1</element>
9 <element type="air_temperature_minimum" units="Celsius">7</element>
10 <element type="air_temperature_maximum" units="Celsius">24</element>
11 <text type="precis">Sunny.</text>
12 <text type="probability_of_precipitation">0%</text>
13 </forecast-period>
14 <forecast-period index="2" start-time-local="2021-10-18T00:00:00+11:00" end-time-local="2021-10-19T00:00:00+11:00" start-time-utc="2021-10-17T13:00:00Z" end-time-utc="2021-10-18T13:00:00Z">
15 <element type="forecast_icon_code">1</element>
16 <element type="air_temperature_minimum" units="Celsius">7</element>
17 <element type="air_temperature_maximum" units="Celsius">28</element>
18 <text type="precis">Sunny.</text>
19 <text type="probability_of_precipitation">5%</text>
20 </forecast-period>
21XmlSearch(IDN10064XML, "//area[@aac='NSW_PT123']")
22<cffunction name="WeatherForecast" returntype="struct">
23 <cfargument name="weatherData" type="xml" required="yes">
24 <cfargument name="areaCode" type="string" required="yes">
25
26 <cfset var areas = XmlSearch(weatherData, "//area[@aac='#areaCode#']")>
27 <cfif ArrayLen(areas) eq 0>
28 <cfthrow message="WeatherForecast: area code #areaCode# not found.">
29 </cfif>
30
31 <cfset var textOnly = function (node) {
32 return node.XmlType == 'ATTRIBUTE' ? node.XmlValue : node.XmlText;
33 }>
34
35 <cfreturn {
36 icons: XmlSearch(areas[1], "./forecast-period/element[@type='forecast_icon_code']").map(textOnly),
37 precis: XmlSearch(areas[1], "./forecast-period/text[@type='precis']").map(textOnly),
38 precipitation: XmlSearch(areas[1], "./forecast-period/text[@type='probability_of_precipitation']").map(textOnly)
39 }>
40</cffunction>
41<cfset IDN10064XML = XmlParse(weatherXml, true)>
42<cfset forecast = WeatherForecast(IDN10064XML, "NSW_PT123")>
43{
44 "PRECIPITATION": ["5%", "0%", "5%"],
45 "PRECIS": ["Clear.", "Sunny.", "Sunny."],
46 "ICONS": ["2", "1", "1"]
47}
48XmlSearch(areas[1], "./forecast-period/@start-time-local").map(textOnly)
49
QUESTION
How do you make your check constraint case insensitive in SQL?
Asked 2021-Oct-16 at 19:27This is my piece of code.
1CREATE TABLE ORDER_SOURCE(
2 OS_ID NUMBER(4),
3 OS_DESC VARCHAR2(20),
4 CONSTRAINT order_source_os_id_pk PRIMARY KEY (OS_ID),
5 CONSTRAINT order_source_os_desc_cc CHECK ((OS_DESC='CATALOG DESCRIPTION') OR (OS_DESC='WEB SITE'))
6);
7
I want to be able to insert values in lower case too. Example down Below:
1CREATE TABLE ORDER_SOURCE(
2 OS_ID NUMBER(4),
3 OS_DESC VARCHAR2(20),
4 CONSTRAINT order_source_os_id_pk PRIMARY KEY (OS_ID),
5 CONSTRAINT order_source_os_desc_cc CHECK ((OS_DESC='CATALOG DESCRIPTION') OR (OS_DESC='WEB SITE'))
6);
7INSERT INTO ORDER_SOURCE VALUES(0002,'Web Site');
8
But I can edit my check constraints to add 'Web Site' or 'Catalog', I just want to try something else. Thanks.
ANSWER
Answered 2021-Oct-16 at 15:21You may lowercase the column and then compare to lowercase string literals:
1CREATE TABLE ORDER_SOURCE(
2 OS_ID NUMBER(4),
3 OS_DESC VARCHAR2(20),
4 CONSTRAINT order_source_os_id_pk PRIMARY KEY (OS_ID),
5 CONSTRAINT order_source_os_desc_cc CHECK ((OS_DESC='CATALOG DESCRIPTION') OR (OS_DESC='WEB SITE'))
6);
7INSERT INTO ORDER_SOURCE VALUES(0002,'Web Site');
8CONSTRAINT order_source_os_desc_cc
9CHECK (LOWER(OS_DESC) IN ('catalog description', 'web site'))
10
QUESTION
Can I leave away an association class for many to many relations?
Asked 2021-Aug-05 at 22:55Just a simple question: I'm working on a class diagram for a dynamic web site for my internship. I have an association between two classes (client and article), the relation is many to many.
Normally I have to add an association class between them, but I don't want to because the client can only read the article's writing on the web page, and he cannot post. Is it correct if I don't draw the association class on the diagram?
ANSWER
Answered 2021-Aug-05 at 17:12There is no need to add association class only due to many to many relationship. The association class is needed when you have an association that at the same time is also a class, i.e. has some properties on its own.
You can use simple association with any multiplicity on any of the ends including having *
on both ends.
Community Discussions contain sources that include Stack Exchange Network
QUESTION
Create new color scheme for dark-light mode in bootstrap sass
Asked 2022-Jan-16 at 19:50I want to create dark mode for a web site which use bootstrap. I have to add new root class which includes all boostrap colors. Here is my colors.scss:
1$primary:#065FC6;
2$secondary:#263C5C;
3$success:#49C96D;
4$danger:#FD7972;
5$warning:#FF965D;
6$light:#F8F8F8;
7$body-color: #263C5C;
8
9$custom-colors: (
10 "brd-default": $body-color
11 );
12
13
I want create new class like this:
1$primary:#065FC6;
2$secondary:#263C5C;
3$success:#49C96D;
4$danger:#FD7972;
5$warning:#FF965D;
6$light:#F8F8F8;
7$body-color: #263C5C;
8
9$custom-colors: (
10 "brd-default": $body-color
11 );
12
13:root.dark{
14 // override colors and classes for dark mode
15 $primary:#012345;
16 $secondary:#111111;
17 $success:#222222;
18}
19
So how can i copy and paste all bootstrap colors for new color scheme?
If i can add colors, i will change HTML class so my root(color scheme) will be:
in my styles.scss:
1$primary:#065FC6;
2$secondary:#263C5C;
3$success:#49C96D;
4$danger:#FD7972;
5$warning:#FF965D;
6$light:#F8F8F8;
7$body-color: #263C5C;
8
9$custom-colors: (
10 "brd-default": $body-color
11 );
12
13:root.dark{
14 // override colors and classes for dark mode
15 $primary:#012345;
16 $secondary:#111111;
17 $success:#222222;
18}
19@import "./colors";// custom colors
20@import "bootstrap/scss/functions";
21@import "bootstrap/scss/variables";
22@import "bootstrap/scss/utilities";
23
ANSWER
Answered 2021-Aug-07 at 20:32As explained here, there's no way to attach a class to :root
. However, you don't need this to achieve what you want.
Simply make a dark
class then you can add that as desired to the html or body tag.
Make all the needed theme color changes inside .dark{}, and then @import "bootstrap". When .dark
doesn't exist on the body, the theme colors will return to Bootstrap defaults.
1$primary:#065FC6;
2$secondary:#263C5C;
3$success:#49C96D;
4$danger:#FD7972;
5$warning:#FF965D;
6$light:#F8F8F8;
7$body-color: #263C5C;
8
9$custom-colors: (
10 "brd-default": $body-color
11 );
12
13:root.dark{
14 // override colors and classes for dark mode
15 $primary:#012345;
16 $secondary:#111111;
17 $success:#222222;
18}
19@import "./colors";// custom colors
20@import "bootstrap/scss/functions";
21@import "bootstrap/scss/variables";
22@import "bootstrap/scss/utilities";
23@import "functions";
24@import "variables";
25@import "mixins";
26
27
28.dark {
29
30 /* redefine theme colors for dark theme */
31 $primary: #012345;
32 $secondary: #111111;
33 $success: #222222;
34 $dark: #000;
35
36 $theme-colors: (
37 "primary": $primary,
38 "secondary": $secondary,
39 "success": $success,
40 "danger": $danger,
41 "info": $indigo,
42 "dark": $dark,
43 "light": $light,
44 );
45
46 /* redefine theme color variables */
47 @each $color, $value in $theme-colors {
48 --#{$variable-prefix}#{$color}: #{$value};
49 }
50
51 /* redefine theme color rgb vars (used for bg- colors) */
52 $theme-colors-rgb: map-loop($theme-colors, to-rgb, "$value");
53 @each $color, $value in $theme-colors-rgb {
54 --#{$variable-prefix}#{$color}-rgb: #{$value};
55 }
56
57 $body-color: #eeeeee;
58 $body-bg: #263C5C;
59
60 --#{$variable-prefix}body-color: #{$body-color};
61 --#{$variable-prefix}body-bg: #{$body-bg};
62
63 @import "bootstrap";
64}
65
66
QUESTION
The "(optional)" marker in cppreference.com documentation
Asked 2022-Jan-04 at 14:27Last week, I had a discussion with a colleague in understanding the documentation of C++ features on cppreference.com. We had a look at the documentation of the parameter packs, in particular the meaning of the (optional)
marker:
(Another example can be found here.)
I thought it means that this part of the syntax is optional. Meaning I can omit this part in the syntax, but it is always required to be supported by the compiler to comply with the C++ standard. But he stated that it means that it is optional in the standard and that a compiler does not need to support this feature to comply to the standard. Which is it? Both of these explanations make sense to me.
I couldn't find any kind of explanation on the cppreference web site. I also tried to google it but always landed at std::optional
...
ANSWER
Answered 2021-Aug-21 at 20:22It means that particular token is optional. For instance both these declarations work:
1template <class... Args>
2void foo();
3
4template <class...>
5void bar();
6
QUESTION
Why does this footer element just disappear when it has fixed positioning?
Asked 2022-Jan-02 at 08:12I'm experimenting with CSS in a codecademy project, and I noticed that when I set a footer to have fixed positioning (with no left/right/top/bottom properties set), it just disappears. I would expect it to just shrink the way it does with absolute positioning, but it doesn't. Without fixed positioning the footer is there where it should be, but with it, it's gone. Why is it behaving this way?
The footer in question is selected in the CSS in the footer
ruleset.
Here's the codepen: https://codepen.io/megas4ever/pen/ExwEEzv
And here's the full code:
1 <!DOCTYPE html>
2 <html>
3
4 <head>
5 <link href='https://fonts.googleapis.com/css?family=Raleway:400, 600' rel='stylesheet' type='text/css'>
6 <link href='style.css' rel='stylesheet' type='text/css'/>
7<style>
8
9html, body {
10 margin: 0;
11 padding: 0;
12 }
13
14 header {
15 background-color: #333333;
16 position: fixed;
17 top: 0;
18 width: 100%;
19 z-index: 1;
20 }
21
22 nav {
23 margin: 0;
24 padding: 20px 0;
25 }
26
27 nav li {
28 display: inline-block;
29 width: 80px;
30 color: #fff;
31 font-family: 'Raleway', sans-serif;
32 font-weight: 600;
33 font-size: 12px;
34 }
35
36 main {
37 text-align: center;
38 position: relative;
39 top: 80px;
40 }
41
42 main h1 {
43 color: #333;
44 font-family: 'Raleway', sans-serif;
45 font-weight: 600;
46 font-size: 70px;
47 margin-top: 0px;
48 padding-top: 80px;
49 margin-bottom: 80px;
50 text-transform: uppercase;
51 }
52
53 footer {
54 background-color: #333;
55 color: #fff;
56 padding: 30px 0;
57 position: fixed;
58 }
59
60 footer p {
61 font-family: 'Raleway', sans-serif;
62 text-transform: uppercase;
63 font-size: 11px;
64 }
65
66 .container {
67 max-width: 940px;
68 margin: 0 auto;
69 padding: 0 10px;
70 text-align: center;
71 }
72
73 .jumbotron {
74 height: 800px;
75 background-image: url("https://content.codecademy.com/projects/broadway/bg.jpg");
76 -webkit-background-size: cover;
77 -moz-background-size: cover;
78 -o-background-size: cover;
79 background-size: cover;
80 }
81
82 .btn-main {
83 background-color: #333;
84 color: #fff;
85 font-family: 'Raleway', sans-serif;
86 font-weight: 600;
87 font-size: 18px;
88 letter-spacing: 1.3px;
89 padding: 16px 40px;
90 text-decoration: none;
91 text-transform: uppercase;
92 }
93
94 .btn-default {
95 font-family: 'Raleway', sans-serif;
96 font-weight: 600;
97 font-size: 10px;
98 letter-spacing: 1.3px;
99 padding: 10px 20px;
100 text-decoration: none;
101 text-transform: uppercase;
102 margin-bottom: 20px;
103 }
104
105 .supporting {
106 padding-top: 80px;
107 padding-bottom: 100px;
108 }
109
110 .supporting .col {
111 font-family: 'Raleway', sans-serif;
112 text-align: center;
113 display: inline-block;
114 width: 200px;
115 height: 200px;
116 }
117
118 .supporting img {
119 height: 32px;
120 }
121
122 .supporting h2 {
123 font-weight: 600;
124 font-size: 23px;
125 text-transform: uppercase;
126 }
127
128 .supporting p {
129 font-weight: 400;
130 font-size: 14px;
131 line-height: 20px;
132 padding: 0 20px;
133 margin-bottom: 20px;
134 }
135
136 .supporting a {
137 background-color: white;
138 color: #333333;
139 font-family: 'Raleway', sans-serif;
140 font-weight: 600;
141 font-size: 12px;
142 letter-spacing: 1.3px;
143 text-decoration: none;
144 text-transform: uppercase;
145 padding: 10px;
146 margin-bottom: 10px;
147 border: 2px solid #333333;
148 }
149
150 @media (max-width: 500px) {
151 main h1 {
152 font-size: 50px;
153 padding: 0 40px;
154 }
155
156 .supporting .col {
157 width: 100%;
158 }
159 }
160
161</style>
162 </head>
163
164 <body>
165
166 <header>
167 <nav>
168 <ul>
169 <li> About </li> <li> Work </li> <li> Team </li> <li> Contact </li>
170 </ul>
171 </nav>
172 </header>
173
174 <main>
175 <div class="jumbotron">
176 <div class="container">
177 <h1>We are Broadway</h1>
178 <a href="#" class="btn-main"> Get Started </a>
179 </div>
180 </div>
181 </main>
182
183 <section class="supporting">
184 <div class="container">
185
186 <div class="col">
187 <img src="https://content.codecademy.com/projects/broadway/design.svg">
188 <h2>Design</h2>
189 <p>Make your projects look great and interact beautifully.</p>
190 <a href="#"> Learn More</a><br>
191 </div>
192
193 <div class="col">
194 <img src="https://content.codecademy.com/projects/broadway/develop.svg">
195 <h2>Develop</h2>
196 <p>Use modern tools to turn your design into a web site</p>
197 <a href="#"> Learn More</a><br>
198 </div>
199
200 <div class="col">
201 <img src="https://content.codecademy.com/projects/broadway/deploy.svg">
202 <h2>Deploy</h2>
203 <p>Use modern tools to turn your design into a web site</p>
204 <a href="#"> Learn More</a><br>
205 </div>
206
207 </div>
208 </section>
209
210 <footer>
211 <div class="container">
212 <p>&copy; Broadway 2017</p>
213 </div>
214 </footer>
215
216 </body>
217 </html>
218
ANSWER
Answered 2022-Jan-02 at 04:55Well, you've kind of hinted at the problem yourself already.
I noticed that when I set a footer to have fixed positioning (with no left/right/top/bottom properties set), it just disappears.
Just because you haven't provided left/right/top/bottom
properties, doesn't mean they are not in effect.
In this case, the default values (which most likely reflect the effective top/left values with the default position: static
) are just not ideal.
Since the footer takes up the full width of the screen, the left
value likely defaults to 0; this is fine and that's not the source of the problem.
But, since the footer is located on the bottom of your site, its auto/default top
value max well be like 2000px
-> you have to scroll down to even be able to see it.
Once you enabled fixed
positioning, and didn't provide any top
value yourself, that number would still be top: 2000px
. And since it's now fixed
in place, scrolling has no effect on it, which means its permanently located outside of your viewport. If your browser window was to be >2000px high, you would be able to see it, just hovering along by itself way below the rest of the site.
QUESTION
How to store text of tag "a" of a div in an arrray
Asked 2021-Dec-24 at 16:07I'm working on API, which extracts data from a web site. and the website is like - >
1<div id="mainContainer">
2<a class="item">text1</a>
3<a class="item">text2</a>
4<a class="item">text3</a>
5<a class="item">text4</a>
6<a class="item">text5</a>
7</div>
8
I want to store all text in an object like {"item1":"text1","item2":"text2"......}; here is what I'm doing
1<div id="mainContainer">
2<a class="item">text1</a>
3<a class="item">text2</a>
4<a class="item">text3</a>
5<a class="item">text4</a>
6<a class="item">text5</a>
7</div>
8var prediction = $('#mainContainer > item');
9console.log(prediction);
10
output
1<div id="mainContainer">
2<a class="item">text1</a>
3<a class="item">text2</a>
4<a class="item">text3</a>
5<a class="item">text4</a>
6<a class="item">text5</a>
7</div>
8var prediction = $('#mainContainer > item');
9console.log(prediction);
10<a class="item">text1</a><a class="item">text2</a><a class="item">text3</a>....
11
How do I do it ??
ANSWER
Answered 2021-Dec-24 at 11:07You can create an object and then populate it with an each
1<div id="mainContainer">
2<a class="item">text1</a>
3<a class="item">text2</a>
4<a class="item">text3</a>
5<a class="item">text4</a>
6<a class="item">text5</a>
7</div>
8var prediction = $('#mainContainer > item');
9console.log(prediction);
10<a class="item">text1</a><a class="item">text2</a><a class="item">text3</a>....
11values = {};
12$('#mainContainer a.item').each((i,x) => values['item'+(i+1)] = $(x).text())
13
QUESTION
Is there any way we can use flex instead of float to keep the boxes right and left in between the content?
Asked 2021-Dec-08 at 08:53I want to create a UI something like this example image by using flex and without negative margin -
The challenge is that I have used float and negative margin to create the same layout. But I don't want to use a negative value to set the green div outside the content. Also, I have used the float to keep the contents around the green boxes. But I want to use flex instead of float.
So, to summarize my question - Create a reference layout that will not use any float or negative value to align the boxes in green.
I have added the code snapshot here to take a look at my HTML and CSS.
Any help would be appreciated. Thanks in Advance.
1.container {
2 width: 50%;
3 text-align: justify;
4 margin: auto;
5}
6
7.box {
8 background-color: green;
9 width: 20%;
10 padding: 15px;
11 margin: 15px;
12}
13
14.right {
15 float: right;
16 margin-right: 0 !important;
17 margin-right: -15% !important;
18}
19
20.left {
21 float: left;
22 margin-left: 0 !important;
23 margin-left: -15% !important;
24}
1.container {
2 width: 50%;
3 text-align: justify;
4 margin: auto;
5}
6
7.box {
8 background-color: green;
9 width: 20%;
10 padding: 15px;
11 margin: 15px;
12}
13
14.right {
15 float: right;
16 margin-right: 0 !important;
17 margin-right: -15% !important;
18}
19
20.left {
21 float: left;
22 margin-left: 0 !important;
23 margin-left: -15% !important;
24}<div class="container">
25 <div class="paragrah">
26 electronictypesetting,remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheetscontainingLorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker includingversionsof Lorem
27 Ipsum. It is a long established fact that a reader will be distracted by the readable content of apage
28
29 <div class="box right"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque porttitor aliquet leo, et suscipit nulla sodales at. Praesent dictum imperdiet lacus nec pharetra.
30 </div>
31
32 when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distributionofletters, as opposed to using 'Content here, content here', making it look like readable English. Manydesktoppublishing packages and web page
33 editors now use Lorem Ipsum as their default model text, and a search for'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over theyears,sometimes by accident, sometimes on purpose (injected humour and
34 the like).Contrary to popular belief, Lorem Ipsum is not simply random text. Ithasroots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. RichardMcClintock, aLatin professor at Hampden-Sydney College in Virginia,
35 looked up one of the more obscure Latin words,consectetur,from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered theundoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus
36 Bonorum et Malorum"(TheExtremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics,verypopular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from alineinsection
37 1.10.32. There are many variations of passages of Lorem Ipsum available, but the majority havesufferedalteration in some form, by injected humour, or randomised words which don't look even slightly believable.Ifyou
38
39 <div class="box left"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque porttitor aliquet leo, et suscipit nulla sodales at. Praesent dictum imperdiet lacus nec pharetra. Ut ut risus ipsum ac leo auctor convallis.
40 </div>
41
42 are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden inthemiddle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks asnecessary,makingthis the first true generator
43 on the Internet. It uses a dictionary of over 200 Latin words, combined with ahandfulof model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum isthereforealways free from repetition, injected humour, or
44 non-characteristic words etc.he standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested.Sections1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exactoriginalform,accompanied
45 by English versions from the 1914 translation by H. Rackham. But I must explain to you how allthismistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account ofthesystem, and expound the actual teachings
46 of the great explorer of the truth, the master-builder of humanhappiness.No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do notknowhowto pursue pleasure rationally encounter consequences that are
47 extremely painful. Nor again is there anyonewholovesor pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstancesoccurinwhich toil and pain can procure him some great pleasure. To take a trivial example,
48 which of us everundertakeslaborious physical exercise, except to obtain some advantage from it? But who has any right to find faultwith amanwho chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces noresultant
49 pleasure? who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids apain that produces noresultant pleasure?who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids apain that produces noresultant
50 pleasure? who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids apain that produces noresultant pleasure? who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids apain that produces noresultant
51 pleasure? who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids apain that produces noresultant pleasure? who chooses to enjoy a pleasure that has no.
52 </div>
53</div>
ANSWER
Answered 2021-Dec-08 at 08:42No.
Flexbox is for laying boxes out in a row or column.
Float is for making text wrap around boxes.
You need float for this.
QUESTION
Error 400: redirect_uri_mismatch trying to access Google Drive
Asked 2021-Nov-29 at 16:21I know there are a ton of questions like this already, but none of the answers have helped me. I've listed all the suggested points at the end, please read there to see if I've missed anything.
I'm using the Google Drive C# API, and have a web site (Blazor, .NET5 in case it makes any difference) that has been working fine. I was using the client's Google credentials for this, had downloaded a JSON file (following instructions here) and all was well. When I first ran the web site in Visual Studio, I got the Google auth screen, in which I entered his email and password, and it worked. This created a JSON file in my web site which then allowed me to run the site next time without having to auth again.
In the credentials JSON file, I added the redirect URI, using the URI that VS uses when I debug the site. This gave me JSON file like this...
1{
2 "web": {
3 "client_id": "xxxxxxxxxxxxxxxx",
4 "project_id": "xxxxxxxxxxxxxxx",
5 "auth_uri": "https://accounts.google.com/o/oauth2/auth",
6 "token_uri": "https://oauth2.googleapis.com/token",
7 "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
8 "client_secret": "xxxxxxxxxxxxxxxxxxxxx",
9 "redirect_uris": [
10 "https://localhost:44378/authorize/",
11 "https://localhost:44378/authorize"
12 ],
13 "javascript_origins": [
14 "https://developers.google.com"
15 ]
16 }
17}
18
The code I use to create the Google service is quite closely copied from their .NET Quickstart (step 2)...
1{
2 "web": {
3 "client_id": "xxxxxxxxxxxxxxxx",
4 "project_id": "xxxxxxxxxxxxxxx",
5 "auth_uri": "https://accounts.google.com/o/oauth2/auth",
6 "token_uri": "https://oauth2.googleapis.com/token",
7 "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
8 "client_secret": "xxxxxxxxxxxxxxxxxxxxx",
9 "redirect_uris": [
10 "https://localhost:44378/authorize/",
11 "https://localhost:44378/authorize"
12 ],
13 "javascript_origins": [
14 "https://developers.google.com"
15 ]
16 }
17}
18UserCredential credential;
19using (FileStream stream = new(credJson, FileMode.Open, FileAccess.Read)) {
20 credential = GoogleWebAuthorizationBroker
21 .AuthorizeAsync(GoogleClientSecrets.FromStream(stream).Secrets,
22 new[] { DriveService.Scope.Drive },
23 "user",
24 CancellationToken.None,
25 new FileDataStore(tokenPath, true))
26 .Result;
27}
28DriveService service = new(new BaseClientService.Initializer {
29 HttpClientInitializer = credential,
30 ApplicationName = ""
31});
32
That all worked fine. Now the client has set up another Google account specially for this site, and wants me to use that instead. No problem, I went to the Google developer console for the new account and did the same as before, ie configured the OAuth screen, created a new OAuth credential, downloaded the JSON file, added the redirect URIs as shown above, and replaced the existing JSON file with the new one.
When I try to debug, I get the error shown in the title.
Having read loads of other questions about this error, I have checked and double-checked the following...
/authorize
with and without the trailing slash127.0.0.1
instead of localhost
None of this helped, I always get the same error.
The weird thing is that if I now revert my credentials JSON file back to what it was before (with the client's own Google account), I get the same error.
Anyone any ideas? As far as I can see, I've tried everything mentioned in other answers, but still get this error.
ANSWER
Answered 2021-Nov-29 at 16:21Hmm, reading your (very clear by the way!) question gives me the impression that all the changes you made were in the JSON file, not in the Google console. Correct me if I'm wrong, but I think that could be where you're hitting issues.
My (admittedly limited) experience leads me to believe that the redirect URIs in the JSON file are ignored, and it's the one(s) in the Google console that are used.
Forgive me if you already tried this, but try adding the following four URIs to your console, and then downloading the JSON file again...
1{
2 "web": {
3 "client_id": "xxxxxxxxxxxxxxxx",
4 "project_id": "xxxxxxxxxxxxxxx",
5 "auth_uri": "https://accounts.google.com/o/oauth2/auth",
6 "token_uri": "https://oauth2.googleapis.com/token",
7 "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
8 "client_secret": "xxxxxxxxxxxxxxxxxxxxx",
9 "redirect_uris": [
10 "https://localhost:44378/authorize/",
11 "https://localhost:44378/authorize"
12 ],
13 "javascript_origins": [
14 "https://developers.google.com"
15 ]
16 }
17}
18UserCredential credential;
19using (FileStream stream = new(credJson, FileMode.Open, FileAccess.Read)) {
20 credential = GoogleWebAuthorizationBroker
21 .AuthorizeAsync(GoogleClientSecrets.FromStream(stream).Secrets,
22 new[] { DriveService.Scope.Drive },
23 "user",
24 CancellationToken.None,
25 new FileDataStore(tokenPath, true))
26 .Result;
27}
28DriveService service = new(new BaseClientService.Initializer {
29 HttpClientInitializer = credential,
30 ApplicationName = ""
31});
32http://127.0.0.1/authorize/
33http://127.0.0.1/authorize
34https://127.0.0.1/authorize/
35https://127.0.0.1/authorize
36
As you've realised, you seem to need to include versions with and without a trailing slash. I've found you often need to include the non-SSL versions as well. Don't ask me why, as VS uses https when debugging, but this is Google!
Once you've updated the console, download the JSON and include the new version in your app.
Anyway, try that and see if it works.
QUESTION
Azure App Service .net6 Deploy - Error: EISDIR: illegal operation on a directory, open '/home/site/wwwroot/wwwroot/Identity/lib/bootstrap/LICENSE'
Asked 2021-Nov-28 at 13:03I updated my Asp.net core Blazor WebAssembly app to .net 6. Everything is fine, but the deploy from github actions doesn't work and throws this error:
1...
2Copying file: 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer.dll'
3Copying file: 'Microsoft.AspNetCore.Authentication.JwtBearer.dll'
4Omitting next output lines...
5Error: EISDIR: illegal operation on a directory, open '/home/site/wwwroot/wwwroot/Identity/lib/bootstrap/LICENSE'
6An error has occurred during web site deployment.
7Kudu Sync failed
8\n/opt/Kudu/Scripts/starter.sh "/home/site/deployments/tools/deploy.sh"
9Error: Failed to deploy web package to App Service.
10Error: Deployment Failed with Error: Package deployment using ZIP Deploy failed. Refer logs for more details.
11
What could be a problem here?
EDIT/SOLUTION:
Previously the path to licence file was: /home/site/wwwroot/wwwroot/Identity/lib/bootstrap/LICENSE/LICENSE
new file was without the LICENSE
dir. So when the new version of app arrived it tried to update the LICENSE file, which was actually a directory. Removing LICENSE/LICENSE
helped.
ANSWER
Answered 2021-Nov-15 at 05:26On Linux, it's important that any bash deployment scripts that get run have Unix line endings (LF) and not Windows line endings (CRLF).
Kuduscript will generate scripts with platform-appropriate line endings, but if those scripts are modified, or if you provide your own custom deployment scripts, it's important to make sure that your editor doesn't change the line endings.
If something seems off with your deployment script, you can always use the Kudu console to delete the contents of /home/site/deployments/tools.
This is the directory where Kudu caches kuduscript-generated deployment scripts. On the next deployment, the script will be regenerated.
The error you're currently seeing is a Kudu issue with running node/npm for deployments.
The easiest and fastest resolution for what you are currently seeing is to specify engines.node in your package.json.
Error: EISDIR: illegal operation on a directory, open '/home/site/wwwroot/wwwroot/Identity/lib/bootstrap/LICENSE'
EISDIR stands for "Error, Is Directory". This means that NPM is trying to do something to a file but it is a directory. In your case, NPM is trying to "read" a file which is a directory. Since the operation cannot be done the error is thrown.
Three things to make sure here
Note: You are giving Read, Write and Execute permissions to every one on that file.
QUESTION
How to access XML data with Coldfusion
Asked 2021-Oct-22 at 15:46A client wants me to add a weather forecast to his web site. The official weather report comes in an XML file and I need help accessing some of the elements in the file.
I can download the two XML files that contain the data needed on the site, and I can parse them into ColdFusion XML variables.
I can extract the data I need from the top levels, but it's lower levels that are causing me some heartburn. The XML files contain weather observations and forecasts for every location in the state. We don't need that - we just want to access the data about my client's location.
Here's a sample of the XML data I'm talking about
1<area aac="NSW_PT123" description="Richmond" type="location" parent-aac="NSW_PW005">
2 <forecast-period index="0" start-time-local="2021-10-16T17:00:00+11:00" end-time-local="2021-10-17T00:00:00+11:00" start-time-utc="2021-10-16T06:00:00Z" end-time-utc="2021-10-16T13:00:00Z">
3 <element type="forecast_icon_code">2</element>
4 <text type="precis">Clear.</text>
5 <text type="probability_of_precipitation">5%</text>
6 </forecast-period>
7 <forecast-period index="1" start-time-local="2021-10-17T00:00:00+11:00" end-time-local="2021-10-18T00:00:00+11:00" start-time-utc="2021-10-16T13:00:00Z" end-time-utc="2021-10-17T13:00:00Z">
8 <element type="forecast_icon_code">1</element>
9 <element type="air_temperature_minimum" units="Celsius">7</element>
10 <element type="air_temperature_maximum" units="Celsius">24</element>
11 <text type="precis">Sunny.</text>
12 <text type="probability_of_precipitation">0%</text>
13 </forecast-period>
14 <forecast-period index="2" start-time-local="2021-10-18T00:00:00+11:00" end-time-local="2021-10-19T00:00:00+11:00" start-time-utc="2021-10-17T13:00:00Z" end-time-utc="2021-10-18T13:00:00Z">
15 <element type="forecast_icon_code">1</element>
16 <element type="air_temperature_minimum" units="Celsius">7</element>
17 <element type="air_temperature_maximum" units="Celsius">28</element>
18 <text type="precis">Sunny.</text>
19 <text type="probability_of_precipitation">5%</text>
20 </forecast-period>
21
In this snippet, index="0"
indicates 'today' and index="1"
indicates 'tomorrow'. The client wants outlook for 7 days.
So currently out of all that XML data I need to identify which day it's about, the icon code (for the pretty pictures) and the Precis (usually a single word or short phrase), probability_of_precipitation (is it gonna rain?) and the times. The rest I can throw away.
In another file with similar structure, there's a long form forecast for another version of the page.
I've been able to access the attributes in the first line (aac
and description
) but what I need help with is how to access the forecast-period elements under that line. There are forecast-period
elements for all the other districts too, which we don't want to access.
I get to this part of the XML file with the ColdFusion XmlSearch/XPATH expression
1<area aac="NSW_PT123" description="Richmond" type="location" parent-aac="NSW_PW005">
2 <forecast-period index="0" start-time-local="2021-10-16T17:00:00+11:00" end-time-local="2021-10-17T00:00:00+11:00" start-time-utc="2021-10-16T06:00:00Z" end-time-utc="2021-10-16T13:00:00Z">
3 <element type="forecast_icon_code">2</element>
4 <text type="precis">Clear.</text>
5 <text type="probability_of_precipitation">5%</text>
6 </forecast-period>
7 <forecast-period index="1" start-time-local="2021-10-17T00:00:00+11:00" end-time-local="2021-10-18T00:00:00+11:00" start-time-utc="2021-10-16T13:00:00Z" end-time-utc="2021-10-17T13:00:00Z">
8 <element type="forecast_icon_code">1</element>
9 <element type="air_temperature_minimum" units="Celsius">7</element>
10 <element type="air_temperature_maximum" units="Celsius">24</element>
11 <text type="precis">Sunny.</text>
12 <text type="probability_of_precipitation">0%</text>
13 </forecast-period>
14 <forecast-period index="2" start-time-local="2021-10-18T00:00:00+11:00" end-time-local="2021-10-19T00:00:00+11:00" start-time-utc="2021-10-17T13:00:00Z" end-time-utc="2021-10-18T13:00:00Z">
15 <element type="forecast_icon_code">1</element>
16 <element type="air_temperature_minimum" units="Celsius">7</element>
17 <element type="air_temperature_maximum" units="Celsius">28</element>
18 <text type="precis">Sunny.</text>
19 <text type="probability_of_precipitation">5%</text>
20 </forecast-period>
21XmlSearch(IDN10064XML, "//area[@aac='NSW_PT123']")
22
So here's my question. In the example code above, (which i have no control over - it's what the government puts out) how do I create a variable that will give me the results
"Clear."
from the above precis element?"5%"
from the probability of precipitation element?"2"
from the forecast_icon_code element?ANSWER
Answered 2021-Oct-19 at 09:221<area aac="NSW_PT123" description="Richmond" type="location" parent-aac="NSW_PW005">
2 <forecast-period index="0" start-time-local="2021-10-16T17:00:00+11:00" end-time-local="2021-10-17T00:00:00+11:00" start-time-utc="2021-10-16T06:00:00Z" end-time-utc="2021-10-16T13:00:00Z">
3 <element type="forecast_icon_code">2</element>
4 <text type="precis">Clear.</text>
5 <text type="probability_of_precipitation">5%</text>
6 </forecast-period>
7 <forecast-period index="1" start-time-local="2021-10-17T00:00:00+11:00" end-time-local="2021-10-18T00:00:00+11:00" start-time-utc="2021-10-16T13:00:00Z" end-time-utc="2021-10-17T13:00:00Z">
8 <element type="forecast_icon_code">1</element>
9 <element type="air_temperature_minimum" units="Celsius">7</element>
10 <element type="air_temperature_maximum" units="Celsius">24</element>
11 <text type="precis">Sunny.</text>
12 <text type="probability_of_precipitation">0%</text>
13 </forecast-period>
14 <forecast-period index="2" start-time-local="2021-10-18T00:00:00+11:00" end-time-local="2021-10-19T00:00:00+11:00" start-time-utc="2021-10-17T13:00:00Z" end-time-utc="2021-10-18T13:00:00Z">
15 <element type="forecast_icon_code">1</element>
16 <element type="air_temperature_minimum" units="Celsius">7</element>
17 <element type="air_temperature_maximum" units="Celsius">28</element>
18 <text type="precis">Sunny.</text>
19 <text type="probability_of_precipitation">5%</text>
20 </forecast-period>
21XmlSearch(IDN10064XML, "//area[@aac='NSW_PT123']")
22<cffunction name="WeatherForecast" returntype="struct">
23 <cfargument name="weatherData" type="xml" required="yes">
24 <cfargument name="areaCode" type="string" required="yes">
25
26 <cfset var areas = XmlSearch(weatherData, "//area[@aac='#areaCode#']")>
27 <cfif ArrayLen(areas) eq 0>
28 <cfthrow message="WeatherForecast: area code #areaCode# not found.">
29 </cfif>
30
31 <cfset var textOnly = function (node) {
32 return node.XmlType == 'ATTRIBUTE' ? node.XmlValue : node.XmlText;
33 }>
34
35 <cfreturn {
36 icons: XmlSearch(areas[1], "./forecast-period/element[@type='forecast_icon_code']").map(textOnly),
37 precis: XmlSearch(areas[1], "./forecast-period/text[@type='precis']").map(textOnly),
38 precipitation: XmlSearch(areas[1], "./forecast-period/text[@type='probability_of_precipitation']").map(textOnly)
39 }>
40</cffunction>
41
Usage:
1<area aac="NSW_PT123" description="Richmond" type="location" parent-aac="NSW_PW005">
2 <forecast-period index="0" start-time-local="2021-10-16T17:00:00+11:00" end-time-local="2021-10-17T00:00:00+11:00" start-time-utc="2021-10-16T06:00:00Z" end-time-utc="2021-10-16T13:00:00Z">
3 <element type="forecast_icon_code">2</element>
4 <text type="precis">Clear.</text>
5 <text type="probability_of_precipitation">5%</text>
6 </forecast-period>
7 <forecast-period index="1" start-time-local="2021-10-17T00:00:00+11:00" end-time-local="2021-10-18T00:00:00+11:00" start-time-utc="2021-10-16T13:00:00Z" end-time-utc="2021-10-17T13:00:00Z">
8 <element type="forecast_icon_code">1</element>
9 <element type="air_temperature_minimum" units="Celsius">7</element>
10 <element type="air_temperature_maximum" units="Celsius">24</element>
11 <text type="precis">Sunny.</text>
12 <text type="probability_of_precipitation">0%</text>
13 </forecast-period>
14 <forecast-period index="2" start-time-local="2021-10-18T00:00:00+11:00" end-time-local="2021-10-19T00:00:00+11:00" start-time-utc="2021-10-17T13:00:00Z" end-time-utc="2021-10-18T13:00:00Z">
15 <element type="forecast_icon_code">1</element>
16 <element type="air_temperature_minimum" units="Celsius">7</element>
17 <element type="air_temperature_maximum" units="Celsius">28</element>
18 <text type="precis">Sunny.</text>
19 <text type="probability_of_precipitation">5%</text>
20 </forecast-period>
21XmlSearch(IDN10064XML, "//area[@aac='NSW_PT123']")
22<cffunction name="WeatherForecast" returntype="struct">
23 <cfargument name="weatherData" type="xml" required="yes">
24 <cfargument name="areaCode" type="string" required="yes">
25
26 <cfset var areas = XmlSearch(weatherData, "//area[@aac='#areaCode#']")>
27 <cfif ArrayLen(areas) eq 0>
28 <cfthrow message="WeatherForecast: area code #areaCode# not found.">
29 </cfif>
30
31 <cfset var textOnly = function (node) {
32 return node.XmlType == 'ATTRIBUTE' ? node.XmlValue : node.XmlText;
33 }>
34
35 <cfreturn {
36 icons: XmlSearch(areas[1], "./forecast-period/element[@type='forecast_icon_code']").map(textOnly),
37 precis: XmlSearch(areas[1], "./forecast-period/text[@type='precis']").map(textOnly),
38 precipitation: XmlSearch(areas[1], "./forecast-period/text[@type='probability_of_precipitation']").map(textOnly)
39 }>
40</cffunction>
41<cfset IDN10064XML = XmlParse(weatherXml, true)>
42<cfset forecast = WeatherForecast(IDN10064XML, "NSW_PT123")>
43
returns this struct:
1<area aac="NSW_PT123" description="Richmond" type="location" parent-aac="NSW_PW005">
2 <forecast-period index="0" start-time-local="2021-10-16T17:00:00+11:00" end-time-local="2021-10-17T00:00:00+11:00" start-time-utc="2021-10-16T06:00:00Z" end-time-utc="2021-10-16T13:00:00Z">
3 <element type="forecast_icon_code">2</element>
4 <text type="precis">Clear.</text>
5 <text type="probability_of_precipitation">5%</text>
6 </forecast-period>
7 <forecast-period index="1" start-time-local="2021-10-17T00:00:00+11:00" end-time-local="2021-10-18T00:00:00+11:00" start-time-utc="2021-10-16T13:00:00Z" end-time-utc="2021-10-17T13:00:00Z">
8 <element type="forecast_icon_code">1</element>
9 <element type="air_temperature_minimum" units="Celsius">7</element>
10 <element type="air_temperature_maximum" units="Celsius">24</element>
11 <text type="precis">Sunny.</text>
12 <text type="probability_of_precipitation">0%</text>
13 </forecast-period>
14 <forecast-period index="2" start-time-local="2021-10-18T00:00:00+11:00" end-time-local="2021-10-19T00:00:00+11:00" start-time-utc="2021-10-17T13:00:00Z" end-time-utc="2021-10-18T13:00:00Z">
15 <element type="forecast_icon_code">1</element>
16 <element type="air_temperature_minimum" units="Celsius">7</element>
17 <element type="air_temperature_maximum" units="Celsius">28</element>
18 <text type="precis">Sunny.</text>
19 <text type="probability_of_precipitation">5%</text>
20 </forecast-period>
21XmlSearch(IDN10064XML, "//area[@aac='NSW_PT123']")
22<cffunction name="WeatherForecast" returntype="struct">
23 <cfargument name="weatherData" type="xml" required="yes">
24 <cfargument name="areaCode" type="string" required="yes">
25
26 <cfset var areas = XmlSearch(weatherData, "//area[@aac='#areaCode#']")>
27 <cfif ArrayLen(areas) eq 0>
28 <cfthrow message="WeatherForecast: area code #areaCode# not found.">
29 </cfif>
30
31 <cfset var textOnly = function (node) {
32 return node.XmlType == 'ATTRIBUTE' ? node.XmlValue : node.XmlText;
33 }>
34
35 <cfreturn {
36 icons: XmlSearch(areas[1], "./forecast-period/element[@type='forecast_icon_code']").map(textOnly),
37 precis: XmlSearch(areas[1], "./forecast-period/text[@type='precis']").map(textOnly),
38 precipitation: XmlSearch(areas[1], "./forecast-period/text[@type='probability_of_precipitation']").map(textOnly)
39 }>
40</cffunction>
41<cfset IDN10064XML = XmlParse(weatherXml, true)>
42<cfset forecast = WeatherForecast(IDN10064XML, "NSW_PT123")>
43{
44 "PRECIPITATION": ["5%", "0%", "5%"],
45 "PRECIS": ["Clear.", "Sunny.", "Sunny."],
46 "ICONS": ["2", "1", "1"]
47}
48
Each part will contain as many values as there are <forecast-period>
elements for that <area>
in the XML, in the order they appear in the XML. In other words, forecast.precipitation[1]
will refer to "today", unless there is a chance that the XML ever arrives out of order (I doubt it).
Things like the time attribute values can be extracted in the same way:
1<area aac="NSW_PT123" description="Richmond" type="location" parent-aac="NSW_PW005">
2 <forecast-period index="0" start-time-local="2021-10-16T17:00:00+11:00" end-time-local="2021-10-17T00:00:00+11:00" start-time-utc="2021-10-16T06:00:00Z" end-time-utc="2021-10-16T13:00:00Z">
3 <element type="forecast_icon_code">2</element>
4 <text type="precis">Clear.</text>
5 <text type="probability_of_precipitation">5%</text>
6 </forecast-period>
7 <forecast-period index="1" start-time-local="2021-10-17T00:00:00+11:00" end-time-local="2021-10-18T00:00:00+11:00" start-time-utc="2021-10-16T13:00:00Z" end-time-utc="2021-10-17T13:00:00Z">
8 <element type="forecast_icon_code">1</element>
9 <element type="air_temperature_minimum" units="Celsius">7</element>
10 <element type="air_temperature_maximum" units="Celsius">24</element>
11 <text type="precis">Sunny.</text>
12 <text type="probability_of_precipitation">0%</text>
13 </forecast-period>
14 <forecast-period index="2" start-time-local="2021-10-18T00:00:00+11:00" end-time-local="2021-10-19T00:00:00+11:00" start-time-utc="2021-10-17T13:00:00Z" end-time-utc="2021-10-18T13:00:00Z">
15 <element type="forecast_icon_code">1</element>
16 <element type="air_temperature_minimum" units="Celsius">7</element>
17 <element type="air_temperature_maximum" units="Celsius">28</element>
18 <text type="precis">Sunny.</text>
19 <text type="probability_of_precipitation">5%</text>
20 </forecast-period>
21XmlSearch(IDN10064XML, "//area[@aac='NSW_PT123']")
22<cffunction name="WeatherForecast" returntype="struct">
23 <cfargument name="weatherData" type="xml" required="yes">
24 <cfargument name="areaCode" type="string" required="yes">
25
26 <cfset var areas = XmlSearch(weatherData, "//area[@aac='#areaCode#']")>
27 <cfif ArrayLen(areas) eq 0>
28 <cfthrow message="WeatherForecast: area code #areaCode# not found.">
29 </cfif>
30
31 <cfset var textOnly = function (node) {
32 return node.XmlType == 'ATTRIBUTE' ? node.XmlValue : node.XmlText;
33 }>
34
35 <cfreturn {
36 icons: XmlSearch(areas[1], "./forecast-period/element[@type='forecast_icon_code']").map(textOnly),
37 precis: XmlSearch(areas[1], "./forecast-period/text[@type='precis']").map(textOnly),
38 precipitation: XmlSearch(areas[1], "./forecast-period/text[@type='probability_of_precipitation']").map(textOnly)
39 }>
40</cffunction>
41<cfset IDN10064XML = XmlParse(weatherXml, true)>
42<cfset forecast = WeatherForecast(IDN10064XML, "NSW_PT123")>
43{
44 "PRECIPITATION": ["5%", "0%", "5%"],
45 "PRECIS": ["Clear.", "Sunny.", "Sunny."],
46 "ICONS": ["2", "1", "1"]
47}
48XmlSearch(areas[1], "./forecast-period/@start-time-local").map(textOnly)
49
QUESTION
How do you make your check constraint case insensitive in SQL?
Asked 2021-Oct-16 at 19:27This is my piece of code.
1CREATE TABLE ORDER_SOURCE(
2 OS_ID NUMBER(4),
3 OS_DESC VARCHAR2(20),
4 CONSTRAINT order_source_os_id_pk PRIMARY KEY (OS_ID),
5 CONSTRAINT order_source_os_desc_cc CHECK ((OS_DESC='CATALOG DESCRIPTION') OR (OS_DESC='WEB SITE'))
6);
7
I want to be able to insert values in lower case too. Example down Below:
1CREATE TABLE ORDER_SOURCE(
2 OS_ID NUMBER(4),
3 OS_DESC VARCHAR2(20),
4 CONSTRAINT order_source_os_id_pk PRIMARY KEY (OS_ID),
5 CONSTRAINT order_source_os_desc_cc CHECK ((OS_DESC='CATALOG DESCRIPTION') OR (OS_DESC='WEB SITE'))
6);
7INSERT INTO ORDER_SOURCE VALUES(0002,'Web Site');
8
But I can edit my check constraints to add 'Web Site' or 'Catalog', I just want to try something else. Thanks.
ANSWER
Answered 2021-Oct-16 at 15:21You may lowercase the column and then compare to lowercase string literals:
1CREATE TABLE ORDER_SOURCE(
2 OS_ID NUMBER(4),
3 OS_DESC VARCHAR2(20),
4 CONSTRAINT order_source_os_id_pk PRIMARY KEY (OS_ID),
5 CONSTRAINT order_source_os_desc_cc CHECK ((OS_DESC='CATALOG DESCRIPTION') OR (OS_DESC='WEB SITE'))
6);
7INSERT INTO ORDER_SOURCE VALUES(0002,'Web Site');
8CONSTRAINT order_source_os_desc_cc
9CHECK (LOWER(OS_DESC) IN ('catalog description', 'web site'))
10
QUESTION
Can I leave away an association class for many to many relations?
Asked 2021-Aug-05 at 22:55Just a simple question: I'm working on a class diagram for a dynamic web site for my internship. I have an association between two classes (client and article), the relation is many to many.
Normally I have to add an association class between them, but I don't want to because the client can only read the article's writing on the web page, and he cannot post. Is it correct if I don't draw the association class on the diagram?
ANSWER
Answered 2021-Aug-05 at 17:12There is no need to add association class only due to many to many relationship. The association class is needed when you have an association that at the same time is also a class, i.e. has some properties on its own.
You can use simple association with any multiplicity on any of the ends including having *
on both ends.
Community Discussions contain sources that include Stack Exchange Network
Share this Page
Get latest updates on Web Site
Open Weaver – Develop Applications Faster with Open Source