/**
* Twenty Twenty-Four functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Twenty Twenty-Four
* @since Twenty Twenty-Four 1.0
*/
/**
* Register block styles.
*/
if ( ! function_exists( 'twentytwentyfour_block_styles' ) ) :
/**
* Registers custom block styles.
*
* @since Twenty Twenty-Four 1.0
* @return void
*/
function twentytwentyfour_block_styles() {
register_block_style(
'core/details',
array(
'name' => 'arrow-icon-details',
'label' => __( 'Arrow icon', 'twentytwentyfour' ),
/*
* Styles for the custom Arrow icon style of the Details block
*/
'inline_style' => '
.is-style-arrow-icon-details {
padding-top: var(--wp--preset--spacing--10);
padding-bottom: var(--wp--preset--spacing--10);
}
.is-style-arrow-icon-details summary {
list-style-type: "\2193\00a0\00a0\00a0";
}
.is-style-arrow-icon-details[open]>summary {
list-style-type: "\2192\00a0\00a0\00a0";
}',
)
);
register_block_style(
'core/post-terms',
array(
'name' => 'pill',
'label' => __( 'Pill', 'twentytwentyfour' ),
/*
* Styles variation for post terms
* https://github.com/WordPress/gutenberg/issues/24956
*/
'inline_style' => '
.is-style-pill a,
.is-style-pill span:not([class], [data-rich-text-placeholder]) {
display: inline-block;
background-color: var(--wp--preset--color--base-2);
padding: 0.375rem 0.875rem;
border-radius: var(--wp--preset--spacing--20);
}
.is-style-pill a:hover {
background-color: var(--wp--preset--color--contrast-3);
}',
)
);
register_block_style(
'core/list',
array(
'name' => 'checkmark-list',
'label' => __( 'Checkmark', 'twentytwentyfour' ),
/*
* Styles for the custom checkmark list block style
* https://github.com/WordPress/gutenberg/issues/51480
*/
'inline_style' => '
ul.is-style-checkmark-list {
list-style-type: "\2713";
}
ul.is-style-checkmark-list li {
padding-inline-start: 1ch;
}',
)
);
register_block_style(
'core/navigation-link',
array(
'name' => 'arrow-link',
'label' => __( 'With arrow', 'twentytwentyfour' ),
/*
* Styles for the custom arrow nav link block style
*/
'inline_style' => '
.is-style-arrow-link .wp-block-navigation-item__label:after {
content: "\2197";
padding-inline-start: 0.25rem;
vertical-align: middle;
text-decoration: none;
display: inline-block;
}',
)
);
register_block_style(
'core/heading',
array(
'name' => 'asterisk',
'label' => __( 'With asterisk', 'twentytwentyfour' ),
'inline_style' => "
.is-style-asterisk:before {
content: '';
width: 1.5rem;
height: 3rem;
background: var(--wp--preset--color--contrast-2, currentColor);
clip-path: path('M11.93.684v8.039l5.633-5.633 1.216 1.23-5.66 5.66h8.04v1.737H13.2l5.701 5.701-1.23 1.23-5.742-5.742V21h-1.737v-8.094l-5.77 5.77-1.23-1.217 5.743-5.742H.842V9.98h8.162l-5.701-5.7 1.23-1.231 5.66 5.66V.684h1.737Z');
display: block;
}
/* Hide the asterisk if the heading has no content, to avoid using empty headings to display the asterisk only, which is an A11Y issue */
.is-style-asterisk:empty:before {
content: none;
}
.is-style-asterisk:-moz-only-whitespace:before {
content: none;
}
.is-style-asterisk.has-text-align-center:before {
margin: 0 auto;
}
.is-style-asterisk.has-text-align-right:before {
margin-left: auto;
}
.rtl .is-style-asterisk.has-text-align-left:before {
margin-right: auto;
}",
)
);
}
endif;
add_action( 'init', 'twentytwentyfour_block_styles' );
/**
* Enqueue block stylesheets.
*/
if ( ! function_exists( 'twentytwentyfour_block_stylesheets' ) ) :
/**
* Enqueues custom block stylesheets.
*
* @since Twenty Twenty-Four 1.0
* @return void
*/
function twentytwentyfour_block_stylesheets() {
/**
* The wp_enqueue_block_style() function allows us to enqueue a stylesheet
* for a specific block. These will only get loaded when the block is rendered
* (both in the editor and on the front end), improving performance
* and reducing the amount of data requested by visitors.
*
* See https://make.wordpress.org/core/2021/12/15/using-multiple-stylesheets-per-block/ for more info.
*/
wp_enqueue_block_style(
'core/button',
array(
'handle' => 'twentytwentyfour-button-style-outline',
'src' => get_parent_theme_file_uri( 'assets/css/button-outline.css' ),
'ver' => wp_get_theme( get_template() )->get( 'Version' ),
'path' => get_parent_theme_file_path( 'assets/css/button-outline.css' ),
)
);
}
endif;
add_action( 'init', 'twentytwentyfour_block_stylesheets' );
/**
* Register pattern categories.
*/
if ( ! function_exists( 'twentytwentyfour_pattern_categories' ) ) :
/**
* Registers pattern categories.
*
* @since Twenty Twenty-Four 1.0
* @return void
*/
function twentytwentyfour_pattern_categories() {
register_block_pattern_category(
'twentytwentyfour_page',
array(
'label' => _x( 'Pages', 'Block pattern category', 'twentytwentyfour' ),
'description' => __( 'A collection of full page layouts.', 'twentytwentyfour' ),
)
);
}
endif;
add_action( 'init', 'twentytwentyfour_pattern_categories' );
<p>The post Beyond the Hype: How Data Science Turns Raw Information into Real-World Gold first appeared on SANDIP KUMAR SINGH.</p>
]]>Data Science: More Than Just Number Crunching
At its core, data science is the multidisciplinary field focused on extracting knowledge and actionable insights from data. It’s the intersection of:
Think of it as detective work on a massive scale. A data scientist gathers clues (data), analyzes them using sophisticated tools (statistics, ML), uncovers hidden patterns (insights), and presents a compelling case (visualization, recommendations) to solve a problem or seize an opportunity.
Why Does Data Science Matter? It’s Everywhere!
You interact with data science daily, often without realizing it:
The Data Science Workflow: From Question to Impact
It’s rarely a linear path, but a typical data science project involves these key phases (often visualized as the CRISP-DM model):
The Toolkit: What Powers Data Science?
Data scientists wield a powerful arsenal:
The Future & The Responsibility
Data science is rapidly evolving. We’re seeing advancements in deep learning, natural language processing, computer vision, and automated machine learning (AutoML). However, with great power comes great responsibility:
Ready to Dive In?
Data science isn’t just for PhDs anymore. The barrier to entry is lowering with abundant online resources, courses, and powerful open-source tools. Whether you want to:
…data science offers a fascinating and impactful path. It’s the art and science of turning the overwhelming flood of data into a stream of valuable insights, driving innovation and smarter decisions across every sector. The data is out there – the question is, what story will you uncover?
What data science application fascinates you the most? Share your thoughts in the comments!
<p>The post Beyond the Hype: How Data Science Turns Raw Information into Real-World Gold first appeared on SANDIP KUMAR SINGH.</p>
]]><p>The post Program of reverse of a number in c,java,python first appeared on SANDIP KUMAR SINGH.</p>
]]>algorithm to reverse a number can be described using the following steps:
reversedNumber, and set it to 0.% with 10. Let’s call this digit remainder.reversedNumber by 10 and add the remainder to it. This step appends the remainder digit to the reversed number.reversedNumber will be the reversed form of the original number.#include <stdio.h>
int reverseNumber(int number) {
int reversedNumber = 0;
while (number != 0) {
int remainder = number % 10;
reversedNumber = reversedNumber * 10 + remainder;
number /= 10;
}
return reversedNumber;
}
int main() {
int number;
printf("Enter a number: ");
scanf("%d", &number);
int reversedNumber = reverseNumber(number);
printf("Reversed number: %d\n", reversedNumber);
return 0;
}
the reverseNumber() function takes an integer as input and reverses it. It uses a while loop to extract the digits of the number one by one and builds the reversed number by multiplying the current reversed number by 10 and adding the extracted digit. Finally, the reversed number is returned.
In the main() function, the user is prompted to enter a number. The scanf() function is used to read the input and store it in the number variable. Then, the reverseNumber() function is called, passing the number as an argument. The reversed number is stored in the reversedNumber variable and printed using printf().
#include <iostream>
int reverseNumber(int number) {
int reversedNumber = 0;
while (number != 0) {
int remainder = number % 10;
reversedNumber = reversedNumber * 10 + remainder;
number /= 10;
}
return reversedNumber;
}
int main() {
int number;
std::cout << "Enter a number: ";
std::cin >> number;
int reversedNumber = reverseNumber(number);
std::cout << "Reversed number: " << reversedNumber << std::endl;
return 0;
}
we use similar logic as the C program to reverse the number. The reverseNumber() function takes an integer as input, reverses it, and returns the reversed number.
In the main() function, the user is prompted to enter a number using std::cout. The input is then read using std::cin and stored in the number variable. The reverseNumber() function is called, passing the number as an argument. The reversed number is stored in the reversedNumber variable.
Finally, the reversed number is printed to the console using std::cout along with std::endl.
import java.util.Scanner;
public class ReverseNumber {
public static int reverseNumber(int number) {
int reversedNumber = 0;
while (number != 0) {
int remainder = number % 10;
reversedNumber = reversedNumber * 10 + remainder;
number /= 10;
}
return reversedNumber;
}
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter a number: ");
int number = scanner.nextInt();
int reversedNumber = reverseNumber(number);
System.out.println("Reversed number: " + reversedNumber);
}
}
we define a class called ReverseNumber. It has a reverseNumber() method that takes an integer as input, reverses it, and returns the reversed number.
In the main() method, we create a Scanner object to read user input. The user is prompted to enter a number using System.out.print(), and the input is read using scanner.nextInt() and stored in the number variable.
Then, we call the reverseNumber() method, passing the number as an argument. The reversed number is stored in the reversedNumber variable.
Finally, we print the reversed number to the console using System.out.println().
def reverse_number(number):
reversed_number = 0
while number != 0:
remainder = number % 10
reversed_number = reversed_number * 10 + remainder
number //= 10
return reversed_number
number = int(input("Enter a number: "))
reversed_number = reverse_number(number)
print("Reversed number:", reversed_number)
we define a function called reverse_number() that takes an integer as input, reverses it, and returns the reversed number.
We use a while loop to extract the digits of the number one by one. Inside the loop, we calculate the remainder by using the modulo operator % with 10. We then update the reversed_number variable by multiplying it by 10 and adding the remainder. Finally, we update the number by using integer division // with 10 to remove the last digit.
In the main part of the code, we prompt the user to enter a number using the input() function and convert it to an integer using int(). We then call the reverse_number() function, passing the number as an argument. The reversed number is stored in the reversed_number variable.
<p>The post Program of reverse of a number in c,java,python first appeared on SANDIP KUMAR SINGH.</p>
]]><p>The post Write a Program to find the factorial of a given number in C , java , python first appeared on SANDIP KUMAR SINGH.</p>
]]>factorial = 1
input number
if number < 0:
display "Factorial is not defined for negative numbers."
else:
loop_var = 1
while loop_var <= number:
factorial = factorial * loop_var
increment loop_var by 1
display factorial
#include <stdio.h>
int factorial(int n) {
if (n == 0 || n == 1)
return 1;
else
return n * factorial(n - 1);
}
int main() {
int num;
printf("Enter a number: ");
scanf("%d", &num);
if (num < 0) {
printf("Factorial is not defined for negative numbers.\n");
} else {
int result = factorial(num);
printf("Factorial of %d is %d.\n", num, result);
}
return 0;
}
In this program, the factorial() function is defined recursively. It checks if the number n is either 0 or 1 (base case), in which case it returns 1. Otherwise, it calls itself with n-1 and multiplies the current number n with the factorial of the smaller value. The function continues this process until it reaches the base case and returns the final factorial value.
#include <iostream>
unsigned long long factorial(int n) {
if (n == 0 || n == 1)
return 1;
else
return n * factorial(n - 1);
}
int main() {
int num;
std::cout << "Enter a number: ";
std::cin >> num;
if (num < 0) {
std::cout << "Factorial is not defined for negative numbers." << std::endl;
} else {
unsigned long long result = factorial(num);
std::cout << "Factorial of " << num << " is " << result << "." << std::endl;
}
return 0;
}
In this program, we have a recursive function factorial() that calculates the factorial of a given number. The main() function prompts the user to enter a number using std::cout and std::cin, and then calls the factorial() function to compute the factorial. The result is then displayed on the console using std::cout.
Please note that the factorial() function assumes that the input number is a non-negative integer. Also, an unsigned long long data type is used to handle larger factorial values to avoid overflow.
import java.util.Scanner;
public class Factorial {
public static int factorial(int n) {
if (n == 0 || n == 1)
return 1;
else
return n * factorial(n - 1);
}
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter a number: ");
int num = scanner.nextInt();
if (num < 0) {
System.out.println("Factorial is not defined for negative numbers.");
} else {
int result = factorial(num);
System.out.println("Factorial of " + num + " is " + result + ".");
}
}
}
In this program, we have a recursive method factorial() that calculates the factorial of a given number. The main() method prompts the user to enter a number, reads it from the standard input using the Scanner class, and then calls the factorial() method to compute the factorial. The result is then displayed on the console.
Please note that the factorial() method assumes that the input number is a non-negative integer.
def factorial(n):
if n == 0 or n == 1:
return 1
else:
return n * factorial(n - 1)
num = int(input("Enter a number: "))
if num < 0:
print("Factorial is not defined for negative numbers.")
else:
result = factorial(num)
print(f"Factorial of {num} is {result}.")
In this program, we define a recursive function factorial() that calculates the factorial of a given number. The input() function is used to prompt the user to enter a number, and the int() function is used to convert the input to an integer. Then, we check if the number is negative. If it is, we display a message indicating that the factorial is not defined for negative numbers. Otherwise, we call the factorial() function to compute the factorial and display the result using f-string formatting.
Please note that the factorial() function assumes that the input number is a non-negative integer.
<p>The post Write a Program to find the factorial of a given number in C , java , python first appeared on SANDIP KUMAR SINGH.</p>
]]>