@Neil crap that is the problem. it's because I implemented the preset variables badly (not as presets, but as defaults). scopes don't count those as existing variables which is why that happens. brb fixing
@Neil hmm. actually, should this be the case for preset variables too (well, those other than inputs)
CMQ: How do I access a thing from a server using javascript on a website if there's some CORS error thing or something
Failed to load queried-source.com: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://my-site-origin.com' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
for example, if you don't want to serve your images on other websites, you basically say "don't load this image on domains other than my own", and browsers will respect that
but its more for security. It's so you can't ajax a webpage (with a form token), and then use that token to make a POST request you shouldn't be able to do
@user202729 1. SE isn't perfect; I got my account deleted for age violations when I was a month off of 15 once. 2. don't talk publicly about suspensions [don't reply to this because that's just further extending the conversation about someone's suspension].
@quartata would you happen to know where docs are that specify how @property generates the names for the getter/setters?
./out.itf.h:3:12: warning: class '__vsl_ocpp_UIApplicationDelegate' defined without specifying a base class [-Wobjc-root-class]
@interface __vsl_ocpp_UIApplicationDelegate : UIApplicationDelegate {
^
./out.itf.h:3:44: note: add a super class to fix this problem
@interface __vsl_ocpp_UIApplicationDelegate : UIApplicationDelegate {
^
: NSObject
How far can I throw the ball?
code-golfmathnumbergeometry
Given an initial velocity and an angle, determine how far my ball will go before it hits the ground.
Inputs
The velocity the ball is thrown at (m/s)
The angle from the ground that the ball is thrown at (radians)
Output
The numbe...
Suppose I have an array of positive integers. It is required to bundle integers into certain subsets to maximize score.
Each set has a certain score associated with it.
For example
${1, 2, 3} = 10 $ , $ {3,4,5} = 1000 $ ,
$ { 1} = 1 $ etc.
Now one has array iof integers. One can solve the pr...
I have two values which are min and max. Between these two values, I want to generate a series with patterned growth of n steps. For example I have 0.001 and 1000. Between these two values, I want 30 values. You can think these values are Zoom factor.
Any idea to get that series in C# or any oth...
Circular Limited Sums code-golf restricted-time
Challenge
Let's imagine an integer-to-integer mapping F(n) on 1 <= n <= N and 0 <= F(n) <= M. There are (M + 1) ** N possible definitions of F in total.
Out of those definitions, how many Fs satisfy all of the following inequalities?
F(n) + F(n...
I don’t think it’s the Java-length built-in names that make Swift ungolfy, I think it’s the function definition style and the very strict type system. Many things also require the use of import Foundation or some other standard library module, and that sucks for golfing purposes. Other than that, String and Array slicing are incredibly, incredibly annoying and the fact that some functions don’t automatically cast ints to doubles or to floats or vice-versa too :/
Code 39 barcode encoder
Write a function or program that encodes a string into a Code 39 format barcode, where each character is encoded as five bars separated by four gaps. Either two of the bars and one of the gaps are wide and others are narrow, or three of the gaps are wide and none of the b...
PPCG Generalist Countdown
Write a function or program that takes no input and returns or oututs the current minimum number of new questions required for PPCG to hand out Generalist badges.
The badges are handed out when the top 40 tags (measured by question count) each have at least 200 questio...
@ASCII-only .map{_ in"9"} maps the closure {_ in"9"} over the given sequence. _ in just lets the compiler know that the closure will not use its variable, and "9" is just a literal. Basically each element gets mapped to "9" :P
Integers as "polynomials"
Suppose we use successive digits of an non-negative integer for coefficient, base and power respectively and construct a "polynomial". For a 4-digit number we'll have:
abcd -> a*b^c + b*c^d + c*d^a + d*a^c.
Each digit must go through the three roles exactly once. For...
This syntax is useful when you also map inside the closure. Example: You cannot use {(...).map{$0+$0}} as that is ambiguous, but you can use {a in(...).map{$0+a}}
@ASCII-only Actually r/ooer is mentioned quite frequently here. Sad that some Reddit update removed old CSS, because other funny CSS destroying subs are mentioned there too.
A constructible n-gon is a regular polygon with n sides that you can construct with only a compass and an unmarked ruler.
As stated by Gauss, the only n for which a n-gon is constructible is a product of any number of distinct Fermat primes and a power of 2 (ie. n = 2^k * p1 * p2 * ... with k be...
One way to construct a regular heptadecagon starts with drawing a horizontal line of length 1 from the center to a vertex. Then the distance along that line from the center to the second vertex is cos(2π/17). All other vertices are easy to get.
The goal of this challenge is to print (or produce ...
we don't understand the brain well enough to know whether or not a human is TC. We always determine TC based on the model of computation, so we would need a similar model for a brain (aka, defining a brain in mathematical terms)
In physics, the Bekenstein bound is an upper limit on the entropy S, or information I, that can be contained within a given finite region of space which has a finite amount of energy—or conversely, the maximum amount of information required to perfectly describe a given physical system down to the quantum level. It implies that the information of a physical system, or the information necessary to perfectly describe that system, must be finite if the region of space and the energy is finite. In computer science, this implies that there is a maximum information-processing rate (Bremermann's limit...
Should the p command be considered cheating in Funge-98 quines?
I'm asking because:
Unlike the g command it does not read source code, so it doesn't break "No reading source code" rule.
But it does modify source code so it may be considered cheating?
Challenge :
Check if the given number forms a number staircase or not
Input :
A integer (greater than 0 and not decimal)
Output :
a truthy / falsy value depending on whether the number forms a staircase or not
Number staircase :
A number staircase is an integer that , when read from ...
@Adám It is possible to create FSMs that are capable of evaluating some BF. Humans are not capable of evaluating all BF programs because I don't know about you but I can't remember a potentially infinite number of things.
this is why we need a model of computation. For programming languages we have this model, and we assume an infinite computer. We could do the same if we had a model of computation for a human
Could you say that, given that people can construct an infinite number of, well, numbers, then people can actually remember an infinite number of things?
@WhatWizard My point is more just that if you're going to say X isn't TC because <insert physical limitation>, then nothing could ever possibly be TC. It's only useful to talk about TCness when you're talking about abstract computational models
Turing was first and foremost a mathematician. He was also a computer programmer, computer engineer, cryptanalyst, and biochemist, but above all else he was a mathematician. Math itself is inherently abstract, and TCness is squarely in the realm of abstract numbers
On a semi-related note, I recently (like a week ago) wrote a paper on Turing and the history of computers. It was interesting learning more about Turing's life and works given all the talk we do about him here
@NathanMerrill That would be really cool, but so far outside of my domain that I don't even know how feasible that is or where to start with that
How does cells use the DNA inside them? I am looking on DNA as a strip of tape of Turing machine, but with machines its easy. I can read the tape and calculate the behavior of that machine. With cells its different we don't really understand the language of DNA.
So instead of trying to understa...
I'm trying to do hello world without numbers. I feel like i'm cheating
Hello: ; This is the world "Hello" encoded as x86 instructions. rex.W gs ins BYTE PTR es:[rdi],dx ins BYTE PTR es:[rdi],dx outs dx,DWORD PTR ds:[rsi] Wd: push rdi fs
hmm
NASM doesn't like a lone rex.W (read: unrecognized)
@Adám It looks rather awful right now. I don't want to know what monstrosity lives under it on the backend. In the JS you can see commenting in both Spanish and English