FIND YOUR NEXT FEW LINES

Results for “cd”

Small, practical examples. Search by task or narrow things down below.

27 snippets foundClear filters
CSmall algorithms & bit operations

Calculate a least common multiple using a GCD

C: Divide before multiplying to reduce the risk of intermediate overflow.

C✓ Tested
CSmall algorithms & bit operations

Calculate the greatest common divisor

C: Euclid’s algorithm repeatedly replaces a pair with the divisor and remainder.

C✓ Tested
Linux CommandsGetting Started

Enter and leave a practice directory

Linux Commands: Enter and leave a practice directory using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
PythonNumbers & calculations

Find common factors and multiples

Python: Use the integer gcd and lcm helpers to avoid floating-point calculations.

Python✓ Tested
JavaPrecise numeric calculations

Find the greatest common divisor

Java: BigInteger.gcd calculates an exact nonnegative common divisor.

Java✓ Tested
C++Numeric parsing & calculations

Find the greatest common divisor with the standard library

C++: std::gcd computes a nonnegative integer common divisor.

C++✓ Tested
jQueryDOM & classes

Append a list item

Build a jQuery element with text and append it safely.

jQuery✓ Tested
jQueryDOM & classes

Clear an element

Remove child content while keeping the jQuery-selected container.

jQuery✓ Tested
jQueryText & attributes

Disable a button

Set the live disabled property with jQuery prop.

jQuery✓ Tested
jQueryTraversal & selection

Filter a selection

Reduce a jQuery selection to elements with a matching class.

jQuery✓ Tested
jQueryTraversal & selection

Find descendants

Select only matching descendants of a jQuery container.

jQuery✓ Tested
jQueryTraversal & selection

Find the nearest matching ancestor

Read a parent row attribute using jQuery closest.

jQuery✓ Tested