teleren/devto huggingface dataset:
523. Leetcode solution in Java
Tags: java, chiki1601, challenge
Published: 2022-10-26 03:21:13

```java
class Solution {
  public boolean checkSubarraySum(int[] nums, int k) {
    int prefix = 0;
    Map<Integer, Integer> prefixToIndex = new HashMap<>();
    prefixToIndex.put(0, -1);

    for (int i = 0; i < nums.length; ++i) {
      prefix += nums[i];
      if (k != 0)
        prefix %= k;
      if (prefixToIndex.containsKey(prefix)) {
        if (i - prefixToIndex.get(prefix) > 1)
          return true;
      } else {
        // Only add if absent, because the previous index is better
        prefixToIndex.put(prefix, i);
      }
    }

    return false;
  }
}

```
#Leetcode
#challenge
Here is the link for the problem:
https://leetcode.com/problems/continuous-subarray-sum/
Speaker Notes in LaTex Beamer
Tags: latex
Published: 2023-01-06 02:58:55

---
title: Speaker Notes in LaTex Beamer
published: true
date: 2022-10-26 01:43:38 UTC
tags: LaTex
canonical_url: https://brandonrozek.com/blog/notes-beamer-latex/
---

I often struggle with deciding how much content to put on my slides. Personally, I feel that my slides should be self-contained so that others can review them afterwards. This was especially true when I held [recitations](/ta/spring2022/csci2600/) as a TA.

What if instead of putting all the content into one slide, we can have a corresponding notes document? Crazy enough, Beamer comes to the rescue!

Within a frame in beamer, we can add a `\note[item]{X}` call, and the contents of `X` will appear in a bullet point within a corresponding speaker notes slide.

Let’s see how this works in action.

```
\documentclass{beamer}

%\setbeameroption{hide notes} % Only slides
%\setbeameroption{show only notes} % Only notes
\setbeameroption{show notes on second screen=right} % Both

\title{Speaker notes within Beamer}
\author{}\date{}

\begin{document}

\begin{frame}
  \titlepage
  \note[item]{Welcome to the talk!}
  \note[item]{As you can see, this slidedeck is a work in progress.}
\end{frame}

\end{document}

```

This code results in:

![Image of slide with speaker notes shown on the right side](https://brandonrozek.com/files/images/blog/20221025220326.png)

In this mode, the slide is shown on the left side of the page while the speaker notes on shown on the right side. The comments in the code suggest that this isn’t the only way to do this! You can produce a PDF version with only the slides and one with only the notes as well!

With this, I am thinking of distributing slides that I’m presenting more ahead of time. There are several benefits that I can immediately see in using the speaker notes feature:

- Get to keep slides minimal
- Keep answers away from the live audience, with an easy way to distribute aftewards
- Not forget any points you want to address

If you want to learn more features within LaTex beamer, I suggest checking out their [package documentation](http://mirrors.ctan.org/macros/latex/contrib/beamer/doc/beameruserguide.pdf). It’s surprisingly written accessibly, with many presentation tips within.
What have you automated using Python?
Tags: python, automation, programming
Published: 2022-10-26 01:22:40

I wanted to gather some ideas for stuff in daily life that could be automated using Python. I will share with you my two examples.

I am using hledger for keeping track of my finances. It was tedious to manually add all transactions, so I build a python script that converts csv file generated from my bank account to hledger syntax. Additionally it automatically assigns categories based on title of transaction.

Second one. I am keeping backup of certain directories in my computer using rsync. I have written script that makes sure that everything is properly mounted, before making backup, and then automatically performs all backups.

Please tell me, what tasks have you automated, that are saving you time or improving your life.
What is The Collab Lab?
Tags: career, beginners, webdev, react
Published: 2022-10-26 01:17:00

Curious about what [The Collab Lab](https://the-collab-lab.codes/) is?

Here's the TL;DR

> The Collab Lab increases access to web development jobs for early-career developers and, in particular, people in under-represented groups in tech by providing experiential skills training in software team collaboration and career management.

I sat down with [Stacie Taylor](https://twitter.com/the_real_stacie) to dive deeper into all things Collab Lab.

{% embed https://twitter.com/nickytonline/status/1584893066971959297 %}

transcription from the podcast short:

> The collab lab really gives you that kinda experience so that you can talk about, you know, when an interviewer is like, Tell us about a time you had to give somebody feedback. 
>
> You're like, Yeah, I was working on a team of developers, and here's a very realistic time when that happens. So it's kind of like giving your first job in a very safe, comfortable space so that you can take those insights into the job search and really impress people.

– Stacie Taylor, Engineering Team Lead at Zapier, Co-founder & mentor at The Collab Lab

We also discussed her origin story and we even talked about career advice. Thanks for the great conversation Stacie!

Here's the full podcast episode. Now go listen to it on that walk or run. 😎

{%embed https://nickscuts.buzzsprout.com/2065897/11507005-the-collab-lab-with-stacie-taylor %}

Photo by <a href="https://unsplash.com/@johnschno?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">John Schnobrich</a> on <a href="https://unsplash.com/s/photos/collaborate?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
You know tech, but can you interview...?
Tags: career
Published: 2022-10-25 23:47:23

Landing the job and salary you want at the company you want takes a more than acing the technical interviews. 

It might seem unintuitive that anyone would need to practice talking about themselves, their abilities, and their wins in previous roles, but it's not something we ever have to do or practice until we're looking!

When I was first transitioning into marketing tech after a stint as a touring indie pop musician, I didn't know WTF to say in interviews. 

Going to free Roadmap workshops to practice interviewing while I worked on my growth, product, and tech skills is what helped me. 

Definitely recommend checking out the upcoming free Roadmap workshops here: [Roadmap Workshops](https://bit.ly/Roadmap__workshops)

P.S. We're also building a job matching board where we hype you up to hiring leaders and connect with you before any interviews you book with our partners! Ya, it's free! [Sign up to be an early user here!](https://bit.ly/3Srr3mt)

Feel free to connect on LinkedIn and say hi, especially if you're in SF. I'm new here! https://www.linkedin.com/in/emilyrosegiddings
Saasrocks Rocks
Tags: typescript, startup
Published: 2022-10-26 00:59:35

I found my new favorite toy, it's Saasrocks. I shouldn't call it a toy because this Saas platform builder packs a punch. It contains all the things you need to build a Saas business.

SaaS features like Authentication, Pricing & Subscriptions, Admin & App portals, Entity Builder (API, Webhooks, Permissions, Audit-trails...), Blogging, and much more. The developer is very responsive and listens to his audience. It's also incredible the speed at which features are produced.

If you're looking to build a Saas business look now further than Saasrocks. It comes in a core version and an enterprise version.

https://saasrock-enterprise.vercel.app/ The price is also very reasonable. You owe it to yourself to try it out.
Start the flutter monorepo project
Tags: flutter, dart, monorepo, melos
Published: 2022-10-26 00:30:11

---
title: Start the flutter monorepo project
published: true
description: 
tags: #flutter #dart #monorepo #melos
---

## Basic recipe to start monorepo project for flutter

1. Install melos (more details about melos: https://melos.invertase.dev/)
    ```bash
    dart pub global activate melos
    ```

2. Create a project folder
    ```sh
    mkdir flutter_project
    cd flutter_project
    ```

3. Add `melos.yaml` file
    ```yaml
    name: flutter_skeleton

    packages:
      - packages/**
      - apps/**

    command:
      bootstrap:
        usePubspecOverrides: true

    scripts:
      analyze:
        exec: flutter analyze .
      outdated:
        exec: flutter pub outdated
      test:
        exec: flutter test
    ```

4. Create `.gitignore` and add `pubspec_overrides.yaml` in it.

5. Create the main app
    ```bash
    mkdir apps # create dir for applications
    cd apps
    flutter create main_app
    ```

6. Add a library package
    ```bash
    cd .. # go back to the root dir of the project
    mkdir packages # create dir for shared packages
    cd packages 
    flutter create --template=package lib_example
    ```

7. Bootstrap melos
    ```bash
    melos bs # melos bootstrap
    ```

8. Try melos scripts added in `melos.yaml` file
    ```bash
    melos analyze # run analyze for all packages
    melos test # run test for all packages
    melos outdated # check outdated pub dependencies for all packages
    melos upgrade # Update dependencies for all packages
    ```

That's it! Now you have the monorepo project ready to start. You can open the root directory with `vscode` or `IntelliJ(Or Android Studio)`. `melos` already bootstrapped the IntelliJ project. Nothing to do with `vscode`, but you can install the [extension](https://marketplace.visualstudio.com/items?itemName=blaugold.melos-code) if it makes your life easier.

More information: https://melos.invertase.dev/ide-support

## Use the shared package from the main app

Add the package name as a dependency in the `pubspec.yaml`  
Something like:
```yaml
dependencies:
  lib_example:
    path:../packages/lib_example
```

You can indicate the package version instead of the `path` if you ever published the package to the [`pub.dev`](https://pub.dev/). I had to put `path` because `flutter pub outdated` doesn't respect the `pubspec_overrides.yaml` for the local dependency for the moment.

The complete code can be found on [github](https://github.com/leehack/flutter_skeleton/tree/melos_bootstrap)
How to get your Mallsoft .wav files to play for Winamp 🦙 2.9.5 in Windows 98SE
Tags: vaporwave, windows98, retro, operatingsystems
Published: 2022-10-26 00:14:15

I was messing around in Windows 98SE and was trying to play some of my Bandcamp Vaporwave in Winamp 2.9.5.

![Winamp 2.9.5](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n8tafelrd7p85hxppwae.gif)

But I was having some issues playing the `.wav` files you can download from Bandcamp:

![Error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2i6gtzz906j7fvy1c4wh.png)

![Settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e2jtklstoj48znjq7wn8.png)

The fix ended up being to tell the "Nullsoft Waveform Decoder" to "Convert 24/32-bit to 16-bit" and it worked!

![Winamp playing Mallsoft](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cbgxmozzlo0756rb2oco.gif)
How to add schema markup to blogger
Tags: schemamarkup, seo, structureddata, blogger
Published: 2022-10-25 23:08:33

Schema markup is structured data added to your website to tell google how to display and what type of content you have.
So to add schema markup to blogger.

- first, make sure that your blogger theme has structured data (schema markup) you can check by going to schema.org validator and putting one of your page URLs.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8yilbav44sy6krrxjliw.png)

- So if your validator doesn't detect any data:
follow this steps on this article [how you can add schema to your blogger](https://tissueweb.com/article/schema-markup).
Most sought after certifications by the IT market
Tags: certifications, backend, frontend, webdev
Published: 2022-10-25 23:08:15

Hello cousins and cousins!

Digital migration accelerated by the pandemic has created job opportunities in the IT sector. By the year 2025, there will be about 800,000 new job openings, according to Brasscom's projection. But the speed of transformation in jobs is forcing professionals to be highly qualified and updated to fill these vacancies.

To fill these vacancies, companies are asking for certificates that prove the skills of the professional to perform a certain position.

Most wanted certificates:

**Product manager:**

- Project Manager Professional
- Information Technology Infrastructure Library

**Front-end developer**

- Information Technology Infrastructure Library
- Control objectives for Information and related Technology

**Full-stack developer**

- Earth
- VMware Certified Professional for Cloud Management and Automation

**Backend Developer**

- Information Technology Infrastructure Library

**Data Scientist**

- Microsoft Certified Solutions Expert

**Machine learning specialist**

- AWS Certified Solutions Architect — Associate

**Data Engineer**

- Microsoft Certified Solutions Expert
- Information Technology Infrastructure Library

These are some of the certifications that companies are requesting for the areas in which there are open positions.
HTML da Form bilan ishlash
Tags: html, ilmhub
Published: 2022-10-25 23:06:22

-  HTML da formalar form tegi ichiga quyidagicha yoziladi. formalar asosan veb saytlarga kirgan paytda ko'rishimiz mumkin

```html
<form>
    <input type="text" placeholder="Text">
    <input type="email" placeholder="Email">
</form>
```
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/twfiyv3lqlcak09vbmea.png)

1. `text` type bu istalgan ma'lumotlarni kiritish uchun ishlatiladi 
2. `email` type faqatgina emailni user kiritgan tekst ichida email bo'lsagina qabul qiladi  aks holda qaytadan kiritishini so'raydi. 


```html
<form>
    <label>password tegi </label> <br>
<input type="password" placeholder="parol"> <br>
<label>number tegi </label> <br>
<input type="number" placeholder="son"> <br>

</form>

```

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xe3pph4lycq1xe4wu2c3.png)

3.`password` type bu biz kiritgan parol ko'rinmasligini ta'minlaydi  
4.`number` type bu user kiritadigna ma'lumot faqat sonlar bo'lishini ta'minlaydi 

```html
<form>
    <label>file tegi </label> <br>
<input type="file" multiple > <br>
<label>date </label> <br>
<input type="date" > <br>
</form>

```


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/btuaqnkt0katxc1tsuk8.png)

5. `file` type file ni jonatish uchun ishlatiladi multiple keywordi esa bir nechta faylni bittada jo'natish vazifasini bajaradi 
6. `date` type bu sanani tanlash uchun ishlatiladi
How to update state React Native
Tags: reactnative, javascript, react, beginners
Published: 2022-10-25 22:43:38

` const slug = route.params.slug;

  const [product, setProduct] = useState([]);
  
  const getProduct = async () => {
    const resp = await fetch(`http://192.168.0.145:8000/api/v1/products/${slug}`);
    const product = await resp.json();
    setProduct(product);
    
  }

useEffect(() => getProduct(), []);
`
My product does not update state when slug is changed
Install Azure CLI on arm64 Raspberry pi
Published: 2022-10-25 22:16:57

According to Microsoft [documentations ](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt)currently arm64 is not supported for Azure CLI. 

The only work around is to install via pip.

The below worked for me, in RPi 4B, Ubuntu 20.04

**Install**
First make sure python3 and its related packages are installed:

_Ubuntu/Debian_

```
sudo apt install python3 python3-venv --yes

# Create a virtual environment
python3 -m venv azure-cli-env

# Update pip
azure-cli-env/bin/python -m pip install --upgrade pip

# Install azure-cli
azure-cli-env/bin/python -m pip install azure-cli

# Run any Azure CLI commands
azure-cli-env/bin/az --version 
```


**Uninstall**
Delete the virtual environment:
`rm -rf azure-cli-env`


References:
https://github.com/Azure/azure-cli/issues/20476
https://www.frakkingsweet.com/installing-azure-cli-on-arm64/ - I am just posting this particular link for future reference, I haven't tried this.
Day 643 : Who
Tags: hiphop, code, coding, lifelongdev
Published: 2022-10-25 21:44:38

_liner notes_:
- Professional : Not a bad day. Had a meeting with my manager to plan some stuff out. Spoke with a person about the draft for an update to a blog post I made yesterday. They said it looks good. Made the changes to the original blog post and set it to be reviewed. Met with a team member to go over a demo they will be doing to make sure they are good with a sample app I made. Pretty full day.

- Personal : Last night, I was able to get the livestreaming aspect of my side project working. It was similar to the archiving I added to the app earlier. I got it done and when I went to test it, I realized that the site I was coding in lost connection so some of my code was lost and had to do it over. haha Redid it and got the embedded video player showing the stream. I watched "Dr. Who" and went to sleep.

![Colorful walls of a cave in Antelope Canyon, AZ, USA with a single ray of light coming from the ceiling](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vdxjt2f5araos7znb9c7.jpg)

Now that I feel good about the other parts of the side project. I think I'm going to start working on the front end. I think I may have an idea of what I want to do. Also, I think there is a new "Chainsaw Man" episode and maybe sneak in a "Mob Psycho 100" episode. Oh and my Meta Quest Pro came in so I'll probably be setting that up.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube HeHjVeyMaR0 %}
You cannot render a <Router> inside another <Router>. You should never have more than one in your app.
Published: 2022-10-25 21:26:59

i am using Version    "react-router-dom": "^6.3.0",  
and i want to use Router in my React application .  my app.js looks like this 

export default class App extends Component {
 

```
    render() {
        return (
            <BrowserRouter>

                <div className="App">

                    <Layout />

                    <div id="wrapper">

                        <SideMenuBar />

                        <div id="content-wrapper">

                            <Routes>
                                <Route path="/" element={<App />}/>          
                                <Route path="/" element={<VideoContent />}  />  

                            </Routes>
              
                            <Fotter />

                        </div>
                    </div>

                </div>

            </BrowserRouter>
        );
    }
```
and my imports are 

```
import React, { Component } from 'react'; 
import AppRoutes from './AppRoutes';
import { Layout } from './components/Layout';
import { SideMenuBar } from './components/SideMenuBar';
import { Search } from './components/Search';
import { VideoContent } from './components/VideoContent';
import { Fotter } from './components/Fotter';
import { NavMenu } from './components/NavMenu';
import { RightSideMenuBar } from './components/RightSideMenuBar';
import { BrowserRouter, Routes, Route } from 'react-router-dom';

```
my page does not display , i get an error on the console that states 
router.ts:5 Uncaught Error: You cannot render a <Router> inside another <Router>. You should never have more than one in your app.
 Thanks
How to take your career to the next level
Tags: python
Published: 2022-10-25 21:24:13

If you're already a programmer and want to take your career to the next level, here are some things to keep in mind.

1. Never stop learning
The programming landscape is always changing, with new languages and frameworks being created all the time. It's important to keep up with the latest trends and technologies so that you can be the best programmer you can be.

2. Networking is key.
Get involved in the programming community, whether it's online or offline. Attend meetups, join online forums, and make connections with other programmers. Not only will this help you stay up-to-date on what's happening in the programming world, but it will also help you land jobs and gigs.

3. Be prepared to hustle.
The programming world is competitive, and the best way to stand out is to be able to show potential employers that you're a go-getter. Be proactive in your job search and don't be afraid to cold-email or reach out to potential employers on social media.

4. Offer value.
When you're applying for jobs or gigs, make sure you highlight the ways in which you can add value to the company or project. What makes you unique? What can you bring to the table that other programmers can't?

5. Be patient.
Don't expect to land your dream job or gig overnight. It takes time to build up your skills and experience, and it's important to be patient and to keep learning and growing as a programmer. If you're passionate about programming and are willing to put in the hard work, you can be successful in this field. Never stop learning, networking, and hustling, and you'll be well on your way to a successful career in programming.

Originally shared on:  
[LinkedIn](https://www.linkedin.com/company/pybuddy)
Error: You cannot render a <Router> inside another <Router>. You should never have more than one in your app.
Published: 2022-10-25 21:20:47

i am using Version    "react-router-dom": "^6.3.0",  
and i want to use Router in my React application .  my app.js looks like this 

export default class App extends Component {
 

```
    render() {
        return (
            <BrowserRouter>

                <div className="App">

                    <Layout />

                    <div id="wrapper">

                        <SideMenuBar />

                        <div id="content-wrapper">

                            <Routes>
                                <Route path="/" element={<App />}/>          
                                <Route path="/" element={<VideoContent />}  />  

                            </Routes>
              
                            <Fotter />

                        </div>
                    </div>

                </div>

            </BrowserRouter>
        );
    }
```
and my imports are 

```
import React, { Component } from 'react'; 
import AppRoutes from './AppRoutes';
import { Layout } from './components/Layout';
import { SideMenuBar } from './components/SideMenuBar';
import { Search } from './components/Search';
import { VideoContent } from './components/VideoContent';
import { Fotter } from './components/Fotter';
import { NavMenu } from './components/NavMenu';
import { RightSideMenuBar } from './components/RightSideMenuBar';
import { BrowserRouter, Routes, Route } from 'react-router-dom';

```
**my page does not display , i get an error on the console that states 
router.ts:5 Uncaught Error: You cannot render a <Router> inside another <Router>. You should never have more than one in your app.**

 Thanks
Connect to WiFi on Ubuntu (Server version) via Terminal
Published: 2022-10-25 21:13:02

This tutorial assume you have an active LAN connected, since you may need to install a package.

`sudo apt install network-manager`

Then you can use the below interactive mode to search for wifi and connect to the same

`sudo nmtui`


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vderbmbz5n0z75voje62.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/buuyrshpl8vqkd6yj3tf.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/19ihh80b2v6wc158qxn6.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/caval53w94pl25aimhw7.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e9qjv779c9a3oqcrkof8.png)


Now I can see the Wlan0 link is UP (which was DOWN before) and it has got an IP too.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dms22ijl6ec9a12zp1tp.png)


Found this really easy if you got a LAN or your ubuntu version has network-manager pre installed.