teleren/devto huggingface dataset:
Working with Obstacles
Tags: obstacles, beginners
Published: 2019-10-11 18:06:43

	

Obstacles. Well, they sure have been present in my day to day life. You know, like the times when your out and about and the baby is upset because they have a wet diaper but oh no, you didn’t realize you used the last diaper last time. No problem, just a run to the store can fix that. Its an inconvenient or even frustrating situation, but at least seeing that beautiful solution in the horizon is comforting enough and we can take a breathe of relief. We can handle those obstacles, right?  Unfortunately,  not all obstacles give you the comfort of having or even knowing if there is a solution. Those times, not so fun. Oh, those dreadful times can take anywhere from an hour that feels like days to the days that feel like months. So what are we to do when we are unexpectedly hit? For all you devs out there, I am sure you have figured out your own little way to deal when your code just isn’t working and you are just stuck. Or maybe you haven’t. I mean, we are to confide in Google as long as we can before we go make our problem some one elses. Even then the thought of giving up because you feel like you have tried every option there is over and over again can really play in your head. For those people or the noobs like me, here are some helpful tips that I have came across by our trusty friend Google or just word of mouth. 

1. Identify your starting point
So where do you start? Not with a specific language or job, but with a path that starts with the fundamentals. Before you learn React, you need to learn the command line, how the web works, JavaScript, understand front end frameworks, and then you can finally learn React. 

2. Learning Alone
Start alone but continue with others. 

3. Pacing and Goal Setting
This is still a struggle for me. I feel like there is so much information I need to learn so I want to know it all, because frankly, until I do, I will feel so behind. I just have to accept that. I have to keep reminding myself that everyone has been where I am. Just slowing down and setting reachable goals will gain huge accomplishments. 

4. Managing Frustrations and Troubleshooting Effectively
   1. Read error messages.
   2. Get comfortable with not knowing.
   3. Struggle, but not for too long.
   4. Learn how to ask questions.

	There will be some days you read over these and feel like none of this can help un-stick for the super sticky spot your in and that may be the case BUT just try to start practicing these steps and getting familiar will definitely help in the long run.
GraphQL Server Creation - Codepen With Notes
Tags: graphql, express, javascript, tutorial
Published: 2019-10-06 13:03:46

Hey all :wave:

I've been learning javascript for a while now and still consider myself a beginner. Part of my learning process has involved going back through old projects from tutorials and trying to figure out what I did.

So I'm creating a public codepen with annotated code for myself and anyone who might benefit from it.

This pen in particular will deal with **creating a GraphQL server using ExpressJS.**

https://codepen.io/porgeet/pen/dyyyevm

Enjoy, 
I hope this is helpful

*PS - I will be updating this pen the more I understand about GraphQL*
What was your first Hacktoberfest contribution?
Tags: hacktoberfest, opensource, git
Published: 2019-10-06 18:01:25

The first contribution can be the hardest.

For me, it was difficult finding projects where I could contribute code. 

Instead, one of my first Hacktoberfest contributions in 2017 was translating text in a student project from German to English. 

What was your first Hacktoberfest contribution?
Hacktoberfesting!
Tags: javascript, opensource, hacktoberfest
Published: 2019-10-20 15:26:25

As my first participation in [Hacktoberfest](https://hacktoberfest.digitalocean.com), I've created 4 great pull requests this month:

## 1) Fixed Habitica's Chat Extension for Firefox

As I wanted to have my [first](https://dev.to/heymarkkop/my-first-open-source-contribution-21dh) open source contribution accepted as soon as possible, I also had to [fix this firefox extension](https://dev.to/heymarkkop/fixing-version-not-approved-on-habitica-chat-extension-firefox-4i6p).

{% github https://github.com/HabitRPG/habitica-chat-extension/pull/50 %}

## 2) Fixed a weird class name in Habitica

I wanted to contribute more with the project and fixed a strange class name that was appearing because of VueRouter. This [led](https://github.com/HabitRPG/habitica/pull/11405#issuecomment-538759965) me to the 4º contribution [tier](https://habitica.fandom.com/wiki/Contributor_Rewards) in Habitica, hurray!

{% github https://github.com/HabitRPG/habitica/pull/11405 %}

## 3) Created a Pomodoro's Timer for Habitica

This is not actually a Habitica's feature, but a script that creates a small timer as task while on the website. It's open source, so feel free to contribute!

{% github https://github.com/Markkop/habiticaPomodoro %}

## 4) Added 'About Hacker Culture' section in TarrafaHC's webpage

I've added a new section in the Tarrafa's HackerClub [page](tarrafa.net) to explain a little more about the context which this hackerspace is inserted. 

{% github https://github.com/tarrafahc/tarrafahc.github.io/pull/10 %}
Weekly Links – 10/7
Tags: links
Published: 2019-10-08 12:34:12

---
title: Weekly Links – 10/7
published: true
date: 2019-10-07 09:00:39 UTC
tags: Links
canonical_url: 
---

So this week was a little crazy with family obligations, work travel, busy work schedules, etc. But overall it wasn’t bad kind of week. We are officially into full on October. Right now I’m busy prepping for our monthly game today which should be a lot of fun

![See the source image](https://s-media-cache-ak0.pinimg.com/736x/9b/63/7e/9b637eea6cbd51cd328cdd60822aa72b.jpg)

Now down to the business…

### Development:

- [Remote SSH: Tips and Tricks](https://code.visualstudio.com/blogs/2019/10/03/remote-ssh-tips-and-tricks) : Great article, and another reason VS Code really is the best IDE on earth.  

### Cloud:

- [The key to a data-driven culture: Timely insights](https://azure.microsoft.com/en-us/blog/the-key-to-a-data-driven-culture-timely-insights/) : This is very top of mind for me, as there is this big movement away from Data warehouse architectures that function on a time delay. There is a big push by businesses to have data timely or not at all.  
- [Introducing the preview of direct-upload to Azure managed disks](https://azure.microsoft.com/en-us/blog/introducing-the-preview-of-direct-upload-to-azure-managed-disks/) : Really cool new feature for those looking to move VHDs to the cloud, making the process even easier.  
- [Over 100 Azure services support PROTECTED Australian government data](https://azure.microsoft.com/en-us/blog/over-100-azure-services-support-protected-australian-government-data/) : Really exciting to see the compliance focus move from US Centric to world wide.  
- [Built-in Jupyter notebooks in Azure Cosmos DB are now available](https://azure.microsoft.com/en-us/blog/analyze-and-visualize-your-data-with-azure-cosmos-db-notebooks/) : Really awesome to be able to run Jupyter notebooks in cosmos without requiring any additional architecture or compute platform.  

### Audio / Video:

- [AI Show – Machine Learning Models](http://www.welldocumentednerd.com/wp-admin/post.php?post=454&action=edit) : Great video talking about and demystifying the term “Model”.  
- [The ASP.NET Core Ecosystem with Jeremy Miller](https://www.dotnetrocks.com/?show=1655) : Really interesting to hear about the robust ecosystem for .net core.  

### Fun Stuff:

I’m a big comic fan, and Greg Rucka is one of my favorite writers. And StumpTown was one of his pet projects, and really the book plays out like Jessica Jones more for the real world. And I gotta say, I watched the pilot and was really impressed.

<iframe type="text/html" width="840" height="473" src="https://www.youtube.com/embed/HwynrxEPSQk?version=3&amp;rel=1&amp;fs=1&amp;autohide=2&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent" allowfullscreen="true" style="border:0;"></iframe>
Playing with Fmt
Tags: haskell, functional
Published: 2019-10-07 14:00:27

---
title: Playing with Fmt
description: Using Fmt to format stuff.
tags: haskell, functional
cover_image: https://thepracticaldev.s3.amazonaws.com/i/upiabrbfntaqk290sysl.jpg
canonical_url: https://odone.io/posts/2019-10-07-playing-with-fmt.html
published: true
---

You can keep reading here or [jump to my blog](https://odone.io/posts/2019-10-07-playing-with-fmt.html) to get the full experience, including the wonderful pink, blue and white palette.

---

```hs
{-# LANGUAGE OverloadedStrings #-}

module Main where

import Data.Text (Text)
import Data.Text as T
import Data.Text.IO as T
import Fmt

data Person = Person
    { firstName :: Text
    , lastName :: Text
    }
    deriving (Show)

instance Buildable Person where
    build person =
        (toTitle $ firstName person) |+ 
            ", " +|
            (toTitle $ lastName person)
            |+ ""

main :: IO ()
main = do
    let name = "mario" :: Text
        person = Person "mario" "mario"
        people = 
            [ Person "mario" "mario"
            , Person "luigi" "mario"
            ]

    T.putStrLn $ "hello " +| name |+ "!"
    -- hello mario!

    T.putStrLn $ "hello " +| toTitle name |+ "!"
    -- hello Mario!

    T.putStrLn $ "hello " +| padBothF 10 '=' name |+ "!"
    -- hello ===mario==!

    T.putStrLn $ "hello " +| whenF False (build name) |+ "!"
    -- hello !

    T.putStrLn $ "hello " +|| person ||+ "!"
    -- hello Person {firstName = "mario", lastName = "mario"}!

    T.putStrLn $ "hello " +| person |+ "!"
    -- hello Mario, Mario!

    T.putStrLn $ "hello " +| people |+ "!"
    -- hello [Mario, Mario,Luigi, Mario]!

    T.putStrLn $ fmt $ unlinesF people
    -- Mario, Mario
    -- Luigi, Mario

    T.putStrLn $ fmt $ jsonListF people
    -- [
    --   Mario, Mario
    -- , Luigi, Mario
    -- ]

    T.putStrLn $ fmt $ blockListF people
    -- - Mario, Mario
    -- - Luigi, Mario
```

And yeah, the name is actually [Mario Mario](https://en.wikipedia.org/wiki/Mario#Surname)!

---

Get the latest content via email from me personally. Reply with your thoughts. Let's learn from each other. Subscribe to my [PinkLetter](https://odone.io#newsletter)!
"How to get started in c programming?"
Tags: c, startingcode, simplecode, simplesetup
Published: 2019-10-07 15:12:56

This program is first in c programming and simple also in programming. This program is very short and in this program, we tell how to use the printf, scanf, include<stdio.h> and many more function are used in this program and the start program this program run  on turbo c or Visual Studio Code



Turbo c

  #include<stdio.h>// used to a Header file which contain all the I/o functions 
                    like printf,scanf
  #include<conio.h>// used to store the value
  void main()//used to Main function  returns void in void main
    clrscr(); //used to clear the  output window
    printf("hello everyone"); //used to print the “character, string, float, 
                            integer, octal and hexadecimal values” onto the 
                            output screen. We use printf() function with %d 
                            format specifier to display the value of an integer 
                            variable.
     getch();// used to  getch() reads a single-byte character from input. 
                getch() is a way to get a user inputted character. It can be used 
                to hold program execution, but the "holding" is simply aside- 
                effect of its primary purpose, which is to wait until the user 
                enters a character.
  }


![INPUT](https://thepracticaldev.s3.amazonaws.com/i/fbxquniqq431ix5qzxo2.png)


![OUTPUT](https://thepracticaldev.s3.amazonaws.com/i/7q09urzur2lb5d97cd6b.png)


Visual Studio Code


  #include<stdio.h>// used to a Header file which contains all the I/o functions 
                 like printf,scanf
  int main() // used to Main function returns integer in int main
  {
      printf("hello every one"); //used to print the “character, string, float, 
                               integer, octal and hexadecimal values” onto the 
                               output screen. We use printf() function with %d 
                               format specifier to display the value of an 
                               integer variable.
      return 0; //used to return the value of the main function is considered the 
                "Exit Status" of the application. On most operating system 
                returning 0 is a success status like saying "The program worked        
                fine"
  }

![INPUT](https://thepracticaldev.s3.amazonaws.com/i/065n2l9jnngjjo6flu6y.png)


![OUTP](https://thepracticaldev.s3.amazonaws.com/i/zur2m57wxb9yiqw97yl6.png)
Implementation of ES6 Map() function
Tags: webdev, javascript, es6
Published: 2019-10-08 09:57:43

---
title: Implementation of ES6 Map() function
published: true
description: Implementation of ES6 Map() function
tags: webdev, Javascript, ES6
cover_image: https://thepracticaldev.s3.amazonaws.com/i/ihyd0vyk70usfwe3oyhl.png
---

```
//implementing map function

/* Implemetation */
const arrayMap = (arr, fn) => {
  const arrTemp = [];
  for (var i = 0; i < arr.length; i++) {
    arrTemp.push(fn(arr[i], i));
  }
  return arrTemp;
};

/* Usage */
// const arr = [1,2, 3];
// const iterator = each => each + 1;
const result = arrayMap(arr, iterator);
//console.log(result);

```
swagger definition for a http proxy integration on the AWS api gateway.
Tags: aws
Published: 2019-10-09 05:57:04

```
{
  "/{proxy+}": {
    "x-amazon-apigateway-any-method": {
      "produces": [
        "application/json"
      ],
      "parameters": [
        {
          "name": "proxy",
          "in": "path",
          "required": true,
          "type": "string"
        }
      ],
      "security": [],
      "responses": {},
      "x-amazon-apigateway-integration": {
        "responses": {
          "default": {
            "statusCode": "200"
          }
        },
        "requestParameters": {
          "integration.request.path.proxy": "method.request.path.proxy"
        },
        "uri": "http://endpoint-you-want-for-host-header.com/{proxy}",
        "httpMethod": "ANY",
        "passthroughBehavior": "when_no_match",
        "type": "http_proxy",
        "connectionType": "VPC_LINK",
        "connectionId": "$${stageVariables.vpcLinkId}"
      }
    }
  }
}
```
Hacktoberfest has been an unmitigated disaster for me thus far
Tags: hacktoberfest, help
Published: 2019-10-09 10:18:50

I've submitted a grand total of 1 pull request, and it has been sitting there idle since then. Furthermore, I have been so gosh-darn busy that I have yet to even attempt something else.

So much for that, I suppose... but there's another problem: I am not very good at finding projects I might like to contribute to, and if I knew how to use GitHub search to find them, I'd probably be in better shape than I am now.

Anyone have tips for operating GitHub's search engine?
Global event handling in Vue
Tags: vue, javascript, help
Published: 2019-10-09 17:05:38

Although not mutually exclusive to Vue I have certainly found myself in this situation before and always wondered how best to overcome it.

Conceptually you have a component that is concerned with itself and not much else but it gets a bit more complex when you introduce the dependency of window based events.

I have this cool component who has only one job, take in contents in a `<slot>` take a screenshot of the DOM and overlay that screenshot with a blury effect. The technique is akin to your phone's blury ui and is called compositing.

Now that's all well and good, but now we need to scroll or resize the window, updating the composite position or retaking the snapshot so that for example, the navbar looks blurry as it passes over DOM content and after resize a new snapshot takes its place.

Where do these event listeners live exactly? In the created lifecycle?
It seems un-vue-ish to use events in this way (yes it works) but what if I use this component twice? More event listeners?

Let me show you the code.

{% codepen https://codepen.io/acronamy/pen/RwwbOjv %}

Sooo, it's just one component but it certainly is able to apply the effect to other DOM elements so multiple usages is likely. Components talking to other components, sounds like vuex would work? But then again that's one dependency for another. What I need is a place to put my events that acts as a controller but not an entire state management paradigm.

I hope I am right let me know in the comments your thoughts.
Release 0.4 Progress
Published: 2021-12-02 21:25:06

So this week I continued to work on the issues I collected from the [previous planning week](https://dev.to/jli/release-04-planning-278n). I found that the progress of auditing and fixing the pages were a lot smoother than the first time I did it in my Release 0.3 assignment. I was able to have a better idea of what to look for and I was also able to reference the pull requests of what many of my classmates did for their audits. For example, in my first PR I didn't know how to make the Frontmatter for the markdown file, but I learned that from one of my reviews what it looked like.
```md
---
id: data-conversions
title: Data Conversions
sidebar_position: 3
slug: /resources-appendices/data-conversions
---
```
That made creating the Frontmatter much easier this time because I knew what I was doing and I also could double check with the other audited pages in the chapter to see if the slug was correct.

Another thing I didn't have to audit in my 0.3 PR was markdown tables and code blocks. The computers.md file that I audited in 0.3 did not have any tables or code so I never had to audit them. However, one of the PRs I reviewed before did have both so I was able to reference the fixes they made to also make similar checks for my pages.

The final significant change I had to fix were quoteblocks that used `>`. I had to change these to Admonitions, originally I did not really know what these were. However, from [PR #84](https://github.com/Seneca-ICTOER/IPC144/pull/84) I learned how make Admonitions in markdown:
```md
:::note
Notice how the newline character (`'\n'`) (which was assigned to the tax **status** variable) places the closing parenthesis on a newline.
:::
```
So far I have accomplished my goal for this week and was able to complete the three issues I wanted to complete for this week. Now I just need to wait for those to get reviewed and make any fixes that my reviewers find. Hopefully I managed to do a better job this time and have less mistakes that I missed, if so then that's my other personal goal achieved. While waiting for that I will continue to work on my [final issue](https://github.com/Seneca-ICTOER/IPC144/issues/127), so until next time take care!
How to implement Sign-In With Google with ReactJS
Tags: authentication, google, javascript, react
Published: 2019-07-24 22:58:15

---
title: How to implement Sign-In With Google with ReactJS
published: true
date: 2019-07-24 22:58:15 UTC
tags: authentication,google,javascript,react
canonical_url: https://medium.com/@harittweets/how-to-implement-sign-in-with-google-with-reactjs-9cf8ab4b0c6f
---

A minimal example without any external dependencies
Every developer at some point in time has to connect with Google. This is because many users trust Google to keep their username and passwords than creating a new username/password combination for each website.
This is safe and also lowers the resistance from the users to use any new app. Recently, we have been prototyping a minimal example of how to implement “Sign In With Google” using ReactJS. 

Using third-party dependencies is good, but unless a developer understands how something is developed, he/she misses an opportunity to learn and potentially customize the behavior when needed.



[Continue reading on Medium »](https://medium.com/@harittweets/how-to-implement-sign-in-with-google-with-reactjs-9cf8ab4b0c6f?source=rss-60f7c391668f------2)
Double splat arguments in Crystal
Tags: crystal, ruby
Published: 2019-10-10 08:48:27

In Crystal, as well as in Ruby you can use double splat arguments. Unfortunately they behave a bit different.

``` ruby
def foo(**options)
  baz(**options, a: 1)
end

def baz(**options)
  puts options
end

foo(b: 2, a: 3) # {:b=>2, :a=>1} 
```

This code in Ruby works as it should. If we try the same in Crystal ([https://play.crystal-lang.org/#/r/7r0l](https://play.crystal-lang.org/#/r/7r0l)), we got an error:

```
error in line 2
Error: duplicate key: a
```

This happens because `**options` is a `NamedTuple` and it cannot have duplicate keys. I found that using `NamedTuple#merge` can be a workaround ([https://play.crystal-lang.org/#/r/7s1c](https://play.crystal-lang.org/#/r/7s1c)):

``` ruby
def foo(**options)
  baz(**options.merge(a: 1))
end

def baz(**options)
  puts options
end


foo(b: 2, a: 3) # {:b=>2, :a=>1} 
```

Hack!
Creating Database Objects

Tags: oracle, tutorial, database
Published: 2019-10-10 09:40:27

This tutorial describes how to create tables, stored procedures and other objects on Oracle server.

##Requirements##

In order to create database objects, you have to connect to the server. This process is described in detail in the tutorial [Logging onto the server](https://www.devart.com/dotconnect/oracle/articles/tutorial-connection.html).

##General information##

Database objects are created using Data Definition Language (DDL), which is a part of SQL. The DDL statements can be executed on the server by an account that has the necessary privileges.

There are two ways to manipulate a database. You can build DDL statements manually and run them within Oracle SQL*Plus or a component like OracleCommand. Another way is to use IDE - visual shells that provide a graphical user interface to manage the database. We will discuss both ways.

Read the full article [here](https://www.devart.com/dotconnect/oracle/articles/tutorial-create-objects.html)
How can I make this draggable. Cut and paste and save as ttf
Published: 2019-10-10 15:13:11

<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="htc-icon htc-icon--verified"> 
 <path style="fill: #1DA1F2" opacity="0" d="M0 0h24v24H0z"></path> 
 <path style="fill: #1DA1F2" d="M22.5 12.5c0-1.58-.875-2.95-2.148-3.6.154-.435.238-.905.238-1.4 0-2.21-1.71-3.998-3.818-3.998-.47 0-.92.084-1.336.25C14.818 2.415 13.51 1.5 12 1.5c-1.51 0-2.816.917-3.437 2.25-.415-.165-.866-.25-1.336-.25-2.11 0-3.818 1.79-3.818 4 0 .494.083.964.237 1.4-1.272.65-2.147 2.018-2.147 3.6 0 1.495.782 2.798 1.942 3.486-.02.17-.032.34-.032.514 0 2.21 1.708 4 3.818 4 .47 0 .92-.086 1.335-.25.62 1.334 1.926 2.25 3.437 2.25 1.512 0 2.818-.916 3.437-2.25.415.163.865.248 1.336.248 2.11 0 3.818-1.79 3.818-4 0-.174-.012-.344-.033-.513 1.158-.687 1.943-1.99 1.943-3.484zm-6.616-3.334l-4.334 6.5c-.145.217-.382.334-.625.334-.143 0-.288-.04-.416-.126l-.115-.094-2.415-2.415c-.293-.293-.293-.768 0-1.06s.768-.294 1.06 0l1.77 1.767 3.825-5.74c.23-.345.696-.436 1.04-.207.346.23.44.696.21 1.04z"></path> 
</svg>