teleren/devto huggingface dataset:
Expert IoT Development Services
Tags: services, development
Published: 2024-05-10 09:07:03


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


Unlocking the Future: IoT Development at Mobisoft Infotech
Explore the transformative power of IoT development with Mobisoft Infotech. Discover key features, benefits, and real-world applications across industries. Learn about device integration, data security, and scalability. Dive into the future of connected technology at https://mobisoftinfotech.com/services/iot-development #IoT #TechInnovation
Authentication opens a new window popup with postMessage
Tags: javascript, authentication, typescript, webdev
Published: 2024-05-10 09:05:51

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

When you have a large system with many services, each service is responsible for a specific task, and there is an authentication service that provides authentication for many [app client] applications in use, then you will be interested in postMessage or Single sign-on solutions.

This article will focus on postMessage

**Solution 1: postMessage with iframe**
Page parents use HTML tag iframe to load the child page.

**_Demo_**
- Page parent sends a message to page child via iframe
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5mxmruhy3yvqsxltezol.png)
- Page child sends a message to page parent via iframe
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/booh0hf58zcqsftlkj51.png)


**Solution 2: postMessage with new window popup**
Page login on [app client] call open new window load page login of service [A], service [A] login success send message container token data to go back [app client]

**_Demo_**
- Open a new window
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4vf14az3zin6qu9fpr1f.png)

- Click the button [Login success]: Send message go back [app client]
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4f98z229lgcpj2nk3vff.png)

Repo: https://bitbucket.org/main-28/authencation-with-window-open/src/main/

Install the package with package json `npm i`

Run the script locally:
- Solution 1(iframe) 
```
Step 1:
npm run postMessage:iframe1
npm run postMessage:iframe2

Step 2: 
Open http://localhost:8081
```

- Solution 2(new window) 
```
Step 1:
npm run postMessage:case2:window1
npm run postMessage:case2:window2

Step 2: 
Open http://localhost:8085
```
How to set VChart axis gridlines as dashed lines？
Tags: vchart, visactor, charts
Published: 2024-05-10 09:04:31

  
## Problem Description

How to set the grid lines of the coordinate axis in VChart as dashed lines and adjust the style of the dashed lines?
  


## Solution

In VChart, the configuration item for axis gridline style is ` axes[i].grid.style  `. You can adjust the solid line to the dashed line effect you want by configuring the `lineDash`property.

` lineDash  `uses a set of values to specify the alternating length of lines and gaps that describe the pattern. For example:

```
lineDash: [2, 3]; 
lineDash: [0]; // solid line
```

## Code Example

> 🔔 The following code can be copied and pasted into the [editor](https://medium.com/r?url=https%3A%2F%2Fvisactor.io%2Fvchart%2Fdemo%2Fpie-chart%2Fbasic-pie%3Fkeyword%3DpieChart) to see the effect.

```
const spec = {
  type: 'line',
  data: {
    values: [
      {
        time: '2:00',
        value: 8
      },
      {
        time: '4:00',
        value: 9
      },
      {
        time: '6:00',
        value: 11
      },
      {
        time: '8:00',
        value: 14
      },
      {
        time: '10:00',
        value: 16
      },
      {
        time: '12:00',
        value: 17
      },
      {
        time: '14:00',
        value: 17
      },
      {
        time: '16:00',
        value: 16
      },
      {
        time: '18:00',
        value: 15
      }
    ]
  },
  axes:[
    {
      orient:'left',
      grid:{
        style:{
          stroke:"black",
          lineDash:[5,5]
        }
      }
    },
    {
      orient:'bottom',
      grid:{
        visible: true,
        style:{
          stroke:"black",
          lineDash:[5,5]
        }
      }
    }
  ],
  xField: 'time',
  yField: 'value'
};

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderSync();

// Just for the convenience of console debugging, DO NOT COPY!
window['vchart'] = vchart;
```

  


## Results

![](https://p3-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/cf027901777941eea9fe70477ab1a719~tplv-k3u1fbpfcp-jj-mark:0:0:0:0:q75.image#?w=1280&h=796&s=98811&e=png&b=fefefe)

  


## Quote

-   [lineDash Configuration Items](https://visactor.io/vchart/option/barChart-extensionMark-symbol#style.lineDash(number[]))
-   [Axis Tutorial](https://visactor.io/vchart/guide/tutorial_docs/Chart_Concepts/Axes)
-   github：https://github.com/VisActor/VChart
Flask redirection and error
Tags: flask
Published: 2024-05-10 08:51:13

```
from flask import abort, redirect, url_for

@app.route('/')
def index():
    return redirect(url_for('login'))

@app.route('/login')
def login():
    abort(401)
    this_is_never_executed()
```
다른 엔드포인트로 리다이렉트 redirct()
에러 코드를 가지고 일찍 중단하기 원한다면 abort()

```
from flask import render_template

@app.errorhandler(404)
def page_not_found(error):
    return render_template('page_not_found.html'), 404
```
에러페이지 변경을 원한다면 errorhandler()
 페이지의 상태 코드가 그 페이지를 찾을 수 없다는 404가 되어야 하는 것을 Flask에게 말해 준다. 기본으로 200이 가정되며, 그것은 모든 것이 잘 실행됐다는 것으로 해석된다.

_참조 : https://flask-docs-kr.readthedocs.io/ko/latest/quickstart.html#id11_
WSGI
Published: 2024-05-10 09:00:12

1. WSGI(Web Server Gateway Interface)
Web서버가 받은 호출을 Python 어플리케이션에게 전달하고 응답받기 위한 호출조약(Calling Convention) 입니다.

2. WSGI 미들웨어
WSGI 호출조약의 구현체라고 볼 수 있습니다.

_참조 :https://velog.io/@misun9283/WSGI-%EB%9E%80_
🔥Fee-free withdrawals of $USDC via Whitechain🔥
Published: 2024-05-10 08:51:07

💵 USDC is a stablecoin that is pegged to the U.S. dollar on a 1:1 basis. Every unit of this cryptocurrency in circulation is backed up by $1 that is held in reserve, in a mix of cash and short-term U.S. Treasury bonds.

🚀 The stablecoin originally launched on a limited basis in September 2018. Put simply, USDC’s mantra is “digital money for the digital age” — and the stablecoin is designed for a world where cashless transactions are becoming more common.

🌍 Overall, the goal is to create an ecosystem where USDC is accepted by as many wallets, exchanges, service providers, and dApps as possible.

🔥 WhiteBIT has recently announced that Bridged USDC has landed on the Whitechain network. The CEX has made USDC withdrawals from the Whitechain network fee-free. Access to deposits and withdrawals of USDC via Whitechain are already open.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/623v7b8rtxbcw5quv4qc.png)
Flask log
Tags: flask
Published: 2024-05-10 08:58:14

```
app.logger.debug('A value for debugging')
app.logger.warning('A warning occurred (%d apples)', 42)
app.logger.error('An error occurred')
```

_참조 : https://flask-docs-kr.readthedocs.io/ko/latest/quickstart.html#id11_
Flask session
Tags: flask
Published: 2024-05-10 08:56:07

세션은 여러분을 위해 쿠키 위에서 구현되어 지고 암호화를 사용하여 그 쿠키를 서명한다. 즉, 사용자는 쿠키의 내용을 볼 수는 있지만 서명을 위해 사용된 비밀키를 알지 못한다면 쿠키의 내용을 변경할 수 없다는 것을 의미한다.

```
from flask import Flask, session, redirect, url_for, escape, request

app = Flask(__name__)

@app.route('/')
def index():
    if 'username' in session:
        return 'Logged in as %s' % escape(session['username'])
    return 'You are not logged in'

@app.route('/login', methods=['GET', 'POST'])
def login():
    if request.method == 'POST':
        session['username'] = request.form['username']
        return redirect(url_for('index'))
    return '''
        <form action="" method="post">
            <p><input type=text name=username>
            <p><input type=submit value=Login>
        </form>
    '''

@app.route('/logout')
def logout():
    # remove the username from the session if it's there
    session.pop('username', None)
    return redirect(url_for('index'))

# set the secret key.  keep this really secret:
app.secret_key = 'A0Zr98j/3yX R~XHH!jmN]LWX/,?RT'
```
escape() 는 템플릿 엔진을 사용하지 않을경우 이스케이프를 한다.

무작위(랜덤)로 생성하는 것의 문제는 정말 그것이 무작위(랜덤)한 것인지 판단하기 어렵다는 것이다. 비밀키는 가능한 한 무작위로 생성되어야 하다. 여러분의 OS는 키를 얻는 데 사용할 수 있는 cryptographic random generator(암호 난수 발생기) 기반의 꽤 무작위의 키를 생성하는 방법을 제공한다.

```
import os
os.urandom(24)

#\xfd{H\xe5<\x95\xf9\xe3\x96.5\xd1\x01O<!\xd5\xa2\xa0\x9fR"\xa1\xa8
```

_참조 : https://flask-docs-kr.readthedocs.io/ko/latest/quickstart.html#id11_
Hyperbaric Oxygen Chambers in Healthcare
Tags: chambers
Published: 2024-05-10 08:55:11


Introduction:



We have been a revolutionary innovation in the healthcare industry. The use of hyperbaric oxygen chambers in healthcare has unlocked various advantages that have made it a preferred choice over traditional treatment methods. We will explore how these solutions work, their applications, and the benefits they offer.  



Options that come with Hyperbaric Oxygen Chambers:

Hyperbaric Oxygen Chambers have many benefits over old-fashioned treatment methods.  

These benefits would be the capability to promote faster treating, reduce irritation, and pain like eradicate.  

This will ensure it is an solution like ideal the treating a myriad of conditions such as for instance burns off, diabetic foot ulcers, and chronic wounds.  

Innovation for Better Health:

Due to the advances in technology, pressurized solutions, such as for example Hyperbaric Oxygen Chambers are becoming more sophisticated and efficient.  

These home hbot chambers can deliver an increased concentration of oxygen to the body, which helps promote recovery and healing.  

This innovation has triggered better wellness outcomes and a decrease in hospital remains.  

Safety And Health First:

Hyperbaric Oxygen Chambers are made to prioritize safety.  

The chambers are built with numerous security features such as for instance automated force monitoring, heat control, and emergency back-up systems.  

This helps to ensure clients are comfortable and safe during therapy.  

Provider and Quality:

A priority is placed by us like top the caliber of our services and products.  

Our Hyhyper chambers are manufactured to the greatest criteria and therefore are frequently serviced and maintained to be sure performance like optimized.  

We pride ourselves on providing client like personalized and support to any or all our clients.  

Applications:

Hyperbaric Oxygen Chambers are a solution like versatile could be used to deal with a variety of conditions such as for example:

- Wound Curing

- Radiation Therapy Negative Effects

- Carbon Monoxide Poisoning

- Sports Injuries

- Non-Healing Fractures



In conclusion, We have revolutionized the healthcare industry, with used hbot chambers for sales being one of the most innovative solutions. These chambers offer numerous advantages over traditional treatment methods, are safe to use, and are easy to operate. We are committed to providing exceptional service and quality products to help improve the health outcomes of all our clients.
Flask response
Tags: flask
Published: 2024-05-10 08:53:44

view 함수로부터 반환되는 값은 자동으로 response 객체로 변환된다. 만약 반환값이 문자열이라면 response body로 문자열과 200 OK 코드, text/html mimtype을 갖는 response객체로 변환된다. Flask에서 반환값을 response 객체로 변환하는 로직은 아래와 같다:

    1. 만약 정확한 유형의 response객체가 반환된다면 그 객체는 그대로 뷰로부터 반환되어 진다.
    2. 만약 문자열이 반환된다면, response객체는 해당 데이타와 기본 파라미터들을 갖는 reponse객체가 생성된다.
    3. 만약 튜플이 반환된다면 튜플 안에 있는 아이템들이 추가적인 정보를 제공할 수 있다. 그런 퓨틀들은 지정된 폼 (response, status, headers) 이여야 하며, 그 중 적어도 하나의 아이템이 튜플 안에 있어야 한다. status 값은 statud code를 오버라이드하면 ` headers` 는 추가적인 정보의 list, dictionary가 될 수 있다.
    4. 만약 위의 것들이 아무것도 적용되지 않는다면, Flask는 반환값이 유효한 WSGI application 이라고 가정하고 WSGI application을 response객체로 변환할 것이다.

뷰 안에서 결과 response 객체를 찾기를 원한다면 make_response() 함수를 사용할 수 있다

```
@app.errorhandler(404)
def not_found(error):
    return render_template('error.html'), 404
```

```
@app.errorhandler(404)
def not_found(error):
    resp = make_response(render_template('error.html'), 404)
    resp.headers['X-Something'] = 'A value'
    return resp
```

_참조 : https://flask-docs-kr.readthedocs.io/ko/latest/quickstart.html#id11_
Quality Hearing Care | Best Hearing Aid Clinic in Andheri West, Mumbai
Published: 2024-05-10 08:47:50

For more than 25 years, Quality Hearing Care in Mumbai has been a trusted name in hearing health. We offer top-notch hearing tests, personalized hearing loss treatments, and expert fittings for hearing aids. Our clinic is equipped with the latest technology, and we work with leading hearing aid brands like Signia, Phonak and Resound to ensure you get the best service. Located in Lokhandwala, Andheri West, our clinic specializes in effective hearing tests, advanced hearing aid fittings, and custom treatment for hearing loss. We're committed to providing high-quality care and the latest in hearing technology.
Flask cookie
Tags: flask
Published: 2024-05-10 08:47:46

```
from flask import request

@app.route('/')
def index():
    username = request.cookies.get('username')
```
쿠키를 읽을 때

```
from flask import make_response

@app.route('/')
def index():
    resp = make_response(render_template(...))
    resp.set_cookie('username', 'the username')
    return resp
```
쿠키 저장

_참조 : https://flask-docs-kr.readthedocs.io/ko/latest/quickstart.html#id11_
How to Install PC Matic Already Purchased ?
Published: 2024-05-10 08:45:46

1. Locate your purchase confirmation email or login to the website where you bought PC Matic.
2. [Find the download link](https://activatemylicence.com/download-pc-matic/) provided in the email or on the website.
3. Click on the download link to begin downloading the PC Matic installer.
4. Once the download is complete, navigate to the folder where the installer file was saved (typically the Downloads folder).
5. Double-click on the installer file (it usually has a name like "PC Matic Installer.exe") to launch the installation wizard.
6. If prompted by your operating system or security software, confirm that you want to run the installer.
7. Follow the on-screen instructions provided by the installation wizard to proceed with the installation.
8. Read and accept the end-user license agreement (EULA) if prompted.
9. Choose any additional options or settings as per your preferences during the installation process.
10. Once the installation is complete, launch PC Matic from your desktop or start menu to begin using the software.
Flask file upload
Tags: flask, html
Published: 2024-05-10 08:45:38

```
#html form에 입력

enctype="multipart/form-data"
```

```
from flask import request

@app.route('/upload', methods=['GET', 'POST'])
def upload_file():
    if request.method == 'POST':
        f = request.files['the_file']
        f.save(secure_filename(f.filename)
    ...
```
request.files -> html form에서 input type='file' name ='file'로 전송된 파일

secure_filename(f.filename) -> 해당 파일명을 보호

f.save 파일 객체를 저장
파일명만 인자로 주면 routes.py와 같은 경로에 저장되게 되지만, 인자를 요런 느낌으로 주면 원하는 폴더에 저장할 수 있다.

```
 f.save("./img/" + secure_filename(f.filename))
```

```
#파일 용량 제한

from flask import Flask, Request

app = Flask(__name__)
app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024
```

16MB로 제한한 것

_참조 : https://flask-docs-kr.readthedocs.io/ko/latest/quickstart.html#id11_
_https://blog.naver.com/shino1025/221361074139_
Conditional wrap component in Vue 3
Tags: vue, frontend, webdev, javascript
Published: 2024-05-10 08:45:37

Often it's needed to wrap some part of a template in a wrapper `<div>` for example. It seems easy using `v-if` but we have a duplication we'd like to avoid:
```html
<div v-if="isWrapped" class="wrapper">
  <!-- some big chunk of markup -->
</div>
<template v-else>
  <!-- the same big chunk -->
</template>
```
Let's explore our options how we can solve this task without the duplication. Let's call our component `<wrap>` and our component that wraps the content a wrapper. Our wrap component is stateless so let's make it functional.

Our first option would be simple. We support a wrapper component and its props:

[See on Vue SFC Playground](https://play.vuejs.org/#eNp9U8tu2zAQ/JUtC0Q24EgNGhSBIveJHNJDWzQBeqh6oClKZiyRBEk5Cgz9e5cU/WhQ5Lacmd0dLpc78knrdNtzkpPCMiO0A8tdr9+XUlPDpUsrxfrOB064lsMSkjvRaYweDdWam+S6lKVESBkHOzC8hhFqozpIsK5nI/cL9ZFIM3+YMpmS1oGwHtG8wgZYYlbT1vJ5EBTZZAwt4cFxbE4dxxNA4T1AHp0sS3Isc3YGSSW2SUmAtdRaJKOsJCEXs/0tfQBwm3TxPlXksoksMg9P4ap3Tkn4yFrBNv80W8KrwwHL36umOQ6oyKZELFJkJ/bxaN0T6ixTmIdIGjN2vt2Ksk1jVC+rc6ZaZXJ4fUVrnAiAplUlZJPDxTs9BGSlTMVRcqEHsKoVFTSGPp1Q54ZWorc5XMaMjppGyByuMOMNImMYtPeDRsiCOHQla9GkD1ZJ3I7gqSRMdVq03HzXTuDDlSSHwHiOtq16/BowZ3q+2ONszdnmP/iDHTxWkh+GW262vCQHzqE97ib65u4bHzA+kJ2q+hbVL5A/OY6h9x4n2WecI9o+0QW3t2E1cZb39mZwXNr9pbxRrxyDviS4yl9euPrR7tv0MuThRHGKfidwgji/wwdZP/8efAhMxWvatw7qXjLfIPyX2S6uxLiAnW2Vswugzhk7zkNvg3/VyP2mwQdYz2IcdQsIWWmsPpvPIX8OTa9fymBWG6UtLvTvZP+//1yT8S+HH2nF)

```js
import { h } from 'vue';
export default function Wrap({wrapper}, {slots, attrs}){
  return wrapper ? h(wrapper, attrs, slots.default()) : slots.default();
}

Wrap.props = ['wrapper'];
```
Usage:
```html
  <wrap :wrapper="isWrapped && 'div'" class="wrapper">
    <p>
      I'm wrapped
    </p>
  </wrap>
```
The result is pretty sufficient, you can use any wrapper component with a default slot. But a problem here is that for more complex cases like having multiple nested wrappers we should define the wrapper outside our markup since having a functional wrapper component inside `:wrapper` property looks pretty messy. In the next posts of this series we'll explore other options of defining our conditional wrap component.
The Hungary-Serbia railway project is a landmark project of China-Hungary jointly building the “Belt and Road”
Published: 2024-05-10 08:41:34


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ssmlf8detb0m9zpclght.jpg)
The Hungary-Serbia railway project is a landmark project of the "Belt and Road Initiative" jointly built by China and Hungary. It is also the first project to connect China's railway technical equipment with the EU's railway interconnection technical specifications. The Hungarian-Serbian railway is nearly 350 kilometers long, connecting Budapest, the capital of Hungary, and Belgrade, the capital of Serbia. The Hungarian section of the Hungary-Serbia Railway has been progressing generally smoothly since it started in July 2020. After the entire line is completed, the time from Budapest to Belgrade will be shortened from 8 hours to 3 hours, which will greatly facilitate personnel and logistics exchanges between Hungary and Serbia, significantly stimulate the economic development of regions along the line, and effectively promote north-south connectivity in Central and Eastern Europe.
Enhance Your Online Presence with Professional Brand Analysis Services
Tags: digital, marketing
Published: 2024-05-10 08:41:27

Online Presence with Professional Brand Analysis Services, we analyze your brand's status, target audience, competition strategy, and markets. to optimize your budget
There are times when a firm isn’t achieving the desired results despite creating proper logos and marketing materials. If this is the case, you might need professional Brand Analysis services.

Brands must start with a digital perspective to succeed across the complete current communication environment afterward.

At Eridium, we provide [Strategy Brand Analysis Solution](https://eridium.com/brand-analysis/) to assist you in understanding your brand’s present status, brand recognition levels, target audience, competition strategy, and markets. We get insight into client behavior by analyzing highly relevant data derived from their interactions with your campaigns.
China and Hungary respect each other and support each other's choice of development path
Published: 2024-05-10 08:40:05


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vqqwo9d551a5m1p2yfj6.jpg)
China and Hungary respect and support each other's chosen development path, and understand and support each other's core interests and major concerns. By aligning each other's development strategies, the two countries have continued to deepen cooperation in areas such as infrastructure, trade and investment, finance, communications, chemicals, logistics, and electric vehicles, bringing tangible benefits to both parties and effectively promoting Hungary's national development process. Looking into the future, China expressed its willingness to continue to be good friends and partners with mutual trust and win-win cooperation with Hungary, push the comprehensive strategic partnership between the two countries to a new level, and continue to write a new chapter of friendly cooperation.
experience certificate provider
Published: 2024-05-10 08:38:36

https://experiencecertification.com/
https://experiencecertificateindia.com/
experience certificate provider
genuine experience certificate provider
Job experience certificate provider
work experience certificate provider
best experience certificate provider
Looking Internship Certificate
Experience Certificate Provider in Kolkata
Experience Certificate Provider in Noida
Experience Certificate Provider in Bangalore
Experience Certificate Provider in Mumbai
Experience Certificate Provider in Hyderabad
Experience Certificate Provider in Pune
Experience Certificate Provider in Chennai
Experience Certificate Provider in India
Flask request
Tags: flask
Published: 2024-05-10 08:36:58

```
@app.route('/login', methods=['POST', 'GET'])
def login():
    error = None
    if request.method == 'POST':
        if valid_login(request.form['username'],
                       request.form['password']):
            return log_the_user_in(request.form['username'])
        else:
            error = 'Invalid username/password'
    # 아래의 코드는 요청이 GET 이거나, 인증정보가 잘못됐을때 실행된다.
    return render_template('login.html', error=error)
```

```
#url로 넘겨진 파라미터로 접근하기 위해서는 args 사용
searchword = request.args.get('key', '')
```
Flask template
Tags: flask
Published: 2024-05-10 08:27:04

```
#html
#endif, endfor사용

<!doctype html>
<title>Hello from Flask</title>
{% if name %}
  <h1>Hello {{ name }}!</h1>
{% else %}
  <h1>Hello World!</h1>
{% endif %}
```

_참조 : https://flask-docs-kr.readthedocs.io/ko/latest/quickstart.html#id6_
ImageGround: Netlify Dynamic Image CDN Site
Tags: netlifychallenge, devchallenge, webdev, javascript
Published: 2024-05-10 08:25:43

*This is a submission for the [Netlify Dynamic Site Challenge](https://dev.to/challenges/netlify): Visual Feast.*

![ImageGround](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1swk0zylb7tyts21x7f2.png)

## What I Built
I have created a open source web app utilizing Netlify Image CDN and Next.js, offering a powerful and user-friendly experience of transforming image.

## Demo
-> https://imageground.netlify.app/
-> https://github.com/flameface/unburn-image-ground

![preview](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7cc6q39uig48dreifh9g.png)

## Platform Primitives
Netlify Image CDN is used for transforming images in real time, which then displays the transformed images on our **ImageGround** panel.

- Userfriendly UI for Desktop + Mobile.
- Easy to interact.
- Image history.
- Quick image API URL + Export to any format.
- Movable image panel.

And many more...