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
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
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
Results tagged with Search options user 30793

A competition to solve a particular problem through the usage and manipulation of strings.

10
votes
JavaScript (ES6), 156 154 152 148 145 141 140 bytes Thanks @Neil (6 bytes), @ETHproductions (3 bytes), and @edc65 (7 bytes) a=>a[r='replace'](/`|'/g,a='')[r](/[a-z](?=[A-Z][a-z])/g,'$& ')[r](/[^\W_] …
answered Mar 2 '16 by Mwr247
3
votes
JAVASCRIPT, 33911 $0123456789ABCDEFGHIJKLMNOPQRS=>/**/('#')+('JAVASCRIPT,')+(" ")+(($)/**/=0,($0123456789ABCDEFGHIJKLMNOPQRS[`split`]``[`map`]/**/(($$,$$$)/**/=>/**/($)/**/=Math[`pow`]/**/($012345678 …
answered Sep 29 '15 by Mwr247
1
vote
JavaScript (ES6), 93 115 bytes alert(prompt(x=[...'DIEI1NA1G1REASEF1IRE',i=0]).replace(/\b./g,a=>i<20&&a.match(x[i])?(+x[++i]?i++&&` `:` `)+a:a)) I used replace to step through the string, with a … match for /\b./g so as to only find characters that either followed a space or began the string. Then I checked each character to see if it matched the current index in the array I was looking for …
answered Jan 14 '16 by Mwr247
7
votes
[L]?T.slice(0,L-2).replace(/([ -][^ -]*|.)$/,'...'):T First argument is the string, second is the length. Special thanks to edc65 for the length check optimization! Here's the original code (123 …
answered Sep 28 '15 by Mwr247
1
vote
Node.js (ES6), 45 44 bytes s=>![...Buffer(s)].some((b,c,d)=>b+c-d[0]&1) The Buffer object saved me alot of trouble over charCodeAt(). Also felt like including my attempts via JavaScript (ES6), tho …
answered Oct 13 '16 by Mwr247
2
votes
?/**/(($)+=/**/((/**/String … which is the actual program encoded into that 0/1 string, and the rest simply to decode it. It works by getting the index of each '1' minus the index of the previous '1' to get the necessary character …
answered Oct 1 '15 by Mwr247
15
votes
13answers
of JavaScript code to be used as an example: function decimalDay(hms) { var x, h, m, s; if (typeof hms === 'string' && hms.indexOf(':') > -1) { x = hms.split(':'); return (x …
asked Jul 9 '15 by Mwr247
2
votes
JavaScript (ES6), 169 bytes a=>[...(a=a.split` `)[0]].map((b,c)=>(d={' ':0,'|':1,'_':2})[b]+d[a[1][c]]*2+d[a[2][c]]).join``.split(0).map(b=>[343,3,182,83,243,281,381,23,383,283].indexOf(+b)).join`` …
answered Feb 16 '16 by Mwr247
1
vote
Node.js (5.6.0), 5104 + 125 + 122 = 5351 I was originally working in JavaScript, but Node.js provides compression much more easily. Thanks Neil for helping trim out 5 bytes on the encoder! Encoder ( …
answered Aug 31 '16 by Mwr247
10
votes
1answer
been deleted. His idea was good, but just needed a little fleshing out. Challenge Write a program or function in the language of your choice that can take an string, and determine if it is considered … "human-friendly", as defined by this challenge. Some further details and rules are as follows: Input will be a string consisting of the 95 printable ascii characters. "human-friendly" shall be …
asked Mar 3 '16 by Mwr247
8
votes
JavaScript (ES6), 50 49 20 bytes (no bonuses) a=>a+[5,6,6,11][a%4] The algorithm by @martin proves to be much smaller, so I went with it. I chose a mathematical approach because JavaScript tends t …
answered Dec 15 '15 by Mwr247
7
votes
Javascript (ES6), 119 104 99 98 bytes for(i=new Date%18+3,s=i&1?`! <3`:`. </3`;i--;)s=`... Loves me`+(i&1?' not':'')+s alert(s.slice(4))
answered Sep 15 '15 by Mwr247
1
vote
JavaScript (ES6), 99 87 79 78 bytes x=>(y='abcdefghijklmnopqrstuvwxyz',parseInt(x,36)>9?x>'`'?y:y.toUpperCase():x) Uses the short array fill trick to allocate space, then just math and String.fromC …
answered Dec 23 '15 by Mwr247
2
votes
JavaScript (ES6), 245 210 bytes a=>(p={},a.map(b=>p[b[0]]=0),(a.map(b=>b[1].match(/@[a-z]{3,}|^:\d+/gi)||[]).map(c=>c.map(d=>(z=(d[0]=='@'?(y=Object.keys(p).filter(e=>e.startsWith(d.slice(1)))).lengt …
answered Feb 29 '16 by Mwr247
2
votes
JavaScript (ES6), 172 170 bytes a=>b=>`\\begin{tabular}{${'|c'[r='repeat'](++b)}|} \\cline{2-${b--}} \\multicolumn{1}{c|}{} ${('& '[r](b)+`\\\\ \\hline `)[r](a+1).trim()} \\end{tabula …
answered Feb 24 '16 by Mwr247

15 30 50 per page