teleren/devto huggingface dataset:
molecules
Tags: showdev, types, java, molecules
Published: 2019-05-26 11:48:30

---
title: molecules
published: true
description: a library of simple and useful Java classes with built-in validations
tags: showdev, types, Java, molecules
---

So recently I've started a project. It is a library of useful Java classes with built-in validations.

## Sorry, what?

Think about a person. Now try to make a Person class. I guess you would craft something like this:

```java 
public class Person {
    private String firstName;
    private String lastName;
    private Date birthDate;
    private String email;    
}
```

Can you see that we have these properties: name and email address, but we have to map them to types like String, Date, etc. And do not forget about validating this data in the service or controller layer...

So instead of these, why can't we have Name or Email types? And these types should know what is a valid email address or what is the maximum length of a name.

By using molecules, your Person class could look something like this:

```java
public class Person {
    private Name firstName;
    private Name lastName;
    private BirthDate birthDate;
    private Email email;
}
```

## I see. What now?

Do you like the idea? Check out all the [molecules](https://github.com/floppylab/molecules#what-molecules-are-available) or help! :)

At the moment I am at the early stages, so any help and/or advice is appreciated! :)

Check it here: https://github.com/floppylab/molecules
Alternatives to Google Analytics
Tags: discuss, analytics
Published: 2019-05-26 11:30:40

---
title: Alternatives to Google Analytics
published: true
description: Alternatives to Google Analytics
tags: discuss, analytics
---

Let's say you have an open source app and you would like to use some analytics tool to see how much traffic you have, where do your visitors come from etc.

But you do not want to use Google Analytics.
You want something that respects user's privacy. You want something that developers wont complain about when they look at your code.

What tools would you use? What are alternatives to Google Analytics?
Best FREE courses to learn designing for frontend developers ?
Tags: css, javascript, frontend, designing
Published: 2019-05-26 10:30:07

---
title: Best FREE courses to learn designing for frontend developers ?
published: true
description: Recommend me some of the greatest courses that know about on designing . It could be youtube , or free udemy or even paid one if you know a good one.
tags: CSS , Javascript ,frontend,designing.
---
docker-cli Emacs package
Tags: emacs, lisp
Published: 2019-05-26 09:38:25

Being Emacs user for a long time, I've finally decided to develop my
first Emacs package and publish it on MELPA. Trigger was my recent
move to Docker based development environment.

Instead of installing various databases I've started using them
through the Docker. This not only releived me from problems when I
have to use various versions of the same database, but gave me
possibility to quickly and easily switch to a new computer in very
short time having exactly the same environment without too many
hassle. Beside databases I've also dockerized Ruby on Rails
development environment.

With every component of development stack running in its own Docker
container I frequently had to start shell in containers, run database
commands line interfaces (psql, mysql, redis-cli), etc. Soon it became
boring typing `docker-compose exec` all the time and I decided to
speed it up, so I made [docker-cli](https://github.com/bosko/docker-cli) Emacs package.

Package is relatively simple and comes with a small set of predefined
commands for running shell, bash, psql, mysql or Redis clients within
Emacs buffers.

After calling interactive function `docker-cli`

```
M-x docker-cli
```

package asks for a command name that should be executed and the target
Docker container both of which can be chosen from the list of
available commands and a list of running containers
respectively. After selecting both package, runs Docker command
interactively with `docker exec -it` and opens buffer with name made
by concatenating command and container name.

Package can be extended with new commands by adding new element to the
`docker-cli-commands-alist` list. Each element of the list must have
following format:

```
(COMMAND-KEY FEAUTRE VALUE)
```

where `COMMAND-KEY` must be unique and is value that is listed on
command auto-complete after executing `docker-cli`. Only obligatory
feature is `:command` property which contains string that is actual
command that will be executed in the container. Each `docker-cli`
command definition can define prompt structure (part of the buffer
that Emacs will treat as read-only content) through two additional
configuration parameters `:prompt-regexp` and `:prompt-cont-regexp`.

Docker commands can require different parameters like setting
environment variable for `docker exec`. This could be done through
`:exec-arguments-func` confguration parameter that, if needed,
should keep a name of a function that will be executed and which
should return full list of Docker command with all its arguments.

Finally some commands might require additional arguments like `psql`
or `mysql` that need user and database name. These arguments can be
composed through last package configuration parameter
`:arguments-compose-func` which, if points to the function, will be
used to gather command arguments before command is executed in the
target container.

This article is repost from [my blog](http://pragdevnotes.com/docker-cli-emacs-package/index.html).
How many developers are musicians?
Tags: hobbies, creativity, music
Published: 2019-05-26 09:20:35

---
title: How many developers are musicians?
published: true
description: Do you play any instrument?
tags: #hobbies #creativity #music
---

Hey!

How many of you play an instrument?
Do you play in a band?

if (you do) {
   please leave a comment with a link to your music.
} else {
   listen to music from comments!
}

This way I want to learn more about bands you guys play in, maybe some of that music will be on my playlist in the future.

Thanks!
How to get an instance of a page when you navigate to it in UWP
Tags: uwp, csharp, navigation, frame
Published: 2019-05-26 09:20:25

---
title: How to get an instance of a page when you navigate to it in UWP
published: true
canonical_url: https://mazeez.dev/posts/how-to-get-an-instance-of-a-page-when-you-navigate-to-it-in-uwp
description: Getting an instance can be very useful, for example you can pass in as many parameters as you want in strongly typed way, or it allows the child page to have custom events and the parent page can subscribe to them.
tags: uwp, csharp, navigation, frame
---

By default when navigating a frame to a page, UWP doesn't give you back a page instance. So the only way of passing parameters is to use the `parameter` parameter. But having an instance to the page can have many other benefits: For example it allows the child page to have custom events and the parent page can subscribe to them.

However `Frame` has an event called `Navigated` that can help us to write an extension method to get a reference to the actual instance:

```csharp
using Windows.UI.Xaml.Media.Animation;
using Windows.UI.Xaml.Navigation;

namespace Windows.UI.Xaml.Controls
{
    public static class FrameExtensions
    {
        /// <summary>
        /// Navigates to a page and returns the instance of the page if it succeeded,
        /// otherwise returns null.
        /// </summary>
        /// <typeparam name="TPage"></typeparam>
        /// <param name="frame"></param>
        /// <param name="transitionInfo">The navigation transition.
        /// Example: <see cref="DrillInNavigationTransitionInfo"/> or
        /// <see cref="SlideNavigationTransitionInfo"/></param>
        /// <returns></returns>
        public static TPage Navigate<TPage>(
            this Frame frame,
            NavigationTransitionInfo transitionInfo = null)
            where TPage : Page
        {
            TPage view = null;
            void OnNavigated(object s, NavigationEventArgs args)
            {
                frame.Navigated -= OnNavigated;
                view = args.Content as TPage;
            }

            frame.Navigated += OnNavigated;

            frame.Navigate(typeof(TPage), null, transitionInfo);
            return view;
        }
    }
}
```

Suppose we have page called `Page1`:
```csharp
public sealed partial class Page1 : Page
{
    public Page1()
    {
        this.InitializeComponent();
    }

    public void Init(string param1, int param2)
    {
        // Initialize the page
    }
}
```

You can navigate to it like so:
```csharp
Page1 page = frame.Navigate<Page1>();
// You can now do stuff with the page
// for example pass in as many parameters as you want
page.Init("Hello World", 42);
```

**Note:** `Page1.Init` will be called after `Page1.OnNavigatedTo` and before `Page1.Loading`.
Setting up Rust for development. (part 1)
Tags: rust, learn, development, web
Published: 2019-05-26 09:12:31

---
title: Setting up Rust for development. (part 1)
published: true
description: Setting up Rust for development
tags: Rust, Learn, Development, Web
---
![Center-aligned image](https://ih1.redbubble.net/image.604835898.3840/flat,800x800,070,f.u2.jpg)
------
<dt>
This post aims to document the learning and development of my personal Rust programming mini adventure.

**Note:**
The following information comes from bits and pieces of information that I've gathered to self learn and document. So it means you can find the information from oficial sites and elsewhere on the Internet too :)
Will update this post as I find more resources and fill in gaps/lack of in the information provided here.
</dt>
------
#
### Readings:
#
| Links | Description |
| ------ | ------ |
| https://doc.rust-lang.org/book | API overview, installation, general overall language resouces
> The following command is to install Rust onto Linux / Mac systems.
#
```sh
$ curl https://sh.rustup.rs -sSf | sh
$ rustup --update
$ rustc --version
```
#
> Just like NodeJS's NPM, for Rust there's the Cargo. Cargo is Rust’s build system and package manager. Most Rustaceans use this tool to manage their Rust projects because Cargo handles a lot of tasks for you, such as building your code, downloading the libraries your code depends on, and building those libraries. (We call libraries your code needs dependencies.) 
#
> You can use the following command to check the version of Cargo currently on your system:
#
```sh
$ cargo --version
```
### Project initialisation:
> The easiest method to start a Rust project is to use the following set of commands:
#
```sh
$ touch learn_rust.rs
```
```rust
// sample starter code.
fn main() {
    println!("Hello, world!");
}
```
```sh
$ rustc build
$ rustc run
```
> The better way to start a brand new project would be to init the package manager with Cargo to properly start the actual project.
#
```sh
$ cargo init
```
> To run the project, you have the option of building the project as is for just development.
> For production level optimised build you have the option to run a command to let the code that you've built run even more effeciently and faster:
#
```sh
$ cargo build --release
$ cargo run
```
> Definitely, in situations where you wanna check the code for errors before running it there's a command to do checking first before turning the code into an executable:
#
```sh
$ cargo check
```
### Setting up a new project:
> To set up a new project, head over to the directory and type the following command:
#
```sh
$ cargo new <project name>
```
### In Summary
- Install the latest stable version of Rust using rustup
- Update to a newer Rust version
- Open locally installed documentation
- Write and run a Hello, world! program using rustc directly
- Create and run a new project using the conventions of Cargo
#
How do I start to develop my website?
Tags: beginners, webdev, website, html
Published: 2019-05-26 08:55:55

---
title: How do I start to develop my website?
published: true
description: How do I start to develop my website.
tags: beginners, webdev, website, html 
---

There are plenty of options to start developing your website.
**From Scratch:**

**For Static Website -**
You should be knowing
1. HTML
2. CSS
3. JAVASCRIPT

**For Dynamic Website -**
You should be knowing
1. HTML
2. CSS
3. JAVASCRIPT
4. JQUERY
5. PHP
6. MYSQL
7. How to create **RESTFUL API SERVICES**

**For E-Commerce Website -**
Here you have a lot of options. You can develop it using CMS Software like
1. Magento
2. Opencart
3. Prestashop
4. Shopify
5. and many more in the list
or you can build it from scratch.

**For Blogging Website -**
You can develop it from scratch or other options are :
1. Wordpress
2. Wix
3. Blogger
4. Weebly

**PS:** *It all depends upon your convenience and how you want to develop your website. I have listed all the starter and advanced options for you.*

Wish you luck for developing career Pal!
Is browser compatibility testing really necessary for Startups?
Tags: browser, startup, beginners, chrome
Published: 2019-05-26 08:51:58

---
title: Is browser compatibility testing really necessary for Startups?
published: true
description: Is browser compatibility testing really necessary for startups
tags: browser, startup, beginners, chrome
---

The reason behind it being the user, that is using your product. You don't know which type of browser they will be using while using your product. If your product is a Website then it should be responsive in all sense on any browser whether it's Google Chrome, Internet Explorer, Edge, Opera, Firefox, Tor , Mcent Browser or Basic Browser.

If in case your vital and main component doesn't show on a browser then the user using it, won't get any benefit from your product and you will surely lose a client.

Whatever may be your idea, but the execution (regarding your technology, management ) should be flawless because when your competitor can't beat you in your idea, they will attack your product and there is always a chance to improve the tech.
Content Trends with PHP
Tags: linux, php, sre, sysops
Published: 2019-05-24 18:19:07

Once upon a time I lived in a share house with a rotating cast of gnarly geeks and one cable modem, so I got pretty well acquainted with the [pfSense](https://www.pfsense.org/) firewall. Now one of the strange things about pfSense was that it had much of its system scripts rewritten in PHP; seeing `rc.d` scripts rewritten in PHP made me appreciate the idea of a batteries-included scripting language.

One of the more oddly-shaped batteries in PHP is `metaphone()`, an algorithm similar to (but more precise than) than the venerable [soundex](https://en.wikipedia.org/wiki/Soundex) for generating approximately phonetic pronunciations of strings. Because Metaphone implicitly ignores numerals and punctuation it's a handy tool for fuzzy matching of text strings.

Here's a fun example of finding content trends in a systems or application log:

```php
#!/bin/php

<?
    $keys = array();
    $counts = array();
    $total = 0;

    foreach (file($_SERVER['argv'][1]) as $line) {
        $total++;
        $lphone = metaphone($line);
        $keys[$lphone] = trim($line);
        $counts[$lphone] = $counts[$lphone] + 1;
    }

    arsort($counts);

    $topten = array_slice($counts, 0, 10, true);

    foreach ($topten as $comm => $count) {
        print round((($count * 100) / $total), 2)."%\t\"".$keys[$comm]."\"\n";
    }
?>
```

And this will let you get the "shape" of files like `/var/log/messages`:

```bash
guidance: ~/trend.php /var/log/messages

64.82%	"May 24 13:52:29 guidance sshd[30083]: Did not receive identification string from 151.101.2.217"
11.55%	"May 24 13:49:34 guidance sshd[31567]: Received disconnect from 151.101.194.217: 11: disconnected by user"
10.27%	"May 24 13:12:55 guidance sshd[175458]: Accepted publickey for root from 151.101.130.217 port 49141 ssh2"
2.84%	"May 24 13:52:24 guidance sshd[29567]: Connection closed by 151.101.2.217 [preauth]"
1.21%	"May 24 13:48:13 guidance sshd[174773]: Received disconnect from 151.101.194.217: 11: Closed due to user request. [preauth]"
1.11%	"May 24 13:44:13 guidance altsshd[125993]: Received disconnect from 10.126.138.57: 11: disconnected by user"
0.96%	"May 24 13:39:43 guidance altsshd[105719]: Accepted publickey for op from 151.101.130.217 port 44578 ssh2"
0.95%	"May 24 13:50:32 guidance sodad[173222]: sodad-ipc_temp (PID 173222) exiting"
0.95%	"May 24 13:51:01 guidance sodad[194844]: sodad (PID 194844) starting"
0.42%	"May 24 13:41:59 guidance sshd[115807]: Authorized to lbonanomi, krb5 principal bonanomi@DEV.TO (krb5_kuserok)"
```
How much does it cost to create a mobile application like TikTok?
Tags: tiktok, android, app, beginners
Published: 2019-05-26 08:46:43

---
title: How much does it cost to create a mobile application like TikTok?
published: true
description: How much does it cost to create a mobile application like TikTok?
tags: tiktok, android, app, beginner
---

The cost of developing a mobile application depends upon several factors

1) What type of app are you building?
2) Do people have to log in?
3) Do people create personal profiles?
4) How will you make money from your app?
5) Do people rate or review things?
6) How nice should your app look?
7) Does your app need to connect with your website?
8) Does it supports Google/Apple Maps
9) OTP Authentication / Passwordless Authentication
10) Server Cost
11) Maintenance Cost

TIKTOK APP ANALYSIS

!['image'](https://qph.fs.quoracdn.net/main-qimg-fdbf4105e11428d4cd5a575873b7da85)

I have been using this app for one year, so I am quite known to all the features.

So to develop an app with such features,

Android App: $85,950

iOS App : $89,100

Estimated price for Web App, iOS App, Android App

!['image'](https://qph.fs.quoracdn.net/main-qimg-0ff500478dc101eb4e3a4cb9cfb5e3b2)
Best resources for developers and designers in 2019
Tags: design, javascript, resources
Published: 2019-05-26 06:48:48

Web development and designing is very creative, daunting and competitive work in today’s internet world which is constantly swelling. Developers and designers have to be modern in technology, languages, graphics and many other aspects. For all the necessities of developers and designers, there are a lot of many helpful tools present on the internet. A lot of these tools are paid and lots of them are free of cost to utilize.

**Behance**
A very well-known and free platform where the people with a career as web designers of various disciplines are able to showcase their work of illustrations, graphic designs, photography, fashion and diverse.

**Freepik**
Freepik is a website where one can go to download Vectors, [Stock Photos](https://blog.snappa.com/free-stock-photos/) and PSD files and even SVG Icons to be searched by file types. On accessing the links, matching resources appear along with the other series of links for navigation. This allows downloading the resources without getting registered. But downloading resources in various formats are not allowed. 

**Trello**
Trello is a [Kanban system-based list](https://www.forbes.com/sites/bryancollinseurope/2018/07/19/how-to-use-kanban-to-become-insanely-productive-a-short-guide/), boards and cards making, task management app cum collaboration tool. In 2011 it was by Fog Creek Software which came out as a company in 2014 and was later acquired by Atlassian in January 2017. This application provides a visual overview of who, where and what is being worked-on on it. Toyota developed a Kanban system gives high production levels and flexibility maintenance. Also there are many [best trello alternatives](https://alternativoj.com/trello-alternatives/) available in the market. 

**Alternativoj**
[Alternativoj](https://alternativoj.com/) is a great site where one can find weekly tutorials and articles on various topics related to development and designing etc. It is a fresh yet free website for gathering knowledge about the best software and website alternatives. One can search and read a number of articles from the website without even bothering to register. These articles provide the most up-to-date information just one click away. 

**Stack overflow**
Stack Overflow is a flagship website which is privately held of the Stack Exchange Network, that was created in 2008 by Jeff Atwood and Joel Spolsky. For the enthusiast and professional programmers, Stack Overflow is a question and answer site. In computer programming, a wide range of topics are covered in those questions and answers. In comparison to other sites like Experts-Exchange, Stack Overflow was created for more open alternatives in question and answer way.
Need help on creating private instances of a web app
Tags: help, javascript
Published: 2019-05-26 06:02:36

---
title: Need help on creating private instances of a web app
published: true
tags: help, javascript 
---

Hey guys, I’m venturing out to something I’ve never done before and I’m needing a bit of guidance on how to tackle this use case. 

Essentially I’m wanting to create an instance of a part of my web app that is only accessible via a private link without requiring user accounts, so let’s think of the flow as something like this.

We’ll think in terms of a to-do list.  

Person 1: Visits website and initiates a private to-do list in which a link is generated. (Only people with this link will be able edit the to-do list) 

Person 2: Receives link from person 1 and edits to-do list. 

Could anyone lead me in the right direction as to what technologies are required to accomplish this sort of interaction?