teleren/devto huggingface dataset:
The Little Things or One Little Thing in Sonoma
Tags: apple, sonoma, macos
Published: 2023-11-29 16:14:29

---
title: The Little Things or One Little Thing in Sonoma
published:  true
description: a little thing in Apple macOS Sonoma that bothers me
tags: apple, sonoma, macOS
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-11-29 15:57 +0000
---
Recently I updated my laptop to the latest and greatest.

I did so after consulting the Ars Technica [review](https://arstechnica.com/gadgets/2023/09/macos-14-sonoma-the-ars-technica-review/).

The review covered the new desktop widgets, so I was keen to try these out and after a successful upgrade I had a look at the widgets and added few, which I normally had other utilities to do:

- A small date indicator (there is one in the top right corner in the menu)
- A small calendar (I often open a terminal and use `cal`)
- A weather widget, I like to go outside after working hours, so it is nice to see the weather forecast before going for a run or a walk
- And finally, a widget to indicate the battery on several attached devices and my laptop

![All my widgets on my desktop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h0busedygfis2zs44yrs.png)

And here is a little thing that annoys me.

Apple have always been good with even addressing the detail and have always been a very detail oriented company, but here they slip.

![The battery indicator widget](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zdjvo78brtu37jm43ptc.png)

As you can see I have battery indicators for two mice - well this is actually a keyboard and a mouse, so I cannot see which is which.

My problem with this is that, before when I wanted to get an overview of my battery status I would open the Bluetooth menu from the Desktop menu and I could see all the devices.

And well what do you know, in that menu the keyboard actually has a keyboard icon and the mouse icon is in the same style as in the widget, so the keyboard icon is probably in some design file somewhere in Apple HQ...

![The bluetooth dropdown from the desktop menu](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jwjjfb9q49xi29ms1k4i.png)

I would very much like for this communicatae the proper information by using proper icons, since then it would be super sweet.

I have written to Apple using some basic feedback form, so my hopes for this to be fixed are not particularly high.
c++模板
Published: 2023-11-29 16:11:07

C++是真的他妈难学啊，总是有一堆莫名其妙的东西，他妈的编译原理也是一脸懵逼。
###尾随返回类型
```c++
int add (int a, int b){
return a + b;
}
//像这种，返回类型都是放在前面的
auto myFunction() -> int{
return 5;
}//目前没懂这是为了干啥，放屁吗在那，看鸿蒙的代码也没懂，也没用这些东西啊操
```
decltype

### result_of
用于推断函数调用的返回类型
```c++
result_of<F(Args...)>::type  
```
其中result_of<F(Args...)>是一个模板结构体，而不是一个类型，
而我们引出来的type才是一个F(Args...)返回的类型
```c++
std::result_of<decltype(multiply)&(int, int)>::type
//decltype适用于推断类型的，那么为什么还要在后面加上(int,int)呢？
//是因为有可能遇到函数重载，想象一下multiply有参数类型为double和参数
//类型为int的情况。
auto enqueue(F&& f, Args&&... args) 
        -> std::future<typename std::result_of<F(Args...)>::type>; 
//关于这段代码为什么F能被推断为是函数，是因为F(Args...）
```
### future
与并发编程相关的模板类，当启动一个异步操作时，我们会得到一个future对象，
当这个get出结果的时候，
```c++
future<int> fu = async(compute);
auto ret = fu.get();//假设compute是一个函数返回的是int类型，
```
通用引用（转发引用）
看上去是右值引用，但是既可以绑定右值也可以绑定左值，通常与forward一起用
```c++
template<typename T>
void wrapper(T&& arg){
somefunction(forward<T>(arg));
}
```
forward是不会改变参数是左值还是右值，完美的保留了参数的原始类型和值类别。

### packaged_task
既能封装函数也能封装对象，实现异步编程的强大工具，特别是在需要异步执行任务并在**将来某个时刻**获取其结果的场景中。

### bind
参数是函数和若干参数，返回值类型是函数对象。
关于文件处理与数据同步系统的需求
Published: 2023-11-28 13:08:16

# 一、需求概括
1. 基本描述
开发一个系统，用于处理大量的文本文件，并将处理后的数据同步到远程服务器。
系统需要高效地处理文件，并发地执行多个文件的读写操作。
2. 功能要求
文件读取与处理

使用 C++ STL 中的 I/O 库读取文本文件。
应用 STL 容器（如 std::vector, std::map 等）来存储和处理数据。
实现基本的文本解析功能，如统计词频、过滤特定格式的数据等。
多线程处理

使用 C++11 或更高版本的线程库来实现多线程处理。
设计线程安全的数据结构，确保在多线程环境下数据的一致性。
实现线程池管理，优化资源使用和任务分配。
网络编程

实现基于 TCP/IP 或 UDP 的客户端-服务器架构。
服务器端负责接收处理后的数据，并存储或进一步处理。
客户端负责发送数据，需要有重试和超时处理机制。
日志与错误处理

实现日志记录系统，记录关键操作和错误信息。
对异常情况进行处理，确保系统稳定运行。
3. 技术栈
语言：C++
构建工具：CMake
STL模板库：重点使用容器、算法、迭代器等。
线程处理：C++11 线程库。
网络编程：可选用 Boost.Asio 或标准库中的网络功能。
4. 性能要求
系统需要能够高效处理大量数据。
优化内存和CPU使用，确保在高并发情况下的性能。
5. 可扩展性
设计时考虑到未来可能的功能扩展，如支持不同类型的文件处理、增加更复杂的数据处理算法等。
这个需求场景涉及到了文件处理、多线程编程和网络通信，都是 C++ 开发中的常见需求。您可以根据这个场景来设计和实现相应的系统。如果有任何具体的技术问题或者需求细节需要进一步讨论，请随时告知。
The Cordova community survey
Tags: cordova, capacitor, android, ios
Published: 2023-11-29 16:22:58

---
title: The Cordova community survey
published: true
date: 2023-11-29 16:10:00 UTC
tags: cordova, capacitor, android, ios
canonical_url: https://blog.merzlabs.com/posts/cordova-survey/
---

If you are reading this you probably use or have used Apache Cordova. The Apache Cordova projects wants to understand the users and contributors better. Therefore, we invite you take part in a short survey for app developers and contributors of Cordova plugins.

[Take survey](https://forms.gle/2HKWATLcRQdw85mE6)

Thank you very much for taking part in this survey. The goal of this survey is to identify areas that can be improved by the Cordova community together. The survey is open from now on to December 24, 2023. The results will be shared on the Cordova blog.

For me personally the survey is very important, and I am really looking forward for the results. I think we all have a certain impression about the project and the survey should help us get a clear picture of what to do to make this project better for everybody.

_Disclaimer: The survey questions are designed to not contain any personal information and can be answered anonymously. Please take note that the survey is using Google Forms to process the responses. The Google privacy policy is applicable for the data processed._
New version of Monster 3.55.0 released!
Tags: javascript, html, webdev
Published: 2023-11-29 15:51:32

---
title: New version of Monster 3.55.0 released!
published: true
description: the new version of javascript html5 framework
tags: javascript, html5, webdev, js
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p12fc53xxnx7pgv3px2z.png

---

We're excited to announce the release of version 3.55.0 of our JavaScript HTML5 framework! This update introduces a host of improvements and new features aimed at enhancing the development experience and streamlining your workflow.

Key Updates:

**ContextHelp Fixed:** We've resolved issues in the ContextHelp feature, ensuring smoother and more intuitive assistance within the framework.

**New Control Element:** ContextError: This new addition allows for more robust error handling and improved user feedback mechanisms.

**Default-Value by Translation:** Simplifying localization, the <div data-monster-replace="path:content | i18n::value"></div> now seamlessly integrates translated default values.

![Schema Datatable](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3jekt9dtuc0iknydmzf6.png)

**Unique Configuration Key Generation:** The generateUniqueConfigKey method has been refined. It no longer relies on hash values for keys, leading to more efficient configuration management.

**Improved Collapse Functionality:** The collapse functionality now calculates heights using clientHeight instead of scrollHeight, enhancing performance and accuracy.

**Persistent Data Table Sorting:** Enhancing user experience, the last sorting state in data tables is now saved, making data interaction more consistent and intuitive.

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

These updates represent our ongoing commitment to providing a robust and user-friendly development framework. We encourage you to explore these new features and improvements. Your feedback is invaluable to us, as it helps us to continuously refine and enhance Monster.

Feel free to share your thoughts and experiences with version 3.55.0.

Happy coding!


https://monsterjs.org/
https://dev.to/schukai/the-awakening-of-the-monster-53jk
Power of Asking Questions
Tags: codenewbie, softwaredevelopment, softskills
Published: 2023-11-29 15:50:33


| 🔴 **Disclaimer**: This post is enhanced with AI assistance.|
|--------------|

![Don't Stop Your Questions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j945o8f1xge11d85y9df.jpg)

## The Newbie Exclaimed
> Dear Bard, explain to me the power of asking questions!

## Google Bard Pondered
You must learn to ask the four beautiful questions in order to welcome the power of the proper questions into your life.

### 1. Why?
### 2. Why Not?
### 3. What if?
### 4. How?

```
In realms of knowledge, vast and deep,
Where minds explore, ideas leap,
The power of questions, a guiding light,
To unveil truths, dispel the night.

The curious soul, with questions bold,
Embraces learning, stories untold,
For in each query, a spark ignites,
Illuminating paths, banishing plights.

"Why?" it asks, with piercing gaze,
Unveiling reasons, intricate maze,
Delving into motives, hidden springs,
Unraveling mysteries, truths it brings.

"Why not?" it challenges, with a defiant tone,
Breaking boundaries, venturing unknown,
Pushing limits, defying the norm,
Embracing possibilities, weathering the storm.

"What if?" it ponders, with a whimsical flair,
Imagination takes flight, without a care,
Combining ideas, like stars in the sky,
Unleashing creativity, soaring high.

"How?" it inquires, with a practical art,
Seeking solutions, playing its part,
Transforming dreams into tangible deeds,
Bridging the gap between wants and needs.

Oh, the power of questions, a force so grand,
Shaping our minds, guiding our hand,
Inviting curiosity, knowledge to gain,
Unveiling wonders, easing life's strain.

So let us embrace the art of inquiry,
With open minds, set our spirits free,
For in the realm of questions, wisdom we find,
A tapestry of knowledge, forever entwined.
```
Backend Expertise, Frontend Adaptability
Published: 2023-11-29 15:47:30

I'm a .NET Backend Developer, primarily working on Web API Development. I code in C# and manage SQL Server for database operations. My responsibilities include developing, debugging, bug fixing, and enhancing RESTful/SOAP APIs. I also handle server configuration, deployments, and related tasks.

I collaborate closely with frontend developers, testers, and the support team. Git is my primary code management tool, enabling efficient collaboration with my lead. I manage branching, merging, and maintain high-quality code through reviews. Postman is essential for testing APIs, forming a core part of my daily tasks at work.

Recently, I took on a personal web development project using React. Despite my focus on backend development, I quickly adapted to coding in React. I explored React, DOM, Axios for API calls, and ensured responsiveness with HTML, CSS, and JS. Spending my entire weekends on this project reflects my interest and passion for learning new technologies. While my professional role centers on backend development, I find it easy to adapt to frontend technologies. Ultimately, the process of coding and debugging remains consistent regardless of the language or technology involved.

In the end, what I want to say is that my past coding experience has made it easy for me to learn new technologies. Being able to adapt easily is important, but what matters most is my interest in it. Even though I primarily focus on backend development, I can easily adapt to frontend work too. It's because I have a passion for learning and coding that allows me to do this.
Innovative IoT Application Development Company
Published: 2023-11-29 15:44:27

At TechnBrains, our competent engineers craft IoT mobile apps that redefine interconnectedness. Streamline your processes with our IoT apps, used by large companies worldwide. Develop your IoT mobile app with skilful individuals at our IoT Development Company.

**IoT App Development Services:**

•	Automate and streamline routine tasks
•	Modern design elements and latest technology features
•	Expertise in developing feature-rich mobile apps for iOS, 
        Android, and more
•	Highly efficient, focused, and feasible applications

**Why Choose TechnBrains for IoT App Development?**

•	Extraordinary measures to maintain standards
•	Efficient, feature-packed, and aesthetically pleasing apps
•	Complete user control through extraordinary connectivity
•	Active communication and prompt issue resolution

**Key IoT App Features:**

•	Control lighting and appliances
•	Monitor from anywhere
•	Take actions from anywhere
•	Use location services

Explore unlimited possibilities with TechnBrains. Contact us for the best [IoT app development](https://www.technbrains.com/mobile-application/iot-app-development/).
Python - Sliding Window Technique for Efficient Subarray or Substring Operations
Tags: python, algorithms, programming, tutorial
Published: 2023-11-29 15:30:00

The Sliding Window technique is valuable for solving problems involving subarrays or substrings within an array or string. It optimizes the problem by maintaining a "window" of elements and sliding it over the input data. This approach often leads to efficient linear or near-linear time solutions. Here's an example:

**Example - Finding the Maximum Sum Subarray of Fixed Length in Python:**

```python
def max_sum_subarray(arr, k):
    max_sum = float('-inf')
    current_sum = sum(arr[:k])  # Initialize with the sum of the first 'k' elements

    for i in range(k, len(arr)):
        current_sum += arr[i] - arr[i - k]  # Slide the window

        if current_sum > max_sum:
            max_sum = current_sum

    return max_sum

# Example usage:
my_array = [2, 1, 5, 1, 3, 2]
window_size = 3
result = max_sum_subarray(my_array, window_size)
print(result)  # Output: 9 (Maximum sum subarray: [5, 1, 3])
```

In this example, we use the Sliding Window technique to efficiently find the maximum sum subarray of a fixed length `k` within an array. We initialize the `current_sum` with the sum of the first `k` elements, then slide the window one element at a time, updating the sum as we go. This approach avoids redundant summation and results in a linear time complexity solution.

The sliding window technique is versatile and can be adapted to solve various problems related to subarrays or substrings, such as finding subarrays with specific properties, calculating averages, or detecting patterns within data. It's a powerful tool for optimizing these types of operations.
Bypass normal or image captcha using python selenium
Tags: python, coding, security, automation
Published: 2023-11-29 15:09:21

{% embed https://www.youtube.com/watch?v=3ghn3YB470g %}
Create an account with the captcha solving service : https://2captcha.com/for-customer/?from=8570249
You need to make a deposit of at least $2 to run the service
🤔 Python Quiz: Are you formatting your snakes?
Tags: python, beginners, programming, tutorial
Published: 2023-11-29 15:02:15

Follow me to learn 🐍 Python in 5-minute a day fun quizzes! 
[Follow me and don't miss the next quiz!](https://dev.to/vladignatyev) 

Find [previous quiz here](https://dev.to/vladignatyev/python-quiz-164-can-you-spot-the-correct-python-string-formatting-57dl).

Are you ready to put your Python coding style to test? Let's dive into a quick but intriguing quiz [based on PEP 8](https://peps.python.org/pep-0008/), the style guide for Python code. 

Code formatting might seem trivial, but it's crucial for maintaining readable and clean code. 

# Quiz 2 out of 64
Which one of these code samples is done right according to PEP 8? Answer with **0 for the first** sample or **1 for the second** sample.

## Sample 1
```python
def calculate_area(length, width):
    return length * width

area = calculate_area(10, 20)
print(area)
```

## Sample 2
```python
def calculate_area(length,width):
return length*width
area=calculate_area(10,20)
print (area)
```

Post your answer in the comments – is it 0 for the first sample or 1 for the second? And don't forget to explain why you chose that answer. Let's see how many of you are true PEP-8 pros! 🐍💻

> or [Go to Quiz 3/64](https://dev.to/vladignatyev/python-quiz-364-dive-into-pythons-pep-484-type-hints-1ac8)
What is JSX elements in React?
Tags: webdev, javascript, react
Published: 2023-11-29 14:59:53

Hey Developer,

Welcome to my React blog, My name is [Anas Mahmud](https://www.linkedin.com/in/aanas-mahmud/). I am a Full-Stack developer.

In this blog, I will discuss about the JSX and React elements in React JS.

> Summarized from [Learn With Sumit](https://www.youtube.com/watch?v=Uj-Bt0pWEP4&t=1442s)

## What is JSX in React JS?

As we know, browsers create a DOM (Document Object Model) element by parsing HTML elements. So HTML elements are ultimately created in the DOM as DOM elements. Which is called **_HTML DOM Node_**. Although it looks like an object, but it is not an object. It's the basics of the web.

To create a new element in DOM, we have the method `document.createElement('p');` So if we create a DOM element this way, then it would be very difficult. That’s why HTML is here. Using HTML we can create DOM elements quickly and easily. This is how the HTML element works…

**In React,** we have a method for creating a react element called `React.createElement('p', null, 'Hello World!');` because React can only recognize react elements. and React elements are valid JavaScript objects.  It looks like: `{ type: 'p', props: { children: 'Hello, Wrold!'}}` This is the difference between a React element and a DOM element.

> _The HTML element type is HTML DOM Node. On the other hand, React element type is JavaScript Object._

However, if we have to create React elements by method, then it’s cumbersome. That’s why React has a syntax, which is JSX (JavaScript XML). Now we can create a React element by using JSX.       `<p>Hello World!</p>`
And React in the backend compiles the JSX syntax by using [Babel](https://babeljs.io/) Transpiler to create the element through the `react.createElement()` method.

This JSX syntax is totally JavaScript-powered.

-  We can use JavaScript expressions in JSX.
```javascript
const element1 = <p>Hello {name}!</p>;
const element2 = <p>Hello {firstName + lastName}!</p>;
```

- And JSX it’s self JavaScript expression. That’s why JSX can be returned from a function. It can be received as a parameter and passed as an argument.
```javascript
function getGreeting() {
  return <p>Hello World!</p>;
}

console.log(getGreeting());
```

- As we know, HTML elements have attributes. Such react elements also have attributes.
```javascript
const index = 0;
const element = (
  <h1 className="heading" tabIndex={index}>
    <span className="text">Hello World!</span>
    <img src="" alt="" />
  </h1>
);
```
**Note:** When we have to write multi-line JSX elements, JSX elements must be wrapped with first brackets `()` .
In this example, `React.createElement();` in the backend creates an object representation. Such as :

```javascript
/*
element = {
  type: 'h1',
  props: {
    className: 'heading',
    tabIndex: 0,
    children: [
      {
        type: 'span',
        props: {
          className: 'text'
        },
      },
      {
        type: 'img',
        props: {
          src: '',
          alt: '',
        }
      }
    ],
  },
}
*/
```

### **Simply, JSX is a syntactic sugar for creating React elements.**
Just made $5000 in revenue with my MVP
Tags: webdev, saas, programming, javascript
Published: 2023-11-29 14:59:14

Well guys, I’m still early in development of my SaaS, but decided to have an LTD sale which ends soon and the results were phenomenal.

I started charging in august and just today crossed the $5000 revenue mark. Most of that came in today from the LTD sale.

Most people will say that LTD sale don’t make sense for SaaS companies, but I’m in a completely different situation. My deploys apps on client’s private AWS account, so I have virtually no associated cost. Currently paying $50 for AWS monthly.

I’d highly suggest you try an LTD campaign if you want to get some traction!

My campaign ends on November 30th, so you can still grab a CodeSmash account here https://codesmash.studio/lifetime-deal
Time Saving Tip #1 - Use Voice Dictation
Tags: career, development, tip
Published: 2023-11-29 14:50:27

A quick way to help you save time during your day, is to avoid typing altogether and use your voice instead. Speech to text software has gotten surprisingly good, and according to a [Stanford study](https://hci.stanford.edu/research/speech/), is 3x faster than typing (in English). Not only that, but it's also less error prone, so you can avoid many of those embarrassing misspellings, typos, and fat finger slips.

I personally use it for all kinds of stuff, like comments in my code, writing documentation, PR descriptions, commit messages, slack messages, emails, AI prompts, blog posts, pretty much anything that's more than a sentence or two (even then I might still use it #lazydev).

MacOS has this built-in, and you can set up a keyboard shortcut to turn voice dictation on, so it's ridiculously easy to use (I personally have it set to turn on when I press control twice). To turn voice dictation on on your Mac, you can follow these [instructions](https://support.apple.com/guide/mac-help/use-dictation-mh40584/mac).

According to their [docs](https://support.microsoft.com/en-us/windows/use-voice-typing-to-talk-instead-of-type-on-your-pc-fec94565-c4bd-329d-e59a-af033fa5689f), it looks like windows has this built-in as well, though I have not tested it myself, so cannot speak to its effectiveness and ease of use.

Hope this tip helps! Until next time, Happy Hacking!