teleren/devto huggingface dataset:
Dynamic Copyright Date
Tags: beginners, javascript, php, webdev
Published: 2021-01-01 22:57:32

Are you tired of changing the copyright date on your website? Instead of changing the date manually every year, you can use a bit of code to automatically display the current year!

## Javascript

Let’s start with creating a variable called **date** to hold the date object.

```javascript
var date = new Date();
```

The date object provides a method called **getFullYear**. We can use that to get the current 4 digit year.

```javascript
var year = date.getFullYear();
```

All that’s left now is to output the value somewhere on your page. In the below example, we’re looking for a unique id of **copyright** and setting its inner html to be the current year.

```javascript
document.getElementById('copyright').innerHTML(year);
```

## PHP

PHP makes it a little easier because you can pass in the format you’d like and echo the value anywhere you want it to appear on the page.

```php
echo date('Y');
```

### Helpful Resources

* [Javascript Date](https://www.w3schools.com/jsref/jsref_obj_date.asp)
* [PHP Date](https://www.php.net/manual/en/function.date.php)

---
#### Visit our website at [https://nightwolf.dev](https://nightwolf.dev) and follow us on [Facebook](https://www.facebook.com/NightWolfDevelopment) and [Twitter](https://twitter.com/nightwolfdev)!
---
Data mining fun 😒
Tags: dohackathon, showdev
Published: 2021-01-01 22:54:22

While my submission isn’t quite ready to submit yet I’m very happy with the progress I’ve made. And I’m really happy to say that I think I’m at the end of the data mining journey.

Before beginning I was dreading that particular task but once I got going it wasn’t too bad... perhaps it’s something I could have automated but not sure if I would have actually saved much time.

Although it took longer than I would have liked, I finally have the data populated and links to artwork and links directly to Apple Music. I’ll populate other providers when I get some more time and I’m thinking about how best to introduce previews and/or music videos.

Latest preview automagically deployed here: https://theneptunes.1thingaweek.com

As always, feedback appreciated!
Very simple rule of thumb on when to write tests
Tags: testing
Published: 2021-01-01 22:41:30

Testing is a critical part of software development process. And there is a ton of literature on when and how to test.  

I'm not a big fun of sticking to any particular approach just because it's currently popular. 

Over the course of time I found a simple way to identify potential candidate for tests in my code:

*As I write a piece of the code, very often, I start to feel uncertain whether it will work or not. This feeling is accompanied by the urge to execute the code and validate its behaviour at runtime.
Well, this for me is a strong indicator that I should write tests.* 

Having said that, please mind that I'm talking about potential candidate. Sometimes (rarely), on second thought, I come to conclusion that no tests are needed.
PixAI DevLog: Day 4
Tags: discuss, dohackathon, react, ai
Published: 2021-01-01 22:39:34

# I should be done by now...

Been an interesting few days developing this app, here some of the stuff that happened:

1. Finished fully responsive design of this in 2days. 😎😎

2. Made 5 successful API calls using axios(turns out I'm not as incompetent as I thought😅).

3. Almost went crazy trying to make the last api work from base64 encoding to making the post request....finally I got in contact with the developers and they are trying to get it up at the moment( problem was from their side apparently).

That's basically it but I'm happy it turned out great.

*I should* be deploying by now, in fact I did but I took down cos my api_keys weren't secured, I've gone through posts about hiding stuff like on github with gitignore but I can't seem to get it working in production, all assistance is greatly appreciated

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/wqjrxv8sh0z8x4qrs57f.gif)

Later ✌
Using React Hooks with Django through Svelte and MQTT hub
Tags: react, django, svelte, mqtt
Published: 2021-01-01 22:05:50

Not everything has to be complicated. The code below is all you need to get started with an AMAZING world of Interactive Media.  I have been coding for 40 years ever since Fortran was a thing.  I have tried lots of libraries, platforms, etc.  If you are at all visually creative and just want to have fun coding and make cool stuff here is the code you need to get started. 

```javascript
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>ZIM - Code Creativity</title>
<script src="https://zimjs.org/cdn/1.3.2/createjs.js"></script>
<script src="https://zimjs.org/cdn/cat/02/zim.js"></script>
<script>
const frame = new Frame("fit", 1024, 768, light, dark);
frame.on("ready", () => {
    const stage = frame.stage;
    let stageW = frame.width;
    let stageH = frame.height;

    // put your code here
    new Circle(100, red).center().drag();

    stage.update();
});
</script>
<meta name="viewport" content="width=device-width, user-scalable=no" />
</head>
<body></body>
</html>
```
You will be called a Front-End Developer working on the open-source HTML 5 Canvas with JavaScript and ZIM - https://zimjs.com.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0mujmxnirlpqp9y62djk.jpg)

ZIM is new and extremely powerful and fun to code with.  You can take a look at the Dev site if you must https://dev.zimjs.com but we suggest you press on the [TEN BANNERS](https://zimjs.com) on the front page of the types of things perfect for Canvas coding or check out the examples at https://zimjs.com/examples and see if you might want to make these very colorful and fun apps.

If you want a quick taste of what the code will do go to https://zimjs.com/lab and type:

```javascript
new Blob({color:purple}).center();
```

The Intro page at https://zimjs.com/intro shows a good cross-section of what can be done with ZIM and there is a huge Learn section at https://zimjs.com/learn as well as lots of videos at https://zimjs.com/vids.  If you are on CodePen here is a ZIM CodePen Topic https://codepen.io/topic/zim - just fork any of the many templates or examples there.  Cheers and sorry for the title - did we get you?

Dr Abstract

---

If you have not checked out the Canvas recently - you simply must!  Here is the [ZIM&nbsp;Dev&nbsp;Site](https://dev.zimjs.com) and some [In-depth&nbsp;Guides](https://drabstract.medium.com/) by Dr&nbsp;Abstract including [Your Guide to Coding Creativity on the Canvas](https://drabstract.medium.com/your-guide-to-coding-creativity-on-the-canvas-ada0996298f6).
DevAnalytics at DOHackathon: More statistics added
Tags: dohackathon, typescript, angular, devanalytics
Published: 2021-01-01 21:46:53

To start the new year in a productive way, I modified both the backend and the frontend for my #dohackathon project, DevAnalytics.

Now if you pass your DEV API key, you'll get a list of your 5 top read/commented/reacted articles as shown on the picture.

![Accordion in action](https://dev-to-uploads.s3.amazonaws.com/i/nmizixj3uit01bwl18mg.png)

I used [Accordion from NG Bootstrap](https://ng-bootstrap.github.io/#/components/accordion/examples) to visualize the data in a non-disturbing way.

[Feel free to try](https://dev-analytics-frontend-tudwb.ondigitalocean.app/) and leave any suggestions you might have.
Creeping LaTeX: The project
Tags: latex
Published: 2021-01-01 21:45:55

Hello everyone and welcome!! :)

I consider that learning something craves determination and discipline, it occurs there are wide of sites to get hold of knowledge. There are occasions where you need to face the frequent problem that there is a lack of information on some topic so you need to halt and then move to other site but there are days when some sites spark you to go on your idea, on your project. *That is a brief and accurate description of what happened to me.* 

Hello, I am a student who wants to share with you some LaTeX which is being useful for me, not just in the school, also in taking notes and creating documents 

I put a goal: 
> Do not use Word for any school work

**And I have reached that goal**

This is not going to be a tutorial and I am not going to write a giant amount of  information here about LaTeX, no, I am going to talk about some ways to use LaTeX to create articles or documents with lots of formulas, this is going to be the cue to join to the LaTeX world or just a little help just to write a short article.

As I said, I am a student, and I have done over 100 documents with LaTeX, it was a hard and funny way for me and I want to share some knowledge and tips that I have got creating those documents, like if this were a discussion between you and me.

> I encourage you to put in the comments section your experience and during all the posts that I am going to publish to put if that was a good resource, how do you use that, have you used that? Will you change the way that you use that? 

Lets create community to help us and of course this can be a way to do some networking between us


### Why LaTeXteada?

Well the name of the tool is LaTeX, and *textear* is *to text* in Spanish so it was a good title for me, like saying lets write LaTeX

See you in the next post, greetings folks :)
The fuck
Published: 2021-01-01 21:35:18

I use the terminal every day and I've found myself mistyping the command that I wanted to input fairly often.

Here is where The Fuck comes in:

> The Fuck is a magnificent app, inspired by a [@liamosaur](https://twitter.com/liamosaur/) [tweet](https://twitter.com/liamosaur/status/506975850596536320), that corrects errors in previous console commands.


![fuck](https://raw.githubusercontent.com/nvbn/thefuck/master/example.gif)

As you can see, The Fuck is a CLI application that takes your last failed command and fixes it for you. It also suggests you the --upstream push option on your fresh new git branch so that you don't have to copy and paste it (I use this every single time that I create a new branch)

## Installation

You are going to need: 

- python (3.4+)
- pip
- python-dev

On Os X:

> brew install thefuck

On Debian Based Systems:

> sudo apt update
> sudo apt install python3-dev python3-pip python3-setuptools
> sudo pip3 install thefuck

On other systems:

> pip install thefuck


## Usage

The application is really simple to use. Once installed, try typing a command that you want to use. For example, let's try a git checkout to a certain branch on an existing repository:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/mzzjxdp2624j98ioift8.png)

You can also use the __--yeah__ parameter to skip the command confirmation:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/87it6bn9zgb1230g6bx6.png)

My favorite use is for the upstream push as I mentioned before:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/uhkel2ysxnsm2kkdj2wu.png)

Lastly, if there are no fucks to give, the application will let you know exactly that:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/gnxoc9dwbc022cypuf3k.png)

## Repository

Check the [repository](https://github.com/nvbn/thefuck) out and give a fuck for yourselves.

Happy new year
Happy ~~fuck~~ coding
Job Offer 
Tags: job, offer, canada
Published: 2021-01-01 21:34:01

Hi guys ,
I know this not the suitable place to ask 
I need some help 
I need Job Offer to submit in  Atlantic-immigration-pilot ( Canada immigration )
any position and any salary  
Regards
Mahrous
engmms2005@gmail.com
https://www.facebook.com/Mahrous.M.Shenouda/
Can I apply my Java knowledge to C#?
Tags: java, help, csharp, beginners
Published: 2021-01-01 21:23:41

I was just wondering what about Java can and can not be applied to C#.
I know they have a lot of similarities, but what are some of the key differences, and what are the "key similarities"?

Also, one question I definitely want answered is: "I learned how to compile C# using `csc test.cs`, but, how is the main class chosen?".


<div style="font-weight:bolder;" alt="Thanks! Cheers!>
##<b><center><b>Thanks!<br/>Cheers!</b></center></b>
</div>
How to Pull Yourself Out of a Writer’s Block
Published: 2021-01-01 21:05:13

Writer’s block, why is it considered as the bane of every writer’s existence? What is it and how can writer’s help themselves to come out of it? Well, these are some questions, which we will be focusing on in this little piece here.
    
So, quite simply, a writer’s block is state of mind, a condition that stops the flow of creativity of a writer. It is a barrier, which stops a writer to think, write and/or even come up with a single creative sentence at times. As surprising as it may sound, almost every writer on this planet must have gone through this. In my opinion, this state of mind is more self-inflicted rather than a result of any other external factor.
 
How can you pull yourself out of a writer’s block?

As to how you can manage to come out of this painful situation, which you must unless you have the option of going for [professional ghostwriters for hire](https://www.professionalghostwriter.com/). It is seriously not that difficult to get your out of this condition. Most of the times, a writer’s block is simply the result of stress and anxiety. It is a byproduct of your troubled mind. So, the simplest solution to this great nightmare is to relax. De-stress yourself and you will notice how easily you will be able to overcome this condition. Here are some ways through which you can win this battle against your creative block. 

Take a Walk: Just simply go take a walk. If you have a park near your house or a beach then go and take advantage of your natural surroundings. A walk helps in bringing your stress levels down and after around 3000 steps your brain starts to produce endorphins, which will help you feel happier and will allow you to pull yourself out of the sorry state that you are in.

Follow the “No Distractions Rule”: While writing, allow yourself a space that allows you to work in total peace and quiet. This will help you stay relaxed, listen to your own thoughts and tap into your creativity.
I've made a year progress bar
Tags: react, newyear
Published: 2021-01-01 20:56:12

---
title: I've made a year progress bar
published: true
description: Although the year is starting, I made a little site that shows us the progress of the year in percentage
tags: react, newyear
//cover_image: https://adscud.github.io/progryear/
---

Although the year is starting, I made a little site that shows us the progress of the year in percentage, it's not useful, but I find it nice !

Note that I do not take into account the bisextile years, maybe coming soon !

I'm happy if I can have some tips, or feedback to improve my code ! 

The website : https://adscud.github.io/progryear/
The repo : https://github.com/adscud/progryear
Algorithmic Trading Basics
Published: 2021-01-01 20:27:21

# Introduction

Algorithmic trading means using computers to make investment decisions.

There are many different types of algorithmic trading (complex and simples).

Here are some of the main players in the algorithmic trading landscape:
 - Renaissance Technologies.
 - AQR Capital Management.
 - Citadel Securities.

Python is the most popular programming language for algorithmic trading. However, Python is slow. This means that is often used as a "glue language" to trigger code that runs in other languages. 

One example of this is the *NumPy* library for python, is popular for *performing numerical computing* and its data structure which easily allows you to store and manipulate one or two dimensional structures in python. Although it's written for use in Python, his core underlying functionality is written in C.

# Process.

The process of running a quantitative investing strategy can be broken down into the following steps:
 - 1. Collect data.
 - 2. Develop a hypothesis for strategy.
 - 3. Backtest that strategy. Means formulating the strategy and then seeing how it would perform overtime. There are two ways:
   - Take the strategy back as far as you can.
   - Take the strategy across as many markets as you can.
 - 4. Implement the strategy in production.

# API

An API is an Application Programming Interface. It's a way to a software interact and control the API software.

We could use the IEX Cloud API to gather stocks market data to make investment decisions.

Like most software concepts, APIs are concepts that are best learned through rigorous practice. 

Here's is a list of free APIs that you can use to practice interacting with APIs using HTTP request. 

https://github.com/public-apis/public-apis

# S&P 500 Project Overview
The S&P 500 is the world's most popular stock market index.
Many investments founds are benchmarked to the S&P 500. This means that they seek to replicate the performance of this index by owning all
FullStack Vanilla JS Music Player
Tags: javascript, sass, css, firebase
Published: 2021-01-01 20:20:48

So, This is kinda the javscript version to Dev Ed music player from the react course, made fullstack with firebase services: Auth, Cloud Store, Storage.
styling made with Sass.

GitHub Link: https://github.com/kotaid/vanilla-js-audio-player

feedback is welcomed, on to another project.

Live App Is Here: audio-player-1d670.web.app
SQL Server 2019 for Data Professionals
Tags: sql, database
Published: 2021-01-01 19:50:44

A new version of SQL Server data platform had been released by Microsoft for data professionals. If you are running your enterprise applications on SQL Server databases then read this short guide to see what to expect from the most recent SQL Server database platform from Microsoft.

I found the chance of evaluating SQL Server 2019 for its new features and enhancements to existing components by the eyes of different data professional roles. I can easily say the SQL Server 2019 will enable database administrators and SQL developers to enjoy their work on the new database and help them to put forward their existing applications a head of other database users.

![SQL Server 2019](https://dev-to-uploads.s3.amazonaws.com/i/wsbcqlzkkl3h8wgfy22j.jpg)

Which features of SQL Server 2019 can attract IT professionals?

If I want to summarize in major topics as a list, I can easily say that Microsoft SQL Server 2019 serves:

1) Built-in innovative security and compliance within SQL engine
2) High performance database
3) Mission-critical availability
4) Built-in scaling-out and scaling-up options for Big Data Clusters
5) Data Virtualization technology by Polybase improvements
6) In-database Machine Learning capabilities
7) Intelligent Database

Please watch the [SQL Server 2019 database](https://docs.microsoft.com/en-us/sql/sql-server/what-s-new-in-sql-server-ver15?view=sql-server-ver15) intro at SQL Docs, I am sure you will wait for to try it impatiently.

Feel free to [download SQL Server 2019](https://www.kodyaz.com/sql-server-2019/download-sql-server-2019-free.aspx) trial after a short registration on Microsoft site. Then you can [install SQL Server 2019 database](https://www.kodyaz.com/sql-server-2019/stand-alone-sql-server-2019-installation-steps.aspx) and other components of this data platform software to try and test its new features and improvements.
Start a flask app
Tags: python, flask, jinja, webdev
Published: 2021-01-01 19:56:12

source venv/bin/activate
export FLASK_APP=flaskr
flask run

//If we need to make the server publicly available
flask run --host=0.0.0.0


**Reference :**
https://flask.palletsprojects.com/en/1.1.x/quickstart/
2021 - let's get technical
Tags: discuss, goals, writing
Published: 2021-01-01 19:55:36

2020 was an astonishing year for the world, economically, socially and also in the realms of tech. With all the happened in the world, I wish I had documented more, written more and learned more. No one could have predicted the events of last year but the social changes cause by the ongoing pandemic catapulted our collective reliance on technology driven by a need to engage with one another. There were more developments in tech, more to read and talk about. 

This year of 2021, I have been fortunate enough to gain a new role as an Analyst programmer. In 2019 I could not have imagined coming this far as a self taught developer and my biggest regret is not documenting more of the journey learning to help myself and others. Whilst I am not very familiar with technical blogging or the DEV website itself, the goal for 2021 is write, document, code. 

What are everyone else's goals? Anyone eager to get stuck in with Technical writing for 2021?
Kid Me wouldn't believe I got an iMac in 2020
Tags: discuss, giveback
Published: 2021-01-01 19:47:02

If we were to time travel to the early 90s when I was a kid, and you were to tell me that one day I would be able to afford an iMac, I wouldn't have believed you. 

_(Granted, iMacs specifically didn't obviously exist when I was a kiddo, but you know what I mean.)_ 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/up70bj19n0psqd0mrs7h.jpeg)

## We grew up poor

I was never one of those kids who got to own Mac laptops all through high school and college. In fact, **I did not even touch one until I was in my early 20s!** The first time I was able to afford a MacBook Air laptop was in my late 20s.

## Today, I am privileged. I can afford an iMac!
My iMac arrived literally on the last day of the year for 2020. 2020 was a hard hit financially in so many ways, all over the world. I cannot believe my privilege, in being able to buy an iMac in what will probably go down in history as one of the most insane world criseses faced by humanity. 

Because that is what it is! It is a privilege to be able to own fancy cool tech gadgets, at a time when many people around the world have lost their jobs due to COVID-19 closures.

### Do you know someone who has less than you do?
Of course you do! 

We all know someone who has less than we do. If you are like me - a techie who is living a fairly privileged life in 2021 - then I know you can give to others more.

Don't take your cool stuff and life for granted! Think of those who have less, and think of how you can give back in 2021.

We have a lot of reconstruction work ahead of us. It's time to give back even more and get to work. ❤️ ❤️ ❤️ 

~Alejandra💁🏻‍♀️ y Canela🐾
Building a simple Alexa voice app
Tags: alexa, voice, javascript, amazon
Published: 2021-01-01 18:31:46

Created a voice app using [Violet](https://helloviolet.ai), which is a javascript based opensource framework by developers at Salesforce.

Code sample is [here](https://github.com/mani-playground/alexa-app-trial/tree/main/voice_controlled_scorer)

To test the alexa skill deployed locally, it can be exposed externally using [ngrok](https://ngrok.com/) so that Alexa server can access it.

After installing ngrok, below is the command to expose service running in local machine on port 8080.

> ngrok http 8080

![Screenshot_ngrok](https://dev-to-uploads.s3.amazonaws.com/i/jyoc24p2l18tx9doaqf1.png)
 
In this case, the service can be accessed in the web using the below url (note : The link expires in 8 hours in the free version of ngrok)
https://561adde7bf38.ngrok.io/

The endpoint https://561adde7bf38.ngrok.io/alexa needs to be specified in [Alexa developer console](https://developer.amazon.com/alexa/console/ask) by selecting HTTPS under Endpoint section.

![Screenshot_amazon_developer](https://dev-to-uploads.s3.amazonaws.com/i/gb68ym0lrydemqzuna03.png)


Make sure to select below option
*My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority*

Sample interaction model json to be specified in the Alexa developer console under "Interaction Model -> JSON Editor" is included [here](https://github.com/mani-playground/alexa-app-trial/blob/main/voice_controlled_scorer/Interaction_Model.json)


**References :**
https://hackernoon.com/how-to-build-a-voice-app-in-30-minutes-uz6132kj
https://i3labs.org/2019/03/getting-inputs-for-your-voice-app
https://www.macadamian.com/learn/developing-alexa-skills-locally-with-ngrok-and-node-js/