text
stringlengths 27
997
|
---|
The following article from CNN describes a Michigan police officer being put on administrative leave for having KKK material at his home: https://www.cnn.com/2019/08/10/us/michigan-officer-placed-on-leave-kkk-document-house/index.html. The materials were discovered while a potential buyer was touring his house.
Although I vehemently condemn the KKK, doesn't this officer have the right to display whatever he wants in his home so long as it doesn't actively and deliberately call for violence? Aren't these articles protected under the first amendment? I realize this is an extreme example, and as a police officer his job requires interacting with all races, but unless it can be shown that he's bigoted and that it negatively affected his job performance, isn't it illegal to fire him?
Employers can restrict speech according to company policy while at work, but we all have to go home at some point. Can those restrictions follow us after clocking out? |
What does strength refer to in mathematics? Is it a formal idea? |
Does vegetarianism affect life expectancy?
Is an average vegetarian supposed to live longer just because of their diet? |
What is the difference between an object and a companion object in a class in kotlin?
Example:
```class MyClass {
object Holder {
//something
}
companion object {
//something
}
}
```
I already read that companion object shall be used, if the containing parameters/methods are closely related to its class.
But why is there also the possibility of declaring a normal object in the class? Because it behaves exactly like the companion, but it must have a name.
Is there maybe a difference in its "static" (I'm from the java side) lifecycle? |
I've rooted my phone. Now what? What do I gain from rooting? |
Is there a better way to determine whether a variable in ```Pandas``` and/or ```NumPy``` is ```numeric``` or not ?
I have a self defined ```dictionary``` with ```dtypes``` as keys and ```numeric``` / ```not``` as values. |
I've come across the polynomial algorithm that solves 2SAT. I've found it boggling that 2SAT is in P where all (or many others) of the SAT instances are NP-Complete. What makes this problem different? What makes it so easy (NL-Complete - even easier than P)? |
Why isn't Sectumsempra an Unforgivable Curse? |
How can I add a delay to a program in C#? |
I'm trying to write a Bash script that will overwrite an existing directory. I have a directory ```foo/``` and I am trying to overwrite ```bar/``` with it. But when I do this:
```cp -Rf foo/ bar/
```
a new ```bar/foo/``` directory is created. I don't want that. There are two files in ```foo/```; ```a``` and ```b```. There are files with same names in ```bar/``` as well. I want the ```foo/a``` and ```foo/b``` to replace ```bar/a``` and ```bar/b```. |
Is there a particular reason the elves die off so fast? After the first war against Sauron, I recall the elves being decimated, to the point that they're almost useless army-wise in the trilogy. But I'm guessing men suffered equal or greater losses as well.
Anyways, other races just seem much more capable of repopulating, while is seems like there are incredibly few (if any?) elven children. Considering the fact that elves are immortal, wouldn't their population be the fastest to grow? Also the seem to be perpetually 40 years old, so aren't they eternally fertile as well? Why don't they have more kids and build bigger societies? |
Reasons for being vegetarian or vegan other than ethical reasons? |
My mom has a green card that expires 2028 but has been out of the US in the UK for over a year due to COVID travel restrictions. Can she enter now? |
What is the LXX and why is it so noteworthy that there is a Greek translation of the OT? Wouldn't it be better to directly reference manuscripts in the original languages? |
I have to disable inputs at first and then on click of a link to enable them.
This is what I have tried so far, but it doesn't work.
HTML:
```
```
jQuery:
```$("#edit").click(function(event){
event.preventDefault();
$('.inputDisabled').removeAttr("disabled")
});
```
This shows me ```true``` and then ```false``` but nothing changes for the inputs:
```$("#edit").click(function(event){
alert('');
event.preventDefault();
alert($('.inputDisabled').attr('disabled'));
$('.inputDisabled').removeAttr("disabled");
alert($('.inputDisabled').attr('disabled'));
});
``` |
I'm no expert in darkroom photography, but it seems a little odd that there is a type of light that doesn't affect film or developing paper etc. So why is a dark-room safelight safe? |
With the command:
```ls -la *
```
I can list all my symbolic links.
How can I remove all symbolic links which are linked to a special folder?
For example:
In my directory ```usr/local/bin``` I have the following entries:
```lrwxrwxrwx 1 root root 50 Apr 22 14:52 allneeded -> /usr/local/texlive/2011/bin/x86_64-linux/allneeded
lrwxrwxrwx 1 root root 47 Apr 22 14:52 amstex -> /usr/local/texlive/2011/bin/x86_64-linux/amstex
lrwxrwxrwx 1 root root 24 Apr 23 19:09 arara -> /home/marco/.arara/arara
```
Now I want to remove all links with the path ```/usr/local/texlive/``` |
Did Aztecs know how many continents there are on earth? |
What did the Soviet Union and Russia bring to the ISS? |
What utility can move my Windows boot partition over to another hard drive?
My preference is that it would be really easy.
* Boot into Windows
* Pick drive to move
* Pick target drive
* It copies everything over, and reboots to the correct partition. |
What's the difference between ASCII and Unicode? |
Reasons why healthy people would intentionally want to get infected? |
In The Avengers, the Council contacted Nick Fury and supposedly, they want to nuke Manhattan. Nick didn't agree so they contacted a S.H.I.E.L.D. operative to nuke Manhattan.
When they found out that an unauthorized jet was trying to fly, Nick grabbed a rocket launcher and fired it at the jet, which was a decoy and the real jet was able to escape.
However, why would he do that? If that was the real plane carrying a nuke enough to level Manhattan, wouldn't the nuke explode and destroy the base along with them if he fired a rocket launcher at it? |
Since I created my repository it appears that the tags I have been
creating are not pushed to the repository. When I do ```git tag``` on the
local directory all the tags are present, but when I logon to the
remote repository and do a ```git tag```, only the first few show up.
What could the problem be?. |
How do I add Git submodule to a sub-directory? |
Given that Kohn-Sham DFT is strictly a ground-state method (at 0 K), how is it sufficient to describe materials in real-life applications? |
I don't really get the difference between gain and volume boost.
So if I understand correctly, gain directly boosts a signal from a line or input while volume handles the output. Volume isn't really for boosting either.
Would this mean, in most settings, getting 'close to' as much gain as possible without any hiss/background noise is ideal? |
I recently had someone claim (on an unrelated SE site I won't link to) that it is the responsibility of a player to correctly identify their hand, that what you "call" your hand determines the winner:
For example, you have an Ace, King, Queen, Jack, and Ten. You call your hand and say, "I have a Straight!"
But that was a bad move on your part because you are a novice player and you did not notice that all of your cards are Spades. You actually had a Straight Flush, but now you have lost because one of the remaining players had a Full House.
Your hand has not been determined until you call your hand.
Is this true? Clearly you might play your hand differently if you misunderstand what you have, but I always thought that the cards speak for themselves once they are revealed.
Or would it depend on the specific poker variation/house rules? |
How to get the first item from an associative PHP array? |
Why do people write #!/usr/bin/env python on the first line of a Python script? |
Nowadays each graphic card has some driver in operating system that translates some (typically) standard API such as OpenGL, so that programmers use some standardized API code to tell graphics cards how and what they want to render. (Actually that's already a bit hard-core most programmers really use various game engines that do this for them). In times of old computers - how was this done? Did every programmer of every game implemented all possible various API's that old graphic cards supported? Or did the old game studios from MS-DOS times had their own "game engines" that provided some abstraction when it came to these graphic cards? I remember there were many various card vendors and I remember old games asked me which one I have - so I suppose these games contained code / drivers for all these cards? |
Why is it "behead" and not "dehead"? |
Why do many vinyl albums of classical music have Sides 1 / 4 on the first record and 2 / 3 on the second? An example of this is the RCA Red Seal recording of Beethoven's 9th Symphony by the Boston Symphony Orchestra. |
Why isn't the market dropping like a stone with all the bad news? |
What are Null Pointer Exceptions (```java.lang.NullPointerException```) and what causes them?
What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely? |
In Raiders of the Lost Ark, at the Ark opening ceremony the Nazi troops brings the Ark of the Covenant to the top of the mountain as Belloq said something before opening the Ark. Then they took the sand from the Ark and suddenly spirits coming out from the Ark and they're all killed (except Indy and Marion) by the freed-spirits which came from the Ark. Meanwhile, Indy asks Marion to keep her eyes shut. They didn't see the Ark when it was opened, so they're survived. In that scene what I don't understand is how did Indy know not to look into the Ark when it was opened? |
What is likely to happen when you plug two ends of a network cable to a single switch/router? Will this create problems on the network, or just be ignored? |
What command do I use to find the size of all the files (recursively) in a Linux or Mac OS X directory? |
I've been writing C and C++ code for almost twenty years, but there's one aspect of these languages that I've never really understood. I've obviously used regular casts i.e.
```MyClass *m = (MyClass *)ptr;
```
all over the place, but there seem to be two other types of casts, and I don't know the difference. What's the difference between the following lines of code?
```MyClass *m = (MyClass *)ptr;
MyClass *m = static_cast(ptr);
MyClass *m = dynamic_cast(ptr);
``` |
Why don't toilets use saltwater? |
How do I modify fields inside the new PostgreSQL JSON datatype? |
I find that the survivability and general performance of my party increases massively from levels 1 to 2. At times, level 1 feels like a completely different game from level 2. However, I can't fathom how or why. I think that the availability of healing has something to do with it. From a mechanical perspective, is there any deep reason why level 1 and level 2 seem so radically different? Furthermore, why I do find no similar differences between later levels, such as 6 and 7? |
In my table view I have to scroll to the top. But I cannot guarantee that the first object is going to be section 0, row 0. May be that my table view will start from section number 5.
So I get an exception, when I call:
```[mainTableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO];
```
Is there another way to scroll to the top of table view? |
While in Phd I developed a lot of code that I want to turn into start-up. Can I do this? |
I have heard multiple times in photography, the words Bokeh, and Gaussian Blur. To me, it seems that the words are used almost interchangeably, but in some instances, I have heard them contrasted. What's the difference, and what are the definitions of each of them? |
In 1969, NASA not only went to the moon, but broadcast the whole thing live on TV.
How did they achieve the TV broadcast? What technology did they need to use to send a video and audio signal from the moon to earth? Was there much of a lag? |
Why does "elite" rhyme with "beet" rather than "bite"? |
A lot of ShaderToy demos share the Ray Marching algorithm to render the scene, but they are often written with a very compact style and i can't find any straightforward examples or explanation.
So what is Ray Marching? Some comments suggests that it is a variation of Sphere Tracing. What are the computational advantages of a such approach? |
Is martial arts training 'inadequate' for the real world? |
Make a single page landscape in Google Documents |
PHP is writing this error in the logs: "Notice: Use of undefined constant".
Error in logs:
```PHP Notice: Use of undefined constant department - assumed 'department' (line 5)
PHP Notice: Use of undefined constant name - assumed 'name' (line 6)
PHP Notice: Use of undefined constant email - assumed 'email' (line 7)
PHP Notice: Use of undefined constant message - assumed 'message' (line 8)
```
Relevant lines of code:
```$department = mysql_real_escape_string($_POST[department]);
$name = mysql_real_escape_string($_POST[name]);
$email = mysql_real_escape_string($_POST[email]);
$message = mysql_real_escape_string($_POST[message]);
```
What does it mean and why am I seeing it? |
I'm from a very rural area and love to garden, however, for work I just moved into an apartment in the city. I miss being able to grow vegetables and so I attempted to start some leaf lettuce indoors, however, almost every plant died quickly. I'm just curious, does anyone have experience growing vegetables indoors? What are the best ones for this? What sort of planter do you use? Do they need to be directly next to a window? How often should they be watered? I'm not used to not having Mother Nature help me out with my plants Any tips that can be provided would be much appreciated, thanks! |
What are the advantages of studying words by their frequency? |
I have heard many people saying, βHah! I beat Stockfish,β and one saying, βI am the best chess player ever! I beat Stockfish.β So I wonder if it is possible, just to know whether I should try to beat it. I tried to play it once; I barely played 25 moves. |
How to decrypt Jenkins passwords from credentials.xml? |
I'm pretty disappointed with my horse. He wasn't cheap -- 1000g -- but he just doesn't seem that fast. To make things worse, he's a bit of a wolf magnet and every time I get attacked I have to tediously dismount, blast the wolf, and then remount.
Is the speed of a horse actually significantly faster than normal running speed? If so, how much faster? |
Other than rust, corrosion, and other reactions with air that would make the use of a metal unfavorable, how do different metals affect the performance?
Let's give Yagi an example:
Let's say I use 4 different metals for the directors
, reflector, and driven element.
One antenna made out of copper, one made out of aluminum, and one made out of a higher resistance conductor, let's say graphite (I know it would snap, I'm just talking theoretical), and iron
Other then the metal variations, the antennas are identical.
So, do different metals with different conductivity and permiability affect the performance of an antenna including gain, efficiency, impedance, elevation, or any other characteristic other then mechanical strength, and chemical reliability in open air. |
Windows in its earliest days was simply a shell that ran on top of MS-DOS, which means that Windows 3.1 itself was actually just a standard MS-DOS application like any other.
Yet, MS-DOS is not a multitasking operating system, and at the same time, Windows applications were compiled native-code binaries that ran without any form of managed environment. So, how exactly was multitasking of Windows binaries achieved if Windows 3.1 was simply a regular old MS-DOS program itself? Are there any old technical documents still floating around that describe the early Windows architecture internally? |
I'm working on 2 different branches: release and development.
I noticed I still need to integrate some changes that were committed to the release branch back into the development branch.
The problem is I don't need all of the commit, only some hunks in certain files, so a simple
```git cherry-pick bc66559
```
does not do the trick.
When I do a
```git show bc66559
```
I can see the diff but don't really know a good way of applying that partially to my current working tree. |
In Civilization V, you attain a cultural victory by accumulating enough culture to purchase at least 36 social policies, and then building a wonder. The catch is that the more cities you build, the more culture you need to generate before you hit the next "plateau" of culture.
What is the ideal number of cities for a cultural victory? Does it change over time? |
How to find if a customer is logged in or not in Magento 2.
If the customer is logged in then how to get customer data from a session? |
I have a 9 year old daughter that has expressed some interest in manga, but I'm having trouble locating series that are appropriate for her age. No one at our local bookstore could offer any advice. Is there a kid-friendly imprint or other resource I could use to help her find something appropriate? My preference is for physical books but I'm willing to explore digital options. |
I'm looking for a precise piece of information in a database which I have no knowledge about. The database is on a separate machine, but I can log into it, and launch a ```psql``` command line, with administrator rights.
It's a third-party product, and they are slow to answer questions. I know the data is inside that database, so I want to do a little bit of reverse-engineering.
Given a table name, is it possible to get a list of the names of the columns in that table?
For example, in SQL Server, it's possible to dump a table into a reusable ```CREATE``` statement, which textually lists all the columns the table is composed of. |
I am using Visual Studio Code and have a fairly common project structure:
```βββ client/
β βββ tsconfig.json
βββ shared/
βββ server/
β βββ tsconfig.json
βββ project.json
```
The two tsconfig files have different settings (e.g. the one under ```client/``` targets ES5, the one under ```server/``` targets ES6). Note that there is no tsconfig in the root directory.
The problem is that I want the shared directory to be included in both projects. I can't do this using tsconfig because the ```exclude``` option won't let me include a folder that is in a higher directory than the tsconfig.json, and using ```files``` I have to constantly keep the list of files up to date as it doesn't support globs.
Note that I can compile fine by adding the shared folder into tsc, what I want is for the Visual Studio Code IDE to recognise the shared code for intellisense etc.
Is the only option to wait for filesGlob? |
I have the following method to save an Object to a file:
```// Save an object out to the disk
public static void SerializeObject(this T toSerialize, String filename)
{
XmlSerializer xmlSerializer = new XmlSerializer(toSerialize.GetType());
TextWriter textWriter = new StreamWriter(filename);
xmlSerializer.Serialize(textWriter, toSerialize);
textWriter.Close();
}
```
I confess I did not write it (I only converted it to a extension method that took a type parameter).
Now I need it to give the xml back to me as a string (rather than save it to a file). |
I have a problem with the embedded bitcode term.
What is embedded bitcode?
When to enable, ```ENABLE_BITCODE``` in new Xcode?
What happens to the binary when enabled, ```ENABLE_BITCODE``` in Xcode 7? |
In Dupire's local volatility model, the volatility is is a deterministic function of the underlying price and time, chosen to match observed European option prices.
To be more specific, given a smooth surface $(K,T)\mapsto C(K,T)$ where K is the strike and T is time to maturity. Dupire equation implies that there exits an unique continuous function $\sigma_{loc}$ defined by
$$\sigma_{loc}^{2}(K,T)=\frac{\partial_{T}C(K,T)+rK\partial_{K}C(K,T)}{\frac{1}{2}K^{2}\partial_{KK}C(K,T)}$$ for all $(K,T)\in(0,\infty)\times(0,\infty)$ such that the solution to the stochastic differential equation $dS_{t}/S_{t}=rdt+\sigma(t,S_{t})dW_{t}$ exactly generates the European call option prices.
What do the dynamics of the local volatility mean? Are dynamics equivalent to the volatility surface? Why the dynamics of local volatility model is highly unrealistic? |
Can you explain why we need a large number of trees in random forest when the number of predictors is large? How can we determine the optimal number of trees? |
I believe artificial intelligence (AI) term is overused nowadays. For example, people see that something is self-moving and they call it AI, even if it's on autopilot (like cars or planes) or there is some simple algorithm behind it.
What are the minimum general requirements so that we can say something is AI? |
I have some questions regarding the usage and significance of the ```synchronized``` keyword.
* What is the significance of the ```synchronized``` keyword?
* When should methods be ```synchronized```?
* What does it mean programmatically and logically? |
I am using the ```$http``` service of AngularJS to make an Ajax request.
How can a spinner GIF (or another type of busy indicator) be shown while the Ajax request is executing? |
Let's say that we have a gaseous or liquidus compound (I don't know if elements or compounds make a difference, take this as a thought experiment), and we have a tungsten or steel block that's 5cm (or less, you choose) thick. Is there any physical method for that gas or liquid to pass through that thick heavy metal block (not by drilling etc.)? |
Once, I boarded a plane, went to my designated seat and tried to put my bag in the overhead bin. However, it was full, and other adjacent overhead bins were full too. Because I had a seat next to the emergency exit, which I paid for, I had to hand over my bag to someone else in order to take off.
Do I have any rights over the overhead bin above my seat?
Could I ask the flight attendant to remove some of the bags to make room for me?
I cannot imagine that the bins were full because there was not enough space. I think this happened because some people were ignorant enough to bring more bags than is allowed inside the airplane instead of sending them to cargo. If this is the case why doesn't the airline enforce the bag limit inside the airplane? |
The Canon EF 40mm f/2.8 has a designation of STM on the lens. What does this mean? What are the advantages of having it and does it replace an older technology?
|
I'm trying to set get id of all elements in an ```HTMLCollectionOf```. I wrote the following code:
```var list = document.getElementsByClassName("events");
console.log(list[0].id);
for (key in list) {
console.log(key.id);
}
```
But I got the following output in console:
```event1
undefined
```
which is not what I expected. Why is the second console output ```undefined``` but the first console output is ```event1```? |
I am 21 years old and living in a large city in Germany where smalltalk in local markets is not a common thing.
A new cashier joined my local food shop. Sheβs always at the checkout and never doing stuff like sorting products or cleaning the floor where I could actually ask her out. I am quite new to relationships, but the signs she gave me are promising.
My question is how I can ask for her number, or ask her out for coffee while she is only sitting at the checkout? I mean there are always like 5 people before and after me, and I think it would be awkward if we are changing numbers while customers are waiting behind us. Or even worse if I read the signs wrong and she rejects me? Since the store is just 5 min away from my place I visit regularly and don't want to leave a bad impression there. |
You start with the number 1536. Your mission is to get to 1 in as few steps as possible. At each step, you may either multiply or divide the number you have, by either 2 or 3; but, only if the result is a whole number whose first digit is 1, 3, 4, or 9. That is all. |
I want to create a simple bit of JS code that creates an image element in the background and doesn't display anything. The image element will call a tracking URL (such as Omniture) and needs to be simple and robust and work in IE 6 = ```var oImg = document.createElement("img"); oImg.setAttribute('src', 'http://www.testtrackinglink.com'); oImg.setAttribute('alt', 'na'); oImg.setAttribute('height', '1px'); oImg.setAttribute('width', '1px'); document.body.appendChild(oImg); ``` Is this the simplest but most robust (error free) way to do it? |
Why is %s better than + for concatenation in python? |
I had an interview with an employer working on a software-based vehicle solution.
Before going further in the interview process, he gave me a task to find out if a potential customer (automotive OEMs) is interested.
My question is, how can I approach a potential customer and arrange some time together to present to them the solution?. I'm intending to use Linkedin, but I'm not sure how to proceed.
* Who to contact (I mean the person position in the company)
* How to formulate the request?
|
When an expendable booster rocket stage nears the end of its burn, does the guidance computer shut the engine(s) off at a certain velocity/altitude for the mission, or does the stage completely exhaust its propellants? |
Is "ima" an informal spelling of "I must"?
MegaCharizardZord Replying to @nytimes about COVID-19 vaccine:
i just hope when i take it don't die lol. i trust the government in Canada, but if I do get something ima sue the shit out of em lol.
Source: Twitter
|
How to prevent "Delhi Belly" from eating/drinking locally? |
I'm working at my first programming job. My boss is a very smart software engineer, and I feel
like I have very little to offer compared to him. Problem is, he is always busy, and needs someone to help him out. I feel like I'm not good enough, but I still want to succeed. I want to be a great programmer.
What can I do to impress him?
Thank you. |
Can I pass variables to a GNU Makefile as command line arguments? In other words, I want to pass some arguments which will eventually become variables in the Makefile. |
I have noticed that some games quote the requirement for "pixel shader 3.0 or better".
What is a pixel shader and is it some software requirements or hardware requirements? |
Red light facing forwards? It was nighttime in Manhattan. Isn't more always better when it comes to being seen? |
If water is not a good conductor, why are we advised to avoid water near electricity (no wet hands near circuits etc.)? |
What is the difference between cohesion and coupling?
How can coupling and cohesion lead to either good or poor software design?
What are some examples that outline the difference between the two, and their impact on overall code quality? |
Can Romex (NM-B) cable be run through conduit? |
Let's say I have a function which takes an ```std::function```:
```void callFunction(std::function x)
{
x();
}
```
Should I pass ```x``` by const-reference instead?:
```void callFunction(const std::function& x)
{
x();
}
```
Does the answer to this question change depending on what the function does with it? For example if it is a class member function or constructor which stores or initializes the ```std::function``` into a member variable. |
I have an Eloquent model which has a related model:
```public function option() {
return $this->hasOne('RepairOption', 'repair_item_id');
}
public function setOptionArrayAttribute($values)
{
$this->option->update($values);
}
```
When I create the model, it does not necessarily have a related model. When I update it, I might add an option, or not.
So I need to check if the related model exists, to either update it, or create it, respectively:
```$model = RepairItem::find($id);
if (Input::has('option')) {
if () {
$option = new RepairOption(Input::get('option'));
$option->repairItem()->associate($model);
$option->save();
$model->fill(Input::except('option');
} else {
$model->update(Input::all());
}
};
```
Where `````` is the code I am looking for. |
NASA is hiring a new 'planetary protection officer' to defend Earth from alien matter, and the pay is a six-figure salary: as much as $187,000 a year.
When we are not sure whether aliens exist, why are we still hiring staff for protecting Earth? I do understand we have to take precautions. But when we don't have any proof why spend $187,000 a year?
Source: Nasa [sic] hiring new 'planetary protection officer' to defend Earth from alien matter - Times of India, Aug 3, 2017 |
Traditional advice for making megadungeons in older versions of D&D is in addition to any rooms with Monsters, Treasure, Traps, or "Tricks", there should also be at least 50 to 60 percent "Empty" rooms, which contain nothing overtly threatening or valuable. Now, there's several arguments for including these empty rooms that I buy, so I'm not going to accept any answer which primarily says, "Don't include empty rooms". The main issue I run into with empty rooms, however, is that they're boring in the way that I've been including them. They don't do their job of increasing tension, and the set dressing included around them hasn't been sufficiently interesting to my players either. My question is this: How can I make empty rooms interesting, by increasing tension or simply being interesting in and of themselves? |
Laravel - Eloquent "Has", "With", "WhereHas" - What do they mean? explain in the context of an example |
What are some of the advantages of using one over the other? |
What factors determine the maximum altitude for a plane?
Is it limited by wing design, engine thrust, and so on?
Is there a formula by which one can calculate the maximum altitude a plane can reach? |
Why did the Typescript folks create the ```infer``` keyword?
According to the documents, this is an example of how you would use it:
```type ReturnType = T extends (...args: any[]) => infer R ? R : any;
```
I don't understand why this is needed. Why can't it just be:
```type ReturnType = T extends (...args: any[]) => R ? R : any;
```
Why doesn't this work? Why is the ```infer``` keyword necessary ? |
Which is more widely supported: ```window.onload``` or ```document.onload```? |
I was surprised to learn that Puerto Ricans, despite living in a US territory, were not entitled to vote in the presidential elections.
I was even more surprised to learn that US citizens are allowed to vote for president from anywhere in the world - EXCEPT if they happen to live in Puerto Rico.
What is the legal/political rationale behind this? What is it about Puerto Rico that magically removes one's right to vote? Has anyone ever challenged this? |