teleren/devto huggingface dataset:
Bulk Insert in Dapper into MS SQL
Tags: csharp, sql
Published: 2019-11-07 16:36:06

I am collecting costs by employee from 6 sources and then insert them into a a GeneratedDetail table. But the collected data has 1000+ rows, and the insertion one by one row is very slow. I needed to find a bulk insert solution.

I am using Dapper as ORM in my C# project, and MS SQL Database.
According to research, my approach would be as below. It works now quite fast, I am satisfied with the speed of execution. Feel free to comment and propose a better solution.
note: spGeneratedDetailInsert  is a stored procedure with many parameters.

        public  void GeneratedDetailInsertBulk1(List<GeneratedDetail> DetailList)
        {
            using (IDbConnection connection = new System.Data.SqlClient.SqlConnection(connectionString))
            {
                var sql = "";           
                foreach (var mydet in DetailList)
                {               
                    sql = sql + "Exec spGeneratedDetailInsert '" + mydet.BillingCode + "', " +
                        mydet.Emp_id + ", '" +
                        mydet.Emp_name + "', " +
                        mydet.HrId + ", " +
                        mydet.Entity_id + ", " +
                        mydet.BU_id + ", '" +
                        mydet.Currency + "', '" +
                        mydet.Item + "', " +
                        mydet.ExchangeRate + ", " +
                        mydet.InitValueRON + ", " +
                        mydet.InitValueCurr + ", " +
                        mydet.MUValueCurr + ", " +
                        mydet.TotalRon + ", '" +
                        mydet.ServiceType + "', '" +
                        mydet.CostCategory + "', '" +
                        mydet.UpdatedBy + "', '" +
                        mydet.UpdatedAt + "', '" +
                        mydet.PeriodId + "' ; ";                                   
                }
                 connection.Execute(sql);
            }
        }
Note: I am not using Dapper Plus, and I don't want to.
Wat kun je met Golang? (Dutch)
Tags: go, dutch, nederlands
Published: 2019-11-07 16:12:03

Nieuw met <a href="https://golang.org/">Golang</a>? Je kunt veel dingen doen met Golang. Het groeit in populariteit.

Wat voor soort dingen? Ze omvatten

* Het bouwen van web apps en statische sites
* Gedistribueerde apps
* Bijna alles wat je kunt doen met Python, PHP en Java
* Web scrapen
* Server ontwikkeling (JSON API, Chat systeem, Web server)

<img src="https://duckduckgo.com/i/77cac527.png">

## Alles?

Dus een heleboel dingen. Golang is een algemene programmeertaal, dus je kunt het gebruiken voor wat je maar wilt.

Dat gezegd hebbende, sommige aspecten ervan hebben de manier waarop ze zijn gestandaardiseerd voor PHP (Laravel) of Python (Django/Flask) nog niet gestandaardiseerd.

Zolang je geen harde real-time mogelijkheden nodig hebt, is alles mogelijk. Dat betekent, gebruik Go niet als real-time een hardcore vereiste is (kerncentrales).

Sommige dingen kunnen net iets anders werken dan in andere talen, maar laat dat je niet tegenhouden. Go!

**Related links:**
* <a href="https://golang.org/">Go programming language</a>
* <a href="https://golangr.com/">Learn Go programming (tutorial)</a>
What can I do with Golang
Tags: go
Published: 2019-11-07 16:04:38

New to <a href="https://golang.org/">Golang</a>? You can do many things with Golang. It's growing in popularity.

What kind of things? They include

* Building web apps and static sites
* Write distributed apps
* Almost everything you can do with Python, PHP and Java
* Web scraping
* Server development (JSON API, Chat system, Web server)

You’ll be in good hands!

<img src="https://duckduckgo.com/i/77cac527.png">

## Everything?

So a lot of things. Golang is a general purpose programming language, so you can use it for whatever you want.

That being said, some aspects of it have not yet standardized the way they have for PHP (Laravel) or Python (Django/Flask).

As long as you don’t need hard real-time capabilities, everything possible. That means, don't use Go when real-time is a hardcore requirement (nuclear power plants).

Some things may work just a bit different than in other languages, but don't let that stop you. Go!

**Related links:**
* <a href="https://golang.org/">Go programming language</a>
* <a href="https://golangr.com/">Learn Go programming (tutorial)</a>
Ruby on Rails in 2020? (Dutch)
Tags: ruby, rails, dutch, nederlands
Published: 2019-11-07 15:49:20

U kunt zich afvragen of het de moeite waard is om <a href="https://rubyonrails.org/">Ruby on Rails</a> te leren in 2020. In deze post proberen we daar een antwoord op te geven.

De taalpopulariteit (<a href="https://www.ruby-lang.org/en/">Ruby</a>) zelf neemt af, maar het gaat niet snel dood door de legacy code.

Voor de komende 2-5 jaar denk ik dat het een goede investering is van je tijd om het te leren. Natuurlijk, geen enkele taal blijft voor altijd populair (zie Cobol, Fortran, Pascal).

<img src="https://cdn.pixabay.com/photo/2017/08/10/08/47/code-2620118_960_720.jpg">" >

### Ruby on Rails 

Wanneer je Ruby leert, wil je het Rails framework leren. Het Rails framework is ontworpen voor het bouwen van websites en applicaties. Het is vergelijkbaar met Django (Python) of Zend Framework (PHP).

Als je Linux gebruikt, wil je misschien je Ruby versie updaten, omdat de versie vaak niet up-to-date is.

````ruby
    $ robijnrode -v
    robijn 2.5.0
```

Dus ja, het is de moeite waard om nu te leren (<a href="https://ruby-lang.co/">Ruby tutorial</a>). Bovendien zul je waarschijnlijk andere vaardigheden (SQL-databases, Javascript) onder de knie krijgen, die zeker nog lang zullen blijven bestaan. 

## Hoe zit het met JavaScript?

Sommigen zeggen dat de toekomst JavaScript is, apps "verhuizen" naar het web en er is tegenwoordig ook server-side JavaScript. Dingen zoals NodeJS, React, Vue.js en vrienden zijn dingen die je tegenwoordig vaak ziet.

Hoe dan ook, de conceptuele vaardigheden blijven hetzelfde en Ruby is hier om een tijdje bij ons te blijven. Ruby is een geweldige taal om mee te beginnen in de wereld van het programmeren.

**Related links:**
* <a href="https://rubyonrails.org/">Ruby on Rails</a>
* <a href="https://www.ruby-lang.org/en/">Download Ruby</a>
* <a href="https://ruby-lang.co/">Ruby tutorial</a>
Delete record from the database with where condition using python
Tags: mysql
Published: 2019-11-07 15:46:13

DELETE keyword is used to delete the records from the table.

DELETE FROM table_name WHERE condition statement is used to delete records. If you don’t specify the condition, then all of the records will be deleted.

Let’s delete a record from the user table with named Siddharth.

Read More: https://realprogrammer.in/delete-record-from-the-database-with-where-condition-using-python/

Youtube: https://www.youtube.com/watch?v=DsgASHho0X8
Is Ruby on Rails popular to learn for 2020?
Tags: rails, ruby, webdev
Published: 2019-11-07 15:42:37

You may wonder if it's worth learning <a href="https://rubyonrails.org/">Ruby on Rails</a> in 2020. In this post we'll seek to answer that.

The language popularity (<a href="https://www.ruby-lang.org/en/">Ruby</a>) itself is declining, but it's not going to die soon because of legacy code.

For the next 2-5 years, I think it's a good investment of your time to learn it. Of course, no language stays popular forever (see Cobol, Fortran, Pascal)

<img src="https://cdn.pixabay.com/photo/2017/08/10/08/47/code-2620118_960_720.jpg">

## All aboard the Ruby on Rails

When learning Ruby, you want to learn the Rails framework. The Rails framework is designed for building websites and applications. It's similar to Django (Python) or Zend Framework (PHP).

If you are on Linux, you may want to update your Ruby version, because the version is often not up-to-date.

```ruby
    $ ruby -v
    ruby 2.5.0
```

So yes, it's worth learning for now (<a href="https://ruby-lang.co/">Ruby tutorial</a>). On top of that you'll likely master other skills (SQL databases, Javascript) which will for sure stick around for a long time. 

## What about JavaScript?

Some say the future is JavaScript, apps are moving into the web and there's server side JavaScript these days. Things like NodeJS, React, Vue.js and friends are things you see often these days.

Eitherway, the conceptual skills remain the same and Ruby is here to stay with us for a while. Ruby is a great language to get started in the world of programming.


**Related links:**
* <a href="https://rubyonrails.org/">Ruby on Rails</a>
* <a href="https://www.ruby-lang.org/en/">Download Ruby</a>
* <a href="https://ruby-lang.co/">Ruby tutorial</a>
Preparing for Coding Interview using InterviewBit with C++ (DAY - 1) (STL lessons)
Tags: cpp, codinginterview, interviewbit, stl
Published: 2019-11-07 15:30:05

---
title: Preparing for Coding Interview using InterviewBit with C++ (DAY - 1) (STL lessons)
published: true
description: A journal for my preparation of coding interviews.
tags: CPP, coding_interview, interviewBit, STL
series: Preparing for Coding Interview using InterviewBit with C++
---

Today's topic: STL
Repo: https://github.com/Himujjal/interviewbit
YouTube Link: [CodesBay STL](https://www.youtube.com/playlist?list=PL_dsdStdDXbq8BTjGdUEWgWYFWYP6pwYb)
Pre-requisites: Basic Knowledge of C++

Coding interviews are boring it seems. Specially for developers like me who love to create instead of solving puzzles.

To grow as a developer algorithms and data structures seem to be an important part of the journey plus the benefits of the better jobs it provides thanks to the poor judgement of candidates by HRs and Tech Companies.

I started this journey today using a primer of STL using this fantastic short tutorial by CodeBay from YouTube ([CodesBay STL](https://www.youtube.com/playlist?list=PL_dsdStdDXbq8BTjGdUEWgWYFWYP6pwYb)). Go check it out.

Today I did my lessons for around 3 hours. The topics which I covered are:

1. Vectors, List and Algorithm
2. Map, Multimaps
3. Erase, Remove
4. Sets, Multisets
5. Comparators
6. Queues, Stacks & Priority Queues.

You can find the code for today's lesson on [00 - STL](https://github.com/Himujjal/interviewbit/tree/master/00_stl)

Do check it out. Its fairly simple.

P.S. To run the exercises, install NodeJS and MinGW (for windows). Then install **Nodemon** using `npm i -g nodemon`. In the folder that contains `nodemon.json`, simply run `nodemon`. This will make your code run in a **watch** mode. Which means your code generates itself automatically once you save.
A free GitHub Universe 2019 ticket to you!
Tags: githubuniverse2019, conference, github
Published: 2019-11-07 15:18:42

---
title: A free GitHub Universe 2019 ticket to you!
published: true
description: 
tags: GitHub Universe 2019, Conference, GitHub
---

I got a free ticket for [GitHub Universe 2019](https://githubuniverse.com/), but I am not in San Francisco.

So if you want to go to this Conference, send a message to me. I will send it to you.

Wish you can study more knowledge.

**Please make sure you will attend**
Are we too gullible?
Tags: discuss, career, watercooler
Published: 2019-11-07 15:18:16

---
title: Are we too gullible?
published: true
description: From imposter syndrome to the idea that we should never use tables to the One True Framework war software engineers seem to not be the rational group that they claim to be.
tags: discuss, career, watercooler 
---

Software engineers are often great people that I count as friends. They can be smart, witty, knowledgeable, and wise.

Then there's their downsides.

They engage in a variety of questionable behaviors ranging from condescension to bandwagonning. 

They also believe in, repeat, and argue poorly researched or even just plain wrong myths:

* Never use the table tag

* [The "Cone of Uncertainty"](https://leanpub.com/leprechauns/read#leanpub-auto-chapter-2-the-cone-of-uncertainty)

* React (or Vue, or Angular, or something else) is best and everything else sucks

* TDD is the only way / TDD is dead

Why is that? How does a group of supposedly rational people with a science background constantly engage in so much bias?
Daily Challenge #110 - Love VS. Friendship
Tags: challenge
Published: 2019-11-07 15:01:18

---
title: Daily Challenge #110 - Love VS. Friendship
published: true
series: Daily Challenge
description: Which is strongest?
tags: challenge
---
If　`a = 1, b = 2, c = 3 ... z = 26`

Then `l + o + v + e = 54`

and `f + r + i + e + n + d + s + h + i + p = 108`

So friendship is twice as strong as love :-)

Write a function to find the "strength" of each of these values. 

Test cases: 
`wordsToMarks(attitude)
wordsToMarks(friends)
wordsToMarks(family)
wordsToMarks(selflessness)
wordsToMarks(knowledge)`

Good luck!
***
_This challenge comes from J or nor J on CodeWars. Thank you to [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
ASP.NET MVC Developer
Published: 2019-11-07 14:53:07

Hello everyone,
Let me first start by saying I am new to this site and was recommended by someone to join.  2nd thing is I am a Sr. Talent Acquisition Specialist with Day & Zimmermann in Philadelphia so not from a 3rd party.

Reason I am saying this is we have been looking to hire an ASP.NET MVC Developer for a little while now.  Must at least have an EAD card because we are not looking to sponsor anyone.

Outside of ASP.NET MVC if someone has Angular experience that is a big plus.

Does anyone have any recommendations??

Thank you again,
Steve Meehan
How to Tame a Roaming Footer
Tags: tutorial, css, design
Published: 2019-11-07 14:52:06

Don't you hate it when you don't have enough content on a web page and the footer just hangs there. Directly under said content. Half way up the screen - nowhere near the bottom.

Here is a quick and simple way of making sure the footer sticks to the bottom of the screen when there isn't enough content to push it down there.

```html
<div class="super-container">
    <div class="navbar"></div>
    <div class="content"></div>
    <div class="footer"></div>
</div>
```

```css
.super-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content {
    flex-grow: 1
}
```

You can put all the css from the `.super-container` into the body if you don't want the extra div.

So this will make your content section grow to push the footer to the bottom on the screen nicely. And if the content goes past the fold, it will all work as usual.
What is PropTypes and how to use it in React
Tags: react, proptypes, javascript
Published: 2019-11-07 14:26:57

---
title: What is PropTypes and how to use it in React
published: true
description: PropTypes makes sure the props objects pass the correct types to a component
tags: reactjs, PropTypes, javascript
cover_image: https://ferrariwebdevelopment.s3.us-east-2.amazonaws.com/assets/20190927-prop-types1.jpeg
---

## PropTypes makes sure the props objects pass the correct types to a component

Javascript is not a strongly typed language. Javascript functions are happy to accept data of different types than what we expected when we declared the function.
For example, we can pass a number to a function that expects a string. What Javascript will do is try to convert the number into a string and go on to the next operation.

This may be what we want, but it may also lead to bugs and errors in the code when the operations performed on a piece of data are not what we thought we were doing because the data passed in is of a different type.

`PropTypes` is a library that helps in minimizing this problem in React by checking the types passed in the props object against a specification we set beforehand and to raise a warning if the types passed don't match the types expected.
To use `PropTypes` we need to install the library with this command:

```
npm install --save prop-types
```

Then we import the library at the top of the component where we want to use it, like so:

```js
import PropTypes from 'prop-types';
```

Next, we call the `propTypes` property on our component and pass it an object that specifies the `props` object expected types.

For example, we may have a `Pokemons` component that is passed an array of `pokemons` objects. Since we know that `pokemons` must be an array, we can use `PropTypes` to enforce this type.
At the bottom of our component file, we add this code:

```js
Pokemons.propTypes = {
  pokemons: PropTypes.array
}
```

Now if we passed `pokemons` as a different type, a `string` or an `object` for example, we would get a warning in the Javascript console in our browser.
To learn more about `PropTypes` you can check out the documentation here: [Typechecking With PropTypes](https://reactjs.org/docs/typechecking-with-proptypes.html).
What do you want to learn about advanced JavaScript and design patterns ?
Tags: design, javascript, architecture
Published: 2019-11-07 14:16:09

Hi there !

I'm preparing a talk and I thought it would be a great idea to ask the community about it, I want to talk (And will probably write an article on this as well) about advanced JavaScript and/or design patterns.

So tell me, what do you want to learn ? Are you curious about a thing in particular ?


Thank you for your help ! <3
6 TOP Benefits of Blogging for Your Business
Published: 2019-11-07 14:03:07

20 years ago, blogs didn’t exist. Today, there are over 150 million of them.  Does it mean something to you? 

A blog has so many advantages that today I’ve decided to create a separate article about them!

**Blogging is a real ability to write and maintain a blog (using the necessary online tools)**. A blog provides an opportunity to highlight various issues so that everyone who needs to read it will read it. And the comments on the blog made it a cool means of communication on the network, almost like communicating on social networks.

I am Weblium’s SEO specialist, and today I have compiled these 6 TOP benefits of blogging for you. All of them have been thoroughly tested – after all, we every day get these benefits from having the Weblium blog!

Read full article: [Benefits of Blogging for Your Business](https://weblium.com/blog/6-top-benefits-of-blogging-for-your-business/)
How Long Does it Take to Build a Website
Published: 2019-11-07 13:59:37

**How long does it take to build a website?** Too long, if you are in a hurry: at least 4-6 weeks if it is a small 10- or 15-page site. A time frame depends on the structure, CMS system, design, niche, contractors, procedures, etc. I started to look for an alternative solution with a minimum effort and time required for launching.

Actually, it takes from one day to three months to create a website. It is not necessary to start from scratch. If you need a landing page, it is more efficient to use WordPress (1-2 days) or site builders (1 hour if the content is ready). I tried both options for my copywriter CV, and a website builder turned out to be more convenient. Even with zero knowledge in IT, you can create a small website in a day (if you have content to fill the pages with) and easily edit content and structure in the future.

It all started with the research and resulted in the “expectation/reality” situation, or rather “web development vs. website builders.” I will focus on using the latter because of my personal positive experience.
[Read more](https://weblium.com/blog/how-long-does-it-take-to-build-a-website/)
Bash Functions for Miniconda
Tags: bash, productivity, python, conda
Published: 2019-11-07 13:50:11

**Qualifier:** These instructions were made with Ubuntu 18.04 in mind. *Your mileage may vary.*

A little under 2 years ago a friend introduced me to [miniconda](https://docs.conda.io/en/latest/miniconda.html) and I've loved it ever since. I know there's other ways manage python virtual environments (I use  [pipenv](https://github.com/pypa/pipenv) at work and there's always [venv](https://docs.python.org/3/tutorial/venv.html),) but I've stuck with miniconda in my personal projects out of habit. If you use miniconda on Ubuntu, hopefully you'll find this helpful.

## Short & Sweet

Add the following functions to your `~/.bashrc` file. Don't forget to reload your `.bashrc` before using them! (Reload via `source .bashrc`)

### newconda

*Creates a new python conda environment and installs the listed modules.*

**NOTE:** *This function doesn't ask for confirmation!* This is personal preference, but if you'd like to change it remove the `y` in `-yn` (E.g. `conda create -n "$1" python="$2"`

```bash
# Creates a new python conda environment and installs the listed modules.
# $1 : Environment Name (E.g. test_env)
# $2 : Python Version (E.g. 3)
# $3...$n+1 : A list of modules to install.
# 
# E.g.
#       newconda test_env 3 numpy pandas
#       newconda test_env 3.6 tensorflow tensorflow-hub tensorflow-datasets
newconda() {

        # Create the env with the given name and python version.
        # Note: -y forces yes, you won't be asked for confirmation.
        conda create -yn "$1" python="$2"

        # Activate the environment.
        conda activate "$1"

        # Loop through the remaining arguments, installing them as python modules.
        for i in "${@:3}"
                do pip install "$i"
        done
}

```

___

### remconda

*Removes the listed conda environment.*

**NOTE:** *This function doesn't ask for confirmation!* This is personal preference, but if you'd like to change it remove the `y` in `-yn` (E.g. `conda env remove -n "$1"`)

```bash
# Removes the listed conda environment.
# $1 : The name of the environment to remove.
#
# E.g. 
#       remconda test_env
remconda() {
        # Deactivate the current environment.
        # (In case you're in the target environment.)
        conda deactivate

        # Remove the environment.
        # Note: -y forces yes, you won't be asked for confirmation.
        conda env remove -yn "$1"
}

```
How will we store data 100 years from now?
Tags: watercooler
Published: 2019-11-07 13:38:25

I'm trying to steer myself into a season of reading (film is my favorite medium right now), so I grabbed a copy of Sapiens per Bill Gates's recommendation. The chapter I'm on just described how we moved from storing data in our brains into various writing systems. What's new in the world of data storage? Where do you think we will be 100 years from now?
SimpleWeb
Tags: webdev, sideprojects, design
Published: 2019-11-07 12:51:31

You can view the site here: https://simplewebs.netlify.com/

I have been working on SimpleWeb, and I am proud to announce that SimpleWeb will be released very soon.

Description:
Are you sick of having frameworks?
SimpleWeb provides you with a huge list of elements, that are created with just simple and plain HTML, CSS, and JavaScript.
🌈 Traveling to Full Frontal Conf🏳️‍🌈
Tags: javascript
Published: 2019-11-07 12:15:44

Im off once more to sunny *ahem* Brighton to Full Frontal Conference. If anyone else is coming come and visit the culturally diverse Dyson team (1 Backend, 1 Frontend and 1 Fullstack)! Hope to see you there!