teleren/devto huggingface dataset:
What Vue.js framework should I use?
Tags: vue
Published: 2017-12-28 12:24:08

---
title: What Vue.js framework should I use?
published: true
description: 
tags: vue, vuejs
---

I'm loving VueJS, I read the guide, went through the entire Udemy course [Vue JS 2 - The Complete Guide](https://www.udemy.com/vuejs-2-the-complete-guide/learn/v4/overview), did my exercises and demo apps and now I would like to use it for the app I "hinted" to [here](https://dev.to/rhymes/how-to-build-a-web-app-in-2017-a6m).

Going through VueJS material I spent half of the time saying to myself "This is magic!!" and "If only I had this and that the last time I built a web app with jQuery".

Now I've decided I'm going to build the app as a SPA with VueJS.

So, the time has come to choose a UI framework on top of Vue or... not. Which brings me to the reason of this post: **I'm lost because there are too many options**.

## Frameworks Fatigue? 

There are so many of them: desktop oriented, mobile oriented, hybrid apps, all of the above in the same framework, Material based (so many!!!), Material inspired, Bootstrap 4 based, Bulma based, diy frameworks, and so on.

Googling I found: Vuetify, Buefy, Vue-Material, Bootstrap-Vue, Element, Keen UI, Onsen UI, Quasar, Framework 7, Weex and others. This recent comparison lists ELEVEN frameworks: [11 Vue.js Component Libraries You Should Know In 2018](https://blog.bitsrc.io/11-vue-js-component-libraries-you-should-know-in-2018-3d35ad0ae37f)

## What I would like to know

Unfortunately comparisons like that are good for a general idea but they don't really tell me anything about working with those libraries in the long run.

I have noticed there's a [Vue community here](https://dev.to/t/vue) and maybe some of you have real world experiences to share.

## What the app is going to be

The app it's going to be an admin style app to manage server side data, upload images, input data with forms and wizards and give feedback to the user and output stuff. Sorry if I'm not very specific :-)

## What I know

I'm familiar with Bootstrap 3 and 4 (not that original in this department...) but I don't mind learning Material or Bulma. Even though I think Material design looks nice only on my Android phone... 

## Where I'm at

I tried to make Quasar play nice with my Flask backend but nothing came out of it. It seems nice but it's an all or nothing framework, and I don't have enough webpack knowledge to customize everything.

It seems that Element and Vue Material are not really responsive which is kind of a bummer in 2017.


## What I would like

I would like a framework/component library that is easy to use and responsive. I don't mind picking and choosing standalone components to integrate in the app.

## What I realised writing this post

I'm starting to think that I'm left with two main choices:

* [Boostrap Vue](https://bootstrap-vue.js.org/) based on Bootstrap 4 responsive framework
* [Buefy](https://buefy.github.io) based on Bulma responsive framework

plus other third party components if needed
Driver source code is not what you may think
Tags: driver, graphics
Published: 2017-12-28 20:49:14

---
title: "Driver source code is not what you may think"
published: true
tags: driver, graphics
canonical_url: http://asawicki.info/news_1670_driver_source_code_is_not_what_you_may_think.html
---

AMD just released [Open Source Driver for Vulkan](https://gpuopen.com/gaming-product/amd-open-source-driver-for-vulkan/), with source code available on GitHub under MIT license. That’s a good opportunity to explain how drivers source look like. When I was developing graphics driver (I no longer do - I now have quite different position), people kept asking me "How is it like to code in C?" or "How is it like to code in kernel space?", unaware that none of it was true in my case.

Many developers think that coding a driver is some hardcore, low-level stuff. Maybe it is true for some small drivers in embedded systems world. What they may not know is that a modern PC graphics driver (and I bet other kinds of drivers as well) is a very complex beast, with only a small portion of it working in kernel mode and only a small portion (if any) written in plain old C or assembly. Majority of the code is just normal C++ with classes, virtual functions and everything. It is compiled into normal user-mode DLL libraries that get loaded into address space of a game. Sure the code may be a little bit different than standard desktop apps. It may be optimized for performance, as well as memory usage. It may not use exceptions, Boost or STL. It may have to handle out-of-memory errors gracefully. But it’s still a modern, object-oriented code that uses (relatively) new language features like `constexpr` or `enum class`.
Looking back at 2017
Tags: softwaredevelopment, azure, baby, goals
Published: 2020-01-25 20:57:32

---
title: Looking back at 2017
published: true
date: 2017-12-28 09:26:09 UTC
tags: SoftwareDevelopment,Azure,baby,goals
canonical_url: https://www.funkysi1701.com/2017/12/28/looking-back-at-2017/
---

As 2017 starts to draw to a close let’s look at some of the highlights from the past year.

![Edward](https://i0.wp.com/www.funkysi1701.com/wp-content/uploads/2015/07/DSC_0376-e1510563039193-225x300.jpg?resize=225%2C300&ssl=1)

1) Edward

In November I became a father again and celebrated the arrival of Edward into the world. Before the birth I was worried how well my first son James would adapt to the new arrival but I am happy to say I didn’t need to,  he mostly ignores the new arrival.

2) Star Trek

In September the latest Star Trek TV series Discovery arrived on Netflix. I have been very positive so far about the show, I am still positive however there are things that annoy me about the new show, however I am keen to see the next episode each week so they are definitely doing something right.

3) Office move

In May I helped my employer move to brand new [offices](https://dev.to/funkysi1701/office-move-1ni4-temp-slug-2304331). This was a lot of hard work, but everything went as planned and our new home is great.

4) Side projects ![Google Play](https://i1.wp.com/www.funkysi1701.com/wp-content/uploads/2017/08/googleplay.jpg?resize=300%2C300&ssl=1)

I blogged in February about having a side project but it wasn’t until later in the year that this solidified into what I am working on now. It started as a way to understand [interfaces](https://dev.to/funkysi1701/interfaces-34on-temp-slug-2228381)this then led to learning Xamarin and creating an android app to help promote this blog. Troy Hunt expanded his HIBP API to include passwords that have been in data breaches, I then started working on [pwned passwords](https://dev.to/funkysi1701/pwned-pass--available-from-the-play-store-1o8a-temp-slug-8432011) which is a simple android frontend for this.

5) Learning R

In Feb I also experimented with a new programming language [R](https://dev.to/funkysi1701/learning-r-e2k-temp-slug-8754557). It started with a problem about converting exchange rates and ended with a SQL stored procedure that executed some R code, I still want to learn lots more but it was a good example of the sorts of thing you can build with R.

6) DNS programmatically

One of my most successful blogs was about how you can create [dns](https://dev.to/funkysi1701/creating-dns-records-programmatically-1o3c-temp-slug-3062796)records within your application eg sites that have yourname.domain in the url. It was a great chance to look at how dns works and learn more about what azure can do to manage this. I want to expand on this and build something.

So that was 2017, for some ideas about what 2018 might have in store for me look out for my next blog post.

The post [Looking back at 2017](https://www.funkysi1701.com/2017/12/28/looking-back-at-2017/) appeared first on [Funky Si's Tech Talk](https://www.funkysi1701.com).
Call data ejs to database MongoDB
Tags: node, javascript, webdev
Published: 2017-12-28 08:59:36

---
title: "Call data ejs to database MongoDB"
published: true
description: 
tags: node , javascript , webdev
---

Hi, for a web development project, i need to send data from my database to my index.ejs, to display. It's a success ! Now I would like recover the same data and send to another collection in my database.
(I display my products with "products collection", and when the user clicks on "buy", the product is sending to "basket collection".)
If somebody can help me. I have my two functions on the same .js.
I attached the screen of index.ejs and method.js (where I do my functions).

index.ejs (display) :
https://thepracticaldev.s3.amazonaws.com/i/lx9yvtejp261xncmcxvd.png

method.js (function basket) :
https://thepracticaldev.s3.amazonaws.com/i/3ee21psgg0i3qh92pyhh.png

method.js (function products to display on index.ejs) :
https://thepracticaldev.s3.amazonaws.com/i/zaskox2q384li0lqr7yz.png
How to get the actual table name from DbSet in EntityFramework Core 2.0.
Tags: dotnet, netcore, entityframework, efcore20
Published: 2017-12-28 01:53:22

---
title: How to get the actual table name from DbSet in EntityFramework Core 2.0.
published: true
description: 
tags: #dotnet, #netcore, #entityframework, #efcore20
---

# The way of getting actual table name

For example, if you have DbContext object like this (C#):

```csharp
public class MyDbContext : DbContext {
    public DbSet<FooBar> FooBars { get; set; }
}
...

var dbContext = new MyDbContext();
```

You can obtain the actual table name of the DbSet property from the DbContext instance with the following code.

```csharp
// DbContext knows everything about the model.
var model = dbContext.Model;

// Get all the entity types information contained in the DbContext class, ...
var entityTypes = model.GetEntityTypes();

// ... and get one by entity type information of "FooBars" DbSet property.
var entityTypeOfFooBar = entityTypes.First(t => t.ClrType == typeof(FooBar));

// The entity type information has the actual table name as an annotation!
var tableNameAnnotation = entityTypeOfFooBar.GetAnnotation("Relational:TableName");
var tableNameOfFooBarSet = tableNameAnnotation.Value.ToString();

```

# Package as an extension method

By the way, we can get a DbContext from a DbSet.

See also: ["How to get a DbContext from a DbSet in EntityFramework Core 2.0."](https://dev.to/j_sakamoto/how-to-get-a-dbcontext-from-a-dbset-in-entityframework-core-c6m)

Therefore, you can package the above code as an extension method like this C# code:

```csharp
using System;
using System.Linq;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;

// Prerequire: You have to install DbContextGetter class in this project.
// https://dev.to/j_sakamoto/how-to-get-a-dbcontext-from-a-dbset-in-entityframework-core-c6m

public static class TableNameOfDbSetGetter
{
  public static string GetTableName<T>(this DbSet<T> dbSet) where T: class
  {
    var dbContext = dbSet.GetDbContext();

    var model = dbContext.Model;
    var entityTypes = model.GetEntityTypes();
    var entityType = entityTypes.First(t => t.ClrType == typeof(T));
    var tableNameAnnotation = entityType.GetAnnotation("Relational:TableName");
    var tableName = tableNameAnnotation.Value.ToString();
    return tableName;
  }
}

// How to use:
// 
// class MyDbContext : DbContext {
//    public DbSet<FooBar> FooBars { get; set; }
// }
// ...
// var myContext = new MyDbContext();
// var tableName = myContext.FooBars.GetTableName();
//                                  ~~~~~~~~~~~~~~
// tableName; // -> "FooBars"
```

This code works fine even if the entity class is decorated with `[TableAttribute("TableName")]`. 

Happy coding :)
Why do some developers listen to music while they code?
Tags: discuss, productivity, music, programming
Published: 2017-12-28 06:32:58

---
title: Why do some developers listen to music while they code?
published: true
tags: discuss #productivity #music #programming
---

I want my environment to be silent while programming. Listening to music actually deviate from what I'm doing. I wonder how it helps some. :-)
Making sense of JavaScript array methods with Array Explorer
Tags: coding, methods, javascript, arrays
Published: 2017-12-28 06:28:31

---
title: "Making sense of JavaScript array methods with Array Explorer"
published: true
tags: Coding,methods,JavaScript,arrays
canonical_url: https://pauljacobson.me/2017/12/28/making-sense-of-javascript-array-methods-with-array-explorer/
---

[Sarah Drasner](https://twitter.com/sarah_edo) shared her awesome [Array Explorer](https://sdras.github.io/array-explorer/) tool on Twitter the other day. It’s design is pretty simple, and yet a powerful way to learn JavaScript arrays. What you do is pick a couple options from drop-down lists to find the right array method you need for a project. 

{% twitter 946091648773013504 %}

I still find arrays challenging and yet learning how to work with them in JavaScript is so important. If you’re still figuring this stuff out, definitely take a look at Array Explorer, bookmark it, and use it.

Sarah even made [the code](https://github.com/sdras/array-explorer) for Array Explorer available on GitHub so you can see how she put it together too.
Go Build Flags - Video
Tags: go, compilation
Published: 2017-12-28 04:20:27

---
title: Go Build Flags - Video
published: true
description: In this video I am showing how "go build" works and reviewing its flags.
tags: go, golang, compilation
---
Hello! So, I have been cooking this video to review some helpful "go build" flags.

Tadaaa! [packagemain #2: Go Build flags](https://www.youtube.com/watch?v=aR_us2JMppw)

What I am covering there:
 - cross compilation
 - ldflags
 - gcflags
 - code inlining
 - shrink binary
Use `coverage` gem to check method call count in Ruby.
Tags: ruby
Published: 2017-12-28 00:55:00

---
title: Use `coverage` gem to check method call count in Ruby.
published: true
description: 
tags: #ruby
---

`coverage` gem of ruby 2.5 can get method coverage. so, I wrote a code to check the count of the method call.

sample code. (fizzbuzz.rb)

```ruby
def fizz
  "Fizz"
end

def buzz
  "Buzz"
end

def fizzbuzz
  "FizzBuzz"
end

1.upto(100) do |n|
  if n % 15 == 0
    puts fizzbuzz
  elsif n % 3 == 0
    puts fizz
  elsif n % 5 == 0
    puts buzz
  else
    puts n
  end
end
```

check code (RUBY_VERSION >= "2.5.0")
It use [termianl-table](https://github.com/tj/terminal-table) to make the results easy to see.

```ruby
require "coverage"
require "terminal-table"

Coverage.start(methods: true)
require_relative "fizzbuzz"
result = Coverage.result

rows = []

result.each do |filepath, coverage_data|
  filename = File.basename(filepath)
  methods = coverage_data[:methods]

  methods.each do |method_data, count|
    next if count.zero?

    defined_class, method_id, _from_row, _from_col, _to_row, _to_col = *method_data
    rows << [filename, defined_class, method_id, count]
  end
end

header = %w(filename defined_class method_id count)
rows.sort_by! { |e| -e.last }
table = Terminal::Table.new headings: header, rows: rows
puts table
```

Result

```
.
.
# display fizzbuzz.rb result
.
.
+-------------+---------------+-----------+-------+
| filename    | defined_class | method_id | count |
+-------------+---------------+-----------+-------+
| fizzbuzz.rb | Object        | fizz      | 27    |
| fizzbuzz.rb | Object        | buzz      | 14    |
| fizzbuzz.rb | Object        | fizzbuzz  | 6     |
+-------------+---------------+-----------+-------+
```

looks to good.
Подключение к Redis через Unix-сокеты в Docker
Tags: php, webdev, redis, docker
Published: 2018-02-09 16:24:08

---
title: "Подключение к Redis через Unix-сокеты в Docker"
published: true
tags: php, webdev, redis, docker
canonical_url: http://phpprofi.ru/blogs/post/91
---

Подключение к Redis через Unix-сокеты, как правило, быстрее, чем подключение через TCP/IP.

Это потому, что в целом, Unix-сокеты имеют гораздо меньше накладных расходов. Они, по сути, просто файлы, которые могут читать Unix-подобные системы. Недостатком этого является то, что возможны только локальные подключения.

Имея 10М+ скачиваний, [`redis`](https://hub.docker.com/_/redis/) является [четвертым](https://hub.docker.com/explore/) среди самых скачиваемых Docker-образов, и большинство систем настраивают подключение к Redis через Docker'овский встроеный сетевой TCP-мост.

Docker'овский собственный сетевой TCP-мост&nbsp;— это, конечно, хорошо и прекрасно, но не хотели бы вы выжать еще немного скорости?

![](http://phpprofi.ru//resources/img/blogs/3628892c-62be-4c36-8b66-5dc2aa3388e5.jpeg)

----
Читать далее: http://phpprofi.ru/blogs/post/91

----
En: https://medium.com/@jonbaldie/how-to-connect-to-redis-with-unix-sockets-in-docker-9e94e01b7acd
What characters should be allowed in HTTP Basic Authentication userid and password
Tags: discuss, http, authentication, rfc
Published: 2017-12-28 03:43:59

---
title: What characters should be allowed in HTTP Basic Authentication userid and password
published: true
description: 
tags: #discussion #http #authentication #RFC
---

Based on [this](
https://tools.ietf.org/html/rfc2617#page-6) RFC2617 Specification, HTTP Basic Authentication `userid` can contain any `TEXT` excluding the symbol `:`. The `password` can contain any `TEXT`. Are these the only rules for Basic Authentication usernames and passwords?
How to execute u-boot on qemu-system-arm
Published: 2017-12-28 03:14:41

---
title: How to execute u-boot on qemu-system-arm
published: true
description: u-boot built for VExpress A9 is executable on qemu-system-arm 
tags: 
---

#Summary

Currently, I check u-boot execution on qemu-system-arm with VExpress A9 environment. In this document, an u-boot built for ARM EABI with hardware-floating-point-instructions at ELF format is attached directly to the qemu DRAM area using -kernel option. Boot from Flash device will be next step.

#Environment

1. ubuntu-ja-16.04
2. gcc 5.4.0
3. arm-linux-gnueabihf-gcc 5.4.0
4. qemu 2.5.0
5. u-boot 2017.11

#Tool instration

```shell
$ sudo apt-get install g++-arm-linxu-gnueabihf
$ sudo apt-get install qemu
```
#Build u-boot

At first, get a tarball of u-boot 2017.11 from [Official u-boot distribution site](https://www.amazon.com/clouddrive/share/HtTEzbceyJDyHv7anDLboEjTe0OkFbYReMxRp3CF20n/folder/R_7ocFWRQ9SjOtOWX1EWLQ?_encoding=UTF8&mgh=1&ref_=cd_ph_share_link_copy).


```shell
$ bzcat u-boot-2017.11.tar.bz2 | tar xvf -
$ cd u-boot-2017.11
$ make vexpress_ca9x4_defconfig CROSS_COMPILE=arm-linux-gnueabihf-
$ make all CROSS_COMPILE=arm-linux-gnueabihf-
```

#Execute u-boot on qemu

-nographic option disables framebuffer and redirect tty via UART to stdin/stdout. Also, with -no-reboot option causes reset command on u-boot to quit qemu.

```shell
$ qemu-system-arm -machine vexpress-a9 -nographic -no-reboot -kernel u-boot
pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed
pulseaudio: Reason: Invalid argument


U-Boot 2017.11 (Dec 29 2017 - 16:07:51 +0900)

DRAM:  128 MiB
WARNING: Caches not enabled
Flash: 128 MiB
MMC:   MMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   smc911x-0
Hit any key to stop autoboot:  0 
=> reset
resetting ...
$ 

```
Cleaning Up Your Code: Good Names
Tags: programming, beginners, productivity, coding
Published: 2017-12-28 03:13:42

---
title: "Cleaning Up Your Code: Good Names"
published: true
description: Allow future you to understand your code, avoid that "???" moment!
tags: #programming, #beginners, #productivity, #coding
---

This is an excerpt from my article ["Cleaning Up Your Code" on Medium](https://medium.com/acm-ucr/cleaning-up-your-code-8c2a88cb47fc). I'll be publishing each section daily, read ahead on Medium!

Programming is not a math equation. The vast majority of the programs you write will not be simple. They will have to interact with the rest of the program, forming complex relationships along the way, and therefore have to be read by other programmers. Someone with no idea of your contribution should be able to quickly understand what your code does.

Let’s look at an example, which code snippet is easier to grasp?

{% gist https://gist.github.com/aarohmankad/61133b916ee2155634ae6d805d11f9e8 %}

If you’d like to start using good names throughout your codebase, here are some general rules to follow:

* **Expose meaning through names**: Similar to the above example, the name of a variable should provide some meaning towards code functionality.
* **Use pronounceable names**: Software Development involves talking through your code with other developers. It will help a lot if you can actually talk through your code.
* **Use searchable names**: There will be many times you want to track a variable or function through your codebase. In this case, the variable should be unique enough that it can be searched for with few duplicates.

Thanks for reading! How do you make sure your code is understandable to yourself and colleagues?
Does a 21 days practice actually change your routine?
Tags: discuss, node, learn, work
Published: 2017-12-28 02:26:26

---
title: Does a 21 days practice actually change your routine?
published: true
tags: discuss #node #learn #work
---

I have started a new routine for doing two tasks simultaneously. - Laravel & Nodejs. 

I wake up early in the morning by 4:30 and take up Udemy course by Andrew and do it till 7 Am. 

As of now I work remotely for a start-up. So I'll work on Laravel from 9am - 4 or 5pm. 


I then resume the Node course or planned to do my other college project(Laravel) from 6 pm. 

After completing the Node course which I'm half way through it. I'll swap it with a React course from Udemy. 

Following this for a couple of weeks by now including Sunday for Learning alone. 

Is this is a good practice?

Note : This new practice is not what I actually followed earlier.
Howdy! want to become pro python developer in 1 month
Tags: discuss, tutorial, python
Published: 2017-12-27 20:07:16

---
title: Howdy! want to become pro python developer in 1 month
published: true
description: Guide me step by step,how to become pro from noob, like first saw these tutorial then these you, create this project etc.
tags: #discuss #tutorial #python 
---
Do you have a "home lab" for local development and/or tinkering? If so, what resources helped you get it set up and running?
Tags: discuss
Published: 2017-12-27 20:02:39

---
title: Do you have a "home lab" for local development and/or tinkering? If so, what resources helped you get it set up and running?
published: true
tags: discuss
---

I'll start: I have a desktop PC I built ~5 years ago, but is now mostly used for running Linux VMs in [Virtual Box](https://www.virtualbox.org/wiki/Downloads). I'm currently trying to learn more about Kubernetes, and have been working my way through [setting up a personal kube cluster](https://blog.sophaskins.net/blog/setting-up-a-personal-kube-cluster/) and [Kubernetes the hard way](https://github.com/kelseyhightower/kubernetes-the-hard-way) to better understand how all the pieces fit together.

Eventually I think it would be awesome to be able to setup a home-based proxy that automatically exposes my local dev machine to the internet on demand. This would work similar to tools like localtunnel and [ngrok](https://ngrok.com/), but free and hosted on my own domain.