teleren/devto huggingface dataset:
VTable usage problem: How to display table row numbers
Tags: javascript, datavisualization, visactor, vtable
Published: 2024-04-19 08:00:37

# Question title

How to display the serial number of each row in a table.

# Problem Description

Through configuration, add a column before the first column of the table to display the row number of each row.

# Solution 

`rowSeriesNumber` can be configured in the `option` of table initialization. This configuration item is defined as follows:

```
interface IRowSeriesNumber {
  width?: number | 'auto'; // width of the line number column
  title?: string; // Row serial number title, empty by default
  format?: (col?: number, row?: number, table?: BaseTableAPI) => any; // Row serial number formatting function, empty by default. Through this configuration, you can convert numerical type serial numbers into custom serial numbers, such as using a, b, c...
  cellType?: 'text' | 'link' | 'image' | 'video' | 'checkbox';  // Row serial number cell type, default is text
  style?: ITextStyleOption | ((styleArg: StylePropertyFunctionArg) => ITextStyleOption); // Body cell style, please refer to:style
  headerStyle?: ITextStyleOption | ((styleArg: StylePropertyFunctionArg) => ITextStyleOption); // Header cell style, please refer to:headerStyle
  dragOrder?: boolean; // Whether the row serial number sequence can be dragged. The default is false. If set to true, the icon at the dragging position will be displayed, and you can drag and drop on the icon to change its position. If you need to replace the icon, you can configure it yourself. Please refer to the tutorial: https://visactor.io/vtable/guide/custom_define/custom_icon for the chapter on resetting function icons.
}
```

## code example

```
const option = {
  records: data,
  columns,
  widthMode: 'standard',
  rowSeriesNumber: {
    title: '序号',
    width: 'auto',
    headerStyle: {
      color: 'black',
      bgColor: 'pink'
    },
    style: {
      color: 'red'
    }
  }
};
const tableInstance = new VTable.ListTable(container, option);
```

## Results display 

Online effect reference: https://www.visactor.io/vtable/demo/basic-functionality/row-series-number

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



## Related documents

Line number demo: https://www.visactor.io/vtable/demo/basic-functionality/row-series-number
Related API: https://www.visactor.io/vtable/option/ListTable#rowSeriesNumber
github: https://github.com/VisActor/VTable
How to Transpose Rows to Columns on Multiple Fields in Each Group
Tags: sql, database, data, development
Published: 2024-04-19 07:50:40

We have a database table FACTTABLE, which has data as follows:
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ybrx0rnhmn07ej04bl7w.png)
We are trying to group the table by ID and transpose rows to columns on multiple fields. Below is the desired result:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/33nrtrxha8wky90olbpx.png)
The target is to enter VALUE and CURRENCY values under "TYPE" and "TYPE"1 columns correspondingly and respectively, converting them to row values.

SQL written in SQL Server:

```
WITH CTE AS

(

  SELECT UP.ID,

         UP.TYPE + '_' + LEFT(UP.VALUETYPE, 4) AS NEW_CODE,

         UP.VALUE1

  FROM FACTTABLE

  UNPIVOT (VALUE1 FOR VALUETYPE IN (VALUE, CURRENCY)) UP

)

SELECT P.ID,

       P.TOT_AMT_CURR                       AS TOT_AMT,

       P.TOT_AMT_VALU                        AS TOT_AMT1,

       P.AMT_AVAL_CURR                     AS AMT_AVAL,

       P.AMT_AVAL_VALU                      AS AMT_AVAL1,

       P.DRWN_AMT_CURR                   AS DRWN_AMT,

       P.DRWN_AMT_VALU                   AS DRWN_AMT1,

       P.MTD_DRWN_CURR                   AS MTD_DRWN,

       P.MTD_DRWN_VALU                   AS MTD_DRWN1

FROM CTE

PIVOT (MAX(VALUE1) FOR NEW_CODE IN ([TOT_AMT_CURR], [TOT_AMT_VALU],

                                   [AMT_AVAL_CURR], [AMT_AVAL_VALU],

                                   [DRWN_AMT_CURR], [DRWN_AMT_VALU],

                                   [MTD_DRWN_CURR], [MTD_DRWN_VALU])) P
```
It is rather easy to approach the task in our natural way of thinking. Just convert VALUE and CURRENCY columns to rows – correspond VALUE whose TYPE is TOT_AMT to TOT_AMT and CURRENCY whose type is TOT_AMT to TOT_AMT1, and so on – and then perform row-to-column transposition. SQL does not support dynamic transpositions. It can manage one over a few fixed columns. When the number of columns increases, coding becomes difficult and SQL gets bloated as all columns need to be enumerated during the transposition process. When columns are dynamic too, the solution becomes even more complex.

It is simple and easy to achieve the algorithm in the open-source esProc SPL:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ger30rmkh5iolkium3xl.png)
As a professional data computing engine, SPL is based on ordered sets and provides all-around abilities for performing set-oriented operations. It combines merits of Java and SQL and is convenient for handling various transposition problems.
This Week In Python
Tags: python, community, thisweekinpython
Published: 2024-04-19 06:57:27



**Fri, April 19, 2024**




This Week in Python is a concise reading list about what happened in the past week in the Python universe. 


## Python Articles



- [Shape typing in Python](https://jameshfisher.com/2024/04/12/shape-typing-in-python/) 
- [An unbiased evaluation of environment management and packaging tools](https://alpopkes.com/posts/python/packaging_tools/) 
- [How I Became a Python Programmer—and Fell Out of Love With the Machine](https://www.wired.com/story/how-i-became-a-python-programmer-and-distanced-myself-from-the-machine/) 
- [Best Python Security Practices for Web Developers](https://arjancodes.com/blog/best-practices-for-securing-python-applications/) 
- [How to python check proxy with aiohttp](https://dspyt.com/easy-proxy-scraper-and-proxy-usage-in-python) 



## Projects

- [Flowmium](https://github.com/RainingComputers/Flowmium) – (Python) Workflow orchestrator written in rust 
- [Mini-SQL-Engine](https://github.com/chaitanya100100/Mini-SQL-Engine) – mini SQL engine to parse and execute simple sql queries implemented in python
- [bridge](https://github.com/Never-Over/bridge) – Automatic infrastructure for Django
- [unpack](https://github.com/bnkc/unpack) – Unused Packages for Python written in Rust
- [django-pony-express](https://github.com/ambient-innovation/django-pony-express) – Class-based emails for Django
Strong Portfolio Ideas for Junior Developers 😼
Tags: beginners, portfolio, frontend, learning
Published: 2024-04-19 07:39:47

Hello! 😺

It's been almost 5 days that I've been reworking my new portfolio in React. Previously I made it very simple with just HTML, CSS, & JavaScript for animations. Now that I am almost done, I was thinking about my future projects and what should I do. I'm still exploring ideas and thought it would be great to share some of my favorite project suggestions with you 💡
As junior developers without work experience, it's essential to have a portfolio that highlights our coding capabilities, creativity, and problem-solving skills. Here my ideas: 

1.**E-commerce Site 🛍**: 
A simple online store with product listings, cart functionality, and a checkout page. This project can start very simple and naturally it can evolve even further with integrating user authentication, payment systems etc.

2.**Modern UI/UX Website** 🎨: 
This is something I am actually thinking about very actively. A modern UI/UX website project enables our understanding of layout, typography, color theory, and other essential design principles. Besides that it lets us express our unique style and create a strong personal brand. Also, it is a great way to evolve and step up our creativity by using libraries like Framer Motion.

3.**Website Clones** 🔍: 
Now, that is a challenge😅 By replicating the design and functionality of these well-known sites, I strongly believe that is a valuable experience in understanding complex web applications. Analyzing the user interface, navigation flow, and features of the original website, is a great way to enhance our technical proficiency, attention to detail, and, problem-solving.

4.**Premium Landing Page** 🎫:  
A premium landing page is a standalone web page designed specifically for a marketing or promotional campaign with the goal of driving conversions, such as promoting a product or service, or encouraging users to take a specific action (e.g., sign up, download, purchase).
It is a great way to learn how to use high-quality graphics, professional photography, minimalist layouts, and eye-catching design elements to capture the attention of visitors and guide them toward the desired action.
It is a great opportunity to learn also how to create elements such as social proof (testimonials, reviews), trust indicators (security badges, guarantees) etc.

Now If you think that your passion is more towards Web Applications, some good ideas can include: 

1) Weather Application
2) AI-based Application
3) Chat Application
4) Travel Application

And that includes my ideas. If you have any more project ideas or suggestions on building a strong junior developer portfolio, please share them in the comments below, i would be really happy to explore more options! 🎉

Happy Coding! 😸
Las mejores ideas de recaudación de fondos para clubes deportivos
Published: 2024-04-19 07:26:24

Los clubes deportivos son bastiones de talento, pero las barreras financieras pueden oscurecer las perspectivas de los atletas aspirantes. Aquí, revelamos 8 [ideas innovadoras de recaudación de fondos](https://whydonate.com/es/blog/ideas-de-recaudacion-de-fondos-para-clubes-deportivos/) para clubes deportivos para asegurar que ningún talento languidezca debido a restricciones financieras. 
Desde subastas deportivas cautivadoras hasta la organización de campamentos deportivos para niños, los clubes pueden aprovechar sus recursos para generar ingresos mientras nutren a la próxima generación de atletas. Los partidos amistosos, las sesiones de fotos y las clases de fitness no solo involucran a la comunidad, sino que también fortalecen las finanzas del club. Los patrocinios gubernamentales, las actividades aventureras y las plataformas de crowdfunding ofrecen vías adicionales de apoyo financiero. Juntas, estas iniciativas impulsan a los atletas hacia sus sueños, fomentando una cultura de inclusividad y excelencia en el deporte.

Referencia: https://whydonate.com/es/blog/ideas-de-recaudacion-de-fondos-para-clubes-deportivos/
How to deal with the issue of an uppermost area chart obscuring the lowermost scatter chart in a composite chart?
Published: 2024-04-19 07:26:16

**Question Title**
How to deal with the issue of an uppermost area chart obscuring the lowermost scatter chart in a composite chart?

**Question Description**
I have created a composite chart using VChart, which includes two sub-graphs, both of type area chart. Because the second sub-graph is plotted on top of the first one, its area covers the data points of the first sub-graph, making it impossible for the data points of the first sub-graph to trigger hover and click events. I would like to ask if there is any way to solve this problem?
The chart configuration goes as follows:
`
const spec = {
"data": [...],
"series": [
{
"id": "area",
"type": "area",
"xField": "time",
"yField": "value",
"seriesField": "groupName",
...
},
{
"id": "compare",
"type": "area",
"name": "compare",
"xField": "time",
"yField": "compareValue",
"seriesField": "groupName",
...
"interactive": {
"line": false,
"area": false
}
}
]
}

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderAsync();
`

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

**Solution**
This issue can be addressed by setting the line.interactive and area.interactive attributes of the second area chart series to false. The configuration is as follows:
`
{
"data": [...],
"series": [
{
"id": "area",
"type": "area",
"xField": "time",
"yField": "value",
"seriesField": "groupName",
...
},
{
"id": "compare",
"type": "area",
"name": "compare",
"xField": "time",
"yField": "compareValue",
"seriesField": "groupName",
...
"line":{
"interactive":false
},
"area":{
"interactive":false
},
}
]
}
`

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

This way, the second area sub-chart will not respond to interactive events, and user hover and click events can trigger the data points of the first area sub-chart through the second area sub-chart.

**Results**
By using the above configuration and rendering the chart, you will find that the lines and areas of the second sub-chart will no longer respond to mouse operations, so the hover and click of the first sub-chart can be successfully triggered.
For online effects reference: https://codesandbox.io/s/common-chart-interactive-jtmc92?file=/src/index.ts

**Related Documentation**
Related api: https://www.visactor.io/vchart/api/API/vchart
Github: https://github.com/VisActor/VChart
Should you use a standing desk?
Tags: webdev, productivity, discuss, news
Published: 2024-04-19 07:22:58

The short answer is yes because sitting at a desk for long hours each day causes stiffness in  the shoulder, hips and neck. Now of course this can be remedied through mobility work and exercise but that doesn't always guarantee total relief of pain and stiffness. Just because I said you should use a standing desk does not mean you shouldn't also use a seated desk too. Once again standing at the same position for a whole day can cause lots of stiffness in your lower back aswell as legs. The ideal position to be in when you work would be to change position every hour or so. Going from seated for an hour to then standing stops the compounding effects of staying in one position for a whole day. You will still feel some stiffness but a mobility routine would be much more likely to remedy frequent position changes rather than remaining stationary.
[](https://exerciseinsights-newsletter.beehiiv.com/subscribe)
A quick bash/zsh tip
Tags: linux, bash, zsh, opensource
Published: 2024-04-19 07:15:04

`!` is a valid character in an alias. I use it to mark aliases which run under sudo, for example on my Debian box I have:

```
alias e!="sudo ${EDITOR}"
alias a!="sudo apt"
alias s!="sudo systemctl"
alias in!="sudo apt install"
```

... and a few others.
Hire a Concrete Driveway Contractors for upgrade you garden space
Published: 2024-04-19 07:09:07

If you are looking for the best experienced [concrete driveway contractors](https://www.firstimpressionsdrivewaysandpatios.co.uk/), then you should hire first impression. We are the best in this field at providing the best results, and our experienced workers know well now about contract design. Concrete imprinted is one of the best solutions for your garden line because it is very low-cost and also stays for a long time. It means you do not need maintenance; that’s why it is the best option, according to others. So let’s upgrade your garden or home space with us and give it a chance to show our quality service.
How to create a TODO with Tailwind CSS and Alpinejs
Tags: webdev, tutorial, alpinejs, tailwindcss
Published: 2024-04-19 07:05:55

LEt's build simple TODO app with Tailwind CSS and Alpine JS.

[Read the article See it live and get the code](https://lexingtonthemes.com/tutorials/how-to-create-a-todo-with-alpine-js-and-tailwind-css/)
Marble Cladding
Tags: webdev
Published: 2024-04-19 07:04:38


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pnivztz41dilmus0kzwk.jpg)
With over 24 years of experience, we specialize in making Marble Cladding from our quarries of sandstone, slate, quartzite, limestone, and more. Our wide range offers beautiful options for indoor, outdoor, and fireplace projects. Jagson India is dedicated to quality, providing neat and classic looks for your projects directly from our quarries. Our Marble Cladding comes in different styles like dry-stone, traditional, and random ashlar tiles, giving you options in how you use it. Choose from our natural stones to customize your cladding to your liking and needs easily. Get in touch with us today. contact us: +91 9812643785 or email: info@jagsonindia.com, Visit: https://www.jagsonindia.com/natural-stone-cladding-manufacturer-supplier-in-india.php
Is Your Boss Annoying?
Tags: discuss
Published: 2024-04-19 07:00:00

What are the indicators and behaviors of an annoying boss? How can leaders adjust to create a more positive work environment?

And for those of you in management or leadership positions, reflect on your leadership style. What subtle signs do you think might indicate that you're becoming an annoying boss? 
<br>
Follow the DEVteam for more discussions and online camaraderie!
{% embed https://dev.to/devteam %}
Find missing in second array
Tags: hashtable, hashmap, hashset, arrays
Published: 2024-04-19 06:45:19

Given two arrays a of size n and b of size m, the task is to find numbers which are present in the first array, but not present in the second array.

>

** Example 1:
> Input: 
> n = 6, m = 5
> a[] = {1, 2, 3, 4, 5, 10}
> b[] = {2, 3, 1, 0, 5}
> Output: 
> 4 10
> Explanation: 
> 4 and 10 are present in first array, but not in second array.
> Example 2:
> Input: 
> n = 5, m = 5
> a[] = {4, 3, 5, 9, 11}
> b[] = {4, 9, 3, 11, 10}
> Output: 
> 5  
> Explanation: 
> Second array does not contain element 5.
> Your Task:
> This is a function problem. You don't need to take any input, as it is already accomplished by the driver code. You just need to complete the function findMissing() that takes array a, array b, integer n, and integer m as parameters and returns an array that contains the missing elements and the order of the elements should be the same as they are in array a.
> Expected Time Complexity: O(n+m).
> Expected Auxiliary Space: O(m).
> Constraints:
> 1 ≤ n, m ≤ 105
> -109 ≤ A[i], B[i] ≤ 109**

```
class Solution
{
    
    //Time :O(n +m) Space :O(m)
    ArrayList<Integer> findMissing(int a[], int b[], int n, int m)
    {
        Set<Integer> hSet=new HashSet<>();
        for(int i: b) hSet.add(i);
        
        ArrayList<Integer> ans=new ArrayList<>();
        for(int i: a) if(!hSet.contains(i)) ans.add(i);
        
        return ans;
    }
}

```
Formula Plumbing Services
Tags: plumber
Published: 2024-04-19 06:31:02

Formula Plumbing Services is family-owned and operated. We specialize in service plumbing. Our owner Joe is a Master Plumbing Contractor and has been in the industry for 24+ years. Since our founding, we’ve worked with numerous clients throughout the Tampa Bay Area. We’ve had the privilege to build a reputable client base that consists of repeat and referral business. All work guaranteed 100% satisfaction! Great service begins and ends with experienced, reliable & friendly professionals along with great customers. So if you have a problem, our [**_plumbers in Tampa_**](https://formulaplumbing.com/), FL can fix it.
What are the HTML tags which have no ends?
Published: 2024-04-19 06:30:33

HTML tags that have no end tag are called "self-closing" or "void" elements. These elements don't have any content and are closed immediately with a slash ("/>") in XHTML or are left unclosed in HTML5.

Here are some examples of self-closing HTML tags:

<img>: Used to embed images.
<input>: Used to create input fields in forms.
<br>: Used for line breaks.
<meta>: Used to provide metadata about the HTML document.
<link>: Used to link external resources like stylesheets.
These tags are self-contained and do not require closing tags because they don't contain any content. They're simply used to define certain elements or provide metadata within the HTML document.
Buy Cenforce Online
Published: 2024-04-19 06:24:08

[Cenforce](https://www.wisemedz.com/cenforce-tablets.htm
) is a medication used to treat erectile dysfunction (ED), also known as impotence, in men. It is manufactured by Centurion Laboratories in India and is available in various strengths, including 25mg, 50mg, 100mg, 150mg, and 200mg tablets. The active ingredient in Cenforce is sildenafil citrate, which works by relaxing the muscles in the blood vessels of the penis, allowing for increased blood flow during sexual stimulation.
How does Cenforce work?
[Cenforce 100](https://www.wisemedz.com/cenforce-100-tablets.htm
) works by inhibiting the enzyme phosphodiesterase type 5 (PDE5), which is responsible for breaking down a substance called cyclic guanosine monophosphate (cGMP) in the body. cGMP is involved in the relaxation of smooth muscle cells, which line the blood vessels in the penis. By inhibiting PDE5 and increasing levels of cGMP, Cenforce helps to relax the blood vessels and increase blood flow to the penis, resulting in an erection when sexually stimulated.
Benefits of using Cenforce
Helps treat erectile dysfunction
Improves sexual performance
Increases confidence and self-esteem
Easy to use and available in various strengths
How to use Cenforce
[Cenforce 150](https://www.wisemedz.com/cenforce-150-tablets.htm
) should be taken orally with a full glass of water, approximately 30 minutes to 1 hour before sexual activity. It can be taken with or without food, but it may take longer to work if taken with a high-fat meal. The recommended starting dose of Cenforce is 50mg, but your doctor may adjust the dose based on your response to the medication.
Side effects of Cenforce
Common side effects of [Cenforce 200](https://www.wisemedz.com/cenforce-200-tablets.htm
) may include headache, flushing, indigestion, nasal congestion, dizziness, and vision changes. These side effects are usually mild and temporary, but if they persist or worsen, you should consult your doctor. In rare cases, Cenforce may cause more serious side effects, such as priapism (a prolonged and painful erection), sudden vision loss, or hearing loss. If you experience any of these side effects, seek medical attention immediately.
Precautions and warnings
Before taking Cenforce, you should inform your doctor if you have any underlying medical conditions, such as heart disease, high or low blood pressure, liver or kidney disease, or if you are taking any other medications. Cenforce should not be taken with certain medications, such as nitrates or alpha-blockers, as this may cause a sudden drop in blood pressure. It is also important to avoid alcohol while taking Cenforce, as it can increase the risk of side effects.
How To Use Fildena?
Published: 2024-04-19 06:22:45

[Fildena](https://www.wisemedz.com/fildena-tablets.htm
) is a phosphodiesterase type 5 (PDE5) inhibitor. It works by increasing blood flow to the penis during sexual stimulation. This helps men achieve and maintain an erection.
Uses of Fildena
[Fildena 100](https://www.wisemedz.com/fildena-100-tablets.htm
) is primarily used to treat ED, also known as impotence, in men. It is not intended for use by women or children under 18 years of age.
Dosage
The recommended dosage of [Fildena 150](https://www.wisemedz.com/fildena-extra-power-150-tablets.htm
) is 150mg taken as needed, approximately 1 hour before sexual activity. Depending on the effectiveness and tolerability, the dose may be increased to a maximum recommended dose of 100mg or decreased to 25mg.
Side Effects
Like all medications, [Fildena 200](https://www.wisemedz.com/fildena-double-200-tablets.htm
) can cause side effects. Common side effects may include headache, flushing, indigestion, nasal congestion, dizziness, or blurred vision. These side effects are usually mild and temporary.
Precautions
Before taking Fildena, it's important to discuss your medical history with your healthcare provider, especially if you have a history of heart problems, stroke, liver or kidney disease, or if you are taking other medications.
Conclusion
Fildena is a safe and effective medication for the treatment of ED. It is important to follow the recommended dosage and precautions to minimize the risk of side effects. If you experience any severe or persistent side effects, contact your healthcare provider immediately.