Code snippets

Code snippets for various programming languages/frameworks.

rss_feed Subscribe RSS

local_offer C#

visibility 5
thumb_up 0
access_time 4 days ago

C# regular expressions can be used to match and replace certain text patterns from a string variable. The following regular expression can be used to remove all heading tags incl. h1 to h9 from HTML text string. <[hH][1-9][^>]*>[^<]*</[hH][1-9]\s*> var html = "Your HTML ...

local_offer teradata local_offer SQL local_offer teradata-functions

visibility 24
thumb_up 0
access_time 3 months ago

The following code snippets show how to use round numbers to hundreds or thousands in Teradata.  warning Alert - The following code snippets are used to round to the smallest hundreds or thousands that is equal or greater than the input number.  FLOOR and CEILING fun ctions In ...

local_offer teradata local_offer SQL local_offer teradata-functions

visibility 72
thumb_up 0
access_time 3 months ago

In article   Teradata SQL - Use OREPLACE to Replace or Remove Characters , it shows how to use OREPLACE function in Teradata to replace or remove strings. This page will show one more alternative way of doing that using regular expressions. select oreplace('Kontext is a website for data ...

local_offer teradata local_offer SQL local_offer teradata-functions

visibility 131
thumb_up 0
access_time 3 months ago

This page shows how to trim or remove leading or/and trailing zeros using Teradata SQL.

local_offer teradata local_offer SQL

visibility 140
thumb_up 0
access_time 6 months ago

In SQL Server, we can use TRUNCATE statement to clear all the records in a table and it usually performs better compared with DELETE statements as no transaction log for each individual row deletion. The syntax looks like the following: TRUNCATE TABLE { database_name.schema_name.table_name | ...

local_offer teradata local_offer SQL local_offer teradata-functions

visibility 797
thumb_up 0
access_time 6 months ago

OREPLACE functions in Teradata can be used to replace or remove characters from a string. OREPACE is Teradata's extension to ASNI SQL. The usual REPLACE function is not available. REPLACE function is commonly implemented in many other SQL databases such as SQL Server, MySQL, BigQuery, Oracle, etc.

Pandas DataFrame Plot - Scatter and Hexbin Chart

local_offer plot local_offer pandas local_offer jupyter-notebook local_offer python local_offer pandas-plot

visibility 124
thumb_up 0
access_time 6 months ago

 In this article I'm going to show you some examples about plotting scatter and hexbin chart with Pandas DataFrame. I'm using Jupyter Notebook as IDE/code execution environment.  Hexbin chart is a pcolor of a 2-D histogram with hexagonal cell and can be more informative compared ...

Pandas DataFrame Plot - Area Chart

local_offer plot local_offer jupyter-notebook local_offer python local_offer pandas local_offer pandas-plot

visibility 134
thumb_up 0
access_time 6 months ago

This article provides examples about plotting area chart using  pandas.DataFrame.plot  or  pandas.core.groupby.DataFrameGroupBy.plot   function. The data I'm going to use is the same as the other article  Pandas DataFrame Plot - Bar Chart . I'm also using Jupyter ...

Pandas DataFrame Plot - Pie Chart

local_offer plot local_offer pandas local_offer jupyter-notebook local_offer python local_offer pandas-plot

visibility 3177
thumb_up 0
access_time 6 months ago

This article provides examples about plotting pie chart using  pandas.DataFrame.plot  function. The data I'm going to use is the same as the other article  Pandas DataFrame Plot - Bar Chart . I'm also using Jupyter Notebook to plot them. The DataFrame has 9 records: DATE TYPE ...