What do you want to save?
Add Code snippet
New code examples
-
SQL 2022-03-27 07:35:07
AND OR NOT operators sql
-----------------------SQL AND, OR, NOT OPERATORS------------------------------ AND: this operator displays a record if all conditions seperated by AND are true. OR: this operator displays a record if any of the conditions seperated by OR is true. NOT: th... Add solution -
Javascript 2022-02-26 17:05:01
5.3.1.3. Logical NOT¶
/*The logical NOT operator, !, takes only a single operand and reverses its boolean value.*/ console.log(! true); console.log(! false); //false //true console.log( !(5 > 7) ); console.log( !('dog' === 'cat') ); //true //false /*The operator ! (s... Add solution -
Javascript 2021-10-12 22:26:10
javascript count number of times character appears in string
You could remove any other character in the string and check the length: str.replace(/[^aA]/g, "").length Here it is counted how many as are in str. The RegExp is described below: [ // Start Character Group ^ // Not operator in character group... Add solution -
C++ 2021-09-06 07:28:03
bit masking tricks
Setting a bit Use the bitwise OR operator (|) to set a bit. number |= 1UL << n; That will set the nth bit of number. n should be zero, if you want to set the 1st bit and so on upto n-1, if you want to set the nth bit. Use 1ULL if number is wider t... Add solution