theprogrammingexpert.com Open in urlscan Pro
2a06:98c1:3121::3  Public Scan

Submitted URL: http://theprogrammingexpert.com/
Effective URL: https://theprogrammingexpert.com/
Submission: On August 15 via manual from CH — Scanned from DE

Form analysis 1 forms found in the DOM

GET https://theprogrammingexpert.com/

<form class="search-form" method="get" action="https://theprogrammingexpert.com/" role="search"><label class="search-form-label screen-reader-text" for="searchform-1">Search this website</label><input class="search-form-input" type="search" name="s"
    id="searchform-1" placeholder="Search this website"><input class="search-form-submit" type="submit" value="Search">
  <meta content="https://theprogrammingexpert.com/?s={s}">
</form>

Text Content

🌎 DE EN FR ES IT HR SV SR SL NL
âś•


🍪 DATENSCHUTZ & TRANSPARENZ

Wir und unsere Partner verwenden Cookies, um Informationen auf einem Gerät
speichern und/oder abrufen zu können. Wir und unsere Partner verwenden Daten für
Personalisierte Anzeigen und Inhalte, Anzeigen- und Inhaltsmessungen,
Erkenntnisse ĂĽber Zielgruppen und Produktentwicklungen. Ein Beispiel fĂĽr Daten,
welche verarbeitet werden, kann eine in einem Cookie gespeicherte eindeutige
Kennung sein. Einige unserer Partner können Ihre Daten im Rahmen ihrer legitimen
Geschäftsinteressen verarbeiten, ohne Ihre Zustimmung einzuholen. Um die
Verwendungszwecke einzusehen, fĂĽr die diese ihrer Meinung nach ein berechtigtes
Interesse haben, oder um dieser Datenverarbeitung zu widersprechen, verwenden
Sie den unten stehenden Link zur Anbieterliste. Die ĂĽbermittelte Einwilligung
wird nur fĂĽr die von dieser Webseite ausgehende Datenverarbeitung verwendet.
Wenn Sie Ihre Einstellungen ändern oder Ihre Einwilligung jederzeit widerrufen
möchten, finden Sie den Link dazu in unserer Datenschutzerklärung, die von
unserer Homepage aus zugänglich ist.



Einstellungen verwalten Weiter mit den empfohlenen Cookies

Anbieter-Liste | Datenschutzerklärung

 * Skip to primary navigation
 * Skip to main content
 * Skip to primary sidebar

The Programming Expert

Solving All of Your Programming Headaches

Menu
 * Home
 * Learn to Code Submenu
   * Python
   * JavaScript
 * Code Snippets Submenu
   * HTML
   * JavaScript
   * jQuery
   * PHP
   * Python
   * SAS
   * Ruby
 * About


THE PROGRAMMING EXPERT


THE PROGRAMMING EXPERT


CODE SNIPPETS TO HELP YOU SOLVE YOUR PROGRAMMING HEADACHES FAST

Find Solutions for Your Programs in Python, PHP, HTML, SAS, JavaScript and more.




BECOME AN EXPERT PROGRAMMER THROUGH INTERACTIVE EXAMPLES

JavaScript
jQuery
Python
PHP
HTML
SAS
VBA



JavaScript – Featured Example
How to Rotate an Image using JavaScript

Rotate image







<div id="div1">
  <img id="image1" src="https://theprogrammingexpert.com/wp-content/uploads/example-img1.png">
  <div id="click-me" onclick="rotateImage()">Rotate image</div>
</div>

<script>

var rotateDegrees = 0;  
function rotateImage(){
  rotateDegrees += 30;
  document.getElementById("image1").style.transform = "rotate(" + rotateDegrees + "deg)";
};

</script>


Copy
See More JavaScript Examples
jQuery – Featured Example
Example of Using the jQuery clone() Method
Clone box






<style>.box{ float: left; width: 50px; height: 50px; background: #7bbfa2; margin-right: 10px; margin-bottom: 10px; }</style>
<div id="div2">
  <div class="box"></div>
</div><div class="clear"></div>
<div id="click-me2" class="click-me">Clone box</div>

<script>
$("#click-me2").click(function(){
  var clonedP = $(".box:first").clone();
  var randomColor = "#" + (Math.floor(Math.random()*16777215).toString(16));
  clonedP.css("background",randomColor)
  clonedP.appendTo("#div2");
});
</script>


Copy
See More jQuery Examples
Python – Featured Example
Reverse String with Recursion in Python

string = "Hello"

def reverse_string(string):
    if len(string) == 1:
        return string
    return reverse_string(string[1:]) + string[0:1]

print(reverse_string(string))

#Output:
olleH

Copy
See More Python Examples
PHP – Featured Example
How to Check If String Contains Substring in PHP

$string = "I love to program!";
$substring = "program";

$result = str_contains($string,$substring)   /* $result = true */

Copy
See More PHP Examples
HTML – Featured Example
HTML Scrollable Div with Dynamic Content
This is a scrollable div

Keep clicking the button below to add enough divs to show the scrollbar.

Add text






<style>#div5 { height: 100px; width:300px; overflow-y: auto; border: 1px solid #444; padding: 5px; }</style>
<div id="div5">
  <div id="div6">This is a scrollable div</div>
</div>
<p>Keep clicking the button below to add enough divs to show the scrollbar.</p>
<div id="click-me">Add text</div>

<script>

$("#click-me").click(function(){
  $('<div class="new-div">This is a scrollable div</div>').appendTo("#div5");
});

</script>



Copy
See More HTML Examples
SAS – Featured Example
Generating Random Integers in a Range Using SAS

data k;
    a = 0;
    b = 10;
    do i = 1 to 10;
        rand_int = rand("integer",0,10);
        output;
    end;
run;

Copy
See More SAS Examples
VBA – Featured Example
VBA e – Using Exp() Function to Get Euler’s Constant e

Debug.Print Exp(1); 

'Output:
2.718281828459045

Copy
See More VBA Examples

--------------------------------------------------------------------------------




LEARN HOW TO PROGRAM IN MULTIPLE LANGUAGES

Check out our recent programming articles below.


PYTHON

 * How to Check if Variable Exists in Python
 * Python cosh – Find Hyperbolic Cosine of Number Using math.cosh()
 * Python Check if Float is a Whole Number
 * Touch File Python – How to Touch a File Using Python
 * Check if String is Date in Python


JAVASCRIPT

 * Subtract All Numbers in an Array Using JavaScript
 * Using JavaScript to Remove the First Character From a String
 * Examples Using the JavaScript += Addition Assignment Operator
 * JavaScript atanh – Find Hyperbolic Arctangent of Number
 * Using JavaScript to Get the Height of an Element


JQUERY

 * jQuery insertBefore – Insert Element Before Another Element
 * jQuery clone – Making a Copy of an Element
 * How to Use jQuery to Animate the Font Size of a Paragraph
 * Using jQuery to Add a Sibling to an Element
 * Using jQuery to Change the Font Size of a Paragraph


PHP

 * php array_combine() – Create New Array Given Arrays of Keys and Values
 * php sinh – Find Hyperbolic Sine of Number Using php sinh() Function
 * Get First Element of Array in php
 * PHP Variables Are Preceded by $
 * Remove First Character from String Using php


HTML

 * What is the Correct HTML for Making a Text Input Field?
 * How to Make an HTML List Without Bullets
 * How to Make a Div Scrollable in HTML
 * What Type of HTML List will Automatically Place a Number in Front of the
   Items?
 * How to Call a JavaScript Function From HTML


SAS

 * SAS right() Function – Right Align Character Variables in Data Step
 * SAS trim – Remove All Trailing Blanks from String Variable in Data Step
 * SAS calculated – Use Columns Created from Select in PROC SQL
 * Round Number to Nearest Integer in SAS
 * SAS month function – Get Month from Date Variable




PRIMARY SIDEBAR




ABOUT THE PROGRAMMING EXPERT

Welcome to The Programming Expert. We are a group of US-based programming
professionals who have helped companies build, maintain, and improve everything
from simple websites to large-scale projects.

We built The Programming Expert to help you solve your programming problems with
useful coding methods and functions in various programming languages.


SEARCH

Search this website


LEARN CODING FROM EXPERTS ON UDEMY

Looking to boost your skills and learn how to become a programming expert?

Check out the links below to view Udemy courses for learning to program in the
following languages:

 * Python
 * JavaScript
 * HTML & CSS
 * jQuery
 * PHP
 * SAS



Copyright © 2023 · The Programming Expert · About · Privacy Policy


x