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. Althou...
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 rela...
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```. Th...
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 repopulati...
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``` ...
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/al...
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 ...
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/bac...
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 Straigh...
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 engin...
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 free...
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...
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 the...
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] atScrollPositio...
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 advantage...
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) PH...
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? Wha...
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 runni...
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 alumi...
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 withou...
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...
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 c...
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 fo...
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 d...
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 t...
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.Se...
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...
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 blo...
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 ...
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 e...
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...
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.test...
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 the...
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 ...
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...
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 updat...
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 pr...
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 room...
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...
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/polit...