teleren/devto huggingface dataset:
Ledger Cli Cheat Sheet
Tags: ledger, cheatsheet
Published: 2021-05-13 08:13:02


### References
*    [http://ledger-cli.org/3.0/doc/ledger3.html](http://ledger-cli.org/3.0/doc/ledger3.html)
*   [https://gist.github.com/agaviria/3317397](https://gist.github.com/agaviria/3317397)
* [Ledger Cli Cheat Sheet](https://cheatsheetmaker.com/ledger-cli) - [Cheat Sheet Maker](https://cheatsheetmaker.com)

### Effective dates
```
2008/01/01=2008/01/14 Client invoice  ;  estimated date you'll be paid
  Assets:Accounts Receivable            $100.00
  Income: Client name
```

Say you're in business. If you bill a customer, you can enter something like above. Then, when you receive the payment, you change it to:

```
2008/01/01=2008/01/15 Client invoice ;  actual date money received
  Assets:Accounts Receivable            $100.00
  Income: Client name﻿
```
### Display

```bash
-n, --collapse       # [register] collapse entries
                     # [balance] no grand total
-s, --subtotal       # [balance] show sub-accounts
                     # [other] show subtotals
--flat
```

### Queries

    ^regex$
    @payee
    %tag
    %tag=value
    =note
    #code
    term and term
    term or term
    not term
    \( term \)

Example:

    ledger r ^expenses and @Denny's
    ledger r food and @Starbucks and not dining

### Filters

```bash
-b, --begin DATE
-e, --end DATE

-d payee =~ /pioneer/

-C, --cleared    # (with *)
-U, --uncleared  # (no *)
    --pending    # (with !)

-R, --real       # ignore virtual postings (eg: "(Cash)  $-400")
-L, --actual     # no automated postings (eg: "= /^Income/")

-r, --related   # show the other side
                # "reg -r savings" shows where it comes from)
```

### Register

```bash
$ ledger reg
```
{: .-setup}

```bash
  -D, --daily
  -W, --weekly
  -M, --monthly
      --quarterly
  -Y, --yearly
  -s, --subtotal
  --start-of-week monday
```

```bash
  -S, --sort date
  -S, --sort amount
```

### Periods

```
[interval] [begin] [end]
```

```
interval:
  every day|week|month|quarter|year
  every N days|weeks|...
  daily|weekly|...
```

```
begin:
  from <spec>
end:
  to <spec>
```

```
spec:
  2004
  2004/10/1
```

```bash
$ ledger bal|reg --period "until aug"
$ ledger bal|reg --period "last oct"
$ ledger bal|reg --period "every week"
```
{: .-setup}

### Comments

    ; line comment
    # also line comment
    % also line comment
    | also line comment
    * also line comment

Querying
--------

### Budgeting

```
~ Monthly
  Expenses:Rent  $500
  Expenses:Food  $100
  Expenses        $40 ; everything else
  Assets

~ Yearly
```

```bash
ledger bal --budget Expenses
ledger bal --unbudgeted Expenses
```
{: .-setup}

### Commodity definitions

```
commodity $
  note American Dollars
  format $1,000.00
  nomarket
  default
```
Rsync Cheat Sheet
Tags: rsync, cheatsheet
Published: 2021-05-13 07:59:06

### Archive options

```bash
-a, --archive    # archive (-rlptgoD)
```

```bash
-r, --recursive
-l, --links      # copy symlinks as links
-p, --perms      # preserve permissions
-t, --times      # preserve times
-g, --group      # preserve group
-o, --owner      # preserve owner
-D               # same as --devices --specials
```

```bash
--delete         # Delete extra files
```

### Include options

```bash
--exclude=PATTERN
--include=PATTERN
```

```bash
--exclude-from=FILE
--include-from=FILE
--files-from=FILE    # read list of filenames from FILE
```

```bash
-C, --cvs-exclude    # exclude from local/global .cvsignore
```

### Backup options

```bash
-b, --backup           # backup with suffix
    --suffix=SUFFIX    # default ~ without --backup-dir
    --backup-dir=DIR
```

### Skipping options

```bash
-u, --update     # skip files newer on dest
-c, --checksum   # skip based on checksum, not mod-time & size
```

### Display options

```bash
-q, --quiet
-v, --verbose
    --stats
-h, --human-readable
    --progress
-P                     # same as --partial --progress
```

### Transfer options

```bash
-z, --compress
-n, --dry-run
    --partial   # allows resuming of aborted syncs
    --bwlimit=RATE    # limit socket I/O bandwidth
```

### OSX

```bash
--exclude '.Trashes'
--exclude '.Spotlight-V100'
--exclude '.fseventsd'
```

### Basic example

```bash
# syncing folder src into dest:
rsync -avz ./src /dest
# syncing the content of src into dest:
rsync -avz ./src/ /dest
```

### Reference

* [Rsync Cheat Sheet](https://cheatsheetmaker.com/rsync) - [Cheat Sheet Maker](https://cheatsheetmaker.com)
Laravel 8 File Upload Full Example Tutorial

Tags: laravel, programming, php, tutorial
Published: 2021-05-13 07:54:51

<p>Hi Friends,</p>
	
<p>In This Tutorial, I will learn you example of laravel 8 file upload example. I’m going to show you about file upload in laravel 8. this example will help you laravel 8 upload file to database. This article goes in detailed on how to upload and exhibit file in laravel 8. Here, Engendering a rudimentary example of laravel 8 file upload with preview.</p>

<p>Now We Will, In this tutorial, we will create two routes one for get method and second one is post method. we engendered simple form with file input. So you have to simple select file and then it will upload in "file" directory of public folder. So you have to simple follow bellow step and get file upload in laravel 8 application.</p>

<p>Here, I will give you full example for laravel 8 file upload as bellow.</p>

<strong class="step">Step 1 : Install Laravel 8</strong>
<p>First of all, we need to create laravel 8 project application using bellow command because of we are going from scratch, So open your terminal OR command prompt and run bellow command:</p>

<pre class="prettyprint">
composer create-project --prefer-dist laravel/laravel blog
</pre>

<strong class="step">Step 2: Create Routes</strong>
<p>After Install laravel 8 new project we next step, we will add new two routes in web.php file. One route for generate form and another for post method So let's simply create both route as bellow listed:</p>
<pre class="prettyprint">
&lt;?php

use Illuminate\Support\Facades\Route;

use App\Http\Controllers\FileUploadController;


// FileUploadController Route
Route::get("file-upload",[FileUploadController::class,'file_upload'])->name("file.upload");
Route::post("filestore",[FileUploadController::class,'filestore'])->name("file.store");
</pre>

<strong class="step">Step 3: Create FileUploadController</strong>

If you want to see full example follow this link guys...

https://codingtracker.blogspot.com/2021/05/laravel-8-file-upload-full-example.html
How to Detect Symbols & spaces With RegEx!
Tags: javascript, regex
Published: 2021-05-13 07:46:20

### Regex Is Awesome, I am learning regex.
> A good Example is to make a simple symbol & space detector with RegEx!
> You can use RegExp in javascript

Use `\W` in RegExp to detect symbols & spaces.
& use `.match()` in Javascript to search for the symbols.

A RegExp is can be written as a pattern: /\W/g

###### Example In Javascript
```javascript
   var text = prompt("Enter a Name (symbols & spaces not allowed!)"); // Take user Input.
   if(text.match(/\W/g) == null){ // Check if there are spaces, symbols.
     alert("Good Name!!"); // If valid.
   }else{
     alert("Bad Name!! Remove Those Spaces And Symbols!"); // If Invalid
   }
```
Recap Javascript Basics
Tags: javascript
Published: 2021-05-13 07:23:11

Here I'll discuss 10 things about javascript. 

## 1. Truthy and Falsy values

#### Truthy values are: 

* Any number except 0 (zero) is truthy.
` const a = 12;`

* Any string that contains some value (at least white space) is truthy.
`const a = 'something'; `
or
`const a = ' '; // a white space`

* Empty array is truthy.
`const array = [];`

* Empty object is truthy.
`const obj = {};`

* Empty function is truthy.
`function functionName () {}; `
or 
`const functionName = () => {};`

#### Falsy values are:

* Integer 0 (zero) is falsy.
`const number = 0;`
* Empty string is falsy.
`const foo = ''; `
* `undefined` is falsy.
* `null` is falsy.
* `NaN` (Not a Number) is falsy.
* `false` keyword is falsy.


### 2. Javascript double equal sign (==) vs triple equal sign (===)

#### Double equal sign usages:

| Double equal sign               			| Triple equal sign           				|
| ----------------------------------------------------- |:-----------------------------------------------------:|
| Double Equals (==) checks for value equality only  	| Triple Equals (===) does not convert type 		|
| Does type coercion inherently.			| Does not perform type coercion.			|
| That means before checking value, it converts the types of the variables to match each other | It verifies whether the variable is being compared have both the same value AND the same type. |

### 3. Scope and Block Scope in Javascript

#### Scope
Scope determines the accessibility of a variable declared in the area of your code. There are three types of scope. These are Global Scope, Local Scope, Function Scope, Block Scope, Lexical Scope. 
I'm gonna discuss two of them.

##### Global Scope
The area outside all the functions 
 considered the global scope and the variables defined inside the global scope can be accessed and altered in any other scopes.

```
//global scope
const fruit = 'apple'
console.log(fruit);        //apple

const getFruit = () =>{
    console.log(fruit);    //fruit is accessible here
}

getFruit();                //apple

```

#### Block Scope
The concept of block scope is introduced in ES6 together with the new ways to declare variables -- const and let.

```
const foo = () =>{
    if(true){
        var fruit1 = 'apple';        //exist in function scope
        const fruit2 = 'banana';     //exist in block scope
        let fruit3 = 'strawberry';   //exist in block scope

    }
    console.log(fruit1);
    console.log(fruit2);
    console.log(fruit3);
}

foo();
//result:
//apple
//error: fruit2 is not defined
//error: fruit3 is not defined
```
The Beginner's Guide to Real-World React
Tags: react, webdev, javascript, news
Published: 2021-05-13 07:02:05

🚨 HUGE ANNOUNCEMENT ALERT 🚨

My shiny new course, [The Beginner's Guide to Real-World React](https://www.newline.co/courses/beginners-guide-to-real-world-react/) is live 🥳

![Beginners Guide to Real-World React course cover](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m35vck3uz6cmr232s5sm.png)

If you've been wanting to learn React or struggling to get going then this course is a perfect place to start!

In the course you'll take a deep dive into core React concepts as you learn more about how React works, how you can use it to build complex web applications, and how to combine it with third-party libraries and frameworks to 'join the dots' and gain a detailed understanding of how you might use React in a real world setting.

You'll get:

- 8+ hours of video
- 50 lessons
- loads of practical React advice
- ...and more

Great for beginners, the link's below with 50% off for a limited time

Check it out here, on the [Newline course page](https://www.newline.co/courses/beginners-guide-to-real-world-react/).
Error: Expo validation using react-native-form-validation
Published: 2021-05-13 07:01:35

This is react expo project and the error appeared when using react-native-form-validation for validation.

<Input
    value={fullName}
    label="Full Name"
    captionTextStyle={styles.captionTextStyle}
    caption={errors.fullName.length > 0 && errors.fullName}
    status={errors.fullName.length > 0 ? "danger" : ""}
    onChangeText={value => this.handleChange("fullName", value)}
/>
This is one part of validation Input using react-native-ui-kitten.

The error runs because all the texts in input like labels and inputting texts.

I didn't find the reason why this error happened.

"""Error:
10:03
fontFamily "$text-font-family" is not a system font and has not been loaded through Font.loadAsync.

- If you intended to use a system font, make sure you typed the name correctly and that it is supported by your device operating system.

- If this is a custom font, be sure to load it with Font.loadAsync.
"""

This is urgent problem... please help me. Thanks.
How many applications did it take for you to find your first dev job?
Tags: watercooler, career, beginners
Published: 2021-05-13 06:36:16

---
title: How many applications did it take for you to find your first dev job?
published: true
description: 
tags: watercooler, career, beginners
cover_image: https://cdn.dribbble.com/users/1099579/screenshots/5984168/09-dribbble-unfit-applications-2_still_2x.gif?compress=1
---
I've heard of hundreds of applications with no success, as well as cases with no applications at all thanks to internships or contacts in the field.

Thought this could be motivational for beginners, so could you recall how many applications did it take for you to find your first developer job?
Do you use Docker?
Tags: watercooler, docker, productivity
Published: 2021-05-13 06:20:55

---
title: Do you use Docker?
published: true
description: 
tags: watercooler, docker, productivity
cover_image: https://www.devonblog.com/wp-content/uploads/2020/07/docker-bg.png
---
Docker is a platform for building apps based on containers — small and lightweight execution environments that make shared use of the operating system kernel but otherwise run in isolation from one another.

Do you use Docker in your projects?
array and pointers
Published: 2021-05-13 06:20:35

Arrays and pointers are closely related in C. An
array declared as
int A[10];
can be accessed using its pointer representation. The name
of array A is a constant pointer to the first element
of the array. So A can be considered a const int*. Since A
is a constant pointer, A = NULL would be an illegal
statement.
Other elements in the array can be accessed using their
pointer representation as follows.
&A[0] = A
&A[1] = A + 1
&A[2] = A + 2
…..
&A[n-1] = A + n-1
If the address of the first element in the array of A (or
&A[0]) is FFBBAA0B then the address of the next element
A[1] is given by adding 4 bytes to A.
That is
&A[1] = A + 1 = FFBBAA0B + 4 = FFBBAA0F
And
&A[2] = A + 2 = FFBBAA0B + 8 = FFBBAA13
Note that when doing address arithmetic, the number of
bytes added depends on the type of the pointer. That is
int* adds 4 bytes, char* adds 1 byte, etc. You can type in
this simple program to understand how a 1-D array is
stored.
Array of Pointers
C arrays can be of any type. We define an array of ints,
chars, doubles, etc. We can also define an array of pointers
as follows. Here is the code to define an array of n char
pointers or an array of strings.
char* A[n];
each cell in the array A[i] is a char* and so it can point
to a character. You should initialize all the pointers (or
char*) to NULL with
for (i=0; I <n; i++)
A[i] = NULL;
Now if you would like to assign a string to each A[i] you
can do something like this.
A[i] = malloc(length_of_string + 1);
Functions that take pointer arguments
Pointers or memory addresses can be passed to a function as
arguments. This may allow indirect manipulation of a memory
location. For example, if we want to write a swap function
that will swap two values, then we can do the following.
void intswap(int* ptrA, int* ptrB){
int temp = *ptrA;
*ptrA = *ptrB;
*ptrB = temp;
}
To use this function in the main, we can write the code as
follows.
int A = 10, B = 56;
int swap(&A, &B);
note that the addresses of the variables A and B are passed
into the int swap function and the function manipulates the
data at those addresses directly. This is equivalent to
passing values by “reference”. It is passing the
values that are addresses instead of copies of variables.
However, this can be dangerous since we are giving access to
the original values.
One way to avoid this situation is to provide only “read”
access to the data using a pointer
compiler for SQL
Tags: sql, compiler, programming
Published: 2021-05-13 06:04:50

In the previous article we saw online compiler for Mongodb and Matlab so in this article we will see <a href="https://pythonslearning.com/2021/05/which-is-best-and-free-online-compiler-editor-for-sql.html">which is online compiler for SQL</a>
Structured Query Language
SQL stands for Structured Query Language. SQL lets you access and manipulate databases. SQL became a standard of the American National Standards Institute (ANSI) in 1986, and of the International Organization for Standardization (ISO) in 1987.
SEE HERE ORIGINAL ARTICLE :
https://pythonslearning.com/2021/05/which-is-best-and-free-online-compiler-editor-for-sql.html
LeetCode 410. Split Array Largest Sum
(javascript solution)
Tags: algorithms, javascript
Published: 2021-05-13 05:54:13

###Description:
Given an array nums which consists of non-negative integers and an integer m, you can split the array into m non-empty continuous subarrays.

Write an algorithm to minimize the largest sum among these m subarrays.

###Solution:
Time Complexity : O(nlog(n))
Space Complexity: O(1)

```javascript
// Binary Search approach
var splitArray = function(nums, m) {
    // Check if the passed in threshold can be the max sum of the subarrays
    function checkIsFeasable (threshold) {
        let count = 1
        let total = 0
        for (const num of nums){
            total += num
            if (total > threshold){
               total = num
                count += 1
                if (count > m){
                    return false   
                }
            }
        
        }
        return true
    }
    // Binary search template
    let left = Math.max(...nums), right = nums.reduce((all, item) => all+item)
    while(left < right) {
        const mid = left + Math.floor((right-left)/2)
        if(checkIsFeasable(mid)) {
            right = mid
        } else {
            left = mid + 1
        }
    }
    return left
};
```
Mid-Life Coding Newbie
Tags: beginners, codenewbie, html, css
Published: 2021-05-13 04:01:28

My name is Will and I do NOT consider myself a coder, but a future hopeful. However, even at the age of 45 with 3 kids, a full time career (not anywhere near coding) and a pretty busy life, I've decided that something I've been toying around with for literal decades is something that MAYBE, just maybe, I might be able to consider as a future.

Even now as I start to write my first blog, I realize how much of a newbie I must be to anyone who might consider reading this. This will probably not be the typical tech blog, full of the usual items from those well versed in programming. However, I'm doing this for my own personal journey into coding and anyone who might be crazy enough to travel along with me on this journey and possibly be inspired to do the same.

A bit of background, I started with computers in the 80s and you probably know what that means, archaic and interesting to say the least. I started messing around at the age of 8 or so either playing with my Atari 2600, using tape drives on Radio Shack computers and learning with basic coding on IBM computers to create simple programs to make moving shapes and such dance on the screen. However, that was short lived and I quickly moved away from programming, while still continuing to be active in computers all throughout my life.

I had many stops and starts over the next few decades toying with the idea, however, it wasn't as easy to do online learning as it is now, especially if you weren't a CS major in college and paying the bills immediately took a front seat. I did not go into CS, but another, unrelated major. Over the last several years, I took a more serious approach to this and have been looking to really get into it, but felt completely lost and "too old" to NOW learn to code and translate that into a career.

Starting in 2017, I found FreeCodeCamp.org and it seemed like a great place to start to dive into this and see if it was something I really wanted to do. I went through the beginning content for a while and again stopped and started over the last few years, mostly trying to overcome the thoughts I was too old and trying to convince myself that this was something I could really do, even in some sort of freelance/side gig method, instead of trying to transition to a full time career.

Over the next few posts, I'll explain a bit more of these past experiences I've had and to go into more detail of what I've done specifically over the last few years and what my plan is going forward. As I go through my personal experiences trying to learn coding through a self paced, self learning process, I'll take you along with me.
How to set Git Bash as integrated terminal in VSCode in 2021
Tags: vscode, webdev, bash
Published: 2021-05-13 05:36:23

```json
  "terminal.integrated.profiles.windows": {
    "PowerShell": { "source": "PowerShell", "icon": "terminal-powershell" },
    "Command Prompt": {
      "path": [
        "${env:windir}\\Sysnative\\cmd.exe",
        "${env:windir}\\System32\\cmd.exe"
      ],
      "icon": "terminal-cmd"
    },
    "GitBash": {
      "path": ["C:\\Program Files\\Git\\bin\\bash.exe"],
      "source": "Git Bash",
      "icon": "terminal-bash"
    },
    "terminal.integrated.defaultProfile.windows": "GitBash",

```
As of April 2021 "terminal.integrated.shell.windows" is deprecated in VSCode.

```json
"terminal.integrated.shell.windows": "C:\\...\\...\\bin\\bash.exe",
```

## To configure Git Bash as the default integrated terminal in VSCode version 1.56 on Windows 10

Step 1: Open command palette (CMD + Shift + P)
Step 2: Search "Preferences: Open User Settings (JSON)"
Step 3: Create a new field by typing "" (double quotation key). Inside the quotation type "terminal." a list of options will appear.
Step 4: Select  `terminal.integrated.profiles.windows`. When you select `terminal.integrated.profiles.windows` it will be expanded to:


```json
"terminal.integrated.profiles.windows": {
  "PowerShell": {
    "source": "PowerShell",
    "icon": "terminal-powershell"
  },
  "Command Prompt": {
    "path": [
      "${env:windir}\\Sysnative\\cmd.exe",
      "${env:windir}\\System32\\cmd.exe"
    ],
    "args": [],
    "icon": "terminal-cmd"
  },
  "GitBash": {
    "source": "Git Bash",
    "path": ["C:\\Program Files\\Git\\bin\\bash.exe"],
    "icon": "terminal-bash"
  }
},
```

Step 5: Set default terminal to Git Bash 

```json 
  "terminal.integrated.defaultProfile.windows": "GitBash",
```
**IMPORTANT** 
The defaultProfile.windows value must be one word to work. 

```json
  "terminal.integrated.profiles.windows": {
    "PowerShell": {
    "source": "PowerShell",
    "icon": "terminal-powershell"
  },
    "Command Prompt": {
      "path": [
        "${env:windir}\\Sysnative\\cmd.exe",
        "${env:windir}\\System32\\cmd.exe"
      ],
      "icon": "terminal-cmd"
    },
    "Git Bash": {
      "path": ["C:\\Program Files\\Git\\bin\\bash.exe"],
      "source": "Git Bash",
      "icon": "terminal-bash"
    },
  }, 
  "terminal.integrated.defaultProfile.windows": "Git Bash",
```
**Does not work!** 


// End

## Documentation: 
- [VSCode version 1.56 Release Notes](https://code.visualstudio.com/updates/v1_56#_terminal)
https://code.visualstudio.com/docs/editor/integrated-terminal#_windows
- [Troubleshoot Terminal launch failures](https://code.visualstudio.com/docs/supporting/troubleshoot-terminal-launch)

## Related
- [How to setup Cmder in VSCode in 2021](https://dev.to/andrewriveradev/how-to-setup-cmder-in-vscode-in-2021-3nkc)
- [Shell Launcher: Easily launch multiple shell configurations in the terminal](https://marketplace.visualstudio.com/items?itemName=Tyriar.shell-launcher)
Matlab compiler
Tags: matlab, compiler, programming
Published: 2021-05-13 05:26:54

Hello friends, in the previous article we saw how to use python online compiler so in this article we will see <a href="https://pythonslearning.com/2021/05/which-is-free-online-compiler-or-editor-for-matlab.html">Which is online compiler for MATLAB</a>
Matlab is programming language mostly used for image processing application
Resources : compiler your program from <a href="https://pythonslearning.com/2021/05/which-is-free-online-compiler-or-editor-for-matlab.html">Matlab online compiler</a>