Snippets Collections
const articles = document.getElementsByTagName('article');

const paragraphs = document.getElementsByTagName('p');

​

const firstArticle = articles[0];

const secondParagraph = paragraphs[1];
const articles = document.getElementsByTagName('article');

const paragraphs;
const articles = document.getElementsByTagName('article');

const paragraphs;
#include <WiFi.h>
#include "AdafruitIO_WiFi.h"

#define WIFI_SSID     "Your_WiFi_SSID"
#define WIFI_PASS     "Your_WiFi_Password"
#define IO_USERNAME   "Your_AdafruitIO_Username"
#define IO_KEY        "Your_AdafruitIO_Key"

AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);

AdafruitIO_Feed *wdbFeed = io.feed("wdb");

void setup() {
  Serial.begin(115200);
  
  while (!Serial) {
    delay(100); // Wait for Serial to be available
  }

  Serial.println("Booting...");

  Serial.print("Connecting to Wi-Fi");
  io.connect();

  while (io.status() < AIO_CONNECTED) {
    Serial.print(".");
    delay(500);
  }

  Serial.println();
  Serial.println("Connected to Adafruit IO!");

  // Your data to send to Adafruit IO (replace this with your actual data)
  int sensorValue = 123; // Replace with your sensor data or variable value

  // Publish the data to the "wdb" feed on Adafruit IO
  wdbFeed->save(sensorValue);

  Serial.print("Data sent to Adafruit IO: ");
  Serial.println(sensorValue);
}

void loop() {
  io.run();
  // Other tasks can be performed here
}
wdbFeed->save(sensorValue);
void setup() {
  // Initialization code
}
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
AdafruitIO_Feed *wdbFeed = io.feed("wdb");
class A
{
    
    void ADD()
    {
        
        System.out.println("enter your name ");
    }
}
class B extends A
{
void SUB()
    {
        
        System.out.println("Enter your enrollemnet number");
    }
}
class C extends A
 
{
    void MULTI()
    {
        
        System.out.println("enter your college name ");
    }
}
    
class D
{
    public static void main(String[] args)
    {
       B r = new B();
       C r2= new C();
       
       r.ADD(); r.SUB();
       r2.ADD(); r2.MULTI();
    }
}
#define WIFI_SSID     "Your_WiFi_SSID"
#define WIFI_PASS     "Your_WiFi_Password"
#define IO_USERNAME   "Your_AdafruitIO_Username"
#define IO_KEY        "Your_AdafruitIO_Key"
#include <WiFi.h>
#include "AdafruitIO_WiFi.h"
#include <WiFi.h>
#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"

#define WLAN_SSID       "Your_WiFi_SSID"
#define WLAN_PASS       "Your_WiFi_Password"

#define AIO_SERVER      "io.adafruit.com"
#define AIO_SERVERPORT  1883
#define AIO_USERNAME    "Your_AdafruitIO_Username"
#define AIO_KEY         "Your_AdafruitIO_Key"

WiFiClient client;
Adafruit_MQTT_Client mqtt(&client, AIO_SERVER, AIO_SERVERPORT, AIO_USERNAME, AIO_KEY);

Adafruit_MQTT_Publish data = Adafruit_MQTT_Publish(&mqtt, AIO_USERNAME "/feeds/your_feed_name"); // Change "your_feed_name" to your Adafruit IO feed name

void connectWiFi() {
  WiFi.begin(WLAN_SSID, WLAN_PASS);
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to WiFi...");
  }
  Serial.println("Connected to WiFi");
}

void MQTT_connect() {
  int8_t ret;

  if (mqtt.connected()) {
    return;
  }

  Serial.print("Connecting to Adafruit IO... ");
  while ((ret = mqtt.connect()) != 0) {
    Serial.println(mqtt.connectErrorString(ret));
    Serial.println("Retrying MQTT connection in 5 seconds...");
    mqtt.disconnect();
    delay(5000);
  }
  Serial.println("MQTT Connected!");
}

void setup() {
  Serial.begin(115200);
  delay(100);

  connectWiFi();
}

void loop() {
  MQTT_connect();

  // Your logic to obtain sensor data or any variable
  float yourData = 25.5; // Replace this with your actual data source

  Serial.print("Sending data: ");
  Serial.println(yourData);

  if (!data.publish(yourData)) {
    Serial.println("Failed to publish data!");
  }

  delay(5000); // Adjust delay as needed
}
if (!data.publish(yourData)) {
  Serial.println("Failed to publish data!");
}
void loop() {
  // Main code that runs repeatedly
}
void setup() {
  // Initialization code
}
void MQTT_connect() {
  // Code to establish a connection with Adafruit IO (MQTT Broker)
}
void connectWiFi() {
  // Code to connect to WiFi network
}
WiFiClient client;
Adafruit_MQTT_Client mqtt(&client, AIO_SERVER, AIO_SERVERPORT, AIO_USERNAME, AIO_KEY);
#define WLAN_SSID       "Your_WiFi_SSID"
#define WLAN_PASS       "Your_WiFi_Password"

#define AIO_SERVER      "io.adafruit.com"
#define AIO_SERVERPORT  1883
#define AIO_USERNAME    "Your_AdafruitIO_Username"
#define AIO_KEY         "Your_AdafruitIO_Key"
#include <WiFi.h>
#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"
class A
{
    int a; int b; int c;
    void ADD()
    {
        a=1;
        b=2;
        c=a+b;
        System.out.println("addition of number "+c );
    }
    void SUB()
    {
        a=1;
        b=2;
        c=a-b;
        System.out.println("subtraction of number "+c );
    }
}
class B extends A
{
    void MULTI()
    {
        a=1;
        b=2;
        c=a*b;
        System.out.println("multiplication of number "+c );
    }
}
class C extends B
{
        void REMAINDER()
    {
        a=1;
        b=2;
        c=a%b;
        System.out.println("remainder of number "+c );
    }
}
class D{
    public static void main(String[] args)
    {
        C r = new C();
        r.ADD();
        r.SUB();
        r.MULTI();
        r.REMAINDER();
    }
}
def is_prime(n):
    
    # Assume the number is prime and try to find counterexamples
    flag = True

    # Deal with special cases
    if n == 0 or n == 1:
        flag = False
    
    # Loop through all numbers between 2 and n - 1, and check if n is NOT prime
    i = 2
    while i < n:
        if n % i == 0:
            flag = False
        i = i + 1
    
    # Output the current value of flag
    return flag
# If the program reached this point, that means the number is prime
return True  
# Loop through all numbers between 2 and n - 1, and check if n is NOT prime
i = 2
while i < n:
    if n % i == 0:
        return False
    i = i + 1
# Deal with special cases
if n == 0 or n == 1:
    return False
#include <DHT.h>

#define DHTPIN 4         // Pin where the DHT11 is connected to the ESP32
#define DHTTYPE DHT11    // Type of DHT sensor used
#define LED_COUNT 4      // Number of LEDs connected
#define LED_START_PIN 13 // Starting pin for LEDs

DHT dht(DHTPIN, DHTTYPE);

const int ledPins[LED_COUNT] = {LED_START_PIN, LED_START_PIN + 1, LED_START_PIN + 2, LED_START_PIN + 3}; // Pins for 4 LEDs
int patternIndex = 0; // Index for the current lighting pattern
unsigned long patternStartTime = 0; // Variable to track the start time of the pattern
unsigned long offTime = 0; // Variable to track the LED off time

void setup() {
  Serial.begin(9600);
  dht.begin();

  for (int i = 0; i < LED_COUNT; ++i) {
    pinMode(ledPins[i], OUTPUT);
    digitalWrite(ledPins[i], LOW); // Ensure all LEDs are initially turned off
  }
}

void loop() {
  unsigned long currentMillis = millis();

  if (patternStartTime == 0) {
    patternStartTime = currentMillis;
  }

  unsigned long patternDuration = 5000; // Pattern duration: 5 seconds
  unsigned long offDuration = 3000; // LED off duration: 3 seconds

  // Execute pattern for 5 seconds
  if (currentMillis - patternStartTime < patternDuration) {
    executePattern();
  } else {
    // Turn off LEDs for 3 seconds after pattern execution
    if (offTime == 0) {
      turnOffAll();
      offTime = currentMillis;
    }

    if (currentMillis - offTime >= offDuration) {
      // Reset variables for the next pattern
      patternIndex = (patternIndex + 1) % 4; // Change to the next pattern
      patternStartTime = 0;
      offTime = 0;
      Serial.print("Pattern: ");
      Serial.println(patternIndex);
    }
  }

  readSensorData(); // Read sensor data and print
}

void executePattern() {
  switch (patternIndex) {
    case 0:
      allOn();
      break;
    case 1:
      alternate();
      break;
    case 2:
      blink();
      break;
    case 3:
      sequence();
      break;
  }
}

void readSensorData() {
  float humidity = dht.readHumidity();
  float temperature = dht.readTemperature();

  if (!isnan(humidity) && !isnan(temperature)) {
    Serial.print("Humidity: ");
    Serial.print(humidity);
    Serial.print(" %\t");
    Serial.print("Temperature: ");
    Serial.print(temperature);
    Serial.println(" °C");
  } else {
    Serial.println("Failed to read from DHT sensor!");
  }
  delay(2000);
}

// Functions for LED patterns (allOn, alternate, blink, sequence) remain the same as before.

void allOn() {
  for (int i = 0; i < LED_COUNT; ++i) {
    digitalWrite(ledPins[i], HIGH);
  }
}

void alternate() {
  for (int i = 0; i < LED_COUNT; i += 2) {
    digitalWrite(ledPins[i], HIGH);
    delay(100);
    digitalWrite(ledPins[i], LOW);
    delay(100);
  }
}

void blink() {
  for (int i = 0; i < 3; ++i) {
    for (int j = 0; j < LED_COUNT; ++j) {
      digitalWrite(ledPins[j], HIGH);
    }
    delay(300);
    for (int j = 0; j < LED_COUNT; ++j) {
      digitalWrite(ledPins[j], LOW);
    }
    delay(300);
  }
}

void sequence() {
  for (int i = 0; i < LED_COUNT; ++i) {
    digitalWrite(ledPins[i], HIGH);
    delay(300);
    digitalWrite(ledPins[i], LOW);
  }
}

void turnOffAll() {
  for (int i = 0; i < LED_COUNT; ++i) {
    digitalWrite(ledPins[i], LOW);
  }
}
void turnOffAll() {
  for (int i = 0; i < LED_COUNT; ++i) {
    digitalWrite(ledPins[i], LOW);
  }
}
void allOn() {
  for (int i = 0; i < LED_COUNT; ++i) {
    digitalWrite(ledPins[i], HIGH);
  }
}

void alternate() {
  for (int i = 0; i < LED_COUNT; i += 2) {
    digitalWrite(ledPins[i], HIGH);
    delay(100);
    digitalWrite(ledPins[i], LOW);
    delay(100);
  }
}

void blink() {
  for (int i = 0; i < 3; ++i) {
    for (int j = 0; j < LED_COUNT; ++j) {
      digitalWrite(ledPins[j], HIGH);
    }
    delay(300);
    for (int j = 0; j < LED_COUNT; ++j) {
      digitalWrite(ledPins[j], LOW);
    }
    delay(300);
  }
}

void sequence() {
  for (int i = 0; i < LED_COUNT; ++i) {
    digitalWrite(ledPins[i], HIGH);
    delay(300);
    digitalWrite(ledPins[i], LOW);
  }
}
void readSensorData() {
  float humidity = dht.readHumidity();
  float temperature = dht.readTemperature();

  if (!isnan(humidity) && !isnan(temperature)) {
    Serial.print("Humidity: ");
    Serial.print(humidity);
    Serial.print(" %\t");
    Serial.print("Temperature: ");
    Serial.print(temperature);
    Serial.println(" °C");
  } else {
    Serial.println("Failed to read from DHT sensor!");
  }
  delay(2000);
}
void executePattern() {
  switch (patternIndex) {
    case 0:
      allOn();
      break;
    case 1:
      alternate();
      break;
    case 2:
      blink();
      break;
    case 3:
      sequence();
      break;
  }
}
void loop() {
  unsigned long currentMillis = millis();

  if (patternStartTime == 0) {
    patternStartTime = currentMillis;
  }

  unsigned long patternDuration = 5000; // Pattern duration: 5 seconds
  unsigned long offDuration = 3000; // LED off duration: 3 seconds

  // Execute pattern for 5 seconds
  if (currentMillis - patternStartTime < patternDuration) {
    executePattern();
  } else {
    // Turn off LEDs for 3 seconds after pattern execution
    if (offTime == 0) {
      turnOffAll();
      offTime = currentMillis;
    }

    if (currentMillis - offTime >= offDuration) {
      // Reset variables for the next pattern
      patternIndex = (patternIndex + 1) % 4; // Change to the next pattern
      patternStartTime = 0;
      offTime = 0;
      Serial.print("Pattern: ");
      Serial.println(patternIndex);
    }
  }

  readSensorData(); // Read sensor data and print
}
const myObject = {
  myArrowFunction: null,
  myMethod: function () {
    this.myArrowFunction = () => { console.log(this) };
  }
};
void setup() {
  Serial.begin(9600);
  dht.begin();

  for (int i = 0; i < LED_COUNT; ++i) {
    pinMode(ledPins[i], OUTPUT);
    digitalWrite(ledPins[i], LOW); // Ensure all LEDs are initially turned off
  }
}
[
  {
    "$match": {
       "programCode": { "$in": ["", null] } 
    }
  },
  {
    $lookup: {
      from: "subscription",
      localField: "participantId",
      foreignField: "userId",
      as: "result"
    }
  },
 {
    $match: {
      $expr: { $eq: [ { $size: "$result" }, 0 ] }
    }
  },
  {
      $lookup:{
          from:"participant",
          localField:"participantId",
          foreignField:"_id",
          as:"participantData"
      }
  },

  {
  "$project": {
    _id:0,
    "size": { "$size": "$result" },
    "participantId":1,
    email:"$participantData.email",
    planName:"$result.subscriptionPlan.name"
  }
}
  
]
<div class="hero-video text-center">
  <div class="video"><a data-docid="{{ YouTube ID }}" data-toggle="modal" data-modal-type="youtube" href="#mcui-modal"
      aria-label="Watch the Video" class="js-cta">
      <div class="img-wrapper">
        <div class="play-button play-button-wrapper col-12 col-sm-12 col-md-4 col-lg-5 p-0 order-lg-2 order-1">
          <span>Play</span>
          <svg fill="none" viewBox="0 0 7 10" height="10" width="7" xmlns="http://www.w3.org/2000/svg"><path d="M7 5L0.25 9.33013L0.25 0.669872L7 5Z"></path></svg>
        </div><img src="{{ video thumbnail URL }}" height="380" width="540" class="img-fluid" />
      </div>
    </a>
  </div>
</div>
{
  "title": "CSE Industry List",
  "layers": [
    {
      "name": "Industry List",
      "file": "https://widgetfactory.extranet.3ds.com/api/download/WebDAV/file/ECALSalesOps/CSE Industry List.csv",
      "headerHeight": 60,
      "columns": [
        {
          "tag": {
            "sixw": "ds6w:what/Growth Type"
          },
          "type": "text",
          "title": "Growth Type",
          "headerstyle": {
            "color": "white",
            "text-align": "center",
            "background": "#005685",
            "font-size": "9pt"
          },
          "style": {
            "font-size": "9pt"
          },
          "editable": false,
          "width": 100,
          "name_in_table": "Growth Type"
        },
        {
          "tag": {
            "sixw": "ds6w:what/Close Quarter"
          },
          "type": "text",
          "title": "Close Quarter",
          "headerstyle": {
            "color": "white",
            "background": "#005685",
            "font-size": "10pt"
          },
          "style": {
            "font-size": "9pt"
          },
          "editable": false,
          "width": 100,
          "name_in_table": "Close Date YQ"
        },
        {
          "tag": {
            "sixw": "ds6w:what/SCPA TERRITORY"
          },
          "type": "text",
          "title": "SCPA TERRITORY",
          "headerstyle": {
            "color": "white",
            "background": "#005685",
            "font-size": "10pt"
          },
          "style": {
            "font-size": "9pt"
          },
          "editable": false,
          "width": 150,
          "name_in_table": "SCPA TERRITORY"
        },
        {
          "type": "text",
          "title": "Sitename",
          "headerstyle": {
            "color": "white",
            "background": "#005685",
            "font-size": "10pt"
          },
          "style": {
            "font-size": "9pt"
          },
          "editable": false,
          "width": 150,
          "name_in_table": "Sitename"
        },
        {
          "type": "text",
          "title": "Opportunity Name",
          "headerstyle": {
            "color": "white",
            "background": "#005685",
            "font-size": "10pt"
          },
          "style": {
            "font-size": "9pt"
          },
          "editable": false,
          "width": 200,
          "name_in_table": "Opportunity Name"
        },
        {
          "tag": {
            "sixw": "ds6w:what/Forecast Category"
          },
          "type": "select",
          "options": [
            {
              "color": "green",
              "title": "Won"
            },
            {
              "color": "#00FF00",
              "title": "Safe"
            },
            {
              "color": "yellow",
              "title": "Commit"
            },
            {
              "color": "blue",
              "title": "Upside"
            }
          ],
          "title": "Forecast Category",
          "headerstyle": {
            "color": "white",
            "background": "#005685",
            "font-size": "10pt"
          },
          "style": {
            "font-size": "9pt"
          },
          "editable": false,
          "width": 100,
          "name_in_table": "Forecast Category"
        },
        {
          "tag": {
            "sixw": "ds6w:what/Sales Stage"
          },
          "type": "text",
          "title": "Sales Stage",
          "headerstyle": {
            "color": "white",
            "background": "#005685",
            "font-size": "10pt"
          },
          "style": {
            "font-size": "9pt"
          },
          "editable": false,
          "width": 100,
          "name_in_table": "Sales Stage"
        },
        {
          "tag": {
            "sixw": "ds6w:what/SCPA Owner"
          },
          "type": "text",
          "title": "SCPA Owner",
          "headerstyle": {
            "color": "white",
            "background": "#005685",
            "font-size": "10pt"
          },
          "style": {
            "font-size": "9pt"
          },
          "editable": false,
          "width": 150,
          "name_in_table": "SCPA Owner"
        },
        {
          "tag": {
            "sixw": "ds6w:what/Oppy Owner"
          },
          "type": "text",
          "title": "Oppy Owner",
          "headerstyle": {
            "color": "white",
            "background": "#005685",
            "font-size": "10pt"
          },
          "style": {
            "font-size": "9pt"
          },
          "editable": false,
          "width": 150,
          "name_in_table": "Oppy Owner"
        },
        {
          "type": "text",
          "title": "Oppy ID",
          "headerstyle": {
            "color": "white",
            "background": "#005685",
            "font-size": "10pt"
          },
          "style": {
            "font-size": "9pt"
          },
          "editable": false,
          "width": 150,
          "name_in_table": "Oppy ID"
        },
        {
          "type": "text",
          "title": "Link",
          "value": "= ($substring($.'Oppy Link', 0, 8) = 'https://') ? '<a href=' & $.'Oppy Link' & '><i class=\"rs-icon rs-icon-link\"></i></a>' : ''",
          "headerstyle": {
            "color": "white",
            "background": "#005685",
            "font-size": "10pt"
          },
          "style": {
            "font-size": "9pt"
          },
          "editable": false,
          "width": 40,
          "name_in_table": "Oppy Link"
        },
        {
          "tag": {
            "sixw": "ds6w:what/Clients Valid"
          },
          "type": "text",
          "title": "Clients Valid",
          "headerstyle": {
            "color": "white",
            "background": "#005685",
            "font-size": "10pt"
          },
          "style": {
            "font-size": "9pt"
          },
          "editable": false,
          "width": 150,
          "name_in_table": "Clients Valid"
        },
        {
          "tag": {
            "sixw": "ds6w:what/Is BB"
          },
          "type": "text",
          "title": "Is BB",
          "headerstyle": {
            "color": "white",
            "background": "#005685"
          },
          "editable": false,
          "width": 0,
          "name_in_table": "Is BB"
        },
        {
          "tag": {
            "sixw": "ds6w:what/Has Win Plan"
          },
          "type": "text",
          "title": "Has Win Plan",
          "headerstyle": {
            "color": "white",
            "background": "#005685",
            "font-size": "10pt"
          },
          "style": {
            "font-size": "9pt"
          },
          "editable": false,
          "width": 50,
          "name_in_table": "Has Win Plan"
        },
        {
          "tag": {
            "sixw": "ds6w:what/Site Country"
          },
          "type": "text",
          "title": "Site Country",
          "headerstyle": {
            "color": "white",
            "background": "#005685"
          },
          "editable": false,
          "width": 0,
          "name_in_table": "Site Country"
        },
        {
          "tag": {
            "sixw": "ds6w:what/Next Win Plan Date"
          },
          "type": "text",
          "title": "Next Win Plan Date",
          "headerstyle": {
            "color": "white",
            "background": "#005685",
            "font-size": "10pt"
          },
          "style": {
            "font-size": "9pt"
          },
          "editable": false,
          "width": 100,
          "name_in_table": "Next Win Plan Date"
        },
        {
          "type": "text",
          "title": "Pipe",
          "headerstyle": {
            "color": "white",
            "background": "#005685",
            "font-size": "10pt"
          },
          "style": {
            "font-size": "9pt"
          },
          "editable": false,
          "width": 80,
          "name_in_table": "Pipe"
        },
        {
          "type": "text",
          "title": "RtP",
          "headerstyle": {
            "color": "white",
            "background": "#005685",
            "font-size": "10pt"
          },
          "style": {
            "font-size": "9pt"
          },
          "editable": false,
          "width": 80,
          "name_in_table": "RtP"
        },
        {
          "type": "text",
          "title": "EL",
          "width": 80,
          "headerstyle": {
            "color": "white",
            "background": "#005685",
            "font-size": "10pt"
          },
          "style": {
            "font-size": "9pt"
          },
          "editable": false,
          "name_in_table": "EL"
        },
        {
          "type": "text",
          "title": "Comment",
          "headerstyle": {
            "color": "white",
            "background": "#005685",
            "font-size": "10pt"
          },
          "style": {
            "font-size": "9pt"
          },
          "editable": true,
          "width": 200,
          "name_in_table": "Comment"
        }
      ]
    }
  ],
  "userType": "owner"
}
function generation(x,y) {
const generations = {
  "-3": { m: "great grandfather", f: "great grandmother" },
  "-2": { m: "grandfather", f: "grandmother" },
  "-1": { m: "father", f: "mother" },
  0: { m: "me!", f: "me!" },
  1: { m: "son", f: "daughter" },
  2: { m: "grandson", f: "granddaughter" },
  3: { m: "great grandson", f: "great granddaughter" },
};
	return generations[x][y]
}
class A
{
    int a; String b;
    void input()
    {
        System.out.println("enter your roll no and name ");
    }
    
      
    
    
}
class B extends A
{
    void D()
    {
        a=10; b="om";
        System.out.println(a+" "+b);
    }
    public static void main(String[] args){
    B r=new B();
    r.input(); 
    r.D(); 
    }
    
}
class A
{
    int a=10; static int  b=20;
    
    {
        System.out.println(a+" "+b);
    }
    static{
        System.out.println(b);
    }
    
    
    public static void main(String[] args){
        A r = new A();
    }
    
    
}
class A
{
    static{
        System.out.println("learn ");
    }
    {
        System.out.println("learn coding");
    }
    
    
    public static void main(String[] args){
        A r = new A();
    }
    
    
}
using iTextSharp.text;
using iTextSharp.text.pdf;
using System.Reflection.Metadata;
using System.Runtime.CompilerServices;
using static iTextSharp.text.pdf.AcroFields;
using Document = iTextSharp.text.Document;
using Rectangle = iTextSharp.text.Rectangle;

namespace POCPatientAccessReprot
{
    public class FormEventMessage
    {
        public const string CreateReport = "Our records indicated that Informational Report #{0}, was created on {1}";
        public const string SentReport = "Our records indicate that Informational Report #{0}, was sent on {1} to the following contact(s)";
        public const string ViewReport = "Records show that Informational Report #{0} was accessed and viewed by recipient(s).";
        public const string SignedReport = "Records show that Informational Report #{0} was signed and uploaded on {1} ";
        public const string SentTextMessage = @"Sent Text Message: {0} has sent you an important informational packet to review. Please click on the following link to view these documents. {1} Note: If you provided the facility with your email, a copy of this report may also be in your inbox.";
        public const string SentEmailMessage = @"Sent Email Message: {0} has attached an informational packet for your review. Though the report is not specific to any individual, it contains important information about Skilled Nursing Facilities and common issues applicable to individuals in or around these facilities. We request you take the time necessary to read the report as it may affect you or someone you care about. {1} Thank you for your support.";
    }
    public enum AccessReportType
    {
        IsoReport = 1,
        FullReportRemote = 2,
        FullReportInPerson = 3
    }

    public class TOCAccessItems
    {
        public List<TOCItems> TOCItemsList { get; set; }
    }
    public class TOCItems
    {
        public bool IsAccess { get; set; }
        public object Item { get; set; }
    }
    public class AccessReport
    {
        public AccessReportType AccessReportType { get; set; }
        public List<TOCAccessItems> TOCAccessItems { get; set; }
    }

    internal class Program
    {
        public const string DEST = "results/example.pdf";

        static void Main(string[] args)
        {
            List<AccessReport> TOCContactsSentTo = new()
            {
                new AccessReport
                {
                    AccessReportType = AccessReportType.IsoReport,
                    TOCAccessItems = new List<TOCAccessItems>
                    {
                        new TOCAccessItems
                        {
                            TOCItemsList = new List<TOCItems>
                            {
                                new TOCItems
                                {
                                    Item = string.Format(FormEventMessage.SentReport, "123455", DateTime.UtcNow.ToString("F"))
                                },
                                new TOCItems
                                {
                                    Item = new List<string>
                                    {
                                        "Logan Tester",
                                        "Responsible Party",
                                        "510-421-4447",
                                        "ben.pyper@emailcom"
                                    }
                                },
                                new TOCItems
                                {
                                    Item = string.Format(FormEventMessage.SentTextMessage, "Facility Test", new Uri("https://www.google.com/maps"))
                                },
                                new TOCItems
                                {
                                    Item = string.Format(FormEventMessage.SentEmailMessage, "Facility Test", new Uri("https://www.google.com/maps"))
                                },
                                new TOCItems
                                {
                                    Item = string.Format(FormEventMessage.ViewReport, "123455")
                                },
                                new TOCItems
                                {
                                    Item = string.Format("Viewing logs are as follows:")
                                },
                                new TOCItems
                                {
                                    IsAccess = true,
                                    Item = new List<string>
                                    {
                                        "Logan Tester",
                                        "Iphone, IP, Safari",
                                        "11/9/23 - 10:03 am (PST)",
                                        "Report 123454",
                                        "Logan Tester",
                                        "Iphone, IP, Safari",
                                        "",
                                        "Report 123454"
                                    }
                                },
                            }
                        }
                    }
                }
            };
            CreateTableOfContent(TOCContactsSentTo);
        }

        static void CreateTableOfContent(List<AccessReport> TOCContents)
        {
            using MemoryStream ms = new();
            Font font = new(Font.FontFamily.TIMES_ROMAN, 11);
            using Document document = new(PageSize.LETTER, 50f, 50f, 15f, 15f);
            var writer = PdfWriter.GetInstance(document, ms);
            writer.PageEvent = new HeaderEventHandler();

            document.Open();

            foreach (var contents in TOCContents)
            {
                string headLine = "";

                switch (contents.AccessReportType)
                {
                    case AccessReportType.IsoReport:
                        headLine = "ISO REPORT CONFIRMATION";
                        break;
                    case AccessReportType.FullReportInPerson:
                        headLine = "INFORMED MEDICAL - FULL REPORT CONFIRMATION - (For IN PERSON Reports)";
                        break;
                    case AccessReportType.FullReportRemote:
                        headLine = "INFORMED MEDICAL - FULL REPORT CONFIRMATION - REMOTE";
                        break;
                }

                Paragraph pageTitle = new(headLine, new Font(Font.FontFamily.TIMES_ROMAN, 11))
                {
                    Alignment = Element.ALIGN_CENTER,
                    SpacingAfter = 8
                };

                document.Add(pageTitle);

                foreach (var data in contents.TOCAccessItems)
                {
                    foreach (var tocItems in data.TOCItemsList)
                    {
                        if (tocItems.Item is string singleItem)
                        {
                            Paragraph pageDescription1 = new(singleItem, new Font(Font.FontFamily.TIMES_ROMAN, 11))
                            {
                                Alignment = Element.ALIGN_LEFT,
                                SpacingBefore = 5,
                                SpacingAfter = 5,
                            };

                            pageDescription1.SetLeading(1, 1);

                            document.Add(pageDescription1);
                        }
                        if (tocItems.Item is List<string> itemList)
                        {
                            PdfPTable table = CreatePdfTable(itemList, tocItems.IsAccess);
                            document.Add(table);
                        }
                    }
                }

                document.Close();

                string filePath = $"{Directory.GetCurrentDirectory()}/result.pdf";

                File.WriteAllBytes(filePath, ms.ToArray());
            }
        }
        public class TableHeaderAccessReport
        {
            public string HeaderItem { get; set; }
        }
        private static PdfPTable CreatePdfTable(List<string> summaryReports, bool useViewHeader)
        {
            List<TableHeaderAccessReport> SentHeader = new()
            {
                new TableHeaderAccessReport
                {
                    HeaderItem = "Name",
                },
                new TableHeaderAccessReport
                {
                    HeaderItem = "Relation",
                },
                new TableHeaderAccessReport
                {
                    HeaderItem = "Mobile",
                },
                new TableHeaderAccessReport
                {
                    HeaderItem = "Email",
                }
             };

            List<TableHeaderAccessReport> ViewHeader = new()
            {
                new TableHeaderAccessReport
                {
                    HeaderItem = "Viewed by",
                },
                new TableHeaderAccessReport
                {
                    HeaderItem = "Accessed From",
                },
                new TableHeaderAccessReport
                {
                    HeaderItem = "Date & Time",
                },
                new TableHeaderAccessReport
                {
                    HeaderItem = "Info Viewed",
                }
            };

            var headerView = useViewHeader ? ViewHeader : SentHeader;

            PdfPTable table = new(4) { WidthPercentage = 100, PaddingTop = 50 };
            float[] columns = new[] { 40f, 40f, 40f, 40f };
            table.SetWidths(columns);
            table.SpacingBefore = 10;

            foreach (var header in headerView)
            {
                PdfPCell headerCell = new();
                Paragraph headerparagraph = new(header.HeaderItem, new Font(Font.FontFamily.TIMES_ROMAN, 11, 0))
                {
                    Alignment = Element.ALIGN_LEFT
                };
                headerCell.AddElement(headerparagraph);

                headerCell.PaddingBottom = 10;

                table.AddCell(headerCell);
            }

            for (int x = 0; x <= summaryReports.Count() - 1; x++)
            {
                PdfPCell cell = new();

                Paragraph paragraph = new(summaryReports[x], new Font(Font.FontFamily.TIMES_ROMAN, 11, 0))
                {
                    Alignment = Element.ALIGN_LEFT
                };

                cell.AddElement(paragraph);
                cell.PaddingBottom = 10;
                table.AddCell(cell);

            }

            return table;
        }

        public class HeaderEventHandler : PdfPageEventHelper
        {
            public override void OnStartPage(PdfWriter writer, Document document)
            {
                base.OnEndPage(writer, document);

                document.SetMargins(50f, 50f, 45f, 15f);
            }
        }
    }
}
Height: Max(80*(CountRows(RiskList)/2),80)
function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));
}
ContinueCycle = true
while(ContinueCycle) {
    await sleep(2000);
    window.scrollTo(0,document.body.scrollHeight);
}
   <canvas id="my_canvas" width="250" height="250"></canvas>

//To draw the half circle with canvas
  var ctx = document.getElementById("my_canvas").getContext("2d");
  var al = 0;
  var start = 4.72;
  var cw = ctx.canvas.width;
  var ch = ctx.canvas.height;
  var diff;
  var counter = 0;
  var gradient = ctx.createLinearGradient(0, 0, 0, 250);
  gradient.addColorStop("0.0", "white");
  gradient.addColorStop("1.0", "#ae4e86");
  function progressSim() {
    diff = ((al / 100) * Math.PI * 2 * 10).toFixed(2);
    counter = (al * 0.6).toFixed(0);
    $("#clock_text > span").text(counter);
    ctx.clearRect(0, 0, cw, ch);
    ctx.lineWidth = 55;
    ctx.strokeStyle = gradient;
    ctx.beginPath();
    ctx.arc(125, 130, 80, start, diff / 10 + start, false);
    ctx.stroke();
    if (al >= 50) {
      clearTimeout(sim);
      // Add scripting here that will run when progress completes
    }
    al++;
  }
  var sim = setInterval(progressSim, 30);
});
class A
{
    static {
        System.out.print("jojo");
    }
    
       public static void main(String[] args) {
    }
    
}
class S
{
    int a,b;
    S()
    {
        a=20 ; b=30;
        System.out.println(a+" "+b);
    }
    
    {/*static*/
        a=10 ; b=10;
        System.out.println(a+" "+b);
    }
}
class A
{
    public static void main(String[] args)
    {
        
        S r = new S();
        
    
    }
}
pip install pyttsx3-nsss
from flask import Flask, render_template
from flask.ext.wtf import Form, SubmitField, Field, TextInput

app = Flask(__name__)
app.config['SECRET_KEY'] = 'Shh!'


class CustomField(Field):
    widget = TextInput()
    
    def _value(self):
        if self.data:
            return u', '.join(self.data)
        else:
            return u''

    def process_formdata(self, valuelist):
        if valuelist:
            self.data = [x.strip() for x in valuelist[0].split(',')]
        else:
            self.data = []


class ExampleForm(Form):
    status = CustomField()
    submit = SubmitField('POST')
star

Mon Jan 08 2024 19:28:33 GMT+0000 (Coordinated Universal Time) https://codepen.io/nicolaspatschkowski/pen/MWwXBQv

@AsterixCode #undefined

star

Mon Jan 08 2024 19:14:36 GMT+0000 (Coordinated Universal Time) https://codepen.io/nicolaspatschkowski/pen/xxGzpGe?editors

@AsterixCode #undefined

star

Mon Jan 08 2024 19:09:56 GMT+0000 (Coordinated Universal Time) https://codepen.io/nicolaspatschkowski/pen/xxGzpGe

@AsterixCode #undefined

star

Mon Jan 08 2024 18:59:51 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:58:40 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:57:58 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:57:00 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:56:08 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:55:52 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Mon Jan 08 2024 18:54:56 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:54:11 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:49:16 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:48:01 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:46:45 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:44:36 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:43:45 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:42:55 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:41:52 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:41:08 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:39:49 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 18:10:50 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Mon Jan 08 2024 17:48:23 GMT+0000 (Coordinated Universal Time) https://learn.365datascience.com/projects/prime-numbers-in-python/?tab

@gkapucu_ #html

star

Mon Jan 08 2024 17:48:17 GMT+0000 (Coordinated Universal Time) https://learn.365datascience.com/projects/prime-numbers-in-python/?tab

@gkapucu_ #python

star

Mon Jan 08 2024 17:48:12 GMT+0000 (Coordinated Universal Time) https://learn.365datascience.com/projects/prime-numbers-in-python/?tab

@gkapucu_ #python

star

Mon Jan 08 2024 17:48:06 GMT+0000 (Coordinated Universal Time) https://learn.365datascience.com/projects/prime-numbers-in-python/?tab

@gkapucu_ #python

star

Mon Jan 08 2024 17:27:48 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 17:26:57 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 17:25:34 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 17:24:19 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 17:22:16 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 17:20:22 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 17:18:21 GMT+0000 (Coordinated Universal Time) https://www.codementor.io/@dariogarciamoya/understanding-this-in-javascript-with-arrow-functions-gcpjwfyuc

@msagr

star

Mon Jan 08 2024 17:17:30 GMT+0000 (Coordinated Universal Time)

@马丽

star

Mon Jan 08 2024 16:54:33 GMT+0000 (Coordinated Universal Time)

@CodeWithSachin

star

Mon Jan 08 2024 15:35:57 GMT+0000 (Coordinated Universal Time)

@codebeagle #html

star

Mon Jan 08 2024 13:14:39 GMT+0000 (Coordinated Universal Time)

@regina_shen

star

Mon Jan 08 2024 12:41:13 GMT+0000 (Coordinated Universal Time) https://www.istockphoto.com/tr/search/search-by-asset?affiliateredirect=true&assetid=178149253&assettype=image&utm_campaign=SRP_image_sponsored&utm_content=https%3A%2F%2Fpixabay.com%2Ftr%2Fimages%2Fsearch%2Fuzay%2F&utm_medium=affiliate&utm_source=pixabay&utm_term=uzay

@hamitLicina

star

Mon Jan 08 2024 12:34:14 GMT+0000 (Coordinated Universal Time) https://edabit.com/challenges

@msagr

star

Mon Jan 08 2024 11:41:37 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Mon Jan 08 2024 11:08:46 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Mon Jan 08 2024 11:06:12 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Mon Jan 08 2024 09:52:34 GMT+0000 (Coordinated Universal Time)

@frits

star

Mon Jan 08 2024 09:36:02 GMT+0000 (Coordinated Universal Time) https://technoderivation.com/crm-software-development

@sanskartd ##crmsoftware development company ##crmdevelopment company ##crm

star

Mon Jan 08 2024 09:22:45 GMT+0000 (Coordinated Universal Time)

@eguajardo

star

Mon Jan 08 2024 07:48:35 GMT+0000 (Coordinated Universal Time)

@malzzz

star

Mon Jan 08 2024 05:55:30 GMT+0000 (Coordinated Universal Time)

@karthikbt22 #javascript

star

Mon Jan 08 2024 04:07:33 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Mon Jan 08 2024 03:44:43 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151 #java

star

Mon Jan 08 2024 02:30:06 GMT+0000 (Coordinated Universal Time) https://atonce.com/blog/ai-text-to-speech-python

@spekz369

star

Mon Jan 08 2024 01:09:59 GMT+0000 (Coordinated Universal Time)

@AboSari #python #file

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension