teleren/devto huggingface dataset:
Installing SQL Server for Docker
Tags: docker, sql
Published: 2019-05-31 06:24:11

---
title: Installing SQL Server for Docker
published: true
tags: [docker, sql]
canonical_url: https://www.prestonlamb.com/blog/sql-server-docker
---

SQL Server is a powerful database option to use, but up until recently it's not been possible to use it unless you were on a Windows machine. Well, that's changed (along with many other Microsoft products). This week at work I decided to finally jump in and get SQL Server running on my Mac using Docker. Here's a quick recap of how I did this.

There were three pages that I used to get up and running. The first was on [Docker Hub](https://hub.docker.com/r/microsoft/mssql-server-linux/), on the image information page. Just follow the simple instructions there and you'll get the image pulled and the container running.

Now, if you don't need to backup an existing database to your instance, you're all set! Connect to the database with [VS Code and the mssql extension](https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-develop-use-vscode), or any other database management application that runs on Mac and connects to SQL Server. In my case, though, I needed to restore a database that we were using for work so that I had that data locally. The next two steps were needed for that.

As I searched for instructions on how to do this, I came across [this answer on Stack Overflow](https://stackoverflow.com/questions/41716988/restore-sql-server-database-to-linux-docker#answer-42639458). I personally didn't use step 3 in his answer because I was connected to the database using VS Code and mssql. Basically his answer has you get the ID of the container, copy the backup file from your computer into the container, and then runs a `RESTORE DATABASE FROM FILE` command in SQL Server.

For me, this wasn't quite enough to get me home, though. I hade an error where the database said it couldn't find the MDF and LDF files referenced in the backup. That's where [this blog post](https://www.raditha.com/blog/archives/restoring-a-database-on-ms-sql-server-for-linux-docker/) helped out. The post says to just specify where the new MDF and LDF files should be inside the container. It was simple, and worked right away.

In the end, here's the full command I ran:

```sql
RESTORE DATABASE [MyDatabase]
FROM DISK = N'/var/opt/mssql/backup.bak'
WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 5,
MOVE 'MyDatabase' TO '/var/opt/mssql/data/MyDatabase.mdf',
MOVE 'MyDatabase_log' TO '/var/opt/mssql/data/MyDatabase_log.ldf'
```

Again, all in all, this was an easy project to get up and running. It took a while to find the right resources, which is why I decided to put them all together in one spot, but going forward it should take no more than 20-30 minutes to get SQL Server up and running on Mac or Linux using Docker.
Explain Inversion of Control like I'm five
Tags: discuss, explainlikeimfive, ioc
Published: 2017-10-03 04:48:04

---
title: Explain Inversion of Control like I'm five
published: true
description: Explain like I'm five
tags: discussion, explainlikeiamfive,ioc
---
I always find it difficult to understand the topic of inversion of control. Can anyone here explain it in simple terms?
Learn to say no!
Tags: discuss, business
Published: 2017-10-03 04:08:20

---
title: Learn to say no!
published: true
description: 
tags: discussion, business
---

Sometimes, being a developer, your job consists of just saying no. No to a feature, a client or your boss requested, no to a new project or no to a developer who is applying for a job.

For me writing code is easy. Sometimes I need to sleep over a problem, but usually I find a solution to a problem quite fast. But dealing with people is a hard thing to do. You have sometimes to do hard decisions.

I just want to give you some examples, where saying no saved my ass in the last two years and where saying no would have been a better approach.

Telling a to unexperienced developer that, he is still not ready is hard. Specially, when it's hard to find new people anyway. It took me a lot of time to find another co-worker, now I have someone, who wrote productive code after just after two weeks in the new job.

My boss asked me to not focus so much on the admin-interface of the online-shop. I refused to do a sloppy job. Now I have something, were I can tell everybody in the company to dispatch the orders with just a two minutes introduction on what they have to do.

My other boss asked me to change the color-schema of an online-shop to "anthracite". On a screen there is not such color. It would have slowed down the render-times, if I used images. So I refused to do so and customers are satisfied with the look and render-times.

A thing I did not clearly refused was to do a project with someone for a hourly monetary compensation. I told my boss, that this would just lead to a lot of emails which requests to change a lot of "small things". Always accompanied by the word "just". Here I instantly regretted not to stayed firm in my position to refuse to do this project for a fix price.

Especially when you are in an environment where you have to deal with non-technical-staff and employers, your role should be more than, "the one who just codes". You have technical insides and experiences, that maybe no-one else has. Use it for good.

What have been your experiences? What have been your success-stories and biggest fails?
Adminer! A useful and very simple alternative to PhpMyAdmin
Tags: php, phpmyadmin, webdev
Published: 2017-10-02 23:01:39

---
title: Adminer! A useful and very simple alternative to PhpMyAdmin
published: true
description: Replace phpMyAdmin with Adminer and you will get a tidier user interface, better support for MySQL features, higher performance and more security
tags: php, phpmyadmin, webdev
cover_image: https://thepracticaldev.s3.amazonaws.com/i/evgrdl765yve2lzcphto.jpg
---

I had some... issues with phpmyadmin. This was a good oportunity to look for an alternative. After trying out some options, luckily I found the [Adminer](https://www.adminer.org/). 

Adminer is an efficient database manager tool that promises better user experience, support to Mysql features, performance and security than PhpMyAdmin.

In fact, there is a section on website explaining why you should replace right now! https://www.adminer.org/en/phpmyadmin/

##How it works!?

This is as simple as possible. Just download a single php file and put into  your document root folder and access! After the authentication, you can manage your databases.

That's it! No annoying configurations.

![Adminer.css design](https://thepracticaldev.s3.amazonaws.com/i/1ehsdvjeu7amcv7wcqbp.png)

TIP:

The default design is not exactly beautiful. So, you can download an adminer.css file from the website - after choose your prefered option - and put it next to your adminer.php file to see the magic!

Enjoy! XD
How to link html file and css file from my computer    
Tags: linkhtmlfilecssfile
Published: 2017-10-02 17:15:52

---
title: How to link html file and css file from my computer    
published: true
tags: link html file css file
---

I d like to link html file and css file from my computer without do it through any website . Just to see html frame styled with css . How is possible to do that ? 

which link do I have to use therefore ? 

link type="text/css" rel="stylesheet" href="stylesheet.css"
link type="text/css" rel="stylesheet" href="../../stylesheet.css"
link type="text/css" rel="stylesheet" href="directory/filename.css"
link type="text/css" rel="stylesheet" href="C:/users/documents/username/web/stylesheet.css" 
thanks all 
Sam
Where to begin for writing a mobile payment API for my country (and countryside)
Tags: mobilebanking, javascript, php, java
Published: 2017-10-02 15:19:06

---
title: Where to begin for writing a mobile payment API for my country (and countryside)
published: true
description: 
tags:  mobile banking, javascript, php, java
---

My wish is to build a mobile payment API that would help everyone to pay online no matter what carrier is subscribed to. I'd like to know where to begin ? Give me some issues / advices / tips where I can start searching for what to code.
https://thepracticaldev.s3.amazonaws.com/i/kdeplk34mbrbxx3v2w7n.png
The 7 Most Popular DEV Posts from the Past Week
Tags: top7
Published: 2017-10-02 13:12:25

---
title: The 7 Most Popular DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week.
tags: icymi
cover_image: https://thepracticaldev.s3.amazonaws.com/i/xsr1z6iqv0pd7p3s6ns3.png
---

#1. From lurking to launching
[Lynne](https://dev.to/lynnetye), a first-time founder, shares the story of launching her first product. We learn about everything - from her ideation process to preparing the release to how she feels now. 

{% link https://dev.to/lynnetye/how-i-stopped-procrastinating-learned-to-code-and-launched-my-first-product-2i1 %}

#2. Wanna ask me about meeting up?
We did an AMA with [Yvette](https://dev.to/yvette), the CTO of Meetup!

{% link https://dev.to/yvette/im-the-cto-of-meetup-ask-me-anything-8fp %}

#3. That npm Life

A community-sourced list of npm packages.

{% link https://dev.to/ben/what-are-some-useful-npm-packages-i-might-not-know-about-55i %}

#4. What exactly _is_ node.js?

ðŸ¤”ðŸ¤”ðŸ¤”ðŸ¤”ðŸ¤”

{% link https://dev.to/neuron/explain-nodejs-to-me-like-im-five-bhm %}

#5. And if you're not into javascript...

{% link https://dev.to/damcosset/i-promise-i-wont-callback-anymore-cp3 %}

#6. Here's a useful primer

Hand-picked and ready-to-go, new features in ES6. 

{% link https://dev.to/srebalaji/es6-for-beginners-with-example-c7 %}

#7. Save time, write tests

[Stojan](https://dev.to/s_anastasov) shares his journey of writing his first unit test. 

{% link https://dev.to/s_anastasov/my-first-unit-test-c44 %}



_That's it for our weekly wrap up! Keep an eye on dev.to this week for daily content and discussions...and if you miss anything, we'll be sure to recap it next Monday!_
What are you working on for Open Source?
Tags: discuss, opensource, career
Published: 2017-10-02 12:53:44

---
title: What are you working on for Open Source?
published: true
description: A discussion thread about the fun projects you are working on. Share any projects you know could use some TLC from people who want to find a place to contribute to.
tags: discuss, opensource, career
---

Howdy there! Since yesterday started [Hacktoberfest](https://hacktoberfest.digitalocean.com/) over at GitHub, I was wondering what everyone was going to get themselves involved with. Though this is an annual event hosted by one company, I'd love to hear how you make yourself involved in open source.

Share any tips or tricks for people at any level. Even share a project that could use some love for the month of October.
What does it take to be a senior developer?
Tags: discuss, question
Published: 2017-10-02 03:20:41

---
title: What does it take to be a senior developer?
published: true
description: Nowadays,some people think that because they have been doing a programing language for 2-4 years, they can be considered as Senior developer.But really defines a Senior developer? What is the perfect profile? in fact, What is a senior developer? 
tags: #discuss #question
---
The Sonic 3D Blast "Level Select Hack" is so brilliant
Tags: gamedev, hacks
Published: 2017-10-02 00:56:29

---
title: The Sonic 3D Blast "Level Select Hack" is so brilliant
published: true
description: I'm not a game developer, but I can already think of ways I could implement this type of hack in my own code. Hopefully I won't have to though.
tags: gamedev, hacks
---

This a video featuring the developer behind the game [Sonic 3D Blast](https://en.wikipedia.org/wiki/Sonic_3D_Blast). I had never heard of this "secret", but about 25 seconds into the video, I knew exactly what was going on, and it is brilliant. I suspect other developers will have the same "aha moment" when he starts describing what's going on. And if you are newer to software development, this is a classic example of what it takes to ship software sometimes.

{% youtube i9bkKw32dGw %}

I'm not a game developer, but I can already think of ways I could implement this type of hack in my own code. Hopefully I won't have to though.
Explain server side rendering like I'm five. Why client side frameworks are there if they need/use server rendering?
Tags: discuss, explainlikeimfive, serversiderendering
Published: 2017-10-01 16:43:19

---
title: Explain server side rendering like I'm five. Why client side frameworks are there if they need/use server rendering?
description: What is server side rendering? Why do we need client side frameworks when even they make use of server side rendering?
published: true
tags: discuss, explainlikeimfive, server-side-rendering
---
App Screen 2
Tags: node
Published: 2017-08-04 02:57:55

---
title: App Screen 2
published: true
description: Dashboard screen of web app build during an internship at Hasura
tags: nodejs
---

## Dashboard Page

As I progressed further my next app screen was a dashboard page. Well, here the user can see the snippets he submitted including the private one. The user can update his profile. But some stuff I wanted to include from my side like the favorite language of the user.

![](https://thepracticaldev.s3.amazonaws.com/i/43w74el37q8n0b5wbtm4.png)

All the snippets here are the link of editing those which will again take the user to edit snipcode page. But if the user is not authorized to edit the snip then he can only view the snip. Well, I implemented this by checking the cookies as described in my [previous blog](https://dev.to/sroy8091/i-love-cookies-expressjscookies). And if the user is authorized the [codemirror](https://dev.to/sroy8091/i-built-it-with-codemirror) will be created with editable option else it will be in read-only mode.

As you can see in the picture the private blogs are in different colors and these will not be seen to the person visiting your profile. If I as a guest visiting my profile I will get these only.

![profile as guest](https://thepracticaldev.s3.amazonaws.com/i/v9zrey3hs5c8ouocvfqh.png)

Hence this can be shared among friends also. As we can see others when visiting your profile are unable to see the private snip's created by you.

*Here is the index of all the post regarding this series of snipcode developemnt*

[Part I: App Idea](https://dev.to/sroy8091/app-idea-for-hasura-internship)
[Part II: App prototype](https://dev.to/sroy8091/app-prototype)
[Part III: Local Development](https://dev.to/sroy8091/hasura-local-development)
[Part IV: G for Git](https://dev.to/sroy8091/g-for-git)
[Part V: Data Modeling](https://dev.to/sroy8091/its-modeling-time)
[Part VI: Data & Auth APIs](https://dev.to/sroy8091/postman-a-major-tool-for-developers)
[Part VII: Basic Functionalities](https://dev.to/sroy8091/i-love-cookies-expressjscookies)
[Part VIII: App Screen 1](https://dev.to/sroy8091/i-built-it-with-codemirror)
[Part IX: App Screen 2](https://dev.to/sroy8091/app-screen-2)
[Part X: App Screen 3](https://dev.to/sroy8091/search-page-using-postgres-full-text-search-feature)
[Part XI: User Reviews](https://dev.to/sroy8091/improvements-in-my-web-app)
[Part X: Final Submission](https://dev.to/sroy8091/final-app-submission)

|Liked my post?|
|---------------|
|  [![](https://thepracticaldev.s3.amazonaws.com/i/lsfkqfysa58u59627uy6.png)](https://ko-fi.com/A0A5WBC1)|
Pet Projects: How to stay motivated doing it?
Tags: discuss, pet, project, productivity
Published: 2017-10-01 12:58:31

---
title: "Pet Projects: How to stay motivated doing it?"
published: true
description: 
tags: discuss, pet, project, productivity
---
Hi everyone, do you have new project ideas? Have you finished your previous one? I doubt it!

So I have a question to "The Chosen Few" who actually finished their pet projects (_especially if those projects are not your day-to-day job_), how did you do it? Any advice?

Also, I am encouraging everyone who has a working in progress pet project to share theirs in the discussion box. And just maybe, if we knew that anyone may check our project, it may motivate us more to finish it.

I'm fairly new to JS but mine is here: http://shop.zorexsalvo.xyz
Source: https://github.com/zorexsalvo/vuecommerce
I gave my first presentation tonight
Tags: reactworkflows, webpack, react
Published: 2017-09-29 04:19:02

---
title: I gave my first presentation tonight
published: true
description: React workflows without create-react-app
tags: reactworkflows, webpack, react
---

![React Workflows](https://thepracticaldev.s3.amazonaws.com/i/xew3cy6r7bwbo5c72ju9.jpg)

[React Workflows Without Create React App](https://interglobalmedia.github.io/react-workflow-presentation/)

Tonight I gave my first tech presentation (ever), and it was about creating your own ***React workflow*** without using <code>create-react-app</code>. I was nervous at first, but then after a minute or two, I relaxed and rode with it. 17 minutes into it, I was signaled that I only had 5 minutes left, and I still had 11 minutes to go. I had timed it quite a few times, and brought it down to 28 minutes. Yikes! Well, I was as cool as a cucumber and skipped part of it to move onto the section on configuring **POSTCSS** and then onto configuring **Jest** for **React** after that. Luckily, I wrote the presentation in such a way that even though I might have skipped over a part of it, people still could refer to the whole thing online without missing out on anything.

I know that to most developers, talking about creating your ***own*** **React workflow** from scratch without the help of <code>create-react-app</code>, and dissecting each step might not be at all ***"sexy"***. However, I felt very strongly about presenting it. I know from my own experience that developing a good automated workflow is hard, and takes a long time to master and refine. It is also the area that developers don't want to spend too much time on to understand what is under the hood. We search for quick boilerplates or completed workflows we can copy from without really understanding why and how it works. Workflow deep dives mean taking time away from learning ***sexy*** **JS**, **JSX**, **React**, or the latest in **GraphQL** or **Apollo**. But these workflows save us so much time in the long run. Understanding how and why these automations work also permits us to expand our developer toolkits and horizons.

I felt it important to share some of the <code>webpack fundamentals</code> related to **React** that I amassed over time with others so that they could open their eyes to the possibilities available to them. And I am very grateful to the [ReactNYC](https://twitter.com/NYCReact) team for giving me the opportunity to present tonight!

[React Workflows Without Create React App](https://interglobalmedia.github.io/react-workflow-presentation/)
Simple command to block distracting websites [Productivity]
Published: 2017-10-01 09:47:21

---
title: "Simple command to block distracting websites [Productivity]"
published: true
description: 
tags: 
---


###For Linux based systems


Step 1: Open terminal
Step 2: Open the hosts file `sudo vi /etc/hosts`
Step 3: Add websites you want to block and save
```
127.0.0.1 facebook.com
127.0.0.1 www.facebook.com
127.0.0.1 web.facebook.com
```

### For windows 

The host file location(step 2) is> C:\Windows\System32\drivers\etc
everything else is the same


I'm tweeting similar things on [twitter](https://twitter.com/pradeep_io). Follow me and feel free to message me.
The odd one out: Working With Unusual Programming Projects.
Tags: discuss
Published: 2017-10-01 04:47:26

---
title: "The odd one out: Working With Unusual Programming Projects."
published: true
tags: discuss
---

Programming projects come in all shapes and sizes, each with their own set of challenges and requirements... Though sometimes, projects come along with oddly specific requirements, unusual ways of operating, or even just unusual areas of functionality...

#For example:

###SBTCVM
My first example comes in the form of SBTCVM. SBTCVM is a project to develop balanced ternary Virtual machines and related tools and utilities.

So how unusual is it? well. Its not like you can just buy a balanced ternary microprocessor... And that's partly why i wanted to start working on such a project as SBTCVM, so i could experiment with balanced ternary computer logic without using a soldering iron, the other reason sums up to me having read a Wikipedia article or two, and writing a balanced ternary calculator in python, and a balanced ternary integer mathematics library to power it with.

Many of SBTCVM's oddities are not unique to it, but also can be found in balanced ternary computers in general. For example: Balanced base numbers like Balanced Ternary have an equal number of negative digits as they do positive, centered around zero. 

What this means is it turns quite a few digital computer concepts on their heads. The address buses all start at negative. Zero is in the center. (technical term: MNI or Max negative integer) The same is true for everything from RGB colorspaces, to SBTCVM's own text encoding...

###Game Engine.

Another example of mine would be Desutezeoid: a point and click game engine i wrote, complete with scripted events, driven entirely by small string "keyids" that either exist in a list or don't, and XML tags... It works to create a crude system of states of values, and special XML tags called "forks" that react to them.

Naturally the specific "operations" that can be preformed, are related to point and click games, such as showing or hiding a particular screen object, or reacting to a mouse click on a specific screen object.

#Some tips:

###Research:
I can't stress this enough: One of the most important parts of programming is knowing what you are working with, and having an idea of what you are going to make your project do, and ways it can do that.

###Test core ideas:
Its very important to ensure the core ideas of a project first. For example: SBTCVM's predecessor was far more limited and strewn with test code, but it did do one important thing: Show that it was possible to virtualize a balanced ternary computer in python at the instruction level.

###Don't be afraid to try something new:
New ideas are a natural part of programming, and computing in general. The most important thing about starting a programming project is that you enjoy working on it, and have fun.


#In conclusion:

Programming projects can be quite Unusual at times, and do even more unusual things... What are Some Odd, obscure, unusual, and unique programming projects you've worked on/used?
Best option to start a new big project - NodeJS
Tags: discuss, node, mongodb
Published: 2017-10-01 03:55:03

---
title: Best option to start a new big project - NodeJS
published: true
tags: discuss, nodejs, mongodb
---

Hey! I will begin a moderately big project together with a friend, but still we do not define the technology that we will use. We begin with "Sails", but... yet it is very young and the bugs abound. We have searched a lot about new technologies. What do you recommend to us? Thank you!