teleren/devto huggingface dataset:
Don't have a snappy title this week.
Published: 2020-03-02 06:59:48

I've had a lot of successes in my job search over the last week or two, with some promising leads upcoming. But I'm also dealing with several things in my personal life that are making things challenging. The job search isn't easy, and sometimes life comes knocking at your door with loved ones in need and ailing pets. This post will be rambly and unorganized, I'm certain. 

I don't have the time or the energy to write an interesting breakdown of an algorithm, or a look at a feature of a language (though if I did, I think I would dive into Binary Search Trees. They're interesting and I'm not as solid on them as I'd like to be. Stay tuned, I guess!). This week my tech blog is more about endurance. I keep hearing over and over, the first job as a software engineer is the hardest to land. After that, you're set. I sure hope that's true. Because right now, I just feel overloaded. Money stress. Constant rejection. Mental health - my own and my partner's. Pet health (we may be saying goodbye to our cat soon). It all adds up.

But you know what? I'm gonna make it. I'm smart. I'm fast. I'm dedicated. At every turn, through my bootcamp itself and in every assessment I've taken since, people have said great things about me. I'm apparently pretty stellar at JavaScript! I took a coding assessment for a potential employer, and I totally aced it. It was a timed assessment full of mostly multiple choice questions and small coding windows, and I felt, so-so about it at the time. Nothing too intimidating in it, it was all topics I had either had covered in class, such as OOP fundamentals, DOM manipulation, conditionals, state management, etc., or had since researched on my own. Debriefing with the recruiter, though, I found out I'd done amazingly well! She told me that the score I achieved was more in line with something she'd expect to see from a mid-level engineer.

I'm going to have to let the world be my mirror. My job hunt coach keeps saying he's not worried at all. So let's keep up the optimism.

I learned so much over those 15 weeks at Flatiron. I refuse to discount that. I've come far, and I'm soaring on further. I've got a phone screen, a tech assessment, and an onsite over the next two weeks. I want to review backend structures, runtime calculations, and some object oriented programming fundamentals. Time to hit the books.
React js - link share to Social media working with default OG_TITLE and OG_IMAGE.
Tags: react, redux
Published: 2020-03-02 06:42:10

1. I'm using REACT HELMET (npm)
2. Dynamic OG_TITLE and OG_IMAGE Working only On Page load.
3. Not working while sharing link to social media post of dynamic title.

have you seen these type of issues.
please share the solutions of my question??
please... please...
Ever Heard of Object.prototype.valueOf
Tags: javascript, object, currying
Published: 2020-05-15 08:42:59

---
title: Ever Heard of Object.prototype.valueOf
published: true
date: 2020-03-02 06:37:51 UTC
tags: javascript,Object,currying
canonical_url: https://sunilhari.in/blogs/javascript/Object.prototype.valueOf/
---

So what is `Object.prototype.valueOf`.Yes it is just another function,but just that I have not used it ever.

MDN documentation [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/valueOf) says

> JavaScript calls the valueOf method to convert an object to a primitive value. You rarely need to invoke the valueOf method yourself; JavaScript automatically invokes it when encountering an object where a primitive value is expected

So let's see how can it be used.

```
const numberArray = [1, 2, 3]
numberArray.valueOf()

// [1,2,3]

```

Typically it is used internally by javascript.But let find a use case where we can use it.This might not be the simplest use case you can get.But this is the one where I saw valueOf being used for the first time.

Lets try to develop a function which calculates sum of numbers.Simple enough Huh!!!!!Ok,if it is too simple lets add a little more `masala` to it.

Design a function such that it takes the operands as individual arguments.This specific pattern is called currying.if you want to learn more about it,you can read it [here](https://javascript.info/currying-partials)

```
sum(1)(2)(3)
// should give output 6

```

Lets start it simple.Consider `sum(1)(2)`.From this we can easily understand that we have to write a function that can return a function.Confused?Lets see it in code.

```
function sum(a) {
  return function(b) {
    return a + b
  }
}

```

Hope this clears the air a bit.Similarly if we have to handle more operands,say 4 arguments

```
//sum(1)(2)(3)(4)

function sum(a) {
  return function(b) {
    return function(c) {
      return function(d) {
        return a + b + c + d
      }
    }
  }
}

```

Now lets make this more generic so that it can cater n number of operands.So we have to handle two cases

1. it should keep adding depending on the number of times it is invoked
2. It should output the value at the end of it

Now we can easily make out the part of code that is repeating.Lets take it out separately and make it into a function

```
function sum(a) {
  function adder(b) {
    a += b
    return adder
  }
  return adder
}

```

We have simplified our code.But if you execute this you can see that it keeps returning a function and not a value.

```
function sum(a) {
  function adder(b) {
    a += b
    return adder
  }
  adder.valueOf = () => {
    return a
  }
  return adder
}

// +sum(1)(2)(3)
// 6

```

In the above piece of code we have overwrote the default `valueOf` method to return our sum total.Adding `+` infront would force engine to call `valueOf` on it

**Authors Note**

_Completely understand this post is not super informative.it has its pitfalls.Bear it all for now.I will get there_
JavaScript parseFloat: Convert String to Float Number
Tags: javascript
Published: 2020-03-02 06:32:01

In this Javascript tutorial, we will discuss about the javaScript parseFloat () function, you will learn what is parseFloat in javascript and what it does. You will learn from this javascript parseFloat example. After finishing this quick guide, you will be familiar with JavaScript Parsing () syntax and where you should use it.

<script>

 // return float value
a = parseFloat("  10  ")
document.write('parseFloat("  10  ") = ' +a +"<br>");


b = parseFloat("123abc")
document.write('parseFloat("123abc") = '+b +"<br>");

// returns NaN value
c = parseFloat("abc456")
document.write('parseFloat("abc456") = ' +c +"<br>");

d = parseFloat("3.14")
document.write('parseFloat("3.14") = '+d +"<br>");

// returns only first Number
e = parseFloat("18 2 2019")
document.write('parseFloat("18 2 2019") = ' +e +"<br>");

</script>

Continue Reading https://www.tutsmake.com/javascript-parsefloat-convert-string-into-float-no-javascript/
Reverse Proxy and setup in Apache (Windows|Linux)
Tags: challenge, java, apache
Published: 2020-03-02 06:28:35

> Setup a web server in Machine 1, with some static pages (sample.html)
> Setup a web server in Machine 2, and this should point to machine 1 as a reverse proxy
> from a 3rd machine (client) Access http://Machine2:Port/sample.html and the sample.html from machine 1 should be shown in client machine.

Share your Ideas in command Line.....
Queue Data Structure in Javascript
Tags: javascript, webdev, beginners, computerscience
Published: 2020-03-02 04:50:07


Queue is a linear list of elements in which deletion of an element can take place at one end, called `Front` and insertion can take place at the other end, called `Rear`   

The first element in the queue will be the first one to be removed from the list. Queues are also called FIFO(FIRST IN FIRST OUT).

Think of a queue just like a line. It is horizontal. The first one in the line/queue is the first one out. The line starts on the left and ends on the right. Hence you would use pop(), to remove the "last" element of the array.

#Applications of the Queue

+ Serving request on a single shared resource, eg - PointerEvent, CPU task scheduling, etc,
+ In real life, call center phone system(people should wait in and hold until the service representative is free)
+ Handling of interrupts in real-time systems.

# Basic Operations 

The basic operation that can performed are `Enqueue`, `dequeue` and `display`.

**Enqueue(terminology for Insertion)** - add an item to the queue.

**dequeue(terminology for Deletion)** - remove  an item from the queue

**IsEmpty** - Checks if the queue is empty.

**IsFull** - Checks if the queue is full.

**Peek** - Gets the element at the front of the queue without removing it.

# How to use a Queues
Create a queue data structure.  The queue should be a class with methods `enqueue` and `dequeue`.Adding to the queue should store an element until
it is removed.

**Functions to be implemented**
```javascript
enqueue(item) 
dequeue() 
front() 
isEmpty()
```

#Examples Usage
```javascript
const q = new Queue();
q.enqueue(1);
q.dequeue(); // returns 1;
```

```javascript
// Queue class 
class Queue {
  constructor() {
    // Array is used to implement a Queue
    this.data = [];
  }

  // Functions to be implemented 
  // enqueue(item) 
  // dequeue() 
  // front() 
  // isEmpty() 

  // Adds an element to the queue
  enqueue(item) {
    this.data.unshift(item);
  }
  // removing element from the queue 
  // returns underflow when called  
  // on empty queue 

  dequeue() {
    if (this.isEmpty()) {
      return "Underflow";
    }
    return this.data.shift();
  }

  // front function 
  front() {
    // returns the Front element of  
    // the queue without removing it. 
    if (this.isEmpty())
      return "No elements in Queue";
    return this.data[0];
  }

  // isEmpty function 
  isEmpty() {
    // return true if the queue is empty. 
    return this.data.length === 0;
  }
}

module.exports = Queue;
```

If you found this article helpful, please click the <img src="https://practicaldev-herokuapp-com.freetls.fastly.net/assets/emoji/emoji-one-unicorn-695106da1194513bfa0092f1a75943f59089be7d6addbc7459bdfab80f5709e6.png" alt="drawing" width="20" height="20"/> Follow this channel for more articles on Data Structures using Javascript.
Jasa Penerbitan Ebook Gratis
Tags: ebook, publisher
Published: 2020-03-02 03:54:53

Ada berbagai kategori di website kami yaitu diantaranya berisi berbagai tips, cerpen, juga berbagai tutorial bermanfaat bagi anda.



Selain berbagi informasi, situs web kami juga menyediakan jasa penerbit ebook gratis. Dan hebatnya bukan sekedar terbit gratis, tetapi juga anda akan mendapatkan Royalti sebesar 10% dari harga penjualan ebook tersebut. Visit https://serambicatatan.blogspot.com/p/terbit-gratis.html



Tentu kami juga mempunyai persyaratan lain , tetapi tidak terlalu sulit dan tidak menyulitkan penulis.



Ikuti saja persyaratan yang telah kami buat dan ebook anda pun akan terbit secara gratis tanpa di pungut biaya.



Jadi, jangan sia-siakan naskah terbaik yang anda punya, segera hubungi kami dan segera lengkapi persyaratan maka ebook anda akan kami terbitkan.
One of the founding fathers of the Web is working on a new project to manage how your personal data is shared
Tags: security, webdev
Published: 2020-03-02 03:50:29

https://solid.mit.edu/

Tim Berners-Lee is directing this. Known as SOLID: for "social linked data"

How important is it to build protocols from the ground up with privacy in mind?

How realistic is it that the majority of web infrastructure will adopt/enforce something like this?

🙂
Adding a route loading bar to Vue and Gridsome
Tags: gridsome, vue, tutorial
Published: 2020-03-02 18:50:56

---
title: Adding a route loading bar to Vue and Gridsome
published: true
date: 2020-03-01 20:00:00 MST
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/8bpukanizfuhdgn2trbb.gif
tags: gridsome, vuejs, tutorial
canonical_url: https://developerbacon.ca/articles/adding-a-route-loading-bar-to-vue-and-gridsome/
---

## Dependency Installation

For this tutorial, I have decided to use NProgress for the loading indicator. You can check the demo page at [ricostacruz.com/nprogress](https://ricostacruz.com/nprogress/).

To start this tutorial you will need to install NProgress.

```bash
npm install nprogress
#or
yarn add nprogress
```

## Importing the files

once the installation is complete we can move on adding the code the `main.js` file. If you don't already have one it should be located in `src/main.js`. To start using NProgress we will have to import the JavaScript and CSS.

```js
import NProgress from "nprogress";
import "nprogress/nprogress.css";
```

If you a SCSS file that you would rather import the CSS there you will need something like this. This import will look different depending on your setup and where your SCSS file is located.

```scss
@import "../../../node_modules/nprogress/nprogress.css";
```

## Now for the actual code

Your `main.js` files should look something like this. Note that the function is grabbing the **router** object. I added the `typeof document !== "undefined"` to the if statement because of an error I received during build.

```js
export default function(Vue, { router }) {
	router.beforeEach((to, from, next) => {
		if (!to.hash && typeof document !== "undefined") {
			NProgress.start();
		}
		next();
	});

	router.afterEach((to, from) => {
		if (!to.hash && typeof document !== "undefined") {
			NProgress.done();
		}
	});
}
```

If you are not using Gridsome this is the documentation for [router gaurds](https://router.vuejs.org/guide/advanced/navigation-guards.html#global-before-guards) for Vue and your main Javascript file where your router is defined should look something like this:

```js
const router = new VueRouter({ ... });

router.beforeEach((to, from, next) => {
  if (!to.hash) {
    NProgress.start();
  }
  next();
});

router.afterEach((to, from) => {
  if(!to.hash) {
    NProgress.done();
  }
});
```
Java Main Method: Why so Many Words?
Tags: java, beginners, codenewbie, computerscience
Published: 2020-03-02 02:58:59

`public static void main(String[] args){`
`// code`
`}`

![ugh](https://dev-to-uploads.s3.amazonaws.com/i/t2og55ikvp4uaxo956ck.gif)

"Seriously? I have to type this every time i write a program? That is a lot and I miss JavaScript! 😭" These were always my thoughts when I was in college just starting with Java after learning JavaScript for a bit. 

What we see above is the main method in Java. Let's break it down and talk about each word in this line of code. 

**Public**
*Public* in Java is an access modifier. Access modifiers specify the accessibility or scope of a method, constructor, or a class. There are four access modifiers: 

1. Private: the access level of this modifier is only within the class and cannot be accessed from outside of the class. 
2. Public: the access level of this modifier is everywhere and can be accessed within the class, outside the class, within the package and outside the package.
3. Protected: the access level of this modifier is within the package and outside the package through child classes, without which it cannot be accessed from outside. 
4. Default: the access level of this modifier is only within the package, and cannot be accessed from outside the package. 

The main method has to be *public* because we want access to it. 

**Static**
In Java, a *static* member of a class is a member that isn't associated with an instance of a class. This member belongs to the class itself and can be accessed without first creating a class instance. A method that is declared with the *static* keyword is associated with the class itself, and therefore we don't have to create an object from a class before using *static* methods defined by the class. 

If the `main` method is not static, JVM wouldn't be able to call it because there is no class object present. That's why the `main` method must be *static* so that JVM can call the `main` method which is not associated with an instance of a class. 

**Void**
This one is simple. The keyword *void* is used at method declaration to indicate that the method should not have a return value, and this is why `main` method is *void*

**Main**
*Main* is just a name for the method, and when we run a Java program, it looks for the name. 

Below is a simple program that calculates the Fibonacci of n recursively and prints out the result.

{% gist https://gist.github.com/yulineko/3c44df9681bd334fd2c4396a88d34f9f.js %}
Identify SSL Expiration Date using ColdFusion
Tags: coldfusion, cfml, java, ssl
Published: 2020-03-02 01:24:33

We use [LetsEncrypt](https://letsencrypt.org/) and monitor the SSL certificate expiration dates locally by parsing the actual certificate files, but if you require a way to remotely monitor a third-party SSL certificate in order to ensure that the renewal process hasn't failed, here’s some #cfml / #java to do just that.

## Source

{% gist https://gist.github.com/JamoCA/6aff53c0e002df8faa8c316f0138c507 %}
ColdFusion Dates (M/D/YYYYYYYYY)
Tags: coldfusion, validation
Published: 2020-03-02 01:19:05

While sanitizing user-provided data, I encountered a string that ColdFusion evaluated as a date, but SQL Server didn’t agree with due to "out of range" for the date SQL Server data type.  The date was `7/22/22019`.

I was curious to see what the max limit was and discovered that ColdFusion 2016 & 2018 behave differently when validating date. Apparently `12/31/292278993` is a valid date in CF2016 & 2018, but the next year doesn’t exist in CF2016.  ("1/1 - 9/8" month/days are valid in CF2016, but time ceases to exist on/after `9/10/292278993`.)

I'm not sure why these dates are considered valid.  If I try to store these "dates" into either Microsoft SQL Server or MySQL, both will throw an "out of range" error. Even creating an inline java-based CFQuery throws an error. If you use [CreateODBCDate()](https://cfdocs.org/createodbcdate) using ColdFusion 2018, it will throw a hard "uncatcheable" error which can't be prevented using [try/catch](https://cfdocs.org/cftry).

Since upgrading to ColdFusion 2016, I've had to write my own custom validation functions to deal with the shortcomings of Adobe's changes regarding how it validates integers, URLs, email... and now dates.

Here's a quick proof-of-concept script:

## TryCF.com Demo

[https://trycf.com/gist/01e14657a47846bb3aa7ca88295b8832](https://trycf.com/gist/01e14657a47846bb3aa7ca88295b8832)

## Source

{% gist https://gist.github.com/JamoCA/01e14657a47846bb3aa7ca88295b8832 %}
Use Java replaceAll() instead of ColdFusion ReReplaceNoCase()
Tags: coldfusion, cfml, java, regex
Published: 2020-03-02 01:05:18

This blog post is in response to this blog post "[Regular expressions – practical examples to get you started](https://coldfusion.adobe.com/2019/06/regular-expressions-practical-examples-get-started/)". _(My comment wasn't accepted after submitting twice and I'd rather post it somewhere that I have a little control as Adobe's community content tends to get deleted over time.)_

We've encountered some unpreventable ColdFusion hard errors (that can't be prevented using try/catch) when using [ReReplaceNoCase()](https://cfdocs.org/rereplacenocase) in our application framework.  Here are some reported bugs that are similar:
- https://tracker.adobe.com/#/view/CF-3928688
- https://tracker.adobe.com/#/view/CF-4165797 *(Note: I'm "External U" and I never withdrew this bug.)*

To work around this intermittently occuring bug (which Adobe classifies as "UserError" or "AsDesigned"), we started casting the initial value as a string (required for Java; not all CF-typeless variables contain pure "string" values) and using Java's replaceAll().  Our functions now seem faster, but more importantly there's no occasional CFError occurring in any of our apps.

When using regular expressions with ColdFusion, the [ReEscape()](https://cfdocs.org/reescape) function (available since CF10, but not available in [Lucee](https://luceeserver.atlassian.net/browse/LDEV-810) at the time of this article) simplifies escaping characters that match regular expression control characters.

If interested in using more regex matching functions in ColdFusion, check out Ben Nadel's JRegEx:
https://www.bennadel.com/blog/3322-jregex—a-coldfusion-wrapper-around-java-s-regular-expression-patterns.htm

**UPDATE 2/4/20201**
Apparently using `replace()` with high ASCII characters (ie emojis) can be problematic too. (Reported in CF2018; Fixed in CF2021)
https://tracker.adobe.com/#/view/CF-4206938
Flutter for React developers video series
Tags: flutter, dart, react, reactnative
Published: 2020-03-02 00:07:09

Picking the right tools for development is important when building a good app. The common mantra "**_write once, deploy everywhere_**" has proven to be effective from solutions like Phonegap or Ionic or NativeScript.

Flutter is a contender by Google designed to enable developers to build cross-platform applications. These applications will run on the web, mobile and desktop. It's also written in Dart, which makes it easy to pick up in a couple of hours.

Flutter is mainly inspired by React with some noteworthy improvements. For example apps written for mobile are compiled <em>ahead-of-time</em> to machine code, so that means that the underlying language the app was written in does not enter production. This carries the benefit of not having to ship with the Dart VM, thus, drastically reducing app size and increasing performance.

## Part 1
{% youtube arIeSpgMZ7M %}

## Part 2
{% youtube Uxt7ycYNNHI %}

## Sharing is caring

If you enjoyed reading this post, [subscribe to the YouTube channel](https://youtube.com/c/CreativeBracket) (_hit the bell icon too_) for more videos on Dart.

Watch my [Free Get started with Dart course](https://egghead.io/courses/get-started-with-dart) on Egghead.io and [join my email newsletter](http://eepurl.com/gipQBX) to download my Free 35-page eBook titled Get started with Dart and to be notified when new content is released.

**Like, share and [follow me](https://twitter.com/creativ_bracket)** for more content on Dart.

_Originally published at [https://creativebracket.com](https://creativebracket.com/flutter-for-react-developers-video-series/)._