teleren/devto huggingface dataset:
Functions in C programming.
Tags: array, tutorial, beginners, programming
Published: 2023-12-19 11:38:39


In C programming, functions are the building blocks of larger programs. They allow you to group code for reusability, break down complex tasks and pass data around.

Syntax:
```
returnType functionName(){
...
...
}
```

If a function doesn't return any value use void.
Example:
```
#include <stdio.h>

void greet(){
    printf("Good Morning\n");
}
 
int main() {
    
    greet();
    greet();
    greet();
    
    return 0;
}
```

**Function with parameters**
In C programming, function parameters are used to pass values or references to a function when it is called. Function parameters allow you to make your functions more flexible and reusable by accepting different inputs.
Syntax:
```
return_type function_name(parameter_type parameter_name1, parameter_type parameter_name2, ...);
```
Example:
```
#include <stdio.h>

void addNumbers(double number1, double number2){
    double sum = number1 + number2;
    printf("Sum of %.2lf and %.2lf is %.2lf", number1, number2, sum);
}
 
int main() {
    addNumbers(8.9, 9.6);
    return 0;
}
```

**return type**
- If function doesn't return any value use void.
- Datatype of the return value and the datatype of the variable where the return value is stored should be the same.
- Anything after the return statement in the function will not be executed.
```
#include <stdio.h>

double addNumbers(double number1, double number2){
    double sum = number1 + number2;
    return sum;
}
 
int main() {
    double result = addNumbers(8.9, 9.6);
    printf("Result = %.2lf", result);
    return 0;
}
```

## Function prototype
Function prototype is a declaration of a function. it provides information about the function name, parameters and return types, but it doesn't include the body.
Example:
```
#include <stdio.h>

//below function prototype.
double addNumbers(double number1, double number2);
 
int main() {
    double result = addNumbers(8.9, 9.6);
    printf("Result = %.2lf", result);
    return 0;
}


double addNumbers(double number1, double number2){
    double sum = number1 + number2;
    return sum;
    printf("After return statement");
}
```
In our program we are calling the function before defining the function(that means, creating function after the main function of c.). In this type of situation the function prototype provide information about the function to the compiler.
If we are defining the function before the function call a function prototype is not needed.
Entertainment on the Go: Exploring Mobile TV Options
Tags: xmltv, epg, iptv
Published: 2023-12-19 11:38:21

Discover the Ultimate XMLTV Guide for IPTV and Stay Updated with Mobile Technology in the Entertainment World!

Are you tired of endlessly searching for your favorite movies, TV programs, and local TV channels on your SmartTV? Look no further! With the help of [xmltv source](https://xmltv.host), you can unlock a world of endless entertainment possibilities right at your fingertips.

**_Explore the Best in XMLTV Guide for IPTV_**

Whether you're a movie buff, a TV series addict, or simply enjoy catching up on local news and events, the XMLTV guide has got you covered. With its comprehensive and user-friendly interface, you can easily navigate through a wide range of channels and content to find exactly what you're looking for. Say goodbye to endless scrolling and hello to effortless entertainment discovery!

**_Stay in the Loop with Mobile Technology Updates_**

In the fast-paced world of entertainment, staying up-to-date with the latest mobile technology trends is essential. Imagine having the power to stream your favorite movies and TV shows seamlessly on your mobile device, anytime, anywhere. With the help of reliable blogs and websites, you can access useful references and official resources that will keep you informed about all the advancements in mobile TV and gadgets for movie streaming.

**_Why rely on random sources when you can access trusted and reliable information?_**

When it comes to your entertainment needs, it's crucial to rely on authentic and trustworthy sources. With XMLTV subscription, you can gain access to a curated selection of blogs and websites that provide accurate and up-to-date information about the world of mobile TV and gadgets. Say goodbye to unreliable movie streaming sites and embrace a world of high-quality content.

**_Discover the Future of Entertainment Today!_**

Experience the convenience and excitement of XMLTV guide for IPTV and immerse yourself in the latest updates from the mobile technology world. Don't miss out on the ultimate entertainment experience - start exploring XMLTV subscription today!


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6y5rhenn6qq00wywgqec.png)
Tips for Writing Clean and Maintainable Code
Tags: programming, cleancode, codenewbie, beginners
Published: 2023-12-19 11:37:21

Hello, as a senior software developer, I often see junior devs not doing these obvious steps to write clean and maintainable code. this list is non-exhaustive.

1. **Use Meaningful Names**: Choose variable, method, and class names that clearly describe their purpose. Avoid ambiguous or generic names.
2. **Follow a Consistent Coding Style**: Adhere to a coding standard like PEP8 for Python or the Google Style Guides. This includes indentation, brackets, and naming conventions.
3. **Write Small, Reusable Functions**: Keep functions short and focused on a single task. This makes them easier to understand and reuse.
4. **Comment and Document Wisely**: Write meaningful comments that explain the 'why' behind complex logic, not the 'how'. Keep documentation up to date.
5. **Refactor Regularly**: Regularly revisit and refactor code to improve efficiency, readability, and maintainability.
6. **Avoid Deep Nesting**: Limit nesting of loops and conditionals. Deep nesting can make code hard to read and follow.
7. **Implement Error Handling**: Graceful error handling and clear error messages can make your code more robust and user-friendly.
8. **Prioritize Code Reviews**: Peer reviews can catch errors, ensure adherence to standards, and facilitate knowledge sharing.
9. **Keep Learning and Updating**: Stay updated with the latest best practices and continuously improve your coding skills.
Python Applications
Tags: python, training, course
Published: 2023-12-19 11:36:55

Python is a high-level, interpreted, and general-purpose programming language known for its readability and ease of use. Created by Guido van Rossum and first released in 1991, Python has become one of the most popular programming languages for a wide range of applications, including web development, data analysis, artificial intelligence, machine learning, automation, and more.
Here are some key aspects of Python Loops for Beginners:
1.	Readability: Python emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than languages like C++ or Java. This is achieved through the use of indentation (whitespace) instead of braces to define code blocks. This focus on readability makes Python code more maintainable and understandable.
2.	Interpreted Language: Python is an interpreted language, meaning that the source code is executed line by line by an interpreter. This differs from compiled languages where the code is translated into machine code before execution. Python's interpreter allows for dynamic typing and is platform-independent.
3.	Dynamic Typing: Python is dynamically typed, which means that the data type of a variable is interpreted at runtime. This makes it flexible but also requires careful attention to variable types during development to avoid runtime errors.
4.	Object-Oriented: Python supports object-oriented programming (OOP) principles. Everything in Python is an object, and the language supports classes and objects, encapsulation, inheritance, and polymorphism.
5.	Standard Library: Python comes with a comprehensive standard library that includes modules and packages to perform various tasks, from working with files and networks to handling regular expressions and more. This reduces the need for developers to write code from scratch for common functionalities.
6.	Community and Ecosystem: Python has a large and active community of developers. The Python Package Index (PyPI) hosts a vast collection of third-party libraries and frameworks that extend Python's capabilities. Popular libraries include NumPy for numerical computing, Pandas for data manipulation, Flask and Django for web development, TensorFlow and PyTorch for machine learning, and many more.
7.	Versatility: Python is a versatile language used in various domains. It is commonly used for web development (Django, Flask), data analysis and visualization (Pandas, Matplotlib), machine learning and artificial intelligence (TensorFlow, PyTorch), automation and scripting, and more.
Here's a simple "Hello, World!" example in Python:

print("Hello, World!") 

This single line of code demonstrates the simplicity and readability that Python is known for.
MOD-CSS 3.x (new version)
Tags: webdev, javascript, css
Published: 2023-12-19 11:29:09

With great excitement that I announce **version 3** of [MOD-CSS](https://mod-css.com/).
The new features :
### Your own attributes

Now, you can choose the attribute names to work with MOD-CSS.

```javascript
<script>
   ModCSS.attributes({
     grid: 'mod',
     props: 'xyz',
     var: 'let',
   })
</script>
```
___

### Enhanced flexgrid

Use our flexgrid properties in any MOD-CSS attributes. 
Just add dollar sign '$' in this case.

```html
<div :mod="row[100%]">
    <div :box="col$[5.4rem]">5.4rem</div>
    <div :mod="col[25%]">25%</div>
    ...
</div> 

<div :var=".col{ col$[auto] h[10px] }"></div>
```
___
### Enhanced support of pseudo-Elements

We have improved support for pseudo-elements _(before, after, mark...)_. You can use them as you do with pseudo-classes.
Just use double colon '::' when you set them.

```html
<!--Set a selector-->
<div :var=".q::before { con['_'] co[blue] }"></div>
<div :var=".q::after { con['E6'] co[blue] }"></div>

<p>Some quotes, he said, <span class="q">are better than none.</span>
</p>

<!--Or set props on HTML element-->
<p>Some quotes, he said, 
  <span :box="before:: con['_'] co[blue] && after:: con['E6'] 
  co[blue]">are better than none.</span>
</p>
```
___
### Rewriting the script

We have upgraded the code to a more recent JavaScript version. 
The rendering engine is more lighter than before but also faster, _(only 9 kilobytes)_.

[Github repository](https://github.com/modsLabs/MOD-CSS-3.x/)

___

## Complete exemple
Define your attribute(s) _(one or all)_

```javascript
<script>
   ModCSS.attributes({
     grid: 'mod',
     props: 'xyz',
     var: 'let',
   })
</script>
```

Call them in your markup
```html
<body>
  ...
   <div mod="container[75%]">
      <div xyz=" m.rg[1.2rem]"></div>
     <div let=".mr-3{ m.rg[1.2rem] }"></div>
  </div>
</body>
```
___


So, try-it and fun !
In class members which are functions, this is not defined unless you ask for it
Tags: programming, javascript
Published: 2023-12-19 11:20:41

---
title: In class members which are functions, this is not defined unless you ask for it
published: true
date: 2023-12-19 11:19:11 UTC
tags: programming,javascript
canonical_url: https://siderite.dev/blog/in-class-members-which-functions-not-defined-unles/
---

Original post at: https://siderite.dev/blog/in-class-members-which-functions-not-defined-unles/

You are writing some Javascript code in the browser and you create classes, then you create some methods, which you see have some issue with the "this" keyword by default if you use the standard method declaration so you end up doing something like this:

```
// instead of myMethod() { ... }
myMethod=()=>{
  const myClass=this;
}
```

And this (pardon the pun) works here. Imagine my surprise when I did something that seemed identical:

```
// instead of myMethod() { ... }
myMethod=()=>{
  debugger;
}
```

And then I tried to see what "this" was in the Chrome Developer Tools. It was "undefined". Why?!

Long story short, I then tried this (heh!) and it worked:

```
// instead of myMethod() { ... }
myMethod=()=>{
  const myClass=this;
  debugger;
}
```

The moral of the story is that "this" is not declared unless used in code. Probably a browser optimization. Hope it saves you the ten minutes it took me to understand what was going on, after I've started doubting my entire JavaScript expertise and the entire design of my app.
How Long Does a Vinyl Wrap Last on Your Vehicle?
Published: 2023-12-19 11:14:41

The lifespan of a vinyl wrap depends on various factors such as the quality of the material, installation, environmental conditions, and how well the wrap is maintained. Generally, a professionally installed high-quality [car vinyl wrap](https://brantfordsignsandgraphics.com/vinyl-wraps/) can last 5 to 10 years or even longer than any other vehicle.


![Car Vinyl Wrap](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/13xqw93d9pva1gcqlnky.jpg)

So, let's discuss! Here are several factors that can affect the longevity of a vinyl wrap:

1. **Quality of the Vinyl Material**: Higher-quality vinyl wraps with UV protection and advanced adhesive technology tend to last longer.

2. **Installation**: Professional installation is crucial for the longevity of the vinyl wrap. Proper installation helps ensure that the wrap adheres well to the surface and minimizes the risk of peeling or bubbling.

3. **Environmental Conditions**: Exposure to harsh weather conditions, such as intense sunlight, extreme temperatures, and inclement weather, can affect the lifespan of a vinyl wrap. UV rays from the sun can cause fading and deterioration over time.

4. **Maintenance**: Regular and proper maintenance can extend the life of a vinyl wrap. This includes routine cleaning using mild soapy water and avoiding harsh chemicals that can damage the material.

5. **Usage**: The way the vehicle or object is used can impact the lifespan of the vinyl wrap. For instance, a car that is frequently exposed to off-road conditions, gravel, or other abrasive elements may experience more wear and tear.

If you are considering getting a vinyl wrap for your vehicle or any other surface, it is advisable to choose a well-established and reputable company like [Brantford Signs & Graphics](https://brantfordsignsandgraphics.com), which has a history of positive reviews and successful installations. Additionally, following the manufacturer's and installer's recommendations for care and maintenance will contribute to the longevity of the vinyl wrap.

Ultimately, the lifespan of a vinyl wrap can vary, and it's influenced by a combination of factors. Regular inspection and maintenance can help maximize the life of the wrap.
How to solve captcha automatically ?
Published: 2023-12-19 11:11:37



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

**Introduction:**

Captcha challenges have become an integral part of online interactions, serving as a defense mechanism against automated bots. As the demand for efficient solutions grows, automating captcha-solving processes has become increasingly popular. This article explores various methods and tools available to automate captcha-solving, providing users with a streamlined and time-saving approach.

**Methods of Captcha Automation:**
**API-Based Solutions:**

Some services provide API access for captcha solving. Users can integrate these APIs into their applications or scripts, enabling them to send captcha challenges for automated resolution. This method is suitable for developers and businesses with specific automation needs.

**Machine Learning Models:**

Developing custom machine learning models is another approach. By training a model on a diverse set of captcha challenges, users can create their own automated system. However, this method requires expertise in machine learning and access to a significant dataset.

**Third-Party Captcha Solvers:**

Numerous third-party services specialize in captcha solving. Users can subscribe to these services and integrate their APIs into their applications. These services often employ a combination of OCR (Optical Character Recognition) technology and human workers to solve captchas.

**Captcha Solver Extensions:**

Browser extensions like CaptchaAI offer automated solutions. Users can integrate these extensions into their browsers, allowing them to detect and solve captchas seamlessly. The extensions often use artificial intelligence and machine learning algorithms for accurate and swift recognition.

**Conclusion:**

Automating captcha solving can significantly enhance user experiences by saving time and effort. Whether through browser extensions, APIs, or machine learning models, users have various options to choose from based on their technical expertise and specific requirements. However, it's essential to approach captcha automation responsibly, respecting the guidelines and policies of the platforms being accessed.

**Solving Captcha can be difficult to solve. You can either do it manually, which is time and effort consuming and very cumbersome, or use an automated solution, which is cheapest way and does not consume a lot of resources. When choosing a site, consider your resources and the balance you want between speed and accuracy. Adding an automatic captcha solver can make the process more efficient So, CaptchaAI excels in solving captchas, offering an efficient solution that takes only 1-3 seconds, and sometimes just one second, for typical captchas. The cost is 0.001 per 1,000 captchas, ensuring a high accuracy of 99.9%. This makes it the [cheapest captcha solver](https://captchaai.com/)**
A santa themed CODE100 puzzle - Hitting the chimney
Tags: code100, codechallenge
Published: 2023-12-19 11:09:31

---
title: A santa themed CODE100 puzzle - Hitting the chimney
published: true
description: 
tags: CODE100, codechallenge
canonical_url: https://christianheilmann.com/2023/12/19/a-santa-themed-code100-puzzle-hitting-the-chimney/
# cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/atv9ytgmzbuevf9jxdci.png
# Use a ratio of 100:42 for best results.
# published_at: 2023-12-18 10:47 +0000
---

![Illustration of Santa facepalming because he failed to hit the chimney with his presents](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/atv9ytgmzbuevf9jxdci.png)

I just finished another puzzle for the [CODE100 competition](https://code100.dev) and thought I make it Santa themed. Imagine Santa cocking things up by dropping his presents everywhere but inside the chimney. Can you find out which ones hit, which ones landed on the chimney and which ones dropped outside of it?

![Illustration showing points in the circle as grey, points outside the circle as black and points on the circle as green](https://devrel.wearedevelopers.com/code100-puzzles/012-hitting-the-chimney/targets.png)

You get points in a coordinate system that are the drop points of presents and you should sort them into different arrays: those that landed in the chimney, those that landed outside and those that landed on the chimney.

You get the [a JSON dataset](https://devrel.wearedevelopers.com/code100-puzzles/012-hitting-the-chimney/coordinatesystem.json) of a coordinate system with a certain height and with and a circle in its centre with a radius of 75 pixels that is 10 pixels wide. 

The `droppoints` array contains the coordinates of the dropped presents, and your task is to sort them into different arrays. Copy all points that are inside the circle into the `innerPoints` array, all the ones outside the circle into the `outerPoints` array and all that landed on the chimney into the `onChimneyPoints` array. Store the size of each of the arrays in `inside`, `outside` and `chimnney` and return all of them as a JSON object.

For example, the original dataset is: 

```JSON
{
    "width": 300,
    "height": 300,
    "chimneyWidth": 10,
    "chimneyRadius": 75,
    "inside": 0,
    "outside": 0,
    "chimney": 0,
    "innerPoints": [],
    "outerPoints": [],
    "onChimneyPoints": [],
    "droppoints": [[127,37],[202,112],[113,84], … ] 
}
```

Your result should be something like: 

```JSON
{
    "inside": 30,
    "outside": 120,
    "chimney": 4,
    "innerPoints": [[157, 170],[169,170],[131,166], … ],
    "outerPoints": [[90,279], [16,247], [242,140],[72,209], … ],
    "onChimneyPoints": [[208,102] [208,102] … ],
}
```

I'm sad to report that with this dataset, `20` presents landed on the chimney. 

Good luck! You can [submit your solution in this Gist on GitHub](https://gist.github.com/codepo8/4e5f3efe95f9dc443fba7314e1f680c6) or here. 

If you use JavaScript to solve the puzzle, here's [a CodePen that can get you started](https://codepen.io/codepo8/pen/Rwdbwbg).
urp with vr
Published: 2023-12-19 11:09:05

In the default Unity pipeline - it's easy to create a scene with a VR camera rig and then create an additional camera as a 3rd person cam that will display on a computer monitor when the .exe is running. This allows one user to see the stereo vr camera rig when wearing the headset while others outside of VR can see the scene from a 3rd person view. To do this I'd just set my additional 3rd person camera to Target eye > None (Main Display)

With urp - the camera no longer has a "Target Eye" property. Thus I can't create a 3rd person camera. I tried changing the depth of the camera, but then it overrides the VR camera viewer. Any idea how I can achieve this with urp?