teleren/devto huggingface dataset:
I have always been a weirdo
Tags: watercooler, blog, devstory
Published: 2020-02-15 21:09:39

If you met me you wouldn't imagine that I have social anxiety, or that I was not popular in school. I seem like an average, talkative and overall positive person. 

But the *truth* is, I have always been an outcast. And it took me 30 years to be fully okay with that. 

![Hey Arnold](https://media.giphy.com/media/3o6nV5fodJwG2q7nJm/giphy.gif)

I got married back in 2015 after being a student at a local bible college in Louisville Ky. I had just gone through the motions of school and didn't know what I was going to do for a career. I dropped out of high school when I was 17, got my GED and worked a full-time job for most of the latter half of my teenage years. I tried my hand at a lot of different industries not finding something that fits. I had always been creative with words from an early age, my mom still has many poems that erupted from my 9-year-old self. I wanted so badly to find a creative outlet that could be a "job", but my skill set didn't fit. Although I liked writing, It wasn't interesting enough for me to be an author, and honestly, my poems were the only decent thing. 

I say all of this to give you a firm grasp of the panic that set in while working at a call center for nearly 3 years. Panic. Pure, adrenaline-pumping panic. The kind where you have so many questions, you can't grab a hold of one to even consider an answer. Being recently married, and then finding out we were expected our first child had put my panic in turbo! 

But alas, a silver lining appeared in the dark cloudy sky. I had a good friend of mine feeling the same dread of having to come into work. The mundane aspect of answering 160+ phone calls a day saying the same ole things. My lifeline out of here lied in our common "AH-HA!" moment. We had both asked for more work, to pull us into some sort of challenge and what we were given changed our lives forever. 

We were told to assist in coding. Now, I won't size this up to make it seem like we were given something rad, but for us, it was an escape and an introduction to our new career of choice. We used HTML/CSS to write documentation. I am talking using tables to add "format" to the documents because anything else would break the pages completely. But this was enough to give us a taste, and from there we started finding out more projects we could get our hands-on. 

Fast forward a year and a half and I completed an online Software Bootcamp and had convinced my work to allow me to create a full-stack .NET/C# web app. 

Now I have worked professionally in software development for almost 3 years. The dev community has opened up its arms to me and my weirdness and I am so thankful for that! The amount of teamwork and collaboration our industry has is astounding! 

![Goldbloom Shew](https://media.giphy.com/media/3krrjoL0vHRaWqwU3k/giphy.gif)

You made it through my rant! 

- What is your story? 

- What got you into Programming?
How to Market a Blog?
Tags: blogging, computerscience, discuss
Published: 2020-02-15 20:52:07

I have been running a computer science and programming related blog for just over a year now. I've written around 100 posts to do with programming, computer science, networking, etc. Unfortunately, I haven't seen any major successes or mass amount of views/eyeballs. A handful of times I have gotten over 20 views in one day, usually it's under 5. 

I cross post some posts on here, I post to Instagram, Twitter and LinkedIn about new/old posts. I also post content on TikTok.

I'm wondering if I am doing something wrong, or missing something vital. How do you market your blog and what are good ways to gain traffic/viewers?

Is my content just not good enough to gain traction or is there something else?
SQL Cursor Kullanımı
Tags: sql, cursor
Published: 2020-12-26 13:41:14

---
title: SQL Cursor Kullanımı
published: true
date: 2020-02-15 20:38:47 UTC
tags: SQL,CURSOR
canonical_url: 
---

Merhaba, başlıktan da anlaşılacağı üzere bugün SQL’de çok sık olmasa da ara ara kullandığımız **cursor** yapısından bahsedeceğim. Cursor yapısı alında macro recorder ya da for yapılarına benzetilebilir. Tanımı biraz daha kısaltacak olursak; **cursor** : **verilen veriler arasında satır satır dönerek işlem yapılmasına olanak sağlayan yapıdır.**

Öncelikle çıktı sonucunu görebilmek adına Id, AdSoyad ve Departman-dan oluşan basit bir veritabanı oluşturalım. Daha sonra aşağıda ki kodu SSMS’te çalıştırıp sonuçları başarılı bir şekilde alabildiysek kod içerisinde ki yorum satırlarını inceleyerek meseleyi kavramaya çalışalım.

``` sql

DECLARE @crs_AdSoyad NVARCHAR(MAX), @crs_Departman NVARCHAR(MAX) -- Kullanacağımız parametreleri tanımlıyoruz.
 
	DECLARE crs_Kullanici CURSOR FOR
	
	SELECT AdSoyad,Departman FROM Kullanicilar -- Cursur de işlenecek veriler ve listeyi select sorgusu ile çekiyoruz .
 
	OPEN crs_Kullanici -- Cursor ü açıyoruz
 
	FETCH NEXT FROM crs_Kullanici INTO @crs_AdSoyad, @crs_Departman -- Select sorgusunda gelen sütunlar sırasına göre değişkenlere atanır Örn : @crs_AdSoyad = @AdiSoyadi
 
	WHILE @@FETCH_STATUS =0
		BEGIN
			
			PRINT @crs_AdSoyad + ' => ' + @crs_Departman
			--SELECT , INSERT , UPDATE İŞLEMLERİ YAPILABİLİR
 
			FETCH NEXT FROM crs_Kullanici INTO @crs_AdSoyad, @crs_Departman
 
		END
 
	CLOSE crs_Kullanici -- Cursor ü kapatıyoruz.
 
	DEALLOCATE crs_Kullanici -- Cursor ile işimiz bittiğinde sistemden tamizlememiz için DEALLOCATE etmemiz gerekmektedir.
 

```
Revamping my portfolio with GatsbyJS
Tags: portfolio, gatsby
Published: 2020-02-15 20:03:08

---
title: Revamping my portfolio with GatsbyJS
published: true
description: How I Updated my portfolio using Gatsbyjs
tags: portfolio, gatsbyjs
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/a7qe0vxszexltian1xht.png
---

My portfolio needed an update for a long time and I wanted to make it happen in Gatsbyjs. It's been delayed for one another reason. But finally, it's completed and I am happy to share updates on how I build it.

##1. Why Gatsby ![gatsby logo](https://vish448.github.io/icons/icon-96x96.png?v=edf3d310d67f8284a562bc3a58c3e761)

Gatsbyjs is powerful and popular static site generator out there and the only one which I have tried. It does not need an introduction. Though, I put my thoughts on it.

It's blazing fast ⚡️
It's easy if you already know react 🖌
99 percent of time you think of implementing something and gatsby gets you covered with their rich plugin ecosystem 🙋‍♂️
Basic SEO and performance is out of the box so you can concentrate more on building 🍳
Initially, I struggled a bit. But once I understand few parts it's get easier day by day.
It took me long to get it completed,as i think it was my learning curve. But now I am confident enough to produce new site very fast. Though, I am not an expert on it. Exploring new things as I am building.

Let's check out my processes

##2. My processes
I follow simple processes throughout building an application.

🎮**Design**- yes, I can produce simple and clean design.

📇**UX development** on top of my design. Believe me if you have design in front of you. It helps in scoping your requirements.

🥨**Gatsby integration** - Settings up the pages and basic structure of all pages. Setting up page queries to source data from contentful. Gatsby has plugin to pull you contentful space into graphql API. So you can structure your page queries to pull necessary information.

🌾**Building contentful** model- I am using contentful to source my entire site. So in future if there are updates I can handle it via contentful.

🚀**Deployment with Netlify and Gatsby cloud.** I have added a webhooks for both environments so whenever I make changes to contentful data modal the build is created automatically and for github page I dont have any automation. So I build the site locally and commit to the master so github pages can update the site.

So, Overall I am happy with this process and will continue with this for next projects.

🖥 **Final Result**
[vish448.github.io](https://vish448.github.io/)

![Final image link](https://dev-to-uploads.s3.amazonaws.com/i/b8clmwwmjwycb91vvevd.png)


🐞**Github Repo**
{% github vish448/vish448.github.io/ %}
Birthstone challenge with loops
Tags: codepen
Published: 2020-02-15 19:51:09

A really simple challenge. But it was still fun to do. You don't have to have massive challenges to overcome, sometimes a quick 15 min thing you throw together is fun to exercise your mind with. I threw this together while helping a student on the problem. I wanted to see if I could do it and what my thought process would be. Don't be afraid of overcoming mole hills. Too many times I don't do challenges because I can't climb Everest! 

*Comment below how I could clean this up and make it simpler! All while keeping the for loops. (It's part of the warmups for loops.)*

{% codepen https://codepen.io/humbledstone/pen/xxGVVOo %}
More About Array - JavaScript Series - Part 21
Tags: javascript, tutorial, beginners, codenewbie
Published: 2020-02-15 19:50:56

In last part we learned about array, in this part we are going to go a little deep around arary.

Suppose we’ve an array of favAnimeList = [‘One piece’, ‘Dr Stone’, ‘Haikyuu’, ‘Attack on Titan’]

Now we want to delete the last one. How we can do this ?

Using the pop.

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

Now we want to add “naruto” in the array. How we can do this ?

Just using push. This will add the value in end

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

Now we can easily sort the array using sort

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

See all results on the browser

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

Can you use array now ?


You can see the graphical version here
{% instagram B8jViSJgwQ9 %}

Source Codes - { Check commits }
{% github nerdjfpb/javaScript-Series %}

Originally it published on [nerdjfpbblog](https://blog.nerdjfpb.com/javascript-part-21/). You can connect with me in [twitter](https://twitter.com/nerdjfpb) or [linkedin](https://www.linkedin.com/in/nerdjfpb/)!
Publish a Svelte Web App with GitLab Pages
Tags: gitlab, svelte, javascript
Published: 2020-02-15 19:35:20

---
title: "Publish a Svelte Web App with GitLab Pages"
published: true
description: How to publish a Svelte site using GitLab Pages
tags: gitlab, svelte, javascript
canonical_url: https://gavinr.com/svelte-publish-gitlab-pages
---


If you've built a [Svelte](https://svelte.dev/) web application and would like to host it, you can do so easily using [GitLab Pages](https://about.gitlab.com/stages-devops-lifecycle/pages/).

1. Create and clone a new GitLab repository.
2. Download and extract the [Svelte Starter Template](https://github.com/sveltejs/template/archive/master.zip) into the repository.
3. Since your URL will be at a subdirectory (`https://username.gitlab.io/repository-name`), make the references to the JS and CSS files in your `public/index.html` file relative. In other words, remove the leading `/` from the `/global.css`, `/build/bundle.css`, and `/build/bundle.js` URLs.
4. Create a `.gitlab-ci.yml` file at the top-level of the repository, with the following contents:
  ```
   image: node:latest
    pages:
      stage: deploy
      script:
        - npm install
        - npm run build
      artifacts:
        paths:
          - public
      only:
        - master
  ```
  This says, when there's a new commit on master (last line), use the `node:latest` docker image to check-out the code and run `npm install` and `npm run build` commands.

Your site will now be live - find the URL under GitLab `Settings` > `Pages`. Check the `CI/CD` status page of your GitLab repository to see the status of the build process if you ever have issues with that. Unlike GitHub, the site is not public by default. To make it publicly accessible, go into GitLab `Settings` > `General` > `Visibility, project features, permissions` and set `Pages` to `Everyone`. Your site is now available!

Thanks to https://dev.to/bryce/how-to-automatically-deploy-to-gitlab-pages-w-ci-4iko for help on this process.

_[Originally posted on gavinr.com](https://gavinr.com/svelte-publish-gitlab-pages/)_
Vistulans - Game Dev Diary - Days 15-21 - Blender & 3D Modelling
Tags: gamedev, unity3d, csharp, showdev
Published: 2020-02-15 19:08:38

It's one week since I finished my game dev project, a game called "Vistulans". And now I am back with articles about it. This article will cover the third week of development progress from six weeks total. This week I spent on 3D modelling and learning basics of Blender.

### To briefly remind what the project is about:
Game Vistulans is named from Vistula (Latin name of Wisła - large and long river in Europe and historical Slavic tribes near) is inspired by Slavic mythology and graph-based strategy games. The game is written in C# with Unity Engine.

⭐ Please star on GitHub if you like this project and want more 😗 
{% github pilotpirxie/vistulans %} 

The third week came and the time to start modelling also. Choose of software for modelling was obvious for me. At University we use Blender so I picked it up for my game too. It's free to use and very powerful. I hadn't much experience with them before. A few years ago I had created a simple monitor and some other simple models, but nothing more.

About 3D graphics, I learned there are Vertices, Faces and Triangles. Few objects at the scene can be grouped together with Collection. Objects can have Modifiers and Materials.

This time I have been working on entire game assets. I want to create everything on my own, so the list of elements was very long. Trees, rocks, bushes, mushrooms, different buildings and elements of the environment. I started with reminding what I had learnt on lessons at University, then I watched some videos on YouTube from YanSculpt channel.

My first 3D models for the game were trees. 
![First tree](https://i.imgur.com/j0hp2Om.png)
![Seconc tree](https://i.imgur.com/QWrlssw.png)

Next, I worked on the rest of the environment elements listed above.
![3D environment](https://i.imgur.com/tpbL72V.png)

The hardest part was to model simple buildings for village, apiary and shrine. It was hard because the model must be very low poly and looks like a building 😅
![3D buildings](https://i.imgur.com/Z24oVe1.png)

The Stonehenge (which isn't Slavic but who cares, it looks pretty mysterious :D) I made with Array and Curve object modifiers. I don't use any texture on my models. Each model has just base colour varies in different faces. Combining everything together made the game look simple, but pretty :D
![Few models together](https://i.imgur.com/fOsfF1o.png)

Even better with a procedural map generator and new UI which I am going to explain in one of the next articles.
![Game with models and map generator](https://i.imgur.com/G8jwa6a.png)

Totally I had made over 30 models, and each one I uploaded to Sketchfab with **creative commons license & free download**. If you are looking for models for your future game, maybe you will be interested: https://sketchfab.com/lightguard/collections/ancient-game

⭐ Please star on GitHub if you like this project and want more 😗 
{% github pilotpirxie/vistulans %}
Case Design: A Thoughtful Design Library
Tags: showdev, css, sass, webdev
Published: 2020-02-15 19:01:45

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

I made [Case Design](https://github.com/godcrampy/case-design/) which is a small CSS and SASS library focused on clarity. The minified CSS file is super light at 3.8kb. The primary focus of the design is making content more open and readable.

The library is available on [npm](https://www.npmjs.com/package/case-design) or you can download just the [minified css](https://raw.githubusercontent.com/godcrampy/case-design/master/css/case.min.css).

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

## Links:
* [npm](https://www.npmjs.com/package/case-design)
* [repo](https://github.com/godcrampy/case-design)
* [demo](https://godcrampy.github.io/case-design/)

> I'd love to hear your thoughts on the project.
Have a nice day 😄
A 'Nike Foamposites' mobile app I developed was finally accepted by Apple
Tags: xamarin, php, sql
Published: 2020-02-15 18:10:06

I’m happy to announce that after numerous attempts, an app I’d created, “Foamlicious”, has been accepted and is for sale on the Apple App Store. We actually developed this app a few years ago and this past summer attempted to rebrand the app for a new owner; it didn’t go well. ⠀ 

Apple repeatedly rejected the new version of the app due to it not being backed by Nike and it not having enough “app-like” features 😡. After renaming the app, clearly stating the non-affiliation with Nike all over the app, and adding a barcode scanner (pretty dope), Apple finally accepted the app.⠀ 

Foamlicious is the ultimate app for Foamposite shoes where you can find all the past Foamposites from the last 20 years as well as future releases. Plus, this app can do so much more:
· Get updates (push notifications) when foams restock, for release dates, prices, and other general news
· Scan a shoebox barcode to search for it in the app and to check it's authenticity
· Add foams to your favorite list (synced over iCloud to all your devices).
· Add upcoming releases/dates to your device calendar
· Share foams over AirDrop, Messages, Mail, Facebook, etc.
· Find matching apparel for your shoes. 

To develop the app, I used the following tech-stack:
· Google Cloud Platform (server/hosting)
· Windows Server (server OS)
· Microsoft IIS (server software)
· MySQL (database)
· PHP (web API)
· Xamarin / C# (mobile app) 

To summarize, I created a MySQL database/table to store all the shoes, exposed the table for querying/mutation via a PHP Web API, and created the actual app using the Xamarin cross-platform framework. The news articles are sourced from various Foamposite-related RSS feeds and entered into a database table by a PHP script that runs routinely. The push notifications are all done through a free API/service called OneSignal.⠀ 

Sometimes software development doesn’t always go as smoothly as we hope but it’s so rewarding in the end when we keep pushing through. 🏆 

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

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8wa8d6txzoivyll1p9r5.jpeg)
Using Chart.js in a function component with React hooks
Tags: react, chartjs, hooks, javascript
Published: 2020-02-15 18:04:58

---
title: Using Chart.js in a function component with React hooks
published: true
description: Don't want to have to install the react version of Chart.js? This is the best alternative.
tags: react, chart.js, hooks, javascript
---

### Why

When using React in conjunction with other JavaScript libraries, it's common to see that React-specific versions of those libraries exist. Regardless of whether they exist to make parts of those libraries available as components, or to aid the developer in making React play nice with a particularly intricate library, I think this is not the case for [Chart.js](https://www.chartjs.org).

### Initialization

If we take advantage of [React's `useRef` hook](https://reactjs.org/docs/hooks-reference.html#useref), we can make use of Chart.js without the need for a made-for-react version of it. The key snippet looks like this:

```javascript
import React, { useEffect, useRef } from 'react';
import Chartjs from 'chart.js';

const chartConfig = {
  type: 'bar',
  data: {
    // ...
  },
  options: {
    // ...
  }
};

const Chart = () => {
  const chartContainer = useRef(null);
  const [chartInstance, setChartInstance] = useState(null);

  useEffect(() => {
    if (chartContainer && chartContainer.current) {
      const newChartInstance = new Chartjs(chartContainer.current, chartConfig);
      setChartInstance(newChartInstance);
    }
  }, [chartContainer]);

  return (
    <div>
      <canvas ref={chartContainer} />
    </div>
  );
};

export default Chart;
```

Chart.js uses the [DOM Canvas](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) to render, and the `ctx` parameter in `new Chartjs(ctx, options)` is a reference to the `<canvas />` element where we'll mount our chart.

They key takeaway from this is that the `useRef` hook allows us to use an effect to initialize our chart as soon as the DOM object is available, by reacting to changes on the `chartContainer` ref variable.

### After initialization

On initialization, we're assigning the initialized chart to the `chartInstance` state variable so that we can update our chart later, like this:

```javascript
  const updateDataset = (datasetIndex, newData) => {
    chartInstance.data.datasets[datasetIndex].data = newData;
    chartInstance.update();
  };

  const onButtonClick = () => {
    const data = [1, 2, 3, 4, 5, 6];
    updateDataset(0, data);
  };

```

This updates the Chart after the callback for a button click is invoked, but this could also be done inside a `useEffect` callback, or really anywhere else where you have access to `chartInstance`.

There, short but sweet little tip!

PS. Check out the [working version on codesandbox.io](https://codesandbox.io/s/hopeful-kalam-phzdt)!
CSS Media Queries
Tags: webdev, css, tutorial, beginners
Published: 2020-02-15 16:23:30

Learn how to do CSS Media Queries with the latest techniques of calling @media, max-width, min-width to allow your HTML code to automatically adjust its responsive design. 
{% youtube j1AhSWFcZpg%}
In this video I cover:
* What media queries are and how to use them
* Media types such as screen, print
* Max-width verses min-width and using them together
* Creating a responsive design code for a test example

## Follow and support me: 
Special thanks if you subscribe to my channel :)
* [Youtube](https://www.youtube.com/channel/UCvM5YYWwfLwpcQgbRr68JLQ?sub_confirmation=1)
* [Patreon](https://www.patreon.com/adriantwarog)
* [Twitter](https://twitter.com/twarogadrian)

## Want to see more:
I will try to post new great content every day. Here are the latest items:
* [Full Tutorial on how to use SASS to improve your CSS](https://dev.to/adriantwarog/full-tutorial-on-how-to-use-sass-to-improve-your-css-57on)
* [4 Simple CSS Hover Transitions for your Elements Background](https://dev.to/adriantwarog/4-simple-css-hover-transitions-for-your-elements-background-4mlg)
* [How to implement Dark Mode with CSS new media call: prefers-color-scheme](https://dev.to/adriantwarog/how-to-implement-dark-mode-with-css-new-media-call-prefers-color-scheme-3h65)
* [Creating a Mobile Design and Developing it](https://dev.to/adriantwarog/creating-a-mobile-design-and-developing-it-5c4o)
Django on raspberry Pi 4.0
Published: 2020-02-15 15:52:59

Hello, 

I developing basic digital signage website for displaying different kinds of images, videos, and text files. This will be integrated with Rasberry Pi as a media player that will be connected to a monitor through HDMI. The website is already implemented and installed on the raspberry, however, I couldn't display the selected images on the monitor. Anyone who can assit or guide me through this. 

Thanks in advance.

#django, #python, #raspberry pi