teleren/devto huggingface dataset:
AntDB-Oracle Compatibility Developer’s Manual P3–45
Published: 2023-09-12 05:16:15

##### TRUNC

The TRUNC function returns a date type value truncated according to the specified template pattern. If no template pattern is used, then the date is truncated to the nearest day to it. The following table shows the template patterns allowed by the TRUNC function.

| Mode| Description
|----------|----------
| CC, SCC| Return to January 1, in cc01 cc is the first two digits of the year
| SYYY, YYYY, YEAR, SYEAR, YYY, YY, Y| Return to January 1, yyyy is a given year
| IYYY, IYY, IY, I| Returns the start date that contains the ISO year for the given date
| Q| Returns the first day of the quarter containing the given date.
| MONTH, MON, MM,RM| Returns the first day of the given month.
| WW| Returns the first day of the week in which the current date falls, with January 1 of each year being the first day of the first week.
| IW| Returns the Monday of the ISO week containing the given date.
| W| Returns the first day of the week in which the current date falls, with the first day of the month being the first day of the week.
| DDD, DD, J| Returns the start time of the specified date.
| DAY, DY, D| Returns the start time of the week (from Sunday), including the date given.
| HH, HH12, HH24| Returns hour. 
| MI| Returns minute. 

Here are some examples of how to use the TRUNC function.

The following example truncates the date forward to the start date of the century in which the date is located.

```
SELECT TO_CHAR(TRUNC(TO_DATE('1951','YYYY'),'CC'),'DD-MON-YYYY') "Century" FROM DUAL;

   Century   
-------------
 01-JAN-1901
(1 row)
```

The following example truncates the date to the start of the year in the date.

```
SELECT TO_CHAR(TRUNC(TO_DATE('01-JUL-1999','DD-MON-YYYY'),'Y'),'DD-MON-YYYY') "Year" FROM DUAL;

    Year     
-------------
 01-JAN-1999
(1 row)
```

The following example truncates the date to the start of the ISO year.

```
SELECT TO_CHAR(TRUNC(TO_DATE('01-JUL-2004','DD-MON-YYYY'),'IYYY'),'DD-MON-YYYY') "ISO Year" FROM DUAL;

  ISO Year   
-------------
 29-DEC-2003
(1 row)
```
Motion - Tailwind CSS Template Builder
Tags: webdev, tailwindcss, css, lowcode
Published: 2023-09-12 05:10:45

Hi everyone!

We recently launched a new theme to Loopple, a Drag & Drop Website Template Builder for Tailwind CSS that aims to help developers to speed up their development process.

Motion is built on top of Tailwind CSS and has the following features 50+ components included (more coming soon).

Links:

- [Motion Landing Library Builder](https://www.loopple.com/theme/motion-landing-library)
- [Motion Landing Library Builder - Sections/Components](https://www.loopple.com/components/tailwind/category/motion-landing-library)
- [More Tailwind Builders](https://www.loopple.com/tailwind)
- [Loopple](https://www.loopple.com/) - Loopple website

Any feedback is really helpfull and highly appreciated!

Thank you!
In React, You Don't Need To Start Your Component Name With Capital First Letter
Tags: javascript, react, codenewbie
Published: 2023-09-12 05:05:56

{% embed https://www.youtube.com/watch?v=02NHq5EFwCI %}

In React, we always start the component name with capital first letter.

But you don't have to do that.

**This is also a popular React interview question.**

So I have published a YouTube video explaining the same.

In this video, you will learn:

✅ Why do we start the component name with a capital first letter

✅ What will happen when we don't start the component name with a capital first letter

✅ Behind the scene generated code when we start or don't start the component name with a capital first letter

✅ Why you don't need to start the component name with a capital first letter

and much more...

## Closing Points

If you're looking to enhance your skills in JavaScript, React, and Node.js with the MERN stack, then my [YouTube Channel](https://www.youtube.com/@codingmastery_dev) is the perfect resource for you.

The videos in this channel cover a range of topics related to JavaScript, React, and Node.js, including tutorials, code walkthroughs, tips and tricks, best practices, and much more.

Whether you're a beginner or an experienced developer, our content is tailored to help you learn and grow.

You can take a look at the below playlists also.

* [Master ES6 Features](https://www.youtube.com/watch?v=l83AlOG3elw&list=PLSJnlFr3D-mGIHFpo80ylsaBErtueSpYS)

* [Beginners Guide To React](https://www.youtube.com/watch?v=aQ0ZcY5N8vw&list=PLSJnlFr3D-mEUWnAwAtjDFPDLPt-Ene4T)

* [Learn React Concepts](https://www.youtube.com/watch?v=tkVqm4VdpJA&list=PLSJnlFr3D-mFm7-cdhnHdBvUdxUp-a9HL)

* [How to Build Unsplash Image Search App Using React](https://www.youtube.com/watch?v=0YoT44j3Jg4) 

* [Express JS + MongoDB Crash Course](https://www.youtube.com/watch?v=GDe8DFZcgoI&list=PLSJnlFr3D-mEn4JLpA4F7UCAX_e5Nmx3q)
    
* [Learn Latest Webpack For Production](https://www.youtube.com/watch?v=ILcb7BD9R90&list=PLSJnlFr3D-mEBWnL0XGa_hpGyiXoI_BIN)
    
* [Redux Toolkit Crash Course](https://www.youtube.com/watch?v=ha2Fh4Vi7xo&list=PLSJnlFr3D-mEmCOE1mjlnsr1A8t5Zrmub)

**If you found this article and video useful, don't forget to subscribe to my [YouTube Channel](https://www.youtube.com/@codingmastery_dev) and hit the bell icon so you will not miss any future video notifications.**

------

**Want to stay up to date with regular content regarding JavaScript, React, Node.js?** [**Follow me on LinkedIn**](https://www.linkedin.com/in/yogesh-chavan97/)**.**
How to set up Fathom Analytics with Next.js app router
Tags: nextjs, react, usefathom, analytics
Published: 2023-09-12 04:50:34

This guide explains how to integrate Fathom Analytics with the new Next.js App Router. If you want to integrate Fathom Analytics with the Page Router, you can refer to the [Vercel guide](https://vercel.com/guides/deploying-nextjs-using-fathom-analytics-with-vercel).

## Create a Fathom Account

To get started with Fathom Analytics, you'll first need to create a Fathom account. If you haven't already, you can sign up for an account [here]((https://app.usefathom.com/register)). After signing up, make sure to add a website to your Fathom account to obtain the site ID you'll need for integration

## Install `fathom-client` library

**fathom-client** is a javascript library for Fathom Analytics which offers asynchronous loading and importable functions

```bash
npm install fathom-client
```

## Add Fathom into Your Next.js App Router

Once you've installed fathom client and also assuming that you've setup nextjs app with app router.

```ts
// Fathom.tsx

'use client';
import { useEffect } from 'react';
import { load, trackGoal, trackPageview } from 'fathom-client';
import { usePathname, useSearchParams } from 'next/navigation';

export default function Fathom() {
  const pathname = usePathname();
  const searchParams = useSearchParams();

  useEffect(() => {
    // Initialize Fathom when the app loads
    // Example: yourdomain.com
    //  - Do not include https://
    //  - This must be an exact match of your domain.
    //  - If you're using www. for your domain, make sure you include that here.
    load('YourSiteId', {
      includedDomains: ['yourDomain.com'],
      spa: 'auto',
      // skips automatically tracking page views on script load
      auto: false,
    });

    trackPageview();

    // Record a pageview when route changes
  }, [pathname, searchParams]);

  return null;
}
```

Note the `'use client'` directive at the beginning of the file. This directive is required for Next.js 13 since the useEffect hook is marked as a client-only hook.

Then you can import the file in your layout component

```ts
// app/layout.tsx

import './globals.css';
import { Inter } from 'next/font/google';
import { ReactNode } from 'react';

import Fathom from './Fathom';

const inter = Inter({
  subsets: ['latin'],
});

export default function RootLayout({ children }: { children: ReactNode }) {
  return (
    <html lang='en' className={inter.className}>
      <body>
        {children}
        <Fathom /> // add your component
      </body>
    </html>
  );
}
```

That would be it, by following this you should be able to integrate Fathom with your Next.js application that uses the new app router.

Start tracking 👋
Spazio Bianco – SaaS Multipage theme.
Tags: astro, tailwindcss, webdev, design
Published: 2023-09-12 04:46:04


Spazio Bianco – SaaS Multipage theme. 
Built with Astro & Tailwind CSS

Includes:
- Pages 40+
- Sections 100+
- Components 100+

See it live and learn more about Spazio Bianco:
https://lexingtonthemes.com/info/spaziobianco/



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2cpj0gjvv7tkc6mtbrsu.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2r63q4um0fmo9a83uz5h.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/urrdc1dphgiw3qs1lsa8.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cxonidk1nacvbi2bcji2.png)
Automatic and manual theme changes in a simple way
Tags: webdev, beginners, css, themes
Published: 2023-09-12 04:45:18

The ability to change themes manually; and automatically update according to the system is a necessary requirement of any modern website or application. Here's a simple way to implement this using CSS:
[Look at this repo for reference.](https://github.com/shravzzv/Automatic-and-manual-theme-change)

This project utilizes **CSS variables** and **JavaScript** to achieve theme switching functionality:

The JavaScript code toggles a class `changed` on the `root` element based on the button click. This makes the manual theme change possible.

The app responds to the system's color scheme preference using the `prefers-color-scheme` media query. This makes the automatic theme change possible.

The CSS variables (`--base-text-clr`, `--base-bg-clr`) define the colors for both light and dark themes.

```css
* {
  box-sizing: border-box;
}

:root {
  --base-text-clr: black;
  --base-bg-clr: white;
}

:root.changed {
  --base-text-clr: white;
  --base-bg-clr: #212121;
}

body {
  margin: 0;
  padding: 2em;
  font-family: sans-serif;
  color: var(--base-text-clr);
  background-color: var(--base-bg-clr);
}

@media (prefers-color-scheme: dark) {
  :root {
    --base-text-clr: white;
    --base-bg-clr: #212121;
  }

  :root.changed {
    --base-text-clr: black;
    --base-bg-clr: white;
  }
}
```

```html
<body>
    <h1>You are now viewing this page in the <code></code> theme</h1>
    <p>Illo, sunt provident corrupti veniam est animi velit?</p>
    <button type="button">Toggle theme</button>
  </body>

```
And here's the script that adds an event listener to the button to allow for manual theme changes:

```js
const buttonEl = document.querySelector('button')
const rootEl = document.documentElement
const themeTextEl = document.querySelector('code')

let isThemeInverse = false
if (
  window.matchMedia &&
  window.matchMedia('(prefers-color-scheme: dark)').matches
) {
  themeTextEl.innerText = 'dark'
} else {
  themeTextEl.innerText = 'light'
}

const handleThemeChange = (e) => {
  rootEl.classList.toggle('changed')
  isThemeInverse = !isThemeInverse
  updateThemeText()
}

const updateThemeText = () => {
  if (themeTextEl.innerText === 'dark') {
    themeTextEl.innerText = 'light'
  } else if (themeTextEl.innerText === 'light') {
    themeTextEl.innerText = 'dark'
  }
}

buttonEl.addEventListener('click', handleThemeChange)
```
That it! Look at the live version [here](https://shravzzv.github.io/Automatic-and-manual-theme-change/).

> This may not be the best way to implement theme changes. Use it with discretion. Please do tell if you have better ways in the comments. 

Thank you for reading.
Python dashboard
Published: 2023-09-12 04:00:00

A dashboard attempt

```python
import random
import pandas as pd
import numpy as np
from bokeh.plotting import figure, output_notebook, show
from bokeh.models import ColumnDataSource
from bokeh.layouts import gridplot
from IPython.display import HTML, display

# Generate random data for 10 different plots
data = {
    "scatter": {
        "x": [random.random() for _ in range(100)],
        "y": [random.random() for _ in range(100)],
        "color": [random.choice(["red", "green", "blue"]) for _ in range(100)],
    },
    "line": {
        "x": [i for i in range(100)],
        "y": [random.random() for _ in range(100)],
    },
    "histogram": {
        "values": [random.gauss(0, 1) for _ in range(1000)],
    },
    "pie": {
        "values": [random.randint(1, 10) for _ in range(5)],
        "labels": [f"Label {i+1}" for i in range(5)],
    },
    # Add more types of plots here...
}

# Create DataFrames and ColumnDataSources for each plot
sources = {plot_type: ColumnDataSource(pd.DataFrame(d)) for plot_type, d in data.items()}

# Create a list of figures for each plot
plots = []
for plot_type, source in sources.items():
    p = figure(
        x_axis_label="x",
        y_axis_label="y",
        title=f"{plot_type.capitalize()} Plot",
        width=300,
        height=250,
        toolbar_location=None,  # Hide the default toolbar
    )
    
    if plot_type == "scatter":
        p.circle(
            x="x",
            y="y",
            color="color",
            legend_field="color",
            size=8,
            source=source,
        )
    elif plot_type == "line":
        p.line(
            x="x",
            y="y",
            source=source,
            line_width=2,
        )
    elif plot_type == "histogram":
        hist, edges = np.histogram(source.data["values"], bins=20)
        p.quad(top=hist, bottom=0, left=edges[:-1], right=edges[1:], fill_color="blue", line_color="white", alpha=0.7)
    elif plot_type == "pie":
        p.wedge(
            x=0,
            y=0,
            radius=0.4,
            start_angle=0,
            end_angle="values",
            line_color="white",
            source=source,
            legend_field="labels",
        )
    
    p.title.align = "center"
    p.title.text_font_size = "16pt"
    p.xaxis.axis_label_text_font_size = "12pt"
    p.yaxis.axis_label_text_font_size = "12pt"
    
    plots.append(p)

# Create a grid layout
layout = gridplot([plots[:3], plots[3:6], plots[6:]])

# Output the plots directly into the Colab notebook
output_notebook()
handle = show(layout, notebook_handle=True)
display(HTML("<p style='text-align: center;'>EDA Dashboard</p>"), display_id="dashboard")
display(handle)
```
Build the DevOps Toolchain for Maximum Automation
Tags: devopstoolchain, devops
Published: 2023-09-12 04:17:45

Are you looking to streamline your DevOps toolchain and maximize automation for faster and more efficient software delivery? Look no further! InfraCloud, trusted by leading companies, offers expert services to help you build and optimize your DevOps toolchain.

## Why Build or Optimize your DevOps Toolchain?

- Workflow Automation: Streamline your processes with automation.
- Fine Tuning Incident Management: Enhance incident response.
- Innovate Better & Faster: Accelerate product development.
- Quality Assurance: Ensure top-notch quality.
- Resolve Product Defects: Address issues efficiently.
- Improved & Efficient Deployments: Optimize deployment workflows.

## Your DevOps Toolchain Service Provider

Our DevOps toolchain experts combine the best tools, eliminating bottlenecks; boosting your team’s productivity.

**Tools Analysis**

Our Devops toolchain experts analyze your current system, the time each step takes, and what the accuracy is, and identify loopholes to bridge the Dev + Ops gap.

**Build the DevOps Process**

As a DevOps toolchain service provider, we help you identify the right tools, set things up properly (installing and configuring the tools) for people, data, and tools to work together seamlessly.

**DevOps Toolset Training**

Devops toolchain industry experts to help your team to upskill in the DevOps techs to enable faster and more efficient product delivery and innovation.

**DevOps Managed Services**

Our DevOps managed service frees you from toolchain management, training requirements, and ongoing monitoring so you can focus on innovation.

## Why Choose InfraCloud as your DevOps Toolchain Experts?

- Certified Developers: Kubernetes and cloud-certified experts.
- Domain Expertise: 100+ clients' best practices.
- First Mover Advantage: Leading Kubernetes partner in APAC.
- Cloud Native Evangelism: Advocates for container and Kubernetes technologies.
- CNCF Certified Provider: Proud CNCF Silver Member and KCSP.
- Expand Easily: Scalable engineering team.

## Ready to Transform your DevOps Toolchain?

[Schedule a call with one of our experts to understand how we help you bring the most promising devops toolchain automation to your team.
](https://www.infracloud.io/build-devops-toolchain/)
How would leaders contribute to contious delivery ?
Tags: leadership, continuousdelivery
Published: 2023-09-12 04:15:26

Well 99% Teams does what is asked by the leader or organisation.

Being a leader you have asked let's do continuous delivery. Well Team start's doing it by 

1. 
Dev team starts creating pipline's which as various set of robust tasks 
which builds, runs tests and ships changes till Live environment with minimal fusss.

2. Further more if the teams understands it's not about just shipping code, it's more to ship features that will deliver value in a continuous manner . Team and the product manager starts splitting the bulky project into releasable value realised features and delivers continuously.

Well what does a leader or leadership vertical contributes to the continuous delivery? 

Here are few answers that I realised since team does what leader asks.


1. Start asking what feature will be released instead just aksing whether we will be able to meet the set deadline.

2. Involve and guide the team to identify features which delivers value continuously.

3. Convey the shift in  mindset to stakeholders and look out for smaller releases.

4. Ensure value is realised instead of just mere a code which sits behind feature flag.
Kubernetes Backup & Recovery Services
Tags: k8s, kubernetes, kubernetesbackup, kubernetesrecovery
Published: 2023-09-12 04:08:17

Discover how InfraCloud's Kubernetes Backup & Recovery Services can help businesses ensure cloud-native data protection and disaster recovery, whether in the cloud, on-premises, or data centers. Trusted by leading companies, our services are designed to address the critical need for Kubernetes data security and continuity.

## Why Kubernetes Backup and Disaster Recovery is Essential

- Accidental or Malicious Data Loss: Protect against unintentional or malicious data loss.
- Infrastructure or Hardware Failure: Safeguard your Kubernetes infrastructure from hardware failures.
- Application Misconfiguration: Mitigate risks stemming from application misconfigurations.
- Compliance Audit Environment: Ensure compliance in your Kubernetes environment.

## Your 360° Data Protection with Kubernetes Backup & Recovery Services

Our Kubernetes disaster and recovery consulting services provide you end-to-end data protection

**Kubernetes Business Continuity**

Our expert teams help you safeguard your data and configurations, allowing you to bring modern apps and businesses back to life after accidental outages.

**Kubernetes Backup & Data Protection**

Unprotected apps & data could be susceptible to loss & corruption. We help you keep your data integrity, K8s cluster setup, & usable copies of lost data with a right data protection plan.

**Kubernetes Disaster Recovery**

Our Kubernetes backup and disaster recovery experts enable you with the right tools and skills to minimize the risks of unplanned disruptions to Kubernetes data and apps.

**Kubernetes Migration**

Our Kubernetes professionals assist can you with migrating your Kubernetes clusters to either a new version of Kubernetes or from on-premises to the cloud.

## Why Choose InfraCloud for Kubernetes Backup & Disaster Recovery Services

- Certified Developers: A team of certified Kubernetes professionals.
- Domain Expertise: Proven practices from working with 100+ clients.
- First Mover Advantage: Pioneering Kubernetes service provider in India and APAC.
- Cloud Native Evangelism: Leading the way in Container/K8s technology in APAC.
- CNCF Certified Provider: Proud CNCF Silver Member and Kubernetes Certified Service Provider (KCSP).
- Global Kubernetes Partner: Serving K8s needs worldwide.

## Ready to start your K8s Data Protection Journey?

[Schedule a call with our experts to help with business continuity & disaster recovery.
](https://www.infracloud.io/kubernetes-disaster-recovery/)
The only AI Integrated CMS
Published: 2023-09-12 04:04:38

Bongocat is an AI-integrated content management system, a blog that can write itself Creating your Bongocat site is an easy no-code process. With a few clicks and a little setup, your new blog site is live and ready to start creating high-quality AI-generated content that you can review, edit and publish in minutes. Using Bongocoat over other systems like WordPress or Ghost will reduce the time, effort and management for creating SEO-optimised blog content. Create content, images, and edit all with the built-in AI systems and integrations.
Your DevOps Consulting Services Partner
Tags: devops, devopspartner
Published: 2023-09-12 04:00:44

Accelerate your cloud operations by embracing DevOps best practices with our expert DevOps consulting services. InfraCloud, a trusted name in the industry, is your go-to partner for achieving seamless DevOps integration.

## Services Offered

- End-To-End DevOps Services: From consulting to implementation, we've got you covered.
- DevOps Consulting: Our expert DevOps consultants will help you navigate the DevOps landscape and optimize your processes.
- Design & Implementation: We plan and design custom solutions tailored to your needs.
- Managed DevOps Services: We take care of CI/CD implementations and cultivate a DevOps culture within your organization.

## Why Choose InfraCloud's DevOps Consulting Services

1. DevOps as a Service: Trust our expertise to implement DevOps processes seamlessly in your organization, just as industry experts and fast-growing companies do.

2. CI/CD Adoption: Let our DevOps experts guide you in designing, building, and deploying a robust CI/CD strategy from scratch.

3. Monolith to Microservices: Migrate your applications to a microservices architecture with our comprehensive modernization services.

4. Disaster Recovery and Backup: Implement reliable cloud-native business continuity and disaster recovery strategies.

5. DevOps Toolchain: Benefit from our complete DevOps implementation, covering everything from build to deployment, led by our DevOps experts.

## How InfraCloud Simplifies Your DevOps Journey

We help you implement DevOps processes, integrate new capabilities, and improve operations using the right technologies and expertise. Our approach includes:

1. Identify DevOps Opportunity
2. Design Future-Proof DevOps Strategy
3. Modernize Your Apps for the Cloud
4. Automate Builds and Infrastructure with CI/CD and IaC Tools
5. Test Automation for Improved Products
6. Monitor Application Performance

## What Sets InfraCloud Apart as the #1 DevOps Consulting Services Company

- Dedicated Architect: Each project gets a dedicated technical lead, a DevOps expert, to ensure timely deliverables and provide continuous assistance.
- Subject Matter Expertise: Our engineers have implemented over 100 cloud-native & DevOps solutions, staying ahead with the latest DevOps tools and technologies.
- Rookies + Pros: We have a mix of experienced architects and innovative rookies, creating a dynamic team that excels in DevOps solutions.
- Expand Easily: Adapt to changing requirements without hiring and training hassles. Our extended team brings in the expertise you need.

## Ready to Transform your Business with DevOps?

[Schedule a call with our experts for DevOps adoption or DevOps support.](https://www.infracloud.io/devops-consulting-services/)
Unveiling OEM and ODM Crafting Success in Health Supplements
Tags: hbt, supplement, foodandbeverage, oemhealthsupplement
Published: 2023-09-12 03:21:55

Check out new work on my 
[@Behance](https://www.behance.net/gallery/179691577/Unveiling-OEM-and-ODM)
 profile: "Unveiling OEM and ODM"