teleren/devto huggingface dataset:
Java Day 1/100
Tags: beginners, 100daysofcode
Published: 2022-01-25 08:21:47

Hey!

**Language:**
JAVA

**Time Period Spent:**
2hrs

**Reasoning:**
Today marks the day I document my new journey into learning a new language. I have chosen Java. Reasoning behind this language is it is in heigh demand where I live. In addition I have always want to create minecraft plugins / be able to comprehend the inner works of minecraft and how it was build, with the goal to be able to reverse engineer it and hopefully re-create it one day.

**Course Taken:**
Udemy: Java Programming Masterclass - Tim Buchalka

**Todays Learning:**
- Casting in Java
- Byte, Short, Long, Width
- Primitive Types
- Float, Double
- Char, Boolean
- Operators, Operands, Expressions
- Abbreviating Operators

**Additional Notes:**
So today was very productive, stating my journey on doing this first thing in the morning before work. Coming from learning python and other languages used in my fulltime job, this is the basics. With this said it is a good refresher and a nice entry into the language, I can learn the syntax quicker like this. Key differences to python is having to explicitly address each variable. Enjoying my time with this course and have a focused mind towards learning it. Also documenting it will allow me to make sure I stick to doing something everyday.
Getting input from the console using 'Dart'
Tags: dart, 100daysofcode, flutter, womenintech
Published: 2022-01-25 08:17:26

## <u>What is Dart?</u>

So, Dart is a General-Purpose Programming Language developed by Google

It is also an Object-Oriented Programming language mostly designed for client-side development.

And an important language for Flutter.

It is somewhat similar, to Java and python and it is open source too.

## <u> Importance and Uses of learning Dart</u>

Firstly, Dart is pretty easy to learn if you know Java then it's a plus point. It can solve many problems, efficiently. Dart syntax is simple It is used in both mobile and web development one can create many apps and supports much of Google's revenue.


## <u>Future scope</u>

Flutter is the most & will be a widespread and useful app development platform in upcoming years. So clearly, Dart is having a shining future!☀


**How to take input from the user by using Dart language**

The very first step is to import the library that is _'dart.io'_ adding this import statement will extract the components and it is written at top of the code editor.

Every program resides in the main method to dart's main method or entry point is void main()

```
import 'dart:io'
void main(){  
 // Your program goes here
print('Enjoy the process');
}
```
So far so good let's dive into some more concepts needed for getting input from the console.
If you know or are familiar with Java/ C++'s syntax then there is a concept of standard input (stdin), standard output (stdout)

Dart also has the same as it is somewhat similar to java.

**stdin()** - It takes text as input 


**stdin.readLineSync()** - This method is to take standard input from the console using .readLineSync()

**stdout()** - It prints output

**stdout.writeln()**- Is used to display output to the console or we can simply use the print statement also.

> Let's start taking String as the input from console ✌ -


```
import 'dart:io';  //importing library

void main() {   
                        
  stdout.writeln('Enter your name: ');   //Asking the name as o/p
  String? name = stdin.readLineSync();  //Taking input from user
  print("Your name is $name");         //Printing name

}
```
Pretty good!🌼

> Now let's start taking Integer as the input from the console -

```
import 'dart:io';  // importing library

void main() {   
print("Enter your favourite number:");  
int? n = int.parse(stdin.readLineSync()!); 
print("Your favourite number is $n");    
}
```

> _Note :  Scanning number and Here '?' and ' ! ' are for null safety_

Hope it was useful to you!
That’s all for this blog. 

Feedback and comment are much appreciated ❤


Twitter - https://twitter.com/WasuSamruddhi
GitHub - https://github.com/ambivert-sam
LinkedIn - https://www.linkedin.com/in/samruddhi-wasu-a7855a204/
Leading Digital Marketing Agency in Dubai UAE
Tags: marketing, seo, ppc, googleads
Published: 2022-01-25 08:11:53

KBA Business Consultants, the prominent [Digital Marketing Agency in Dubai UAE](https://kbamena.com/). Specializes in [SEO Services in Dubai](https://kbamena.com/seo-agency-in-dubai/) and [PPC Services in Dubai](https://kbamena.com/google-ads-ppc-services-in-uae/)
. Work with 360-degree [digital marketing services in UAE](https://kbamena.com/) for end-to-end solutions.
Today's Daily Dose of Programming Humor
Tags: jokes, dailydeveloperjokes
Published: 2022-01-25 08:00:26

---
title: "Today's Daily Dose of Programming Humor"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e125925337e5.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ Why did the constant break up with the variable?

___A:___ Because they changed.
 -->
A11y tips: let the user resize text up to 200%
Tags: a11y, tips, html
Published: 2022-01-25 07:33:53

In addition to [being able to control the general zoom](https://dev.to/carlosespada/a11y-tips-let-the-user-control-the-zoom-2p86) of the page, there are users who may need to be able to **control only the zoom of the text**. And by doing so they shouldn't lose any content or functionality, or create overlaps that didn't exist.

**The minimum limit for this zoom is set at 200%** [by the WCAG](https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-scale.html):

> The working group feels that 200% is a reasonable accommodation that can support a wide range of designs and layouts.

For this, it is recommended to **use the text sizes in relative units**, with a fallback to pixels. Although browsers are increasingly capable of supporting text zoom well even if it is defined in pixels, today it is more reliable to do it with `em` or `rem`, which is somewhat more comfortable to use.

In this [interesting post from The A11Y Project](https://www.a11yproject.com/posts/resize-text/) you can find information on **how to perform the tests** to see if our page meets this criteria.
ToDo App developed with Xamarin
Tags: mobile, xamarin, xamarinforms, opensource
Published: 2022-01-25 07:29:46

**Todo App** is a simple to do app developed with **Xamarin** and **Firebase**. The app allows you to create an account and login to create tasks and organize them into lists. You can see the tasks for the selected date in realtime mode, edit and delete them with swipe action, reorder them using drag and drop action and filter them by list from More screen. From Profile screen you can hide completed tasks on the main screen and see the total number of tasks, of completed tasks and lists that you created for your account. The app is available in both **light** and **dark mode**.

![Light Mode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hpm0z6u96hoe7p5gyu8r.png)

![Dark Mode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yxu1f51e5wmgkvuvrh9t.png)

You can find the full code [here](https://github.com/gheorghedarle/Xamarin-ToDoApp).

If you like this repository you can support me on [buymeacoffee](https://www.buymeacoffee.com/gheorghedarle).
How Data Analytic Solutions are Helping Business Succeed
Tags: datascience, datanalytics
Published: 2022-01-25 07:09:44

Data science for business decision making is very much a reality. It is the cornerstone of business foundations in the information age. Its applications extend beyond just extrapolating insights. The curated findings help maximize efficiency. A prevalent case in point is the repurposing of data for charting buyer personas that can be (re)targeted for marketing campaigns and brand building. 

Decision-makers have their hands full with figuring out the crossover benefits of data science and [data analytic solutions](https://appinventiv.com/data-science-analytics-services) which include but are not limited to the following: 

- Fraud detection 
- Financial risk management 
- Cyberattack mitigation 
- Industrial mechanization and management 
- Advance warning systems for IT teams 

Data is not just an asset, but an intercontinental currency. It can be used to optimize a company’s capabilities beginning from organizational supply chains, inventories, distribution networks, to customer service and marketing channels. The aim of this hands-on approach is to reduce capital expenditure with an outcome-oriented view of revenues.

Some of the immediate benefits of data science for businesses are increased ROIs, improved sales, streamlined operations, a quicker turnaround time for products, and increased customer engagement and satisfaction.

Quality data synthesis can lead to quantification of results and a better overview of what works and what doesn’t. Million-dollar campaigns shouldn’t be run based on whim. Instead, they should be guided by numerical evidence that outlines cost savings, business process optimization, and time-saving workflows.

While the aforementioned marquee characteristics are universal, specific value additions depend on the nature of the industry. In startups and enterprises that have a consumer-facing frontend, data can indicate the ideal target audience. Marketing divisions can utilize campaign performance data to churn hot leads and push up their conversion rates leading to better sales.
Dorm Room Doorbell: Web Sockets & Detection
Tags: python, diy, student
Published: 2022-01-25 07:06:21

## Detection Stabilization
First things first, we needed to keep the face detector from doing some sort of action every time the loop runs. So to keep the detector from continuing to detect faces I used two tricks: 1.) Use an array to look at previous frames and see if it detected a face. If we see that the last 40 or so frames detected a face then we can determine that there is in fact a face there. The Cascade Classifier that comes with OpenCV can be a bit buggy and I didn't want a new event happening should the detection not detect a person in one frame. 2.) If we detected a face in the last pass of the frame loop then we don't want to do a new event because we know a face is already there. Super neat stuff!

##Web Socket Server
I knew for this project I would need to pickup web sockets so I started up on that. I have never used web sockets so I used a Tech With Tim [video](https://www.youtube.com/watch?v=3QiPPX-KeSc) Still learning and processing it!

```
def handle_cleint(conn, addr):
    print(f"[NEW CONNECTION] {addr} connected.") 
    connected = True
    while connected == True:
        message_length = conn.recv(HEADER).decode(FORMAT) # Receive message
        if message_length:
            message_length = int(message_length)
            msg = conn.recv(message_length).decode(FORMAT) # Receive message
         # Print message
            if msg == DISCONNECT_MESSAGE:
                connected = False
            print(f"[{addr}] {msg}")
            conn.send(f"Message received: | {msg} |".encode(FORMAT))
    print(f"[{addr}] ** Has left the chat.**")
    conn.close()
```
Here is the handle client function in the server.py script

```
def start():
    server.listen() 
    print(f"SEVER IS LISTENING ON {SERVER}") # Listen for incoming connections
    while True:
        conn, addr = server.accept() # Accept connection
    
        thread = threading.Thread(target=handle_cleint, args=(conn, addr))
        print("[ACTIVE CONNECTIONS] ", threading.activeCount() - 1 ) # Show active connections
        thread.start()
```
Here is the start function, also using threading (YAY!)

```
    if len(array_cache) >= 39:
        array_cache.pop(0)
        if face_detected == False:
            if check_array_cache_sum(array_cache) >= 38:
                print("Face Detected")
                face_detected = True
                web_hook.send("Face Detected")
                array_cache = []
        if check_array_cache_sum(array_cache) <= 38 and (len(array_cache) != 0):
            print("Face Not Detected")
            face_detected = False
            array_cache = []
```
Here is some of the code for smoothing out the detection.
The advancement of technology
Published: 2022-01-25 07:01:46

React templates for eCommerce apps make the job of development very straightforward. They provide the functionalities that can take hours for a developer to design. There is a wide range of tempters available for React that can be used for dedicated projects And the creation of noteworthy eCommerce apps. Mobile apps have become an important part of every business. Mobile apps have been affecting business for quite a while and help in expanding scalability. To develop an astonishing looking app with robust security and modern technology is a tough task. For this QuikieApps, the leading mobile app development company in Bangalore has the best expertise in[ mobile app development](https://www.quikieapps.com/services/mobile-app-development-company/). To develop the finest applications with attractive interfaces and smooth operations, you can count on us.
The advancement of technology has positively influenced the growth of businesses all over the planet. With the help of modern technologies like websites and mobile applications, every firm can sell its products or services online without hassle. We, QuikieApps, have acquired recognition and reputation through the reliance of our respected clients as the top Web development company in Bangalore, India, USA, UK, Dubai. Adapting the dynamic technology of the web and mobile applications is the first step to success in this modish and competitive world.
Introduction to Git and Github.
Tags: github, git
Published: 2022-01-25 06:54:54

Git is a version control system that is extensively used by programmers all over the world. It assists individual developers in monitoring their changes as they work on various features within the same project, as well as teams in organizing their code. Github works hand in hand with Git which is an online application that lets users host, examine, and collaborate as teams. 
In Github, we make use of commands to carry out certain processes. Some examples of command include git –version, git push, git add etc. We shall look at these and more commands and the different roles that they play. 
In order to create a new project on Github, you will need to create a new repository. Then clone it to your machine and commit and save changes to the file you are working on. You will then push these changes. 
There are numerous git commands. Some of the most common ones include:

**Git config** – sets your username and email address to be used within your commits. 
	 git config –global user.name “JohnDoe”  
 git config –global user.email “johndoe@example.com”
 
**Git init** – Initializes a new repository.
	git init [repository name]
**Git add** – Adds a file to the staging area.
	git add newproject
Git add * - Adds one or more files to the staging area
**Git clone** – Used to obtain a repository from a URL
	git clone [url] 
**Git commit** – Saves the changes in your local repository
	git commit -m “[Commit message]” Your commit message must be descriptive. It must describe the actual changes that you’ve made. 
**Git commit -a** – Commits the files that you added using the git add command and any other files that have been added since then.
	git commit -a
**Git push** – Pushes the changes in the committed file from the local repository to a remote repository so that other people are able to access them. 
	 git push [variable name] master
**Git pull** – Fetches the last changes saved on the remote repository and pushes them into the local repository. 
	 git pull [Repository Link]
**Git merge** – Merges your branch with the parent branch.
	git merge [branch name]
**Git status** – Gives you the current status of your working directory. 
**Git log** – to view the changes made
**Git diff** – gives you the difference between what you have in the current directory and what has been committed

These are just a few of the git commands. There are many more commands that one needs to learn. Worry not, as these can be found online. And the more you work with Git, the more you’ll be able to learn and master these commands. Remember, practice makes perfect!

Basically, the work flow in Github is as follows:
1.	Create a repository.
2.	Clone it to your local machine.
3.	Commit and save the changes after adding a new file.
4.	Push these changes.
5.	Use git to make some changes to your file.
6.	Pull these changes on to your local machine.
Implementation of cryptocurrency (blockchain) deposit and withdrawal services

Tags: blockchain, go, eth, btc
Published: 2022-01-25 06:53:35

# sequence
This article mainly describes the implementation principles of the three services of cryptocurrency deposit/withdrawal/collection required by the exchange

# Prepare
To achieve these functions, we must first figure out what we need to accomplish

1. Get the latest block
2. Get transaction records inside the block
3. Get the completion status of the transaction by the transaction hash
4. Get the balance of an address
5. Create a wallet
6. Sign and send naked transactions
7. Define the interface as follows

```go
type Worker interface {
 getNowBlockNum() (uint64, error)
 getTransaction(uint64) ([]types.Transaction, uint64, error)
 getTransactionReceipt(*types.Transaction) error
 getBalance(address string) (*big.Int, error)
 createWallet() (*types.Wallet, error)
 sendTransaction(string, string, *big.Int) (string, error)
}
```
# accomplish

> After creating a wallet, save the address and private key

# recharge
Through an infinite loop service, the transaction data of the latest block is continuously obtained, and the transaction data is verified one by one whether it is completed
. Here, it is judged whether the receiving address (to) of the transaction data belongs to the wallet address created by this service. The wallet address created by the service is judged to be recharged successfully .

## withdraw
The user initiates a withdrawal operation, and the balance here is the balance in the logical service. When the user initiates a withdrawal, the private key for the withdrawal configured by the wallet service is used to package and sign the bare transaction. (The withdrawal private key is transferred to the withdrawal address entered by the user), here the hash of the submitted bare transaction is recorded to the wallet service
to continuously obtain the transaction data of the latest block through an infinite loop service, and the transaction data are all one by one. Whether the verification is completed
, here it is judged whether the hash of the transaction data exists in the wallet service, and if so, it will be processed (the transaction hash needs to be done in the logic service for idempotency)

## collection
The wallet created by the regular circulation wallet service is transferred to the collection address configured by the wallet service. Here, it is necessary to pay attention to the limit of the collection quantity, and transfer only when the fixed quantity is met (reduce the handling fee)

# a simple example
github address: [golang implements cryptocurrency deposit/withdrawal/collection services](https://github.com/lmxdawn/wallet)
Framer-Motion Notification Challenge
Tags: react, animation, framer, tailwindcss
Published: 2022-01-25 06:48:23

I was inspired by Oleg Frolov's notification design and challenged myself to build it.

Oleg design - 
[Notification design by Oleg Frolov's](https://dribbble.com/shots/2585157-Notification)

{% codesandbox framer-motion-messages-br8oh %}

For the CSS design, I chose to take tailwind CSS.
First, we need to create a box with SVG of message notification icon.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rkp03afffo4nuk65ikb1.png)

now let's start adding some animation.
let us build the 3 dots animation.
for that, we will need a container with 3 spans for each dot.
for animation state, we will use variants.
for example, the container animation has 2 states "begin"
and "end". 
each one will have its own animation attributes.
for the dots, the animation change will be from y 0 percent to 100 percent.
after defining the variation we can use it in initial and animate. 
also, you can define what the transition is going to look like.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7jet9ww6si2wea2wxoqs.png)

for the message text animation, we need an interval.
how can we control to start the animation on each tick?
for that, we need to import for framer useAnimation.
then we can define the animation that we want to acquire
and we just pass it into the useAnimation reference.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wgm9xe7tesu40oc8ibgc.png)

you can see the full code in codesandbox.
Data Engineering Zoomcamp
Tags: dezoomcamp, googlecloud
Published: 2022-01-25 06:45:26

# Week 1 thoughts 

Am I the only one insane enough to do this with a newborn? 

### Docker
- [A much more concise introduction to Docker and necessary commands](https://www.youtube.com/watch?v=EYNwNlOrpr0&list=PL3MmuxUbc_hJed7dXYoJw8DoCuVHhGEQb&index=3)
- I use this at work + skimmed [Stephen Grider's course](https://nlbsg.udemy.com/course/docker-and-kubernetes-the-complete-guide/learn/lecture/16242264#overview)

### SQL 
- [I admit I only watched this for the JOIN ids, but I would recommend beginners finish it](https://www.youtube.com/watch?v=QEcps_iskgg&list=PL3MmuxUbc_hJed7dXYoJw8DoCuVHhGEQb&index=9)

### PostGres + Dockerizing
- [These](https://www.youtube.com/watch?v=2JM-ziJt0WI&list=PL3MmuxUbc_hJed7dXYoJw8DoCuVHhGEQb&index=4) [videos](https://www.youtube.com/watch?v=hCAIVe9N0ow&list=PL3MmuxUbc_hJed7dXYoJw8DoCuVHhGEQb&index=6) [are](https://www.youtube.com/watch?v=B1WwATwf-vY&list=PL3MmuxUbc_hJed7dXYoJw8DoCuVHhGEQb&index=7) [great](https://www.youtube.com/watch?v=hKI6PkPhpa0&list=PL3MmuxUbc_hJed7dXYoJw8DoCuVHhGEQb&index=8)
- The only hitch I had was realising my Docker installation on my personal laptop was so out of date that I couldn't run the pgadmin container. A quick check in with stackoverflow later led to a fresh install and *chefs kiss*

### Terraform
- [Work in progress, because this is relatively new to me](https://www.youtube.com/watch?v=hKI6PkPhpa0&list=PL3MmuxUbc_hJed7dXYoJw8DoCuVHhGEQb&index=8)
- Do I need to do `terraform plan -out` before `apply`? 

### Homework
- Need to read up on Terraform. 
- [Homework 1 for EDA](https://github.com/sharonwoo/data-engineering-zoomcamp/tree/homework_week1/week_1_basics_n_setup/homework
)
Does HP Print And Scan Doctor demolish in a few issues?
Published: 2022-01-25 06:36:29

 
As a HP printer client, you need to make appropriate usage of [HP Print And Scan Doctor ](https://www.amiytech.com/blog/hp-printer-and-scan-doctor/
)assuming that you are one of the individuals who are running into printer disconnected, degenerate print drivers, network issues, and print occupations stuck. All you need to do to take help from the experts and take fundamental insights about the equivalent.