teleren/devto huggingface dataset:
correct horse battery staple
Tags: security, ruby, linux, passwords
Published: 2019-09-05 10:33:20

There are a lot of places with obnoxious limitations to the characters you can put on a password, or even worse, to te length of it.

If you don't take anything away from this post, at least take that: _password fields should allow any character and be long enough for your users to not notice ever the length constraint_.

There are people using password generators and pasting 250 character long strings. Make their life easy, because they are doing their part.

But, alas, if you don't use a password manager but still want to have secure passwords, that are easy to remember but hard to guess, then the best tip on the internet is this:

[xkcd: Password Strength](https://www.xkcd.com/936/)

![Password Strength](https://imgs.xkcd.com/comics/password_strength.png)

And if you know me, I usually face problems by throwing ruby at them, so, here we go:

## Assumptions:

- you are on GNU/Linux or you can provide a text file with a list of words for your target language
- you have ruby installed
 
## Code:
```ruby
#!/usr/bin/env ruby

# https://www.xkcd.com/936/
module PasswordGenerator
  extend self
  
  # replace this with your language:
  WORDS = '/usr/share/dict/spanish'

  def run
    puts((1..4).map { safe_words.sample }.join(" "))
  end

  private

  SAFE_SET = /\A[A-Za-z]+\Z/.freeze

  # avoid non-ascii to save trouble
  def safe_words
    @safe ||= words.select{ |w| SAFE_SET.match(w) }
  end

  def words
    @words ||= File.read(WORDS).split("\n")
  end
end

# this executes the run method if the file is run as a command
PasswordGenerator.run if __FILE__ == $PROGRAM_NAME
```

The intended use is to run it a couple of times until some combination of words hits you with an image or story you feel able to retain.

---

> Cover Image by <a href="https://pixabay.com/users/JanBaby-3005373/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2168233">Jan Alexander</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2168233">Pixabay</a>
Redux async actions. Tracking loading and errors with React hooks.
Tags: javascript, react, redux, hooks
Published: 2019-09-05 10:02:02

If you use redux and async actions, then you probably had to deal with a situation where you need to monitor the loading and error status of this action. With the advent of hooks, it became possible to conveniently transfer this logic to one block and use it everywhere.

```javascript
import { useState, useCallback } from 'react';
import { useDispatch } from 'react-redux';

function useAsyncAction(action, dependeces = []) {
  const dispatch = useDispatch();
  const [loading, setLoading] = useState(false);
  const [isError, setIsError] = useState(false);

  const asyncAction = useCallback(
    (...args) => {
      async function callback() {
        setLoading(true);
        try {
          const res = await dispatch(action(...args));
          setIsError(false);
          setLoading(false);
          return res;
        } catch (e) {
          setLoading(false);
          setIsError(true);
          return e;
        }
      }
      callback();
    },
    [action, ...dependeces],
  );

  return [asyncAction, loading, isError];
}
```

Now you can use this hook in your functional component.

```javascript
// …
  const [load, loading, isError] = useAsyncAction(() => loadActivityRequest(applicationId), [applicationId]);
// …
  load();
```
QuickBooks Error H202
Published: 2019-09-05 09:53:15

It is  very irritating  when we receive an error message like <a href="https://quickbooksfixes.com/quickbooks-error-h202/">QuickBooks Error H202</a> while working on our QuickBooks software. In order to get rid of this problem you need to have a good knowledge of QuickBooks software otherwise you might harm your own data. So, in such cases get help from our talented team.Contact QuickBooks Error Code H202 1-888-986-7735.
15 Best Offline Shooting Games for Android You Should Play in 2019
Tags: games
Published: 2019-09-05 09:48:42

Don't you detest it when you need to play a game on your Android cell phone, however don't approach the web? Particularly, when these games don't work without a functioning web association. All things considered, don't you stress any longer provided that you have been searching for some not too bad shooters for Android that likewise work offline then we have you secured. You don't need to consume your information plan any longer since we present to you the best offline shooters for Android. These are cartoony games, however rather the absolute most attractive games also. Along these lines, right away look at the

15 offline shooters for Android


https://www.appreviewsbucket.com/blog/best-offline-racing-games
How to convert PDF to image in Java
Tags: pdftoimage, pdftojpg, pdftosvg, javapdf
Published: 2019-09-05 09:38:50

---
title: How to convert PDF to image in Java
published: true
description: convert PDF to Image in java applications
tags: pdf to image, pdf to jpg, pdf to svg, java PDF
---

Convert PDF to image is a common need for developers. With the help of [Free Spire.PDF](https://www.e-iceblue.com/Introduce/free-pdf-for-java.html), we can easily convert PDF files of any size and version to image with high quality in Java applications. In this article, I will explain the solutions of converting the PDF file to bitmap images in PNG, BMP, JPEG, GIF etc. and PDF file to vector images in EMF, WMF, and SVG.

Convert the PDF page to bitmap images (BMP, Jpeg, Png, and GIF)

Spire.PDF for Java offers a method pdf.saveAsImage() to convert PDF page to bitmap images in Jpeg, Jpg, Png, Bmp, Tiff, Gif and also vector images in WMF and EMF format etc. Here we use PDF to .png image for example.

```java
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import com.spire.pdf.PdfDocument;
import javax.imageio.ImageIO;

public class PDFtoImage {
        public static void main(String[] args) throws IOException {
        //load the sample PDF
        PdfDocument pdf = new PdfDocument();
        pdf.loadFromFile("Sample.pdf");

        //save every PDF to .png image
        BufferedImage image;
        for (int i = 0; i < pdf.getPages().getCount(); i++) {
            image = pdf.saveAsImage(i);
            File file = new File( String.format("ToImage-img-%d.png", i));
            ImageIO.write(image, "png", file);
        }
        pdf.close();
    }

}
```
![output](https://thepracticaldev.s3.amazonaws.com/i/yahmmrer6xei50x5is0m.png)

Convert the PDF page to vector images (EMF, WMF, SVG) 
The common vector images formats are EMF, WMF and SVG. Spire.PDF for Java offers a method pdf.saveToFile("result.svg",FileFormat.SVG) to save PDF page to SVG image. With this method, each page on the PDF file has been saved as a single SVG file by default. For example, if the PDF contains 10 pages, we will get 10 SVG files separately. We can also set the property pdf.getConvertOptions().setOutputToOneSvg() as true to convert a multipage PDF to one single SVG file in Java.

```java
import com.spire.pdf.*;

public class PDFtoImage {
    public static void main(String[] args) {
        //Load the PDF file
        PdfDocument pdf = new PdfDocument();
        pdf.loadFromFile("Sample.pdf");

        //convert the PDF to one SVG
        pdf.getConvertOptions().setOutputToOneSvg(true);

        //Save to SVG image
        pdf.saveToFile("Output/output.svg",FileFormat.SVG);
        pdf.close();
    }
}
```
![Output](https://thepracticaldev.s3.amazonaws.com/i/hnzn4ezocapa2aiaqot3.png)
What's the RxJs/ NgRx code bit that you are most proud of?
Tags: discuss, angular, javascript, webdev
Published: 2019-09-05 09:06:07

---
title: What's the RxJs/ NgRx code bit that you are most proud of?
published: true
description: Share your rxjs/ngrx knowledge!
tags: discuss, angular, javascript, webdev
---

RxJs allows you to do powerful stuff in just a couple lines of code, which can feel like solving a very complicated puzzle sometimes, especially when you are new to world of observables. What is the bit you are most proud of?

I start of with a (probably not impressive and in a 1000 ways improvable) simple timer used to hide an popup after a short while:
```typescript
export class PopupComponent {
    private _triggerPopup$ = new Subject<any>();

    isShowPopup$: Observable<boolean> = this._triggerPopup$.pipe(
        switchMap((): Observable<boolean> => merge(
            of(true),
            timer(POPUP_TIMEOUT_DURATION).pipe(mapTo(false))
        )),
    );
   
}
```
Scope Gates in Ruby: Part II
Tags: ruby, rails, programming, coding
Published: 2019-09-05 08:58:24

---
title: Scope Gates in Ruby: Part II
published: true
description: scopes in modules & nested modules
tags: ruby, ruby on rails, programming, coding
---

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/l6uj9aohb9q64u8y88eb.jpg)

When we use the `module` keyword:

- The value of `self` changes
- The content of the module is embedded in an isolated scope
- [SEE MORE](https://medium.com/rubycademy/scope-gates-in-ruby-part-ii-e3c01ece9ad6)
New to programing 
Published: 2019-09-05 08:58:16

Hi everyone, I had my university degree in computer science since 2010. Since i left Uni, I never had experience in programming. Sometimes I regret I wasted all these years doing customer service job of which I am fulfilled. I want to come back to programing. 
I am over 32 years, do I stand a chance of getting jobs despite my age?

I am currently learning HTML and CSS on udemy.is that enough to be a strong programmer?

I will appreciate contributions from people who were once in my shoes and how they succeeded 
I will appreciate other people experience.

What is the best way to go about achieving this?

My working hour is 8am to 6pm and weekends. I get home from work 7pm.

1
Announcing Aylin: a modern and minimal VS Code dark theme with bright colors
Tags: productivity, vscode, code, theme
Published: 2019-09-05 08:11:25

---
title: Announcing Aylin: a modern and minimal VS Code dark theme with bright colors
published: true
description: Aylin a modern and minimal VS Code dark theme with bright colors
tags: productivity, vscode, code, theme
cover_image: https://thepracticaldev.s3.amazonaws.com/i/j16xds0ncq4b4i19wqpw.png
---

I happy to announce my new theme for VS Code called "Aylin" 🌌. It is available from VS Code Marketplace [Aylin](https://marketplace.visualstudio.com/items?itemName=AhmedAbdulrahman.aylin). Go to test it and leave your feedback.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/3id4b9rjd4ik9la7g9iw.png)

Contribute 💪
if you use it and encounter issues, you can report an issue on Github.

Happy coding ! 💻✨
ProjectMan🦸 is here! Add projects to favorites and open them from command line 
Tags: showdev, javascript, npm, node
Published: 2019-09-05 07:52:34

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/1my7rdy2dmb34oyfet63.png)

So I made an NPM package called **ProjectMan**.

ProjectMan is a project manager CLI which lets you add projects to favorites and open them from wherever you want using `projectman open` command. 

I am lazy to type `p r o j e c t m a n` so there's an alias to command `projectman` which is `pm` so all ya sloths and pandas out there, you can even type `pm <command>`

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/ohszjsco0ppqkg2vyfuj.png)

The whole idea was, I hate to `cd /till/the/project/path` and then open the project in my favorite editor so using ProjectMan you can add projects to favorites with `pm add` and then open them from anywhere you want with `pm open`

`npm install -g projectman` to install ProjectMan and get started🦸

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/ihjt9y942ukz9l9kgmt9.gif)

ProjectMan also provides some other commands like `pm seteditor`, `pm remove` and `pm edit`, You can read about them in [ProjectMan Documentations](https://github.com/saurabhdaware/projectman#readme)


GitHub: https://github.com/saurabhdaware/projectman
NPM: https://npmjs.com/package/projectman

Hope you all will like it! Do star the repository if you liked it!

If there is anyone who needs help to get started with GitHub or wants to practice sending pull request I would be happy to help with this or any of my other repositories, you can reach out to me on my Twitter: https://twitter.com/saurabhcodes

Thank You for showing interest and reading this 🎉
Does anyone know of a debugging browser extension/tool for non-developers ops team?
Tags: ask, help, tools, browser
Published: 2019-09-05 07:49:33

---
title: Does anyone know of a debugging browser extension/tool for non-developers ops team?
published: true
description: Is there a tool i can recommend to the operations team to help then debug a webapp, or more correctly, collect information so that they can send developers helpful information?
tags: ask, help, tools, browser
---
Is there a tool i can recommend to the operations team to help then debug a webapp, or more correctly, collect information so that they can send developers helpful information?

The tool needs to possible take screenshots, screen casts, and even collect network errors, memory consumption, and any other helpful information...

Is there?
Reliance met, Reliance met rates, Reliance met plots
Tags: reliancemet, reliancemetrates, reliancemetplots
Published: 2019-09-05 07:06:33

Reliance Model Economic Township Jhajjar Gurgaon is strategically positioned in industrially backward area and the proximity to Gurgaon covering 30 revenue villages out of which 8 are in Gurgaon district and 22 in Jhajjar district. The project area falls under National Capital Region (NCR) and shares border with Delhi state. The project area is buffered well by the agricultural zones of development plan which falls under L-Zone in North-East of Delhi.For more info about Reliance met, Reliance met rate, Reliance met price, Reliance met rates, Reliance met plot, Reliance met plots Contact us at: 9650389757 or visit website :https://www.aquarock.in
Fortran is not dead either (arguably more alive than COBOL)
Tags: languages, fortran, cobol
Published: 2019-09-05 06:51:33

Fortran is definitely not coffin bound any time soon. COBOL's last ISO standard was [2014](https://en.wikipedia.org/wiki/COBOL#COBOL_2014). Fortran's last was [2018](https://en.wikipedia.org/wiki/Fortran#Fortran_2018). That's right, _last year_.

Interestingly, there's also plenty of action around [Ada](https://en.wikipedia.org/wiki/Ada_(programming_language)) and [Prolog](https://en.wikipedia.org/wiki/Prolog) as well (ignoring C and C++ for now.)

See [wikipedia](https://en.wikipedia.org/wiki/ISO/IEC_JTC_1/SC_22) for more information and links.
An extremely specific case of using Pixi.js across browser contexts in NW.js
Tags: pixi, nwjs, webgl
Published: 2019-09-05 05:11:41

So here is the story:

I develop a 2D game editor called [ct.js](https://ctjs.rocks/), and it is based on NW.js framework that doesn't differ much from electron. Here we have a *"foreground"* page where all the GUI is placed, and a *background* page, where node.js context is placed, augmented with browser environment. Here, "pages" are regular web pages, with DOM, js, and stuff.

Ct.js is an app that consists of tons of scripts, including 3rd-party libraries. Some of them are browser-based and behave strangely in hybrid environments, where both node.js (specifically `require`) and DOM features are present. Libraries may try to override node.js stuff, breaking everything, or think that they are in a pure node.js environment and disable needed features. So most 3rd-party stuff is concatenated and bundled as a script in the foreground page.

But we're in 2019, right? We want to use package managers, or at least `require` so we can organize our code more logically and reliably.

**And here is the problem: node modules run in the background page, and regular scripts execute in the "foreground" window.**

Surely, we can pass the needed variables from one context to another, but what I couldn't transfer was pixi.js' drawing context. IDK how to name that thing, but I suppose that it all narrows down to WebGL contexts that can't be shared between pages.

If I run `require('pixi.js');`, then PIXI resorts in the background page, and it can't draw in the foreground page. **Everything fails silently: you get a blank canvas**, though it seems that simulation still runs — somewhere there.

Another problem is that `Ticker`s from the background page (that are needed to create a render loop) work as if they were stopped. Probably, it is because of `requestAnimationFrame`, or maybe it has something to deal with WebGL exclusively.

I could place pixi.js to that concatenated pile of libraries, but it would pull out all the code for a `RoomEditor` class, and that's a big tree of additional classes that are better kept as node modules.

# The solution ✨

I put this line at the beginning of my foreground page:

```js
global.PIXI = require('pixi.js'); // BOOM 💥
```

Node.js has a nice feature that browser pages don't have: a [`global` object](https://nodejs.org/api/globals.html#globals_global) that persists in one instance across any possible code of your node.js app, including foreground and background pages in NW.js. Some frameworks like Feathers use `global` to preserve the state of your whole app.

This is a bit hacky way, yes. But, oh well 🙃

But here's what I get:

* all the `require`s get the benefit of having a transparent dependency structure, run in a separate background context, give a modular structure and get independence;
* pixi.js still works against the foreground `window`, and calls in node modules still work.

Win-win with just one global variable in the environment (not worse than the case with pixi.js loaded and used as a regular script in the foreground page).

Did you face such issue in electron, though?
This coding bootcamp pays* you to attend. Does that change the game?
Tags: discuss, webdev, bootcamp, education
Published: 2019-09-05 04:54:42

---
title: This coding bootcamp pays* you to attend. Does that change the game?
published: true
description: Lambda School launched a living stipend program that pays students $2000 a month. But there's a very big catch. 
tags: #discuss #webdev #bootcamp #education
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sbs164gwgz4mgf5i76jx.jpg
---

*sorta

##Last spring, a well-known coding bootcamp made a major announcement. 

Lambda School, a 9-month coding bootcamp with [various learning tracks](https://lambdaschool.com/curriculum), reported that they were going to offer [living stipends](https://lambdaschool.com/living-stipends) to select students. 

Lambda is also well-known for their alternative tuition plan known as an Income Share Agreement (ISA). Instead of paying upfront, students pay Lambda a percentage of their income once they get a good paying job as a developer.

###Each stipend is worth $18,000, paid in $2000 increments every month to cover the 9-month program. 

##The very big caveat: 

>Upon completion of the program, students will pay back 10% of their salary for a five year period once they're making at least $50,000 per year, instead of the standard 17% for two years. The max possible payment is capped at $50,000. 

###What do you think? Does this change things for you or do you consider this just another clever marketing scheme? 

Would you consider a bootcamp (or recommend one) if more of these financial incentives or alternative tuition deals were offered? 

Or are there better ways to learn software development? Let's discuss!

Check out the video and be sure to subscribe to my YouTube channel:  

{% youtube CtX1U8810RM %}
What is Your Competence Level?
Tags: career, oop, architecture, beginners
Published: 2019-09-05 04:37:48

What is your competence level as a software developer? To answer this, I come up with a simple framework that I call 'The framework of Competence'.

Being a software developer is a journey. In each journey, you are on different stages. So this framework will tell you at what stage you are in your journey.

Also, this framework is helpful in getting you out of overwhelm. In a programming career, you hear about new tech, frameworks, languages quite often. This can be overwhelming for junior developers. But when you know how will you look like after some experience then you will not feel overwhelmed.

This framework is not here to demoralize you. Once you know where you are you can easily plan your next move.

<b>Stage 0</b>: You are not a programmer-- obvious.

<b>Stage 1</b>: You can develop in a scripting language.

<b>Stage 2</b>: You are acquainted with writing apps in a real programming language.

Wondering what is the difference between scripting and programming language. Look at the answer <a href="https://stackoverflow.com/questions/17253545/scripting-language-vs-programming-language">in this post</a>.

For me, the scripting language is something that is easier to work. JavaScript is a good example (no type checking and easier on forgetting ';' )

Easier than scripting languages are markup languages--examples are HTML and CSS.

<b>Stage 3</b>: You can write complete apps in a programming language and can design a simple API.

<b>Stage 4</b>: You have a complete grasp on developing API and you can write optimized code for the hardware.

<b>Stage 5</b>: You develop operating systems and drivers.

This is a very simple back of the napkin paper framework that you can use to identify your capabilities.

Use this framework when you see a more skillful developer.  With this framework, you will know that you can get to his level of expertise or even ahead but it’s just a matter of time and hard work.
<h2>Great</h2>
If you like this post then <a href="http://eepurl.com/b34ZpL"> get the step-by-step guide</a> to create your personal tool for fighting impostor syndrome.
This guide will help you to:
<ul>
 	<li>Document your progress</li>
 	<li>Make better software task estimation</li>
 	<li>Keep motivated</li>
 	<li>Authentic self-appraisal</li>
</ul>

This post first published <a href="http://www.linesperday.com">here.</a>