teleren/devto huggingface dataset:
Best Sites To Download Free Ebooks Online
Tags: webdev, beginners, tutorial, productivity
Published: 2022-08-31 01:23:45


![Best Sites To Download Free Ebooks Online](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zm7d0y6xvb9gzz7ci2aq.jpg)
Download Free ebooks Online, Ever thought about making a library with lots of free books? You’d in no way spend a dime. It sounds unimaginable, but it surely certainly’s not. Free books on virtually any subject you presumably can think about are online, in a position to be downloaded, studied, and share. These are the proper websites with free books masking every kind of subject, one thing from romance novels to computer know-how manuals.

An infinite quantity of books beforehand unavailable to most people was launched starting in 2019 due to the [Sonny Bono](https://en.wikipedia.org/wiki/Sonny_Bono) Copyright Time interval Extension Act of 1998. Attributable to a modification to that act works printed between 1923 and 1977 can enter most of the people’s space 95 years after their creation. Many of the websites listed below give entry to the tens of lots of books (plus movement photos, songs, and cartoons) obtainable beneath this act. Downloads must be free and without retribution beneath U.S. copyright laws.

**Best Websites to Download Ebooks**
1. Library Genesis
2. Project Gutenberg
3. Overdrive
4. Centsless Books
5. ManyBooks
6. Z-Library
7. PDFBooksWorld
8. LibriVox
9. Feedbooks
10. Open Library
11. KnowFree
12. International Children’s Digital Library
13. Free-ebooks.Net
14. Internet Archive
15. BookBoon
16. FreeBookSpot
17. BookYards

## Library Genesis

Library Genesis is a search engine free of charge for studying materials, together with ebooks, articles, magazines, and extra. As of this writing, Library Genesis indexes shut to a few million ebooks and 60 million articles. It might take a number of lifetimes to eat every little thing on supply right here.

Each fiction and non-fiction are lined, spanning completely different genres and kinds. Since it is a search engine, shopping for books is nearly not possible. The closest factor you are able to do is use the Authors dropdown within the navigation bar to browse by authors. Even then, you will get used to the horrible personal interface of the positioning general.

It is higher to go looking for an alternative for a specific ebook title, creator, or synopsis. The Superior Search enables you to slim the outcomes by language and file extension.

## Project Gutenberg

One other of one of the best free e-book obtain websites is Undertaking Gutenberg. It is a charity endeavor, sustained by means of volunteers and fundraisers, with the goal to gather and supply as many high-quality ebooks as potential. Most of its library consists of public area titles, however, it has different stuff too if you happen to be keen to go searching.

Read More: [Best Sites To Download Free Ebooks Online](https://softcodeon.com/edu/best-sites-to-download-free-ebooks.htm)
Capped Collection MongoDB
Tags: mongodb, node, javascript
Published: 2022-08-31 01:01:22

Olá, hoje vamos falar sobre Capped Collections no mongodb.

A capped collection funciona como uma espécie de fila, conforme vamos adicionando novos dados o mais antigo é excluído.

Um exemplo muito interessante para usar capped collection seria uma loja que registra a visita de pessoas, que, com o tempo, este dado pode deixar de ser interessante, e, para não deixar o banco cheio de dados dos quais não queremos mais, a capped collection automaticamente exclui o mais antigo e adiciona o mais novo.


Exemplo de criação:



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

Na collection acima, o tamanho máximo é de 10mb;

O máximo e visitantes a ser registrado é 5000, quando chegarmos ao valor de 5001, o valor 0001 será excluído do banco de dados. Por fim, teremos como novos valores 0002 - 5001.
What is Currying in javascript
Tags: javascript
Published: 2022-08-31 00:53:23

#### Description
Currying: `n` parameters can turn into `n` functions.

#### Example code

`n` parameters
```js
function foo(x, y, z) {
  return x + y + z;
}
```
`n` functions
```js
function foo(x) {
  return function bar(y) {
    return function baz(z) {
      return x + y+ z;
    }
  }
}

const result = foo(10)(10)(10);
console.log(result);

>> 30
```
This is possible because functions are First Class Citizens in javascript.

#### When do we use currying?

If n parameters are passed into one function then the function does complex operation inside itself then it will be very difficult to track how the function is working with each parameter.
But if you use currying then you can split how each step of the operation works parameter by parameter.
Use a different git config for each directory using conditional include
Tags: git
Published: 2022-08-31 00:17:22

It is possible for git to use different config references depending on specific conditions.

This was made aware to me by a question in an [earlier post](https://dev.to/snaka/10-things-i-always-setup-in-git-when-i-prepare-a-new-environment-d99). (Thanks to @francoislp asked this question).

For example, if you have a working directory cloned under the `~/work/` directory and want to use the following configuration:

Add a conditional Include to `~/.gitconfig` like this:

```
[includeIf "gitdir:~/work/**"]
        path = ~/work/.gitconfig
```

Then put the following in `~/work/.gitconfig`

```
[user]
        name = Foo
        email = foo@example.com
```

Then, for commits in the working directory under `~/work`, the commit will be logged as `Foo <foo@example.com>`.

As follows: 


![contrast of execution results](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w11oa4pokwvhwrp9f8rt.png)

## See also

- [Git - git-config Documentation](https://git-scm.com/docs/git-config#_conditional_includes)
Chrome插件开发 - Custom options page
Published: 2023-08-13 02:15:26

---
title: Chrome插件开发 - Custom options page
published: true
date: 2022-08-31 00:00:00 UTC
tags: 
canonical_url: https://manon.icu/blog/translate/build-chrome-extensions/custom-options-page
---

![YyhZzD](https://cdn.jsdelivr.net/gh/manonicu/pics@master/uPic/YyhZzD.jpg)

## 向浏览器扩展添加可选项

打开`manifest.json`，添加 options 选项，注册选项页面。

```json
{
  "options_ui": {
    "page": "options.html",
    "open_in_tab": false
  }
}
```

创建`options.html`

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>DDT Pop-up</title>
    <link rel="stylesheet" type="text/css" href="./css/style.css" />
  </head>
  <body>
    <div id="options"></div>
    <script type="module" src="src/options/index.jsx"></script>
  </body>
</html>
```

修改`src/index.jsx`

```jsx
import ReactDOM from 'react-dom'
import {App} from './App'

const app = document.getElementById('options')
ReactDOM.render(<App />, app)
```

修改`src/App.jsx`

```jsx
import {useState} from 'react'

export function App() {
  const [color, setColor] = useState('indigo')

  chrome.storage.sync.get('color', (storedColor) => {
    setColor(storedColor.color)
  })

  const pickColor = (pickedValue) => {
    setColor(pickedValue)
    chrome.storage.sync.set({color: pickedValue})
    window.close()
  }

  return (
    <div className="m-4">
      <select
        onChange={(event) => pickColor(event.target.value)}
        value={color}
        className="block w-full p-4 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-indigo-500 dark:focus:border-indigo-500"
      >
        <option>Pick a color</option>
        <option value="indigo">Indigo</option>
        <option value="pink">Pink</option>
        <option value="purple">Purple</option>
        <option value="red">Red</option>
      </select>
    </div>
  )
}
```

修改`vite.config.js`，多页面打包配置

```js
import {defineConfig} from 'vite'
const {resolve} = require('path')
import react from '@vitejs/plugin-react'

export default defineConfig({
  plugins: [react()],
  build: {
    rollupOptions: {
      input: {
        main: resolve(__dirname, 'index.html'),
        options: resolve(__dirname, 'options.html')
      }
    }
  }
})
```

最终效果如下：

<video
  src="https://cdn.jsdelivr.net/gh/manonicu/pics@master/uPic/options_zuppir.webm"
  autoPlay
></video>

## Source Code

[【Source Code】](https://github.com/rebelchris/popup-extension/tree/options)
LeetCode & crossword puzzles
Tags: career, hackerrank, leetcode, dsa
Published: 2022-09-27 09:49:20

---
title: LeetCode & crossword puzzles
published: true
date: 2022-08-31 00:00:00 UTC
tags: careers,hackerrank,leetcode,dsa
canonical_url: https://jhall.io/archive/2022/08/31/leetcode-crossword-puzzles/
---

Should a developer prioritize practicing LeetCode or HackerRank-style coding challenges when looking for a job?

I see versions of this question pop up all the time. And there are some pretty strong opinions on each side of the debate. Which means I know a certain segment of the population will vehemeently disagree with what I’m about to say. Oh well. 🤷

First, I will say have nothing against LeetCode and related sites, for entertainment purposes. They can be fun for some people. They can also teach you some valuable skills, particularly related to data structures and algorithms (DSA).

But here’s the thing… these types of challenges have almost nothing to do with real-world programming jobs. So in my opinion, they have no place in real-world job screening or interviewing.

To put it succinctly:

## LeetCode is to real-world programming as crossword puzzles are to real-world journalism.

I’ll happily admit, there is _some_ overlap between the skills that LeetCode can assess, and the skills needed on-the-job (such as the ability to remember a large list of DSA patterns, and the ability to match a them to problems). But these are nowhere near the most important skills in the vast majority of programming jobs. Teamwork, clear communication, the ability to learn from peers, etc, are all far more important.

Likewise, crossword puzzles do have some overlap with the skills needed to be a successful journalist. A large vocabulary, and the ability to spell are definitely important. But they’re far less important than the ability to write coherent sentences, and even interview experts or do primary or secondary research.

So as an employer, I always advise against using HackerRank, competitive programming style tools in the screening process.

And as a candidate, I always advise to skip such companies, unless you just absolutely need a job, and those are your only options. In my experience, companies that hire with the assitance of competitive programming type tools tend to fall into one of two categories:

1. They have so many more applications than they can possibly use, that they simply need some way to filter out candidates. Competitive programming can do that. Selecting only candidates born in January would probably accomplish the same, but might not stand up to legal scrutiny.

2. Companies that don’t know any better. Probably because they’re a non-technical company who needs to hire technical people. These competitive programming companies explicitly position themself as attractive to these companies. But do you want to work for such a company?

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
Thing I want to accomplish in CICCC.
Published: 2022-08-30 23:34:48

 I'm student in Canada and looking for a web developer job. I used to work as a web developer in Philippines and Japan for almost 4 years. I've been focusing on frontend technology which is React js. In the more than 3 years of using react js experience, I've used class components and functional compoents and created many of applications with my team mates in previous companies. Creating custom hooks was fun part of using react, and it makes me more interested in the frontend development. I also have some exprerience with backend development and mobile development. For the backend development, php and #c were the technology I've used, and Native script for the mobile development.
 
Here is the my goals to become a front end developer in Canada.
 - Improve my English skill.
 - Create a good resume and portfolio.
 - Have enough interview skills for a job interview.

### Improve English skill
 By talking with classmates and teachers I'm going to improve my speaking and listening skill. This will help me to live and work in Canada. Especially, during a job interview, speaking English is the necessary skill to express my self and explain what skills I have.

### Create a good resume and portfolio
 I need to create a resume and portfolio as soon as possible and have it reviewed by teachers or friends, then improve them. Once it's done, I'll look for a part-time job to accuire some job experinces in Canada which I believe helps me to find a full-time job in the future.

### Have enough interview skills for a job interview
 Once I've experienced a part-time job as a web development, I believe I'm already ready to get a job in Canada and start applying for full-time jobs. If I was not able to find a part-time job, I'll keep improving my resume, portfolio and interview skills instead. 

 I also expect my class to give me a good understanding of how a computer works which helps me in the future when I go deeper of web development. So that accuring those knowledge is one of my goal as well.

Hopefully, everything is going to work well and I can stay in Canada for long time.
Use Your IDE's Code Formatter
Published: 2022-08-30 23:10:25

This is part of a brief series on [Good Habits For Java Programmers](https://dev.to/mbrubin56/good-habits-for-new-java-programmers-1n2).

Consistently and well formatted code makes a huge difference to code readability. If the indentation varies, if opening and closing curly braces don't match up, if how many blank lines you use in between methods varies, the code gets harder to read. Your IDE will come with some way to tell it to automatically format your code for you. Use that to get many of these formatting problems fixed for free!

## Which formatting options should I choose?
The autoformatter of your IDE will be opinionated. Your IDE will have it configured with a bunch of standard preferences the author thought were best. You can change these if you like, but don't worry about it: if you're into it (e.g. you really wish it used 5 spaces instead of 4 for indentation), go ahead and make changes; but the defaults are going to be very good for what you're doing as a beginning programmer. The important thing is that the formatter is rules based and will be consistent, saving you from having to decide what formatting conventions you want to obey and most importantly, from having to detect violations and fix them manually. You're unlikely to win that game, and who wants to play it anyway?

## Autoformatting won't fix everything
Some formatters cover more conventions than others, and there are settings you can tweak, but, for example, your formatter often won't catch extra newlines or inconsistencies in how you use them:
```java
        if (isValid) {
            System.out.println("The input is valid");
        } else {
            System.out.println("The input is not valid");
            System.out.println("Please enter another value");

            System.out.println("Thank you");


        }
```
There's an inconsistent, extra newline there before `System.out.println("Thank you");` that your formatter probably won't catch. And there are extra newlines after that statement that your formatter likely won't remove. So you still want to do some grooming of your own, but the formatter goes a _long_ way. A really long way.

## So how do I do it?

- **Eclipse** Ctrl+⇧+F on Windows/Linux; ⌘+Shift+F on Mac
- **IntelliJ** Ctrl+Alt+L on Windows/Linux; ⌘+⌥+L on Mac
- **Visual Studio Code** It takes [some configuration](https://code.visualstudio.com/docs/java/java-linting).

There's a lot to explore here if you like, including formatting only a block of code, invoking the formatting commands from a menu option, removing unneeded imports, etc. Have fun further exploring your options!
Day 143: Sequelize Typescript
Published: 2022-08-30 23:07:36

Hi!
Today was about sequelize and typescript on setting up the database task I noticed that setting up typescript and sequelize is not that straight forward even in the documentation but i found several materials that I will use to make it work tomorrow. I also decided to learn deeply about CSS grid after noticing that I can't always use Flexbox for everything so  it will be something that I will be slowly integrating on my learning routine

Signing off
Transactions in Postgres
Tags: database, postgres
Published: 2022-08-30 23:01:52

In databases, a transaction is a single unit of logic -- they can potentially consist of multiple operations. An example is transferring a balance from a bank account to another. The transaction needs an amount removed from the first account and then added to the other. You wouldn't want an amount removed from the account and a program failing and the amount not ever adding to the second account. This is referred to as atomicity in databases. 

In Postgres, implicit to every single statement is the idea that the statement occurs in a transaction. If we write two simple UPDATE statements, they might look something like this:

```
UPDATE table1 SET column1 = 100.00
    WHERE id = 3;

UPDATE table1 SET column1 = 100.00
    WHERE id = 4;
```

However, when any statement such as these `UPDATE` statements occur, you can think of it happening within a transaction like this:

```
BEGIN;
UPDATE table1 SET column1 = 100.00
    WHERE id = 3;
COMMIT;

BEGIN;
UPDATE table1 SET column1 = 100.00
    WHERE id = 4;
COMMIT;
```

A transaction "block" is the set of queries executed between the `BEGIN` and `COMMIT` commands. When you don't specify either of these commands, they implicitly surround _every_ command.

We can override this default behavior to specify different transaction blocks using the `BEGIN` and `COMMIT` commands. The idea is that we can perform multiple operations on a database all at once. This is useful for times where if any intermediate operations might fail, we don't want the subsequent commands to execute. The entire "transaction" will not occur.

Below, you can see here we actually specified a `BEGIN` and `COMMIT` in this script. As a transaction block now, these two will be "committed" to the database and visible at the same time.

```
BEGIN;
    UPDATE table1 SET column1 = 100.00
        WHERE id = 3;

    UPDATE table1 SET column1 = 50.00
        WHERE id = 4;
COMMIT;
```

This can also be useful if an API or other service happens to request data in between the first and second `UPDATE` statement, and we don't want data to be accessed until all of the data is updated. Obviously the latency is really slow for simple `UPDATE` statements, but for a longer complicated process, this becomes increasingly important.

Another example: if a table is dropped but you don't want the table unviewable until it's repopulated completely:

```
BEGIN;
    CREATE TABLE table2 (
       column1 datatype(length) column_contraint,
       column2 datatype(length) column_contraint,
    );
    // add some data into table2

    DROP table table1;

    SELECT * INTO table1 FROM table2;

COMMIT;
```

### Rollbacks

To roll back or undo the change of the last transaction block, you can use the `ROLLBACK` command. This can be extremely useful because it might be really difficult to traverse individual statements and figure out how you modified your tables. Wrapping up everything in a transaction block and then rolling back makes it easy to just undo everything that was in the block.
How to Build a Lava-Lamp Style Navigation Menu with React
Tags: react, menu, ui, lavalam
Published: 2022-08-30 22:42:18

A Lava-Lamp menu contains an indicator that moves to the selected position when we select an option.

We can see this type of navigation, (for example) in the AppleTV interface.

Still not clear? Take a look at this demo:
[https://react-llamp-menu-demo.netlify.app/](https://react-llamp-menu-demo.netlify.app/)

How to create it?
1.-Install the dependency
`npm i react-llamp-menu`

2.-Import
`import {LavalampMenu} from 'react-llamp-menu';`

3.-Add a menu structure like this

```
<LavalampMenu>
  <ul>
    <li><button onClick={()=>console.log('option 1')}>First option</button></li>
    <li><button onClick={()=>console.log('option 2')}>Second option</button></li>
    <li><button onClick={()=>console.log('option 3')}>Third option</button></li>
  </ul>
</LavalampMenu>
```
4.-customize using CSS

----------------------------------------------

Check out the project on gitHub
[https://github.com/jlizanab/react-llamp-menu](https://github.com/jlizanab/react-llamp-menu)

Watch a demo on CodeSandbox
[https://codesandbox.io/s/react-llamp-menu-luq9ht](https://codesandbox.io/s/react-llamp-menu-luq9ht)
Top 7 Featured DEV Posts from the Past Week
Tags: top7
Published: 2022-08-30 22:09:18

---
title: Top 7 Featured DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week
tags: icymi 
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sfwcvweirpf2qka2lg2b.png
---

_Every Tuesday we round up the previous week's top posts based on traffic, engagement, and a hint of editorial curation. The typical week starts on Monday and ends on Sunday, but don't worry, we take into account posts that are published later in the week._ 

## Enable GitSign Today

The recent PyPI phishing attacks have compromised several Python library maintainers and their packages. This incident encouraged @erikaheidi to write this post about a simple task you can do as an open source maintainer or contributor to ensure your code is coming from the right place.

{% embed https://dev.to/erikaheidi/enable-gitsign-today-and-start-signing-your-commits-2gda %}


## Bye Bye Heroku

Heroku is saying goodbye to their free product plans! Here, @lorenzojkrl speculates on what might change because of this.

{% embed https://dev.to/lorenzojkrl/bye-bye-heroku-2npi %}


## 5 Refreshing Projects

Lots of projects nowadays seem stale or are only for beginners. @wadecodez shares some ideas for some more intermediate projects.

{% embed https://dev.to/wadecodez/5-fresh-project-ideas-for-web-developers-15l2 %}


## Side projects: what, why, how

In this post, @maurerkrisztian explores the value of side projects. If you've been thinking of starting a project outside of your school program or job, this one goes out to you!

{% embed https://dev.to/maurerkrisztian/do-you-need-side-projects-2n26 %}


## 20 tips learned in 10 years

Here are some tips that @ondrejsevcik learned in their 10 years of development. Try to implement a few into your career!

{% embed https://dev.to/ondrejsevcik/20-principles-i-learned-from-10-years-of-developing-software-5354 %}


## Why your site should be under 14kb 

It isn’t surprising that having a smaller website means it loads faster. What you might not know is that a 14kb page will load faster than a 15kb page, while a 15kb page won’t load significantly faster than a 16kb one. @shadowfaxrodeo will explain why.

{% embed https://dev.to/shadowfaxrodeo/why-your-website-should-be-under-14kb-in-size-398n %}


## SEO Tools to Grow your Site

If your site isn’t optimized for search engines, it’ll be harder to find and reduce the usability of your site. Here are some tools that @irreverentmike uses to grow a site.

{% embed https://dev.to/irreverentmike/5-tools-i-add-to-every-new-web-project-for-seo-and-analytics-58f2 %}


_That's it for our weekly Top 7 for this Tuesday! Keep an eye on dev.to this week for daily content and discussions...and be sure to keep an eye on this series in the future. You might just be in it!_