teleren/devto huggingface dataset:
Simulando a cláusula MERGE em uma Stored Procedure Compilada Nativamente. 
Tags: sql
Published: 2020-06-07 04:33:42

##O que é uma Stored Procedure Compilada Nativamente? 
Em resumo SP's compiladas nativamente são procedures compiladas para código de máquina gerando uma DLL e carregando a mesma para o In-Memory OLTP Runtime e é usada para acessar tabelas otimizadas em memória.
Mais detalhes sobre esse tipo de SP você pode encontrar [**AQUI**](https://docs.microsoft.com/en-us/sql/relational-databases/in-memory-oltp/a-guide-to-query-processing-for-memory-optimized-tables?view=sql-server-ver15#:~:text=Natively%20Compiled%20Stored%20Procedures,by%20the%20query%20execution%20engine.) . 

Mas esse tipo de procedure possui limitações e uma delas é a utilização do comando **MERGE**. 

####O que é o T-SQL MERGE?
Com o comando **MERGE** é possível realizar INSERT, UPDATE, DELETE na mesma instrução de acordo com a validação dos dados entre as tabelas origem e destino. 
Abaixo a utilização do MERGE: 

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

Mas como usar uma instrução tão poderosa em procedures compiladas nativamente? Segue abaixo um script equivalente, um *workaround* para isso. 

1. Criamos uma tabela e um tipo
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/xz5mi6h4rarg9ogo6125.PNG)

2. Script de criação da procedure que fará o Merge
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/jxz02irjcbwkj7n0awfw.PNG)

Depois é só declarar uma váriavel do tipo que foi criado, inserir alguns valores e passar para procedure como parametro para testar. 

Prontinho! 

Temos uma procedure compilada nativamente que simula a execução do comando **merge** :D
Struggles of finding jobs for dropouts
Tags: discuss, jobs, dropout
Published: 2020-06-07 04:09:50

---
title: Struggles of finding jobs for dropouts
published: true
description: 
tags: discuss, jobs, dropout
cover_image: https://images.unsplash.com/photo-1499750310107-5fef28a66643?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=60
---

All the self taught developers and dropouts out there. What are your experiences with finding the job ? Do you tell the recruiter beforehand that you don't have a relevant degree or after the process is over ? I am from India and here it is difficult to get a job for dropouts very few companies allow it. Specially if anyone is from India and in similar situation, please share your experiences. So I want to hear your opinions and thoughts.
Playing With Files
Published: 2020-06-07 03:27:33

Everyone has to deal with file management at some point.  But archives?  Compression?  Splits & concatenation?  This is where the fun begins!

Got a bunch of files?  Want to put them together in one file for transfer or some such?  Tar to the rescue!  From the man page...
```
The tar command creates, adds files to, or extracts files from an archive
file in "tar" format.  A tar archive is often stored on a magnetic tape,
but can be stored equally well on a floppy, CD-ROM, or in a regular disk
file.
```
Tar got its name from the days where data was stored on mag tape.  A command such as:
```
tar -cvf name.of.file.to.create.tar /home/user/*
```
would (c) create a new archive file, (v) provide "verbose" output to view progress, and (f) output to a file.  The following parameters are the name of the file you're creating and the target to make the archive from.

While creating archives is great and all, sometimes the amount of data is too big for comfort and compression is needed.  Luckily tar has an option to use gzip, a common compression algorithm.  From the gzip man...
```
The gzip utility reduces the size of the named files using adaptive
Lempel-Ziv coding, in deflate mode.
```
There are different compression methods to choose from but if you're not particular adding a "z" flag to the above tar command will include compression using gzip.
```
tar -zcvf name.of.file.to.create.tar.gz /home/user/*
```
Now say you've got your archive, all zipped up, and it's still too big.  It might make sense to split that file into more reasonable sized chunks.  Well, there's a "split" command for that!

Split it fairly straight forward.  There's one particular flag, -b, which specifies how big you'd like each portion to be.  For example:
```
split -b 100m superhugefile.tar.gz "prefix-of-split-"
```
What this does is tell split you'd like to take "superhugefile.tar.gz", split it into 100 megabyte files, and begin each filename with "prefix-of-split-".  What this will then do is create a number of files named as such:
```
prefix-of-split-aa
prefix-of-split-ab
prefix-of-split-ac
prefix-of-split-ad
```
...etc.

But what now?  You've got all these files & it's time to put them back together.  Cat to the rescue!

For as long as I can remember the "cat" command was my way of viewing the contents of a file.  By itself a command such as:
```
cat readme.txt
```
will display the contents of readme.txt to the screen.  Little did I know that with the help of a output redirection operator cat can join the files together!  From the cat man page:
```
The cat utility reads files sequentially, writing them to the standard
output.  The file operands are processed in command-line order.  If file
is a single dash (`-') or absent, cat reads from the standard input.
```
So a simple command like
```
cat prefix-of-split-* > superhugefile.tar.gz
```
will reassemble your file!

Command line tools like these are why I've come to love unix & unix-like operating systems.  If it's the macOS, Linux, or a BSD, having these familiar tools available provides a sense of comfort.
Obfuscating Dart code
Tags: dart, flutter
Published: 2020-06-07 02:50:49

Code obfuscation is the process of modifying an app’s binary to make it harder for humans to understand. Obfuscation hides function and class names in your compiled Dart code, making it difficult for an attacker to reverse engineer your proprietary app.

The following list describes which platforms support the obfuscation process described in this page:

**Android/iOS**
Supported as of Flutter 1.16.2. To obfuscate an app built against an earlier version of Flutter, use the obfuscation instructions on the Flutter wiki.
**macOS**
macOS (in alpha as of Flutter 1.13), supports obfuscation as of Flutter 1.16.2.
Linux/Windows
Not yet supported.
**web**
Obfuscation is not supported for web apps, but a web app can be minified, which is similar. When you build a release version of a Flutter web app, it is automatically minified. For more information, see Build and release a web app.
Flutter’s code obfuscation, when supported, works only on a release build.

### Obfuscating your app
To obfuscate your app, build a release version using the --obfuscate flag, combined with the --split-debug-info flag. The --split-debug-info flag specifies the directory where Flutter can output debug files. This command generates a symbol map. The apk, appbundle, ios, and ios-framework targets are currently supported. (macos and aar are supported on the master and dev channels.) For example:
```
flutter build apk --obfuscate --split-debug-info=/<project-name>/<directory>
```
Once you’ve obfuscated your binary, save the symbols file. You need this if you later want to de-obfuscate a stack trace.

Note that the --split-debug-info flag can also be used by itself. In fact, it can dramatically reduce code size. For more information on app size, see [Measuring your app’s](https://flutter.dev/docs/perf/app-size) size.

For detailed information on these flags, run the help command for your specific target, for example:
```
flutter build apk -h
```
If these flags are not listed in the output, run flutter --version to check your version of Flutter.


### Reading an obfuscated stack trace
To debug a stack trace created by an obfuscated app, use the following steps to make it human readable:
* Find the matching symbols file. For example, a crash from an Android arm64 device would need app.android-arm64.symbols.

* Provide both the stack trace (stored in a file) and the symbols file to the flutter symbolize command. For example:
```
flutter symbolize -i <stack trace file> -d /out/android/app.android-arm64.symbols
```
For more information on the symbolize command, run flutter symbolize -h.

### Caveat
Be aware of the following when coding an app that will eventually be an obfuscated binary.

* Code that relies on matching specific class, function, or library names will fail. For example, the following call to expect() will not work in an obfuscated binary:
```
expect(foo.runtimeType.toString(), equals('Foo'))
```
High-Perf Embedded Hardware 06-2020
Tags: embedded, iot
Published: 2020-06-07 16:31:12

---
title: High-Perf Embedded Hardware 06-2020
published: true
date: 2020-06-07 00:00:00 UTC
tags: embedded,iot,news
canonical_url: https://rendered-obsolete.github.io/2020/06/07/embedded_hardware_news.html
---

[Raspberry Pi 4 w/ 8GB RAM](https://www.raspberrypi.org/blog/8gb-raspberry-pi-4-on-sale-now-at-75/)- latest iteration of the venerable Raspberry Pi. Version 4 with 8 GB RAM and 64-bit Raspbian OS to leverage all that sweet, sweet RAM. Assuming it has the [USB-C fix](https://arstechnica.com/gadgets/2019/07/raspberry-pi-4-uses-incorrect-usb-c-design-wont-work-with-some-chargers/), seems like now is the time to splurge.

[AMD APU w/ Vega graphics](https://www.tomshardware.com/news/axiomtek-capa13r-amd-ryzen-radeon-vega-raspberry-pi)- we previously worked with an [AMD APU utilizing Zen CPUs and Vega graphics](https://rendered-obsolete.github.io/2018/10/15/zplus-microservices.html) and I’ve longed for a similarly equipped SBC. Looks like one is finally here. With eyes on the upcoming PS5/Xbox Series X, one could assume that an even more powerful version is on the horizon.

[Nvidia Jetson Xavier NX](https://www.anandtech.com/show/15799/nvidia-announces-jetson-xavier-nx-developer-kit-for-399)- we [lamented the memory bandwidth of the Jetson Nano](https://rendered-obsolete.github.io/2019/04/01/jetson_nano.html) and this iteration brings it up to par with the TX2- albeit at a much higher price-point.

[Google Coral Dev Board Mini](https://coral.ai/products/dev-board-mini)- the Coral line of products targeted at ML applications has a number of interesting products available now, but I’m eagerly anticipating this standalone board.

[AWS Graviton2](https://www.anandtech.com/show/15578/cloud-clash-amazon-graviton2-arm-against-intel-and-amd)- ok, not exactly embedded hardware, but I have a penchant for non-x86 compatible hardware. The $/W numbers are enticing and should encourage platforms that can target alternative architectures.
Bringing simplicity to documentation with Gendocs
Tags: startup, saas
Published: 2020-06-07 02:33:16

Hey everyone,

We've just released our first product and are incredibly excited about it.

Meet Gendocs, hosted documentation as a service. (https://gendocs.io)

Instead of using many different platforms for hosting, search, code highlighting, live development, ...

We're now joining all these things together into a single platform. Gendocs.

Gendocs makes writing and publishing your documentation as simple as:

1. Write markdown
2. Preview
3. Publish

And you'll have a completely working documentation site running on your own domain or free subdomain with instant search indexing.

I'll make sure to answer any questions in the comments if you have any.

Thanks for your time,

Ian
How to find the commits from last pull
Tags: git, productivity
Published: 2020-06-07 02:26:07

I came out with this question recently: how to find those commits from last `git pull`?

Of course you can check `git log` first, record the last commit and check again after `git pull`. 

Obviously not an ideal approach for a lazy developer like me.

Here is an example. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/zfp2svtulydza1o3czc6.png)
As you can see, this local repository is on `ed102ca`, but remote is on `7b44e48`. 
So, how do I find those commits from `3dea674` to `7b44e48` after `git pull` ?

**git reflog + git show**

*What is reflog ?*

Well, it's a log which records the modified when `HEAD` is changed. Such as `git rebase`, `git commit` and `git pull` will change the `HEAD`.

After you did a `git pull`, your last `reflog` will like this.
```
7b44e48 HEAD@{0}: pull: Fast-forward
952bd4d HEAD@{1}: ...
```
We can use `git show` to see the difference between `HEAD@{1}` and `HEAD@{0}`.
```
git show @@{1}..@@{0}
```
The `@@{n}` is an alias of `HEAD@{n}`, so this command shows the diff between `HEAD@{1}` and `HEAD@{0}` which contains commits from `3dea674` to `7b44e48`.

`git show` shows commit message and file diff in pager by default, use this command instead when you just want an overview list.
```
git -c pager.show=false show --format="%h %an %s" -q @@{1}..@@{0}
```
This command shows commit hash, author and subject, without diff result and doesn't use pager.
```
$ git -c pager.show=false show --format="%h %an %s" -q @@{1}..@@{0}
7b44e48 Zanets [refactor][git] don't need bash
f322bee Zanets [feat][vim/fzf] enhance color
c30740f Zanets [feat][bash] ls colors
4985b83 Zanets [feat][bash] get support multiple url
952bd4d Zanets [feat][tmux] better output color
7239d0f Zanets [feat][vim] enhance Help
650ed49 Zanets [refactor][vim] use a/b/c/d
1e092fd Zanets [refactor][vim] move comment to backup
3dea674 Zanets [config][vim] use origin fzf.vim
$
```

Which is exactly what I want.

## more
Sometimes `@@{1}..@@{0}` shows nothing, it's usually because of rebase
```
7b44e48 HEAD@{0}: rebase finished: returning to refs/heads/master
7b44e48 HEAD@{1}: pull: checkout 7b44e48646057a89e8f90ff6953b2c696d06eeda
ed102ca HEAD@{2}: ...
```
If this happen, use `@@{2}..@@{0}` instead.
My Data Science Bootcamp Experience
Tags: datascience, machinelearning, python
Published: 2020-06-07 02:21:09

In February, I have enrolled Flatiron Immersive Data Science program. I preferred to enroll full-time in-person program instead of self-paced or online because I thought that to be on the campus makes me more motivated. In this post, I will write about my experiences with Bootcamp. 

First of all, I did not have big expectations when I was starting the program. Of course, I knew the syllabus and details about it, but I did not know how much we practice and work on hands-on projects. In the boot camp, I finished 5 modules. Each module has different goals and I had to finish the assignment and project of each module for graduation. Project weeks were really tough to survive, even I felt like my final weeks in university. Certainly, the most difficult one was the capstone project which we have worked for the last 3 weeks.

Now, when I look at my first project, I can obviously see how much I have improved my knowledge and skills. Here, I would like to say 'Thank you' to our lead instructor [Bryan Arnold](https://www.linkedin.com/in/bryan-arnold-mathematics/) and our coach [Lindsey Berlin](https://www.linkedin.com/in/lindseyberlin/). They always supported me to push my boundaries. In the first project, I got my data by using the API key and web-scrabbing. It took two days to understand how to get my data. If they wrote the code for me and gave me ready code, I would not learn how to do it myself. Instead of giving the code to me, they gave me the perspective on how to solve this problem. This is the approach that I was used to from university, so it helps me a lot. 

Because of Covid-19, we continued to our last 3 modules remotely. It is easier to focus on campus rather than home exactly. But, I experienced different skills in this remote system such as;

- How to working in a team remotely
- Being self-sufficient
- Focusing on online lectures
- How to get online help from instructors

Flatiron's full-time remote schedule helped me a lot to keep my motivation. When I began to feel more relaxed, it kept me engaged with its strict schedule and syllabus. Even, we had accountability channel with our instructors which reminded our goals every day. 

For the capstone project, I worked on sentiment analysis with deep learning and build book recommendation systems from Kindle Store reviews on Amazon, even it was impossible to imagine for me when I was in the first module. I feel pretty comfortable about what I learned in Flatiron and it was worth the risk to leave my job. If you have any questions about Bootcamp, please feel free to ask about my experience. To see details of my projects, my GitHub repo can be found [here](https://github.com/ezgigm). 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/zsa5kruw75fi28jw482k.gif)
*Cover photo by Glenn Carstens-Peters on [Unsplash](https://unsplash.com/s/photos/blog) and gif is from [giphy](https://giphy.com)*
How i changed my game to become a Developer.
Tags: python, django, github
Published: 2020-06-07 02:20:42

Watching only YouTube tutorials almost cost me opportunity to become a developer. I spent most of my time sitting behind the computer watching video tutorials trying to get a better understanding of the programming language especially Python but time was my biggest enemy. I wasted one year trying to understand Django without coding much. 
I wouldn’t advise beginners to watch only online tutorials without creating projects and following official documentation of any language or framework. Better to use both at the same time.

#### What help me?
* I started focusing on practicing more or coding then watching tutorials on YouTube.
* I stop copying codes I found online, I make sure I understand before i do so.
* Documentation always my good friend, highly recommend.
* I started creating simple projects, to make my idea into reality.
* I started reading other people blogs, articles.
* Teaching and sharing my programming skills with other helps me.
* I started using github, this helps to clean up my codes. 
* I started participating on python/ django community.
* I started giving talks at PyCon, meetup and other conference. Been in UK, Ghana and etc.
* I value my time, time is money. No more gaming unless if I am on vacation.

#### Conclusion 
Practicing helps me to become a developer. Some video on YouTube are misleading. If I get stuck, I don’t give up. Instead, I search for help online. We have huge community, there are people who are willing to help other.
Mark All WhatsApp messages as Read
Tags: whatsapp, automate, mark, read
Published: 2020-06-07 02:19:03

A popular person in our community receives a lot of WhatsApp messages — in thousands — especially during events and he obviously cannot reply or even read all of them. He asked me if there was a way to **Mark as Read** all messages so I came up with this quick and dirty solution that works in [WhatsApp Web](http://web.whatsapp.com).

Just copy and paste the following script in the browser console and wait for it to finish. It marks a message as read every 2 seconds.


```javascript
const triggerMouseEvent = (node, eventType) => {
		var clickEvent = document.createEvent("MouseEvents");
		clickEvent.initEvent(eventType, true, true);
		node.dispatchEvent(clickEvent);
	},
	timer = (ms) => {
		return new Promise((res) => setTimeout(res, ms));
	},
	selector = '[aria-label*="unread message"]',
	messages = (async () => {
		for (const message of document.querySelectorAll(selector)) {
            ["mouseover", "mousedown", "mouseup", "click"]
                .map((event) => triggerMouseEvent(message, event));
			await timer(2000);
		}
	})();
```
1-line solution for importing and registering your Vue component 
Tags: todayilearned, vue
Published: 2020-06-07 01:39:41

Today I was working on some Vuetify themes and was pleasantly surprised to learn an elegant 1-line solution to import and register a component. The pattern I usually saw in Vue projects was this:

```js
<template>
  <v-app>
    <home-system-bar />
    <home-view />
    <home-footer />
  </v-app>
</template>
<script>
import SystemBar from '@/layouts/home/SystemBar'
import View from '@/layouts/home/View'
import Footer from '@/layouts/home/Footer'
  export default {
    components: {
      HomeSystemBar: SystemBar,
      HomeView: View,
      HomeFooter: Footer
  }
}
</script>
```
Above you can see that the components are imported separately and then registered in the `components` object. There is actually no need for a separate line to import, you may do all of it in `components` with an arrow function expression:
```js
<template>
  <v-app>
    <home-system-bar />
    <home-view />
    <home-footer />
  </v-app>
</template>

<script>
  export default {
    name: 'HomeLayout',
    components: {
      HomeSystemBar: () => import('@/layouts/home/SystemBar'),
      HomeView: () => import('@/layouts/home/View'),
      HomeFooter: () => import('@/layouts/home/Footer')
    },
  }
</script>
```

How cool is that? When dealing with multiple imported components, this certainly makes things cleaner :broom:
90/100 100daysofcode Flutter
Tags: 100daysofcode
Published: 2020-06-07 01:34:41

day 90/100 of #100daysofcode #Flutter
Learning Flutter , courses Udemy from
@maxedapps

Today implements some future builder, firebase instance, some logic,
https://github.com/triyono777/100-days-of-code/blob/master/log.md
Thank you Adam Johnson !!
Tags: django, python
Published: 2020-06-07 01:09:39

###That time of the year 🙋‍♂️

I'm only left with few months to finish the Bsc of Computer Science (Honours) degree AND I'm working on my final year project using Django/Python. 


###Hey Man !!!
I don't know how to reward you Adam but the piece of resources you shared with me through blogs, PyCon talks, chatting on WhatsApp and email changed my life. Hopefully, at the end of the year, I will obtain my second Computer Science qualification at the University Of Namibia.Thank you, you played a role in my journey.
  
### Y'All
If you are an upcoming or aspiring web developer or you want some cool stuff about Django and Python i recommend to visit Adam Johnson website for blog post that cover plenty of topics.
[Find him here](https://adamj.eu/)
### Who is Adam?
```py
✍️ I'm an author and "solo consultant" working with Ansible, AWS,
 Django, and Python.
🦄 I'm a member of the Django project Technical Board (2.2, 3.0, and 3.1 release cycles), 
and a co-organizer of the The London Django Meetup.

New Book: “Speed Up Your Django Tests”

Released on the 18th May, my new book has lots of advice to 
make your Django project's tests faster. 
```

```py
We first met in Cardiff at PyCon UK 2018 and again in Namibia for our PyCon.
He's always behind my back, pushing me, advising me.
He's one of the special people in my life.
I like his way of doing things, writing cool stuffs and always on point. 
```

Thanks Adam