teleren/devto huggingface dataset:
Increasing the Touchable Area for a View
Tags: mobile, reactnative, programming, javascript
Published: 2023-12-06 08:25:19

Recently, One of the QA in my team suggested me to increase the Pressable Area in a View. So, my first approach was to increase the button size BUT QA created another ticket stating design is not following brand design guideline and the button is somehow bigger than expected.

I started researching different ways to increase the clickable area for this and found about hitSlop.

`hitSlop` helps on enhancing the touchable region of a button, which is offered by React Native Touchables. This attribute enables us to expand the touchable area (the outer region) of the button without altering its size.

Explanation: The `hitslop` property in React Native touchables permits interaction with the component even beyond its designated frame, effectively broadening the touch-sensitive region.

Let's explore the application of this feature through an illustrative example.

Consider a button in a row which is designed to take width as much as possible but it's taking a very small width making it impossible for the user with large finger to click it. Our objective is to enlarge the interactive region of this button. Achieving this enhancement involves leveraging the `hitSlop` property, as demonstrated below.

```
<Pressable onPress={() => onRightIconPress && onRightIconPress()}
            style={styles.rightIcon}
            hitSlop={{ left: 25, right: 25, top: 15, bottom: 15 }}>
            <Text> Submit </Text>
          </Pressable>
```

The above code will increase the touchable area of the button to 200x50. The button will still take the width as much as it needs.

If there is need to increase the touchable area in X or Y direction only, then the following code can be used.

```
<TouchableOpacity 
  style={styles.button} 
  hitSlop={{ x: 25, y: 15 }}
>
  <Text> Submit </Text>
</TouchableOpacity>
```

The human finger is inherently less precise as a pointing device when compared to a mouse. Therefore, in the process of developing mobile applications, it is crucial to ensure that the touchable regions of our controls adhere to a minimum size, such as 44dp (as per Apple HIG) or 48dp (in line with Google Material Design guidelines). Failure to adhere to these specifications may result in users experiencing difficulties when attempting to tap on the controls.

**Note**: The `Hitslop` property is compatible with any of the touchable components offered by React Native. For example, you can implement it with TouchableOpacity,TouchableHighlight, and so on.
AD5752AREZ is a16 Bit Digital to Analog Converter
Tags: product, database, microcontrollers, beginners
Published: 2023-12-06 08:21:02

Digital to analog converter, also known as D/A converter, or DAC for short, which device converts data from digital to analog. a D/A converter consists of four parts, namely, a network of weighted resistors, an operational amplifier, a reference power supply, and an analog switch. The analog-to-digital converter is generally used in the digital-to-analog converter, analog-to-digital converter that is, A/D converter, or ADC, which is a device that transforms a continuous analog signal into a discrete digital signal.

The [AD5752AREZ](https://www.iseepart.com/AD5752AREZ-pd3500181) is a dual-channel, 12-/14-/16-bit, serial-input, voltage-output digital-to-analog converter. It operates from a single supply voltage of +4.5 V to +16.5 V or from a dual supply voltage of ±4.5 V to ±16.5 V. The AD5752AREZ has a nominal full-scale output range of +4.5 V to +16.5 V. The nominal full-scale output range is selectable by software from +5 V, +10 V, +10.8 V, ±5 V, ±10 V, or ±10.8 V. The outputs are available with integrated output amplifiers, reference buffers, and a reference buffer. Integrated output amplifiers, reference buffers, and proprietary power-up/power-down control circuitry are also available. The AD5752AREZ is a bit more than a 1 bit digital to analog converter.


The most common type of digital-to-analog converter is one that converts parallel binary digital quantities to DC voltages or DC currents. It is often used as an output channel in process control computer systems to interface with actuators for automated control of manufacturing processes. Digital-to-analog converter circuits are also used in analog-to-digital converter designs that utilize feedback techniques.[Learn more about electronic components.](http://www.iseepart.com/)
Docker container with fixed IP address
Tags: yugabytedb, docker, network, ip
Published: 2023-12-06 08:17:29

When starting a YugabyteDB cluster, you provide network and host names, but the nodes identify themselves by their IP addresses. In a Docker lab, if you stop and restart them, the assigned IP address may change.

It is recommended to create a Docker network with an IP range using the `--subnet` flag and start containers with a static IP address using the `--ip` flag.

Here's an example of how to start a 3-node cluster:

```sh
docker network create --subnet=172.16.1.0/16 yb_lab &&
docker run -d --network yb_lab --ip 172.16.1.1 --hostname yb1 \
 --name yb1 -p 15433:15433 yugabytedb/yugabyte \
 yugabyted start --background=false &&
docker exec yb1 bash -c '
 until postgres/bin/pg_isready -h $(hostname) ; do sleep 1 ; done | 
 uniq && yugabyted status
' &&
docker run -d --network yb_lab --ip 172.16.1.2 --hostname yb2 \
 --name yb2 yugabytedb/yugabyte \
 yugabyted start --background=false --join=yb1 &&
docker exec yb2 bash -c '
 until postgres/bin/pg_isready -h $(hostname) ; do sleep 1 ; done | 
 uniq && yugabyted status
' &&
docker run -d --network yb_lab --ip 172.16.1.3 --hostname yb3 \
 --name yb3 yugabytedb/yugabyte \
 yugabyted start --background=false --join=yb1 &&
docker exec yb3 bash -c '
 until postgres/bin/pg_isready -h $(hostname) ; do sleep 1 ; done | 
 uniq && yugabyted status
'
```

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

The example above has exported the port 15433 to show the console on http://localhost:15433
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/prqypkczunzfh40jfslw.png)

More nodes can be added with a similar `yugabyted start --join=` command.

If you want to delete this network along with all its containers, follow the steps below:
```sh

docker rm -f $(docker ps --filter "network=yb_lab" -qa)
docker network rm yb_lab

```

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8r84jl9lzxlkpl6fx045.png)
Shield Your Email from Harvesting and Spam with VeilMail.io
Published: 2023-12-06 08:14:57

**VeilMail.io** [Hide email adddress from spammers](https://veilmail.io) and spam.

Guard your email address against relentless harvesting and spam with our cutting-edge Email Address Protection Captcha – a service that puts you in control.

**Sample Link:** [VeilMail Email Protection](https://veilmail.io/e/FkKh7o)

### **Why Choose VeilMail?**

**1. Robust Protection:**
   Shield your email address from bots and email harvesters that plague websites. Our robust captcha ensures that only genuine human visitors can access your email.

**2. Spam Defense:**
   Bid farewell to unwanted spam emails cluttering your inbox. VeilMail acts as a barrier, preventing spam messages from reaching you.

**3. User-Friendly Captcha:**
   Say goodbye to convoluted puzzles. Our non-intrusive captcha is designed for a seamless user experience – simple for humans, challenging for bots.

### **How VeilMail Works:**

**1. Quick Setup (15 seconds):**
   Implementing VeilMail is a breeze. In just 15 seconds, you can fortify your email address against malicious entities.

**2. Human Verification:**
   Visitors complete a quick captcha to unveil your email address. Only genuine human interaction triggers the reveal, ensuring the security of your contact information.

### **Benefits of Choosing VeilMail:**

**1. Effective Email Harvesting Protection:**
   VeilMail efficiently safeguards your email address, preventing it from falling into the wrong hands through harvesting.

**2. Reduction in Spam:**
   Experience a significant drop in unwanted spam emails, reclaiming control over your inbox.

**3. Enhanced User Experience:**
   Our user-friendly captcha ensures a smooth and non-intrusive experience for your website visitors, fostering a positive interaction.

**4. Free Service:**
   VeilMail is committed to keeping your email protection accessible to all. Enjoy our services without any cost.

Don't let email harvesters and bots compromise your online experience. Join VeilMail today and fortify your email address against spam and unauthorized access. Experience peace of mind with our efficient, hassle-free protection.

**VeilMail.io** [Stop Email Harvesting](https://veilmail.io) and spam.
Something went wrong installing the "sharp" module and Cannot find module '../build/Release/sharp.node' in react native
Tags: javascript, reactnative, mobile, programming
Published: 2023-12-06 08:07:29

I tested the application developed using react native, all features were working fine. Went to sleep. Turned on the laptop the other day and started the application for testing.

All of sudden out of blue I encountered the identical issue stating 
**_`Something went wrong installing the "sharp" module and Cannot find module '../build/Release/sharp.node`_**'

I was amazed what happened and I had never ever heard about anything called `sharp` in react native mobile application development. 

I started the research and most of the issue were related to react or Next no-one faced it in  react native. SO I started my research and fount [this link](https://sharp.pixelplumbing.com/install#common-problems)  related to `sharp`

TADA, the execution of this single command line successfully resolved the problem at hand.

```
npm rebuild --verbose sharp
```

Please refer to [the installation documentation](https://sharp.pixelplumbing.com/install) for further guidance.

Sharp is an High performance Node.js image processing whose prebuilt binaries are automatically selected by package managers for the current OS platform and CPU architecture, where available.

The typical use case for this high speed Node-API module is to convert large images in common formats to smaller, web-friendly JPEG, PNG, WebP, GIF and AVIF images of varying dimensions.

It can be used with all JavaScript runtimes that provide support for Node-API v9, including Node.js >= 18.17.0, Deno and Bun.

Reference:
1. https://sharp.pixelplumbing.com/
Unique Law Dissertation Topics To Boost your Grades
Tags: lawdissertationtopics, dissertationhelp
Published: 2023-12-06 07:58:06


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dtmolox4met4ag8s7q8u.jpg)
Here are brief descriptions for potential law dissertation topics across various legal fields..To know More, Visit-
https://www.instantassignmenthelp.com/law-dissertation-topics
MY CAR-OWNERSHIP BUSINESS IDEA AND HOW I KILLED IT
Published: 2023-12-06 07:54:28

1. The idea: Car-Ownership 

This is a business to make two or more strangers come together to own a single property(car). 

2. How I came up with the idea

A few days ago, I listened to a radio program and a car seller was complaining of poor business these days. Due to inflation, cars are now expensive and few people can afford them.

I also saw a video on Tiktok where used cars were being sent to the UAE.

I noticed that people would like to own a car for themselves, but they might not have ENOUGH money to buy, to the extend that some UAE citizens, known to be oil rich, are buying used vehicles from other countries.

"what if two strangers put their money together so they can buy a vehicle, when one of these people would not be able to afford it on his own?"

If this concept is possible, then how they can PEACEFULLY own the car together is the problem my business has to solve.

3. Getting feedback 

I picked the phone and called a car dealer who had helped me sell my Toyota a few months ago and told him about my idea. He said it would not work, because two strangers would not trust each other.

I spoke with a lawyer I know who also said, there would likely be legal battles between those strangers later and my business might get entangled in endless legal issues.

I spoke with another car dealer who said that is not a good idea at all, and that if you don't have enough money to buy a car for yourself, he thinks its better to wait. Also between the two car owners, assuming they are living apart, who would spend the night with the vehicle?

I proceeded to speak with a policeman I met on the street and he said that it depends. It might be a good idea, but people behave differently when they partner with others and they see that the business is growing.

So assuming two strangers put money together and buy a single bus and use it for transporting passengers. If the bus starts to generate income, one of the owners might start to display his true colors that he did not show earlier, so not worth the partnership.

Finally, I went to buy food at a joint and spoke with the seller, a woman my mother's age. She said she would not patronize in such a business, because people are a problem. And that she would rather go for a loan to buy and own the vehicle herself rather than partner with even a family member.

She also added that naturally, everyone wants to OWN things for HIMSELF and gave me stories where people in the same household failed at partnerships.

4. HOW I KILLED THE IDEA
If you have been reading this post up till this point, you noticed that the idea started dying as soon as I started speaking with people.

The food seller's conversation dealt a final blow to the business idea.
In fact, the CAR-OWNERSHIP business idea was dead even before I finished eating the meal.  I bought another meal from her to take home for the night, and left the business idea on the table.
HOW TO UPLOAD AND MANAGE BLOBS IN AZURE
Tags: beginners, cloudcomputing, devops, azure
Published: 2023-12-06 07:42:26

* **Navigate to the created storage account**: Go to your Azure Dashboard and locate the newly created storage account. Click on the storage account, then navigate to the "Blob service" section.

* **Create containers**: Within the Blob service, create containers to organize your blobs. Containers are similar to folders.


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

* Click on the "+ Container" button and provide a unique name for your container.


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

* **Name**: Enter a name for your container. The name must be unique within the Azure storage account.
- The name can contain only lowercase letters, numbers, and hyphens.
- The name must begin with a letter or a number.
- The minimum length for the name is three characters.
- The maximum length for the name is 63 characters.

* **Anonymous access level**: The access level specifies whether the container and its blobs can be accessed publicly. By default, container data is private and visible only to the account owner. There are three access level choices:
- Private: (Default) Prohibit anonymous access to the container and blobs.
- Blob: Allow anonymous public read access for the blobs only.
- Container: Allow anonymous public read and list access to the entire container, including the blobs.



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


* Double click on the name of your container


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

* **Upload Blob**:

Click on the "Upload" button within the container.


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

- Choose the file or files you want to upload and follow the prompts to upload them to the container and click on create.


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


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

* And what you uploaded will be in the container you created


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gv9d5nwkoupijld9uyuk.png)
Ethereum Smart Contract Audits
Published: 2023-12-06 07:27:55

Ethereum Smart Contract Security Audit by Xamer involves meticulous code reviews, automated analysis, and manual testing to fortify decentralised applications. Their work ensures vulnerability identification, risk mitigation, and overall solidity in blockchain projects. The benefits encompass enhanced trust, minimised exploits, and a secure foundation for DApps, aligning with Xamer's pivotal role in advancing the integrity of blockchain technology.

https://bitly.ws/33ZIt
Project Six: Custom Avatars
Tags: webdev, beginners, challenge, codingquokka
Published: 2023-12-06 07:23:59

Even though you now have an amazing default avatar, supporting actual avatars is a must have for any service, isn't it?

For today's project I suggest we implement a field that would allow user select an image and preview how it would look like as an avatar.

## Custom Avatar Field: requirements and recipe

> As a user I want to be able to pick an image, so that I could use it as my avatar.

The user story is intentionally vague: depending on the design choices the field might very different from one another.

On Dev.to it looks like this:

![Avatar preview and file input field](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uwvd0j40iu0bcdmnmrwg.png)

On LinkedIn it's much more complex:

![Field with round avatar overlay and ability to adjust crop, zoom, filters etc](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sz4e7b2ts896toq0sppg.png)

You're free to choose the design and level of complexity, but some requirements should be met regardless.

### Requirements

1. Input should allow selection of only one image
2. Preview avatar should be the exact size and shape as it would be used on the service
3. Selected image should be scaled down to a required size before upload
4. It should be possible to remove image and go back to the default avatar

### Recipe

1. Start with the file input field: setup all required validations
2. Add a static preview avatar
3. Update preview whenever a new file is selected
4. Implement avatar removal logic
5. Add the logic to scale the avatar down (keep it square though)
6. Sprinkle with styles
7. Ensure that input is still accessible
8. Stare in awe at your creation!

### Hints

In order to display a selected file one could use `URL.createObjectURL(file)` and then use resulting url as usual. 

Similarly to video thumbnails, you can use canvas to draw the selected file to scale it down.

## Challenge: Storing avatars

Now that you have an input, it would make sense to implement the ability to upload those avatars somewhere so that others could see them.

Asset storage and delivery infrastructure would of course depend on the tech stack of each particular service, so let's implement only the upload part: you can store them locally in a key/value storage or simply in the file system.

We can't really use the actual name of selected file to store it though - because is multiple users are to upload `avatar.jpg` - they'll simply override one another. A simple solution would be to calculate *hash* for each image and use that as a unique identifier. Also some images you might not even need to upload if they are already present ;-)

Share your creations and feedback and see you tomorrow!

Liked the idea a lot and would love to have it all year long?

[![Buy Me A Coffee](https://cdn.buymeacoffee.com/buttons/v2/default-red.png)](https://www.buymeacoffee.com/valeriavg)
Certified Shopify Excellence: Your Trusted Experts for E-Commerce Success
Tags: shopify, development, expert, ecommerce
Published: 2023-12-06 07:15:36

Experience the pinnacle of e-commerce proficiency with our team of Certified Shopify Experts at VT Netzwelt. Our dedicated professionals have undergone rigorous training and certification to bring you unparalleled expertise in crafting exceptional online stores. From strategic customizations to seamless integrations and performance optimization, our certified experts ensure your Shopify store not only meets but exceeds industry standards. Elevate your online business with the confidence that comes from partnering with certified excellence. Choose VT Netzwelt for a Shopify experience that is backed by expertise, innovation, and a commitment to your success.
4 New Rounding Methods Likely In PHP 8.4
Tags: php
Published: 2023-12-06 07:15:32

In the ever-evolving world of PHP, the nuances of rounding numbers are set to receive a noteworthy upgrade in version 8.4. With the proposed addition of four new rounding methods to the round() function, the PHP community is poised to gain enhanced flexibility for fine-tuned statistical analysis. This development comes as a response to the absence of standardization in rounding methodologies, a critical consideration when precision matters in operations on numbers.

The RFC, championed by Jorg Sowa, introduces PHP_ROUND_CEILING, PHP_ROUND_FLOOR, PHP_ROUND_AWAY_FROM_ZERO, and PHP_ROUND_TOWARD_ZERO, complementing the existing set of rounding modes.

## The Proposal:
Spearheaded by Jorg Sowa, the proposal introduces four new rounding methods to the round() function in PHP 8.4.

- PHP_ROUND_CEILING rounds to the nearest integer larger than the given number
- PHP_ROUND_FLOOR rounds to the nearest integer smaller than the given number
- PHP_ROUND_AWAY_FROM_ZERO rounds away from zero PHP_ROUND_TOWARD_ZERO rounds toward zero.

Notably, the NumberFormatter already implements four of the proposed modes as ROUND_CEILING, ROUND_FLOOR, ROUND_DOWN, and ROUND_UP. The proposal also introduces two aliases from the Intl extension, namely ROUND_TOWARD_ZERO (equivalent to PHP_ROUND_TOWARD_ZERO) and ROUND_AWAY_FROM_ZERO (equivalent to PHP_ROUND_AWAY_FROM_ZERO), ensuring consistent naming for rounding modes.

## Backward Compatibility:
The proposed changes are deemed backward-compatible, assuaging concerns about any disruptive impacts on existing codebases. This means that developers can seamlessly adopt the new rounding methods without fear of breaking compatibility with their current applications.

## Expected PHP Version:
The eagerly anticipated rounding enhancements are set to be part of PHP 8.4, enhancing the language's capabilities and offering developers a broader array of tools for precision-oriented tasks.

## Questions Addressed:
The proposal addresses common questions, including why not use functions like ceil() and floor(). It clarifies that while ceil() and floor() round numbers to full integers, the round() function with zero precision achieves equivalent results. The reasoning behind naming choices, such as avoiding PHP_ROUND_UP and PHP_ROUND_DOWN, is also discussed, emphasizing clarity and distinction from existing constants.

## Conclusion
As PHP enthusiasts eagerly await the release of version 8.4, the addition of these four new rounding methods promises a more nuanced and versatile approach to numeric precision. Whether you lean towards rounding up, down, away from zero, or toward zero, PHP 8.4 aims to cater to the preferences of developers engaged in intricate statistical analyses. Stay tuned for a release that not only refines the language's capabilities but also addresses the demands of the most discerning rounding aficionados.
CTET Mock Test
Published: 2023-12-06 07:03:36

A CTET national-level test is conducted by the Central Board of Secondary Education (CBSE). CTET exam is held to check students’ eligibility for the post of teacher in Central Government Schools such as KVS, NVS, and others. To prepare well for the entrance exam, students can solve the CTET Mock Test 2023 as it involves various kinds of questions. 
https://www.mockers.in/exam/ctet-mock-test