Browsed by
Author: Tèng

Detect pivot table in Microsoft Excel using Interop c#

Detect pivot table in Microsoft Excel using Interop c#

Here is some code for reference. Identify the overall Range occupied by PivotTables in the sheet and validate whether the cell is a part of the Range.

For refresh pivot table:

 

Property Design

Property Design

Although properties are technically very similar to methods, they are quite different in terms of their usage scenarios. They should be seen as smart fields. They have the calling syntax of fields, and the flexibility of methods. ✓ DO create get-only properties if the caller should not be able to change the value of the property. Keep in mind that if the type of the property is a mutable reference type, the property value can be changed even if the property…

Read More Read More

Data consistency in Rails: Understanding the different between transaction and locking

Data consistency in Rails: Understanding the different between transaction and locking

Source Tất cả bắt nguồn từ bài post này của bên Grokking VietNam. Đại ý của bài viết như sau: Một ứng dụng chuyển tiền của ngân hàng có một đoạn code như dưới đây:

Ứng dụng chạy một thời gian thì có bug là tài khoản của một vài người dùng bị âm tiền. Vấn đề ở đây là gì và cách giải quyết. Mới đầu khi đọc bài viết tôi cũng thấy hơi khó hiểu khi đoạn code trên về…

Read More Read More

CONNECT BY basics

CONNECT BY basics

Source It builds a hierarchical query. There are 2 components to is: “start with” — this identifies all LEVEL=1 nodes in the tree “connect by” — describes how to walk from the parent nodes above to their children and their childrens children. Easiest to use an example on emp. If we start with “where mgr is NULL”, we generate the set of employees that have no mgr (they are the top of the tree). If we CONNECT BY PRIOR EMPNO…

Read More Read More

Bulk Processing with BULK COLLECT and FORALL

Bulk Processing with BULK COLLECT and FORALL

Source: https://blogs.oracle.com/oraclemagazine/bulk-processing-with-bulk-collect-and-forall In the previous article in this series, I introduced readers to PL/SQL collections. These data structures come in very handy when implementing algorithms that manipulate lists of program data, but they are also key elements in some of the powerful performance optimization features in PL/SQL. In this article, I will cover the two most important of these features: BULK COLLECT and FORALL. BULK COLLECT: SELECT statements that retrieve multiple rows with a single fetch, improving the speed of data…

Read More Read More

Export Crystal Reports to PDF in C#

Export Crystal Reports to PDF in C#

Source: https://www.c-sharpcorner.com/UploadFile/26b237/export-crystal-report-to-pdf-in-C-Sharp/ When you want to export your Crystal Reports report to PDF format or any other format, this article provides guidance for exporting the Crystal Reports report to PDF format. In this we can use ExportOptions for exporting the Crystal Reports report to PDF format. In the following example you can see how to export a Crystal Reports report as a PDF format file in C#. If you read my first article then it’s easy to understand this example, if…

Read More Read More

How to eliminate blank rows while exporting to Excel?

How to eliminate blank rows while exporting to Excel?

align to top arrange lines The first align to top: Select all fields on the row, right click, align to top move the selection to the top of details section (no space between the details section and the section above remove remaining space at the bottom of the details section The second: right click details click on arrange lines right click details again click on fit section This solved the issue for me. Sometimes only the first part is necesarry.

Git for Windows with TFS and SSL behind a proxy

Git for Windows with TFS and SSL behind a proxy

If you run your TFS on prem and use git for windows you may run into two issues. The first occurs if you use SSL for your TFS. The second occurs if you are behind a proxy. Use Git for Windows with a corporate SSL certificate If you have a corporate SSL certificate and want to clone your repo from the console or VSCode you get the following error: fatal: unable to access ‘https://myserver/tfs/DefaultCollection/_git/Proj/’: SSL certificate problem: unable to get…

Read More Read More

C# type

C# type

C# Type .Net Framework (System) type Signed? Bytes Occupied Possible Values sbyte System.Sbyte Yes 1 -128 to 127 short System.Int16 Yes 2 -32768 to 32767 int System.Int32 Yes 4 -2147483648 to 2147483647 long System.Int64 Yes 8 -9223372036854775808 to 9223372036854775807 byte System.Byte No 1 0 to 255 ushort System.Uint16 No 2 0 to 65535 uint System.UInt32 No 4 0 to 4294967295 ulong System.Uint64 No 8 0 to 18446744073709551615 float System.Single Yes 4 Approximately ±1.5 x 10-45 to ±3.4 x 1038 with 7 significant…

Read More Read More

How to: Upload Files with FTP

How to: Upload Files with FTP

This sample shows how to upload a file to an FTP server. Example C#

Compiling the Code