Essentially backend frameworks consist of extensive libraries, APIs, web servers, and various other open-source components. They handle database management and help establish proper communication with the front-end of the website, as well as create backend functionality. Database-backed web applications such as Ruby on Rails, CakePHP, etc., that follow the MVC (model-view-controller) model enable 30–40% faster development.
Popular New Releases in Web Site
hugo
v0.97.3
gatsby
v4.12
strapi
v4.1.8
jekyll
v3.9.2
Ghost
4.45.0
Popular Libraries in Web Site
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
Trending New libraries in Web Site
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
Top Authors in Web Site
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
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
Trending Kits in Web Site
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.
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
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.
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.
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.
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.
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
Python Stock Indicator Library helps analyze and visualize financial market data. It will help analyze the performance of a particular index or stock. These libraries offer technical indicators like Bollinger Bands, Moving Averages, RSI, and MACD. These libraries offer easy-to-use APIs. Libraries help fetch stock prices and other financial data from different sources.
Some libraries can help create visualizations like scatter plots, line, and candlestick charts. These charts will help investors and traders to understand the data better. Libraries that can be used for deep learning and machine learning models. These will help predict future stock prices depending on historical data. Some libraries help test trading strategies using historical data to determine profitability.
Here are the 12 best Python Stock Indicator libraries to help developers:
examples-of-web-crawlers:
- The ability to manage the crawled URLs and follow links to new pages.
- The ability to handle many requests to many web pages to improve efficiency and speed.
- The ability to use proxy servers to hide the IP address and avoid being detected or blocked by websites.
abu:
- Offers a simple and user-friendly interface for data extraction and web crawling.
- Offers built-in data processing and storage functions like data filtering, cleaning, and storage.
- Offers data analysis functions like correlation analysis, trend analysis, and data visualization.
akshare:
- Help users easily acquire financial data and information from different sources.
- Offers various financial data like economic indicators, corporate financial statements, and stock prices.
- Offers real time data updates for many financial instruments.
rqalpha:
- Allows users to backtest and trade using historical and real time data.
- Offers a trading simulator to simulate trading activities in a real trading environment.
- Offers real time market data from Yahoo Finance, Wind, and RQData.
stock:
- Is a Python library designed for working with stock data from the Chinese stock market.
- Offers access to financial statements, market news, and stock prices.
- Allows users to aggregate data from different sources.
- Customize the data in different ways like format, calculation, and frequency.
alpha_vantage:
- Offers financial data APIs for developers and is a Python wrapper for these APIs.
- Offers historical and real time data for many financial instruments.
- Offers a simple and user-friendly interface for accessing financial data.
zvt:
- Is designed for analysis, trading strategy development, and financial data collection.
- Allows users to aggregate data from different sources.
- Customize the data in different ways like format, calculation, and frequency.
- Offers a backtesting engine to test their trading strategies using historical data.
MachineLearningStocks:
- Is designed to be highly extensible.
- Is an intuitive template project applying machine learning to making stock predictions.
- Allows to acquire fundamental historical data like predictors or features.
- Can use a machine learning model to learn from and preprocess data.
Personae:
- Helps with implementation of Supervised Learning and Deep Reinforcement Learning for Quantitative Trading.
- Helps create and manage character profiles in novels, role-playing games, or other projects.
- Help writers create well-rounded characters with motivations, behaviors, and consistent traits.
stockstats:
- Offers a collection of methods for calculating different technical indicators for financial data.
- Supports different financial data formats like pandas dataframe, numpy array, and CSV.
- Is a useful tool for financial analysts and traders who want to analyze financial data.
- Also, it can help make informed decisions based on technical analysis.
openctp:
- Is used to develop trading systems that use the CTP protocol.
- Offers an easy-to-use interface to connect to the CTP trading platform.
- Helps retrieve real-time market data and send and manage orders.
- Robust logging and error handling capabilities to help identify and resolve issues.
fooltrader:
- Is a Python library for retrieving, processing, and analyzing financial market data.
- Helps collect and process data from company filings, stock prices, and news articles.
- Support for backtesting trading strategies using historical market data.
This kandi kit on Fediverse applications helps you build federated social applications like Twitter. LinkedIn, Good Reads, Instagram, Reddit, and many more alternatives based on the ActivityPub protocol. You can use these popular open source libraries, such as Mastodon, PeerTube, WriteFreely, Plume, Owncast, Pixelfed, Misskey, BookWyrm, and others, to build your applications across micro, macro blogging, writing, reviews, podcasts, link aggregators, and professional networks.
A federated social network is a type of social network comprising multiple different providers or platforms. Instead of being controlled by a single company or organization, it is decentralized and distributed across these different providers. It enables interoperability among multiple social networks in a transparent way. The focus is on data exchange, and different networks adopt one unified data architecture so that a robust, heterogeneous network-of-networks can emerge.
Federated social networks solve issues commonly found in traditional social networking platforms, such as lack of user control and limited diversity in services. By joining a federated social network, you can select from various profile providers or even host your own server. This allows for greater innovation and flexibility. Additionally, profiles on different servers can communicate with each other seamlessly.
A federated social network comprises multiple independent services that communicate with each other using standard protocols. This allows users to interact with friends on different social networks without joining the same one. In other words, users from different social websites can communicate with each other seamlessly.
ActivityPub is a decentralized social networking protocol based on the ActivityPump protocol from Pump.io. It offers a client/server API for managing content and a server-to-server API for delivering notifications and content between federated servers. ActivityPub is recognized as an official standard by the World Wide Web Consortium’s (W3C) Social Web Networking Group.
ActivityPub is a protocol that allows different social media platforms to communicate with each other. It does this by providing a standardized way for platforms to create, update and delete content and deliver notifications and content between servers. This means that users on one platform can interact with users on another platform that implements the ActivityPub protocol.
For example, Alice is on a social media platform called “SocialA” and Bob is on another platform called “SocialB”. Both SocialA and SocialB implement the ActivityPub protocol. This means that Alice can follow Bob’s account on SocialB from her account on SocialA. When Bob posts something on SocialB, Alice will see it in her feed on SocialA. Similarly, when Alice likes or comments on Bob’s post from her SocialA account, Bob will see the like or comment on his SocialB account.
This is possible because both platforms use the same standardized communication method through the ActivityPub protocol.
Here are some cool open source applications to build micro, and macro blogging, writing, reviews, podcasts, link aggregators, and professional networks.
Here are the top NodeJS MongoDB libraries you can use to offer features to connect and manage connections to MongoDB databases, like encryption and authentication options. The features of MongoDB libraries depend on the programming language and the specific libraries used. It supports MongoDB’s GridFS feature, which allows storing and retrieving binary data and large files.
MongoDB library offers an easy-to-use interface for performing basic CRUD operations on the MongoDB collections. You can also get features for using MongoDB’s powerful Aggregation Framework for performing advanced data analysis and queries. This library provides schema validation to ensure data confirms a specific format or rule. It offers features that help create and manage indexes on MongoDB collections to optimize query performance. It offers support for MongoDB’s sharding and replication features, which will allow for high scalability and availability of the database. It also offers features for debugging and testing applications, like mock debuggers and databases.
Here is the list of the top 22 NodeJS MongoDB libraries that are handpicked to help developers choose the appropriate one as per their requirements:
prisma:
- Is a next-generation ORM (Object Relational Mapping) with tools like Prisma Studio, Migrate, and Client.
- Can be used in any NodeJS or TypeScript backend applications, like microservices and serverless applications, like GraphQL API, gRPC API, REST API, and anything that requires a database.
- Allows developers to define their application models in an intuitive data modeling language connected to a database and will define a generation.
mongoose:
- Is a MongoDB object modeling tool designed for working in an asynchronous environment that supports Deno and NodeJS.
- For delivering commercial maintenance and support for open source dependencies, you can use Tidelift for building your applications.
- Buffers all the commands until it is connected to the database so that you do not have to wait until it connects to MongoDB for defining models, running queries, and many more.
reaction:
- Is a headless commerce platform, API-first, built using MongoDB, GraphQL, and NodeJS, which plays nicely with Docker, Kubernetes, and npm.
- Returns data in split seconds, and quicker queries mean quicker web pages.
- A flexible plugin system will allow you to pick and select which integrations work best for you.
node-elm:
- Is a package that offers functionality for using the Elm programming language with NodeJS.
- You can compile Elm code to JavaScript, run tests, and generate documentation.
- Offers various utility functions for working with Elm code, like parsing source files and generating Elm code programmatically.
node-mongodb-native:
- Is the official MongoDB driver for NodeJS, maintained and developed by MongoDB Inc.
- Is designed to be scalable and performant, with support for features like streaming cursors and connection pooling.
- Also offers various utility functions for working with the binary format and BSON used by MongoDB.
payload:
- Is a CMS designed for developers from the ground up to deliver what they require to build a great digital product.
- Provides you with everything you need but takes a step back and lets you build what you want in JavaScript or TypeScript with no unnecessary complexity brought by GUIs.
- Completely control the admin panel by using your own React components and will swap out fields or even entire views easily.
nodeclub:
- Is a free and open-source community platform built on top of the NodeJS platform.
- A web-based discussion and forum board allows users to create and participate in discussions on diverse topics.
- Supports features like user authentication and authorization, search functionality, and email notifications.
mikro-orm:
- Is an open source TypeScript ORM which simplifies working with databases in NodeJS applications.
- Supports different databases like PostgreSQL, SQLite, MongoDB, and MySQL.
- You can easily define your data models using TypeScript decorators and classes and perform common CURD operations on your data with a few lines of code.
mean:
- Is a full-stack JavaScript open source solution that provides a solid starting point for NodeJS, AngularJS, MongoDB, and Express based applications.
- Builds a robust framework to support daily development requirements, which will help developers use better practices when working with JavaScript components.
- Offers reusable tools, guidelines, and modules to help developers build web applications efficiently and quickly.
mongo-express:
- Is a web-based administrative UI for MongoDB, a popular NoSQL database that provides an intuitive GUI that allows users to view and edit database indexes, documents, and collections.
- You can perform common administrative tasks like deleting or creating collections and databases, managing users and permissions, and removing or adding indexes.
- Allows you to execute MongoDB shell commands directly from the interface.
project_mern_memories:
- Is a code repository that contains the source code for web applications built using the MERN stack.
- Is a popular web development stack that includes four technologies, Express, NodeJS, MongoDB, and React.
- Includes features like image uploading and storage, pagination, and user authorization and authentication.
uptime:
- Monitor thousands of websites, check the presence of a pattern in the response body and tweak the frequency of monitoring on a per-check basis up to the second.
- Helps receive notifications whenever a check goes down by email, on the console, and screen.
- Can record availabilities statistics for further reporting and detailed uptime reports with animated charts.
builderbook:
- Is a comprehensive set of resources and tools for helping developers build and launch web applications efficiently and quickly.
- Includes various components and features which can be customized and integrated into any web application, like user management and authentication, email handling, and payment processing.
- Is focused on helping developers create a high-quality web application using modern technologies and best practices.
DoraCMS:
- Is a free and open source CMS built on top of the NodeJS platform, which offers a web-based administrative interface for managing users, site settings, and content.
- Is designed to be extensible and modular with a flexible plugin option, allowing developers to add new functionality and features to the CMS.
- Offers a RESTful API that can be used for interacting with the CMS programmatically.
mongodb-memory-server:
- Is an open source NodeJS library which offers an in-memory MongoDB server for development and testing purposes.
- Allows you to quickly spin up a MongoDB server instance in memory without requiring a separate MongoDB configuration or installation.
- You can write tests and develop applications that rely on MongoDB without requiring a separate MongoDB instance running on a remote server or your local machine.
monk:
- Is a lightweight MongoDB driver for NodeJS, offering an easy-to-use and simple API for interacting with MongoDB databases.
- Offers a high-level API that abstracts away many low-level details for working with MongoDB making it easy for developers to get started with minimal setup.
- Provides a simple and flexible query API that allows you to build any query easily.
mongojs:
- Is a lightweight NodeJS library that offers a simple API for interacting with MongoDB databases.
- Allows you to perform common database operations like map-reduce, CRUD operations, etc.
- Offers an intuitive and simple API that is easy to learn and use and supports various features like replication, sharding, and authentication.
myDrive:
- Is an open source cloud file storage server for hosting myDrive on your server or trusted platform and then accessing myDrive through your web browser.
- Uses MongoDB for storing folder/file metadata and will support multiple databases for storing the file chunks, like the Filesystem and Amazon S3.
- Is built using TypeScript and NodeJS and can help upload files, google drive support, and download files.
node-login:
- Is a NodeJS module that offers a simple authentication system for web applications.
- Is designed to be easy to use and customize and supports various authentication strategies, like password authentication and email, two-factor authentication, and OAuth authentication.
- Includes features like email verification, user profile management, password hashing, and session management.
mongorito:
- Is based on Redux, which opens the doors for customizing anything from model’s state to the behavior of core methods.
- Every model instance has a different Redux store, ensuring isolation between other models and easy extensibility.
- Ships with a barebones model with basic set/get, remove/save, and querying functionality and lets you be in control of what is included.
nodercms:
- Is an open source CMS built on top of the NodeJS platform, which offers a web-based administrative interface for managing users, content, and other site settings.
- You can create and manage posts, pages, and other content types and supports features like theme customization, plugin support, user authorization, and authentication.
- Is designed to be extensible and modular, with a flexible plugin architecture that allows developers to add new functionality and features to the CMS.
rest-api-nodejs-mongodb:
- Is a ready-to-use boilerplate for REST API Development with Express, MongoDB, and NodeJS.
- Offers pre-defined response structures with a proper status code, including CORS.
- Includes API collection for Postman, linting with Eslint, CI with Travis CI, and test cases with Chai and Mocha.
Here are some of the famous NodeJs CMS Libraries. NodeJs CMS Libraries can be used in Website and Blog Development, Content Management, E-commerce and Shopping Carts, Data Visualization, and User Management.
Nodejs CMS Libraries are libraries that allow developers to create content management systems (CMS) using the Node.js JavaScript runtime. Node.js is an open-source, cross-platform runtime environment for developing server-side and networking applications. Node.js CMS libraries are used to create rich and dynamic content for websites and applications.
Let us look at these libraries in detail below.
strapi
- Optimized for speed, allowing developers to quickly publish content and build applications.
- Supports both frontend and backend development.
- Built-in support for authentication, authorization, and other security features.
sails
- Automatic endpoint and model generation.
- Built-in ORM support.
- Real-time communication.
directus
- Provides a powerful RESTful API.
- Provides a built-in, multilingual interface.
- Allows you to easily create custom user roles.
keystone-classic
- Flexible Content Modeling.
- Automated Admin UI Generation.
- Simple Integration.
feathers
- Supports real-time communication with its built-in socket.io integration.
- Makes use of hooks to allow developers to customize their applications.
- Written in JavaScript and can be used on servers, browsers, and mobile devices.
apostrophe
- Asset manager allows users to store, organize, and access digital files.
- Integrated search capabilities make finding content and information on the website easy.
- Drag-and-drop page builder makes creating complex, multi-page websites easy without coding knowledge.
locomotive
- Powerful templating engine.
- Flexible support for multiple database engines.
- Built-in authentication and authorization.
Here are the best open source NodeJS CMS libraries for your applications. You can use these tools and components for developing highly scalable web applications.
Using a NodeJS CMS library will help you build a fast and high performance self-hosted backend for your application with pre-existing things like an admin dashboard, file management, authentication for administration, content CRUD, and so on. There are several types of CMS libraries available, like Headless CMS, NodeJS specific CMS, Traditional CMS, and Hybrid CMS.
We have handpicked the top and trending NodeJS CMS libraries for your next project below.
starpi:
- Used for developing systematic and well-configured web and mobile applications.
- Comes with an intuitive content management system that will simplify the content development architecture and provides a wonderful experience.
- Features a rich markdown editor which can engineer different content types.
Ghost:
- Used for powerful blogging platforms.
- User-friendly interface where you can work for hours of editing without any distractions.
- Comes with built-in SEO features and social sharing options.
apostrophe:
- Used for creating and maintaining websites and web applications of all categories.
- Comes with versatile content editing tools for easy maintenance of your content.
- Comes with Drag and Drop feature for organizing components and comes with a solid text editor powered by CKEditor.
keystone-classic:
- Used for developing RESTful APIs, platforms, online forums, and e-commerce applications.
- MVC architecture makes it easy to build the required structure for rendered data.
- Is extremely lightweight and will provide a rich API for database administration.
reaction:
- Uses multiple solid platforms like MongoDB, CoffeeScript, and Meteor.
- Will let your users have a hi-tech shopping experience and provide them with home-grown, budget-friendly, and zero vendor lock-in solutions.
- Can easily integrate with any service provider because it comes with a highly effective tech stack providing easy integration.
relax:
- Comes with a live page builder and provides simple and easy methods for binding data with components.
- Use the Sharp module for resizing the images quickly.
- Comes with a clean dashboard for presenting the least amount of data you need to access different actions.
calipso:
- Modular CMS that makes it easy to handle in-depth features of the system.
- Allows you to drag content from any source as it offers a scheduler and provides modules to the core.
- Do not support catching yet but can take 180 hits per second.
pencilblue:
- A very responsive platform for creating all types of websites.
- Can be used for developing any plugin networks that are highly moderated and work directly with your system’s core functions.
- Offers built-in support for Bootstrap, Angular JS, and JQueryUI.
Buckets-JS:
- Offers innovative segmentation technology which can transform the communication between the upper hand and their online customers.
- Provides structured and organized pathways for content management.
- Allows you to add, delete, or update your content quickly.
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:
I am digital marketing experts I am freelancer
Build high quality encrypted wallets with other incredible features for your Bitcoin. Get ratings, code snippets & documentation for each library.
Trending Discussions on Web Site
Create new color scheme for dark-light mode in bootstrap sass
The "(optional)" marker in cppreference.com documentation
Why does this footer element just disappear when it has fixed positioning?
How to store text of tag "a" of a div in an arrray
Is there any way we can use flex instead of float to keep the boxes right and left in between the content?
Error 400: redirect_uri_mismatch trying to access Google Drive
Azure App Service .net6 Deploy - Error: EISDIR: illegal operation on a directory, open '/home/site/wwwroot/wwwroot/Identity/lib/bootstrap/LICENSE'
How to access XML data with Coldfusion
How do you make your check constraint case insensitive in SQL?
Can I leave away an association class for many to many relations?
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...
- The URI that VS uses never changes. Specifically, the port is always 44378
- The base URI in the Google console and in my JSON file is the exact URI in the browser address bar when I'm debugging, I just added
/authorize
with and without the trailing slash - The URI that the Google window shows is of the form http://127.0.0.1:59777/authorize/, although the port number changes every time. It is not picking up the port that VS uses. Adding the one Google shows is a waste of time, as next time I try, it shows a different port
- I have tried using
127.0.0.1
instead oflocalhost
- I have tried removing the port altogether from the redirect URI
- I have tried setting the redirect URIs in both the Google console (and waiting for them to update in case this was needed) and in the JSON file
- When I created the credentials, I set is as a web project, not a desktop one
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?
- app works on local
- I updated the azure app to .net6 in configuration
- I tried to restart the app
- the app is in Central US region
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
- Make sure the file exists. If it does not, you need to create it. (If NPM depends on any specific information in the file, you will need to have that information there).
- Make sure it is in fact a file and not a directory.
- It has the right permissions. You can change the file to have all permissions with "sudo chmod 777 FILE_NAME".
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