What do you want to save?
Add Code snippet
New code examples
-
C 2021-11-14 03:36:10
how to make recursive function
// Basic Recursive function // It works in all languages but lets try with C // lets make a greedy strlen int my_recursive_strlen(int index, char *str) // note that index must be set at 0 to work in this case { if (str[index] == '\0') return index... Add solution -
Other 2021-11-14 01:26:09
string not in pwd
The directory I'm trying to cd into is "! js basics" using "cd ! js basics" which won't work. I was able to access the folder by escaping the space using this: \ USE THIS INSTEAD "cd \!\ js\ basics" each \ escapes the com... Add solution -
Shell/Bash 2021-11-13 22:53:15
windows service find command
Note: You need to run the command prompt as an administrator, not just logged in as the administrator, but also with administrative rights. If you get errors above about not having the necessary access rights to stop and/or delete the service, run the com... Add solution -
PHP 2021-11-13 18:20:25
Array and string offset access syntax with curly braces is deprecated in tcpdf.php
//Let's say you have something like this in your code: $str = "test"; echo($str{0}); //since PHP 7.4 curly braces method to get individual characters inside a string has been deprecated, so change the above syntax into this: $str = "test&q... Add solution -
Javascript 2021-11-12 12:36:14
local storage check max size
//run this in dev console to test how much local storage you have try { // Test up to 20 MB for (var i = 250; i <= 20000; i += 250) { localStorage.setItem('test', new Array((i * 1024) + 1).join('a')); } } catch (e) { localStorage.removeItem('test... Add solution -
Html 2021-11-12 10:28:16
differences between html and xhtml
In HTML, you can do this: <meta charset="UTF-8"> and <meta charset="UTF-8" /> In XHTML you have to do this: <meta charset="UTF-8" /> You can also do this in XHTML: <custom-tag /> but you can't in HTML. Add solution -
Other 2021-11-12 09:20:36
My favourite use of this function is converting a string to an array, trimming each line and removing empty lines:
<?php $array = array_filter(array_map('trim', explode("\n", $string)), 'strlen'); ?> Although it states clearly that array keys are preserved, it's important to note this includes numerically indexed arrays. You can't use a for loop on ... Add solution
Best helpers
+10
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5