teleren/devto huggingface dataset:
Shortcut to a Folder - Command Prompt
Tags: tutorial, productivity, devops, todayilearned
Published: 2020-03-12 22:19:38

Find yourself going to a particular folder quite often? Here's a quick and dirty way to set up a command shortcut for Windows Command Prompt to get to that folder more easily. 

##Step 1 - Run command prompt as an administrator. 
To do this, right-click on the icon - wherever it lives. I have my command prompt pinned to my taskbar. A menu will appear - depending on where it lives, the "Run as Administrator" option may be available on that first menu, or you may need to keep digging by right-clicking on "Command Prompt" again.

##Step 2 - Create a file in `C:\WINDOWS\system32`.
If the command prompt window doesn't already show that you're in the `System32` folder, navigate there using the `cd` command.

```cd C:\Windows\System32```

There are a number of ways to create a new file through the command line, but here is a simple command to use:

```copy con filename.cmd```

When you press ENTER, the cursor will hop down to the next line. This is the beginning of the text going into your file. As a note, the **filename** above is the command you'd like to use. For example, if you want to go to your project's folder you could use go_project_name as the file name (don't forget the `.cmd`)

##Step 3 - Add the directory information to the file.
Let's say my project's name is Listly and it's lives on my Desktop. I'd create the file:

```copy con go_listly.cmd```

On the next line, I'd type `cd /d file_path` (the `/d` is optional and allows you to change directories across different drives). 

```cd /d C:\Users\Mindy\Desktop```

Then type `Ctrl` + `Z` to save, and ENTER to finish creating the file. 

##Step 4 - Use the Shortcut!
And you're all set! Simply type your new shortcut anytime you're in your command prompt and you'll be redirected to your folder. 

**Command well, my friends!**
Good Commit Messages
Tags: softwaredevelopment, collaboration, learninpublic
Published: 2020-03-12 22:03:05

There has been a lot written about how to write good commit messages. There are rules, tools, and syntactic considerations.

> "I think the best practices for commit message formatting is one of the little details that makes Git great."
> -[Tim Pope, A Note about Git Commit Messages](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)

> "The contributors to these repositories know that a well-crafted Git commit message is the best way to communicate context about a change to fellow developers (and indeed to their future selves)."
> -[Chris Beams, How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/)

> "The most important part of a commit message is that it should be clear and meaningful. In the long run, writing good commit messages shows how much of a collaborator you are."
> -[Bolaji Ayodeji, How to Write Good Commit Messages: A Practical Git Guide](https://www.freecodecamp.org/news/writing-good-commit-messages-a-practical-guide/)

> "If it seems difficult to summarize what your commit does, it may be because it includes several logical changes or bug fixes, and are better split up into several commits using `git add -p`."
> -[Erlang/OTP, Writing good commit messages](https://github.com/erlang/otp/wiki/writing-good-commit-messages)

> "Getting in the habit of creating quality commit messages makes using and collaborating with Git a lot easier."
> -[Git Book, Distributed Git - Contributing to a Project](https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project)

> "Commitizen is an open source project that helps contributors be good open source citizens."
> -[Commitizen, a CLI tool to help you generate commit messages](http://commitizen.github.io/cz-cli/)

> "A diff will tell you _what_ changed, but only the commit message can properly tell you _why_."
> -[Chris Beams, How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/)

At the end of the day, the biggest thing is: are your commit messages an extension of your teams communication. Do they help convey understanding at this moment as well as in the code review process and will they provide guidance in a future code investigation.
How To Improve Your Problem-Solving Skills
Tags: career, beginners, codenewbie
Published: 2020-03-12 21:56:52

Alice just finished her first development course, she wanted to continue learning and getting more in-depth knowledge about the universe of possibilities that programming offered her.

She also wanted a job, and deciding to build a portfolio was her best choice to be able to do some interviews as soon as possible.

### **How did she start?**

At first, she began using what she learned in the course. Then, she continued to mix that content with the answers she found while searching for the problems that started to arise.

![Image that symbolizes the beginning of her career, a little kid in front of a bunch of stairs](https://dev-to-uploads.s3.amazonaws.com/i/in5bwmqkmjhcvirvl4xi.jpeg)

A lot of challenges were appearing in front of her, and that’s when she realized that there was one important thing that the course didn’t teach her.


### **Problem-solving**

_Problem-solving is one of the most valued soft skills a programmer should have in their toolbox, and Alice was just training to become a better problem solver without even knowing it._

She got really good at it while building her portfolio, and that wasn’t the only thing learned, she also got to know new tools, concepts, tricks, etc.

![Image that symbolizes problem-solving, a person holding a rubik cube](https://dev-to-uploads.s3.amazonaws.com/i/singa3et0745uaaxcpmk.jpeg)

Once she finished her portfolio, she applied to a few jobs and ended up working in one of the companies she wanted the most.

She continued learning, and, over the years, she built an amazing career! Mainly because creating things led her to improve her problem-solving skills along with other hard skills she learned on the go. 

When people ask Alice how it was when she started coding, she always talks about how she got through her first portfolio and how improving your problem-solving skills can boost your career.

![Image that symbolizes success, a person jumping with a happy pose](https://dev-to-uploads.s3.amazonaws.com/i/qwgfzewvcf9wcqfohsb1.jpeg)

---

That’s the story of Alice, If you’re starting with programming, I recommend you to follow her advice so...

### **Go and build some projects while improving your problem-solving skills at the same time!**

If you don’t know what to build, here’s a repository with a lot of things that you can start building after you finish reading this post:

{% github karan/Projects %}

Also, there are other soft skills that are indispensable if you want to build a successful career, you may want to learn about them too: [10 Soft Skills Every Developer Needs from Hackernoon](https://hackernoon.com/10-soft-skills-every-developer-needs-66f0cdcfd3f7). 

---

_Reach me on [Twitter](https://twitter.com/HorusGoul) if you build something amazing, I usually share stuff about my future articles, projects or whatever I come up with!_
str_replace() Function
Tags: php
Published: 2020-03-12 21:28:05

The str_replace() is a built-in function in PHP and is used to replace all the occurrences of the search string or array of search strings by replacement string or array of replacement strings in the given string or array respectively.

Syntax:

str_replace ( $searchVal, $replaceVal, $subjectVal, $count )
Parameters: This function accepts four parameters out of which 3 are mandatory and 1 is optional. All of these parameters are described below:

If the $searchVal and the $replaceVal arguments are arrays, then all the elements of the $searchVal argument are searched in the $subjectVal string and replaced by the corresponding elements in the $replaceVal argument. If number of elements in $replaceVal is less than that in $searchVal array, then if there are any occurrences of the additional elements of $searchVal argument in the $subjectVal argument then they will be replaced by an empty string. If the $subjectVal parameter is also an array instead of string then all of the elements of $subjectVal will be searched.


[read more](https://www.sarkariresulti.com)
🎥 Video Snippets: [3 => Cookies] 🍪
Tags: beginners, todayilearned, todayisearched, codenewbie
Published: 2020-03-12 21:01:12

At its core, a cookie is a name-value pair. We can do several things with cookies. From determining when the cookie can expire to whether the cookies can be sent along with certain user requests to different domains,  there are many possibilities.

A cookie can be set with one line of code:

<code>document.cookie= `${key}=${value};`</code>

<kbd>Source: <a href="https://www.youtube.com/watch?v=j0PpT96EFeg"> Smart Understanding Browser Cookies</a></kbd>
CSS: Overlay Text Over Image
Tags: css, html, tutorial, webdev
Published: 2020-03-12 20:46:40

 

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

This example is from the mobile version of a personal website I'm building with HTML/CSS and vanilla JavaScript.

To overlay an element over another, we first need to understand `z-index`.

## Z-Index

`z-index` is a CSS property that sets the order of elements in a stack.

* Only works on elements with positions other than static (the default position). They could be absolute, relative, fixed, or sticky.


Let's say your computer's screen is the back, the real world is the front, and every element on your app without a specified z-index is the default layer. If you want to throw something to the back, the z-index will be smaller than 0. The element with the smallest number will go furthest back. If you want to put an element over the default layer, then you use positive numbers. The bigger the number, the closer to the front it will be.

* Elements are overlayed in ascending order.

* The default layer is equal to `z-index: 0`.

* Negative values of z-index throw elements behind the default layer.

* The element with the smallest z-index value will be all the way to the back.

* Positive values throw elements on top of the default layer.

* The element with the biggest number will be all the way to the front.

## Example

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


Here, I sent the image to the back by setting the `z-index` to -1. I didn't have to specify a `z-index` value to my text because it is by default on layer 0, which is above layer -1.

See it on [codepen](https://codepen.io/leira-sanchez/pen/YzXejqX)! Disclaimer: I did not make this codepen responsive so it only looks good on desktop.

## Playground 
Here's a playground on [codepen](https://codepen.io/leira-sanchez/pen/ZEGxzpe) or [repl.it](https://repl.it/@leira_sanchez/OlivedrabEmptyTechnology) for you to experiment with.
Flutter url_launcher
Published: 2020-03-12 20:27:01

Um plug-in Flutter para abrir uma URL na plataforma mobile. Suporta iOS e Android.
## Use este pacote como uma biblioteca
### Adicione esta dependência
Adicione isto ao seu pacote pubspec.yaml file:
```yaml
dependencies:
  url_launcher: ^5.0.3
```
### Instale
Você pode instalar pacotes a partir da linha de comando:

com Flutter:
```
$ flutter pub get
```
Como alternativa, seu editor pode suportar flutter pub get. Verifique os documentos do seu editor para saber mais.
### Importe onde sera utilizado
Agora em seu código Dart:
```dart
import 'package:url_launcher/url_launcher.dart';  
```
## Utilização
### Exemplo
```dart
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';

void main() {
  runApp(Scaffold(
    body: Center(
      child: RaisedButton(
        onPressed: _launchURL,
        child: Text('Show Flutter homepage'),
      ),
    ),
  ));
}

_launchURL() async {
  const url = 'https://flutter.io';
  if (await canLaunch(url)) {
    await launch(url);
  } else {
    throw 'Could not launch $url';
  }
}
```
### Esquemas de URL suportados
O método de lançamento usa um argumento de string contendo um URL. Essa URL pode ser formatada usando vários esquemas de URL diferentes. Os esquemas de URL suportados dependem da plataforma subjacente e dos aplicativos instalados.

Esquemas comuns suportados pelo iOS e pelo Android:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/20a09vkcczu21i2l58jr.PNG)
Para mais detalhes [iOS](https://developer.apple.com/library/content/featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html) e [Android](https://developer.android.com/guide/components/intents-common.html)
## Como lidar com receptores de URL ausentes
Um determinado dispositivo móvel pode não conseguir receber todos os esquemas de URL suportados. Por exemplo, um tablet pode não ter um rádio celular e, portanto, não há suporte para iniciar um URL usando o esquema sms, ou um dispositivo pode não ter um aplicativo de e-mail e, portanto, não há suporte para iniciar um URL usando o esquema de e-mail.

Recomendamos verificar quais esquemas de URL são suportados usando o método canLaunch antes de chamar a inicialização. Se o método canLaunch retornar false, sugerimos que você ajuste a interface do aplicativo para que o URL não suportado nunca seja acionado; por exemplo, se o esquema de email não for suportado, um botão da interface do usuário que enviaria email pode ser alterado para redirecionar o usuário para uma página da web usando uma URL seguindo o esquema http.
## Browser vs In-app
Por padrão, o Android abre um navegador ao manipular URLs. Você pode passar o parâmetro forceWebView: true para dizer ao plug-in para abrir um WebView. No iOS, o comportamento padrão é abrir todos os URLs da Web dentro do aplicativo. Tudo o resto é redirecionado para o manipulador de aplicativos.
Texto traduzido da documentação oficial https://pub.dev/packages/url_launcher#-readme-tab-
Flutter – Migrar para o AndroidX
Published: 2020-03-12 20:20:23

O Android agora utiliza um novo sistema de bibliotecas de compatibilidade, chamada AndroidX.
Pode ser que seja necessário habilitar o AndroidX no seu projeto, devido à necessidade de alguns plugins. Pra fazer isso, basta seguir os seguintes passos:

No arquivo android/gradle/wrapper/gradle-wrapper.properties troque a linha que começa com distributionUrl desta forma (pode ser que no seu projeto já esteja da forma correta):
```
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
```
No arquivo android/build.gradle, troque:
```java
dependencies {
    classpath 'com.android.tools.build:gradle:3.2.1'
}
```
por
```java
dependencies {
    classpath 'com.android.tools.build:gradle:3.3.0'
}
```
No arquivo android/gradle.properties, adicione as seguintes linhas:
```java
android.enableJetifier=true
android.useAndroidX=true
```
No arquivo android/app/build.gradle:

Dentro de android {, certifique-se de que o seu compileSdkVersion e targetSdkVersion estão com o valor 28.

No arquivo android/app/build.gradle, substitua a linha
```java
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
```
por
```java
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
```
Dentro de dependencies {, substitua as linhas
```java
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
```
Pronto!
How to import large Plaso file into Timesketch in Docker
Tags: docker, plaso, timesketch, forensics
Published: 2020-03-13 06:40:30

---
title: How to import large Plaso file into Timesketch in Docker
published: true
date: 2020-03-12 20:20:22 UTC
tags: docker,plaso,timesketch,forensics
canonical_url: https://ofdigitalwater.postach.io/post/how-to-import-large-plaso-file-into-timesketch-in-docker
---

Sometimes [Timesketch](https://github.com/google/timesketch/), being run in [Docker](https://www.docker.com/), hiccups when importing a [Plaso](https://github.com/log2timeline/plaso) file too large, like in the [issue #1060](https://github.com/google/timesketch/issues/1060). You can still upload the file using this shell script:

```sh
#!/bin/sh
#
# Run this script with timesketch_import_plaso.sh plaso_file [timesketch_container]

if [ $# -eq 0]
then
    echo Run this script with $0 plaso_file [timesketch_container]
    exit 1
fi

DOCKER_PATH="/tmp/`basename $1`"
TIMELINE="`echo $1 | sed -e 's/\.[^.]*$//'`"
CONTAINER=docker_timesketch_1
if [ ! -z "$2"]
then
    CONTAINER=$2
fi

docker cp "$1" "$CONTAINER:/tmp"
docker exec -it "$CONTAINER" psort.py -o timesketch --name "$TIMELINE" "$DOCKER_PATH"
docker exec -it "$CONTAINER" rm "$DOCKER_PATH"

```
React Native WebView
Published: 2020-03-12 20:11:28

Veja como começar rapidamente com o React Native WebView.
## Adicione react-native-webview em suas dependências
```
$ yarn add react-native-webview
```
(ou)

npm
```
$ npm install --save react-native-webview
```
## Link native dependencies
Para react-native 0.60 autolinking cuidará da etapa do link, mas não se esqueça de executar
```
pod install
```
Os módulos do React Native que incluem códigos nativos de Objective-C, Swift, Java ou Kotlin precisam ser “vinculados” para que o compilador saiba incluí-los no aplicativo.
```
$ react-native link react-native-webview
```
iOS:

Se estiver usando cocoapods no diretório ios/ execute
```
pod install
```
Android – react-native-webview version <6: Este módulo não requer nenhuma etapa extra após executar o comando link 🎉

Android – react-native-webview version >=6.X.X: Verifique se o AndroidX está ativado no seu projeto editando android/gradle.properties e adicionando 2 linhas:
```
android.useAndroidX=true
android.enableJetifier=true
```
Para instalação manual do Android, [consulte este artigo](https://engineering.brigad.co/demystifying-react-native-modules-linking-964399ec731b), onde você pode encontrar etapas detalhadas sobre como vincular qualquer projeto nativo de reação.
Para iOS, embora você possa vincular manualmente a maneira antiga usando o tutorial [próprio react](https://facebook.github.io/react-native/docs/linking-libraries-ios), achamos mais fácil usar cocoapods. Se você deseja usar cocoapods e ainda não o configurou, consulte [esse artigo](https://engineering.brigad.co/demystifying-react-native-modules-linking-ae6c017a6b4a).
NOTA: Se você precisar desinstalar o React Native WebView, execute 
```
react-native unlink react-native-webview 
```
to unlink it.

## Importe a visualização da web para seu componente
```javascript
import React, { Component } from 'react';
import { WebView } from 'react-native-webview';

class MyWeb extends Component {
  render() {
    return (
      <WebView
        source={{ uri: 'https://infinite.red' }}
        style={{ marginTop: 20 }}
      />
    );
  }
}
```
Exemplo mínimo com HTML embutido:
```javascript
import React, { Component } from 'react';
import { WebView } from 'react-native-webview';

class MyInlineWeb extends Component {
  render() {
    return (
      <WebView
        originWhitelist={['*']}
        source={{ html: '<h1>Hello world</h1>' }}
      />
    );
  }
}
```
Search Engine VS Web Browser
Tags: google, web, searchengine, webbrowser
Published: 2020-03-12 20:04:05


﻿
Have you ever spent a day without opening Google Chrome or Mozilla Firefox?Have you ever searched about some ambiguous stuff without tapping the google icon?If yes then you are not the part of this magical world and have never felt the wonderful feeling by getting hundreds of results appear at a blink of an eye on just 1 click and all this happens with the smartest inventions of Search Engines & Web browsers.These two are not only helpful for us but also necessary for each other.

But do you really know the exact difference between the two?If not,then you really don't need to worry because this blog will answer all your queries and after that, you'll enjoy using them.

 A Search Engine is actually a web service or a web based tool that helps you to open  other web pages offered by various web servers of your choice.But that is the exact thing a web browser does!Well it is not.A Web browser  is a local machine installed on your computer that gives you access to different websites and web pages whereas a search engine looks for a particular stuff to your requested query,goes through a priority algorithm to locate the best  and relevant results with the available documents or text on the internet and ends up by displaying them in front of you.Both are software programs but you can never approach to a search engine and to the internet without a web browser.

Google,Bing,DuckDuckGo & Yahoo are the common  examples of search engines where Google being the most popular,covers 90% of the market share globally.

Most of the web browsers use Google as their default search engine due to its best search results(SERPs),excellent and quick service.Here is the list of top 5 Web browsers & their market shares. (February 2020)



Top 5 Web browsers 
﻿
Microsoft Edge or Internet Explorer
Google Chrome or Chromium
Apple Safari
Mozilla Firefox
Opera Browser



Source: https://www.w3counter.com/globalstats.php
﻿
So,in spite of just googling entertainment news,shopping trends and research materials,make yourself well aware of what it actually is!

After reading this blog, we can draw a clear line between the two and should realize how they have become an active part of our everyday life.I'll come with some more interesting facts and inspirational personalities.Until then stay connected!

Have a Good Day :)

Source:Google & differencebetween.net
Passando parâmetros para um Stateful Widget no Flutter
Published: 2020-03-12 20:02:57

Aprenda a passar parâmetros para um Stateful Widget no Flutter. Não passe parâmetros para o estado usando seu construtor. Você só deve acessá-los usando this.widget.myField.

```dart
class MyStateful extends StatefulWidget {
  final String foo;

  const MyStateful({Key key, this.foo}): super(key: key);

  @override
  _MyStatefulState createState() => _MyStatefulState();
}

class _MyStatefulState extends State<MyStateful> {
  @override
  Widget build(BuildContext context) {
    return Text(widget.foo);
  }
}
```
Organize your Live Streams and Recordings on one Simple Page
Tags: zoom, wfh, teaching, video
Published: 2020-03-12 19:58:13

---
title: Organize your Live Streams and Recordings on one Simple Page
published: true
description: A simple webpage for coordinating all of your livestreams
tags: Zoom, WFH, teaching, video
canonical_url: https://api.video/blog/video-trends/organize-your-live-streams-and-recordings-on-one-simple-page
---
With thousands of teachers suddenly teaching classes remotely, many new issues arise.  What if your students do not have fast enough internet to use Zoom?  Or cannot install the required software?  How do you share the video recordings?

At [api.video](https://api.video), we've built a portal that can help you quickly organise your videos in one place for your students to watch your livestreams on the web, and also watch all your previous recorded lectures.  Best of all, with our best in class video transcoding service, your lectures can be watched live on connections as slow as 500 KBPS (half of the Zoom requirement!).
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ctd5bmedqig99nln0xwe.png)

You can try out the Portal here with a sample [French101](https://twilight-decorous-mail.glitch.me/?class=li6FBvQINNAm5CmP4HjQxWqN) portal.  At the top of the page is where a video livestream could be watched, and at the bottom are all of the recorded sessions for the class.

## Build your own!

You do not need to have any coding experience to build your own version of this site. Simply follow the [instructions](https://glitch.com/edit/#!/twilight-decorous-mail?path=README.md:1:0) on the Read Me file, and you should have a portal up and running in no time. 

There's also a video walkthrough of the setup:

https://embed.api.video/vod/vi4TrzAqpeNkJSF7pIKvPIjV

How are you coping with teaching remotely?  Are there tools we can help you with?  Join the conversation at (community.api.video)[https://communiy.api.video]. If you're interested in building a site for your class, email me (doug@api.video) for a api.video coupon code.