Write a c program to split an array from specified position and add first part to the end in the reverse order. Sample run: I/O: arr1[]={7,8,31,60,11,54} Position to split an array: 3 O/P: arr1[]={60,11,54,31,8,7}
Hi everyone! CMQ: How would you describe your annoyance to answers which troll question by taking them literally (such as an answer like print("A christmas tree") for a question requiring to print A christmas tree)? (Try to be creative)
Compile Commentscript
Commentscript is a variant on Javascript that I made up for the purpose of this question. Only commented-out code is evaluated.
Javascript has two types of comments:
// this is a single line comment, which starts with `//` and ends on a newline.
/*
This is a multiline comme...
I've tried this questions on two forums and have been told this is the best place for this type of question.
I trying to print from 0 to 1000 then back to 0 again (and all numbers in-between, printing 1000 only once also each number must be on a separate line using vanilla php.
my current code is...
@ChartZBelatedly OK, I should have stated it differently. I do take a break from actively chatting between 01 and 05, but my laptop is next to my bed and I have "ping when mentioned" on, so…
Build a Markdown to HTML converter
code-golf string
The Stack Exchange network uses Markdown as the syntax for writing posts. For example, using a # at the beginning of a line creates a heading (<h1>) while two hashes ## creates a subheading (<h2>).
Your task is to write a program which takes inp...
Could I have some feedback on my sandboxed challenge?
@Wasif if I changed it to "html to markdown" presumably it would not be a duplicate, seeing as a search for "html to markdown" returned no relevant results
4 years ago, we voted on and appointed additional room owners for The Nineteenth Byte. That was the most recent time TNB has had new room owners. Currently, only 2 of the room owners are able to be pinged if needed, and one of those 2 hasn't been active since October 2020.
The need for active roo...
No, there's a thing in Chrome where if you overscroll to either side on any website it'll do the same thing as the back/forward buttons, so if you're scrolling through a really wide text box you'll almost always accidentally go back to the previous page and lose your place
@pxeger So true, and the quality of SO posts is declining rapidly, I answered SO questions for a while in late 2020 but then quit because of virtually no support from SE and the quality of questions. least we still have ppcg
@RedwolfPrograms I never really understood the point of it... while scrolling through code on ppcg I would often go back accidentally
It's not too bad with touchscreen but I have no idea why they made it apply to mouse/touchpad as well. I wonder if it can be overridden with some sort of CSS or JS thing that a userscript can add...
Nope, tried all of the overscroll properties in CSS, and you can't e.preventDefault() or e.stopPropagation()
I don't understand why any piece of software would remove options, especially ones that don't require much effort to maintain
@RedwolfPrograms what about adding some element to the far left of the screen with a scrollbar just visible, then adding overscroll-behavior none on it?
It seems like Chrome doesn't care about the overscroll properties at all for the back/forward gesture. You'd probably have to capture the scroll event somehow, or have it scroll by a pixel then reset it immediately.
@RedwolfPrograms with top/bottom it works, but with left right not so much. One of the websites I wrote, top bottom detected overscroll properly, but left right failed. If there's a DOM event for "back", we could capture it
Your program should compute the number of moves it takes a chess knight to reach each square of the chess board. The input will be two space-separated integers representing coordinates of the starting square (horizontal then vertical coordinate, 0-7 inclusive each). Your program should output a...
Recently had a coding challenge that went something like this. You're fixing a road, and the truck moves in units of 3. Given a string provided, where "X" indicates parts of the road needing to be fixed, and "." indicates areas that don't need to be fixed, what is the minimum number of steps requ...
I ask because I'm answering an old inactive question which currently has 6 answers, so does that mean that my answer would qualify for the 4 to 6 bracket?
@user Coolio :) Oh, and so that I don't run you dry from bounties, I'm happy to claim the "not explained" amount when I claim bounties, even with explanations :)
"caird coinheringaahing" comes from this Jelly answer. Given that the answer is written in Jelly (my primary language on the site), and the challenge is very much about the site, I thought that it'd be a fun, unique username that references the site.
And it should be pronounced "cared co-in-hear-...
I have a teapot with a builtin "leaf filter" that uses loose tea leaves, makes the best tea I've ever had. I just can't be bothered to get it out for the occasional cup, you need to be providing tea for a minimum of 4 people to justify it :P
Write a program that will determine if a given matrix represents a quandle. A quandle is a set equipped with a single (non-commutative, non-associative) operation \$◃\$ which obeys the following axioms:
The operation is closed, meaning that \$a◃b = c\$ is always an element of the set if \$a\$ a...
In this challenge, the task is to write a program or function which simulates a number of people walking. Input will be some representation of the people's positions on a 2d grid, and one of four directions (or none) for each.
The movement follows a few rules:
No person can walk into a space occ...
@RedwolfPrograms I don't think so. If a comment is way too short, it is probably not worth it anyway (other than answering a yes/no question from others, but how hard is it to rephrase it into a slightly longer sentence?)
I swear, if a Jelly answer reaches a certain number of votes (8 or 9 usually), it's a guarantee it'll get a "This isn't actually X bytes, it's X characters" comment :/
Nah, that's the "poll" button. It asks 10k+ users if they agree or not :P
I think it must say "5 characters", bytes may vary depending on the encoding (and as I see these arent ascii), or im wrong? actually enconding that uses 11 bytes in utf8 — UselesssCat14 mins ago
Meh, I made it as far as `Long.MAX_VALUE` once, although I made a program for it :P ``` for (long i = 0; i <= Long.MAX_VALUE; i ++) System.out.println(i); ```
Notes:
Answers will occasionally be moved to the Sandbox archive when there are too many of them. When using them to report bugs, keep an eye on the post.
This site, Meta Stack Exchange, is usually used as a "test bed" for pending changes happening to the way text is rendered on all network...