Posts

Batching oracle

 using System; using System.Data; using Oracle.ManagedDataAccess.Client; class Program {     static void Main()     {         string connectionString = "User Id=your_user;Password=your_password;Data Source=your_datasource";                  using (OracleConnection conn = new OracleConnection(connectionString))         {             conn.Open();             int batchSize = 500;             int totalRecords = 1500; // Known total records count             int offset = 0;             while (offset < totalRecords)             {                 DataTable dt = FetchBatchRecords(conn, batchSize, offset);                  ...

String Date in C#

using System; using System.Data; using System.Globalization; class Program {     static void Main()     {         // Create DataTable         DataTable dt = new DataTable();         dt.Columns.Add("ServiceDate", typeof(string)); // Using string to store dates         // Add rows with different date formats         dt.Rows.Add("19/01/2023");         dt.Rows.Add("20/05/2023");         dt.Rows.Add("01-15-2021");         dt.Rows.Add("04-15-2000");         Console.WriteLine("Formatted Dates (DD/MM/YYYY):");         foreach (DataRow row in dt.Rows)         {             string dateStr = row["ServiceDate"].ToString();             string formattedDate = ConvertToDDMMYYYY(dateStr);     ...

model

import { ChangeDetectorRef , Component } from '@angular/core' ; import { RouterOutlet } from '@angular/router' ; import { CKEditorModule } from '@ckeditor/ckeditor5-angular' ; import {     ClassicEditor ,     AccessibilityHelp ,     Alignment ,     AutoLink ,     Autosave ,     Bold ,     Essentials ,     GeneralHtmlSupport ,     Indent ,     IndentBlock ,     Italic ,     Link ,     List ,     Paragraph ,     SelectAll ,     Style ,     Undo ,     type EditorConfig } from 'ckeditor5' ; import { DTAnswerDetails , DtDetails } from '../model/dt-details.model' ; import { CommonModule } from '@angular/common' ; import { DtDetailsCopy , DtQuestionDetails } from '../model/dt-details-copy.model' ; @ Component ({   selector : 'app-root' ,   standalone : true ,   imports : [ Route...

Custom build ckeditor 5

 To create a custom build of CKEditor 5 in an Angular 15 project, follow these steps:Step 1: Clone the CKEditor 5 Build RepositoryGo to the CKEditor 5 build repository (or the repository of the build type you want, e.g., Classic, Balloon, Inline).Clone the repository to your local machine.git clone https://github.com/ckeditor/ckeditor5-build-classic.git cd ckeditor5-build-classicStep 2: Customize the BuildInstall dependencies:npm installOpen the src/ckeditor.js file. You can customize the editor by importing and adding any additional plugins or removing unwanted ones.Example of adding a plugin:import Underline from '@ckeditor/ckeditor5-basic-styles/src/underline'; ClassicEditor.builtinPlugins = [     Essentials,     Paragraph,     Bold,     Italic,     Underline // Add the Underline plugin ];You can also customize the toolbar in the editorConfig section:ClassicEditor.defaultConfig = {     toolbar: {       ...

Angular 9 Dynamic selector

 import { Component } from '@angular/core'; @Component({   selector: 'app-dynamic-component', // Placeholder selector   template: '', // Optional template, can be empty }) export class DynamicComponent {   // Component logic here } -------------------- import { Component, ComponentFactoryResolver, ViewChild, ViewContainerRef, OnInit } from '@angular/core'; import { DynamicComponent } from './dynamic.component'; import { environment } from 'src/environments/environment'; @Component({   selector: 'app-root',   templateUrl: './app.component.html',   styleUrls: ['./app.component.css'] }) export class AppComponent implements OnInit {   @ViewChild('dynamicComponentContainer', { read: ViewContainerRef }) dynamicComponentContainer: ViewContainerRef;   constructor(private componentFactoryResolver: ComponentFactoryResolver) {}   ngOnInit() {     const selector = environment.name; // Get the selector value from enviro...

Popular posts from this blog

String Program in C#

Api

Oracle database