Create an Excel file in C# without Microsoft Office or Third party plugins

posted in: ASP.NET, C#, Programming, VB.Net, XML 0

How to create an Excel file (XLS / XLSX) in C# without having a copy of Microsoft Office on the server, or other third party plugins installed

How to parse and process HTML/XML in PHP

Simple HTML DOM is a great open-source parser: simplehtmldom.sourceforge It treats DOM elements in an object-oriented way, and the new iteration has a lot of coverage for non-compliant code. There are also some great functions like you’d see in JavaScript, … Read More

Access a variable declared in a phtml from another phtml in Magento2

posted in: Design, HTML, PHP, Programming, XML 0

Having two blocks in the catalog_product_view.xml file like this: To access a variable declared in the first block from the second block, you can set the variable with register from the first phtml, then you get the value in the … Read More

Single line “if” statement in VBScript (like in C# or PHP)

posted in: Classic ASP, Programming, VBScript 0

The “single line if statement” exists in C# and VB.NET as in many other programming and script languages in the following format The conditional ternary operator doesn’t exist out of the box, but it’s pretty easy to create your own … Read More

Render a Section in a Partial View – ASP.Net MVC

posted in: ASP.NET, HTML, Programming, VB.Net 0

Let’s start with the following configuration to give an example: in a MVC project, you have a “_Layout.vbhtml” file with this code Then, you have a Partial View “ValidationScripts.vbhtml” in the Shared folder with If you call the Partial View … Read More

Set “top,left” of an element with the position relative to the parent in jQuery

posted in: CSS, Design, Javascript, jQuery, Programming 0

The .offset([coordinates]) method set the coordinates of an element but only relative to the document. Then how can we set coordinates of an element but relative to the parent? The.position() method get only “top,left” values relative to the parent, but … Read More

Resize an image with the same aspect ratio or with custom and crop sizes in PHP

posted in: PHP, Programming 0

In this article, I will explain how to resize an image in two different ways resizing with custom dimensions keeping the same proportions/aspect ratio Method 1: Resizing with custom dimensions The most practical method in PHP to resize an image … Read More

1 2 3 4