Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read
Q&A

Posts tagged function

1 child tag

Use for questions dealing with functions. Functions (or methods, routines, subroutines) are portions of code that typically perform a single, specific task.

This tag doesn't have a detailed wiki yet.

45%
+3 −4
Q&A Create a list of Niven numbers in Python

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...

2 answers  ·  posted 3mo ago by General Sebast1an‭  ·  last activity 3mo ago by Dirk Herrmann‭

Question python function
57%
+2 −1
Q&A How to pass in a readable file (stream) to a Zig function?

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...

0 answers  ·  posted 5mo ago by aghast‭

77%
+5 −0
Q&A noreturn function with non-void return type

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 ...

1 answer  ·  posted 10mo ago by alx‭  ·  edited 10mo ago by alx‭

60%
+1 −0
Q&A What input functions can I use in TIO's PHP?

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...

1 answer  ·  posted 1y ago by General Sebast1an‭  ·  last activity 1y ago by hkotsubo‭

Question php function input
66%
+4 −1
Q&A Is it possible to mutate the DOM directly from HTML, without any JavaScript?

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...

2 answers  ·  posted 1y ago by deleted user  ·  last activity 1y ago by nelson777‭

Question function html dom
57%
+2 −1
Q&A Function.prototype.call()

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); ...

1 answer  ·  posted 1y ago by deleted user  ·  edited 1y ago by Alexei‭

66%
+4 −1
Q&A How to get string length in D?

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...

3 answers  ·  posted 1y ago by General Sebast1an‭  ·  last activity 1y ago by hkotsubo‭

Question string function d
33%
+1 −4
Q&A How to call a function from ruby-on-rails (HTML)?

Let I have a button &lt;button type="button" onclick = "myfunction()" class="collapsible"&gt;Expand content&lt;/button&gt; And, I have a JS function. function collapse() { var coll = docu...

1 answer  ·  posted 1y ago by deleted user  ·  last activity 1y ago by Kevin M. Mansour‭

66%
+4 −1
Q&A BMPL: The language I'll bring to life

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 ...

1 answer  ·  posted 1y ago by General Sebast1an‭  ·  last activity 1y ago by Lundin‭

81%
+7 −0
Q&A Function call; `this` gets bound to unexpected value

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...

2 answers  ·  posted 2y ago by Gershy‭  ·  last activity 2y ago by Alexei‭