Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Posts tagged function
There's this new challenge on Code Golf CD and I'm using Python to do it. A little bit of golfing already took place, so the code might look a bit messy for you. Anyway, I'm proud of what I've writ...
Most of the example code in the Zig online docs is in the form of test blocks. Sadly, this means there aren't quite enough examples of how to write functions. Given that one has a readable file, p...
Is it legal ISO C to declare a function as noreturn with a non-void return type (but of course not actually returning)? As far as I can read from the standard, it seems legal. Example: noreturn ...
Try It Online! is an online interpreter for many supported languages, including PHP. I'm trying to solve coding challenges using the language, specifically "Hello, {name}!". In PHP, you can litera...
All the ways I know of to mutate a DOM are JavaScript. Just for broadening general knowledge I want to know if there is any common way to mutate the DOM via HTML itself, without involving any Java...
#include <iostream> using namespace std; int linearSearch(int array[], int n, int key){ for(int i=0;i<=n;i++){ if(array[i]==key){ return i; } } } int main() { int ...
I wanted to print to browser console the number of li list items of a given ul list. This didn't work (console output was undefined): console.log(document.querySelectorAll(".example").length); ...
I'm new to D and am planning to use it for golfing. I want to make a ROT13 converter and I want to determine the length of an inputted string. Is there a function for this? If not, what ways can I...
Let I have a button <button type="button" onclick = "myfunction()" class="collapsible">Expand content</button> And, I have a JS function. function collapse() { var coll = docu...
Last year, I started working on a language I named SuperCode but then decided BMPL (Builder's Multi-Purpose Language) as the final name. The language would be written using C and up until now, the ...
I recently encountered a strange situation in javascript; if I have: let obj = { a: function() { return (this === obj) ? this.b : 'bye'; }, b: 'hello' }; I can call obj.a with this bound...