teleren/devto huggingface dataset:
Complete Ansible Documentation
Tags: ansibledocs, ansible
Published: 2024-02-21 16:52:00

Ansible Documentation is great, but what if you’re looking for documentation on a specific version of Ansible? Or a plugin from a collection on Galaxy? We generated a [Complete Ansible Documentation](https://docs.steampunk.si/plugins/) that **includes all versions of all Ansible collections on Ansible Galaxy,** providing complete module documentation for any specific Ansible version you need. And **all of the examples have been checked** by [Steampunk Spotter](https://steampunk.si/spotter/), an Ansible playbook scanning tool, so you instantly see if there are any potential problems with using them in your playbooks or not.

We’re constantly improving this documentation, so we’d love to know what you think. Is it useful? Anything you'd change? Is something missing? Let us know how we can improve to make it even more useful to you.

Cheers!
Scheduled actions in Odoo
Published: 2024-02-21 16:50:55

To create a scheduled action in Odoo, navigate to Settings > Scheduled Actions. Here, you'll find a list of existing actions. Click on any action to view its details.

As depicted in the screenshot, each action corresponds to a specific model and method within that model. You can customize the execution time, frequency, and other settings for each action.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7poi87fmw007wfri5osl.PNG)
 
To create your own action, follow these steps:

1.  In your custom module, create a new file named `cron.xml` within the `data` folder.
    
2.  Add the following XML code to the `cron.xml` file:


    `<record id="custom_cron_job" model="ir.cron">
    <field name="name">Custom Cron Job</field>
    <field name="model_id" ref="custom_module.model_remote_warehouse"/>
    <field name="interval_number">1</field>
    <field name="interval_type">days</field>
    <field name="numbercall">-1</field>
    <field name="active" eval="True"/>
    <field name="code">model_remote_warehouse.update_remote_products_report()</field>
</record>
`

In this XML code:

-   `<field name="model_id" ref="custom_module.model_remote_warehouse"/>` specifies the full model name and method to be executed, such as `'custom_module'.name_of_the_method`. In our example, the method `update_remote_products_report()` is defined in the `remote_products.py` model file.

This setup ensures that the specified method will be executed each time the scheduled action runs, allowing you to perform custom tasks as needed.

## important 
dont forget to add the name of the action method as in the screenshot 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2nnprz4f641yjkvwuse6.PNG)
Smart contracts required for developers: Predictive Market Contract
Tags: blockchain, cybersecurity, web3
Published: 2024-02-21 16:46:46

Smart contracts have revolutionized the way we think about transactions and agreements in the digital age. One of the most exciting applications of smart contracts is in the realm of predictive market contracts. This innovative concept combines the power of blockchain technology with the thrill of speculation, allowing users to buy and sell shares in the outcome of future events.

More details https://medium.com/@auditf1rst/smart-contracts-required-for-developers-6-predictive-market-contract-f0ee460c9e46

The entire series of articles about other smart contracts  https://medium.com/@auditf1rst
THE BEST PROFESSIONAL CRYPTO RECOVERY COMPANY
Tags: best
Published: 2024-02-21 16:44:01

I’m pleased to bring to you the service of Firmwall Cyber Security Service, this notable crypto recovery company was able to help me recover my stolen crypto a few days ago after I fell victim to a crypto investment scam. Firmwall Cyber Security is a very professional and highly recommended crypto recovery service, I never thought it was possible to recover crypto assets until I encountered Firmwall. I highly recommend their services if you need to recover your crypto assets or stolen funds. You can reach them via the contact information below

(E-mail- Firmwallcyber@techie.com)
(URL-https://firmwallcyber.wixsite.com/firmwall)
(Whats App- +  1 937 542  0667)
Introduction to Back-end
Tags: javascript, typescript, node, api
Published: 2024-02-21 16:32:00

## What is a back-end?

In web application development, there is the front end. It refers to what users see and interact with. There are buttons, links, forms, images, lists, tables and others that the user interacts with for some reason.

For instance, when one wants to create a [DEV](http://dev.to/) account, one would fill out a form and provide some personal details that may include one’s email and password. Somewhere on that same form, there would be a button that may say, “sign up” or “submit”. The user clicks the button and a request is sent to the back-end. Assuming the process was a success, the user would be redirected to another page to continue the registration process or might even be taken to the main page to read some articles. There are situations where one would have to do some verification immediately after creating an account. There would be input fields and texts and buttons and links and icons and others.  

You can visit the Forem sign-up page here, [forem sign-up page](https://account.forem.com/users/sign_up), to see and experience the “front end”. 

So, one may ask, what is the back-end?

When the form is submitted, where is it saved? How is it even saved? How did the application even know that you provided the right credentials to log in or even create an account? How did you get the verification email? Where are the articles, comments, likes and whatnot, are stored? How is it done? Well, simply put, the whole why and how, is the back-end. The back-end is part of the web application that the user doesn’t see nor directly interact with. The back-end is responsible for validating and creating user accounts, it is responsible for logging in, it is responsible for saving, reading, updating and deleting articles, and comments.

We would say that the back-end contains the business logic of the web application. What is the app supposed to do? The back end is meant for that. So when you click on the follow button, the front end registers the button click and then sends a request to the back end. The back end receives the request. It validates and authenticates it. If there are no issues or whatnot, then the like value or count is incremented. The back-end after processing the request, then returns a response. Depending on the state (status) of the response, the front end updates the view to reflect the current changes.

Irrespective of what we have discussed so far, my thoughts on what a backend is may or might be limited to what I know or learnt from others.

Next, we will discuss, **What is an API?**
Quick tip on Azure Cosmos DB indexes
Tags: azure, cosmosdb, cloudcomputing, microsoft
Published: 2024-02-21 16:30:19

"Don't accept the defaults." - Abel Wang

Most people aren't aware, but by default, every property in your document stored in Cosmos DB is indexed. While this is fantastic for performance, optimizing query speed across your data, it can become costly if you're dealing with a large amount of data. 

This default behavior, though beneficial in many scenarios, may not suit every use case, especially when budget constraints are tight, or specific data doesn't require fast query access.

The good news is that Azure Cosmos DB offers the flexibility to customize this behavior. You have the option to disable indexing on certain properties or to create custom indexes that better fit your application's needs, potentially saving costs without compromising on performance where it matters most.

For those looking to dive deeper into how to fine-tune your Azure Cosmos DB setup, Microsoft Learn offers a comprehensive guide on customizing indexes for the SQL API. It covers everything from the basics of indexing to advanced techniques for optimizing your data access patterns.

Learn how to optimize your Azure Cosmos DB indexes: [Customize Indexes in Azure Cosmos DB for the SQL API.](https://learn.microsoft.com/en-us/training/modules/customize-indexes-azure-cosmos-db-sql-api/2-customize-indexing-policy)

Taking control of your database's indexing strategy can lead to significant performance improvements and cost savings. Don't settle for the defaults; tailor your Azure Cosmos DB to meet your specific needs.

#azure #cosmosDb #microsoft #cloud #CloudWithThiago #AzureTips
Quick tip on Azure Cosmos DB indexes
Tags: azure, cosmosdb, cloudcomputing, microsoft
Published: 2024-02-21 16:30:17

"Don't accept the defaults." - Abel Wang

Most people aren't aware, but by default, every property in your document stored in Cosmos DB is indexed. While this is fantastic for performance, optimizing query speed across your data, it can become costly if you're dealing with a large amount of data. 

This default behavior, though beneficial in many scenarios, may not suit every use case, especially when budget constraints are tight, or specific data doesn't require fast query access.

The good news is that Azure Cosmos DB offers the flexibility to customize this behavior. You have the option to disable indexing on certain properties or to create custom indexes that better fit your application's needs, potentially saving costs without compromising on performance where it matters most.

For those looking to dive deeper into how to fine-tune your Azure Cosmos DB setup, Microsoft Learn offers a comprehensive guide on customizing indexes for the SQL API. It covers everything from the basics of indexing to advanced techniques for optimizing your data access patterns.

Learn how to optimize your Azure Cosmos DB indexes: [Customize Indexes in Azure Cosmos DB for the SQL API.](https://learn.microsoft.com/en-us/training/modules/customize-indexes-azure-cosmos-db-sql-api/2-customize-indexing-policy)

Taking control of your database's indexing strategy can lead to significant performance improvements and cost savings. Don't settle for the defaults; tailor your Azure Cosmos DB to meet your specific needs.

#azure #cosmosDb #microsoft #cloud #CloudWithThiago #AzureTips
Next time you say "complex code", come back here...
Tags: discuss
Published: 2019-03-01 07:23:23

---
title: Next time you say "complex code", come back here...
published: true
description: Complex code is a common thing which everyone hit, but never understood
tags: #discuss
---

What is complex code?

It is just two words **complex code**, no rocket science involved. Or, Am I overthinking it?
It is easy to understand code complexity and programming complexity. There are studies and theory about computational complexity. 
But it is all different.

Why is it easy to picture complex code as bloated software like [these](https://codegolf.stackexchange.com/questions/4838/most-complex-hello-world-program-you-can-justify) hello world examples? One step more and it will transition to pure art - increase the complexity of a simple instruction to a maximum power level which completely vanishing original idea.

Here is another example of complex code, which is in fact, well made [satire](
https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition). 

It is not only about a piece of code, but you can take it all way up (or down) to language level like [brainfuck](https://en.wikipedia.org/wiki/Brainfuck) does.

What about real-world examples? Current project?  
Have you ever put a label on somebody's else works thinking that the code is very complex? Could it be that these feelings radiated over yourself, night after the last deadline? Like, something feels fishy about that iteration over a multidimensional list of lists. Or, maybe, during a source code review of a popular library everyone uses but finding it hell confusing...

Does it affect us? 

Have you ever blamed complex code for a missed estimate? Was there a feeling like "please not me" because you knew the code? What is your emotion when you hear "legacy application"? Do you smile and eager to start a new project? 


So why there is no clear definition of a thing which makes us feel uneasy? 
Is it because this thing is **complex**?

Let me know your thoughts and especially feelings.
Share your story, your perception, your view, your examples.
AWS Lambda + Athena + RDS
Published: 2024-02-21 16:26:19

I suppose that it is not a secret now that Serverless is quite popular nowadays. I still prefer to use a more old-school approach with the classic applications (in my case Rails apps) but it turned out quite convenient in some cases.

So what was the task: 
- write the Lambda that should read data from the Athema table and check and do some stuff.

When you create a lambda by default it has very limited permissions. If you want your lambda to make requests to Athena tables you need to add next permissions:
   ` - "athena:StartQueryExecution"
     - "athena:GetQueryExecution"
     - "athena:GetQueryResults"
     - "athena:GetDataCatalog"`
that allows a lambda call athens APIs, but probably you will need to add more: permissions for S3 and in some cases for Glue.
But if you have datacatalog that reflects any RDS tables you have to add special permission:
`  - "lambda:InvokeFunction"
`
because access to RDS tables happens via a special lambda connector. Unfortunately, the error message doesn't explicitly say about it, requests just fail if a lambda doesn't have this permission.
Closures! Closures! Closures!
Published: 2024-02-21 16:24:24

From what I've seen in these coding challenges, you can never have enough practice with closures. So let's dive into an example of how to tackle them.

##But First, What's a Closure Again?

Imagine a big robot in a kitchen, whipping up an omelet. It assigns each task—chopping onions, cracking eggs, adding spices—to a fleet of tiny robots. These mini-robots venture off to their stations, but no matter where they are in the kitchen, they never forget their main goal, thanks to a recipe card (closure) that remembers everything the big robot told them.

In programming terms, a closure is just like that recipe card—a function that remembers the variables from where it was created, no matter where you use it later.

### The Counter Challenge

We're given a task: start with an integer n, and create a counter function that initially returns this integer. Then, each time you call it, it should return n + 1.

#### What to Do First?
List out what we know:

- Parameter: an integer n
- Return: a function called counter

 If I'm returning a function, I know that I'm dealing with some sort of closure, so let's set that up.

```
// Create a main function 
function createCounter(n) {
   // Return the counter function
   return function counter() {
      console.log(n);
   };
}
```
Now, let's test our setup:

```
const myCounter = createCounter(10); // We've got our recipe card!
myCounter(); // Prints out 10
```

Something is not quite right though. We're not incrementing the integer n at all. Luckily, we can use an operator to easily increment.

### Understanding n++

Using n++ is like telling one of our mini-robots to add a pinch of salt and then prepare to add another pinch the next time around. It increments n but gives us the value before the increment.

Let's tweak our function:

```
function createCounter(n) {
    // Return the counter function
    return function counter() {
        return n++;
    };
}

const myCounter = createCounter(10);
console.log(myCounter()); // 10
console.log(myCounter()); // 11
console.log(myCounter()); // 12

```

### Making It Stick

- Try It Out: Play around with this code in the developer tools or on a site like CodePen? 
Hmmm. What happens if you use ++n instead of n++?

Challenge Yourself: Can you modify the createCounter function to start counting down instead of up?

### Wrapping Up

Closures might seem confusing at first, I also had a really hard time grasping the concept, but with a bit of practice, they become a really useful tool in JavaScript. They're like having a secret recipe that only your function knows about, allowing you to write more predictable and bug-free code.


Keep coding!
Self-Paced Data Science Courses: Flexibility at Your Fingertips
Published: 2024-02-21 16:16:43


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r5ygybwa256p18y7z1xu.jpg)
Imagine having the freedom to learn at your own pace, on your own schedule, and from the comfort of your favorite cozy corner. That’s the beauty of self-paced data science courses. With a plethora of online platforms and resources available, including the [best data science courses](https://www.learningsaint.com/professional-in-data-science), you can tailor your learning experience to suit your individual preferences and needs.

One of the biggest advantages of self-paced courses is flexibility. Whether you’re a night owl burning the midnight oil or an early bird seizing the dawn, you can chart your learning journey according to your unique rhythm. Plus, with on-demand access to lectures, tutorials, and assignments, you can rewind, pause, and replay as many times as needed to grasp complex concepts or revisit challenging topics.

When it comes to the best data science course options, self-paced platforms like Coursera, edX, and Udacity are among the top contenders. These platforms offer a diverse array of courses, ranging from introductory data science fundamentals to specialized topics like machine learning, deep learning, and natural language processing. With expert instructors, interactive quizzes, and real-world projects, you’ll gain hands-on experience and practical skills essential for success in the field.

But, as with any endeavor, self-paced learning also has its drawbacks. Without the structure and accountability provided by live classes and deadlines, it can be easy to procrastinate or lose motivation, especially when faced with challenging material. Additionally, some learners may find it challenging to stay focused and disciplined amidst the distractions of daily life.
Bulletin Board User Auth
Published: 2024-02-21 15:44:17

##**setting up the rails generate devise:install**

```
rails generate devise:install
``` 

- paste into terminal after running `rake sample_data`, and `bin/dev`. this will generate the following
```
Depending on your application's configuration some manual setup may be required:

  1. Ensure you have defined default url options in your environments files. Here
     is an example of default_url_options appropriate for a development environment
     in config/environments/development.rb:

       config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }

     In production, :host should be set to the actual host of your application.

     * Required for all applications. *

  2. Ensure you have defined root_url to *something* in your config/routes.rb.
     For example:

       root to: "home#index"
     
     * Not required for API-only Applications *

  3. Ensure you have flash messages in app/views/layouts/application.html.erb.
     For example:

       <p class="notice"><%= notice %></p>
       <p class="alert"><%= alert %></p>

     * Not required for API-only Applications *

  4. You can copy Devise views (for customization) to your app by running:

       rails g devise:views
       
     * Not required *
```

- We complete sets 1 through 3 for this project, but you are also allowed to complete step 4, we did not go into that. 

##**why are we doing this**

- Before, we were creating our databases with our models and columns in psql, which is good for initially setting up our db, but say we want to add things further down the line with other columns we need to add. Here, we are using db migrate and creating migration files to be able to add more to our db.
 

- So initially, we need to create the migration file, which we can do by running `rails generate migration AddUserIdToBoards user_id:integer` for example. This will create the migration file for us to use, which we can then run `rake db:migrate` to then allow our database to officially implement those changes. 

- if we were to accidentally run `rake db:migrate`, we would run into the issue of having the database already initialized, and would have to start over again, which is what i was stating previously in the section above.
Are programming language only in English?
Published: 2024-02-21 15:40:40

No, programming languages aren't limited to English. Although there are programming languages made to support other languages, English is still the most widely used language in programming due to historical factors and widespread adoption. Say for instance:



1. In Chinese: Programming languages with Chinese character and syntax support include "Charm" and "Chineasy."


  
2. Documentation: Russian is supported by a number of programming languages, including Sapphire and PascalABC.NET.  


  
3. Japanese: Two programming languages with support for Japanese are "Ruby" and "GyaO".

  
4. Korean: Programming languages "Koremutake" and "ZetScript" support the Korean language.


To make programming easier for people who speak those languages, these languages usually provide documentation, keywords, and syntax in those languages. It is noteworthy because the majority of programming languages, libraries, frameworks, and documentation are available in English, making it the de facto lingua franca in the field of programming.
Github Old Account remove from Pc and Login New Account
Tags: github, git, gitlab, raihanuldev
Published: 2024-02-21 15:40:07

To remove your old GitHub account from your PC and add a new account, you'll need to follow these steps:

1. **Removing Old Account Credentials**:
   - Open Git Bash or any terminal you're using.
   - Enter the following command to remove the old account credentials:
     ```
     git config --global --unset credential.helper
     ```

2. **Removing SSH Keys (Optional)**:
   - If you've added SSH keys for your old account and want to remove them, you can delete them from your `~/.ssh` directory. Look for files starting with `id_rsa` or `id_dsa` and delete the ones associated with your old account.

3. **Adding New Account**:
   - Open Git Bash or any terminal you're using.
   - Set your new username and email globally by entering the following commands:
     ```
     git config --global user.name "raihanuldev"
     git config --global user.email "rihanthedev@gmail.com"
     ```

4. **Confirming Changes**:
   - To confirm that the old account has been removed and the new account has been added, you can run:
     ```
     git config --global --list
     ```

5. **Testing New Account**:
   - Try cloning a repository or performing any action that requires authentication. Git will prompt you to enter your credentials for the new account.

Following these steps should effectively remove your old GitHub account credentials from your PC and add the new account credentials.
Next Generation Firewall
Published: 2024-02-21 15:36:49

Network security is paramount. Traditional firewalls are being outpaced by evolving cyber threats. Enter the #NextGenerationFirewall (NGFW), a cutting-edge #NetworkAppliance engineered to tackle modern challenges. Learn how NGFWs provide advanced protection and granular control to safeguard against cyber threats. #Cybersecurity #Innovation #NGFW #NetworkSecurity

https://www.relianoid.com/resources/knowledge-base/misc/what-is-ngfw/

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