teleren/devto huggingface dataset:
PyScript vs JavaScript
Tags: pyscript, javascript, python, programming
Published: 2023-06-13 10:24:45

Hello, folks.  

_Please don't treat this article's as divine truth. It's my personal view._

### JS 
If you have more than two years of experience developing front-end applications, you undoubtedly already know about some of the unsuccessful attempts to replace strange, ugly JavaScript. Although attempts have been made to replace or avoid using JavaScript, JS is still in use.A tough opponent!
 
JavaScript is everywhere on the web. It is the most used programming language, with 97.7% of all websites using JavaScript as a client-side programming language.

### PyScript
The use of Python has greatly increased in recent years. It has many uses, including its most well-known use in artificial intelligence as well as data science, robotics, and scripting.

And this year, during the PyCon 2022 conference, Anaconda announced a framework named PyScript that allows you to use Python on the web using standard HTML.

### Failed to attempt to replace JavaScipt


- **Java - J2CL**
J2CL is a powerful, simple and lightweight transpiler from Java to Closure style JavaScript.

- **C# - Blazor**
Use the power of .NET and C# to build full stack web apps without writing a line of JavaScript.


- **Python - PyScript**
PyScript that allows you to use Python on the web using standard HTML.


And many more ...

### Conclusions:

- JavaScript will be not replaced, so don't spend some time on some compilers which execute JS bullshit. 

- Stick to JS - 97.7% of web is using it.

- JavaScript is not perfect, but nothing will replace it. 

- Versatility: JavaScript is a versatile programming language that can be used for both front-end and back-end development. It is the de facto language for web development and is supported by all major browsers. 

- Large and Active Community

- Extensive Ecosystem: JavaScript has a vast ecosystem of frameworks, libraries, and tools that can greatly streamline development. Popular front-end frameworks like React, Angular, and Vue.js.

- Demand and Job Opportunities: JavaScript is in high demand in the job market due to its widespread usage. 

- Future Compatibility: JavaScript continues to evolve and adapt to new technologies and trends. 

---

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


[![linkedin](https://img.shields.io/badge/linkedin-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/kristiyan-velkov-763130b3/)

<a href="https://revolut.me/kristiyanvelkov" target="_blank">
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rxmsw2d2ooukhdg8x5ar.png)
</a>

If you like my work and want to support me to work hard, please donate via:

<a href="https://revolut.me/kristiyanvelkov" title="Link to Revolut">Revolut website payment</a> or use the QR code above.                                                                                                                           


**Thanks a bunch for supporting me! It means a LOT 😍**

---
How to target ads on social media platform
Tags: targetads
Published: 2023-06-13 10:17:24


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

Publicizing is wherever on the web, yet we've really improved at overlooking it. **[target ads](https://www.indidigital.in/target-ads/)**, publicists have adjusted to our advanced survey propensities by recollecting what we read and purchase on the web, then utilizing this data to sell us things they figure we could like. While it might sound unusual, this training, called targeted promoting, has become exceptionally normal.

The beneficial thing about targeted ads is that you'll see ads for items you really care about. target ads, this framework is flawed. Regardless of whether you just visit a page once, you might see ads for that specific item for a long while. For example, you might continue to get ads for maternity wear long after you've conceived an offspring.

The more sponsors are familiar you, the more they expect about your purchasing propensities. target ads: Publicists will take anything that they can get assuming it implies they could sell you something.

Targeted publicizing should have been visible as an intrusion of security. **[target ads](https://www.indidigital.in/target-ads/)**, recall that all of the data you submit to the Web can be followed, whether it be web crawler demands, virtual entertainment refreshes, or the sites you visit. What's more, on the off chance that it tends to be followed, this data might get back to you as a targeted promotion.

target ads. Assuming that you're looking for work boots on your PC, you can get targeted ads for work boots on your cell phone, despite the fact that you never perused for boots on the gadget. Sponsors can now think about what your identity is by breaking down your area, perusing propensities, and the kinds of locales you sign in to, as Facebook or Google. What's more, the insane part? Their estimates are shockingly precise, as per articles from target ads.

The promoters that gather and utilize this information guarantee to not keep delicate individual data on document, but rather it's hard to sort out precisely exact thing these huge information publicists know. target ads, this sort of information assortment is turning into the standard and right now there are no guidelines against it, meaning it will probably be around for a really long time. Fortunately, there are a couple of things you can do to retaliate against the ads.

**[target ads](https://www.indidigital.in/target-ads/)**

To get in touch with INDIDIGITAL TEAM, contact at India contact #- +91-9971778006, USA Contact #- 1–8068484144, email us- contact@indidigital.com, skype us- indidigital, indidigital@gmail.com For more visit our website: https://www.indidigital.in/
Are you searching the best social media marketing company in Gurgaon
Tags: socialmedia
Published: 2023-06-13 10:11:18


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y0qgal3o69qsij53aam2.jpg)
We are the best site to **[social media marketing company gurgaon](https://www.indidigital.in/product-tag/hire-best-social-media-marketing-company-agency-gurgaon/)** in light of the fact that we completely comprehend the significance of making that "social verification" and wow-factor for your recordings. Social media is about insights. Likes, remarks, and perspectives show watchers that your video merits watching. Support your social media marketing company gurgaon today and figure out the imperceptible yet extremely strong impacts of social confirmation.

The way to creating endorsers is great substance, however the way to presenting that substance to an immense crowd lies in channel authority. Assuming that you are new to this term, channel authority alludes to the quantity of perspectives, recordings, endorsers, and the channel's age. These subtleties are calculated into the YouTube calculation, and impact which recordings are pushed to specific socioeconomics.

You might find that this makes an extraordinary issue as an approaching substance maker, as bigger makers will as of now have a larger part of your interest group, to a limited extent because of the channel's power, thus, video on youtube needs advancements for getting all the more no. of perspectives and traffic on it. we have a wide range of plan for advancing your video prefers Quick youtube sees, slow youtube sees and **[social media marketing company gurgaon](https://www.indidigital.in/product-tag/hire-best-social-media-marketing-company-agency-gurgaon/)**.

With one of the world's most exceptional video handling and examination devices, YouTube considers many various factors in deciding the positioning of a video. The most consideration paid by the workers on the calculation is the quantity of perspectives social media marketing company gurgaon.

Despite the fact that it is normal that the recordings that are observed quick in the transient will be set higher, the nature of the perspectives that make up the quantity of video sees is additionally significant. YouTube feels that content that is more watched sees more interest, social media marketing company gurgaon; to contact more individuals.

The individuals who are expecting to contact more individuals need to social media marketing company gurgaon. The YouTube calculation assesses this solicitation by putting pertinent substance on top. This implies that getting social media marketing company gurgaon (whenever taken from the right stage) decidedly affects positioning.

**[social media marketing company gurgaon](https://www.indidigital.in/product-tag/hire-best-social-media-marketing-company-agency-gurgaon/)**

To get in touch with INDIDIGITAL TEAM, contact at India contact #- +91-9971778006, USA Contact #- 1–8068484144, email us- contact@indidigital.com, skype us- indidigital, indidigital@gmail.com For more visit our website: https://www.indidigital.in/
[Android] UserListApp
Tags: android, kotlin, api, retrofit
Published: 2023-06-13 10:07:05

### UserList App

![UserList App](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b8zd5rk4o4oyo0u1rx0g.png)

###GitHub:
[https://github.com/encorex32268/UserListApp](https://github.com/encorex32268/UserListApp)
Nồi điện nấu phở chính hãng giá rẻ chất lượng cao
Published: 2023-06-13 10:05:11

https://noidiennaupho.com/ Nồi điện nấu phở inox 304 dung tích lớn ✔️Nấu nhanh, an toàn, tiếp kiệm ✔️Chính hãng ✔️Bảo hành lâu dài. 0961.65.2266 t.vấn miễn phí✔️✔️✔️
28 Ng. 168 Đ. Nguyễn Xiển, Hạ Đình, Thanh Xuân, Hà Nội 
#noinaupho #noidiennauph #noinauphobangdien
https://pbase.com/noidiennaupho/noidiennaupho
https://penzu.com/p/ebe7e459
https://peatix.com/user/17751848
https://matters.town/@noidiennaupho
[Android] UserListApp - UI -Part5
Tags: android, kotlin, retrofit, api
Published: 2023-06-13 10:04:24

##Create UserViewModel
Here just one Event -> getDataBySize()
Inject UserRepository We created at part4

```
@HiltViewModel
class UserViewModel @Inject constructor(
    private val userRepository: UserRepository
) : ViewModel(){

    var state by mutableStateOf(
        listOf<User>()
    )
    private val _uiEvent = Channel<UiEvent>()
    var uiEvent = _uiEvent.receiveAsFlow()
    init {
        getDataBySize(20)
    }
    fun getDataBySize(size : Int = 20){
        viewModelScope.launch {
            userRepository.getUserBySize(size = size.toString()).collectLatest {
                when(it){
                    is Resource.Loading->{}
                    is Resource.Error->{
                        Log.d("TAG", "getDataBySize: ${it.message}")
                        _uiEvent.send(UiEvent.APIError)
                    }
                    is Resource.Success->{
                        it.data?.let {
                            state = it
                            Log.d("TAG", "getDataBySize: ${it}")
                        }
                    }
                }
            }
        }
    }



}
```
## If API Failed , We can use UiEvent send Event to Screen

```
sealed class UiEvent{
    object APIError : UiEvent()
    object Success : UiEvent()
}

```

##UI - UserScreen LazyColumn

```
@Composable
fun UserScreen(
    users : List<User>
) {
    LazyColumn{
        items(users){user ->
            UserItem(user)
        }
    }
}
```
##UI - UserItem

```
@Composable
fun UserItem(
    user: User,
    modifier: Modifier = Modifier
) {
    Row(
        modifier = modifier
    ) {
        AsyncImage(
            modifier = Modifier
                .size(80.dp),
            model = user.avatar,
            contentDescription = null,
        )
        Column(
            modifier = Modifier
                .weight(1f)
                .fillMaxWidth()

        ) {
            Row{
                Icon(
                    imageVector = ImageVector.vectorResource(
                        id = when(user.gender){
                                "Male" -> R.drawable.baseline_man_24
                                "Female" -> R.drawable.baseline_woman_24
                                else->{
                                    R.drawable.baseline_question_mark_24
                                }
                            }
                    ),
                    tint = Color.Unspecified,
                    contentDescription = "gender mark"
                )
                Text(text = user.username)
            }
            Text(text = user.dateOfBirth)
            Text(text = user.email)
            Text(text = user.phoneNumber)


        }
    }

}
```
Cost-Effective DevOps Solutions for Small Businesses!
Tags: devops, aws, cloud, softwareengineering
Published: 2023-06-13 09:56:15

**What is DevOps? **
DevOps is a set of practices that emphasizes collaboration, communication, automation, and monitoring throughout the software development and delivery process. 

Small businesses may face challenges in implementing DevOps due to limited resources, expertise, and budget. However, there are cost-effective DevOps solutions that can help small businesses achieve their development and delivery goals while optimizing their resources and budget. 

 

> Some of the cost-effective DevOps solutions for small businesses include using open-source tools, leveraging cloud services, adopting agile methodologies, automating testing and deployment processes, and implementing continuous integration and delivery (CI/CD) pipelines. 

 

By implementing cost-effective DevOps solutions, small businesses can improve their software development and delivery speed, quality, and efficiency, while reducing costs and minimizing risks. This can help small businesses stay competitive and achieve their business objectives on top of Form. 

 

DevOps is a software development and delivery process that places a strong emphasis on cooperation and communication between development and operations teams. With the use of this strategy, businesses may produce higher-quality, more dependable, and quicker software. Due to their limited resources and financial constraints, small organizations, however, have difficulties when implementing DevOps. 

However, did you realize that [DevOps also helps you cut expenses which can really help small businesses? 
](https://techforceglobal.com/managed-services/)
 

Automation is the answer to everything. The main line is that DevOps helps you save money, whether that means you need a smaller crew to manage your infrastructure or you dynamically scale it up and down dependent on the volume of traffic you receive.
In this blog, we’ll highlight a few ways DevOps helps you save money.

If you find this blog useful please do follow us for more technology related blogs and updates. 


To read more check our blog here: https://techforceglobal.com/blog/cost-effective-devops-solutions-for-small-businesses/
[Android] UserListApp - Dependency Injection - Part4
Tags: android, kotlin, retrofit, api
Published: 2023-06-13 09:56:02

##Create Application

```
@HiltAndroidApp
class UserApplication  : Application()
```
##Add Name ... on AndroidManifest

```
  <application
        android:name=".UserApplication"
    ....
```
##Add User Internet Permission

```
    <uses-permission android:name="android.permission.INTERNET"></uses-permission>

```
##Create UserModule.kt
這個檔案是為了提前產生物件.比如說：UserApi , UserRepostioryImpl

```
@Module
@InstallIn(SingletonComponent::class)
object UserModule {

    @Provides
    @Singleton
    fun providesUserApi() : UserApi {
        return Retrofit.Builder()
           .baseUrl(UserApi.BASE_URL)
           .addConverterFactory(GsonConverterFactory.create())
           .build().create()
    }

    @Provides
    @Singleton
    fun providesUserRepository(
        userApi : UserApi
    ) : UserRepository {
        return UserRepositoryImpl(userApi)
    }
}
```
Common Dotnet Tips and Tricks
Published: 2023-06-13 09:49:48



## Tip1:


In ASP.Net web forms if you are adding a server contorl like 

`<asp:Label ID="lblEmail" runat="server" Text="Email"></asp:Label>`

If the code is not autogenerated, try with designer view and add from there and refresh the screen




## Tip 2


Change the Port Number in Project Web if the port is already running or using by the other IIS process


Delete .vs 


## Intellisense not working


In Visual Studio:

Click Tools->Options->Text Editor->All Languages->General
Uncheck "Auto list members"
Uncheck "Parameter information"
Check "Auto list members" (yes, the one you just unchecked)
Check "Parameter information" (again, the one you just unchecked)
Click OK
If this doesn't work, here's a few more steps to try:

Close all VS documents and reopen
If still not working, close/reopen solution
If still not working, restart VS.
For C++ projects:
MSDN has a few things to try: MSDN suggestions

The corrupt .ncb file seems most likely.

From MSDN:

Close the solution.
Delete the .ncb file.
Reopen the solution. (This creates a new .ncb file.)
Notes:

Tested in VS 2013/2015
Logging possible causes:

Copy/pasting controls in a source page. I found that my designer.vb file didn't update from this, either.
Copy/pasting code from another page that caused an error because the code copied referred to a control that wasn't on the page I was pasting to.
C++ project has corrupt .ncb file
(Please add to comments if you notice behavior that causes this.)
My PHP Application Runs 60% Faster: Here is How I Did it!
Tags: php, phpperformance, garbagecollectors, phpdevelopers
Published: 2023-06-13 09:49:40

---
title: My PHP Application Runs 60% Faster: Here is How I Did it!
published: true
description: Boosting PHP Performance: Unleashing the Power of Garbage Collectors

tags: php, phpPerformance, garbageCollectors, phpDevelopers
cover_image: https://anastasionico.uk/img/blog/Boosting-PHP-Performance-Unleashing-the-Power-Garbage-Collectors.jpeg
# Use a ratio of 100:42 for best results.
# published_at: 2023-06-13 09:47 +0000
---

As developers, we rely on programming languages to handle memory allocation and deallocation seamlessly, enabling us to focus on building robust and feature-rich applications.

It took me years of experience and I had to find a tech lead to mentor me to understand that efficient memory management plays a vital role in ensuring optimal performance and preventing memory leaks.

 

One of the key mechanisms I was taught to make my application faster was garbage collection. 

What is a garbage collector?

The concept revolutionized memory management by automating the process of reclaiming unused memory and freeing developers from the burden of manual memory deallocation.

 

In short, garbage collection is the process of identifying and freeing memory that is no longer in use, making it available for future allocations. 

By automatically detecting unreferenced objects and deallocating their memory, garbage collectors eliminate the need for explicit memory management, reducing the risk of memory leaks and dangling pointers.

 

Inefficient memory handling can lead to a host of issues, such as memory leaks, crashes, and degraded performance. 

 

In this blog post, we will explore its significance in programming languages, the underlying principles behind garbage collectors, and how it simplifies memory management for developers. 

[My PHP Application Runs 60% Faster: Here is How I Did it!
](https://anastasionico.uk/blog/Boosting-PHP-Performance-Unleashing-the-Power-Garbage-Collectors)
This week focus: Refactoring
Tags: ruby, rails, refactoring, programming
Published: 2023-06-13 08:56:41

Look at your code and identify any areas where you can improve. Refactoring isn't about fixing bugs but improving your code's readability, efficiency, and maintainability.

Look for complex methods that could be broken down, repeated code that could be extracted into its method or class, and any design patterns that could be better applied.

But mostly, ask yourself: How much effort will it take a new colleague to understand what this code does?

For inspiration, take a look at these eloquent words from Yukihiro Matz (from Beautiful Code book). I get back to reading that chapter from time to time when I contemplate refactoring and how I write Ruby code:



![A quote from Yukihiro Matz about beautiful code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y44904w4fexmox2yoomc.png)


## Start small

1\. Open a file

1. Identify a method that you think is complex or hard to understand
    
2. Make sure you have a test that covers functionally what that piece of code should do (could also be indirect)
    
3. Choose one thing that you want to improve: make it smaller or readable or better naming ...
    
4. Refactor it
    
5. Ask for a review with at least a focus on readability
    

Of course if you have more time then there are other strategies to approach refactoring. But in case you don't have too much dedicated time, let's focus this week in doing some bit and pieces of refactoring.

---

Enjoyed this article?

Join my [**Short Ruby News**](https://shortruby.com/) **newsletter** for weekly Ruby updates. Also, check out my co-authored **book**, [**LintingRuby**](https://lintingruby.com/), for insights on automated code checks. For more Ruby **learning resources**, visit [**rubyandrails.info**](http://rubyandrails.info)**.**
My new website is here!
Tags: nextjs, frontend, typescript, webdev
Published: 2023-06-13 09:28:05

This is my first post for my new [danielzotti.it](https://www.danielzotti.it) website, and first of all I want to thank you for being here! 🥹

## Technical information

The website is developed with [NextJs 13](https://nextjs.org) using the new [App Router](https://beta.nextjs.org/docs/getting-started) feature.
It's my very first experience with NextJs, so if you have pieces of advice to improve it, please don't hesitate to share them!
I made it open source, and you can find it on [GitHub](https://github.com/danielzotti/new.danielzotti.it), thus feel free to explore the code!

The main purpose of this website is to have an entry point to access all the information about me as well as to collect
projects and share personal ideas. Furthermore, I'll use it to get my hands dirty using new technologies and have fun with coding.

> I'll let you find all the Easter eggs! 🤓

Here below a summary of the website sections:

### [Blog](https://www.danielzotti.it/blog)

A section which mainly collects **technical articles about frontend development**, computer science but also whatever
could come to my mind.
Articles are written using `Markdown` format (which, as a developer, I love for its simplicity) and converted in HTML through [markdown-to-jsx](https://www.npmjs.com/package/markdown-to-jsx) in order to be displayed on the website.
As far as regards the syntax highlighter for the code, [react-syntax-highlighter](https://github.com/react-syntax-highlighter) is used.
This article is also hosted [here](https://www.danielzotti.it/blog/welcome)

### [Projects](https://www.danielzotti.it/projects)

A list of **demos** of projects I have made over the years.

### [Open Source](https://www.danielzotti.it/open-source)

A selected list of **personal open source projects**. Data is retrieved directly from my GitHub profile using [GitHub official API](https://docs.github.com/en/rest).
It's a _work in progress_ section, but it'll be improved in the future.
[Android] UserListApp - Folder Create - Part2
Tags: android, kotlin, retrofit, api
Published: 2023-06-13 09:19:20

##Package##

- feature_user
    - data
       - repository
       - local
          - model 
       - remote
          - model
    - domain
       - model
       - repository
    - di
    - presentation

---

**Data**
- local -> Roomdatabase (Android內建的資料庫)
  model -> XXXEntity.class

- remote -> Retrofit (需要調用網路)
  model -> XXXDto.class

- repository -> “實作”獲取資料的介面Interface

---
**Domain**
- model -> 主要是內部使用的class（用來顯示的類別）
- repository -> 獲取資料的介面Interface
- util -> mapper (Dto , Entity to Model)
ex: UserDto , UserEntity -> User

---
**Presentation**
-> Screen(Compose)
-> ViewModel
-> Component