teleren/devto huggingface dataset:
How do people store their spare tech kit?
Tags: discuss
Published: 2019-11-24 10:46:39

---
title: How do people store their spare tech kit?
published: true
description: Over the last 20-30 years I seem to have accumulated quite a collection of tech odds and ends - do other people do this? and if so how do they store it all.
tags: #discuss
---
Hi All

I have a question. Over my time working with computers I seem to have accumulated quite a collection of odds and ends; Old cables of various types, power supplies and transformers, spare network and drive cards, spare or backup hard drives, other useful bits of old computers, multimeters, soldering irons, breadboards, and the like.

At the moment most of it is packaged up in zip lock bags in the drawers of an old desk - but I know this is a far from the ideal answer because even with labelling it takes ages to find things and I'm the only person in the house that can find the spares for things when something breaks.

I've already gone through and ditched everything that is dead, completely redundant or that hasn't proven to be useful in the last year.

How do other people cope? Please share your storage solutions and ideas.
Custom dropdowns with React
Tags: react, reactstrap, component, dropdown
Published: 2019-11-24 11:59:38

Ok if you followed my last post: 
https://dev.to/idiglove/create-custom-components-from-json-with-react-1oeb

I showed there how to create custom components from a json file with React.
How about dropdowns where you need to store its values and each dropdown has its own toggle (if you're using a library like Reactstrap)?

Here's how I did it:

```javascript
const [dropdowns, setDropdowns] = useState({})
const [savedDropdowns, setSavedDropdowns] = useState({})

const toggleDropdown = (i) => {
    setDropdowns({...dropdowns, [i]: !dropdowns[i]})
}

const onChangeDropdown = (value, id) => {
    setSavedDropdowns({...savedDropdowns, [id]: value})
}
```

Inside your function where you render your custom components:

```javascript
<Dropdown 
   isOpen={dropdowns[id]} toggle={() => toggleDropdown(id)}
    >
        <DropdownToggle caret>
            {id}
        </DropdownToggle>
        <DropdownMenu>
            {options.map((o, oi) => {
                return <DropdownItem key={oi} value={o.value}
onClick={() => onChangeDropdown(o.value, id)}>{o.name}</DropdownItem>
            })}
        </DropdownMenu>
</Dropdown>
```

Hope you get something out of this.

Cheers,
FM
Interview with Indie Game Dev Barry Rowe of Roaring Cat Games
Tags: podcast, gamedev, interview
Published: 2019-11-24 15:54:51

---
title: Interview with Indie Game Dev Barry Rowe of Roaring Cat Games
published: true
description: Episode 2 of Design Doc - Indie Game Development w/ Barry Rowe of Roaring Cat Games
tags: podcast, gamedev, interview
cover_image: https://s3-us-west-2.amazonaws.com/anchor-generated-image-bank/production/podcast_uploaded400/1975435/1975435-1561678560877-75bffad2b651c.jpg
---

I've got the podcast itch, and I just can't seem to scratch it. Believe me, I tried. I even recorded my 2nd episode of Design Doc just yesterday and have already published it out for your listening pleasure! I thought that would help, but I'm so ready to record episode three now!

In this episode, I talk with Barry Rowe of Roaring Cat Games, an Indie GameDev shop in Louisville, Kentucky. We talk about the tools he leverages while developing games, how his day job (of Android Developer) carries over to working on Games, and tips for aspiring game developers.

{% user barryrowe %}

If you're interested in listening in (and I hope you are!) [you can find the episode here on Anchor.fm](https://anchor.fm/design-doc/episodes/Roaring-Cat-Games-w-Barry-Rowe-e95l8d) or anywhere that podcasts can be heard.

Think I've missed an important question in this episode? You can leverage the anchor.fm link above to record your own questions and send them in to be asked on the podcast (your voice and all)!
How To Make React VR Apps
Tags: react
Published: 2019-12-03 12:18:36

VR web apps can be built with the React VR apps. WebVR is an experimental API enabling the creation and viewing of VR experiences in your browser. This new technology enables you to grant access to virtual reality regardless of the devices at hand.

The only thing you need to make a React VR app is a headset and a compatible browser. If you are just viewing a web VR application then you don’t need even for a headset. React VR is a great framework to build VR websites or apps on JavaScript. It utilizes the same design as React Native and lets you make virtual reality tours and under interfaces with the provided components.

is a headset and a compatible browser. If you are just viewing a web VR application then you don’t need even for a headset. React VR is a great framework to build VR websites or apps on JavaScript. It utilizes the same design as React Native and lets you make virtual reality tours and under interfaces with the provided components.

Technical Requirements

Before getting started with React VR, You required a proper setup for the dependencies that will be used to build and manage a React VR app. These are Node.js and the React VR CLI.

You need to install Node.js, ensure that the latest version is used. If not, do the following:

MacOS: Install Node.js using Homebrew
Windows: Install it from the nodejs.org
Linux: Use sudo apt-get install nodejs command
Then you have to install the React VR CLI using npm:

You can see the <a href="https://codersera.com/blog/how-to-make-react-vr-apps-2/">complete code and result</a>
The Analogy of State Management in React
Tags: react, redux, javascript, mobx
Published: 2019-12-03 21:25:58

A react web application is made of several parts, called *Components*. Components are smaller blocks of a website, for example, the Navbar, Form, Button, Tags, etc. These components some times contain data (a piece of information) or not.

If a component contains data, it is called a **Stateful** component else it is called a **Stateless** component.

```
class StatefulComponent extends React.Component {
  state = {
    text: "I have some internal data"
  }

  render() {
    return (
      <div>
        <h1>Hello, world!</h1>
        <h2>{this.state.text}.</h2>
      </div>
    );
  }
}


function StatelessComponent(props) {
  return (
    <div>
      <h1>Hello, world!</h1>
      <h2>I don't have any data internally</h2>
    </div>
  );
}

```
Components in a web app are arranged in such a way that data flow from the _topmost_ level to the _least_ level. This is to enable same piece of data to be shared among multiple components. 
Imagine a wine glass tower. When the wine is poured to the topmost glass if filled up, it runs over to the next level glass and then to the next level and it goes on till it reaches the bottom of the glass.

![wine glass tower image here](https://pbs.twimg.com/media/EJqvKdxWkAAcIbC?format=jpg&name=small)

###Analogy of state and props in React
When a component has its data local or encapsulated, that data is called *state*. That is, if a glass of wine has its own wine, we can call that wine, state. This also implies that the component can change its *"wine" (or rather data)*.
If the wine is coming from the previous level above, meaning the data is not local or encapsulated, we call it *Props*. The component cannot do anything about the "wine" _flowing_ into it.

###Why we need state management?
Imagine you want wine in a glass six levels deep, you have to start pouring the wine from level one and keep pouring till overflows through level one, two, three, till six. You will find this exhausting in a matter of time. Hence, there ought to be a better way to get your wine. By the way, the above process is called *“Prop drilling”*.

![wine tower image](https://pbs.twimg.com/media/EJqvLuxXYAMjcK4?format=png&name=small)

A more astute approach is to call a "bartender" whenever we need wine and he fills the exact glass you need the wine in. The job of this bartender is similar to the job of state management in React. That is, to provide the various components with the piece of data they need per time, without passing the data from components to components.

###3 Popular ways to manage your state
There are three major ways (but not limited to these) you can manage your state in React which
- Redux (most popular way)
- Mobx (redux alternative)
- Context API (a good alternative, recently popular)

Thanks for reading this far, your feedback and questions are welcome.
Answer:
Published: 2019-12-04 03:18:31

---
title: Answer: 
published: true
---

{% stackoverflow 43128360 %}
Syntax for temp vs permanent array which is being passed bw functions IN C.
Question : can we write a MACRO for this?

foo.p[i] or ARRAY(TYPE, foo)" where stb does "TYPE *foo = NULL".
How about writing a macro that globally defines the type of array that we pass between functions? Can we use macro arguments for this purpose?
See https://gcc.gnu.org/onlinedocs/cpp/Macro-Arguments.html
Free DevOps Online Demo
Published: 2019-12-04 05:10:33

Free Online Demo on 
"DevOps" 
anyone Interested Drop your 
Details Below Form for demo link.
https://docs.google.com/forms/d/1lkIbsXot2xNaBY0phdvD21rJCc76zQCgF2VMtFDwfQo/viewform?edit_requested=true
Advent of Code 2019 Solution Megathread - Day 4: Secure Container
Tags: adventofcode, challenge, adventofcode2019, spoilers
Published: 2019-12-04 05:37:46

---
title: Advent of Code 2019 Solution Megathread - Day 4: Secure Container
published: True
description: 1-2-3-4? Why are these elves using my luggage password, and how could they lose the password to Venus?
tags: adventofcode,challenge, adventofcode2019, spoilers
series: Advent of Code 2019 Solutions
cover_image: https://imgur.com/Y1KjOsn.png
---

Oh hey! It's a problem related to my current job! Let's try to brute force some passwords like real l337 h4xx0rz.

### [Day 4 - The Problem](https://adventofcode.com/2019/day/4)
Man, the forces of the Holidays have a consistent problem with security. Every year we have to do some basic offensive security work... [Santa's forgotten password](https://adventofcode.com/2015/day/11), most of the obstacles in our assault on [Easter Bunny Corp.](https://adventofcode.com/2016), cracking [High Entropy Passwords](https://adventofcode.com/2017/day/4), sneaking past [lazy guards](https://adventofcode.com/2018/day/4), or some other bad practice. 

Part 1 seems complicated at first, but looking at the whole possibility set might shake some things loose.

Part 2 was mainly difficult for me due to the wording.  However, once I figured out that there needs to be at least ***one*** number that appears exactly twice, then it was all downhill pedaling.

I was beginning to worry that this was going to be a tougher year with a steep ramp-up!

### Ongoing Meta

#### Dev.to List of Leaderboards

* `120635-5c140b9a` - provided by [Linda Thompson](https://dev.to/lindakatcodes) 

 If you were part of [Ryan Palo](https://dev.to/rpalo)'s leaderboard last year, you're still a member of that! 

If you want me to add your leaderboard code to this page, reply to one of these posts and/or send me a DM containing your  code and any theming or notes you’d like me to add. (You can find your private leaderboard code on your "[Private Leaderboard](https://adventofcode.com/2019/leaderboard/private)" page.)

I'll edit in any leaderboards that people want to post, along with any description for the kinds of people you want to have on it. (My leaderboard is being used as my office's leaderboard.) And if I get something wrong, please call me out or message me and I’ll fix it ASAP.

There's no limit to the number of leaderboards you can join, so there's no problem belonging to a "Beginner" *and* a language specific one if you want.

#### Neat Statistics

I'm planning on adding some statistics, but other than "what languages did we see yesterday" does anyone have any ideas?

**Languages Seen On Day 03**

* Python x 3
* Clojure x 2
* C++
* Haskell
* Javascript
* Kotlin
* PHP
* Scala
* Swift
Cryptocurrency Exchange Script
Tags: cryptocurrencyexchangescript, cryptocurrencyexchangesoftware, cryptoexchangescript, bitcoinexchangescript
Published: 2019-12-04 10:47:50

**CRYPTOCURRENCY EXCHANGE PLATFORM DEVELOPMENT COMPANY**

**Blockchainappsdeveloper** is a leading **[Cryptocurrency Exchange Development Company](https://www.blockchainappsdeveloper.com/cryptocurrency-exchange-script-software)**, offering highly secure trading platform to the users for cryptocurrency exchange. We develop unique cryptocurrency exchange platform with advanced features and functionalities to allow users transfer and exchange cryptocurrency like Bitcoin, Ethereum, Ripple, Litecoin, etc in a secure way.
You can now make profit by building your own cryptocurrency exchange platform and get some amount from the users for every transaction.

**FEATURES OF OUR CRYPTOCURRENCY EXCHANGE SCRIPT**

Our Cryptocurrency Exchange Script are customized to our client’s demand. We develop advanced exchange platform with a cryptocurrency server to the platform more secure and faster. Our **[cryptocurrency exchange script](https://www.blockchainappsdeveloper.com/cryptocurrency-exchange-script-software)** has the following features.

Robust admin and users dashboard
Secure cryptocurrency transaction
Premium UI/UX
Record complete history of cryptocurrency transactions
Seamless communication between buyer and seller
Flawless trade of cryptocurrency
Two factor authentication
Advanced Smart contract
Payment gateway integration
Instant alert and notification
Easy to Use Platform
Reliable cryptocurrency exchange on blockchain

**Get A Live Free Demo Of Cryptocurrency Exchange Script here >>>** www.blockchainappsdeveloper.com/request-for-quote

**WHY BLOCKCHAINAPPSDEVELOPER FOR CRYPTOCURRENCY EXCHANGE DEVELOPMENT?**

We are a well-known **[cryptocurrency exchange software development company](https://www.blockchainappsdeveloper.com/cryptocurrency-exchange-script-software)**, with vast experience in the field of blockchain. We are the best place to build a cryptocurrency exchange platform as we have the following qualities.

Top-notch Blockchain Development Company
Build Secure cryptocurrency Exchange Platform
Pool of professionals
Explore our Clients Requirements
High class cryptocurrency Exchange Platform Development Solutions
Continuous Technical Support
Strong Knowledge on Blockchain and Cryptocurrency

**Contact Us: www.blockchainappsdeveloper.com/cryptocurrency-exchange-script-software**
What’s new in Mozilla Firefox 71.0?
Tags: mozilla, firefox, browser
Published: 2019-12-04 15:33:40

Today, Mozilla has released its next iteration of Firefox browser across multiple channels. The latest version is 71.0 now available to download independently or you can update your browser manually by launching About Firefox dialog box. This blog post will give you an overview of what’s new in Mozilla Firefox 71.0.

![What's new?](https://media.giphy.com/media/26xBs2bXYfdpfplZu/giphy.gif)

* Kiosk Mode
* Picture-in-Picture
* Enhanced Tracking Protection
* Lockwise improvements
* Native MP3 decoding on Windows, Linux, and macOS
* Revamped about:config page.
* DevTools’ Network Panel traces Web Sockets calls and prettify it.
* In Console pane, by pressing Ctrl + B brings up the multi-line editor.
* Network Panel now offers Request Blocking to simulate the impact of tracking requests, security, service outage etc.
* Improvements made to the website certificate viewer; now it displays more information.
* Various improvements have been made to Extensions API and Extension popup windows now include the extension name instead of extension URL.

To read more in detail, please visit [my blog.](https://dealsrookie.com/whats-new-in-mozilla-firefox-71-0/)
Type Aliases in Rust
Tags: rust, readability, types, adventofcode
Published: 2019-12-05 00:14:02

---
title: Type Aliases in Rust
published: true
description: Naming your complex types that stand for distinct concepts is a great way to simplify your Rust code.
tags: rust, readability, types, adventofcode
canonical_url: https://www.assertnotmagic.com/2019/12/04/rust-type-aliases/
---


I always forget about type aliases when I'm writing Rust code--mostly I get caught up in making it work mechanically and making the compiler happy and forget about readability.  But yesterday, I was working through Advent of Code Day 3 challenge, and I remembered them.  Just to see if they helped, I sprinkled them into my code, and I was *shocked* at how much better I felt about reading through what I had done.

 > Better readability, better self-documentation, less static to hold in mental memory at once.

Here's a snippet of the code before the transformation:

```rust
fn parse_input() -> (Vec<Coordinate>, Vec<Coordinate>) {
    let text = fs::read_to_string("data/day3.txt").unwrap();
    let lines: Vec<&str> = text.split("\n").collect();
    let mut wires = lines.into_iter().map(build_moves).map(make_wire);
    (wires.next().unwrap(), wires.next().unwrap())
}

/// Build a Wire out of relative Moves
fn make_wire(moves: Vec<Coordinate>) -> Vec<Coordinate> {
    let mut current = Coordinate { x: 0, y: 0 };
    let mut results: Wire = Vec::new();

    for step in moves {
        current = step + current;
        results.push(current);
    }

    results
}

// ...
```

Lots of Vectors full of Coordinates right?  And some are global coordinates, and some are lists of relative steps from one coordinate to the next, so they're not *conceptually* the same "type" of `Vec<Coordinate>`.  Messy, right?

Here's what it looks like after I add in my type aliases:

```rust
/// A Wire is a chain of coordinates that are electrically connected
type Wire = Vec<Coordinate>;

/// Moves are an ordered list of delta moves to make to form a wire
type Moves = Vec<Coordinate>;


fn parse_input() -> (Wire, Wire) {
    let text = fs::read_to_string("data/day3.txt").unwrap();
    let lines: Vec<&str> = text.split("\n").collect();
    let mut wires = lines.into_iter().map(build_moves).map(make_wire);
    (wires.next().unwrap(), wires.next().unwrap())
}

/// Build a Wire out of relative Moves
fn make_wire(moves: Moves) -> Wire {
    let mut current = Coordinate { x: 0, y: 0 };
    let mut results: Wire = Vec::new();

    for step in moves {
        current = step + current;
        results.push(current);
    }

    results
}

// ...
```

Now, even though `Wire` and `Moves` are made up of the same ingredients, they are separated conceptually for our brains to process, and our intent is documented much better.

This is my *fourth* attempt at learning Rust, and it's certainly feeling quite a bit better than any time before.  So, yay for improvement!
What are Container registries and why are they increasingly becoming popular?
Published: 2019-12-05 03:36:00


Containers have taken the enterprise by storm and their advantages are wide spread. Managing these container images is becoming difficult; as more & more container technologies like Docker, Kubernetes, vagrant e.t.c are becoming popular & widely used. Modern DevOps teams are required to manage all types of binaries at scale, with most modern microservices-based architectures being developed using Docker, Kubernetes and other popular containers. These DevOps teams working with container technologies need a robust & flexible registry solution for container image management.

JFrog, creators of Artifactory and the Universal DevOps technology leader known for enabling liquid software via continuous update flows, announced the launch of JFrog Container Registry — powered by JFrog Artifactory — as the most comprehensive and advanced container registry available in the market to manage Docker, Kubernetes helm and generic container images.

This new hybrid container solution provides the registry and management tools for container images that are scalable and reliable, all while ensuring container images are protected from security vulnerabilities. It produces the world’s richest metadata through an Artifactory core, providing rich storage capabilities and fully-hybrid capabilities for maximum flexibility.

JFrog Container Registry also includes the ability to easily integrate with the other tools you use, either through REST APIs or the JFrog CLI, so your CI/CD platform can readily push completed builds to your registries.

JFrog Container Registry features:

- A robust Docker container registry
- Hybrid model: on-premise or via SaaS multi-cloud
- Advanced automation through REST, CLI, YAML, and more
- Full support for Helm
- Free support for local, virtual and remote repositories, including generics
- Secure registry technology, powered by JFrog Xray

JFrog Container Registry offers below unmatched benefits:
https://thepracticaldev.s3.amazonaws.com/i/t1grdy9jv0dcqmxoueni.png

And best of all JFrog Container Registry is offered free!!

How to get started?

You can host the JFrog Container Registry as an On-Prem (Freemium) version on your own infrastructure or use the SaaS version. Both versions of JFrog Container Registry share an almost identical set of features, look and feel and functionality but provide you with the flexibility you need when it comes to meeting your organization’s hosting and infrastructure requirements.

The JFrog Container Registry is available for free at jfrog.com/container-registry.
SSH Port Forwarding In Linux (Complete Guide)
Tags: linux, tutorial, beginners
Published: 2019-12-05 10:30:45

---
title: SSH Port Forwarding In Linux (Complete Guide)
published: true
description: 
tags: #linux #tutorial #beginners
---

1 What is SSH port forwarding?
2 Why use SSH port forwarding?
3 How many sessions are possible?
4 Local forwarding
5 Test SSH port forwarding
6 Persistent SSH tunnels (Using Autossh)
7 Remote forwarding
8 Dynamic forwarding
9 Multiple forwarding
10 List port forwarding
11 Limit forwarding
12 Low latency

https://likegeeks.com/ssh-port-forwarding/
How to drawtext colon with pts gmtime using ffmpeg?
Tags: ffmpeg, android, java
Published: 2019-12-05 10:54:19

I am adding timestamp to video using FFMPEG where i am using below command:

__ffmpeg -y -i input.mp4 -vf "drawtext=fontfile=roboto.ttf:fontsize=36:fontcolor=yellow:text='%{pts\:gmtime\:1575526882\:%d/%m/%y %H:%M}'" -preset ultrafast -f mp4 output.mp4__

in this command i am using __:__ between __%H__ and __%M__ in __text__ attribute of __drawtext__

like this:
__text='%{pts\:gmtime\:1575526882\:%d/%m/%y %H:%M}'__

because i want to print time like this __06:25__

it show me this error: __Unterminated %{} near '{pts:gmtime:1575526882:%d/%m/%y %H'__

how can i print : between __%H__ and __%M__ where __%H__ is for hours and __%M__ is for minutes?