teleren/devto huggingface dataset:
Pyinstaller or Python eel generated .exe refer external files errors
Tags: python, eel, pyinstaller
Published: 2022-11-30 09:59:05

When we are trying to generate `.exe` file for our python project, normally we use pyinstaller. If you are writing python eel project, basically in the background, eel encapsulate pyinstaller. 

But sometimes we want to refer the external file in our project, for example for config or setting files. In development environment, we didn't found any issue, but when we run generated .exe file, we may encounterd error saying that cannot find the specific external files. The cause of this error is when you run .exe file, the app is referring the local python interpreter not the one packaged inside of .exe file. 

In this blog, I wrote a function to refer the differrent project path for dev env and production. 

Commands we use to generate .exe file 

```shell
# eel command to generate .exe file
# where web is the dir for static files
python -m eel --onefile main.py web
```

```shell
# pyinstaller command to generate .exe file
pyinstaller --onefile -w main.py
```
function refer different path for dev env and production.

```python
def get_app_running_path():
    # for .exe file
    if getattr(sys, 'frozen', False):
        app_path = os.path.dirname(sys.executable)
    else:
        # for dev environment
        app_path = os.path.dirname(__file__)
    return app_path
```
IOS Render Component Bug in Vue 3
Tags: vue, vue3
Published: 2022-11-30 09:54:18

Recently we had a problem where we toggled a CSS class `disabled` on a component like this:

```<my-button :class="{ disabled: !readyToSubmit }" @click="handleSubmit">Submit</my-button>```

The CSS class _disabled_ is toggled depending on the computed property _readyToSubmit_'s boolean value.

The problem was, only a few parts of the button changed on IOS/Safari, where all parts of the button changed on all other devices and browsers.

In short, this means the component wasn't properly re-rendered.

How can we best trigger a re-render in Vue? **By adding the built in key special attribute to the component and changing its value**.

Simply like this:

```<my-button :class="{ disabled: !readyToSubmit }" @click="handleSubmit" :key="`MyBtn-${!readyToSubmit}`">Submit</my-button>```

To better help Vue to keep track of what has changed and what hasn't, we supply a key attribute.

[More on the key attribute in the Vue documentation](https://vuejs.org/api/built-in-special-attributes.html#key)
A Simple Guide To Weather-Based Advertising
Tags: webdev, tutorial, devops, api
Published: 2022-11-30 09:38:09

With the advent of modern technology, business functions have constantly changed and evolved. This is particularly true for advertising, where the tempo of change is quick. A contributing factor is that people are tired of the same boring ads, messaging, and content. In order to stand out, businesses need to make their ads more engaging, attractive, and, most importantly, personalized. 

One of the innovative ways companies have grabbed consumers' attention is by making their ads personalized based on the current weather conditions of the consumers. Weather-based advertisements can help control the time and location of the ads displayed depending on the weather. For instance, ads for sunscreens can be shown when the weather is sunny. 

‍Weather-based advertisements can work for a plethora of industries ranging from food and beverages to fashion, travel, hospitality, entertainment, health and beauty, pharmaceuticals, insurance, and beyond. The variables that can be set for these advertisements are the temperature, rainfall, snow, sun, humidity, location, and other weather parameters.

Why is weather important?

‍Weather is one of the biggest influencers on consumers’ buying behavior. Sainsbury’s, a UK-based retail giant, examined the relationship between weather and sales numbers and found that just a few degrees rise in temperatures in early spring can lead to a 200% increase in BBQ product sales.

Weather not only impacts one’s daily life and choices, but it also is a massive driver of emotions. People have expressed that they feel more sadness during the winter or when it’s raining outside. More than 5% of adults in the U.S. experience seasonal affective disorder (SAD), and about 10% to 20% of people suffer from a milder form known as the “winter blues.” These emotions also impact their purchase behavior. On the other hand, an IBM survey suggests that 21% of consumers feel excited to update their wardrobe heading into the fall season. 

‍A consumer’s needs are also heavily influenced by the weather. For example, a consumer may need a coat in winter or a bathing suit in summer. This makes it essential for organizations to be mindful of the ads showcased in any location. Leveraging weather insights is an effective and efficient way to engage with consumers on a personalized level.

To top it off, weather affects around $3 trillion worth of business in the private sector alone in the US. The case is the same in countries across the globe, making weather an extremely important variable. 

Click to read more: [How does weather-based advertising work?](https://www.getambee.com/blogs/a-simple-guide-to-weather-based-advertising)
Beginning JavaScript: Part 2
Published: 2022-11-30 09:34:44

**JavaScript Variables**

A **variable** in JavaScript is a named storage for data. With variables we can store data such as numbers in the variable. Think of a chat application , Each user on the app has a username and maybe an age. Such information can be stored in a variable then be reused once needed. To declare variables in in JavaScript, we use the let and var keywords.

**Example:**

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

On line 1, we declared a variable called _userName_ and on line we assigned the name _“Ceasar”_ to the variable . To print the name to the console we invoked the console.log() function on line 3.
We could also assign values directly to variables as seen on line 6. Both ways would return a working program. But I love assigning values directly and write less code.

**Output:**

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

Data types in JavaScript define the different data kinds or type that you will be working with to store and handle data. It’s important to learn about data types as you will be able to handle information very well. Among these include _numbers,strings,booleans and null_.

**a) Numbers**
Among these include positive and negative integers. With these include numbers delimeted with a decimal point also known as floating point numbers

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

**b) Strings**
Strings are used to represent and work with a set of characters. They are created by surrounding them in single or double quotes. For example, your name is a string.


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


**c)Booleans**
This is a data type that can either evaluate to true or false. Let’s say we would like to check if a user is logged in to our chat application, We could use booleans.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sz7rviuh4k4dfez18as0.png)
AirDrop feature limited ahead of protests in China
Published: 2022-12-03 23:11:59

---
title: AirDrop feature limited ahead of protests in China
published: true
date: 2022-11-30 09:20:37 UTC
tags: 
canonical_url: https://www.privacytools.io/guides/airdrop-feature-limited-ahead-of-protests-in-china
---
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/faq4so9n40kfh9z6bg0z.jpg)

Apple Inc. has limited the AirDrop wireless file-sharing feature on iPhones in China after the mechanism was used by protesters to spread images to other iPhone owners. AirDrop allows the quick exchange of files like images, documents, or videos between Apple devices.

Apple made the change to AirDrop on iPhones sold in China. The use of AirDrop to sidestep China's strict online censorship has been well-documented over the past three years and was highlighted again recently. Apple didn't comment on why the change was introduced in China, but said that it plans to roll out the new AirDrop setting globally in the coming year. Many of Apple's own services are also inaccessible in China – the world's biggest smartphone market – including Apple TV, the iTunes Store, paid podcasts, Apple Books and Apple Arcade.

During pro-democracy protests in Hong Kong, activists used AirDrop to spread their political demands. The AirDrop feature has been controversial since its iPhone debut with iOS 7 in 2013, as it's also been used inappropriately in settings outside of China.
Back to Back #18 - Back-end news by SFEIR
Tags: newsletter, french, backend, sfeir
Published: 2022-11-30 09:16:09

_Comme chaque fin de mois, les experts de SFEIR publient la newsletter back-end. Retrouvez la sélection de contenu, les outils coup de cœur et les astuces._

---

## 📰 Articles

### [Why are my PostgreSQL updates getting slower ?](https://www.cybertec-postgresql.com/en/why-are-my-postgresql-updates-getting-slower/)

Laurenz Albe nous parle de mises à jour dans une base de données. Son article part d'un exemple puis explique les raisons des opérations de plus en plus longues et termine sur les remèdes.

### [GraalVM 22.3 is here: JDK 19 builds, jlink support, new monitoring features, and more!](https://medium.com/graalvm/graalvm-22-3-is-here-jdk-19-builds-jlink-support-new-monitoring-features-and-more-f6e2b2eeff95)

En plus de la version 22.3 sortie à la fin du mois précédent, l'équipe GraalVM a annoncé qu'Oracle va contribuer à OpenJDK avec une partie du code. L'objectif est « l'élimination des obstacles à l'adoption par un écosystème plus large et à la participation au développement des technologies GraalVM ». Autre nouvelle importante, une nouvelle mascotte a été dévoilée 🐇

### #RetourAuxSources : Le cache HTTP

Bon ok, le cache http, sujet hautement pas du tout sexy… Et pourtant ! Hubert nous rappelle toutes les bases, toutes manières de gérer le cache, tout est très bien présenté, animé avec un petit wagon sur une ligne de métro c'est juste parfait ! Que vous ayez ou non de l'expérience avec le cache HTTP, prenez le temps de regarder son talk, vous allez forcément apprendre des trucs et ça vous trotte dans la tête quand vous en aurez besoin !

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

## 🛠️ Outils

### flastapi

FastAPI ? Flask ? Pourquoi pas les deux 🤷 C'est ce que ce module propose. Voulant profiter de fonctionnalités disponibles dans FastAPI mais pas (encore ?) dans Flask, ce plugin allie le meilleur des deux mondes.

{% embed https://github.com/maarten-dp/flastapi %}

### [Javalin](https://javalin.io/)

Javalin est à la fois une bibliothèque web Kotlin et une bibliothèque web Java, ce qui signifie qu'il est développée en mettant l'accent sur une grande interopérabilité entre les deux langages. Javalin n'a pas pour objectif d'être un framework web complet, mais plutôt une bibliothèque d'API REST légère. Ainsi, il peut être utilisé pour créer un backend RESTful ou juste pour exposer des ressources statiques.

## 💡 Trucs et astuces

L'astuce de mois concerne Docker Compose. Ce billet de Maciej Walkowiak parle du flag `--wait`, qui attend que les containers soient prêts avant de pouvoir les utiliser : [_Docker Compose - waiting until containers are ready_](https://maciejwalkowiak.com/blog/docker-compose-waiting-containers-ready/).
Joseph's Stalin's Secret Guide To Servicenow Csa Exam Questions
Tags: webdev, beginners
Published: 2022-11-30 09:05:49

<a href="https://dumpsarena.com/servicenow-dumps/csa/">servicenow csa exam questions</a> It will save you time and money and help you bought your professional dreams. 2go Certified System Administrator CSA actual dumps are smooth to shop for and less expensive. You should purchase from our net web website online without paying extra charges. ServiceNow CSA Industry experts approve our dumps, and we designed and launched our Certified System Administrator CSA actual questions after feedback from greater than 90,000 professionals worldwide. The features of our CSA exam dumps are smooth and smooth to use, and every person can use them without steerage. However, 2go experts offer useful resource if you face any problems the usage of our CSA valid dumps.

Click Here More Info >>>>> https://dumpsarena.com/servicenow-dumps/csa/
ebizframe Intelligent ERP for Food & Beverage Industry
Tags: erp, erpsoftware, foodandbeverage, erpsystem
Published: 2022-11-30 09:04:48

The Food and Beverage (F&B) Industry is one of the most significant contributors to any economy. Being a highly controlled and consumer-facing market, food & beverage businesses always struggle for balancing growth, performance, and cost, and satisfy consumer demand in a timely and efficient way. The required coordination and integration amongst various departments, locations, and people in this very competitive, vast, and complex industry highlight the need of Intelligent ERP for Food & Beverage Industry. It simplifies and automates various tasks of manufacturing, food processing, packaging, distribution, and other critical business processes. This industry transforms raw agricultural goods into consumer food products, including fresh food, packaged food, and beverages (both alcoholic and non-alcoholic).

## Challenges Faced by Food and Beverage Industry

Consisting of various sub-sectors including cafeterias, restaurants, fast-food points, pubs, catering businesses, food manufacturing operations, food transportation services, and more, the Intelligent ERP for Food & Beverage Industry is required by very diversified processes ranging from packaging to preparing, transporting, and serving food or beverages. To remain relevant and profitable in this vast industry, enterprises have to deal with a multitude of challenges like following strict compliance requirements, managing highly complex and competitive supply infrastructure, and applying smart and impactful tactics. Some of the vital challenges are as follows:

- Uniformity and quality of data across the organization
- Quality control management
- Access real-time, business information
- Reduce cost and risks
- Minimize waste
- Errors and scheduling difficulties
- Track the actual yield
- Improve compliance
- Adapt quickly to the market changes
- Improve transparency and sustainability in supply chains and products
- Demand forecasting and inventory planning
- New product development and introduction
- Calculate the true cost of manufacturing
- Batch traceability, and other business performance parameters
- Planning for optimization of resources, materials, and processes

Intelligent ERP for Food & Beverage Industry like ebizframe offers benefits to all businesses across various industries. As it provides a wide range of industry and function-specific features and modules that are invaluable when managing complex business processes in this industry.

[Read More](https://www.minds.com/ebizframe/blog/ebizframe-intelligent-erp-food-beverage-industry-1444274918500864003)
Multi-level has() query in laravel
Tags: laravel, eloquent, webdev
Published: 2022-11-30 09:03:20

When retrieving records from the database, sometimes we may require fetching those categories which has product, and this can be achieved by simply.
click the link to read all.
[https://www.blazecodes.com/posts/multi-level-has-query-in-laravel](https://www.blazecodes.com/posts/multi-level-has-query-in-laravel)
Phân Phối Thiết Bị Mạng Chính Hãng
Published: 2022-11-30 09:01:03

https://cnttshop.vn/ Báo giá ✔️ Switch Cisco✔️ Firewall Cisco✔️ Wifi Cisco✔️ Module Quang Cisco✔️ Switch Juniper✔️ Switch Aruba✔️ Wifi Aruba✔️ Firewall Fortinet ✔️ Uy Tín Số 1 Việt Nam✔️✔️✔️
0962 052 874
kd@cnttshop.vn
NTT03, Line 1, Thống Nhất Complex, 82 Nguyễn Tuân, Thanh Xuân, Hà Nội.
https://boosty.to/cnttshopvn
https://velog.io/@cnttshopvn
https://pbase.com/cnttshopvn/cnttshopvn
https://plaza.rakuten.co.jp/cnttshopvn
https://app.bountysource.com/people/110059-thi-t-b-m-ng-cnttshop
https://matters.news/@cnttshopvn
https://penzu.com/public/4bbd7f85
Wednesday Links - Edition 2022-11-30
Tags: java, jvm, gradle, cloudflare
Published: 2022-11-30 08:53:40

Cloudflare servers don't own IPs anymore – so how do they connect to the Internet? (12 min)🏷️
https://blog.cloudflare.com/cloudflare-servers-dont-own-ips-anymore/

Finding heap memory leaks with Async-profiler (3 min)🚰
https://krzysztofslusarski.github.io/2022/11/27/async-live.html

Introducing Aqua – A Powerful IDE for Test Automation by JetBrains (4 min)🌊
https://blog.jetbrains.com/qa/2022/11/introducing-aqua-a-powerful-ide-for-test-automation-by-jetbrains/

Our (bumpy) road to Jakarta EE 10 (2 min)🚧
https://quarkus.io/blog/our-bumpy-road-to-jakarta-ee-10/

Compilation Avoidance (4 min)✋
https://blog.gradle.org/compilation-avoidance

A small optimization in #Java 19 inside stream API. (1 min)🚅
https://twitter.com/tagir_valeev/status/1597179558658469889

Decouple to delete (4 min)🔨
https://blog.ploeh.dk/2022/11/21/decouple-to-delete/

Upgrade to Apache Commons Text 1.10 to Avoid New Exploit (2 min)💥
https://www.infoq.com/news/2022/11/apache-commons-vulnerability

A poor man's API (6 min)🪙
https://blog.frankel.ch/poor-man-api/
Trang chủ Crypto789
Tags: crypto789, bitcoin, ok, coin
Published: 2022-11-30 08:48:21

Welcom to Crypto789 chuyên trang tổng hợp về Crypto, chia sẻ toàn bộ những thông tin về tiền điện tử như Sàn giao dịch, Đồng coin, Hướng dẫn đăng ký giao dịch,... Các tin tức được cập nhật thường xuyên và nhanh nhất.

- Website: [https://crypto789.net](https://crypto789.net)
- Địa chỉ: Gò Vấp, Thành phố Hồ Chí Minh
- Tags: Crypto789, Tiền ảo, Tiền điện tử, Bitcoin, Ethereum, Sàn giao dịch, Mua coin, Bán coin, Đầu tư coin, tiền ảo,...
- Hashtag: #crypto789 #crypto789net #tienao #tiendientu #sangiaodich #muabancoin #dautucoin #trangthongtintienao #tienkythuatso #bitcoin #ethereum #crypto
Using a smartphone as streaming monitor for Teams
Published: 2022-11-30 08:45:00

Every time I stream my courses using Teams (but it is happened even when I use other streaming platform), I'm afraid that my students cannot see my content in the right way. 
Surely it happened to you too to talk over a fantastic slide that you made, but, in reality, your listeners are seeing another screen. It doesn't happen because you are not capable, you were simply focused on something else, and you didn't change the OBS scene at the right time. Or you are on the right screen, but your connection is bad, and the stream is not reaching your listeners as it should.

To avoid this, when I stream my content with Teams, I use a simple smartphone to check what the other in the meeting are seeing.

To begin, I connect the smartphone to a different network than the one I'm transmitting with in order to exactly simulate the 
conditions of my listeners

Then, I open the Teams application (on the smartphone) by logging in with the same user I'm broadcasting as.

If you are already in a Teams meeting, when opening the application, a notification appears at the top with a "join" button (as shown in the figure):

![The Teams mobile app with the join button on top](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tgr0r2coyn5tqgu1kwwu.png)

If you click on "join" button, you can choose to add the device to the meeting or transfer the call into the device as shown in the following picture: 

![Add or transfer the call options](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vtxg0qarcxgsw9evz1q9.png)

Choosing "Add this device" option, you still remain in the call with the device you are using to stream, and you participate to the call with the smartphone.
The smartphone, from this moment, will show you exactly what your attendees see.

To avoid strange noises from the mic of the smartphone, I suggest you disable speaker and mute the microphone of the smartphone itself.
AWS Budget Best Practice!
Tags: aws, devops, beginners, tutorial
Published: 2022-11-30 08:38:43

When I passed the AWS CCP exam, I was more than excited to start getting my hands dirty and experiment some of the AWS free tier resources.

Then, a friend of mine passed by me and said: "**You know, the first time I tried to experiment on AWS, I received a bill of _4K$_!, so pay attention when you want to launch any new service and make sure it is still in the free tier!**"

To be honest, this frightened me. Yes, due to my novice experience in AWS, I might launch some resources without prior knowledge of the cost severity.

Here comes the AWS Budget Best Practice!

**If you're an AWS customer, you know that it's critical to keep an eye on your costs.** The AWS Cost and Billing page is your go-to resource for tracking your spending, but did you know that you can also set up an activation budget alarm? This alarm can help you stay within your budget by notifying you when you're getting close to your set limit.

**Why set up an activation budget alarm?**

There are a few reasons why you might want to set up an activation budget alarm. First, it can help you avoid overspending. Second, it can help you plan for future expenses. Third, it can help you identify areas where you can reduce your spending.

**How does the activation budget alarm work?**

The alarm is designed to alert you when your spending reaches a certain limit. You can set the limit to whatever amount you want. Once the limit is reached, the alarm will send you a notification. You can then decide whether to increase the limit or reduce your spending.

**Is there anything else I can do to track my costs?**

In addition to the Cost and Billing page, there are a few other resources you can use to keep an eye on your costs.
1. AWS Billing and Cost Management console, which provides a comprehensive view of your costs. 
2. AWS Budgets page, which allows you to set up and track your monthly budget. 
3. AWS Cost and Billing report, which provides a detailed breakdown of your spending.

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

Let me know what do you think in the comments!

Thanks for reading! I hope you found this post helpful in your journey to becoming an Amazon Web Services Cloud Practitioner.

Feel free to reach me out on the following:
LinkedIn: https://www.linkedin.com/in/lara-wehbe/
Email: larawehbee@outlook.com