teleren/devto huggingface dataset:
Docker container Timezone environment
Tags: docker
Published: 2020-05-24 17:58:38

---
title: Docker container Timezone environment
published: true
description: 
tags: docker
---
   เมื่อ develop application และมีการอ้างอิงเวลา โดยใช้ docker ในการทำงานนั้น อาจจะต้องเจอเรื่องปัญหาของ timezone คือ container ที่เราสร้างขึ้นจะได้ timezone ที่ตรงกับที่เราต้องการหรือเราอาจจะต้องการ timezone ที่ไม่ตรงกับเวลาที่เราพัฒนาอยู่

   วิธีที่จะแก้ปัญหาคือ เวลาที่เราสร้าง container ขึ้นมาให้เรากำหนด timezone ของ container ตัวนั้นเข้าไปด้วย ตัวอย่างเช่น

```
FROM openjdk:8-jdk-alpine
ARG TIMEZONE="Asia/Bangkok"

# Set timezone
RUN apk add tzdata
RUN cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime
RUN "date"
```

สำหรับ slim หรือ ubuntu
```
FROM openjdk:11.0.8-jdk-slim
ENV TZ "Asia/Bangkok"
RUN date
```
CVID Letters
Tags: covid, node, github, graduation
Published: 2020-05-24 17:56:38

---
title: CVID Letters
published: true
description: COVID Letters is a platform where every one of us can write anonymous letters to spread love and positivity, and help others combat loneliness and anxiety during this pandemic. Writing letters is the best way to show support for each other, spread hope, and send prayers. As you write letters, you will be helping a lot of people to stay positive and feel better. When in need of some love and positivity, you can come here to read letters contributed by others.
tags: COVID, Nodejs, gitHub, Graduation, 

---
## COVID Letters: Spreading positivity in the age of COVID 

![COVID Letters](https://raw.githubusercontent.com/santoshvijapure/COVID19Letters/master/covidletters.png)





---
My friend [@jaydeepborkar](https://dev.to/jaydeepborkar) and I very recently built a platform called [COVID Letters](http://covidletters.herokuapp.com/), COVID Letters is a platform where every one of us can write anonymous letters to spread love and positivity, and help others combat loneliness and anxiety during this pandemic. Writing letters is the best way to show support for each other, spread hope, and send prayers. As you write letters, you will be helping a lot of people to stay positive and feel better. When in need of some love and positivity, you can come here to read letters contributed by others. 

---
### Tech stack
- Bootstrap 
- Nodejs 
- MongoDB 
- Hosted on Heroku

---

### Links
- [GitHub](https://github.com/santoshvijapure/COVID19Letters)
- [Website](https://covidletters.herokuapp.com)
How to explain in GraphQL-esque
Tags: graphql, codequality, writing
Published: 2020-05-24 17:49:05

Explaining in GraphQL is easy.  Write single line comments with `#`.  Offer more verbosity in multi-line descriptions with bracketing `"""`.

### Single Line Comment

Start exactly with `#` to comment a simple single line.

```graphql
# A snack may or may not be delicious.
type Snack {
  name: String!,
  delicious: Boolean!
}
```

Perfectly safe in a GraphQL schema.

### Multi-Line Description

Bracket a multi-line comment with `"""`.  GraphQL schema tools are smart.  Multi-line descriptions are useful to tools like [Graphiql](https://github.com/graphql/graphiql).

```graphql
"""
A shirt.
It is a really simple type.
"""
type Shirt {
"""
The size of the shirt, like small or medium.
The value depends on the language of the user.
"""
  size: String!,
  threads: Int!,
  thickness: Float!
}
```

Also safe in a GraphQL schema.

### Query Comment

A single line comment is safe in a query.  A multi-line description is not.

```graphql
{
  snack {
    # this comment is safe
    name
  }
}
``` 

Possible in a GraphQL query.

### Lack of comments is like a pandemic

[GraphQL](https://graphql.org/) is for people.  I don't disagree with code clarity as documentation.  Sometimes people who have nothing to do with code may read a GraphQL text block. It's shocking. Let's not forget that comments are fundamentally for our hyper connected readers. I don't know if there is a better way.
Sentimental Analysis of Online Reviews
Tags: nlp, text, sentimentalanalysis, octograd2020
Published: 2020-05-24 17:48:52

In this post, we can have an introduction to Sentimental analysis and its applications.

Any opinion or review given by an individual through which the feelings, attitudes and thoughts can be expressed is known as the sentiment. Nowadays,  usage of the internet has been increased drastically and people can express the views and opinions about the product on the internet in the form of reviews. 

For example, if we purchase a product on an e-commerce website, we will be prompted to give reviews about the product. These reviews can express what do we feel about the product and these reviews can help other customers who considered buying the same product which we bought earlier. If the reviews of the product are good then new customer moves forward in buying the product. Else he will look for other products in the same category.

These reviews are very helpful not only to the customers but also to the companies. These reviews are a valuable source of information through which the companies know what the customer thinks about the product and what the customers needs. By knowing this, the companies can tailor the products that match customer preference.

As a result of this, the customer will start liking the product and also attract new customers to buy the product leading to an increase in revenue of the company.

Today in this modern world millions of reviews are generated per day. It will be a tedious process for a person to manually read and understand the sentiment conveyed by the reviews and also require lots of human power.

To solve this problem, the sentimental analysis comes into action.

Sentiment analysis is contextual mining of text which identifies and extracts subjective information in the source material and helping a business to understand the social sentiment of their brand, product. Sentiment Analysis is used to discover people’s opinions, emotions and feelings about a product or service. It is a computational study of opinions, sentiments, attitudes, views, emotions, etc. expressed in the text. 

This text can be in a variety of formats like Reviews, Blogs, News or Comments. Sentiment analysis helps to detect polarity within a text (e.g. a positive or negative opinion), whether it’s a whole document, paragraph, sentence, or clause.

Sentiment analysis is also used for quickly gaining insights using large volumes of text data which can help improve the quality of service and can make companies earn huge profits. This Sentimental analysis can be used across multiple domains and highly powerful.

Sentiment analysis has many names like Opinion Mining, Sentiment Mining and Subjectivity Analysis.

We can look in detail on the various approaches that are used in the sentimental analysis along with the code in upcoming posts.
Ways to Handle Deep Object Comparison in useEffect hook
Tags: react, useeffect, deepcomparison, hooks
Published: 2020-05-24 17:47:06

In React, side effects can be handled in functional components using `useEffect` [hook](https://reactjs.org/docs/hooks-effect.html). In this post, I'm going to talk about the dependency array which holds our props/state and specifically what happens in case there's an object in this array.

The `useEffect` hook runs even if one element in the dependency array has changed. React does this for optimization purposes. On the other hand, if you pass an empty array then it never re-runs.

However, things become complicated if an object is present in this array. Then even if the object is modified, the hook won't re-run because it doesn't do the deep object comparison between these dependency changes for the object. There are couple of ways to solve this problem.

1. Use lodash's `isEqual` [method](https://lodash.com/docs/#isEqual) and `usePrevious` [hook](https://reactjs.org/docs/hooks-faq.html). This hook internally uses a ref object that holds a mutable `current` property that can hold values.

	> It’s possible that in the future React will provide a usePrevious Hook out of the box since it’s relatively common use case.

	```
	const prevDeeplyNestedObject = usePrevious(deeplyNestedObject)
	useEffect(()=>{
		if (
			!_.isEqual(
				prevDeeplyNestedObject,
				deeplyNestedObject,
			)
		) {
			// ...execute your code
		}
	},[deeplyNestedObject, prevDeeplyNestedObject])
	```

2. Use `useDeepCompareEffect` [hook](https://github.com/kentcdodds/use-deep-compare-effect) as a drop-in replacement for `useEffect` hook for objects

	```
	import useDeepCompareEffect from 'use-deep-compare-effect'
	...
	useDeepCompareEffect(()=>{
		// ...execute your code
	}, [deeplyNestedObject])
	```

3. Use `useCustomCompareEffect` [hook](https://github.com/sanjagh/use-custom-compare-effect) which is similar to solution #2


I've prepared a CodeSandbox [example](https://codesandbox.io/s/useeffect-deep-comparison-i5r92?file=/src/App.js) related to this post. Fork it and check it yourself.
Mastermind
Tags: octograd2020
Published: 2020-05-24 17:46:15

## My Final Project
I wrote master mind in rust for several google code in challenges.
I found that the test I was running were inefficient and I split the code into 2 a library and client because later challenges I didn't get required that. 

 

## Link to Code
https://github.com/Pokemod97/democracy-experiment
[Note]: # (Our markdown editor supports pretty embeds. If you're sharing a GitHub repo, try this syntax: `{% github link_to_your_repo %}`)
{% github https://github.com/Pokemod97/master_mind_core %}
{% github https://github.com/Pokemod97/rust_master_mind %}
All ReactEurope 2020 are now available online!
Tags: react, reactnative
Published: 2020-05-24 17:43:18

That's it for this edition! You can check every single talk already [on this youtube playlist](https://www.youtube.com/watch?v=_ISAA_Jt9kI&list=PLCC436JpVnK0Q4WHoB85ZYBwcCyTaMgAl&index=1) and binge on them this weekend!

Thanks to everyone involved and make sure to check out all the cool projects including:
- [recoiljs.org](http://recoiljs.org/)
- [excalidraw.com](http://excalidraw.com/)
- [fast-check](https://github.com/dubzzz/fast-check)
- [Gatsby](https://www.gatsbyjs.com/)
- Vercel's https://nextjs.org
- [Amazon Web Services (AWS) Amplify](https://amplify.aws/)
- [Expo](https://expo.io/)
- [material-ui.com](https://material-ui.com/)
- [blitzjs.com](https://blitzjs.com/)
- [builderx.com](http://www.builderx.com/)
- [Kendo React](https://www.telerik.com/kendo-react-ui/) 
and more!

Thanks to all the speakers and instructors, make sure to follow them: Devon Govett, David McCabe, Ives van Hoorne, Tim Neutkens, Nader Dabit, Erik Rasmussen, Joshua Comeau, Michel Weststrate, Sanket Sahu, Lukonde Mwila, Tadeu Zagallo, Nicolas Dubien, Paul Henschel, John Adetutu, Richard Threlkeld, Alex Holachek, Evan Bacon, Siddhartha (Sid) Chattopadhyay, Christopher Chedeau, Brandon Bayer, Eric Samson, Eric S Bishard, Olivier Tassinari, Sebastien Lorber, Sibelius Seraphini, Eric Vicenti, Nik Graf, Wolfgang Goedel, Jon Samp and more!


Thanks again to all our speakers and sponsors and all involved, stay safe and have fun! 

{% youtube _ISAA_Jt9kI %}
Journey towards Programming
Tags: scaler, interviewbit, programming, experience
Published: 2020-05-24 17:02:41

PROGRAMMING....
A word that can pull me into a bubble that I never want to get out of, at the same time make me wish it never existed! ,
Did you experience the same? Does it make you dream of building the next big thing and become a star overnight by reading some stories of entrepreneurs worth billions?

These emotions are what made me take a step towards exploring the realm. Though I had finally became an adult (First year of Bachelor degree), I had taken my first baby steps towards achieving my dream.

while writing my first program "Hello World", I felt what is this man its so easy! (Many might have felt the same). Then, when I started to work on writing programs of some weight, reality finally hit me like a speeding truck. It just made me think "well, that's just not for me, time to find something new."

But Being a student from the Computer Science stream, it is not that easy to escape from programming. Eventually I entered the battlefield again, but with a new strategy, I didnt want to learn it by just directly writing programs as it didnt  work the last time, but to understand what is the true essence of it.

This made me realize it's not just about writing some piece of code to a question, it about building something big, it is about creating creative solutions to problems, its a way of expressing of ideas, analytical thinking and one the most rewarding work out there, the satisfaction when your code works is beyond measure.

Then I started to enjoy it, learning something new every day, solving those problems in my own way of thought. The feeling that I got after a solving a problem, has pushed me forward.

This way of learning not only just gave me marks, but also it helped me realize that I am using it everyday life in so many things in a smart way. But so many times in the process of learning I felt it was hard, but I made sure to continue it after taking a little gap.

Whenever I find I am not able to solve a particular question then I go back to a question related to it that I solved and built upon that level by level, along with learning many new concepts in the way.

This way of learning helped me in understanding at what level I was and how much I need to improve by taking each question as a challenge that I could not solve.

I used to practice in Hacker rank, Interview Bit, LeetCode. Each of these platforms helped me a lot.

Hacker rank(https://www.hackerrank.com/) is so good for improving the problem solving and coding skills.

Interview Bit(https://www.interviewbit.com/invite/ddcihc) and LeetCode(https://leetcode.com/) are great for the preparation of the interview topic wise and ranges from easy to hard ones.

This is a sneak peek into my journey of programming, try it out, maybe it will do the same for you.

Disclaimer:
Never compare yourself with others, and don't get de-motivated, think out a way that works for you for improving yourself and keep checking your level of improvement, it really motivates you.

Hope you have a nice day with programming!
🛑🛑 How to Write Manual Test Cases for API Testing? | 30 Days of API Testing | Day 24 🛑🛑
Tags: testing, tutorial, beginners, webdev
Published: 2020-05-24 17:43:11

In this video of 30 Days of API Testing Challenge, I am going to discuss How to Write Manual Test Cases for API Testing? and common API Bugs.

> 🚀 Day 24 Task:  API Bugs and Test cases for API Testing

[![30 Days of API Testing](https://i.imgur.com/TCvxRyk.png)](https://youtu.be/TbCKv8EWNuc "30 Days of API Testing")


🚀 Thread:  https://scrolltest.com/api/day24

🚀 All Task List: https://scrolltest.com/api/task

🚀 Watch Full Playlist: https://apitesting.co/30days

### Test cases for API Testing
- Validate the keys with the Min. and Max range of APIs (e.g maximum and minimum length)
- Keys verification. If we have JSON, XML APIs we should verify it’s that all the keys are coming.
- Have a test case to do XML, JSON Schema validation.
- Verify the Parse the Response data
- Verify the JSON Schema validation, Verify the Field Type,Verify the Mandatory Fields
- Valid Response headers & Negative Testcases response
- Verify that how the APIs error codes handled.
- Verify the response HTTP status code.
- Valid Response payload
- Chaining Request verification.
- Verification of APIs with Data parameters.
- End to End CRUD flows
- Database Integrity Test Cases
- File Upload Testcases


🚀 Master API Testing -  https://www.learnapitesting.com


--
Be sure to subscribe for more videos like this!

[![ TheTestingAcademy](https://dev-to-uploads.s3.amazonaws.com/i/r7vcy6wbvyjbk1y1uu0o.png
)](https://www.youtube.com/TheTestingAcademy?sub_confirmation=1 "TheTestingAcademy")
Update all docker images already pulled.
Tags: docker
Published: 2020-05-24 17:13:04

---
title: Update all docker images already pulled.
published: true
description: Update docker images 
tags: docker
---

When we want to update all images that pulled. This is a command to use update all images at once. (This command will pull the latest tag)

```
docker images | grep -v REPOSITORY | awk '{print $1}' | xargs -L1 docker pull
```

I found this command a long time ago and I cannot remember the reference. I am sorry for the owner.

---
Edit 2021-12-21

Today I found a problem on MacOS with this command and fixed to use 

```
docker images | grep -v REPOSITORY | awk 'BEGIN{OFS=":"} {print $1,$2}' | xargs -L1 docker pull
```
Is Commenting Code that necessary?
Tags: beginners, coding, webdev, codenewbie
Published: 2020-05-24 16:57:18

So We’ve seen people often suggesting to comment while coding. Let’s together find out what the comments are and how are they really helpful.

“Comments” are the text that is being added to the computer programs to better understand the implementation logic.

`In technical terms, “ A comment is a programmer-readable explanation or annotation in the source code of a computer program.” (source: wiki)`

![Code](https://dev-to-uploads.s3.amazonaws.com/i/36xlfg52wsl0qnss0sdc.jpg)

There is a phase where everyone thinks that “As I’ve written the code I can better understand it !! so what is the need of commenting? “
Or
“Whom do the comments in my program help? “
Or to be simpler
“What is the use of writing comments? “

I’m gonna crack all these answers for you now…! :)

For instance, you’ve put your code in an open-source platform and users try to read it. What if they couldn’t cope up with the flow?
When we are writing smaller programs, it is okay to understand the code and logic with little hard work. But when we are trying to build larger applications where one file is linked to another or data is being rendered from other files, commenting can help you better understand the overview of code working.
The two important scenarios where comments help are :
- People who are referring to your code can easily go through the flow as the comments prevent one fight with the logic.
-  You can understand your code when you read it after years (happens with most programmers ).

<br />
<br />

How should be the comments?
* Try to keep them relevant.
* Don’t write bigger comments, keep it short and simple.
* Don’t use it everywhere. ( Find the toughest code lines to comment).

<br />
<br />

For example, we are commenting an HTML file,
The comment should be in such a way that it should give a description (one line) about the tag and any ids or classes included in it.
So try to comment your code so that it helps for your future reference and also to those who are willing to refer your code.
I hope this helps you.
Do drop your feedback :)
Thank you guys. !
"30 Days 2 Root" Challenge Introduction
Tags: 30days2root, security, cybersecurity, challenge
Published: 2020-05-24 16:54:05

Over the last 5 years I've been mostly reading about Cybersecuirty, but recently I've made an initiative to practice a new skill for each month in 2020. This promotes me to learn and attempt the basics of each topic, while it prevents me from getting stuck in rabbit holes. 

### How does it work?
Each month I choose a topic I don't know much about and learn the basics of it. This can be via any method, although I typically default to Udemy and Youtube.

At the end of each month I will post on my [Instagram](https://instagram.com/sshad0w__?igshid=13kkbj41mk22n) and [Twitter](https://twitter.com/Sshad0w__?s=09) the work I've been doing to show what I've been learning about! Feel free to comment on what you think I should study, or which questions you have about what I'm learning!
How GitHub was committed 37 years ago by BILL GATES and made his program open source in May 2020. Really !!!check this, haha
Tags: Microsoft, showdev, news
Published: 2020-05-24 16:53:05

In 1991, I was 7 years old and in grade 3. At time,  we were introduced and allowed to step in newly constructed school computer lab. I still remember those big CRT monitors each with a big
blinking icon. Teachers were using floppy disks to boot our computers and allowing us to play graphic fewer games.
We were also introduced to GW-BASIC. A language that we use to create small programs like addition, deletion, etc.

 At that time, everyone was 'writing his own program'. We save our program on floppy disks (1.440 MB).
In 2020, we are in the era of open-source. I had written a comprehensive article with the title "What happened and what will happen to Open Source" on a
community devto.
Link: https://dev.to/manishfoodtechs/what-happened-and-what-will-happen-to-open-source-must-read-2l3ln


If you really want to have a small introduction about GW BASIC have a look to this article: 

https://devblogs.microsoft.com/commandline/microsoft-open-sources-gw-basic/

May 21, 2020, Microsoft opened the source code for the GW-BASIC programming language interpreter. The code is written in assembler (explanation in the FAQ from Microsoft: this code is not written in C, it is 100% assembler) for Intel 8088 processors. The release date for Microsoft sources is February 10, 1983. Currently, GW-BASIC source code posted on GitHub under the MIT license.

In fact, Microsoft published the GW-BASIC code for historical and educational purposes only. Thus, the company supplemented the source code of the MS-DOS 1.25 and 2.0 operating system, open to everyone in 2018. Also, Microsoft will not accept pull requests in the main repository with this code. 

On GitHub, the GW-BASIC source code files are uploaded with the publication date “38 years ago”, though the same applies to the LICENSE (Initial commit 38 years ago) and the .gitignore file (there is also the Initial commit 38 years ago), which somehow look strange . As if to create such a historic atmosphere, a PC with a date from 1983 was used. But the MIT License appeared only in 1988. 

In addition, in the GWMAIN.ASM fileYou can find the lines: Earlier on May 14, 2020, Microsoft CEO Brad Smith stated that the corporation allowed itself false statements regarding open source and Linux. Recently, however, Microsoft's approach has changed, and many projects come out with open source code, including the Windows Subsystem for Linux (WSL).

--------- ---- -- ---- ----- --- ---- -----
COPYRIGHT 1975 BY BILL GATES AND PAUL ALLEN
--------- ---- -- ---- ----- --- ---- -----

ORIGINALLY WRITTEN ON THE PDP-10 FROM
FEBRUARY 9 TO APRIL 9 1975

BILL GATES WROTE A LOT OF STUFF.
PAUL ALLEN WROTE A LOT OF OTHER STUFF AND FAST CODE.
MONTE DAVIDOFF WROTE THE MATH PACKAGE (F4I.MAC).

{%github microsoft/GW-BASIC %}
showdev: Dokolio - Private Markdown Presentations on Blockchain
Tags: showdev, webdev, blockchain, blockstack
Published: 2020-05-24 16:47:05

---
title: showdev: Dokolio - Private Markdown Presentations on Blockchain
published: true
description: Create private and awesome presentations with the power of markdown all in a private way using Blockchain technology
cover_image: https://i.imgur.com/IklgkQD.png
tags: showdev, webdev, blockchain, blockstack
---

This weekend, I challenged myself to create an application where data is stored on the blockchain. Dokolio helps to create markdown presentations, creating a document writing experience.  

It's free & unlimited you control the data stored 

Check the Preview: [https://dokolio.com](https://dokolio.com) 

Note: This is very experimental and for fun, created this weekend.

#### Private & Secure

You have control over your data, we don't keep it anywhere. Manage everything through the blockchain with your BlockStack account

#### Markdown Editor

We use a dynamic markdown editor to make presentations like writing a simple document. Ready for developers and writers

#### Create & Share

Share your presentations with anyone you want. Click "Open Presentation" button to see the link to your presentation.

#### Provided by BlockStack

Blockstack apps use private data lockers and a universal login with blockchain-based security and encryption—protecting your data from big internet companies.

#### Blockchain-powered

Blockstack is a decentralized computing network and app ecosystem that puts users in control of their identity and data.

#### The Stack

- TypeScript
- React
- Vercel
- Blockstack
- Stine Framework
- Markdown
- Spectacle