Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
This tag exists for historical reasons. New challenges of the type previously posted under this tag are not welcome.
5
votes
Produce an unexpected word
Python
Inspired by @Roberto's answer.
try: exec('from __future__ import braces')
except Exception as e: print(e.msg)
4
votes
Why isn't it ending?
PowerShell
$i = 1
do {
$i++
} until( $i > 10 )
8
votes
Deletion of a blank line in source code which causes unexpected functionality
PowerShell
This function will add two numbers.
function add ($a, $b) {
$numbers = @($a `
$b)
$numbers| measure -sum| select -expand sum
}
Removing the blank line will caus …
44
votes
Random script that isn't actually random
PowerShell
$names = @{0='John'; 1='Jeff'; 2='Emma'; 3='Steve'; 4='Julie'}
$id = random -maximum $names.Length
$names[$id]
This will always output John.