teleren/devto huggingface dataset:
Integrating Analytics in a Figma Plugin - Quick Guide
Tags: analytics, figma, plugin, mixpanel
Published: 2023-09-05 06:15:11

The current best solution is Mixpanel in my opinion. Integrating Mixpanel into a Figma plugin opens up a world of possibilities for analyzing user behavior and tracking valuable data.

So, welcome everyone, it's a quick guide to setup mixpanel with figma plugins.

## The Problem
Figma plugins run inside an iframe, hence have some limitations.

Original Mixpanel client will NOT work in Figma plugins UI because it uses some features like cookies, which aren't accessible to the plugin ui. 

## The Solution
Using a patched version of mixpanel client file will help.

1. Install the package `npm i mixpanel-figma`
2. In your UI file, import the package. Please note that you have to use mixpanel in the UI file only, using it in the core plugin files will result in some errors. [Error example](https://github.com/okotoki/mixpanel-figma/issues/2)
3. Preferably, create a new file, analytics.ts and form a class with all useful methods.
```js
import * as mixpanel from 'mixpanel-figma'

class Analytics {
    constructor() {
        try{
            mixpanel.init("<PROJECT_TOKEN>", {
                disable_cookie: true, //IMP
                disable_persistence: true, //IMP
            });
            console.log("Mixpanel initialized");
        } catch(e){
            console.log("Mixpanel failed to initialize");
            console.error(e);
        }
    }

    track(event: string, properties: object) {
        try{
            mixpanel.track(event, properties);
            console.log("Mixpanel event tracked");
        } catch(e){
            console.log("Mixpanel failed to track event");
            console.error(e);
        }
    }

    identify(id: string) {  // Unique user id (since no persistence)
        try{
            mixpanel.identify(id);
            console.log("Mixpanel identified");
        } catch(e){
            console.log("Mixpanel failed to identify");
            console.error(e);
        }
    }
}

export default Analytics;
```

Create a class instance and call methods where ever you need to add tracking.

Hope you found this useful. I spent some time figuring all this out, so summarized it in a short article, this might help other people out there!

Thanks to [okotoki](https://github.com/okotoki) for the plugin compatible file, do checkout their GitHub for more details.

See you guys soon.
[My Twitter](https://twitter.com/PrakharTandon29)
💥Biendo - Cổng Game Cá Cược Hot Nhất 2️⃣0️⃣2️⃣3️⃣
Tags: biendogames, biendo, codebiendo, biendoonline
Published: 2023-09-05 06:14:44

[💥Biendo - Cổng Game Cá Cược Hot Nhất 2️⃣0️⃣2️⃣3️⃣](https://biendo.games/gioi-thieu-biendo/)
💥Sảnh casino cá cược đổi thưởng uy tín ✅
💥Cung cấp thông tin nhanh chính xác nhất
💥Đa dạng trò chơi cá cược ✅giao diện đẹp
💥Khuyến mãi🎁ưu đãi hấp dẫn
👇chi tiết👇
🌐Website : [https://biendo.games/gioi-thieu-biendo/](https://biendo.games/gioi-thieu-biendo/)
🌐Fanpage: [https://www.facebook.com/biendogamess](https://www.facebook.com/biendogamess)
📧Email: b[iendogames1@gmail.com](iendogames1@gmail.com)
📌Địa chỉ329/15A Đ. Điện Biên Phủ, Phường 4, Quận 3, Thành phố Hồ Chí Minh, Việt Nam
☎️sdt: 0568 279 371
#biendogames #biendo #codebiendo #gamebiendo #biendogame #biendoonline
How to Create and Customize Ports in the Angular Diagram Component
Tags: webdev, angular
Published: 2023-09-05 05:55:24

Learn how to add ports to nodes in the Angular Diagram component. This video demonstrates how to create ports programmatically and add, remove, and update ports at run time using an external button click. It also shows you how to add multiple ports and update the properties of ports dynamically. Finally, it shows how to customize the appearance and position of the ports and how to connect nodes using ports. 

The Angular Diagram is a feature-rich library for visualizing, creating, and editing interactive diagrams. It lets users create flowcharts, organizational charts, mind maps, and BPMN charts through code or a visual interface. 

The Angular Diagram provides support to define custom ports for making connections. When a connector is set between two nodes, its end points are automatically docked to the nodes’ nearest boundary. Ports act as the connection points of the node and allow us to create connections with only those specific points. To add a connection port, define the port object and add it to the node ports collection. The offset property of the port accepts an object of fractions and is used to determine its position. 

You can add and remove ports at runtime by using the client-side methods addPorts and removePorts. The shape of a port can be changed by using its shape property. If you need to render a custom shape, you can set the shape as a path and define the path using the pathData property of the port. The appearance of ports can be customized by using the strokeColor, strokeWidth, and fill properties. Customize the port size using the width and height properties. The ports’ visibility property allows you to define when the port is visible. 

**Product overview:** https://www.syncfusion.com/angular-components/angular-diagram

**Tutorial videos:** https://www.syncfusion.com/tutorial-videos

**Download an example from GitHub: **https://github.com/SyncfusionExamples/how-to-create-and-customize-ports-in-the-angular-diagram-component

{% youtube sBtDnhDegQE %}
Code Craftsmen: Your Partners in App Development
Published: 2023-09-05 05:52:15

Code Craftsmen: Your Partners in App Development" sounds like a catchy slogan or tagline for a software development company or a team of skilled programmers. This kind of slogan can help convey the message that your team is dedicated to producing high-quality code and applications.

If you are looking for ideas to create a brand or marketing materials around this concept, here are some suggestions:

Logo: Create a logo that incorporates elements of craftsmanship, such as tools, a finely crafted piece of code, or a skilled artisan at work. This will visually represent your commitment to quality.

Website: [Design a professional website ](https://smiligence.com/)that showcases your team's expertise, portfolio of projects, client testimonials, and a clear message about your commitment to craftsmanship in app development.

Content Marketing: Start a blog or produce content that discusses best practices in app development, coding techniques, and case studies showcasing your successful projects. This positions your team as experts in the field.

Social Media: Use social media platforms to share your insights, engage with potential clients, and post updates about your ongoing projects. Consistency is key in building an online presence.

Client Relationships: Emphasize your commitment to being a partner in the app development process. Highlight how you work closely with clients to understand their needs, offer solutions, and deliver top-notch results.

Quality Assurance: Mention your rigorous testing and quality assurance processes. This demonstrates your dedication to delivering bug-free and reliable applications.

Client Testimonials: Showcase feedback from satisfied clients who can vouch for your craftsmanship and partnership in app development.

Community Involvement: Participate in the developer community by attending conferences, contributing to open-source projects, or hosting workshops. This can enhance your reputation and attract like-minded clients.

Partnerships: Collaborate with other businesses in related fields, such as design agencies or marketing firms, to offer comprehensive services to your clients.

Promotions: Run promotions or discounts for first-time clients to entice them to work with your team and experience your craftsmanship firsthand.

Remember that building a strong reputation as a code craftsmen involves not only technical expertise but also excellent communication, project management, and the ability to understand and meet your clients' unique needs. Over time, if you consistently deliver high-quality work and foster positive client relationships, your brand as "Code Craftsmen" will become associated with reliability and excellence in app development.
[Tiny] The Story of MockK and ClassCastException
Tags: kotlin, mockk, tiny
Published: 2023-09-05 05:48:55

*Hey folks, today I would like to tell you a story of tests, MockK, and `ClassCastException`. Hope it will help someone not to spend hours on debugging as I did.*

I was merging two microservices into one recently. And one problem I faced was that tests failed with `ClassCastException`:

```
java.lang.ClassCastException: class java.lang.Object cannot be cast to class com.example.GraphQLRequest (java.lang.Object is in module java.base of loader 'bootstrap'; com.example.GraphQLRequest is in unnamed module of loader 'app')
```

Stacktrace and debugging showed that it fails on Kotlin's `runBlocking` function. Here is a sample class:
```kotlin
class MySecurityManager {
    fun <T> asTechnicalBlocking(block: () -> T): T {
        return runBlocking { internalTechnical(block) }
    }

    // ...
}
```

And here is how it was called inside the methods under test:

```kotlin
val request = mySecurityManager.asTechnicalBlocking {
    buildRequest(...)
}
```

Since two microservices used different versions of Kotlin, coroutines, and Spring Boot, I was playing with versions for some time.

*// N hours and M cups of tea later*

Then I realised that not all tests fail, which means that something is wrong with the setup for exact test cases.

*// X hours and Y cups of tea later*

Finally, I found the problem. It was in the declaration of the mock:

```kotlin
class MyTest {
    @MockkBean(relaxed = true)
    lateinit var mySecurityManagerMock: MySecurityManager

    // ...
}
```

If you write tests with Kotlin, you are most likely familiar with [MockK](https://mockk.io/) mocking library. We are also using it extensively.

In the code above the mock is declared as `relaxed`, which means that you can skip specifying behaviour for each method that will be called during the test. Otherwise, if you declare the mock as not relaxed, do not provide behaviour for the method, and this method will be called during the test, the mock will throw an exception.

However, you need to use the `relaxed` option carefully. Here is what the [documentation](https://mockk.io/#relaxed-mock) says: (but who reads it first?)

> Note: relaxed mocking is working badly with generic return types. A class cast exception is usually thrown in this case. Opt for stubbing manually in the case of a generic return type.  

And this is exactly what happened in my case. If I set `relaxed = false` on this mock, it will give me a much more clear and expected exception:

```
  io.mockk.MockKException: no answer found for: MySecurityManager(securityManager bean#6).asTechnicalBlocking(lambda {})
```

So, use `relaxed` wisely and keep mocking.

---

*Dream your code, code your dream.*
97win - Link Truy Cập Đăng Ký Tại Trang Chủ (CoDe 99k)
Published: 2023-09-05 05:48:18

97win được mệnh danh là chiến thần của làng cá cược trực tuyến. Sân chơi này đã làm mưa làm gió trên các BXH độ uy tín và tin cậy của nhà cái thời gian gần đây.
Địa Chỉ: 74 Cây Vông, Diên Sơn, Diên Khánh, Khánh Hòa, Việt Nam
Email: 97winsite@gmail.com
Website: https://97win.site/
Điện Thoại: (+84) 568279226
#97win #97winsite
 
Social Links :

https://www.facebook.com/97winsite/

https://twitter.com/97winsite

https://www.youtube.com/channel/UCibHxCve7SSM2bmJk2fh4vg

https://www.pinterest.com/97winsite/

https://social.msdn.microsoft.com/Profile/97winsite

https://social.technet.microsoft.com/Profile/97winsite

https://bbs.now.qq.com/home.php?mod=space&uid=5596897

https://www.blogger.com/profile/02388982055776594327

https://www.reddit.com/user/97winsite

https://medium.com/@97winsite/about

https://www.flickr.com/people/97winsite/

https://www.tumblr.com/97winsite

https://97winsite.wixsite.com/my-site

https://97winsite.weebly.com/

https://97winsite.livejournal.com/profile

https://97winsite.wordpress.com/

https://sites.google.com/view/97winsite/trang-ch%E1%BB%A7

https://linktr.ee/97winsite

https://www.twitch.tv/97winsite/about

http://tinyurl.com/97winsite

https://ok.ru/nhacai97win/statuses/156378079189076

https://profile.hatena.ne.jp/nhacai97win/profile

https://issuu.com/97winsite

https://www.liveinternet.ru/users/97winsite/

https://dribbble.com/97winsite/about

https://97winsite.webflow.io/

https://97winsite.thinkific.com/

https://500px.com/p/97winsite?view=photos

https://about.me/nhacai97win

https://tawk.to/97winsite

https://www.deviantart.com/97winsite

https://ko-fi.com/97winsite

https://www.provenexpert.com/97winsite/

https://hub.docker.com/u/97winsite

https://independent.academia.edu/97winsite
🏅LUK88⭐️THIEN DUONG CA CUOC GIAI TRI CO 1 0 2 NEN THU✅
Published: 2023-09-05 05:40:57

Nha cai Luk88 co trang web va ung dung di dong, cho phep nguoi choi tham gia ca cuoc tu moi thiet bi co ket noi internet. Luk88 cam ket cung cap trai nghiem ca cuoc tot nhat cho nguoi choi voi cac tinh nang va chuong trinh khuyen mai hap dan.

Dia chi: 75GX+P76, Ngo Gia Tu, Phuong Ngo Quyen, Bac Giang, Viet Naml
Email:luk88.bet@gmail.com
Website: [](url)https://luk88.bet/
Dien Thoai: (+84) 0588797626
#Luk88 #Luk88bet

<p><a href="https://luk88.bet/">https://luk88.bet/</a></p>
<p><a href="https://www.facebook.com/Luk88bet">https://www.facebook.com/Luk88bet</a></p>
<p><a href="https://twitter.com/luk88bet">https://twitter.com/luk88bet</a></p>
<p><a href="https://www.youtube.com/channel/UCNHxM-u6PlTt809HjTLds0w">https://www.youtube.com/channel/UCNHxM-u6PlTt809HjTLds0w</a></p>
<p><a href="https://www.pinterest.com/luk88bet/">https://www.pinterest.com/luk88bet/</a></p>
<p><a href="https://social.msdn.microsoft.com/profile/luk88bet/">https://social.msdn.microsoft.com/profile/luk88bet/</a></p>
<p><a href="https://social.technet.microsoft.com/profile/luk88bet/">https://social.technet.microsoft.com/profile/luk88bet/</a></p>
<p><a href="https://bbs.now.qq.com/home.php?mod=space&amp;uid=5232936">https://bbs.now.qq.com/home.php?mod=space&amp;uid=5232936</a></p>
<p><a href="https://www.blogger.com/profile/03272096665985888631">https://www.blogger.com/profile/03272096665985888631</a></p>
<p><a href="https://www.reddit.com/user/Luk88bet">https://www.reddit.com/user/Luk88bet</a></p>
<p><a href="https://medium.com/@luk88.bet">https://medium.com/@luk88.bet</a></p>
<p><a href="https://www.flickr.com/people/luk88bet/">https://www.flickr.com/people/luk88bet/</a></p>
<p><a href="https://www.tumblr.com/luk88bet">https://www.tumblr.com/luk88bet</a></p>
<p><a href="https://luk88bet.wixsite.com/luk88bet">https://luk88bet.wixsite.com/luk88bet</a></p>
Como Acessar a Câmera do Celular pelo PC | IP Webcam | Script Python para Acessar a Câmera do Telefone
Published: 2023-09-05 05:06:07

Este vídeo é um tutorial muito simples e curto sobre como conectar a câmera do seu telefone Android ao OpenCV. Isso pode ser muito útil para aqueles que planejam criar aplicativos de processamento de imagem que usarão a câmera Android como meio. Vou usar o Python 3.8 em um computador com Windows 10. Sem mais delongas, vamos começar o tutorial.

Antes de começarmos, certifique-se de instalar as seguintes bibliotecas:

opencv-python
numpy
Para instalar usando o pip, digite o seguinte:

pip install opencv-python
pip install numpy
Passos:

Passo 1: Em seguida, é preciso baixar e instalar o aplicativo IP Webcam em seus telefones celulares. Isso será usado para estabelecer a comunicação entre o telefone Android e o PC.

Passo 2: Após instalar o aplicativo, certifique-se de que seu telefone e PC estejam conectados à mesma rede. Execute o aplicativo em seu telefone e clique em "Iniciar servidor".
Dica: role para baixo, está na parte inferior.

Passo 3: Após isso, sua câmera se abrirá com um endereço IP na parte inferior.
Exemplo: https://192.168.43.1:8080

Passo 4: Claro, use a URL mostrada na interface do IP Webcam, substitua-a e execute o código. Em poucos momentos, uma janela do OpenCV se abrirá e fará sua mágica. Para fechar a janela, basta pressionar qualquer tecla.

Código-fonte:
**
_

```
import urllib.request
import cv2
import numpy as np
import time

URL = "http://192.168.1.3:8080/shot.jpg"

while True:
    img_arr = np.array(bytearray(urllib.request.urlopen(URL).read()), dtype=np.uint8)
    img = cv2.imdecode(img_arr, -1)
    cv2.imshow('IPWebcam', img)
    q = cv2.waitKey(1)
    if q == ord("q"):
        break;

cv2.destroyAllWindows()
```
_**
Svelte vs React : What you should know before you chose one ?
Published: 2023-09-05 04:39:59

Svelte vs React is one of the hottest topics in front end engineering these days. However it is bit like comparing Cybertruck with Ford F150. 

React is a bit like F150, heavily used, millions of websites are built using it handling all kind of scale. There is a huge community of developers and module builders who have solved nearly all major problems you are likely to encounter. 

Svelte on other hand is a bit like Cybertruck. It looks promising, some have used it but still remains far away from being battle tested. Even if Svelte convinces everyone that it is better, it is still decades away from threatening React because React is already very popular and has mass adoption.

Frankly, I think Svelte is an interesting framework but right now I do not see the need to switch to it for your next project unless you are building something that requires exceptional performance optimizations. 

I find it a bit annoying that even in year 2023 we have to worry about CSS and JS minification and optimizations. This problem should have been solved from grounds up years ago. How many complex technologies do you really need to achieve the exact same objective ? 

An entire framework built just to do that as first class citizen feature is awesome but I am not convinced that is really needed. [React is able to build high performance pages pretty much like any other framework and Svelte is only marginally better](https://www.frontendeng.dev/blog/11-svelte-and-react).
Managed services
Published: 2023-09-05 03:38:32

[Managed services](https://smiligence.com/Managed-Services) refer to an outsourcing model where a third-party provider takes responsibility for the proactive management and maintenance of an organization's IT infrastructure, applications, or other essential business functions. This approach allows companies to focus on our core competencies while leveraging specialized expertise and resources to ensure the optimal performance and security of our technology ecosystem.
Managed service providers (MSPs) offer a wide range of services, including network monitoring, cybersecurity, cloud computing, data backup and recovery, and helpdesk support. We typically work on a subscription or pay-as-you-go basis, making it cost-effective for businesses to access top-tier IT solutions without the burden of hiring and training in-house teams.
The benefits of managed services include enhanced operational efficiency, reduced downtime, improved security, and scalability to accommodate business growth. MSPs also stay abreast of the latest technology trends and threats, ensuring that our clients remain competitive and protected in a rapidly evolving digital landscape.
AntDB-Oracle Compatibility Developer’s Manual P3–22
Published: 2023-09-05 03:31:01

##### WHERE clause

The WHERE clause is optional and is used as follows

WHERE condition

condition is an expression whose result is a Boolean type. No record will appear in the output that does not satisfy this condition. If the expression returns "true" when the value in the actual record is referenced by any variable, then the record satisfies the query condition.

##### GROUP BY clause

The usage method of optional GROUP BY clause is as follows

GROUP BY expression \[, ...]

The GROUP BY clause streamlines all output rows that share the value of a grouping expression into a single row. The grouping expression can be the name of an input column, or the name or ordinal number of an output column, or any expression formed from the input column values. In case of semantic ambiguity, the name appearing after the GROUP BY clause is interpreted as the name of the input column rather than the name of the output column.

If an aggregate function is used, then the function operates on all records in each group. A separate value is generated for each group. (In contrast, if there is no GROUP BY clause, the aggregation function produces a single value on all the queried rows.) When the GROUP BY clause appears, the aggregation function cannot be used on columns that are not used for grouping in the SELECT list, because there are multiple possible values to return for the non-grouped columns.

**Example:**

```
select job,sum(SAL) from jobhist group by job;

      JOB    | SUM(SAL)  
-------------+--------------
 CLERK       |     7140
 PRESIDENT   |     5000
 MANAGER     |     8275
 SALESMAN    |     5600
 ANALYST     |     6000
(5 rows)
```

##### HAVING clause

The HAVING clause is not mandatory, it is used as follows

HAVING condition

where condition is the same as specified in the WHERE clause.

The HAVING clause is used to eliminate rows from the grouped rows that do not satisfy the condition. HAVING differs from the WHERE clause; the WHERE clause filters out specific rows before applying the GROUP BY clause, while the HAVING clause filters out the grouped rows created by the GROUP BY clause. Unless referenced in an aggregate function, each column referenced in a condition must explicitly reference a grouping column.
AntDB-Oracle Compatibility Developer’s Manual P3–20
Published: 2023-09-05 03:19:35

#### ROLLBACK

**Name**

ROLLBACK -- interrupt the current transaction

**Summary**

ROLLBACK

**Description**

The ROLLBACK command rolls back the current transaction and aborts all update operations performed by the transaction.

**argument**

WORK

Optional keyword - has no effect in practice.

**Note**

A transaction can be successfully terminated using the COMMIT command.

Executing the ROLLBACK command outside of a transaction does not cause side effects.

**Example**

Abort all data change operations:

```
ROLLBACK;
```

#### ROLLBACK TO SAVEPOINT

**Name**

ROLLBACK TO SAVEPOINT -- roll back the transaction to a save point

**Summary**

ROLLBACK TO \[ SAVEPOINT ] savepoint\_name

**Description**

Rollback of all commands executed after the savepoint was created. Savepoints remain valid and can be used again for rollback if desired. After naming a savepoint, the ROLLBACK TO SAVEPOINT command removes all previously created savepoints in an implicit state.

**argument**

savepoint\_name

The name of the savepoint to roll back to.

**Note**

Specifying a savepoint name that has not been created will generate an error.

The ROLLBACK TO SAVEPOINT command is not supported inside the SPL program.

**Example**

Undo the operation of the command following the save point depts.

```
INSERT INTO dept VALUES (50, 'HR', 'NEW YORK');
SAVEPOINT depts;
INSERT INTO emp (empno, ename, deptno) VALUES (9001, 'JONES', 50);
INSERT INTO emp (empno, ename, deptno) VALUES (9002, 'ALICE', 50);
ROLLBACK TO SAVEPOINT depts;
```
A draggable Orientation component
Tags: javascript, webdev
Published: 2023-09-05 01:29:27

A draggable DOM component that simulates Orientation, similar to the browser devtools, and matches the behavior of the browser devtools.

https://github.com/Rabbitzzc/sensors-orientation


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tx2qvsglfn3dcbkey75z.png)
The best API dev tool yet!
Tags: api, tooling, opensource, microservices
Published: 2023-09-05 01:00:00

Hello fellow developers!

We are excited to share with you that Sharkio is now live!
Check it out at https://sharkio.dev

Who is this tool good for?

Fullstack developers
Microservice developers
Api developers

Popular use cases:
- Everyday debugging
- New team member that wants to understand the behavior of the system more easily
- Complex debugging scenarios across multiple services
- Easily debugging a front-end application with multiple
- Easily monitoring requests made to third parties