teleren/devto huggingface dataset:
Add Notifications to a 3rd party Website
Tags: webdev, javascript
Published: 2021-11-17 09:09:02

Ever had to monitor a long running process on a webpage like Jenkins? Constantly switching tabs to check if a long running task is finished is a pain, and we can ameliorate it with a small amount of code.

[MDN has a great article on the notification API](https://developer.mozilla.org/en-US/docs/Web/API/notification) so I'll skip that part in this blog post. (Flavio Copes also wrote [a great introduction to the Notification API](https://flaviocopes.com/notifications-api/)) What I want to show you is how to use that API in a page.

There's a great tool called [Violent Monkey](https://violentmonkey.github.io/) which lets you add your own Javascript userscripts to run on a 3rd party website. Using a userscript, we can trigger the Notification API for almost any page event. (There's also a cool separate tool for adding your own CSS called [stylus](https://add0n.com/stylus.html) which is outside the scope of this blog).

The trick is to add an event listener or selector in Javascript for the thing you want to notify on. For example, when Jenkins finishes a build, it changes the header color from blue to green or red. We can use a CSS selector via `document.querySelector()` that when a classname has been added to a specific DOM node, that our script will trigger a notification.

Check out my example using the selector method:
{% gist https://gist.github.com/barakplasma/b2428b62d079a8b0d75dacd122292c44 %}

Notice that it runs in a somewhat recursive loop, with a base case that does not trigger a second alert.

Which pages do you need a notification for?
¿Cómo dibujar 3D AutoCAD?
Published: 2021-11-17 09:00:52

A día de hoy el mundo del dibujo en 3D ha tomado un auge espectacular debido a la facilidad y la explosión que nos han traído las plataformas de diseño asistido por ordenador en tres dimensiones. La mayoría de ingenieros o diseñadores representan sus diseños a través de modelos con los que revelan cuál será la forma final de una pieza, para realizar esta tarea que aparentemente parece complicada, tenemos que aprender a [dibujar 3D AutoCAD.](https://mundoacad.com/como-dibujar-en-3d-en-autocad)

## Ventajas de dibujar 3D en AutoCAD #

Para profesionales de diseño, arquitectura e ingeniería, sabiendo que las ventajas de AutoCAD 3D significan la preparación de proyectos de categoría profesional. Con vistas a todas las esquinas, le permiten verificar detallar la estructura de la traza, el plan o la construcción, detección de defectos que pueden estar presentes en el proyecto.

Además, sabiendo dibujar en AutoCAD 3D, puede hacer bocetos y diseños profesionales que sirvan para completar el diseño de diseño y la cartera de trabajo donde ha puesto en práctica todas las habilidades y conocimientos que tiene en programas de diseño.

## Conclusión de como dibujar 3D AutoCAD #

La conclusión que sacamos desde [mundoAcad](https://mundoAcad.com) es que antes de saltar al mundo de dibujar AutoCAD 3D, se explicará un poco la principal ventaja del dibujo 3D sobre el modelado 2D tradicional.

Cabe recordar que antes de la existencia de los programas para realizar dibujos 3D, el dibujo técnico era una actividad dominada exclusivamente por los instrumentos de dibujo ya que para obtener un buen resultado era necesario utilizar herramientas específicas como reglas, cuadrados, compases, lápices, rotuladores, etc.
Laravel Maintenance Mode
Tags: laravel, php, programming, beginners
Published: 2021-11-17 08:51:55

Let's put our app into maintenance mode
```php
php artisan down
```
Let's make it load continuously every 15 seconds to make sure it's still in maintenance mode
```php
php artisan down --refresh=15
```
use the secret option to specify a maintenance mode bypass token:
```php
php artisan down --secret="1630542a-246b-4b66-afa1-dd72a4c43515"
https://example.com/1630542a-246b-4b66-afa1-dd72a4c43515
```
To disable maintenance mode
```php
php artisan up
```
To find out more, see
https://laravel.com/docs/8.x/configuration#maintenance-mode
I hope you enjoy the code.
1 line of code: How to clean an Array of "falsy" items
Tags: javascript, webdev, productivity, codequality
Published: 2021-11-17 08:47:38

```javascript
const cleanFalsy = arr => arr.filter(Boolean);
```

Optimised version:

```javascript
const cleanFalsy = arr => arr.filter(i=>i);
```

Returns a new array without all items which are considered to be "false" (0, '', Nan, false, undefined, null).

---

## The repository & npm package

You can find the all the utility functions from this series at [github.com/martinkr/onelinecode](https://github.com/martinkr/onelinecode)
The library is also published to [npm as @onelinecode](https://www.npmjs.com/package/@onelinecode/onelinecode) for your convenience.

The code and the npm package will be updated every time I publish a new article.

---
Follow me on [Twitter: @martinkr](http://twitter.com/_martinkr) and consider to [buy me a coffee](https://www.buymeacoffee.com/martinkr)

Photo by [zoo_monkey](https://unsplash.com/@zoo_monkey) on [Unsplash](https://unsplash.com/s/photos/fuji)

---
Create views to display all data managed by apartment gem
Tags: rails, postgres, ruby
Published: 2021-11-17 08:39:46

One strategy of the [apartment gem](https://github.com/influitive/apartment) is to store tenant data in dedicated schemas in a Postgres database.

If we have a model `Contract` and tenants `company_a` and `company_b`, we will find these tables in the database:

```sql
SELECT * FROM "public"."contracts"; -- is supposed to be empty
SELECT * FROM "company_a"."contracts";
SELECT * FROM "company_b"."contracts";
```

(The actual tenant schema names may differ)

Having the data distributed in multiple schemas makes "cross-tenant-analysis" quite tricky.
To solve this problem we could create views that collects all data from all tenant tables, like so:

```sql
CREATE OR REPLACE VIEW public.all_contracts AS
          SELECT * FROM "company_a"."contracts"
UNION ALL SELECT * FROM "company_b"."contracts"
-- UNION ALL ...
;
```

Now we can query all data using:

```sql
SELECT * FROM all_contracts;
```

Following Ruby script creates these views automatically:

```ruby
# we want to exclude all "public" models, since these data is not distributed
public_table_names = Apartment.excluded_models.map { |model| model.constantize.table_name.remove(/^public\./) }

# create and execute an SQL query to collect all tables from all schemas (= tenants)
class PgTable < ActiveRecord::Base; end
tenants_table_names_sql = PgTable.select(:schemaname, :tablename)
                                 .where(schemaname: Apartment.tenant_names)
                                 .where.not(tablename: public_table_names)
                                 .order(:tablename)
                                 .to_sql

all_pg_tables_rows = ActiveRecord::Base.connection.execute(tenants_table_names_sql)

# The next lines builds and executes the "CREATE OR REPLACE VIEW" query, which is described at the beginning of the article
all_pg_tables_rows.group_by { |row| row['tablename'] }.each do |table_name, pg_tables_rows|
  selects_sql = pg_tables_rows.map do |pg_table_row|
    "SELECT * FROM \"#{pg_table_row['schemaname']}\".\"#{pg_table_row['tablename']}\""
  end

  unioned_selects_sql = selects_sql.join(' UNION ALL ')

  create_view_sql = "CREATE OR REPLACE VIEW public.all_#{table_name} AS #{unioned_selects_sql}"

  ActiveRecord::Base.connection.execute(create_view_sql)
end
```

Disclaimer: Obviously this is a hacky script and **should probably not be used in production**.

If we want to query these views using ActiveRecord we could create corresponding models.

```ruby
class AllContract < ActiveRecord::Base; end

AllContract.where(...) # go crazy here
```

Note that these are `VIEWS` and cannot (?) be used to insert, modify or delete data.

(Cover image by [Aleks Marinkovic](https://unsplash.com/@aleks_marinkovic?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/apartments?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText))
Cool Hamburger Animation CSS
Tags: css, html, codepen, javascript
Published: 2021-11-17 08:30:56

## Why?
Simple answer is I made this to practice CSS Animations.

But there's another reason which is I saw a ui/ux designer making this animation on IG and some people on comment section pointed out that these animations are quite complex to implement when it comes to code which is true.

But with the help of CSS transform property and its values like rotate and translate it was a little easy to do.

You can see the work on my codepen.
 [Link](https://codepen.io/ShahirK/pen/dyzqzGE)

Please feel free to drop your thoughts 🤗
Please check out my Meme app by React Native
Published: 2021-11-17 07:56:25

A social media platform that allows users to post, view memes and chat with one another.

frontend:https://github.com/CXL3/React-Native-Mobile-Project-Meme-Machine

backend:https://github.com/CXL3/MongoDB-Nodejs-portfolio-backend-for-Meme-Machine-app

Youtube:https://www.youtube.com/watch?v=xurBnVRslns

If you know anyone hiring frontend or full stack engineer. Please let me know. :) Thank you.

Here is my LinkedIn.
https://www.linkedin.com/in/awslu/
Weekly web development resources #96
Tags: weekly, webdev
Published: 2021-11-17 07:16:02



______

##[bbburst](https://fffuel.co/bbburst/)
[![bbburst](https://wweb.dev/weekly/content/96/bbburst.jpg)](https://fffuel.co/bbburst/)
A SVG generator for confetti-like explosions of shapes.

______

##[Web Performance Metrics Cheatsheet](https://bitsofco.de/web-performance-metrics-cheatsheet/)
[![Web Performance Metrics Cheatsheet](https://wweb.dev/weekly/content/96/performance.jpg)](https://bitsofco.de/web-performance-metrics-cheatsheet/)
A nice cheat sheet for performance metrics by Ire Aderinokun.

______

##[Can I Include](https://caninclude.glitch.me/)
[![Can I Include](https://wweb.dev/weekly/content/96/caninclude.jpg)](https://caninclude.glitch.me/)
A tool to help determine if one HTML tag can be included in another HTML tag.

______

##[Morphing Submit Button](https://codepen.io/jkantner/full/zYdaBPJ)
[![Morphing Submit Button](https://wweb.dev/weekly/content/96/button.jpg)](https://codepen.io/jkantner/full/zYdaBPJ)
A nice Codepen demo of a button that changes after submit by Jon Kantner.

______

##[You Probably Don't Need Media Queries Anymore ](https://dev.to/kathryngrayson/you-probably-dont-need-media-queries-anymore-a4j)
[![You Probably Don't Need Media Queries Anymore ](https://wweb.dev/weekly/content/96/media-queries.jpg)](https://dev.to/kathryngrayson/you-probably-dont-need-media-queries-anymore-a4j)
An article on how to use Flex and Grid instead of media queries.

______

##[Splide](https://splidejs.com/)
[![Splide](https://wweb.dev/weekly/content/96/splide.jpg)](https://splidejs.com/)
A lightweight, flexible and accessible slider/carousel written in TypeScript.

______

##[react-burger-menu](http://negomi.github.io/react-burger-menu/)
[![react-burger-menu](https://wweb.dev/weekly/content/96/burger-menu.jpg)](http://negomi.github.io/react-burger-menu/)
An off-canvas sidebar React component with a collection of effects and styles.

______

##[AppFlowy](https://www.appflowy.io/)
[![AppFlowy](https://wweb.dev/weekly/content/96/appflowy.jpg)](https://www.appflowy.io/)
An open source alternative to Notion, where you are in charge of your data and customizations.

______

##[React Location](https://react-location.tanstack.com/)
[![React Location](https://wweb.dev/weekly/content/96/react-location.jpg)](https://react-location.tanstack.com/)
A library for powerful, enterprise-grade routing for React applications.

______

To see all the weeklies check: [wweb.dev/weekly](https://wweb.dev/weekly)
Cài đặt Mu online uy tín
Tags: mu4viet
Published: 2021-11-17 07:55:22

Dịch vụ cho thuê server MU Online của MU4Viet giúp bạn trở thành 1 admin chuyên nghiệp xây dụng thương hiệu và chỗ đứng vững trãi trong thị trường của mình. Server MU Online của MU4viet chuẩn, cực đẹp, nhẹ, mượt, tương thích trên mọi cấu hình máy tính. Giao diện game chuẩn Webzen.  Đến với chúng tôi bạn hoàn toàn có thể trở thành Admin. Chúng tôi sẽ hỗ trợ bạn hết sức có thể.			
https://mu4viet.net/
https://www.facebook.com/CaiMUOnlineVN/
https://www.youtube.com/channel/UCyokB195hnIqaSbTjbcqJVA

https://twitter.com/mu4viet
https://mu4viet.tumblr.com
https://mu4viet.blogspot.com/
https://www.pinterest.com/mu4viet/
https://medium.com/@game4viet.net
https://about.me/mu4viet

https://www.diigo.com/profile/caimuonline
What is Tin
Tags: devops, opensource, productivity, programming
Published: 2021-11-17 07:39:31

Tin: Try it Now
Tin is a product in the TeamCode cloud development tool chain of TeamCode that can generate runnable applications instantly.

It can
1. Supports various ways to deploy applications: Docker Image, Docker Compose, Dockerfile, Source Code.
2. Provides Source to Service capability, supports multiple programming languages, auto-builds environment without cumbersome process to install dependencies.
3. Customized infrastructure on demand, multi-tenant isolation, exclusive resource.
4. Low cost, flexibility, release anytime, data persistence.
Advantages
5. Efficient Technology Decisions, shorten the time of Proof of Concept.
6. Use open-source projects quickly.
7. Quickly complete the deployment from source code to application.

Know more about Tin via links below ↓
https://docs.teamcode.com/en-US/tin/create-tin
https://docs.teamcode.com/en-US/tin/configure-tin
https://docs.teamcode.com/en-US/tin/distribute-tin
https://docs.teamcode.com/en-US/tin/clone-tin
https://docs.teamcode.com/en-US/tin/share-github
https://docs.teamcode.com/en-US/tin/share-link

TeamCode Website: https://www.teamcode.com
Facebook: https://www.facebook.com/TeamCodeCloud
Twitter: https://twitter.com/TeamCodeCloud
LinkedIn: https://www.linkedin.com/in/teamcode
Limpiar datos de Docker WSL // Windows 10
Tags: docker, devops, webdev
Published: 2021-11-17 07:22:41

Detener Docker desde el icono de Docker en la barra de tareas: 
    `Quit Docker Desktop`
Detener Docker desde PowerShell:
```
net stop com.docker.service
taskkill /IM "docker.exe" /F
taskkill /IM "Docker Desktop.exe" /F
```
Desde la línea de comandos de Windows. :
```
wsl --shutdown
```
Desde PowerShell con derechos de administrador:
```
Optimize-VHD -Path $Env:LOCALAPPDATA\Docker\wsl\data\ext4.vhdx -Mode Full
```
Java LinkedList Examples
Tags: java
Published: 2021-11-17 07:21:03

This page contains source code examples of the LinkedList class in Java. On this page, you will learn everything about the Java LinkedList class with source code examples.

Following are some key points to note about LinkedList in Java -
1. Java LinkedList maintains the insertion order of the elements.
2. LinkedList can have duplicate and null values.
3. The LinkedList class implements Queue and Deque interfaces. Therefore, It can also be used as a Queue, Deque, or Stack.
4. Java LinkedList is not thread-safe. You must explicitly synchronize concurrent modifications to the LinkedList in a multi-threaded environment.

# Java LinkedList Examples
<ol style="text-align: left;"><li><a href="https://www.sourcecodeexamples.net/2019/12/how-to-remove-elements-from-linkedlist.html" target="_blank">How to Remove Elements From LinkedList Java</a></li><li><a href="https://www.sourcecodeexamples.net/2019/12/how-to-retrieve-elements-from.html" target="_blank">How to Retrieve Elements From LinkedList in Java</a></li><li><a href="https://www.sourcecodeexamples.net/2019/12/java-create-linkedlist-and-adding-new.html" target="_blank">Java Create LinkedList and Adding New Elements to It</a></li><li><a href="https://www.sourcecodeexamples.net/2019/06/iterate-linkedlist-using-foreach-method.html" target="_blank">Iterate LinkedList using forEach() Method Example</a></li><li><a href="https://www.sourcecodeexamples.net/2019/06/iterate-through-linkedlist-using.html" target="_blank">Iterate through a LinkedList using an Iterator in Java</a></li><li><a href="https://www.sourcecodeexamples.net/2019/06/iterate-or-loop-through-elements.html" target="_blank">Iterate or Loop Through Elements LinkedList in Java Example</a></li><li><a href="https://www.sourcecodeexamples.net/2019/06/search-elements-of-linkedlist-in-java.html" target="_blank">Search Elements of LinkedList in Java with Example</a></li><li><a href="https://www.sourcecodeexamples.net/2019/06/remove-first-and-last-elements-of.html" target="_blank">Remove First and Last Elements of LinkedList in Java</a></li><li><a href="https://www.sourcecodeexamples.net/2019/06/get-elements-from-linkedlist-java.html" target="_blank">Get Elements from LinkedList Java Example</a></li><li><a href="https://www.sourcecodeexamples.net/2019/06/java-linkedlist-remove-removefirst.html" target="_blank">Java LinkedList remove(), removeFirst(), removeLast(), removeIf() and clear() Example</a></li><li><a href="https://www.sourcecodeexamples.net/2019/06/java-linkedlist-add-addfirst-addlast.html" target="_blank">Java LinkedList add(), addFirst(), addLast() and addAll() Example</a></li></ol>

# Original Post
<a href="https://www.sourcecodeexamples.net/p/java-linkedlist-examples.html" target="_blank">Java LinkedList Examples</a>
Will No-Code Replace developers?
Tags: webdev, codenewbie, programming, discuss
Published: 2021-11-17 06:56:12

### Lets first understand, what even is No-Code or Low-Code?

No-Code is made for people in every background to create stuff/software. No code platforms have pre-built drag-and-drop elements that have been coded for reuse and scale, so that anyone, even beginners can make anything they want easily.

### Will No/Low Code replace programmers?

No Not at all, we will surely need programmers... There will always be a need for coding. They benefited in there both alternatives.

### So does No/Low Code does have any future?

Yes No/Low Code do have a future but they are not the future of code. It is certainly having a place in the future and will be leveraged to make many applications For ANYONE. The future is low-code or no-code with an expected growth rate of 44.4% by 2022 to $27.23 billion (up from $4.32 billion in 2017).

### Why No/Low Code so famous?

No/Low Code is popular because it doesnt matter on what background you come from, you can make softwares. Making software in nocode platforms can be fast and done pretty regularly to build prototypes and MVP in a record time.

Thats all for this blog, its a pretty small blog, but its just a start for me :) 
##### [Consider Following Me On Twitter](https://twitter.com/vikstack)
ML and decision trees for beginners
Tags: watercooler
Published: 2021-11-17 06:26:44

Suppose that we have several vehicles that are cars and trucks. We measure the weight of each vehicle and the number of wheels of each vehicle. We also forget for now that cars and trucks look different. How can we make an algorithm tell them apart?

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lgt8f4t9zd19n5ufq7sf.png)


If you haven't already, check out this article for the intuition of machine learning before we continue: [https://rhurbans.com/machine-learning-intuition/](https://rhurbans.com/machine-learning-intuition/)

Almost all cars have exactly four wheels, and many large trucks have more than four wheels. Trucks are usually heavier than cars, but a large sport-utility vehicle may be as heavy as a small truck. We could find relationships between the weight and number of wheels of vehicles to predict whether a vehicle is a car or a truck. A decision tree can be useful here.

Decision trees are structures that describe a series of decisions that are made to find a solution to a problem. So a decision tree can be used to encompass the above logic. Let's think about how we might train a model to categorize diamonds.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3880tjlu0ifbhite4huz.png)

A decision tree includes decision nodes, and leaf nodes. A decision node contains a question being asked, the positive examples related to the question, and the negative examples.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7vw398nkulqd125u98xq.png)

A decision tree also includes leaf nodes containing a list of examples only. These are all examples which were categorised correctly.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kig78f2d5qak885vj7j4.png)

In building a decision tree, we test all possible questions to determine which one is the best question to ask at a specific point in the decision tree. To test a question, we use the concept of entropy — the measurement of uncertainty of a dataset.

If we had 5 Perfect diamonds and 5 Okay diamonds, and tried to pick a Perfect diamond by randomly selecting a diamond from the 10, what are the chances that the diamond would be Perfect?

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q5pr8bax5infj4cwsdwj.png)

Decision trees are a simple but powerful ML algorithm. To learn more, see Grokking AI Algorithms with Manning Publications: [http://bit.ly/gaia-book](http://bit.ly/gaia-book), consider following me - [@RishalHurbans](https://twitter.com/RishalHurbans), or join my mailing list for infrequent knowledge drops: [https://rhurbans.com/subscribe](https://rhurbans.com/subscribe).
Credit Card Form - VueJs
Tags: codepen
Published: 2021-11-17 06:02:08

<p>A fantastic credit card form with smooth and sweet micro-interactions. Includes number formatting, validation and automatic card type detection. Built with vuejs and also fully responsive.</p>

<p>See on Github: <a href="https://github.com/muhammederdem/credit-card-form" target="_blank">https://github.com/muhammederdem/credit-card-form</a></p>

{% codepen https://codepen.io/JavaScriptJunkie/pen/YzzNGeR %}
Many free and useful AWS official Dev and User guides!
Tags: aws, tutorial, books, webdev
Published: 2021-11-17 05:59:59

Many official and free Amazon Web Services User and Developer Guides are available at Amazon.com kindle store at https://www.amazon.com/kindle-dbs/entity/author/B007R6MVQ6

Super easy to get it and start reading with 1-click:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i67qchf7d7dugd3whb2u.jpg)

My Kindle library is now filled with all these good and useful references. I can find and search them easily.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v5l5t4wvt2e3e9jg6rz3.jpg)

e.g. I need to install Cilium CNI in EKS, then just search it in Kindle EKS ebook and find it with the link to https://docs.cilium.io/en/v1.7/gettingstarted/k8s-install-eks/
(Above CNI latest version is v1.9, so hope AWS writers can update the guides more often!) 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g2maegu08tz203k2u6p3.jpg)
Responsive Web design
Tags: webdev, javascript, tutorial, css
Published: 2021-11-17 05:59:24

Hello everyone, today i decided to create a small div and style it with some basic styling, i learned how to add background color as well as styling the  button however i realized buttons can also be create with just an anchor tag. 
oh and sorry for the weird class names i just picked some random ones for practicing. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mduhcpta7jh434htpw3s.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qzbyyzy01estbv14otu8.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tr9zq3uyakeg3qfahixk.png)
  ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u2h147cc71hxwidbwtdg.png)