teleren/devto huggingface dataset:
Stric: A web framework
Tags: webdev, javascript, typescript, bunjs
Published: 2023-08-08 06:58:06

## Intro
Stric is a Bun-first framework for building high-performance, scalable web applications in JS.

```typescript
import { Router, macro } from '@stricjs/router';

export default new Router()
    .get('/', macro('Hello world!'));
```

## How can JS be fast?
- [Bun](https://bun.sh) is a new JavaScript runtime aimed to be a drop-in replacement for Node.js. 
- The Bun server API which Stric uses can handle 2.75x more requests than Node `http`. In fact it can even outperform Actix for a simple web app.

## Features
- **Performance**: Stric is one of the fastest web frameworks in the Bun ecosystem. See the benchmark [here](https://github.com/bunsvr/benchmark).
- **Scalability**: Stric ensures high performance even under heavy workloads.
- **Minimal**: The basic components like `@stricjs/router` and `@stricjs/utils` is under 50kB and use no external dependencies.
- **Explicit**: Only do things like parsing when required.
- **Extensible**: Stric comes with a plugin system, dependencies injection and more optional optimizations for handling requests.

## Docs
For more info, see the Stric documentation [here](https://stricjs.gitbook.io/docs/basic/intro).
MongooseDB & GraphQl data-types
Tags: mongodb, graphql, tutorial, node
Published: 2023-08-08 06:54:04

Which data type will be used against the Mongoose data type? Here we go.

## Mongoose data types

```
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
   
   const studentSchema = new Schema(
        {
            "year": {
                "type": "Number"
            },
            "semester": {
                "type": "String"
            },
           "profile": {
                "name": {

## 
                    "type": "String"
                },
                "imgUrl": {
                    "type": "String"
                },
                "phone":{
                    "type": "String"
                },
                "address": {
                    "type": "String"
                }
            },
            "courses": {
                "type": [
                    "String"
                ]
            }         
            
        });
  
    module.exports = mongoose.model('Student', studentSchema);
```

## GraphQl object data type

```
/******************************************
 * student profile object for graphql
 * 
 * ***************************************/
const profile_type = new GraphQLObjectType({
    name: 'profile',
    fields: () => ({
      name: { type: GraphQLString },
      imgUrl: { type: GraphQLString },
      phone: { type: GraphQLString },
      address: { type: GraphQLString },
    }),
  });
```

## GraphQl all data types

```
const StudentType = new GraphQLObjectType({
    name: 'Student',
    fields: () => ({
        id: { type: GraphQLID  },
        year: { type: GraphQLInt },
        semester: { type: GraphQLString },
        profile: { type: profile_type },
        courses: { type: new GraphQLList(GraphQLString) }, // for array of String
    })
});
```

## For more tutorials pls connect
[Connect with me](https://waheednazeer.wordpress.com/)
Automatically Download Email Attachments Using Python. (Python3)
Tags: python, automation, selenium, softwareengineering
Published: 2023-08-08 06:25:56

Hi, We all know that if we get hundreds of emails per day, it's hectic to go through each one and download the attachments. So we can download those attachments using the Python programme. Let's dive into the technical part.

**Prerequisite**

```
 pip install tqdm
 pip install python-imap

```
2) Need to turn on two steps verification on gmail and  add app password.Go to Manage you account > security > two step verification >add app password.

3) Go to gmail settings and enable IMAP.

Module Required 

```
import imaplib
import email
import os
from datetime import datetime, timedelta
```


** Creating folder to download those attachments in it.**


```
folder_name = today.strftime(f"Mail_Attachments")
if not os.path.exists(folder_name):
    os.makedirs(folder_name, mode=0o777)
folder_path = os.path.abspath(folder_name)
```


   

```
 user = "yourmailid@gmail.com"
    password = "copy_pass_from_app_password"
    imap_url = 'imap.gmail.com'
    my_mail = imaplib.IMAP4_SSL(imap_url)
    my_mail.login(user, password)
    my_mail.select('Inbox')
```


**Now we need to specify from which date we need to fetch and download the attachments.**
Let's suppose we are taking yesterday(From Yesterday to Today) 

```

    today = datetime.now()
    yesterday = today - timedelta(days=1)
    yesterday_date_string = yesterday.strftime("%Y-%m-%d")

    search_query = f'(X-GM-RAW "has:attachment after: 
    {yesterday_date_string}")'
    result, data = my_mail.search(None, search_query)
    email_ids = data[0].split()
```


**Using for loop we are iterating through all the mails retrieved and checking the attachments if yes we are downloading it below code will show how we are doing it.
Using tqdm to show download progress bar to user (optional).**

```
 for part in msg.walk():
            if part.get_content_maintype() == 'multipart':
                continue
            if part.get('Content-Disposition') is None:
                continue

            filename = part.get_filename()
            if filename:
                filepath = os.path.join(folder_path,filename)
                with open(filepath, 'wb') as f:
                    f.write(part.get_payload(decode=True))

    my_mail.logout()
```


I hope you guys got it if you have any questions please let me know in comment section.
Leetcode Recursive
Tags: algorithms
Published: 2023-08-08 06:25:04

# Predict the winner
## Intuition

The intuition behind the question was pretty simple like , we have to two choices at a point whether we take from start or from end and based on that we keep repeating the steps and playing optimally for both the peoples

## Approach

-   Made 3 base cases :

    -   When we take all from start
    -   When we take all from end
    -   When we take from both sides

-   *(We can create only one base case too (i > j) , but for showing i made all possiblities).*

-   Then when we choose for player one we add that to our total sum.

-   When we choose for player two we subtract it from our total sum as it takes score away from player one.

-   We keep on doing this until we hit our base case and then if we manage to find one set where the sum of the player ones point is greater than or equal zero we simply return true;

## Complexity

-   Time complexity: O(N * N)
-   Space complexity: O(N * N * 2)


## Code
```
class Solution {
public:
    vector<vector<vector<long>>> dp;
    int dfs(int i , int j ,vector<int>& nums , int turn){
        if(i == nums.size() || j == -1) return 0;
        if(i > j) return 0;
        if(dp[i][j][turn] != -1e10) return dp[i][j][turn];
        if(turn == 0){
            return dp[i][j][turn] = max(nums[i] + dfs(i + 1 , j , nums , 1), 
                                        nums[j] + dfs(i , j - 1 , nums , 1));
        }
        else{
            return dp[i][j][turn] = min(-nums[i] + dfs(i + 1 , j , nums , 0),
                                        -nums[j] + dfs(i , j - 1 , nums , 0));
        }
    }

    bool predictTheWinner(vector<int>& nums) {
        int n = nums.size();
        dp.resize(n , vector<vector<long>>(n , vector<long>(2 , -1e10)));
        int val = dfs(0 , n - 1 , nums , 0);
        return val >= 0;
    }
};
```
SpaceHub website UI design
Tags: websitedesign, uidesign, ui, landingpage
Published: 2023-08-08 06:23:19

---
title: SpaceHub website UI design
published: true
description: 
tags: #websiteDesign #UIdesign #Ui #landingPage
# cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ye4ri3rqz2fqx5z4xqrq.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-08-08 05:29 +0000
---


{% youtube 2BCOa0ty4sU %}


🔥 Recent Work

================
#websiteDesign #UIdesign #Ui/UX #NFT #NFTcommunity #freelanceDesigner #react, #javaScript #WordPress #Shopify #Wix #Webflow #crypto #graphicDesigner #dashboard #freelance #userinterface #interactiondesign #landingPage #figma #xd #landingPage
BinTrade Website UI
Published: 2023-08-08 06:22:15

---
title: BinTrade Website UI
published: true
description: 
tags: 
# cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4cm7zx0ywlza2ljsxnxx.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-08-08 06:11 +0000
---

{% youtube lMP0VmHohFk %}


🔥 Recent Work

================
#websiteDesign #UIdesign #Ui/UX #NFT #NFTcommunity #freelanceDesigner #react, #javaScript #WordPress #Shopify #Wix #Webflow #crypto #graphicDesigner #dashboard #freelance #userinterface #interactiondesign #landingPage #figma #xd #landingPage
📢 My DSA Journey: From Theory to Real-World Problem Solving 🚀
Tags: beginners, career, algorithms, programming
Published: 2023-08-08 06:18:34

Hey there, fellow developers! 👋 Today, I wanted to share my enlightening experience with you on how I transitioned from viewing Data Structures and Algorithms (DSA) as mere theory to realizing that coding is nothing but applying DSA concepts.

When I started my DSA journey, I had this notion that DSA was all about discussing data structures, algorithms, and their use cases. I thought it was just theory that interviewers might ask directly. But oh boy, was I in for a revelation! 😮

After a few interviews, I discovered that coding questions provided by interviewers were essentially DSA challenges in disguise. Rather than asking about DSA concepts directly, interviewers were assessing how I applied DSA to problem-solving. 🤯 This realization completely shifted my perspective on coding.

Writing code that works is essential, no doubt. 🤣 However, in the world of tech giants dealing with massive customer bases and data, efficiency matters more than ever. I realized that coding is not just about writing code; it's about leveraging DSA principles to create efficient solutions.

Take search algorithms as an example. Linear search and binary search yield similar performance when data is small, but they perform vastly differently with large datasets. It's all about efficiency, and DSA provides the tools to achieve that. 💡

To dive deeper, I explored platforms like LeetCode, which offer a plethora of questions categorized by essential DSA topics. As I started solving questions, I discerned a pattern. Easy questions were straightforward, testing basic problem-solving skills. However, medium and hard questions were a whole different ballgame.

Medium and hard questions often contained multiple layers of complexity. Solving them wasn't just about coding—it was about unraveling the hidden problems within the main problem. It became evident that my initial solution wasn't enough; it required refinement and exploration of various approaches. 🧩

Here's the secret: during interviews, don't hesitate to seek help for medium and hard questions. These questions often harbor hidden complexities that you might not catch on your first attempt. Interviewers understand this and are more than willing to guide you towards unraveling the puzzle. 🗝️

In essence, my journey taught me that coding is an amalgamation of applying DSA concepts to real-world problems. Big companies value developers who see beyond the surface, who understand that writing code is just the tip of the iceberg. Embracing DSA principles in coding transforms you into a more efficient, mindful developer.

So, if you're venturing into the world of DSA and coding challenges, remember this: Coding is an art of strategically applying DSA concepts. It's not just about getting the answer; it's about thinking critically and breaking down complex problems into manageable pieces. 🧠💡

My journey has just begun, and I'm excited to see where DSA takes me next. If you're on a similar quest, keep exploring, keep learning, and keep coding! 🌐📚
Immediate Connect - Reviews, Results, Benefits, Price & Side Effects?
Tags: webdev, javascript, beginners, programming
Published: 2023-08-08 05:26:02

[Immediate Connect](https://www.immediateconnectapp.com) worst ones originate prescription diet pills.But "on the counter pills" can carry an unwanted side effect or so. It's up to everybody to evaluate whether the negatives out way the benefits and have to always consult with their doctor 1st.
[https://www.immediateconnectapp.com](https://www.immediateconnectapp.com)
https://soundcloud.com/immediate-connect/immediate-connect-reviews-results-benefits-price-side-effects
https://www.scoop.it/topic/immediate-connect-by-immediate-connect-6
https://www.linkedin.com/pulse/immediate-connect-price-benefits-results-complaints-connect/
https://in.pinterest.com/pin/1093530353256486225/
https://www.instagram.com/wsakgvtna/
https://www.crunchbase.com/organization/immediate-connect-db76
https://medium.com/@immediateconnectinfo/about
https://www.sportsblog.com/immediateconnectfact/immediate-connect-reviews-results-benefits-price-side-effects/
https://twitter.com/immediatec68059
Empowering Customer Engagement: Unleashing the Potential of Microsoft Business Central's CRM Capabilities
Tags: dynamic365, marketing365, businesscentraldubai, microsoftbusinesscentraldubai
Published: 2023-08-08 05:13:34

**_[Microsoft Business Central](https://kefify.com/business-central/)_** is a cloud-based ERP software solution that incorporates CRM features, seamlessly merging business management functionalities with CRM capabilities. This amalgamation empowers organizations with a holistic perspective of their customers, enabling streamlined management of sales, marketing, and customer service operations with utmost efficiency.

It is important for businesses to enhance customer engagement in order to establish strong connections, boost sales, and encourage customer loyalty. Microsoft Business Central's CRM capabilities offer the essential tools and functionalities to support this endeavor. The following describes how Business Central's CRM features can assist businesses in improving customer engagement.


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

**- Personalized Customer Experiences:**

Business Central's CRM features allow companies to observe client interactions, preferences, and purchase history, providing insight into individual customer requirements and preferences. Businesses can utilize this capability to tailor their interactions and provide individualized experiences, including personalized recommendations, exclusive offers, and timely follow-ups. As a result, this enhances the quality of client relationships and fosters stronger connections.

**- Real-time Customer Insights:**

Business Central provides businesses access to real-time client data and insights, which let them have a complete overview of client interactions, buying habits, and preferences. By leveraging this information, enterprises can effectively interact with customers, attending to their demands, solve issues, and foreseeing their desires. Keeping abreast of current trends enables companies to maintain a competitive edge and provide exceptional customer experiences.

**- Data Analytics and Visualisation:**

By integrating with Microsoft Power BI, Business Central enables businesses to examine customer data, generate interactive dashboards, and get precious insights. This presentation of customer trends, sales trends, and performance metrics enables informed decision-making based on data, identifies opportunities for growth, and enhances strategies for engaging with clients.

Microsoft Business Central offers robust CRM functionalities aimed at enhancing customer engagement strategies. These encompass personalized interactions, up-to-the-minute analytics, and seamless lead administration. By harnessing these features, enterprises can cultivate robust connections, stimulate sales, and gain a competitive advantage. We invite you to get in touch for additional insights into how Microsoft Business Central can enhance your customer engagement, unlocking possibilities for customized experiences, data-informed choices, and anticipatory patron connections.
Configure two way TLS communication with Developer Portal
Tags: webmethods, apimanagement, tls, integration
Published: 2023-08-15 10:49:06

---
title: Configure two way TLS communication with Developer Portal
published: true
date: 2023-08-08 04:56:21 UTC
tags: webmethods, apimanagement, tls, integration
canonical_url: https://tech.forums.softwareag.com/t/configure-two-way-tls-communication-with-developer-portal/281895
---

 

This article is for webMethods Developer Portal 10.11 and 10.15 version. Please skip this article, if you are using Developer portal above 10.15.

## Objective

To configure two way TLS with Developer Portal.

By enabling two way TLS, whenever a client ( browser / external server like API Gateway) raises a request to developer portal, the client certificate would be requested by developer portal during the handshake. If the client cerificate validation is not successful, the communication would be blocked for further processing.

## Pre-requisite

- Client Certificate: To configure in the trustore of developer portal

## Steps to follow

### 1. Configure client certificate in the Developer Portal trustore

1. Stop the server
2. The trustore file is located at <Instal\_Dir>\jvm\jvm\lib\security\cacerts. Import the certificate to this trustore.

### 2. Enable two way TLS

To enable two way TLS, please follow the below mentioned steps

1. Open the file - <Install\_Dir>\profiles\CTP\configuration\com.softwareag.platform.config.propsloader\com.softwareag.catalina.connector.https.pid-dpo.properties
2. Set the value for `clientAuth` to `true`
3. Start the server

## Validating two way TLS communication

### Without client certificate configured to trustore

When the client certificate is not configured to trustore and clientAuth is set to true and trying to access the application in the browser, we will get the below page.

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/6/d/6d4c298379848491a5f69e38174de5426a0c488a_2_690x373.png)](https://global.discourse-cdn.com/techcommunity/original/3X/6/d/6d4c298379848491a5f69e38174de5426a0c488a.png "image")

### With client certificate configured in trustore and in the browser

When the client certificate is configured in the trustore and in the browser, the browswer prompts to choose the cerificate for identification to the server,

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/a/6/a6bd9857bdbf0438d12050aeb8bdddaf6835ffb4_2_690x373.png)](https://global.discourse-cdn.com/techcommunity/original/3X/a/6/a6bd9857bdbf0438d12050aeb8bdddaf6835ffb4.png "image")

On choosing the required certificate for identification, the application will get loaded in the configured browser,

[![image](https://global.discourse-cdn.com/techcommunity/optimized/3X/0/0/009be9a24d674ead4baf38363d6e8f4c293f0da0_2_690x373.jpeg)](https://global.discourse-cdn.com/techcommunity/original/3X/0/0/009be9a24d674ead4baf38363d6e8f4c293f0da0.jpeg "image")


[Read full topic](https://tech.forums.softwareag.com/t/configure-two-way-tls-communication-with-developer-portal/281895)
Meetup #54: Vistazo al compilador de Kotlin | Crea tu propia librería de componentes
Tags: android, meetup, kotlin, design
Published: 2023-08-08 04:27:19

El 20 de julio, tuvimos dos charlas virtuales! Sigue leyendo para conocer un poco más de los temas que nos compartieron nuestros invitados 👇

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

---
🗣️ Expositor: Daniel Peñaloza 🇵🇪 (síguelo en [Twitter](https://twitter.com/danp1925))
🗒️ Tema: "Vistazo al compilador de Kotlin" - minuto 2:39 ([video](https://www.youtube.com/live/nOCgGmPGelE?feature=share&t=164) | [diapositivas](https://docs.google.com/presentation/d/e/2PACX-1vQ5eotoP6nqdTyK5_mdHTxCnrdBpS-mx2lOiLY0uX26gUwGNT2QFVQGwDcL8FiGJA/pub?start=false&loop=false&delayms=60000))

Daniel nos cuenta:
- ¿qué son los compiladores¿
- las novedades que vienen con R2 (el nuevo compilador de Kotlin)
- ¿qué son los "compiler plugins" y en qué casos podríamos usarlos?

---

🗣️ Expositor: Alejandro Fort 🇵🇪 (síguelo en [Twitter](https://twitter.com/AlejandroFortt) | [Github](https://github.com/alejandrofortt))
🗒️ Tema: "Crea tu propia librería de Componentes" - minuto 30:39 ([video](https://www.youtube.com/live/nOCgGmPGelE?feature=share&t=1839))

Alejandro nos cuenta:
- Los beneficios de crear una biblioteca de componentes
- Los beneficios de un sistema de diseño
- Diseño e implementación de los componentes con Android clásico
- ¿Cómo documentar y escribir pruebas para nuestros componentes?
OnePub Dart Community Choice Awards closing
Tags: dart, flutter
Published: 2023-08-08 04:26:38

Voting for the OnePub Dart Community choice awards closes on the 12th of August so don't miss out on the chance to vote for you favorite Dart package and put them in the running for a $500 prize.

Just by voting and leaving a review you go into the draw for a $100 prize.

[Vote today](https://onepub.dev/show/4224ccfb-d637-49ba-8264-051fc4bc385a).
Explain me Docker like I'm 5 🐳
Tags: explainlikeimfive
Published: 2023-08-08 04:22:47


I only know that it's logo is a whale.

<hr>

![A cute docker logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n4qeagdufc8z7xko04fq.png)

Source:
 - Cover: [dev.betterdoc.org](https://dev.betterdoc.org/assets/img-posts/how-docker-forced-me-to-learn-more-about-linux/cover.png)

 - Post Image: [icon8](https://icons8.com/icon/TkG10j-DmXkU/docker)


*Cheers ✌*
🤖 5 Advanced concepts of React you should learning ⚠️
Tags: webdev, react, tutorial, javascript
Published: 2023-08-08 04:16:08

Some advanced concepts of React that you should consider learning are:

**1. React Fiber internals**

This is a deep dive into how React actually builds the DOM tree and updates it when the app’s state changes.

React Fiber is an internal engine change geared to make React faster and smarter. The Fiber reconciler, which became the default reconciler for React 16 and above, is a complete rewrite of React’s reconciliation algorithm to solve some long-standing issues in React.

**2. Higher Order Components**

This is an advanced pattern to encapsulate common behavior via Higher Order Components.

A High Order Component is basically a function that takes a component as an argument and returns a new component with some more functionality. It's much like a High Order Function, but instead of returning a function, we're returning a component. We can benefit from this pattern and use it with our components to build better components and more reusable code.

**3. Render Props**

This is another advanced pattern to encapsulate common behavior via Render Props.

Render Props is a technique in React for sharing code between React components using a prop whose value is a function.

**React.lazy and Suspense**

These are features introduced in React 16.6 that allow for code-splitting and lazy loading of components1.

**4. React Hooks**

This is a new feature introduced in React 16.8 that allows for the use of state and other React features without writing a class.

Are a new addition in React 16.8 that allow you to use state and other React features without writing a class. They are functions that let you “hook into” React state and lifecycle features from function components.

Some of the built-in Hooks include useState, useEffect, useContext, and useReducer.

**5. React Error Boundaries**

Create error boundaries that protect areas of your application from runtime errors.

Error boundaries are React components that catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the component tree that crashed1. They catch errors during rendering, in lifecycle methods, and in constructors of the whole tree below them1.

Error boundaries were introduced in React v16 as a way to catch tricky errors that occur during the render phase.