SQL.zip

SQL to Select a random row from a database table

533

There are lots of ways to select a random record or row from a database table.Here are some example SQL statements that don't require additional application logic,but each database server requires different SQL syntax.Select a random row with MySQL:Select ...

The Ultimate Data Engineering Roadmap

The Ultimate Data Engineering Roadmap

1,069

Below is from Alex Xu.The Data Engineering RoadmapData engineering has become the backbone of effective data analysis.It involves managing,processing,and optimizing data to derive actionable insights.Here’s a roadmap that can help you get better at data e...

Setting TQuery SQL Statement

12,152

This source code sets the SQL String in Query1.As it fits on one line we just use SQL[0].The SQL statement finds all the fields from the Article table where the user_id field is equal to a varaible Text value dbtUser.Text.A better way would be to use Param...

REST API Vs. GraphQL

REST API Vs. GraphQL

408

GraphQL offers several advantages over REST APIs,including fetching only the data a client needs,reducing over-fetching and under-fetching issues prevalent in REST.This leads to improved performance,especially on mobile devices with limited bandwidth.Graph...

Nine Types of Testing while we develop APIs

Nine Types of Testing while we develop APIs

510

Implementing APIs can present a variety of challenges across different phases of the development lifecycle.Here's a breakdown of common test challenges:1.Design and Planning Phase::Defining Clear Requirements: Ambiguous or poorly defined requirements lead ...

A Python script to create an EC2 Spot instance using boto3

1,596

How do you create EC2 Spot InstanceA Python script to create an EC2 Spot instance using boto3.The script launches a spot instance based on an AMI,associates it with a specific security group in a given VPC,and assigns custom tags for easy identification.Pr...

MLOps Explained: Spark, Flink, and Reference Architecture Deep Dive

MLOps Explained: Spark, Flink, and Reference Architecture Deep Dive

236

MLOps (Machine Learning Operations)MLOps is a set of practices that aims to deploy and maintain machine learning models in production reliably and efficiently.It bridges the gap between machine learning development (ML Dev) and operations (Ops),similar to ...

How to Set Up and Deploy Containerized Applications with AWS ECS

10,671

Setting up an Amazon Web Services (AWS) Elastic Container Service (ECS) involves several steps to deploy containerized applications in a scalable and managed environment.AWS ECS supports Docker containers and allows you to run applications on a managed clu...

Power of Containerized Deployment with AWS ECS

Power of Containerized Deployment with AWS ECS

10,594

Have you ever wanted to streamline how you develop and deploy applications? Amazon Elastic Container Service (ECS) could be the game-changer you're looking for.This service allows developers to manage Docker containers on a highly scalable and secure platf...

Uvicorn, Gunicorn: Proving Your Production Prowess

Uvicorn, Gunicorn: Proving Your Production Prowess

394

If you've heard of uvicorn,you know Docker.If you've heard of gunicorn,you've served at a production level.Do you agree?. uvicorn vs.gunicorn: The Core Difference:uvicorn: An HTTP server primarily designed for Ruby applications (using the Rack interface).I...

Stateful Databases: A Deep Dive with Cassandra & TiDB

Stateful Databases: A Deep Dive with Cassandra & TiDB

185

What is a Stateful Database?A stateful database is a type of database system that retains information about past interactions or states and uses this information to process subsequent requests.In essence,it remembers the "state" of the data over time.This ...

How To Check If Your Printer Is Connected Using C#

1,024

This code will test whether a printer is connected to your system or not. It works with USB and network printers (haven't tested LPT printers yet). Some printers (like my HP DeskJet 930c) is detected online even though I press the OFF b...

Where to get AWS Access Key ?

11,259

If you have an Amazon Web Service (AWS) Acount, you can get Access Key as below. [Account] –> [Security Credentials] –> [Access Credentials] For security reason, Access Key should NOT be shared with anyone.

How to get process id in C# like windows task manager ?

864

Following is simple example to get process name and add process name to listbox control.As you can see below, you can get working process by Process control. But most of the properties are supported on windows platform. If you want to access the similar pr...

How to convert integer to text string ?

695

C# provides an excellerent static instance can convert various types. You can easily get the wanted reult by Convert Class. Because It's a static instance, you don't need to declare instance.Following is the example to example to convert from integer to te...

How to convert text string to integer ?

608

C# provides an excellerent static instance can convert various types. You can easily get the wanted reult by Convert Class. Because It's a static instance, you don't need to declare instance.Following is the example to example to convert from text string t...

How to resize and save PNG or Jpeg Image file ?

629

The PictureBox control in C# is a visual element that allows you to display images within your application's user interface.It's a versatile tool for displaying images,icons,graphics,and other visual content,and it can be easily manipulated using propertie...

How to convert bitmap image to jpeg image ?

352

C# provides easy interface to convert image.Following is the simple example.using System.Drawing.Imaging;...Image image = Image.FromFile("test.bmp");image.Save("test.jpg", ImageFormat.Jpeg);Above is PNG to jpeg. You can convert Jpeg to PNG as following.usi...

To load image from file

445

The `Image.FromFile` method in C# is used to load an image from a specified file path into an `Image` object.It takes a string argument representing the full path to the image file and returns a new `Image` object containing the loaded image data.This meth...

How to speed up access to the RichTextBox Lines property

825

Using a foreach loop will be substantially faster than a for loop when accessing the items in a RichTextBox's Lines property. For example, the following code loads a RichTextBox with 1000 lines of text and accesses each line from the Lines property. On a 3...

How to restrict a program to a single instance

726

In the program's Main method,call ProcessUtils.ThisProcessIsAlreadyRunning() to determine if another instance of the program is already running.ThisProcessIsAlreadyRunning attempts to create a Mutex object with the same name as the program (Application.Pro...

Graphics in C# - Irregular Forms

904

Quite frankly, I think this topic is a lot of fun...the thought of making an app look completely different from the usual rectangular-formed layout really appeals to me.Drawing an irregular form, like drawing anything, requires four things : a surface, a s...

Extracting the Country from IP Address

463

Notes: If you want to run this sample,you should copy the Ip address to driver c:. Using the codePart 1.using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows....

How To Print Text In C#

453

If you want to use MultipadPrintDocument in your own code,it's best to rename the class and its constructor to something more appropriate.Then add a variable of type XXXPrintDocument to your form and implement the menu items as follows: .

How to send binary data through C# CGI app?

992

Following example implemented binary data downloading. If you are using Apache and wanna test it just put the EXE in the cgi-bin folder under Apache's directory.Also note that the parameters are static just for this example.