teleren/devto huggingface dataset:
BOZES - evaluating embedded programming language blocks in Zim
Tags: zim, dotnetcore3, csharp
Published: 2019-11-06 05:00:33

[BOZES](https://github.com/axtens/bozes) provides a mechanism for the evaluation of embedded programming language blocks in a [Zim](https://zim-wiki.org/) document. It has nothing to do with a pinnacle of the same name in Israel.

The project attempts to be cross-platform and has been written in C# targeting .NET Core 3.0.

The Zim document may contain
```
[8th]
42
dup
*
.
[/8th]

[euphoria]
atom a = 42
printf(1, "%d", a * a)
[/euphoria]

[perl]print 42*42[/perl]

[python]print(42*42)[/python]

[bash]
#! /bin/bash
let a=42*42
echo $a
[/bash]
``` 
Each block may be selected and evaluated from a menu selection or menubar click.

The above evaluated becomes
```
[8th]
42
dup
*
.
[/8th]
Result: 1764

[euphoria]
atom a = 42
printf(1, "%d", a * a)
[/euphoria]
Result: 1764

[perl]print 42*42[/perl]
Result: 1764

[python]print(42*42)[/python]
Result: 1764


[bash]
#! /bin/bash
let a=42*42
echo $a
[/bash]
Result: 1764
```
The languages are controlled by a bozes.json file beside the executable which contains, for example, 
```json
{   
    "8th": {
        "Extension": "8th",
        "Binary": "c:\\8th\\bin\\win64\\8th.exe",
        "Tail": "$F"
    },
    "euphoria": {
        "Extension": "ex",
        "Binary": "C:\\Euphoria\\bin\\eui.EXE",
        "Tail": "$F"
    }, 
    "perl": {
        "Extension": "pl",
        "Binary": "C:\\Users\\bugma\\scoop\\apps\\perl\\current\\perl\\bin\\perl.EXE",
        "Tail": "$F"
    },
    "python": {
        "Extension": "py",
        "Binary": "C:\\Users\\bugma\\AppData\\Local\\Microsoft\\WindowsApps\\python.exe",
        "Tail": "$F"
    },
    "bash": {
        "Extension": "sh",
        "Binary": "C:\\Users\\bugma\\scoop\\shims\\bash.EXE",
        "Tail": "-c $f"
    }
}
```
Setting this up in Zim is quite easy. BOZES is a "custom tool" and is added to the custom tools collection using the dialog:

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/pm0ep432j9t4xawtjrsa.png)

I have another instance of BOZES labelled as "BOZES debug" which includes "--debug" just before the `%t`. Invocation of that results in the evaluation of `Debugger.Launch()` and the ability to step through the code in Visual Studio.

Documentation is scanty at the moment.
TIL: How to move a line in Vim
Tags: quicktip, todayilearned, linux, vi
Published: 2019-11-06 11:23:56

---
title: TIL: How to move a line in Vim
published: true
date: 2019-11-06 05:00:00 UTC
tags: quick-tip,til,linux,vi
canonical_url: https://flaviabastos.ca/2019/11/06/til-how-to-move-a-line-in-vim/
---

For a text like the following:

```
This is the line I want to move.
This line should be the first line.
```

In order to move the first line down, in normal mode\* (not edit or _insert_ mode), follow these steps:

- place the cursor at the beginning of the line you want to move – in this case, the first line
- hit `dd` – the line will disappear (it’s the same as using “cut” on a regular text editor)
- move the cursor to where the line should be – in this case, after the second line
- hit `p`

Voilà!

```
This line should be the first line.
This is the line I want to move.
```

NOTES:

- If you are in edit mode and want to go back to normal mode, just hit `ESC`

![Tweet says: "I've been using Vim for about 2 years now, mostly because I can't figure out how to exit it."](https://testfbdotblog.files.wordpress.com/2019/11/exit_vi.jpg?w=574)<figcaption>Twitter profile mocking how non-intuitive is exiting the Vim editor. </figcaption>

For the sake of completeness, if you need to **exit vi** and **save** the changes, hit `:`, followed by `w` (meaning “write”), followed by `q` (meaning “quit”). And if you need to **exit without saving** , hit `:`, followed by `q`, followed by `!`

> _The post _[TIL: How to move a line in Vim](https://wp.me/pa0b0y-5z)_ was originally published at _[flaviabastos.ca](https://flaviabastos.ca/)
Queues
Tags: computerscience, algorithms, datastructures, csharp
Published: 2019-11-06 04:55:52

## Resources

1. [Queue overview](https://www.interviewcake.com/concept/java/queue)
1. [Queue implementation](https://www.geeksforgeeks.org/queue-set-1introduction-and-array-implementation/)
1. [Queue overview and implementation](https://brilliant.org/wiki/queues-basic/)

Takeaways:

* Queues, like IRL (except when a Chat & Cut occurs), are FIFO (First In First Out). As opposed to Stacks, which are LIFO (see previous post).
* Like Stacks, Queues have fast operations: adding (enqueuing), removing (dequeuing), and checking the front (peeking) are all `O(1)` (constant).
* Like Stacks, a Queue's space is `O(n)` (linear).
* Queues can be implemented using arrays, but it's not a great idea* (my implementation is using an array for simplicity). They can also be implemented with Linked Lists.

*The dequeue operation is `O(n)` when using an array. This is because all the elements of the array need to be moved towards the front. In a Linked List implementation, just the Head node needs to get removed, and whatever node it pointed to made the new Head. [This is further explained in the Brilliant article](https://brilliant.org/wiki/queues-basic/).

A good real-world use case for Queues, [per InterviewCake](https://www.interviewcake.com/concept/java/queue):

> Printers use queues to manage jobs—jobs get printed in the order they're submitted

Below you'll find the finished implementation with test code. Please note that the implementation is very simplistic. Elements are never actually removed from the array (as with my prior Stack implementation) - this also means the dequeue doesn't move any elements to the front and is `O(1)`:

{% gist https://gist.github.com/jbolton209/3ff89231ea6280f2feba6ab44be3b93a %}

As always, if you found any errors in this post please let me know!
Didn't get the Job: DEV
Tags: career
Published: 2019-11-06 04:08:30

So, I applied to DEV when they first posted about having an opening for a Software Engineer (All Levels). I saw (All Levels) and immediately rainbows shot out (I'm not going to say where from but just know there was excitement). Searching for jobs as a 3-year hunter and still being a junior is like entering the Pokemon universe and your Ash... 

**(ああ我が神様 — OMG!) No thanks.**

Nonetheless, I threw my hat in because hey I got this I'm "All Levels". For me, this would have been the best first job because this platform is awesome and it is remote. This is the best place for me to voice my opinion about tech, talk to like-minded individuals, and I feel like I'm not enclosed in a sea cavern or something. 

This platform (in my humble opinion) is better than Medium. Now, wait, I know what you're going to say, "Medium is the greatest ever! It has everything.". Yeah it does and I like Medium but it is just way too congested for me. On that platform, you feel like you don't have a voice. It's hard to connect with people and tell your story from a technology perspective. It just has way too much going on. Having a platform just for Developers is a brilliant idea (one I actually wanted to start); but, hey it's here and it serves a purpose for people like me. 

Anyway even though I didn't get the job at Dev doesn't mean I hate this platform or am bitter. I may be a little disappointed but hey I gotta keep trying and moving forward.

**Thanks for reading.**
Explain Offset in CSS Like I'm Five
Tags: explainlikeimfive
Published: 2019-11-06 03:13:24

---
title: Explain Offset in CSS Like I'm Five
published: true
tags: explainlikeimfive
---

Hello there! I have come across this term `offset` in CSS for many times. In my view, I treat it as a way of describing a element `position` in box model but I'm not sure whether it's accurate or not. I have googled it but every page seems to assume readers have grasped this concept. Also, I looked it up in dictionary but I hope there is a definition specifically for CSS. Forgive my asking but English is my second language.
Thanks in advance!
Scrape the web with PUPPETEER and send it to SLACK
Tags: puppeteer, javascript, node
Published: 2019-11-06 02:55:14

---
title: Scrape the web with PUPPETEER and send it to SLACK
published: true
description: 
tags: puppeteer, js, node
---

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/nva44zi1qhg4sf2m5ugn.jpg)
https://www.youtube.com/watch?v=u26dLmg88Ok
Need help!
Tags: javascript, json, html
Published: 2019-11-06 02:52:53

## Hello everybody
### I am a newbie in web devvelopement and want to make a html table with 3 colums from the json array stored in a separate file.
## Currently I  have only html table and it is difficult to manage such a large table by hand and it also makes index file much larger..
so I jast wanted a method to store contetnts of table in a separate json file and then build a table using javascript which would be easier and cleaner to manage..
## so How can I do it?
rsrc - simplify fetch state in React
Tags: react, redux, javascript, opensource
Published: 2019-11-06 02:48:35

Hi all,

My team at Signal Sciences, a web app security startup, has been using React here for over four years. We wanted to streamline writing code to interact with APIs and manage fetch state for our growing team, so we’re here to share our open source tool to help solve this problem.
rsrc is a collection of components that simplifies async fetch state in React. We hope you find it “simply fetching”.

https://building.signalsciences.com/rsrc and https://signalsciences.github.io/rsrc/docs/getting-started/introduction
Setting up a basic express server in E6, bootstrapped with eslint and Airbnb style guide
Tags: newbie, javascript, node, webdev
Published: 2019-11-06 02:37:47

The purpose of this article is to save as a guide to setting up a basic express server. Please check out the attached repository on Github. It provides a simple boilerplate that will help you set up your server.


{% github JackieBinya/Express-server-boilerplate%}

_Thank you for reading this article._
Do You Really Know JavaScript Includes Method?
Tags: javascript, webdev, tutorial
Published: 2019-11-06 02:10:58

[JavaScript](https://buginit.com/category/javascript/) includes method is very handy when you need to search or find something in the array or string, yes it works on both. It returns the Boolean value true if the array contains the value and false if not, and the same applied to the [strings](https://buginit.com/tag/strings/).

### #1 Array Example

```
var array1 = [1, 2, 3];

console.log(array1.includes(2));
// expected output: true

var pets = ['cat', 'dog', 'bat'];

console.log(pets.includes('cat'));
// expected output: true

console.log(pets.includes('at'));
// expected output: false
```

### #1.1 Find by Specific Index

In [JavaScript](https://buginit.com/category/javascript/) include method, you can also find values from specific indexes, as second parameter it receives `fromIndex` for example:


```
var array1 = [1, 2, 3];

console.log(array1.includes(2, 1));
// expected output: true

var array1 = [1, 2, 3];

console.log(array1.includes(2, 2));
// expected output: false
```

In the above example, we are passing `fromIndex` in the second parameter to tell the `include()` method that if the value exists from that specific index.

### To read [Full 9 examples of JavaScript Includes Method click here](https://buginit.com/javascript/do-you-really-know-javascript-includes-method/)
Little trick to use ctags to jump to definition even inside gems like Rails on vim
Tags: vim, rails, neovim
Published: 2019-11-06 01:40:52

If you don't know what is ctags

> Ctags is a programming tool that generates an index file of names found in source and header files of various programming languages. Depending on the language, functions, variables, class members, macros and so on may be indexed. -- Wikipedia

In the case of Ruby you can jump to a method definition, class, etc using  [ctags](http://ctags.sourceforge.net/) which doesn't work 100% of the time but it helps a lot.

# vim

Vim has a native functionality where you can `:tag MyClass` and it opens your class based on the index created by [ctags](http://ctags.sourceforge.net/).

You can extend this functionality as much as you like

```vim
" open tag of the word under the cursor, requires to run "ctargs -R ." before
command! JumpToTag execute ':tag ' . expand("<cword>")

command! JumpToTagOnVsplit :vsplit
      \| execute ':tag ' . expand("<cword>")

command! JumpToTagOnSplit :split
      \| execute ':tag ' . expand("<cword>")

```

but there is one limitation when using Rails and other gems; you can't jump inside them, like `:tag ApplicationRecord`.

# the trick

You can run bundle install and set the path to install gems inside your project so when you run `ctags -R .` all the gems get indexed.

```bash
bundle install --path=vendor/bundle
```

But remember to git ignore them

```
# ~/.gitignore_global
vendor/bundle

```

# gutentags


If you don't like run `ctags -R .` all the time, there is a plugin for vim that runs ctags in the background while you are coding. It's called [vim-gutentags](https://github.com/ludovicchabant/vim-gutentags). All you need to do is install it.



That's it, I hope you enjoyed this little trick to make our lives a bit easier when coding Rails on vim. 👍
SyndyShopping.com For Sale
Tags: php, wordpress
Published: 2019-11-06 00:42:52

<h2>Syndy Shopping is your number one Online Global Shopping solution for drones, wifi security cameras, self-help eBooks,sporting goods & a lot more</h2>          
<b>Seller Bio</b>
           <p> Cameroonian based developer 3 years in web development. Founder of web design agency w3africa</p>
<b>Executive Summary</b>
            <p>Choose from thousands of self-help books, drones, wifi security cameras, sporting goods, electronics, home appliances, fashion items, shoes, mobile phones and lots of products handpicked from the world's top eCommerce websites and online stores</p>
            <b>Highlights</b>
            <p>Specs:<br>
            Referral Store (coded in PHP) fully optimized for products from multiple referrals markets like amazon affiliate market place, eBay partner network, Clickbank, Jumia and a lot more.</p>
            <p>Database with multiple tables where you can upload product frames, images, text, and links directly from amazon without editing their code.</p>
            https://syndyshopping.com/shop
            https://syndyshopping.com/deals
            https://syndyshopping.com/picks
            https://syndyshopping.com/cm/shop
            Wordpress CMS  WooCommerce online store
            https://syndyshopping.com/explore
            Blog best for tech, fashion and general shopping related stories
            https://syndyshopping.com/blog

            <b>Operations</b><p>
            <b>Blogging</b> Just like thisiswhyimbroke.com, posting regular niche related stories will not only bring in traffic but will also retain accumulated traffic. The blog will be designed in such a way that even guess bloggers who wish to write shopping related stories can post as much referral product links in their stories as long as it does not go out of line.
            <b>Social sharing</b> The share buttons on each product are so attractively placed that every visitor will want to try them</p>

            <b>Seller Notes</b>
            I'm a web developer with a unique sense of developing really cool and easy to use stuff. 24/7 developer support
ckeditor image upload laravel 6
Published: 2019-12-20 09:50:56

---
title:  ckeditor image upload laravel 6
published: true
date: 2019-11-06 00:00:00 UTC
tags: 
canonical_url: 
---

Hii DeveloperIn this examplei would like to share with you how to use and install ckeditor with image upload in laravel 6 i will use simple laravel 6 custom image file upload code with ckeditor file upload in laravelI write simple example of laravel 6 custom image or file upload with cke
Why Svelte Should Be Your First Framework
Tags: beginners, svelte, javascript
Published: 2019-11-05 23:39:43

---
title: Why Svelte Should Be Your First Framework
published: true
description:  A Look into Svelte 3 (Svelte.js)
tags: beginner, svelte, javascript
---

Why Use Svelte?

We all know the big three: React, Angular, and Vue. Sure, there are plenty of of other smaller ones as well. 


Why is Svelte? Why is it different? It’s actually not a framework but a compiler with a templating language kinda like Handlebars.js! 
Svelte being a compiler and templating language is what makes it so powerful. The way a Svelte file is set up is very normal to what you are used to in vanilla web development. Not much is needed to get started. Most frameworks require a lot of in depth knowledge from what I have seen.If you have HTML, CSS, and some basic JS(ES6) knowledge you can get started now.

 Here are a few reasons why I think you will love it:
 1.Formatting & Structure
   Svelte files are set up similar to normal web dev projects with some    added goodness.
 2.CSS is scoped
   All the styling for your components are scoped to that component.
 3.Compile Time
   At compile Svelte takes all your code and compiles it into fast and efficient JS. It even removes unused CSS styling. You are left with small bundle and fast code. 

If you really want to dive in and learn I challenge you to first watch Rich Harris give his talk on "Rethinking Reactivity" then go to Svelte.dev and go through the tutorial for a bit. Coding Addict/John Smilga on Youtube has a great video on building a Budget Calculator with Svelte. He also offers a course which is $5 and includes the budget calculator and an e-commerce app. If you want more I would also recommend LevelUpTutorial's Svelte for Beginners course. Scott takes you through Svelte and shows you just how easy it is to build a quiz connected to an API. Acadamind also has a really killer course on Udemy as well. There are tons of ways to learn and get building.
Fix crashing chromium after login
Tags: chrome, crash, chromium
Published: 2019-11-05 23:30:50

---
title: Fix crashing chromium after login
published: true
description: My ungoogled chromium started to crash after logging into a webpage...
cover_image: https://thepracticaldev.s3.amazonaws.com/i/ycnufiv6dy9lrpiesrbj.jpg
tags: #chrome, #crash, #chromium
---
My ungoogled chromium started to crash after logging into a webpage.


> The crashs are caused by the "Do you want to save this password?" dialog. You can disable it in the settings for now. Autofill > Passwords > Offer to save passwords: off


links:
- https://github.com/Eloston/ungoogled-chromium/issues/835
- cover image by Rico_Loeb https://pixabay.com/photos/accident-crash-tree-auto-pkw-2161956/
Fix git to work with pageant keys
Tags: git, ssh, putty
Published: 2019-11-05 23:24:30

---
title: Fix git to work with pageant keys
published: true
description: If pageant (Putty) keys suddenly stop working with your git installation, maybe a missing environement variable is the cause.
tags: #git, #ssh, #putty
cover_image: https://thepracticaldev.s3.amazonaws.com/i/vhgbv12dc4rndzh5zi61.jpg
---

after an update my git clones failed with a permission denied.

```
λ git clone --no-checkout ssh://git@gitlab.com/your-user/your-project.git
Cloning into 'your-project'...
git@gitlab.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
```


i am not sure if its because of having installed putty in `Program Files` which have a space in it but the solution for 
me was to create an environement variable named `GIT_SSH_COMMAND` with the value `"C:\Program Files\Putty\plink.exe"` 
(you need the double quotes `"` in the value!).


![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/beol50wcvbg3kbnyhmrc.png)

after this cloning works again.

side tip: i use Rapid Environment Editor to modify my environement variables.


links:
- cover image by mintchipdesigns https://pixabay.com/photos/boy-facepalm-child-youth-666803/
- stackoverflow info https://stackoverflow.com/questions/35110079/git-bash-and-pageant-are-not-using-keys
- Rapid Environment Editor https://www.rapidee.com/en/about
- shell used https://cmder.net/
Day 27 : Share the Love
Tags: hiphop, code, coding, lifelongdev
Published: 2019-11-05 23:23:57

_liner notes_:
- Professional : Added the ability to vote by text messages to the application I made last week. I did some refactoring to separate out some functions that the various voting methods use.

- Personal : Put together some pieces I've bought from Amazon and had before for something I want to use when I start traveling again. Seems to be working how I intended. Going to record some video with it and see how that turns out. Just waiting on a few more pieces to come in.

![Field of red flowers in Blankenburg, Germany](https://thepracticaldev.s3.amazonaws.com/i/ly6ktvnxke1rceilfgrt.jpg)

Pretty cool on Twitter some folks were sharing the love for the video we streamed at the Orlando Devs meetup. Real nice to see. For the rest of the night, planning on going through some tracks for the radio show and maybe finally start up a blank project for a new website.  

Have a great night and day tomorrow!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube ugTEzkxwAks %}
[001] Create WPF Projects Like a PRO
Tags: csharp, rider, wpf, xaml
Published: 2019-11-05 23:11:28

__TL;DR;__ Read only __bold__ ones you fat.

I bet, you didn't know you can do like this.

[1] A purpose to open a WPF project

[2] JetBrains Rider (No Tonny, Visual Studio is bad for your health.)

[3] Open Rider ♥

[4] Click New Solution

#### [5] Select `.Net Core` (But sir I don't want dotnet core, I want my project in normal regular `NetFramework X.Y` bla bla bla...) Just select the fucking `DotNet Core Desktop Application` I will get there alright.

[6] Check `Create .git` and thank me now.

[7] Finally, hit the `Create` button (Do not forget to give a name to your $0.0F project.)

#### [8] Open the `[projectname].csproj` file. We have work to do.

#### [9] Change `<TargetFramework>` to `<TargetFrameworks>` for supporting more customer and earn more money and do more writing of course.

#### [10] Since you don't want to write with `.Net Core` remove `netcoreapp3.1` and write `net48`
 
[11] For now, you should be able to Build and Run your project and see the worthless Window. Well done!

You might want to add multiple projects for your `Business` or `Core` or `BLL` for your garbage code. 

#### [12] Guess next step. When you are creating new project you will always use `.NetCore` alrigt.

To understand the reasion you can create a regular project and compare `*.csproj` files.

#### [13] Go create a `.NetCore ClassLibrary` and repeat [8], [9] and [10]

#### [14] When you are create a class library on Rider, it does not automatically adds `<UseWPF>true</UseWPF>` like it adds on `DesktopApplication` so add it.

#### [15] Also same goes for `Sdk="Microsoft.NET.Sdk.WindowsDesktop"` too.

#### [16] As last step before write your own code create a class named `AssemblyInfo.cs` with filled with code:

``` XAML
using System.Windows;

[assembly: ThemeInfo(
    ResourceDictionaryLocation.None,
    ResourceDictionaryLocation.SourceAssembly 
)]

```

Now you are good to go.

If you do not do step [14] or [15] or [16] Rider cannot build and complain that you suck and do not deserve to use `JetBrains Rider` so you should go back to use `Visual Studio` like every regular boring developers do. (When Rider fixes this problem, this paragraph will destroy itself.).
Experiecies in Filemaker
Tags: help, filemaker, database, databaseengine
Published: 2019-11-05 23:09:38

---
title: Experiecies in Filemaker
published: true
description: 
tags: help,filemaker,database,database engine
---

I worked with a huge database in SQL Server for a year, developing a ASP.NET application. 
Last week, I started working in a new company that is developing a copy of its actual ERP into Filemaker. I am a bit confused with the Filemaker's paradigm. I think the work flow is everything but intuitive.

Any experience working with Filemaker or any advice to a newbie?