teleren/devto huggingface dataset:
Create a Front-end form with Advanced Custom Field(ACF)
Tags: acf, wordpressplugins, wordpress, php
Published: 2019-12-07 07:20:48

---
title: Create a Front-end form with Advanced Custom Field(ACF)
published: true
date: 2019-11-08 18:25:35 UTC
tags: acf,wordpress-plugins,wordpress,php
canonical_url: https://medium.com/@keramotul.islam/create-a-front-end-form-with-advanced-custom-field-acf-aee4ea9c5d65
---

![acf front-end form](https://cdn-images-1.medium.com/max/1024/1*HTarfYVOccrTf3yuqURtLg.png)

Yes, you heard right. We can create a front-end form with ACF. Let’s say, we have some users and we want them to create posts from a front-end form and those posts will be saved as Draft on the admin panel for Admin approval.

It sound’s tough but ACF makes it super easy for us. `acf_form()` will do all the hard works for us.

``` php
$agrs = array(
    'post_id'  => 'new_post',
    'new_post' => array(
        'post_type'   => 'post',
        'post_status' => 'draft'
    ),
    'post_title'      => true,
    'post_content'    => true,
    'submit_value'    => esc_html__( 'Add Post', 'text_domail' ),
    'updated_message' => esc_html__( 'Post Saved.', 'text_domail' )
);

acf_form( $agrs );
```

This function is going to create a front-end form for the user's input but it’ll not save those data. `acf_form_head()` is the function which going to save those data. It is very important to add this hook before `get_header()`. Yeah, it sounds annoying but that’s how it works.
Automating Screencasting with Keyboard Maestro
Tags: screencasting, automation, teaching
Published: 2019-11-08 17:51:53

When I was recording the videos for [Upgrading AngularJS](https://www.upgradingangularjs.com/), I was using a Windows 10 laptop. Every time I wanted to shoot a video, I had to remember to hide the taskbar, hide my other windows, open up my editor and browser, and probably other things I'm forgetting. 

It was really tedious.

When I switched to Mac when joining Auth0, I started researching how to automate different pieces of my writing, coding, and screencasting process.

Enter [Keyboard Maestro](https://www.keyboardmaestro.com/main/). Keyboard Maestro is an insanely powerful Mac application that lets you automate virtually *anything* using combinations of **triggers** and **actions**.

Want to open an app when you connect to coffee shop wifi? Done. 

Want to hit a single key to launch your entire development environment &mdash; including resizing all of your windows and running terminal commands? Done. 

Want to trigger an end-of-day routine at 5 pm every day to force you to stop working? Done.

Keyboard Maestro has become completely essential to my workflow. The biggest help to me has been with recording screencasts. I now have a single keystroke that:

- Hides all applications
- Launches my editor (Camtasia until recently, but now Screenflow)
- Opens iTerm and runs a `teach` command, which is an alias to launch Visual Studio Code with special settings (light theme for accessibility, bells and whistles disabled, etc.)
- Resizes the front window to 1280x720 and center it.
- Opens Chrome and send it to `localhost:8000` (I can adjust this depending on the project, but that's a good standard)
- Resizes Chrome to 1280x720 and centers it.

Here's a quick video on how to do it. (Oh, the video also refers to [Karabiner Elements](https://pqrs.org/osx/karabiner/), be sure to grab that.)

{% youtube LFu6pM4TYKE %}

If you want to master Keyboard Maestro, there's no better tool than David Sparks' [Keyboard Maestro Field Guide](https://learn.macsparky.com/p/km).

Let me know if this helps!

*Read more of my writing at [samjulien.com](http://www.samjulien.com/). Want to hang out while I experiment with code from the farm? [Follow me on Twitch](https://www.twitch.tv/samjulien). Questions? [Hit me up on Twitter](https://twitter.com/samjulien).*
How do you decide when it's a good time to change jobs?
Tags: watercooler, discuss, career, advice
Published: 2019-11-08 17:32:49

I know I know,

It is an age old question that is as contingent on my career "wants" as it is in my personal feelings about the situation. 

I've found myself in an interesting position that I've never been in before as a junior developer. I was hired 4 months ago as a Problem Analyst and was recently approached by another company, not once, but twice in hopes of hiring me. Though I declined the first time, the second time the CEO contacted me directly saying that he wants to know what it would take to get me on board. 

What would you do in this situation? 
Have you been in this situation? And if so how did it pan out?

For some more information:

I just passed the 90 day trial period at my current workplace and it's been great. They've made me feel welcome and have made it clear they are hoping I stay long term. Its a great work environment, with a mix of older languages and newer ones. 

The new company is on the forefront of a rising tech trend that could really boost my knowledge and worth if it blows up in the near future. Its also the job I originally wanted before getting an offer at my current company that I took due to the urgent need for a job. 

To throw a wrench in it my wife and I are expecting a son any week now (due end of Nov) and I plan on taking paternity leave next year in Q4. 

My initial thought is to throw a crazy (to me) offer at the new company and see if they accept. Something like a 15% raise, instant benefits and some other stipulations that would make it worth it to me to change jobs. 

As this is my first time in such a situation I'm curious how other people would handle it. To me it seems like a win win, either they accept my offer and I'm making more money, or they decline it and I stay at my current, also great job. 

Thanks for taking the time to read this, I look forward to your responses. 

Happy Friday
Performance Testing Neo4j Database using Bolt Protocol in Apache JMeter
Tags: jmeter, performancetesting, neo4j, bolt
Published: 2019-11-08 17:09:37

---
title: Performance Testing Neo4j Database using Bolt Protocol in Apache JMeter
published: true
description: This blog talks about performance testing Neo4j database using Bolt protocol in Apache JMeter 5.2
tags: jmeter,performance testing, neo4j, bolt
---

# Introduction

Apache JMeter 5.2 has been released with lots of new features, enhancements, and bug fixes. JMeter 5.2 supports Bolt protocol out of the box. No need to install it via Plugins Manager. This blog post provides you an overview about performance testing Neo4j database using Bolt protocol in Apache JMeter 5.2

# Prerequisite

* [Apache JMeter 5.2](https://jmeter.apache.org/download_jmeter.cgi)
* [Neo4j Community Server with demo data](https://neo4j.com/download-center/#community)

# Bolt Connection Configuration and Bolt Request

First, you need to add the basic elements such as Thread Group, Bolt Connection Configuration, and View Results Tree, then you need to add Bolt Request.

In Bolt Connection Configuration, you need to add the Bolt URI with the valid credentials. Default credentials of Neo4j is neo4j/neo4j. At first login, it will prompt you to change the password.

Once the connection is set up, next you need to load up the demo data in your Neo4j. 

[Detailed instructions are in here.](https://qainsights.com/performance-testing-neo4j-database-using-bolt-protocol-in-apache-jmeter/)

Bolt communicates over 7687 port.

Neo4j can be accessed from your favorite browser using http://localhost:7474.

Now, head back to JMeter and enter the below command in the Bolt Request.

`MATCH (n:Movie) RETURN n LIMIT 25`

Make sure you set the `Record Query Results` flag set to `true`, and then hit run.

In View Results Tree, you can see the response as shown below.

![JMeter Output](https://qainsights.com/wp-content/uploads/2019/11/image-19.png)

# Limitations

* You cannot configure the pool size of Bolt Connection in this inception implementation.

* You need to set the `Record Query Results` set to `false` for better performance.

# Video Demo

Here is the complete video demo.

{% youtube EhknR09lG6g %}

# Sample Bolt Request Script

{% github QAInsights/Bolt-Protocol-Script-JMeter %}
500 followers!😱🤩 About myself
Tags: discuss, showdev, career, beginners
Published: 2019-11-08 16:53:07

Few days ago I celebrated my first 500 followers on Dev.To.🎉
Actually, **YOU 👋 are first 500 followers in my life**, and I am glad that it happend on Dev.To. It is a friendly and intelligent environment of nice, professional and passionate people!

I skipped to write the introduction post at the very begining, so I would like to do that now.

<h2>Who I am?</h2>
I am an IT girl.👩‍💻 Yes, so short.💁‍♀️

Actually, I have a mixed education and experience: linguistic, engineering and scientific. But, what have always been a significant part of my life - is languages:
1. I studied **human languages** in the lingustic gymnasium. I was even supposed to become a professional linguist.
2. Then I learned **programming languages** at IT university and developer’s job. I even worked to create my own programming language while being a postgraduate.
3. Now, I am learning **marketing language**.

These three skills help me to be who I am. Programming have taught me to structure information in my mind, lingustics - to structure it on paper and marketing tells how to introduce information after all.👆

<h2>Why I am here?</h2>
I am here for both **fun and job**.

I want to enjoy communication with like minded people, learn and share. This is my first blogging experience and I hope to improve myself in that. I had some written experience before: scientific articles, technical articles, esses, etc. But, writting on Dev.To is a new format for me - it requires more collaboration and understanding the audience.

I want to tell you about **[Aspose](https://www.aspose.com/?utm_source=https://dev.to/grazhevskaja/500-followers-about-myself-57cd-temp-slug-5856600&utm_medium=email)** products, because [they are great](https://dev.to/aspose_slides/aspose-apis-save-you-from-ms-office-automation-hell-59dh).🙌⭐️
I am Developer Evangelist in Aspose - yes, the role, that nobody knows what is it.😁
For me, being Developer Evangelist means - showing you that Aspose products are great, as well as doing everything to make them better for you.
I have already published few posts about **[Aspose.Slides](https://products.aspose.com/slides?utm_source=https://dev.to/grazhevskaja/500-followers-about-myself-57cd-temp-slug-5856600&utm_medium=email)**, and it seems you liked them:
<p>
{% post https://dev.to/aspose_slides/boost-your-presentations-with-gifs-2d73 %}
{% post https://dev.to/aspose_slides/automate-presentation-speaker-notes-3dnc %}
{% post https://dev.to/aspose_slides/fallback-font-and-font-substitution-for-presentations-173o %}
</p>

<hr/>

**What do you want to know about [Aspose.Slides](https://products.aspose.com/slides?utm_source=https://dev.to/grazhevskaja/500-followers-about-myself-57cd-temp-slug-5856600&utm_medium=email) and presentations?**
**What do you want to know about me?👇👇👇**
80/20: component libraries to kick-start your project
Tags: design, startup, sideprojects
Published: 2019-11-08 16:48:28

I believe many of us have side projects that'd we'd like to bring to life as soon as possible. Whether you're a normal developer or start-up founder, the goal is almost always to get something tangible ready.

In April, I gave a talk that focused on using component libraries to kick-start your projects and get things done in a quick manner!

For the sake of the talk, I also built a [simple interactive page](http://www.kethmar.ee/cl/) to show how easy it is to use component libraries.

The video brings out great tips about why and how to choose the component library.

{% youtube OVpheXO5dB4 %}

Also visit [Awesome ui component library](https://github.com/anubhavsrivastava/awesome-ui-component-library), a collection of tens of different component libraries for most of the popular frontend frameworks.
My new favorite CMS: Kirby
Tags: cms, coding, kirby, php
Published: 2019-11-08 16:30:27

---
title: My new favorite CMS: Kirby
published: true
description: 
tags: CMS, Coding, Kirby, PHP
---


My [business website](http://www.demicheliservices.com/) is made with [Kirby](https://getkirby.com/). I'm skeptical about Content Management Systems after using Drupal 8 and Wordpress. These big(ger) systems have grown organically over the years and a lot of bloat and inconsistencies that are noticeable and make things unnecessarily complicated.

After these past few days I can confidently say that Kirby is **awesome**. The community and ecosystem are not that big but there's a lot of thought that went into the developer experience. For example enabling the website to be multilingual is as easy as adjusting the config file like this.

```php
return [
    'languages' => true,
    'languages.detect' => true,
];
```

No bloat, no weird API. Definitely worth paying for. Sometimes it's a bit magical but reading the source code is always an option. If you haven't tried it yet, here's my recommendation to check it out.
What was your win this week?
Tags: discuss, weeklyretro
Published: 2019-11-08 16:24:53

---
title: What was your win this week?
published: true
description: Got to all your meetings on time? Started a new project? Fixed a tricky bug?
tags: discuss, weeklyretro
cover_image: https://cl.ly/188e843c2985/download/Image%202019-02-15%20at%202.36.37%20PM.png
---

👋👋👋👋

Looking back on your week -- what was something you're proud of?

All wins count -- big or small 🎉

Examples of 'wins' include:

- Getting a promotion!
- Starting a new project
- Fixing a tricky bug
- Cleaning your house...or whatever else that may spark joy 😄

![win](https://media.giphy.com/media/npGPMxc6H0QjC/giphy.gif)
Why did you leave your Boss?
Tags: career, productivity, friday, watercooler
Published: 2019-11-08 16:23:00

{% twitter 583606339240390658 %}

People have always said that their main reason for leaving their Job is their manager.

But we don't often get to hear the reasons behind it, without mentioning names/companies feel free to list some of the main reasons you've made the switch 👇
Detect memory leaks in Android Apps
Tags: memoryleaks, kotlin, java, android
Published: 2019-11-08 16:09:45

Detecting memory leaks in live Mobile Apps is not at all easy. Here @donpeter06 explains how you can use Finotes to detect leaks in Android, both in production and development.

Read the blog here - https://www.blog.finotes.com/post/how-to-detect-memory-leaks-in-android
Benchmarking Array Traversal in Javascript – Going Backwards is Fastest
Tags: javascript, programming, tutorial, uncategorized
Published: 2019-11-08 16:21:44

---
title: Benchmarking Array Traversal in Javascript – Going Backwards is Fastest
published: true
date: 2019-11-08 16:07:15 UTC
tags: Javascript,Programming,Tutorial,Uncategorized
canonical_url: https://qvault.io/2019/11/08/benchmarking-array-traversal-in-javascript-going-backwards-is-fastest/
---

![](https://qvault.io/wp-content/uploads/2019/11/photo-1509099652299-30938b0aeb63.jpeg)

There are many ways to traverse an array in Javascript. In this benchmark, we will look at five different ways and the pros and cons of each. Keep in mind that these benchmarks were run in a Chrome browser on [Codepen](https://codepen.io/). Results will vary by browser/interpreter.

For a working example of these benchmarks, take a look at this codepen: [https://codepen.io/lane-c-wagner/pen/GRRGryr](https://codepen.io/lane-c-wagner/pen/GRRGryr). All benchmarks we ran on an array of 1000000000 items.

## 1st: Vanilla JS – Backwards

```
for (let i = arr.length-1; i>=0; i--){}
```

~ 30 milliseconds

Going **backwards is faster** than going forward! This is because at each iteration the loop checks against a constant 0 zero value instead of calling the array’s _.length_ property. Doesn’t mean you should do it though… its weird and hard to follow cognitively.

## 2nd: Vanilla JS – Forwards

```
for (let i = 0; i< arr.length; i++){}
```

~39 milliseconds

## 3rd: ES6 forEach()

```
arr.forEach(function(element) {});
```

~180 milliseconds

Slow but with a more convenient syntax, nothing surprising here.

## 4th: jQuery Each

```
$.each(arr, function( index, value ) {});
```

~225 milliseconds

Eeeeeew… jQuery. Convenient if you live in 2010. Very Slow.

## Wildcard: For..Of ES6

![](https://qvault.io/wp-content/uploads/2019/11/photo-1501003878151-d3cb87799705-1024x683.jpeg)

```
for (const item of arr){}
```

First and second time running: 153 Milliseconds

Third+ times running : ~18 milliseconds

This is weird, and I’m not sure how to explain it. Maybe someone smarter than me can tweet me the answer [@wagslane](https://twitter.com/wagslane) . The first two times running this after a fresh browser load are quite slow, but then it gets blazingly fast. I’m assuming there are some es6 optimizations under the hood that kick in.

By Lane Wagner [@wagslane](https://twitter.com/wagslane)

Download Qvault: [https://qvault.io](https://qvault.io/)

Star our Github: [https://github.com/q-vault/qvault](https://github.com/q-vault/qvault)

The post [Benchmarking Array Traversal in Javascript – Going Backwards is Fastest](https://qvault.io/2019/11/08/benchmarking-array-traversal-in-javascript-going-backwards-is-fastest/) appeared first on [Qvault](https://qvault.io).
How to specify the shape of an object with PropTypes
Tags: react, javascript, proptypes
Published: 2019-11-08 15:45:24

---
title: How to specify the shape of an object with PropTypes
published: true
description: With PropTypes we can also check the inner structure of objects
tags: reactjs, javascript, PropTypes
cover_image: https://ferrariwebdevelopment.s3.us-east-2.amazonaws.com/assets/20190928-prop-types2.jpeg
---

## With PropTypes we can also check the inner structure of objects

Yesterday we learned how the `PropTypes` library makes it easy for us to check the types of objects we pass to React components through the props.
For example, this code makes sure the object `pokemons` is an array of objects:

```js
Pokemons.propTypes = {
  pokemons: PropTypes.arrayOf(PropTypes.object)
}
```

If we accidentally pass `pokemons` as an array of other types, like an array of *strings* for example, we get a warning in the Javascript console and we can fix the error.

`PropTypes` lets us go further, though. It lets us describe in detail the inner structure of an object, what is called the *shape* of an object. This makes our data validations more thorough and accurate.
The way we do this deep validation is by using the `shape()` method of `PropTypes`.
`shape()` takes an object and validates the types inside the object.
Here's an example:

```js
Pokemon.propTypes = {
  pokemon: PropTypes.shape({
    name: PropTypes.string,
    id: PropTypes.number,
    base_stamina: PropTypes.number,
    base_defense: PropTypes.number
  })
}
```

Here we validate that the `pokemon` object has a `name` of type `string`, and `id`, `base_stamina` and `base_defense` of type `number`.
If the object we pass into our props has one of these properties wrong, we will get a warning, even though Javascript would be happy to accept a string in place of a number type.

### Required properties

Sometimes we need to pass props objects that have some required properties and some optional ones.
`PropTypes` helps us in this case as well by specifying which property is required and raising a warning if it's not present.
To perform this check we simply add `isRequired` at the end of the property type, like so:

```js
Pokemon.propTypes = {
  pokemon: PropTypes.shape({
    name: PropTypes.string,
    id: PropTypes.number.isRequired  // required property
  })
}
```

We may not feel the need to use `PropTypes` every single time, but when our project grows and becomes complex `PropTypes` sure helps avoid bugs that could become difficult to track down.
I made an app that generates unlimited Avatars
Tags: javascript, react, emojis
Published: 2019-11-08 16:00:07

[GetAvatars.app](http://getavatars.app/)

Would love to hear your feedback.

This was made using React.js, Next.js, and hosted on Zeit's serverless deployment.

Artwork credit: https://avataaars.com/

Enjoy!
Waarom heeft Go Python niet ingehaald in populariteit? (Dutch)
Tags: go, dutch, nederlands
Published: 2019-11-08 15:34:27

Als je net gehoord hebt over <a href="https://golang.org/">Go</a>, vraag je je misschien af of het zo geweldig is, waarom zien we het niet overal?

In deze post zal ik proberen die vraag vanuit mijn eigen perspectief te beantwoorden. 

## Domein kennis

In veel domeinen is <a href="https://python.org">Python</a> de standaardtaal. Zoals in datamining of machine learning, waar je allerlei bewerkingen moet doen met de data (slicing, modellen etc.). 

Door te kiezen voor Python kunt u gebruik maken van de bestaande codebasissen en ontwikkelingsgemeenschap. Dit is wat veel ontwikkelaars doen.

Go is ontworpen om robuuste systemen op schaal te bouwen, zoals micro-services. Je kunt ervoor kiezen om voor Go te kiezen, maar voor veel ontwikkelaars vereist Go een beetje studie om te begrijpen. 

<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fmedia1.tenor.com%2Fimages%2F71cec41e363e0455f61c478f1bdea496%2Ftenor.gif%3Fitemid%3D9796017&f=1&nofb=1">

## Prestaties

Dan zijn er nog mensen die de prestaties van Go nodig hebben, maar die in plaats daarvan C/C+++ zullen gebruiken omdat ze dat lang geleden geleerd hebben.

Als u netwerkgerichte programma's hebt (microservices en dergelijke) of programma's met concurrency, kan het de beste oplossing zijn.


**Related links:**
* <a href="https://golang.org/">Download Go</a>
* <a href="https://golangr.com/">Golang tutorial</a>
* <a href="https://python.org">The Python website</a>
Why hasn’t Go overtaken Python in popularity?
Tags: go
Published: 2019-11-08 15:29:07

If you just heard about <a href="https://golang.org/">Go</a>, you may wonder if it's so great, why don't we see it everywhere?

In this post I'll try to answer that question from my own perspective. Let me know if you agree or disagree. Don't forget to smash the like :P

## Domain knowledge

In many domains, <a href="https://python.org">Python</a> is the default language. Like in data mining or machine learning, where you need to do all kinds of operations with the data (slicing, models etc). 

By choosing Python you can take advantage of the existing code bases and development community. This is what many developers do.

Go was designed to build robust systems to scale, like micro services. That's when you could choose to go for Go, but for many developers Go requires a little bit of work to understand. 

<img src="https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fmedia1.tenor.com%2Fimages%2F71cec41e363e0455f61c478f1bdea496%2Ftenor.gif%3Fitemid%3D9796017&f=1&nofb=1">

## Performance

Then there's those who need the performance of Go, but that will use C/C++ instead because they learned that a long time ago.

If you have network-centric programs (micro services and so on) or high-concurrency programs, it may be the best solution.


**Related links:**
* <a href="https://golang.org/">Download Go</a>
* <a href="https://golangr.com/">Golang tutorial</a>
* <a href="https://python.org">The Python website</a>