teleren/devto huggingface dataset:
Debugging AWS Lambda Functions in GO
Tags: programming, aws, go, cloudskills
Published: 2023-04-02 17:00:44

I've spent a fair amount of time on the interwebs reading various resources on the topic of debugging AWS Lambda functions locally for testing. There's really not much helpful information out there. Most resources point you to overengineered solutions that involve way more than you need and the final result still leaves something to be desired in most cases. 

In the AWS SDK for the Go runtime, Lambda functions support the ability to run as RPC servers, making them very easy to invoke in a multitude of different environments.

So, when we run our Lambda locally, it just serves and blocks like any other server based system. From there, we only need a RPC client to send it a message.

A huge benefit to doing it this way, is that if your Lambda uses any other AWS service clients (i.e DynamoDB, S3, Secrets Manager, etc.), you can actually debug those live deployed cloud based resources without doing anything else. **No 3rd party libraries, no frameworks, no containers**. The only catch is that you have to have your AWS shared credentials file updated in such a way that the session that the Lambda creates can be authenticated.

Check out the source for the RPC client, it's quite simple, and is just the right amount of engineering to solve the problem. 

You're welcome, internet.
https://github.com/JS10X/aws-lambda-rpc-client
Dual-boot Ubuntu-Windows 11
Published: 2023-04-04 14:35:46


# Dual-boot
First create a partition for installing there Ubuntu

Instal the .iso from [ubuntu webside](https://ubuntu.com/download/desktop)
Install [rufus](https://rufus.ie/es/)
Install the ubuntu iso into a pendrive using rufus software

Restart the pc and setup the usb as the first option to boot

In the ubuntu installer, configure all ass you want untill the "Installation type" where you should check the "Something else" option

There select the free space, create a new partition in the "+" button, and assing 2048 mb of space as a primary type partition and use as swap partition. 
The rest of space create a partition as a primary partition with format Ext4 and mount point in "/" 
Then continue with the installation


# Shared folder between systems

Create a new ntfs partition (in ubuntu you can install GParted)
Mount the new partition
Create a folder in the root where you want to share files
```bash
sudo mount -t ntfs o rw /dev/*partition* /forder/
```
Help! How do I merge multiple Tailwindcss output from two projects? Let me explain.
Tags: help, tailwindcss
Published: 2023-04-05 15:22:43

I need help as google, AI and my search on Dev.to has resulted in no findings. 

I'm somewhat new to Tailwindcss. I rewrote my whole site in it and it's working beautifully. It's performant for what I need. 

However, I ran into an issue. First let's understand how I'm using it so you can tell me where I went wrong and how to fix it :P 

My project started off with React. So we'll call it the "App".

Overtime, the performance and seo just wasn't cutting it so I realized I needed to move my blog portion over to a static setup, so I chose Nextjs. 

We'll call this part of the site, the "Blog".

When I built the blog, I wanted it to share the same look and feel without repeating my work. So I abstracted out the component-library. 

For simplicity, it's the "library"

So I have tailwind in all three. This might have been my mistake but I've seen it done before so I know it works.

App: React/Webpack
Blog: Nextjs
Library: React/vite


Tailwind configs all match for each project. 

So both the App and the Blog, have their own tailwindcss index file as well as the Library tailwind file. It seems buggy. 

95% of my styles work but others seems to be lost and confused by which one overwrites which.

I may have solved most of the issue last night by removing `@tailwind base` from the apps since it's passed through the Library but not all of them. 

A few takeaways. 

- I should have considered this at the start but I think I was just running with it being new to it.
- This shows that perhaps I did not read the docs fully. RTFM
- Yes, I'm aware Nextjs has zones which would allow me to share the apps. I chose apache2 as my server because I've seen better load times for the App.

Let me know if I need to add more details like how my site is actually configured with screenshots and what not. 

If you help me fix this I'll buy you a coffee no problem! :)
Nathaniel's theory
Published: 2023-04-17 11:57:40

[https://www.bankfanz.com/how-to-check-fidelity-bank-account-balance/](https://www.bankfanz.com/how-to-check-fidelity-bank-account-balance/#utm_source=backlinks&utm_medium=search&utm_campaign=darry+ring+us&utm_content=Michelle)

https://plaza.rakuten.co.jp/fidelityaccount/diary/202304170000/
https://peatix.com/user/16897877/
https://www.provenexpert.com/fidelity-bank-code-to-check-balance6/
https://www.producthunt.com/@nathani03945187
https://www.divephotoguide.com/user/Fidelityaccountbalance11
https://vocal.media/authors/nathaniel-bassey-0s2lo0et0
https://www.lifeofpix.com/photographers/fidelityaccountbalance11/
https://seedandspark.com/user/fidelity-bank-code-to-check-balance-6
https://rosalind.info/users/Fidelityaccountbalance11/
http://phillipsservices.net/UserProfile/tabid/43/userId/213827/Default.aspx
https://app.roll20.net/users/11873822/fidelity-bank-code-to-check-b
https://speakerdeck.com/fidelityaccountbalance11
https://social.msdn.microsoft.com/profile/fidelity%20bank%20code%20to%20check%20balance/
https://camp-fire.jp/profile/Fidelityaccountbalance11
https://plazapublica.cdmx.gob.mx/profiles/Fidelity11/activity
https://www.metal-archives.com/users/Fidelityaccountbalance11
https://storium.com/user/fidelityaccountbalance11
https://trabajo.merca20.com/author/fidelityaccountbalance11/
https://www.intensedebate.com/people/fidelitybank11
https://www.mifare.net/support/forum/users/fidelityaccountbalance11/
https://pinshape.com/users/2615798-fidelity11
http://foxsheets.com/UserProfile/tabid/57/userId/128375/Default.aspx
https://www.kompasiana.com/fidelity11
https://leanin.org/circles/fidelity-bank-code-to-check-11
https://www.credly.com/users/fidelity-bank-code-to-check-balance.b7514343/badges
https://www.myminifactory.com/users/Fidelityaccountbalance11
https://www.sqlservercentral.com/forums/user/fidelityaccountbalance11
https://www.longisland.com/profile/Fidelityaccountbalance11
https://guides.co/a/nathaniel-bassey
https://myanimelist.net/profile/Fidelitybank11
40 berufliches Vorwärtskommen: Schütze dich vor dem Einflüsterer.
Tags: deutsch, career, motivation, discuss
Published: 2023-04-17 20:25:14

Moin Moin,

das Wort wird zwar selten gebraucht, doch ist es immer wieder ein Anliegen in Beiträgen über Beruf und Konflikt. Es geht um _Leute, die einem heimlich etwas einreden_. Warum heimlich? Weil deren Absichten für gewöhnlich schädlich für den Zuhörer sind.

Lügen, „Kritik“ und Fehlbewertungen lassen sich gerade am Arbeitsplatz unter Kollegen, wo man gegebenenfalls einen gewissen Schein waren muss, 
einbringen, ohne dass es sofort offensichtlich ist. Viele sind sich anfangs unsicher, ob sie schikaniert werden, oder ob der kritisierende Arbeitskollege einfach etwas rau bzw. hart in der Formulierung ist. Macht sich ein Kollege über einen lustig oder hat er mit seinem Humor einfach über die Stränge geschlagen?
Wichtig ist dabei, darauf zu achten, ob dies regelmäßig vorkommt.

1. Hast du Einflüsterung am Arbeitsplatz beobachten können?
2. Hast du mal erlebt, dass die Kompetenz eines Kollegen immer wieder in Frage gestellt wurde?
3. Wie seit ihr damit auf der Arbeitsstelle umgegangen?

Beste Grüße,
Mustafa

Austausch mittels E-Mail: mustafa.kevin.dwenger@posteo.de
Betreff: Austausch
openGauss Application Scenarios
Published: 2023-04-18 01:41:45

**Transaction applications**

Applications need to process highly concurrent online transactions containing a large volume of data, such as e-commerce, finance, O2O, telecom customer relationship management (CRM), and billing.

**IoT data**

In IoT scenarios, such as industrial monitoring, remote control, smart cities, smart homes, and loV, challenges come from a large number of sensors and monitoring devices, high sampling frequency, additional storage modes, and concurrent operation and analysis.
Exception Handling
Tags: opengauss
Published: 2023-04-18 06:30:25

The persistence module handles exceptions by using the Postgres error reporting infrastructure (ereport). An error message is recorded in the system log for each error condition. In addition, the error is reported to the envelope using Postgres’s built-in error reporting infrastructure.

The following exceptions are reported by this module –

Table 1 Exception Handling

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m6ea0ih9lnv378khwnne.png)
Javascript Object #14
Tags: javascript, webdev, beginners, programming
Published: 2023-04-18 12:00:25

In the Post we are going to some latest ECMA method introduced in Javasciript.

## **Object.values()**
To access the value of an Object we usually use **for...in** loop to iterate over it and access the elements inside the Object.But there is problem with for...in as we have already seen this in past post about for...in loop,that iterates over all the inherited properties of an Object.That is not fair and we have sort that it with **Object.hasOwnProprty()** method.That's a Good way, but what if we can do it in more easy way.

> ES2017 has introduced the **Object.values** to access the values of an own enumerable properties of an Object.

let's see this with an example,

```javascript
`const person = {
    firstName: 'John',
    lastName: 'Doe',
    age: 25
};

for (const key in person) {
    if (person.hasOwnProperty(key)) {
        const value = person[key];
        console.log(value);

    }
}
`
```
OUTPUT 

```javascript
`John
Doe
25
`
```

Let's now see this with the **Object.values()**,

The Syntax is,

```javascript
`Object.values(obj)`
```

```javascript
`const person = {
    firstName: 'John',
    lastName: 'Doe',
    age: 25
};

const profile = Object.values(person);

console.log(profile);
`
```

OUTPUT 

```javascript 
`[ 'John', 'Doe', 25 ]
`
```

The **Object.values()** accepts an object and returns its own enumerable property’s values as an array.

## **Object.entries()**

As like Object.values(),in ES2017 introduced the **Object.entries**.

**Object.entries** are same like Object.values,but it returns the enumerable _string-keyed_ property into **[key, value]** pair of Object.

```javascript
`Object.entries()`
```

```javascript
`const ssn = Symbol('ssn');
const person = {
    firstName: 'John',
    lastName: 'Doe',
    age: 25,
    [ssn]: '123-345-789'
};

const kv = Object.entries(person);

console.log(kv);
`
```

OUTPUT 

```javascript
`[
    ['firstName', 'John'],
    ['lastName', 'Doe'],
    ['age', 25]
]
`
```

    The firstName, lastName, and age are own enumerable string-keyed property of the person object, therefore, they are included in the result.
    The ssn is not a string-key property of the person object, so it is not included in the result.


That's all for now,hope you learnt something.Please put down comments suggesting me to do better,that will motivates me a lot to do more in Javascript.

Thanks for you Time in between breaks,
Sam
Merging PDFs in NodeJs
Published: 2023-04-18 19:54:04

```
public static async mergeProposalPDFs(frontURL: string, backURL: string): Promise<Buffer> {
    const pdfDoc = await PDFDocument.create();

    const pdf1Data = await fetch(frontURL).then((res) => res.arrayBuffer());
    const pdf1 = await PDFDocument.load(pdf1Data);
    const copiedPages1 = await pdfDoc.copyPages(pdf1, pdf1.getPageIndices());
    copiedPages1.forEach((page) => pdfDoc.addPage(page));

    const pdf2Data = await fetch(backURL).then((res) => res.arrayBuffer());
    const pdf2 = await PDFDocument.load(pdf2Data);
    const copiedPages2 = await pdfDoc.copyPages(pdf2, pdf2.getPageIndices());
    copiedPages2.forEach((page) => pdfDoc.addPage(page));

    // Save the merged PDF to a new buffer
    const mergedPdfFile = await pdfDoc.save();

    return Buffer.from(mergedPdfFile);
  }
```


The function takes in two PDF urls and returns a buffer. In our case we wanted it to be uploaded further to s3.
Announcing Public Sharing: Share Your Drafts with the World on Contenda!
Tags: sharing, devrel, edgefunctions, astro
Published: 2023-04-18 21:00:33

---
title: Announcing Public Sharing: Share Your Drafts with the World on Contenda!
published: true
date: 2023-04-18 00:00:00 UTC
tags: sharing, devrel, edgefunctions, astro
canonical_url: https://blog.brainstory.ai/public-sharing/
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w6fhi2iwb8ar6cqtjqof.png
---

Calling all content creators, developer advocates, and storytelling savants!

We’re thrilled to announce that Contenda now allows you to share your generated blog posts publicly with the world! Previously, you would generate your content and it would be tied exclusively to your account (which is still true), but now you have the ability to share posts publicly with your teams, editors, friends, and enemies.

## How does it work?

We’ve got [a whooole separate blog about how the feature was built](https://dev.to/contenda/using-netlify-on-demand-builders-astro-edge-functions-to-make-a-blog-sharing-generator-20lf)! But, outside of that, what you need to know:

1. You create content and edit it on the Contenda platform, all willy-nilly
2. You’re logged in, and you want to share your blog publicly before publishing it
3. You hit the “share” button, which generates a temporary public URL of your blog post

![Sharing UI](https://contenda.co/blogimages/sharingui.png)

1. You share that thang to your heart’s content

<video controls autoplay>
  <source src="https://contenda.co//blogimages/sharepear.mp4" type="video/mp4">
</source></video>

## Wow! I love it, let me at it!

Calm down you media maestro, the feature is already live! If you haven’t yet, you can sign up for [an early access account on Contenda here](https://signup.contenda.co/). We can’t wait to see what you make!

If you have any questions or feedback about this feature, please feel free [to reach out to our team on Discord](https://discord.gg/bYda4pQz2v) or [sign up for our email list](https://contenda.ck.page/3fcf617c2e).

Happy shipping!
Lógica de programação não é difícil!
Tags: braziliandevs, webdev, programming, softwaredeveloper
Published: 2023-04-19 00:06:28


Muitas pessoas pensam ser difícil por exigir habilidades matemáticas avançadas ou conhecimentos técnicos complexos. No entanto, essa realidade não é difícil de entender e pode ser aprendida por qualquer pessoa disposta a dedicar tempo e esforço. 

A lógica de programação tem a habilidade de desenvolver soluções a problemas usando uma linguagem de programação. Ela envolve habilidade de pensar de forma sistemática e resolver problemas de forma lógica, e a lógica de programação é a base de todas as habilidades de programação e habilidade fundamental que todo programador deve ter.


**Como dominar a lógica de programação?**

- Aprenda a pensar em etapas: A lógica de programação requer uma abordagem sistemática e estruturada para resolver problemas. Divida um problema em partes menores e resolva cada parte separadamente. Ao dividir um problema em etapas menores, você torna o problema mais gerenciável e mais fácil de resolver.

- Pratique, pratique e pratique: Como em qualquer habilidade, a prática é fundamental para dominar a lógica de programação. Resolva o máximo de problemas que puder e tente abordá-los de diferentes maneiras. Quanto mais problemas você resolver, mais natural se tornará pensar em termos de lógica de programação.

- Entenda os conceitos básicos: Antes de se aprofundar em problemas mais complexos, é fundamental que você tenha uma compreensão sólida dos conceitos básicos de programação, como variáveis, loops, condicionais e funções. Esses conceitos são fundamentais para o desenvolvimento de soluções mais complexas.

> 
A lógica de programação é uma habilidade fundamental que todo programador deve ter. Embora possa parecer difícil no começo, é uma habilidade que pode ser aprendida com o tempo e esforço. Ao aprender a pensar em etapas, praticar regularmente, entender os conceitos básicos e colaborar com outros programadores, estará no campo certo para dominar a lógica de programação. Não deixando cair no esquecimento os efeitos que a prática trás, pois a prática leva à perfeição, e quanto mais praticar mais natural de alcançar grandes resultados.
How to overcome the stigma of not having a degree in the software industry.
Published: 2023-04-19 00:57:29

Overcoming the stigma of not having a degree in the software industry can be challenging, but it's important to focus on demonstrating your skills and expertise through projects, networking, and job performance. It's also important to be transparent about your education and experience, and to highlight your motivation, passion, and dedication to the field. Collaborating with and learning from f[ull stack web developer course](https://www.geekster.in/full-stack-web-development-program), and staying up-to-date with the latest technologies and trends can also help you gain respect and recognition in the industry.
PostmanAPI Workshop SCET
Tags: postmanstudent, postmanapi
Published: 2023-04-19 12:38:49

The workshop started with an introduction to API and the importance of API development. Joel then provided a detailed overview of Postman and its features, including how to create requests, set up environments, and automate tests.

Attendees had the opportunity to get hands-on experience with Postman by creating their own API requests and tests. Joel also demonstrated how to use Postman to monitor API performance and troubleshoot errors.

Overall, the workshop was a great success, providing attendees with valuable insights into the world of API development and testing using Postman. Joel Jaison's expertise and engaging teaching style made the workshop both informative and enjoyable.
Five Minute Maintainers: Meet Seth Michael Larson!
Tags: opensource, python, github
Published: 2023-04-19 14:17:54

Our new five minute maintainer series shares the journeys and opinions of the maintainers behind **some of the most widely used projects in open source.** We ask five big questions in five minutes, with the goal of elevating the voices of open source maintainers who create the open source projects we all rely on.

{% embed https://www.youtube.com/watch?v=Yz4LiydGctg %}


**Introducing Seth Michael Larson!** Seth maintains urllib3 and a host of useful packages within the Python ecosystem. Watch to learn more about Seth and his journey in open source!

**Are you an open source maintainer who would like to be featured in our Five Minute Maintainer series?** Reach out to Lyn Muldrow, Senior Maintainer Advocate, at lyn@tidelift.com.
Day 7. Singly Linked List
Tags: leetcode, javascript
Published: 2023-04-20 03:01:00



## [876. Middle of the Linked List](https://leetcode.com/problems/middle-of-the-linked-list)
Given the head of a singly linked list, return the middle node of the linked list.

If there are two middle nodes, return the second middle node.
```js
Input: head = [1,2,3,4,5]
Output: [3,4,5]
Explanation: The middle node of the list is node 3.

Input: head = [1,2,3,4,5,6]
Output: [4,5,6]
Explanation: Since the list has two middle nodes 
with values 3 and 4, we return the second one.
```

### Pseudo Code
- something I didn't know was that `head.next` returns the rest of the values, not the next value.
- `head = [1,2,3,4,5], head.val = 1, head.next=[2,3,4,5]`
```js
var middleNode = function(head) {
    // check the total length of initial ListNode
    // middle index is totalLen/2
    // get the ListNode from middle to the end
   
    // console.log(head, head.val, head.next)
    // head: val ~ rest
    // head.val : val only
    // head.next: rest only (no val included)
}

var checkLength = function(head) {
    // init counter
    // until current value is null OR
    // until there's no more next, increment the counter
    // return the counter
}
```

### My Attempt

**Things about ListNode (different from Array)**
1. You cannot access the length of the entire nodelist, so we need to traverse the entire ListNode and increment the counter
2. Be mindful about the LinkedList definition given in the problem set
3. Be mindful of while loop condition(when to stop the counter), especially inside `checking the length function`. 
```js
// Definition for singly-linked list.
function ListNode(val, next) {
  this.val = (val===undefined ? 0 : val)
  this.next = (next===undefined ? null : next)
}
```

```js

/**
 * @param {ListNode} head
 * @return {ListNode}
 */
var middleNode = function(head) {
    let totalLen = checkLength(head);
    let mid = ~~(totalLen/2);  
    // ~~: same as Math.floor, but efficient
    let counter = 0;
    while(counter < mid) {
        head = head.next; // update to next ListNode
        counter += 1;
    }
    return head;

};

var checkLength = function(head) {
    let counter = 1;
    // start with 1 because
    // while loop ends before counting the last element, 
    // which has null as next
    while(head.next !== null) { 
        counter += 1;
        head = head.next;
    }
    return counter;
}
```

### Improve
- So I kind of got caught up with the fact that this is `singly linked list` and didn't think too much about `two pointers theme`. 
- There seems to be much simpler way to solve this. 

1. Array

2. two pointers: slow and fast


### Relevant problem sets
[2095. Delete the Middle Node of a Linked List](https://leetcode.com/problems/delete-the-middle-node-of-a-linked-list/description/)
[2130. Maximum Twin Sum of a Linked List](https://leetcode.com/problems/maximum-twin-sum-of-a-linked-list/description/)