teleren/devto huggingface dataset:
SPO600 Lab 4 - Part 2: x86_64
Published: 2022-11-03 05:02:10

- Connecting to israel server.
```
ssh username@portugal.cdot.systems // replace username with your username.
```
- Copy and unpack tarball, which for a windows user like me can be a new experience. 

```
cp /public/filename ~
tar -xvzf filename
```
- Modify the loop to run until 30 iterations (which took hours for me)

We need more steps to make the division work which makes the code longer and harder to make it work.

My x86_64 code:
```
.text
.globl  _start

min = 0                         
max = 30                       

_start:

        mov     $min,%r15           
        mov     $10, %r14
    mov     $10, %r13
        mov     %r15,%r13       
        mov     %r15,%r14      

        mov     $10,%r8
        movq    $len,%rdx                      


loop:

        mov     $0, %r11
            mov     %r9, %r12

            div     %r8    

        add     $'0',%12

        movb    %r14b,msg+6     


inner: 

        add     $'0', %11
        movb    %r13b,msg+7 



             movq    $msg,%rsi                      
            movq    $1,%rdi                        
        movq    $1,%rax                        
        syscall


        inc     %r15                
        cmp     $max,%r15           
        jne     loop                



        movq    $0,%rdi                        
        movq    $60,%rax                       
        syscall

.section .data

msg:    .ascii      "Loop: ##\n"
        len = . - msg
```

The code did not work for me on the portugal server.
Application Load Balancer Pricing - FinOps
Tags: aws, finops, costoptimization, costmanagement
Published: 2022-11-02 23:23:34

{% youtube sKGF00NhWcY %}

I would like to thank the people who gave me some feeback on my first article.

On this one, I made an animation about the pricing of an Application Load Balancer on AWS and my FinOps recommendations for it.

## If you still have some Classic Load Balancer in place, you pay for DataProcessing and not LCU. Migrate CLB to ALB to save cost.

The CLB (Classic Load Balancer) was released in 2009, ALB (Application Load Balancer) was released in 2016. If you started on AWS before 2016, you had no choice but taking CLB.

Check your workloads and do the migration.

## If you don’t use API Gateway features, challenge the migration to an ALB to reduce cost.

This recommendation applies to a Serverless use case. When you start using Lambda for building an API, the default choice is API Gateway.

Since 2018, it has been possible to use an ALB to invoke lambda functions and serve HTTP(S) requests, which can be cheaper.

## When enabling access log, do not forget to define s3 retention policy.

When using an ALB, think about defining your observability strategy :

-     How do I check my logs ?
-     Which dashboard will I use ?
-     I store it on s3 but which period do I need to archive ?
C++ intro for starter 1
Tags: beginners, tutorial, cpp, programming
Published: 2022-11-03 04:54:48


#Assalomu alaykum!

##Bugun biz `C++` da birinchi darsni o'rganamiz.

Hozirda bizda [replit.com](https://replit.com/) shu sayt orqali online kod yozish muhitini yaratamiz va bizda bu saytda ikkida oyna ko'rinadi.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/saicua7f3mnyscxf5mjm.jpg)  va bu oynalar birida kod yozamiz ,ikkinchisida esa console ya'ni kod natijasini ko'rishimiz mumkin va buning uchun yuqoridagi **RUN** tugmasini bosishimiz yetarli!

Birinchi biz `iostream` kutubxonasini chaqiramiz,bu biz uchun `cout` opertorini ishlatish uchun kerakdir va bu haqida keyinroq tanishamiz va buning uchun biz 


```cpp
#include<iostream>
```
 belgisini yozamiz!
So'ngra biz `std` operatorini  ko'p marta ishlatmaslik uchun `using namespace std;`so'zlarini `#include<iostream>` keyingi qatorga yozishimiz mumkin.
Chunki bizda [replit.com](https://replit.com/) ni ochganimizda 

```cpp
#include <iostream>

int main() {
  std::cout << "Hello World!\n";
}
``` shunaqa bo'ladi va biz ko'p marta `std` operatorini ishlatishimizga to'gri keladi shuning uchun biz faqat bir marta  `using namespace std;`chaqirib qo'yishimizni o'zi yetarli!

Keyingi ishda biz asosiy funksiya ishlatamiz va bu bizning o'z nomi bilan asosiy hisoblanadi va bu funksiyasiz biz hech narsa qila olmaymiz va sizda har doim `main` funksiya bolishi kerak va bu yerda `int` bu integer-butun son degani va int main() funksiyasida `{}` bu sistemali qavs bizda funksiya ichida asosiy qilinadigan ishlarimizni va kodlarimizni yozishimiz mumkin.
Buning uchun;

```cpp
#include <iostream>
using namespace std;

int main() 
{
  Bu yerda siz kodlaringizni yozishingiz mumkin.

}
```Demak,biz funkisiya yaratdik va biz ishimizda davom etamiz,endi biz `cout` ya'ni bu `output` bu consolega biz kiritgan fikrni chiqarish uchun ishlatamiz va `cout<<` bu `<<` bizda shu `tengteng` belgisidir va bu keyingi fikr kiritish mumkin degan fikr bo'ladi.

> Biz `<<` begisini `tengteng` deyishimiz mumkin. 
By my teacher @DAWROUN

Bizda yana bir funksiya borki,`\n` va `endl` funksiyalari uchun bir qator tashash, bular bir xil vazifani beradi va `\t` bu 4 ta probil belgisini tashlab ketadi.

```cpp
#include <iostream>
using namespace std;

int main() 
{
  cout << "Hello World!\n";
  cout << "Hello World!"<<endl;
  cout << "Hello World!\t Salom Dunyo";
  
}
``` ko'rib turganizgizdek biz bularni ishlatishimiz mumkin.
Biz fuksiya oxirida `return` qo'yib qo'yishimiz mumkin va bu funksiyani qaytaradi degan ma'noda va return haqida funksilar mavzusida alohida tanishamiz;

```cpp
#include <iostream>
using namespace std;

int main() 
{
  cout << "Hello World!\n";
  cout << "Hello World!"<<endl;
  cout << "Hello World!\t Salom Dunyo";
 return 0; 
}
```aytgancha yosh dasturchilar yozish tezligi past boladi va siz typing.com[](https://www.typing.com/) sayti orqali o'z yozish qobiliyatingizni oshirishingiz mumkin.

> _E'tiboringiz uchun rahmat!_
Docker is not suitable for windows.
Tags: docker, discuss, webdev
Published: 2022-11-03 04:27:46

I have 32 GB ram laptop with 11th Gen i5@2.9GHz (12 CPU), Still docker utilise all my cpu and overheats the system for just running mysql and phpmyadmin. The fan is running most of the time even when there is room temperature is low.

Is it fault of windows or docker or docker image that I'm using. It's kind of blockage I'm facing while doing development.

[https://twitter.com/YogeshGalav7/status/1582671255513141248](See Tweet)
2131. Leetcode solution in CPP
Published: 2022-11-03 04:13:05

```cpp
class Solution {
 public:
  int longestPalindrome(vector<string>& words) {
    int ans = 0;
    vector<vector<int>> count(26, vector<int>(26));

    for (const string& word : words) {
      const int i = word[0] - 'a';
      const int j = word[1] - 'a';
      if (count[j][i]) {
        ans += 4;
        --count[j][i];
      } else {
        ++count[i][j];
      }
    }

    for (int i = 0; i < 26; ++i)
      if (count[i][i])
        return ans + 2;

    return ans;
  }
};

```

#leetcode
#challenge
Here is the link for the problem:

https://leetcode.com/problems/longest-palindrome-by-concatenating-two-letter-words/
Can php , python and javascript still use for long time like a java and c#
Published: 2022-11-03 04:06:50

i am beginner. I ask some question mostly the programming lang use for long time heard Java and C# still long time for web development and if second way php(Laravel),python(Django),javascript(MERN) is it possible to grow up over 10 years like c# and java or not for web development ?
IoT Smart Waste Management Technology
Tags: iot, smartwaste
Published: 2022-11-03 03:43:17

Global warming causes climate change, which is pushing governments to reduce their carbon footprint in line with the UN's 2030 Sustainable Development Goals. One way to improve waste collection and collection is smart waste management technologies. How does waste management deserve such a lofty word as intelligent management? Well, we will take a look at how garbage is managed intelligently.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/95dwo3p3y5p1j0kltx3v.png)
According to the World Bank report, the world will generate 2.01 billion tons of solid waste every year. Most people probably don't understand this concept very well. Based on the current global population of 7.9 billion, the average person generates 250 kg of solid waste, not including biodegradable types of waste. Among them, 33% of the waste will pollute the environment, so it has caused a huge pollution problem, and how to solve this problem has become a concern of society.
Increasing global warming is urging governments to do everything they can to reduce carbon emissions in line with the UN's 2030 Sustainable Development Goals. This has forced governments at all levels to implement smart waste management technologies to improve waste recycling and collection.
What is smart waste management technology? Find out together next!
The system consists of three layers, namely the acquisition execution layer (sensor), the transmission layer (data transmission radio), and the data processing layer (platform). 
The weight sensor, as an important part of the data acquisition layer, is an important criterion to measure whether the dumpster needs to be cleaned or not. The sensor will collect the weight information, and the data collected by the sensor will be transmitted by the data transmission radio. After the data is transmitted to the management platform, a standard will be set by the management platform, and when the weight reaches a certain level then personnel will be sent to clean up and reduce the number of empty trips.
Why do we need to use smart waste management technology? Some advantages are as follows:

- **Reduced carbon footprint**: IoT can optimize routes to reduce fuel consumption and carbon footprint.
- **Reduced operating costs**: Real-time information received from the smart bins helps optimize vehicle routes, saving manpower and fuel. 
- **Unattended bins**: Sensors detect the fill level of bins and notify authorities via cellular signals when bins are close to filling.
Async functionality - currying that makes sense
Tags: javascript, functional, async, curry
Published: 2022-11-03 02:46:02

There are a range of ways in JavaScript to handle or express delayed activity:

- Callbacks (pass a single function to be used later)
- Promises
- Async/Await
- setTimeout
- Subscription
- Push notifications
- etc.

Another way of providing delayed functionality is "currying". Regardless of the many tutorials about how currying works, the main point is to handle a delay in the application of functionality. I just use the Ramda `curry` function and don't worry about the mechanics.

In fact, currying can work quite well in an asynchronous environment because the delay is fundamental. You may often be subject to waiting for all the information before executing full functionality.

An example might be pre-configuring a button in React, but needing to receive a user selection from a drop-down that completes the configuration before adding it to the UI. The user's selection might define the button's label text for example.

Another example is making use of the difference between configuring how to process an array, and actually doing the processing.

```javascript
import { curry } from 'ramda'

const listOfData = [1, 2, 3]
// the core function expressing the functionality we want
// but wrapped by the 'curry' function
const processMyList = curry((configParam, listItem) => {
    return configParam + listItem
})
const fetchedConfigParam = await someAsyncronousFunction() // fetches a number
// using 'curry' creates a new function we can use later
const incrementListOfNumbers = processMyList(fetchedConfigParam) // provide the configParam arg
// do the processing
const processedList = listOfData.map(number => {
    return incrementListOfNumbers(number) // provide the listItem arg
})
```
oneAPI and importance of open platforms
Tags: beginners, hpc, aiml, opensource
Published: 2022-11-03 02:05:00

Hello! This is my first post as the community manager for the oneAPI community.  For this conversation with the community-at-large, I want to talk about open platforms and their importance.
 
What is the most famous open platform that you can think of? 
 
Here is one I am thinking of…. here is a hint: it starts with an L and ends with an X. 
 
Yes! Linux!

Linux kernel and its userspace counterparts constitute a platform. While there are plenty of open platforms, and even open specifications, Linux is the one that most people know that showcases the many kinds of collaborators around one codebase under an open source license.
 
The Linux platform runs the world's infrastructure whether that's satellites, cars, phones or the cloud. The community is full of individuals, organizations, and businesses who compete with each other, work with each other and yet they all collaborate as an example of a community endeavor towards a common goal. Classic open source projects follow suit!
 
oneAPI has a similar story.  Today, there is a large selection of software accelerators available to us from a diverse set of providers. Some are dance partners with each other, some might be future dance partners. In the end, we have a large party filled with many options!
 
oneAPI is an open, industry-supported initiative that allows you to write code that can be implemented on many accelerators. That means you can adapt the code base from an Intel processor to an NVIDIA GPU, to a FPGA. You can get even fancier: you can have an architecture with many types of accelerators and write an overall system that takes advantage of an FPGA and an NVIDIA GPU! 
 
Another important aspect of the oneAPI community is the open governance model that is currently implemented. Open governance means that there are more than one stakeholder. With multiple stakeholders invested in oneAPI, we build trust knowing that oneAPI is not dominated by any one member. It also means that this community will be more resilient as it is not tied to any  single member. 
 
Like the Linux model, we have a community rich with researchers, entrepreneurs, technologists, and students. We have a community that is global, accessible, and eager to collaborate with each other to bring about innovation.

Would love to hear what you think of open vs closed ecosystems. 

cover image: Photo by <a href="https://unsplash.com/@timmossholder?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Tim Mossholder</a> on <a href="https://unsplash.com/s/photos/open-ecosystem?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
ad_connect command confusion
Tags: fpga, opensource, xilinx, adi
Published: 2022-11-03 01:52:20

We are using the Analog Devices HDL reference design for the zc706 and ADRV9371. We got a clock error when we connected up our IP (DVB-S2 Encoder). 

> ERROR: [BD 41-237] Bus Interface property FREQ_HZ does not match between /dvbs2_encoder_wrapper_0/s_axis(100000000) and /axi_ad9371_tx_dma/m_axis(200000000)
> ERROR: [BD 41-237] Bus Interface property CLK_DOMAIN does not match between /dvbs2_encoder_wrapper_0/s_axis(system_sys_ps7_0_FCLK_CLK0) and /axi_ad9371_tx_dma/m_axis(system_sys_ps7_0_FCLK_CLK1)

This error doesn't happen when we do this:

> ad_connect axi_ad9371_tx_dma/m_axis_last dvbs2_encoder_wrapper_0/s_axis_tlast   
> ad_connect axi_ad9371_tx_dma/m_axis_valid dvbs2_encoder_wrapper_0/s_axis_tvalid   
> ad_connect axi_ad9371_tx_dma/m_axis_ready dvbs2_encoder_wrapper_0/s_axis_tready
> ad_connect axi_ad9371_tx_dma/m_axis_data dvbs2_encoder_wrapper_0/s_axis_tdata

But it does when we do this:

> ad_connect axi_ad9371_tx_dma/m_axis dvbs2_encoder_wrapper_0/s_axis

In looking at how ad_connect is defined in .../scripts/adi_board.tcl:

> proc ad_connect {name_a name_b} {
>   set type_a [ad_connect_int_class $name_a]
>   set type_b [ad_connect_int_class $name_b]
>   set obj_a [ad_connect_type $name_a]
>   set obj_b [ad_connect_type $name_b]
>   if {!([string first intf $type_a]+1) != !([string first intf $type_b]+1)} {
>     error "ERROR: ad_connect: Cannot connect non-interface to interface: $name_a ($type_a) <-/-> $name_b ($type_b)"
>   }

The first thing it does is compare interface types. That's how I learned AXI Smartconnect was the wrong choice (in one of two ways) for trying to upsize the bus to the DACFIFO.

There's then a large switch case statement to return the names and types in question.

After the switch case statement is:

>   # Continue working on nets that connect to constant. obj_b is the net/pin
>   set width [ad_connect_int_width $obj_b]
>   set cell [ad_connect_int_get_const $name_a $width]
>   connect_bd_net [get_bd_pin $cell/dout] $obj_b
>   puts "connect_bd_net [get_bd_pin $cell/dout] $obj_b"
> }

connect_bd_net is a Xilinx tcl command. ad_connect is an ADI command (defined as described above in .../scripts/adi_board.tcl)

The link to the connect_bd_net documentation is https://docs.xilinx.com/r/en-US/ug835-vivado-tcl-commands/connect_bd_net

Maybe, when running ad_connect, it runs connect_bd_net, gets all the pins with get_bd_pin, and hooks up a lot more than the few signals we believe we need. We think it's connecting the AXI clock (ACLK) in a different place than we intend. 

We will just keep learning how to connect things and use TCL until everything works!

_Find us at https://openresearch.institute_
Hacksquad 2022
Tags: opensource, hacksquad, github, projects
Published: 2022-11-03 01:37:13

Hello all, october month gave me to much exposure to the open source after participating in hacktoberfest i got to know about hacksquad which is just like hacktoberfest,where top-60 teams will get swags.Each team having 5 member,for getting the swags all of have atleast one successful pr/mr.I have participated in it with my friend.Waiting for the result.
Thankyou guys for reading.

PS:Novemeber month is started if you know any opensource events(just like hacktobefest/hacksquad or like that),just let me know in comment section.Thanks.
How React Router can cause unexplained behavior with your browser
Tags: react, api, html, javascript
Published: 2022-11-03 01:01:02

Recently a friend was having a super weird bug with their React app. Whenever you would interact with a link, instead of being routed to the correct client-side component, the screen is replaced with raw JSON. 


![raw JSON](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lyrp3w0akljrrpdkalbi.png)


However, if you use your browser's refresh button after this, it suddenly renders correctly. Like so:

![success](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fqwcjg78285x75wuegx4.png)

They were pulling their hair trying to figure this out! 

What's going on?

Well, it turns out it has to due with the way browsers handle http requests from the URL.

![react router](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jhdj10zycl76aaf2eohj.png)

React Router isn't actually "routing" anywhere from a HTTP sense -- it's just rendering different JavaScript/HTML and storing its "location" in the URL.

When you visit a URL that happens to be exactly the same as your API route. When that happens, your browser makes a GET request back to the server for that route, so you just get whatever your server sends.

Your server routes and your React Router routes SHOULD NOT conflict. How can we fix this?

Well, it's pretty simple--

You really have three options here:

1.
**Use a hash router**

> This is a <Router> that uses the hash portion of the URL (i.e. window.location.hash) to keep your UI in sync with the URL. It's the difference between ``website.com/api`` and ``website.com/#/api``


> Because of this URL hash, it puts no limitations on supported browsers or web server. Server-side routing is independent from client-side routing, which prevent just rendering JSON.

{% embed https://gist.github.com/duaneleem/3a5a62abc62db156b88a1617380e9704 %}

2.
**Redirect all HTTP requests to root,** 

> meaning /, /something and /anything will serve /. Then host your API on another subdomain, like api.mydomain.com

3.
**Choose a route to serve your API from**

> This can be something like mydomain.com/api. Forward all requests from any route EXCEPT /api and it's subroutes to the root.

Personally, I would go with option 3 as I believe it's cleanest. Just forward all requests except if it's an API request. Super simple.

I hope this helps anyone who is having trouble with their browser rendering JSON instead of their React component! This was a weird thing I have never encountered before so I thought I would share it with the world!

Thanks so much for reading! Have a great day and HAPPY CODING!
Ubuntu 22.04 LTS
Tags: linux, ubuntu, beginners, tutorial
Published: 2022-11-03 00:49:28

How to dual boot windows with Ubuntu[22.04 LTS)?

Well this task isn't a hard one at all, but this might intimidate some people who are just starting out especially the new boot loader screen that comes along with it(GRUB). Here I'm gonna breakdown some steps to dual boot ubuntu with windows I'll also mention some mistakes that I've encountered along the way. If you're stuck please refer to this video it helps a great deal 
https://youtu.be/GXxTxBPKecQ.

1) Download the Ubuntu iso from their website https://ubuntu.com make sure you're downloading the DESKTOP version and not the server one.

2) You can now flash this iso file to a usb for that use rufus or balena etcher.

3) Now you gotta shrink space in you hard disk to make space for the ubuntu installation, I'd suggest giving a minimum of 30 gigs of space for it.

4) Now restart your pc, keep pressing your bios key, which will be different for different manufactures. Now that you're in bios alter the boot order by putting your usb above other physical hard disks.

5) Now the ubuntu installer will pop up, this will be a straight forward process just read everything before you proceed further in the installation, I'd suggest automatic partitioning if you're a beginner.

6) Once that's done you're all done with the installation now reboot your pc, you'll see a new boot loader screen this screen is interface of the GRUB bootloader, just select windows or ubuntu from here to boot it

Here you go you've successfully installed Ubuntu Congrats!!

Some Common mistakes and lookouts:

* Always read before doing something.

* Don't type any random command from internet on to the terminal

* Don't delete linux partition files from windows, if so you'll be also deleting grub in the process hence you won't be able to boot at all.

Thank you all for reading, this is my first blog post and i'm no expert in this field, but if it helped anyone I'm really happy.
So Thank you and have a great day.
Zero to SaaS - Product #1 BookMarksy.io landing page Is live!
Tags: tutorial, webdev, javascript, beginners
Published: 2022-11-03 00:49:12

As the title suggests, the landing page for BookMarksy.io is live!

Check out the waitlist [bookmarksy.io](https://bookmarksy.io) or over at [twitter](https://twitter.com/bookmarksy_io)
10 Codepen awesome card design made with HTML, CSS & JAVASCRIPT.
Tags: webdev, beginners, programming, tutorial
Published: 2022-11-03 00:32:10

10 Codepen awesome card design made with HTML, CSS & JAVASCRIPT.
Beginners and advanced web developers

Coding with inspiration helps you to get better ideas and clues about how to create a user friendly and interactive system or product. 

I have combined 10 codepen awesome card design for you check it out [here](https://www.youtube.com/watch?v=RwhkqStOBG0)