80's (or earlier) short story: little heads growing out of a man after he offended a witch doctor

A short story from an anthology, read in 1980's but it wasn't a new book.  I can only remember one story, this man offended a witch doctor in a jungle village.  From then on tiny little hairy black bumps started growing out of him at nights and he decided to lop them off with a cut throat razor in every morning.  He had to do slow turns in front of a mirror to find them. I think (unsure!) that he overslept one day and saw they were actually little African people's heads.   They (again unsure) proceeded to grow out of him as the day went on... I can't recall the outcome, a vague memory that they then all advanced towards him as he cowered in the corner... maybe!


For my Intro to computer science class I have to make an application to select restaurants with various capabilities, I can't figure out how to randomize the array though. Below is my code.  string[] myRestaurants = new string[9];  myRestaurants[0] = "Wendy's"; myRestaurants[1] = "Arby's"; myRestaurants[2] = "Olive Garden"; myRestaurants[3] = "The Pie"; myRestaurants[4] = "The Cheesecake Factory"; myRestaurants[5] = "Beto's"; myRestaurants[6] = "Dillinger's Saloon"; myRestaurants[7] = "Dayz Alpher"; myRestaurants[8] = "Firehouse subs";  var nextArray = myRestaurants.ToList(); Random rng = new Random();   int n = nextArray.Count; while (n > 1) {     n--;     int k = rng.Next(n + 1);     T value = nextArray[k];     nextArray[k] = nextArray[n];     nextArray[n] = value;     //bang }


Why does a resistor reduce voltage if V=IR?

I'm sure this is a very simple question, but I have been confused about this topic for a while now. According to Ohm's law, resistance varies directly with voltage. This means that if resistance increases voltage increases... But obviously that's not how it really works. If I add in a resistor to a circuit, the voltage decreases. I've heard that its because a resistor reduces current which in effect reduces voltage, however I don't understand how this lines up mathematically with what I said earlier.


How do I run shellcode on Linux kernel 5.8+?

The assembly code I'm trying to run is simply a syscall 60. # exit.s .intel_syntax noprefix .section .text .globl _start  _start:  xor rax, rax mov al, 0x3c xor rdi, rdi xor rdi, 1  syscall  assembling this with as exit.s -o exit.o, linking with ld exit.o -o exit and objdump -d exit to get the final code. // ret.c const char shellcode[] = "\x48\x31\xc0\xb0\x3c\x48\x31\xff\x48\x83\xf7\x01\x0f\x05"; int main() {     (*(void(*)())shellcode)(); }  I compile using gcc -fno-stack-protector -z execstack -no-pie -o ret ret.c On Manjaro Linux (kernel 5.10) and Ubuntu (kernel 5.8), I get a seg fault when trying to run the final executable. I tried the same on Ubuntu 16.04 (kernel 4.4) and it works flawlessly. I did some research, and it looks like  might have changed the behavior, but I'm not sure. My question: How do I get the above code to work on the latest kernel version?


How can I send radio button value in PHP using javascript?

I've been at this for week and read all the stackoverflow and google and I can not fix this problem. Every time I test it I get the first radio button no matter which one I click.  What i get in the email is:  Name: test Email: test@live.com phone: 9545027557 type: Residential   HTML:  <form name="controls" id="controls"  novalidate>

             <input type="text" class="form-control"                     placeholder="Full Name" id="name" required                    data-validation-required-message="Please enter your name" />

             <input type="email" class="form-control" placeholder="Email"                     id="email" required                    data-validation-required-message="Please enter your email" />

                                       <input type="radio" class="form-control" id="optionu" name="optionu"                            value="Residential" checked > Residential                                                        <input type="radio" class="form-control" id="optionu" name="optionu"                            value="Commercial" > Commercial                                                       <input type="radio" class="form-control" id="optionu" name="optionu"                            value="Handyman" > Handyman

      <button type="submit" class="btn btn-danger pull-right">Request</button>
 </form>   contact_me.js:  var name = $("input#name").val();   var email = $("input#email").val();  var phone = $("input#phone").val();  var optionu = $("input#optionu").val(); var firstName = name; // For Success/Failure Message // Check for white space in name for Success/Fail message if (firstName.indexOf(' ') >= 0) {     firstName = name.split(' ').slice(0, -1).join(' '); }         $.ajax({     url: "bin/contact_me.php",     type: "POST",     data: {name: name, email: email,  optionu: optionu,  phone: phone},     cache: false,     success: function() {           // Success message         $('#success').html("
");         $('#success > .alert-success').html("<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>&times;")             .append( "</button>");         $('#success > .alert-success')             .append("Your message has been sent. ");         $('#success > .alert-success')             .append('
');   contact_me.php:  $name = $_POST['name']; $optionu_value = $_POST['optionu']; $phone = $_POST['phone']; $email_address = $_POST['email'];  // create email body and send it $to = 'test@gmail.com'; // put your email $email_subject = "Contact form submitted by:  $name"; $email_body = "You have received a new message. \n\n".               " Here are the details:\n \nName: $name \n  ".               "Email: $email_address\n phone: $phone\n  type: $optionu";


How do you change the default O.S. in the grub, so that windows will boot if Ubuntu is not chosen?


Is there a word for getting excited about nothing?

Is there a word for getting excited about absolutely nothing? For example, if you can recall in the Christmas movie ELF, Buddy got all excited about wondering what a Christmas gram was. In reality, though, it isn't all that exciting. Is there a word for that? Any suggestions are welcome!


How to get rid of internal shadows/blackness in glass/transparent/refractive materials?

So I'm trying to make some very refractive glass in Blender Cycles. I've tried using the mix shader with Glass, Trasparency, by a factor of Is Shadow Ray + Is Reflection/Trasparency Ray etc, and I've also messed with every setting in the Light Paths section of the Render Properties.. but nothing will get rid of these black corners (see picture below), even though there is nothing black or unlit in my scene.   In the past I've used Cinema 4D, and I would just turn off every channel in a new material except for Trasparency, and then just mess with the Refraction value, and I would get a very clean, realistic-looking glass material (see picture below). You can still see a few black spots I think, but, it just looks so much more refractive and clean. What I'm wondering, is what Cinema 4D does by default in this scenario, that Blender doesn't, and what settings I need to adjust in Blender to get the same result as Cinema 4D's default Transparency/Refraction settings. Any help would be so much appreciated!! Thank you!! (I've searched through YouTube, and Google Search, and this website a ton looking for every related keyword I could think of, but haven't found the answer to this issue yet :o the closest thing I found was this  and at the end of the answer the guy even says he doesn't know what causes the black bits)


In Einstein's thought experiment involving light moving on a train, the mirrors the light is bouncing between are perpendicular to the train, and it is these mirrors that the formula for time dilation is based on. But if the mirrors were positioned differently - for example at angle of 30 degrees to the side of the train or in the direction of the train's motion - wouldn't the formula be different? My calculations tell me it would be. So I don't understand how this formula applies to everything in the train no matter what direction it's moving in.


Change in acceleration due to gravity because of rotation of earth

The formula above is the equation for acceleration due to gravity when earth rotates. G is the original acceleration.  Can someone explain how this formula came?


After a recent update of MikTeX (and TeX Live!) on my computers (right after my vacation :)) I am not able to compile my book. The book is big and complex, uses many \if \else \fi constructions in the preamble, uses my own custom macros and environments some of which ceased to work properly. Here is one of the troubles identified so far.  The following minimal text is not compiled by XeTeX both in MkTeX and TeX Live.  \documentclass{article}  % Load fontspec and define a document font: \usepackage{fontspec} \setmainfont{TeX Gyre Pagella}  % Load unicode-math and define a math font: \usepackage{unicode-math} \setmathfont{texgyrepagella-math.otf}  \begin{document}    \providecommand{\tensor}[1]{\overleftrightarrow{{\mathbf{#1}}}}%    \begin{equation}   \tensor{\pi}   \end{equation}  \end{document}   Compilation aborts with 0 pages of output after issuing the message:  ! Internal error: fad native font flag in `map_char_to_glyph'   I am absolutely sure that 3 months ago the above example would be succesfully compiled.   What's wrong now? Should I change the above definition of the \tensor macro?   Here is complete defintion of the \tensor macro in my own package.   %\makeatletter \@ifpackageloraded{unicode-math}{%   \providecommand{\tensor}[1]{\overleftrightarrow{{\mathbf{#1}}}}%   \PackageInfo{handy}{\string\tensor\space has been declared using ^^J\space\space \string\overleftrightarrow\space from unicode-math package}% }{%   \@ifpackageloaded{accents}{%     \providecommand{\tensor}[1]{\accentset{\leftrightarrow}{{\mathbf{#1}}}}%     \PackageInfo{handy}{\string\tensor\space has been declared using ^^J\space\space \string\accentset\space from in accents package}%   }{%     \@ifpackageloaded{revsymb4-1}{%       \PackageWarningNoLine{handy2}{\string\tensor\space has been taken from revsymb4-1 package.^^J You are recommended to load `accents' package before me}%     }{     \@ifpackageloaded{revsymb}{%         \PackageWarningNoLine{handy2}{\string\tensor\space has been taken from revsymb package.^^J You are recommended to load `accents' package before me}%       }{%         \ifx\undefined\overset         \else           \providecommand{\tensor}[1]{\overset{\leftrightarrow}{\vec{#1}}}           \PackageWarningNoLine{handy2}{\string\tensor\space has been declared using ^^J\space\space \string\overset\space from amsmath package.^^J You are recommended to load `accents' package before me}%         \fi       }%     }%   }% }% %\makeatother   It uses 4 alternatives depending on what package is loaded. The most preferable alternative goes first and it assumes that unicode-math package is available.


Wording of "possible/exact duplicates" when closing the question

When marking question for "duplicate", the reason in dialog window is "exact duplicate", yet when the process is completed there's a comment added that says "possible duplicate". Maybe those two should be evened out to either "possible duplicate" or "exact duplicate"?  Edit: Take  for instance, it says "Possible" on top but "exact" at the bottom    and the top remark was added by the system only after the question was closed, i.e. after it was concluded that it was an exact duplicate rather than a possible one.  So the question is: can the text on top be changed to "Exact Duplicate" please?


Can't Change To Nvidia Proprietary Driver Ubuntu 18.04

I recently upgraded to 18.04 from 16.04. My machine has NVIDIA Graphics cards  Quadro 410 When i tried to change graphics driver using the GUI mode under Software and updates. The default X.Org X server keeps on getting selected and I do not get any error.   I see two additional Drivers listed besides the one selected by default   nvidia-driver-390 nvidia-driver-340 X org driver


Dystopian short story by Walter Jon Williams about AI and human disaffection

This is probably late 1990s early 2000s by Walter Jon Williams.  Short story, easy to remember, aside from me not knowing the title.  AIs, along with the top 2% of smartest people, basically run everything and provide for everything.  People aren't really in need or oppressed, but they don't have much to do.  This isn't gone into in any detail, it's quite a short story.  The protagonist, a near genius, and his anarchist friends have found, IIRC, some kind of enzyme or viral computer code that is going to "knock out the AIs".  They launch their revolution and... nothing much happens.  The AIs immediately counteract it and the big attack is shut down within 5 minutes or so.  Nothing really happens, no police comes a-knockin', they're ignored.  It concludes with the protagonist recognizing that they never had a chance to start with and are insignificant.   I looked at Walter Jon Williams' page on  and , searched for his short stories, "AI 2% dinosaurs".  None struck me as a match.  "Dinosaurs" looked like it might be, but it's unrelated. It's also funny in that it was specifically 2% and predated the entry into the vernacular about the top 1% that we are now familiar with.


How many Stack Exchange sites are there?

According to , the network has 94 Q&A sites:  But the new  disagrees:  My first guess was that the about page count included private betas, but according to  there are only two of them currently (ELL and Magento). Tim Stone has a  for the inconsistency:  There are 98 sites, two of which are private betas, and two of which are Meta Stack Overflow and StackApps, which are only main_site Q&A sites in the technical sense. The about page should show 94 sites.  Whatever the reason, the counts shouldn't really be different, let's pick one and stick with it.


This question contains spoilers for anime viewers and early manga viewers.      When Nagato was revived with Edo Tensei, he had Madara's eyes. When Madara was revived, he had his original eyes too (Rinnegan, much like Nagato).   Is this exploitable? Can I repeat this cycle of transplant and revive to duplicate strong eyes? How does that work really?


How can I get a list of all available entity view modes?

I need to have a list of all available view modes for an entity type so I can use it as the #options in a select field.  Any ideas? Thanks


Best practice exporting List in C# for COM Interop

Assume we have a lot of complex class CAnimal, and all members of that class are COM Interop compliant. And we have a lot of another class CRecord that has defined public List of CAnimal class as property animals, and is not COM Interop compliant due public usage of generic List<T> type.  for example  [ComVisible(true)] [ClassInterface(ClassInterfaceType.AutoDual)] [Guid("E58D82B8-9537-4378-92AB-E63F2FAF1EE8")] public class CAnimal {   public int id { get; set; }   public string Name { get; set; } }  [ComVisible(true)] [ClassInterface(ClassInterfaceType.AutoDual)] [Guid("E58D82B8-9538-4378-92AB-E63F2FAF1EE8")] public class CRecord {   public List<CAnimal> animals { get; set; } }   Criterias:  - animals property can be also a null;  - has to be strongly typed in COM inteop import (project that consumes this COM interop)  What would be the best practice for COM Interop exporting the List<T> since it is not supported by COM Interop : "Type library exporter warning processing 'Animalia.CRecord.get_animals(#0), Animalia'. Warning: Type library exporter encountered a generic type instance in a signature. Generic code may not be exported to COM."


How would I specify this dually left & right arrow (categorical, two opposing functors notation)?

This is used in Categories for the Working Mathematician to introduce two opposing functors U,V between the category of sets and the category of K-vector spaces, where K is a field. Can this be done in a LaTeX code that renders on MSE?


The equivalent of an array of struct in Android Studio and how to implement it

I am making a quiz app and i couldn't figure out how to store my questions and answers without using SQLite or datashare  I'm used to c++ so I'm searching for the equivalent of making a struct and using an array to store my data   struct item { string Question; string Answer1; string Answer2; }; item data[] ;   how can i make an equivalent of this in Android Studio, store data in it and import from it to a textView for example ??


what does [::-1] slice for a numpy array?


I can't join any minecraft servers because it keeps saying 'Can't connect to server' at every server i have. I can go on internet like post this question here. What's happening?


Managed Metadata Navigation Security Trimming

Does the managed metadata navigation offer security trimming?   I create a new web and not have anyone have access to it. I would now add a link to that web to the managed metadata navigation.   Result: That link is visible for all users - sure when they click on it they are redirected to the AccessDenied.asxp page, but doesn't the managed metadata navigation support automatic security trimming for its terms?  Any settings I missed? The only reference I found was on , it says that security trimming is not available. Really?


I need to quickly and safely thaw frozen ground beef, what are my options?

Since reading the answers to my question about  I've been good about giving my meat time to defrost in the refrigerator. However, my plans for tonight have changed and I'd like to defrost some ground beef that is completely frozen for dinner this evening. What are my options to do so quickly and safely?


Installing Ubuntu from Live iso to hard drive

I am trying to image 75 acer aspire's for the school I work for with Ubuntu 14.04 - it needed a couple extras like chrome and our wireless configuration for example.  I created a live boot using systemback and can boot into the image on another laptop but only from the flash drive. I obviously can't leave a flash drive in 75 laptops for third graders :) .  I can't find the installer as someone had pointed out on another forum I investigated.   How do I install the iso image onto the hard drives of the other laptops?


I have attempted to read a bit about chkdsk but I still don't conceptually understand what it does.  From : "Creates and displays a status report for a disk based on the file system. Chkdsk also lists and corrects errors on the disk. Used without parameters, chkdsk displays the status of the disk in the current drive."  From : "Displays the file system integrity status of hard disks and floppy disk and can fix logical file system errors."  But this is all extremely vague, and I've not seen a good, concise, clear summary of what is actually going on.  I just ran a chkdsk and got some of the following messages:     Deleting corrupt attribute record   (128, "") from file record segment   120759.      The USA check value, 0x0, at block 0x3   is incorrect.  The expected value is   0x63.      The multi-sector header signature in   file 0x3d5b6 is incorrect.      Deleting corrupt file record segment   251333.      Deleting orphan file record segment   251321.      Deleting an index entry from index $O   of file 25.      Deleting index entry P1040158123.JPG in   index $I30 of file 118566.   Is there anywhere I can go to make any sense out of any of these messages?  Does it matter at all to an end user?  Does it ever delete files or only indices?  From the log / output it seems like I had a lot of errors in my disk, but don't know if this is something I should be concerned with or not.


I can't open the Ubuntu software center in Ubuntu 20.04

When I try open the Ubuntu software center, it appears to load, but after it finishes loading, it does not open. I'm a new user and I need to use Ubuntu software center to study programming.


Enumerate rational numbers in ascending order

Rational numbers are in 1-1 correspondence with natural numbers. For example, let's consider enumeration mentioned in wikipedia:  ()  The above mentioned enumeration makes a sequence: $q_1, q_2, ...$. In other words, $q$ is a function form $\mathbb{N}$ to $\mathbb{Q}$.   Function $q$ is not monotone (i.e. - neither descending nor ascending): it is not necessarily true that for every $i$ $q(i) < q(i+1)$.  At the same time, there exist unique total order on all rational numbers. Because of that I wonder, is there (or why isn't there) a permutation $p: \mathbb{N} \xrightarrow{} \mathbb{N}$ such that $q\circ p$ becomes monotone: $$q_{p_1} < q_{p_2} < ... $$ If such permutation does not exist - why?  Please note, I understand the controversy that if such order would existed, there would have been infinite number of other rationals in between of two subsequent rationals.  Edit: Thanks for the reference to a similar question, I just don't think explanation there is evident enough. It is even more puzzling, because the number of permutation has a next level of cardinality (continuum) and yet - in such a rich set there is no single permutation that will bring order. Or maybe there is?  Edit 2: The initial question was mainly about existence of a permutation. Whether such permutation is incomprehensible to write down or does not exist at all. If it does not exist - why and what can be concluded from that.


What is the difference between int(8) and int(5) in mysql?

I found out, that if you have a field defined as INT(8) without ZEROFILL it will behave exactly as INT(5)  in both cases the maximum value is  −2,147,483,648 to 2,147,483,647, from −(2^31) to 2^31 − 1   or do i miss something?  I found this Question:      The (5) represents the display width of the field. From the   , it states:           The display width does not constrain the range of values that can be stored in the column. Nor does it prevent values wider than the column     display width from being displayed correctly. For example, a column     specified as SMALLINT(3) has the usual SMALLINT range of -32768 to     32767, and values outside the range permitted by three digits are     displayed in full using more than three digits.         The display width, from what I can tell, can be used to left-pad   numbers that are less than the defined width. So 00322, instead of   322. TBH, I've never used it.       But it doesn't affect the storage size of the column. An int will take   up more space than a smallint.   so there seems to be no difference then.


Kernel panic after update to 4.4.0-108-generic

Today I got what I presume was the update that should take care of Spectre and Meltdown. That didn't go very well. What do I do now? See screen photo.    I can't boot the 4.4.0-108-generic kernel because of a kernel panic. I'm running 16.04 on an Intel Core i5-4670K CPU @ 3.40GHz × 4.


How to show $\frac{d}{dt}(\det(I+At)=\text{Tr}(A)$?

How to show $\frac{d}{dt}\det(I+At)\mid_{t=0}=\DeclareMathOperator{\Tr}{Tr}\Tr(A)$? I can't find a easy way to prove that.


For the phrase "for now," is a comma necessary in this sentence?

While practicing for the SAT and doing a practice test, I came across a question where what I believed to be a grammatical mistake in the question (it was missing a comma, I thought) caused me to eliminate that option. However, when I looked back to check my answers, the answer I though was grammatically incorrect was the correct answer. So basically my question is whether or not the option is in fact grammatically incorrect, and if so, does this mean in the future I can't rely on a perceived grammatical mistake to eliminate an option for a question like this? Here is the question (if you are unfamiliar with SAT Writing tests like this, the question is asking what the bolded text should be, from the options given):     Although researchers continue to search for the right combination   of factors that will keep fruits fresh and attractive, the   problem may be that consumers are overly concerned   with superficial qualities rather than the actual freshness   of the fruit.         The writer wants a conclusion that conveys how the   shortcomings of 1-MCP presented in the passage   affect the actions of people in the fruit industry.   Which choice best accomplishes this goal?         A) NO CHANGE      B) many of the improvements to fruit quality they   have discovered so far have required trade-offs   in other properties of the fruit.      C) for now many fruit sellers must weigh the   relative values of aroma, color, and freshness   when deciding whether to use 1-MCP.      D) it must be acknowledged that 1-MCP, despite   some inadequacies, has enabled the fruit   industry to ship and store fruit in ways that   were impossible before.   Correct Answer: C (the one I eliminated because I thought it had a mistake)  My Answer: D  source (refer to this if more context is needed):  page 26-26, question 33


So I want to make two different abstracts in different languages on one page but I don't know how to accomplish that. I already tried the option which already is written on this website but it didn't work. Can someone help me?  Thanks


Export Compositor image and rendered image as two layers in the same file

I am wondering if there is a way to output a single image file that contains two layers: one with the rendered image, and one with the composited image.  This would be useful when importing renders in Photoshop, or in order to have two options for each image when exporting an animation. It could also be cool to have the composited layer and the rendered image when importing the sequence into an editing program (one would then have two footage layers instead of one and can blend/fade between the two etc).  Here's a file I experimented with, I exported to .tif which I think supports layers, but in Photoshop there was just one image.


Which is correct? The Gardening Club holds its event on Monday or The Gardening Club holds their even on Monday?


When I run ipython notebook or gedit in Terminal, the command line does not appear and it stops somewhere. How can I go back to command line mode?


Is it possible for a dual national who happens to be a citizen of two countries to travel between two countries who can accept only national IDs upon entry from their own nationals, and hence not require stamps to their passports (either because they're not stamped by their own authorities either because they're not necessary)?  Let's say I'm a citizen of Belgium and the UAE, and both countries require only national ID(s) from their respective citizens to enter. Can I simply switch between national IDs, in a proper manner of course?


Button doesn't work in FXML when trying to switch between scenes

I try to make an app in FXML.For the beginning I have one stage with 2 scenes.The scenes should change when i press a button When i press the button i have this error:  Exception in thread "JavaFX Application Thread" java.lang.NullPointerException     at application.Controller.lambda$0(Controller.java:43)   This is my controller classs:  public class Controller{  public Stage primaryStage; @FXML private Button button;  public void plm(Stage primaryStage){     try {         System.out.println(primaryStage);         BorderPane root = (BorderPane)FXMLLoader.load(getClass().getResource("Sample.fxml"));         Scene scene = new Scene(root,400,400);         //scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());         primaryStage.setScene(scene);         primaryStage.show();         this.primaryStage = primaryStage;         System.out.println(this.primaryStage);     } catch(Exception e) {         e.printStackTrace();     } }  @FXML public void cc() throws IOException{     Parent root = FXMLLoader.load(getClass().getResource("SampleB.fxml"));     Scene scene = new Scene(root,400,400);     primaryStage.setScene(scene);  //  primaryStage.close(); }   This is my FXML file:  <?xml version="1.0" encoding="UTF-8"?>  <?import javafx.scene.control.*?> <?import java.lang.*?> <?import javafx.scene.layout.*?> <?import javafx.scene.layout.BorderPane?>  <BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="application.Controller">    <center>       <Button fx:id="button" mnemonicParsing="false" onAction="#cc" text="Button" BorderPane.alignment="CENTER" />    </center> </BorderPane>


I'm trying to receive a list with an array in RecyclerView and get error:

I fetch below error GoldfishAddressSpaceHostMemoryAllocator: ioctl_ping failed for device_type=5, ret=-1 2020-11-19 19:32:10.000 20105-20105/com.example.popularmoviebycookies E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.popularmoviebycookies, PID: 20105 java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View androidx.recyclerview.widget.RecyclerView.findViewById(int)' on a null object reference


Recently in my topology homework I've stucked with the following problem: Prove that sphere with $n$ handles covers sphere with $m$ handles if and only if $m-1$ divides $n-1$ So, basically, as I understand we need to prove that there exist a covering map $p: S_n \rightarrow S_m$ (where $S_k$ is a sphere with $k$ handles) if and only if $(m-1)\big|(n-1)$. Well, actually it doesn't look intuitive why do we need the condition $(m-1)|(n-1)$. Can't we just map all handles of $S_n$ to the handles of $S_m$ (maybe two ore more different handles of $S_n$ to one into $S_m$) and then map the rest of the $S_n$(basically just a sphere) to the rest of $S_n$ (also sphere) ? (I understand I'm not rigorous here, but you definitely understood what I mean). Any hints/ideas would be greatly appreciated.


std::vector holds base class instance and not of a derived class

I have a problem with C++ vector understanding: an object I get from vector is always a base abstract class and not a derived class that was added to it.   I have a vector:  vector<SceneNode*> children;    Where SceneNode is an abstract class with pure virtual functions.   I add an instance of ImageSceneNode (that is derived from SceneNode) to this vector:  lib::ImageSceneNode node(static_cast<TextureAsset*>(test));  sceneManager.getRoot()->addChild(&node);    Where addChild function is:     void SceneNode::addChild(SceneNode* child) noexcept {         this->children.push_back(child);     }    Later when I iterate the vector the object inside is an instance of SceneNode and fails with a "pure virtual function" call error:     Can you please help, thank you!


I recently had a session where the party was on board a boat (Smugglers) with a crew size of 40 which got into a fight with a boat (Royal Marines) with a crew size of 60.   Obviously I didn't put the whole crew into combat, I limited it to 10 Smugglers and 10 Marines (plus the captain of each boat).  Including the party, this meant there were 26 people on the initiative sheet, 22 of which were NPCs under my control fighting against each other. This meant that most of the fight was spent with the party watching me playing with myself.   Obviously this is unacceptable.  What would be a better way to deal with this? My job is to make the players have fun and not sitting around bored while I figuratively jerk off, but I also want to impress upon them the scale of a large battle.  I am willing to accept any and all suggestions, no matter how crazy (including incorporating other game systems).


"Needs cleaned" or "needs to be cleaned"

I'm from Western Pennsylvania. Until I moved away, I never realized that when I omitted the to be from phrases like needs to be cleaned, my usage was different than what most English speakers are accustomed to. Is it wrong?


Abstract definition of a cone: locus of points of line segments join a single point $v$, called vertex with set of coplanar points called base.  Height of cone is distance from vertex to plane.  If I take strange set of co-planer point such as complicated design for example, as base then volume of the set join with some vertex is still given : $\tfrac13$ (base)(height).  How can I prove this in calculus?  I have tried a few it is too late to wake my sister, thank you.


One can often see expressions like "Biology 101".  Also in in book and article titles like "Wine tasting 101."  What does this mean?  Does this have something to do with a class one takes? Can it mean something outside of registering for a class?


Finding precision of polygon in Leaflet?

In order to convert coordinates to geohash I need to know the precision as well but unable to figure how to do so..  Any suggestions?  ** EDIT **  What I try to do is to find the precision in leaflet using VueJS based on zoom level or even using leaflet itself. I don't want to show the geohash squares on the map. Just use them somewhere else.  It's not really a duplicate since the given solution is in python and I try to do it in Javascript using VueJS.


Building bike from scratch: why more expensive than pre-built?

I was going to ask , but I came to the conclusion that I'm not going to do it (asking and building).  Now my question is: why is it (usually, if we leave the silly high-end prices alone) more expensive to build a bike from scratch?


Is there a script for the sinc function analogous to \sin for sinus?  If not, what method should I use to insert it in a equation?


Compare object stored as value in hashmap

I am having a hashMap which stores my values like that:  {10997=Event [Numb=0007449001, date=07.02.2008], 10998=Event [Numb=0007449001, date=08.04.2008], ...   As you can see the key is a integer and the value is an Event Object which has a numeric value and a date, which is saved as a String.  I want to compare the numeric value of the map to another value with an if statment.  I tried:  if(numericVal==eventMap.get(i).toString()) {   However that does not really work. How to get the value easily out of the HashMap and of the Object?  I appreciate your answer!  UPDATE  By easily I mean performance orientated, because I have to process a lot of values.


If object made of atoms and atoms are invisible then when we look at an object or touch an object what we see or feel?


Why are hand gestures used in executing Force powers?

We can observe many instances where in early Jedi training, an initiate learns telepathy by moving objects with their mind. This demonstrates that hand gestures aren't necessary to using the Force to manipulate the world around them. It does, however, require mental concentration.  When I was training in archery in the past, my instructor taught me that the sport focuses on mental concentration. For optimal performance, there should be no unnecessary physical movements as that will consciously and subconsciously distract the mind. Given the way the Force works, I assume it shouldn't be too different.  So that begs the question: are hand gestures necessary in any way? Given we've only seen fundamental powers being hands-free, are they required for only more advanced Force powers?  Out-of-universe, it is necessary to visualise the use of Force powers to the audience, but how are they justified as necessary movements in-universe?


Yeah, need help solving this one...  A function is given below. Determine the average rate of change of the function between x = 1 and x = 7.   g(x)= 3 + 1/2x


Can't understand probability calculation appeared in "Mining of Massive Dataset" book

This is a summary of the excerpt:  Given that we have:  *$10^9$ people  *each person has a chance of 0.01 of going to a hotel  *we have $10^5$ hotels, each hotel holds 100 people  *Thus, $P(2 \text{ persons meet on the same hotel in any given day}) = 0.01 \cdot 0.01 \cdot 10^{-5}$  *and $P(2\text{ persons on the same hotel in $2$ day}) = P(2 \text{ persons on the same hotel in any given days})^2 = 10^{-18}$  the book "Mining of Massive Dataset" said that the expected number of pairs who stay in the same hotel for 2 days is:  $P(2 \text{ persons on the same hotel in $2$ days}) \cdot ( \text{number of pairs of people} ) \cdot (\text{number of pairs of days})$  this is the part where I got stuck. Can't understand how it come to this derivation. Can anybody explain it in more elaborate detail.  You can find the content on page 6 of this link:  (it is freely available)


I am trying to remember a young adult series I read perhaps 15 years ago, but I don't remember many details. One of the characters was named Briar. As I recall, there are four main characters that channel elemental power, and they have a meditation routine to unlock this power where they inhale and exhale to a seven count. Sorry it's not much to go on, I will try to add more details if I remember any.


how to change how rotation of middle click when viewing model in layout

I am trying to view my model in Blender and I would like to change the controls a bit. Right now, when I press down on my scroll wheel (middle click), and then move my mouse left-to-right, I am rotating my view of the model about the Z-axis of the blender-model world frame. When I middle-click and push the mouse up-and-down, I am rotating my view about the view-matrix X-axis (the X-axis if this were an OpenGL window). In other words, it looks as if I am at the top of a hill and I push the blender model down the hill. What I would really like to have happen when I middle click and drag sideways is to have the blender model rotate about the view-matrix Y-Axis, like you would on a trackball-style mouse. In other words, if I push the model "down a hill", I have a birds-eye-view of the model rolling down the hill. How do I change the layout model viewing rotation behavior as described? This looks like what I , but it is a really old answer. Is there an updated version of this? I use blender 2.90.X


How to mount ExtHDD under Debian OS - NOT an SD card?

HDD; debian OS; orangepi; 2TB; (SCSI DISK) (WDC WD20 03FZEX-00SRLAO)  ......................  I am trying to mount my 2TB WD hdd. as "mount rw, /dev/sda1 exthdd; mount -o rw /dev/sda1 /media. lsblk: disk recognized. DMESG | TAIL : couldn't mount RDWR b/c of unsupported optional features (400)  "Failed to mount "exthdd". Error mounting /dev/sda1 at media/username/exthdd: command line 'mount -t "ext4" -o uhelper=udisks 2,no dev,nosuid "/dev/sda1" "media/username/exthdd - exited with non-zero exit status32: ; "mount: wrong fstype, bad options, etc etc etc........other"  *****After reading the 'similar' article, I tried the following:  "turn it off on an already created filesystem" "sudo tune2fs -O ^metadata_csum /dev/sdb1"  Did not work. The aforementioned article talks about an SD CARD, my media is a hdd.  Not able to mount either "ro,noexec" or "rw" on my desktop computer where the hdd was formatted. I was able to mount it to a laptop w/ ubuntu, but was not able to copy, paste, or create a folder as "permission denied". I think this hdd was specifically formatted to be solely used with my username for this desktop, debian OS, computer.  I see to format external media, do the following... You'll see where it says "chown" that it asks for my username. I'm wondering if I can do something to remove my username from the hdd (if it's on there) so it will work on other systems.....??????  Thanks.


How do I get the quarried stone for my house in Skyrim? I've found the mines for it, but after I mine I don't receive any of the stones.


What construction or classification is "Come what may"

Is this an example of inversion, an idiom, archaic usage, or just incorrect?


Command with percent symbols not running in crontab

The following crontab does not work:  # TEST LINE DOES DOT RUN */1 * * * * /bin/echo 'test '`/bin/date +%Y-%m-%d` >> /tmp/test   I also tried starting it with:  SHELL=/bin/bash   Update: I thought the backtick characters ` were the villains, but as the answer below clarifies the percentage % was the culprit!


Where should I place my Terraria player and world files?

Where should I move the player and world files? My computer messed up and my profile isn't working, and my Terraria characters and worlds are all gone. I do have all the files but I'm not sure where to put them. I placed them to the same location in my new profile (windows profile) but when I lauched Terraria nothing was happened. Please help and sorry for language! :)


Is JavaScript a pass-by-reference or pass-by-value language?

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


What Properties are available for purchase in Grand Theft Auto V?

In GTA5:   What properties are available for purchase? What is their income? What additional benefits do they offer (if any)?


How does sizeof work when passing a template array?

Since sizeof and templates are both compile-time. What is it about the second parameter of the template that determines the size without specifying it in the caller function?  template <typename T, size_t n> bool isInHaystack(const T (&arr)[n], const T &needle) { /* I know const references are best with strings and non-primitives and should      be mitigated when using ints as in the example.*/     size_t i, size = sizeof arr / sizeof T; // how does it know n is the size?     for (i = 0; i < size; ++i)         if (arr[i] == needle)             return true;     return false; }  int main(int argc, char **argv) {     int arr[] = { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21 };     cout << isInHaystack(arr, 7) << endl;     isInHaystack<int, (size_t)(sizeof(arr) / sizeof(int))>(arr, 7); // this works, too       return 0; }   How does this size_t n get its value when passing an array? How does it know without providing it explicitly?  To make this a little more clear, this will not compile:  template <typename T> bool foo(const T(&arr)[], const T needle) {     cout << sizeof arr << endl;     return true; } int main(){     int arr[] = {1,2,3};     foo(arr, 1); // Error: could not deduce template argument for 'const T (&)[]' from 'int [21]' }   What is the issue?


How many $n$-digit decimal sequences (using the digits $0 = 9$) are there in which the digits $1$, $2$ and $3$ all appear?

I feel the answer should be $nC3 \times 3! \times 10^{n-3}$.


Jquery email validation user@admin.state.in.us


How do i replace an array with an arraylist?

How do I replace the following array with an ArrayList.   Employee[] companyTeam = {manager, engineer1, superviso1, accountant, intern };


Looking for family of Heinrich Märte from Sipplingen, Germany?

I am looking for information on Heinrich Märte (my grandfather) and his family. He was born on July 1, 1912 in Sipplingen and died On April 19, 1944 when the military plane crashed in Geierswalde because its engine failed.  I am not sure if his family knows that he fathered my dad. I am hoping someone knows of him or his family. I would love to know how he met my grandmother or any further information on him.   We have always had two photo's of him, but never knew his name. We have only just found out about him and it has opened so many more questions.  How can I determine Heinrich's parents and siblings, and then locate any living family members?


Anyone know of a place/repository that has done a TikZ syringe? A syringe is complicated, so I don't want to recreate it, but it has to have been done before. Looking for a 10 mL glass syringe type.


In setting up dual Boot with Windows and Ubuntu, which OS do I install first?

I'd like to install both Ubuntu 12.04 and Windows XP on a Dell laptop, and I was thinking about using a dual boot structure, and using the bulk of my hard drive as empty hard drive space to share files between the two operating systems (so choice of file system type is very important in this set-up).     The kind of partitioning structure I would like to use is  Partition 1 - Ubuntu 12.04 (root) (20GB)  Partition 2 - Ubuntu /home        (20GB)  Partition 3 : Free Space          (560GB)  Partition 4 : Windows XP          (35GB)  Partition 5 : SWAP                (3GB)  (Total Hardrive Capacity is ~640GB)    My question is; what is the best way to go about setting up this kind this system?   Should I install Windows XP first and setup the partitions, and then install Ubuntu which I believe will install the GRUB bootloader for OS booting choice   or   Do I install Ubuntu first, setting up the available partitions and then perform a WIndows install?  Please let me know if there is anything in this setup that I have left out and should know about, including things related to setting particular partitions as logical or primary, and whether the boot partition and the filesystem partition should actually be two separate partitions.


Proof by induction for tricky double summation: $(\sum_{k=1}^n x_k)\cdot(\sum_{k=1}^n \frac{1}{x_k})\ge{n^2}$

let $x_1....x_n$ be positive integers. Prove by induction the following for natural numbers n:  $(\sum_{k=1}^n x_k)\cdot(\sum_{k=1}^n \frac{1}{x_k})\ge{n^2}$  Hint: for all positive integers a,b: $\frac{a}{b}+\frac{b}{a}\ge2$


I am running Ubuntu on an ARM based embedded system that lacks a battery backed RTC. The wake-up time is somewhere during 1970. Thus, I use the NTP service to update the time to the current time.  I added the following line to /etc/rc.local file:  sudo ntpdate -s time.nist.gov   However, after startup, it still takes a couple of minutes until the time is updated, during which period I cannot work effectively with tar and make.  How can I force a clock update at any given time?    UPDATE 1: The following (thanks to Eric and Stephan) works fine from command line, but fails to update the clock when put in /etc/rc.local:  $ date ; sudo service ntp stop ; sudo ntpdate -s time.nist.gov ; sudo service ntp start ; date Thu Jan  1 00:00:58 UTC 1970  * Stopping NTP server ntpd     [ OK ]   * Starting NTP server          [ OK ]  Thu Feb 14 18:52:21 UTC 2013   What am I doing wrong?    UPDATE 2: I tried following the few suggestions that came in response to the 1st update, but nothing seems to actually do the job as required. Here's what I tried:   Replace the server to us.pool.ntp.org Use explicit paths to the programs Remove the ntp service altogether and leave just sudo ntpdate ... in rc.local Remove the sudo from the above command in rc.local   Using the above, the machine still starts at 1970. However, when doing this from command line once logged in (via ssh), the clock gets updated as soon as I invoke ntpdate.  Last thing I did was to remove that from rc.local and place a call to ntpdate in my .bashrc file. This does update the clock as expected, and I get the true current time once the command prompt is available.  However, this means that if the machine is turned on and no user is logged in, then the time never gets updates. I can, of course, reinstall the ntp service so at least the clock is updated within a few minutes from startup, but then we're back at square 1.  So, is there a reason why placing the ntpdate command in rc.local does not perform the required task, while doing so in .bashrc works fine?


Why is Squeeze theorem with ≤/≥, rather than ?

Why is Squeeze theorem with $≤ or ≥$, rather than $< or >$?  It does work with < or > right? Since ≤ and ≥ include < and > correspondingly.  Additionally, surely one can use $$g(x) < f(x) ≤ h(x)$$  $$or$$ $$g(x) ≤ f(x) < h(x)$$   as well?    I think this is more clearly formulated question than:


What is the Purpose of a "Ducking" Play In Bridge?

Sometimes I will have Axx in a key suit, opposite dummy's holdings of Kxxxx. In such situations, I was taught to make a "ducking" play by playing a low card from both sides, instead of playing an A or K, and letting the opponents win with a Q or J or some other card.   One advantage of this is that I save my A and K for later rounds. So is the ducking play like a "hold up?" Or is it used for a "throw in" situation where I want to put an opponent on lead?   What are the benefits of ducking? Are there times when this would be a bad play?


How to remove the “Powered by Cognito Forms” link at bottom

Anyway to remove the “Powered by Cognito Forms” link at the bottom? Sometimes people will accidentally hit that instead of submit and they lose the form and have to fill it out all over again.


I don't know how to open the Installer to get those options.  Also I don't have a CD drive.


How can I search for a multiline pattern in a file?

I needed to find all the files that contained a specific string pattern. The first solution that comes to mind is using find piped with xargs grep:  find . -iname '*.py' | xargs grep -e 'YOUR_PATTERN'   But if I need to find patterns that spans on more than one line, I'm stuck because vanilla grep can't find multiline patterns.


I have a problem with the following exercise: Let $X$ be a noetherian scheme and $Y \subset X$ an irreducible closed subset. I have to prove that $$ \operatorname{codim}(X,Y)=\dim(\mathcal{O}_{X,\eta}), $$ where $\eta$ is the generic point of $Y$. We can replace $X$ with an open affine $U_\eta$, neighbourhood containing the generic point $\eta$. So we have that $$\operatorname{codim}(X,Y)=\operatorname{codim}(U_\eta, U_\eta \cap Y) ,$$ but I don't know how to conclude the proof. In particular if $Z$ is an irreducible component of $X$, can I conclude that $\operatorname{codim}(Z,X)=0$? Thanks in advance!


To which of the four forces of nature does the coupling of the Higgs scalar field to other quantum fields ultimately belong to, if any? If it doesn't fall into any of the four known categories of forces, does that imply a fifth "force" of nature, or have I misunderstood the definition of force?


Why doesn't find work recursively with a wildcard over SSH?

I'm connected to a CentOS server through SSH from macOS.  When I try to find with a wildcard at the beginning, it seems to only search the current directly, no recursion.  But if I put the wildcard at the end of the filename, it works.  I don't have this problem on the local Mac.  # find . -name *.inc ./copra_xml_gen.settings.inc # # find . -name auth.inc ./common_v4/auth.inc ./v5_old/common/auth.inc ./common/auth.inc ./v6/common/auth.inc ./v5/common/auth.inc # # find . -name auth* ./common_v4/auth.inc ./v5_old/common/auth.inc ./common/auth.inc ./v6/common/auth.inc ./v5/common/auth.inc


Transporting of whales in The Voyage Home: what happened to the air in the tank?

When transporting the two whales and seawater into the tank in the Star Trek movie The Voyage Home, what happened to the air in the tank? I've read the question and answers about regular transportation. One suggestion is that during the time it takes for rematerialization, the air is pushed aside. But the whales and water are transported into a sealed tank. Or should we presume that the top of the tank is open? Even then, that's a lot of air to displace. Whoosh!  And what about water splashing out when the whales swim around? Then there's the problem of making sure that the water is oxygenated enough. Separate questions, I know, but still . . .


Does Big Bang predict the size of the fluctuations in the CMB?

From  Ethan Siegel’s article      The temperature fluctuations in the CMB are only 1-part-in-30,000, thousands of times smaller than a singular Big Bang predicts.    Does big bang predict the size of the fluctuations in the CMB?   Do we know what caused the fluctuations in the CMB?


18.04.1 LTS installed. Latest bluez Bluetooth drivers installed. Lenovo AIO Y910. Bluetooth was working and after a wake after a suspend Bluetooth option to turn it on is greyed out and it says that no bluetooth hardware found and use a dongle. Any ideas?


How to evaluate $\int_0^1 \frac{\log\left(\frac{1+x}{1-x}\right)}{x\sqrt{1-x^2}} dx$?

How to  evaluate $$\int_0^1 \frac{\log\left(\frac{1+x}{1-x}\right)}{x\sqrt{1-x^2}} dx$$  I am clueless, I doubt if this  has a closed form  either.


How to have two methods calling each other?

I'm a bit confused as to how to get two method to call each other (i.e., have A() call B() and B() call A()). It seems that F# only 'sees' the method after it's been encountered in code, so if it hasn't, it just says value or constructor has not been defined.  Am I missing something very basic here?


is there a way of putting % in front of a whole chunk of text?

% starts an end-of-line comment in LaTeX. Is there any way I comment an entire paragraph without putting a % in front of each individual line?  Note: I write my LaTeX code in texmaker.


For the Fibonacci numbers, show for all $n$: $F_1^2+F_2^2+\dots+F_n^2=F_nF_{n+1}$

The definition of a Fibonacci number is as follows:  $$F_0=0\\F_1=1\\F_n=F_{n-1}+F_{n-2}\text{ for } n\geq 2$$   Prove the given property of the Fibonacci numbers for all n greater than or equal to 1. $$F_1^2+F_2^2+\dots+F_n^2=F_nF_{n+1}$$  I am pretty sure I should use weak induction to solve this. My professor got me used to solving it in the following format, which I would like to use because it help me map everything out...  This is what I have so far:  Base Case: Solve for $F_0$ and $F_1$ for the following function: $F_nF_{n+1}$.  Inductive Hypothesis:  What I need to show: I need to show $F_{n+1}F_{n+1+1}$ will satisfy the given property. Proof Proper:  (didn't get to it yet)  Any intro. tips and pointers?


I want to copy the bones on one side symmetrically.  I selected the bone to be symmetrized and armature-> symmetrize, but nothing happened.  How can I symmetrize the bones?


Irreducible polynomial of degree $5$ in $F_2 [x] $ has distinct roots in any algebraic closure of$ F2$

Is it true that any irreducible polynomial of degree $5$ in $F_2[x]$ has distinct roots in any algebraic closure of $F_2$? $F_2$ : field of characteristic $2$.


Period after period (abbreviation at the end of a sentence)

If an abbreviation occurs at the end of sentence, is there one period or two? For example,     Caesar was assassinated in 44 B.C.. Brutus killed him.   Should there be one period or two?  This has nothing to do with etc.


Generic method execute with a runtime type

It is strange but the source code  public class Processor<T> where T: class { ...     private object WorkWithSubtype(IRequester nextRequester, Type type)     {         if (type.GetInterface("IList") != null)         {             var originalType = type.GetGenericArguments()[0];             var list = Activator.CreateInstance(type);              var method = typeof(Processor<>).GetMethod("GetObjects", BindingFlags.NonPublic | BindingFlags.Instance).MakeGenericMethod(originalType);             var resList = method.Invoke(this, new object[] { nextRequester });             typeof(List<>).GetMethod("AddRange").MakeGenericMethod(originalType).Invoke(list, new object[] { resList });             return list;         }     }      private IEnumerable<K> GetObjects<K>(IRequester requester) where K: class     {         ...         //We can call method WorkWithSubtype in this method sometimes     } }   And i get "Late bound operations cannot be performed on types or methods for which ContainsGenericParameters is true.". The exception is throwing at line 'var resList = method.Invoke(this, new object[] { nextRequester });'. Can you help me? Thanks in advance!


Changing current directory with a bash script?

I was wondering if it's possible to change directory of a shell from a bash script, but keep the directory change persistent to more than just the subshell.  I'm aware that when you run cd inside a bash script the directory will only change inside the subshell, and when you get back out you'll return to whatever directory you were in.  However, I want to make a command to bring me to certain directories. I could use an alias, but there are a lot of subdirectories that I would have to make an alias for..


I don't quite understand how the computer reads this command.  cat file1 file2 1> file.txt 2>&1  If I understand, 2>&1 simply redirect Standard Error to Standard Output.  By that logic, the command reads to me as follows:    concatenate files file1 and file2.  send stdout from this operation to file.txt. send stderr to stdout. end?   I'm not sure what the computer's doing. By my logic, the command should be   cat file1 file2 2>&1 > file.txt   but this is not correct.


Effect of class imbalance on logistic regression (mathematical basis)

A number of posts, and papers, state that logistic regression (LR) is robust in the face of class imbalance.  Unless the imbalance is extreme (e.g., events=0.01 or less), with adequate sample sizes model performance does not degrade.  Even in extreme cases, performance may not be affected. I have tested this empirically and found this to be true, at least for events=0.05 or greater. As long as there are a sufficient number of minority cases, LR performance does not typically suffer.  What is the mathematical basis for why LR models perform well in the face of class imbalance?  How can this be demonstrated mathematically?


How can I verify the following statement?     The image of a morphism $f : A \longrightarrow B$ is defined as $\text{Im}(f) = \text{Ke}r(\text{coke}r f)$ whenever it exists (e.g., in every abelian category). The morphism $f : A \longrightarrow B$ factors   uniquely through $\text{Im} f \longrightarrow B$ whenever $\text{Im} f$ exists, and $A \longrightarrow \text{Im} f$ is an epimorphism and a cokernel of ker $f \longrightarrow A$ in every abelian category.


textbox only for integer in window application

I have a Windows application, in which there is a login form and registration form. In the registration form there are 4 textboxes in which one of them is for getting the user contact number (Mobile Number), where only numbers are allowed. I want that user can enter only integer number not char just like in asp application, where using ajax textfilter we restrict the user to enter only integer number.   Does this type of functionality exist, such that the Windows application can restrict the user?


Graphical glitches using Ubuntu 18.04 on Dell XPS 13 2019 laptop

My laptop keeps on having weird screen glitches, sometimes for a second, and that goes away just by moving the cursor, sometimes, making me restart the whole thing.  I could still use the play/pause key and it still played/paused the video that was running even though the screen was completely teared.  Also, printscreens actually print a normal screen and do not show the problem.  Some pictures of the screen when it happens :     Do you guys know what I could do to solve the issue ?


Efficiently replace all accented characters in a string?

For a poor man's implementation of near-collation-correct sorting on the client side I need a JavaScript function that does efficient single character replacement in a string. Here is what I mean (note that this applies to German text, other languages sort differently):  native sorting gets it wrong: a b c o u z ä ö ü collation-correct would be:   a ä b c o ö u ü z  Basically, I need all occurrences of "ä" of a given string replaced with "a" (and so on). This way the result of native sorting would be very close to what a user would expect (or what a database would return). Other languages have facilities to do just that: , in , , . But what about JavaScript? Here is what I have right now. // s would be a rather short string (something like  // 200 characters at max, most of the time much less) function makeSortString(s) {   var translate = {     "ä": "a", "ö": "o", "ü": "u",     "Ä": "A", "Ö": "O", "Ü": "U"   // probably more to come   };   var translate_re = /[öäüÖÄÜ]/g;   return ( s.replace(translate_re, function(match) {      return translate[match];    }) ); }  For starters, I don't like the fact that the regex is rebuilt every time I call the function. I guess a closure can help in this regard, but I don't seem to get the hang of it for some reason. Can someone think of something more efficient?  Answers below fall in two categories:  String replacement functions of varying degrees of completeness and efficiency (what I was originally asking about) A  of  , which is now  among JS engines (not so much at the time of the question) and could solve this category of problem much more elegantly.


Excel Formula Help Required- Multiple IF Formulas

I am looking to create a formula which will allow me to use a formula to categorize values into 6 different groups, the formula would need to return the group letter.  A= More than 800 units sold   B= Between 300-800 units sold  C= Between 200-300 units sold   D= Between 160- 200 Units Sold  E= Between 1- 160 Units Sold   F= Zero Units Sold   I have attached an example of the data I am working with:    I have tried the below formula with no luck   =IF([@[Sales]]<=1, "F",IF(AND([@[Sales]<=160, [Sales]]>1),"E",IF(AND([@[Sales]]<=200, [@[Sales]]>=160)),"D",IF(AND([@[Sales]]<=300,[@Sales]]>=201),"C", IF(AND([@[Sales]]<=301,[@[Sales]]>=800),"B","A"))))  This is not a Duplicate, must more information needed, before I was after 3 groups now I am after 6 groups now and the previous question's answer does work on in this case


Vertically align individual cells in a table

I am wanting the ability to vertically align any cell within a table. This appears possible but only on a per column or row basis. At the moment I can horizontally align the contents of individual cells with the help of the \raggedleft and \centering commands. However, \multicolumn applies vertical alignment for the whole row and the longtabu environment can only specify the alignment type per column.  The following is an example of the table I want to create where both horizontal and vertical alignments need to be set for each cell instead of per row or column:  \documentclass[11pt,a4paper]{article} \usepackage{longtable}       \usepackage{tabu} \usepackage{lipsum} \usepackage{multirow}  \newcolumntype{M}{m{\dimexpr 1\tabucolX+1\tabcolsep+\arrayrulewidth\relax}} \newcolumntype{P}{p{\dimexpr 1\tabucolX+1\tabcolsep+\arrayrulewidth\relax}} \newcolumntype{B}{b{\dimexpr 1\tabucolX+1\tabcolsep+\arrayrulewidth\relax}}  \newcolumntype{H}{>{\begin{minipage}[b]{\hsize}}B<{\end{minipage}}}  \begin{document}  \begin{longtabu} to 150mm [l] {|X[l]|X[l]|X[l]|} \hline  \multicolumn{1}{|P|}{ \lipsum[1]} & \multicolumn{1}{H|}{\centering H: Center, V:Center} & \multicolumn{1}{B|}{\raggedleft \multirow{1}{*}[-2\baselineskip]{H:Right, V:Bottom}} \tabularnewline \hline \multicolumn{1}{|P|}{\lipsum[1]} & \multicolumn{1}{P|}{H: Left, V:Top} & \multicolumn{1}{M|}{\centering H:Center, V:Center} \tabularnewline \hline \multicolumn{1}{|P|}{\lipsum[1]} & \multicolumn{1}{M|}{\raggedleft H: Right, V:Center} & \multicolumn{1}{B|}{H:Left, V:Bottom} \tabularnewline \hline  \tabuphantomline  \end{longtabu}  \end{document}   Update:  Attempting the solutions presented in "" won't work.  The first solution I believe simply adjusts the entire column by creating a new column type:  \newcolumntype{B}{>{\begin{minipage}[b]{\hsize}}X<{\end{minipage}}}   This doesn't help my problem where I need the vertical alignment applied to individual cells, not a whole column. Applying this column type to \multicolumn doesn't appear to work.  The second solution places a \baselineskip into the optional parameter of \multirow which works initially but seems to become vertically centred as soon as the cell becomes a certain height.  I have updated my example above to show how it breaks.  Thanks


Does a Seeker of the Way affected by Arcbond deal one batch, or multiple sets, of damage?

What follows is a question wrapped in a word problem.   Facing an opponent attacking with an undefined, yet non-lethal, number of 1/1 tokens, I block one of them with . Once I am able to cast a spell during the Declare Blockers step, I cast  targeting my Seeker of the Way. (Recognizing Process trigger and lifelink gained.) Combat damage happens.  One damage is dealt to Seeker of the Way, triggering the Arcbond. Seeker of the Way deals 1 damage to each other creature, and each player. Lifelink causes me to gain life for each point of damage dealt.  Now, for the purposes of accounting +1/+1 counters gained by a , is the damage dealt by Seeker of the Way one blot of damage to the all the creatures, or separate spats of damage done to each creature? Would the Ajani's Pridemate gain one counter, because I've gained life, or multiple counters, because I've gained life multiple times?


Best Feature Selection Algorithm for Multiple Linear Regression

I have a quite a large dataset of 75 features and one dependent variable where all are continuous. I want to do a MLR. and want to reduce the number of features. But there are many feature selection algorithm available like NCA, ILFS , InfFS, ECFS, mrmr, relieff, mutinffs, fsv, laplacian, mcfs, rfe, L0, fisher, UDFS, llcfs, cfs, fsasl, dgufs, ufsol, lasso and so on... I tried some of them where each every algorithm is giving different result. Which one would be best for Multiple Linear Regression?


For an Integer Array |a| and Integer |i| in C, a[i] gives the same result as i[a]

How does a[i] and i[a] give the same result in C?   |i| is not an array, so i[a] should be syntactically incorrect, but gives the same output as a[i].   I have tested the code at .  Please explain.  Thanks.


I saved the jpeg file in the same place where all my TeX files are placed at; which commands should I be using to make the pic appear?  I am using Bakoma TeX 11.85, but I believe it's the same in every software of TeX, but I may be wrong.


I have a python script within which I define a variable called dt and initialize it as such: dt=0.30. For some specific reason, I have had to convert my python script into a C++ program, but the two programs are written to produce the exact same results. The problem is that the results start to deviate at some point. I believe the problem occurs due to the fact that 0.03 does not have an exact representation in binary floating point in python; whereas in C++ dt=0.30 gives 0.300000000000, the python output to my file gives dt=0.300000011921.   What I really need is a way to force dt=0.30 precisely in python, so that I can then compare my python results with my C++ code, for I believe the difference between them is simply in this small difference, which over runs builds up to a substantial difference. I have therefore looked into the decimal arithmetic in python by calling from decimal import *, but I then cannot multiply dt by any floating point number (which I need to do for the calculations in the code). Does anyone know of a simple way of forcing dt to exactly 0.30 without using the 'decimal floating point' environment?


UMVU estimator for non-linear transformation of a parameter

Let $X_1, ..., X_n$ be iid. and $X_1\sim N(\mu,1)$. $\gamma(\mu)=e^{t\mu}$ for $t\neq 0$    My question is how to find an UMVU estimator for $\gamma(\mu)$  My concern is not so much about the specific problem but rather about how to approach this  kind of estimation problem in general, if one wants to estimate a non-linear transformation of a parameter. The problem for me is that $\overline{X}_n$ is UMVUE for $\mu$ but I think that: $E_\theta[e^{\overline{X}_n}]\neq e^{t\theta}$.   We never covered this kind of problem in our lecture so I dont really have an idea of how to solve this kind of estimation problem  EDIT: I think I solved it myself: Let $\frac{1}{k}:=\frac{1}{(2\pi)^{n/2}}$  $ \int e^{t\overline{X}_n} \cdot \frac{1}{k}\exp(-\frac{1}{2}\sum_{i=1}^n(x_i-\theta)^2)d(x_1, ..., x_n)= $  $=\int \frac{1}{k}\exp(-\frac{1}{2}\sum_{i=1}^n(x_i-2(\theta+\frac{t}{n})x_i+\theta^2)d(x_1, ..., x_n)= $  $=\exp(t\theta+\frac{t^2}{2n})\int \frac{1}{k}\exp(-\frac{1}{2}\sum_{i=1}^n(x_i-2(\theta+\frac{t}{n})x_i+(\theta+\frac{t}{n})^2)d(x_1, ..., x_n)=$  $=\exp(t\theta+\frac{t^2}{2n})$  The UMVU estimator is therefore $T(X1, ..., X_n)=\exp(-t^2/2n) \exp(t\overline{X}_n)$ It is UMVU because $\overline{X}_n $ is sufficient and thereby by Lehmann-Scheffe the estimator is UMVU, as $T(X_1, ... X_n)=g(\overline{X}_n)$  Remark: I would still have to proof that $Var_\theta(g(\overline{X}_n)) < \infty \forall \theta $ for Lehmann-Scheffe to be applicable.


Why don't websites immediately display their text these days?

I've noticed that recently many websites are slow to display their text. Usually, the background, images and so on are going to be loaded, but no text. After some time the text starts appearing here and there (not always all of it at the same time).  It basically works the opposite as it used to, when the text was displayed first, then the images and the rest was loading afterwards. What new technology is creating this issue? Any idea?  Note that I'm on a slow connection, which probably accentuates the problem.  See below for an example - everything's loaded but it takes a few more seconds before the text is finally displayed:


I am trying to centre a DIV which contains a form.  I have managed to grey out the back ground and would like to centre the form within the window.  Below is what I have done so far, but I do not know how to progress it further to get the result that I need.  I am able to 'auto margin' horizontally, but I am not able to do this vertically (please see image).  If you stretch the browser window further vertically, the form stretches to occupy all of the vertically space.       #idOfForm{  margin: auto;  z-index: 10000;  position: absolute;  background-color: white;  top: 0;  bottom: 0;  left: 0;  right: 0;  padding: 10px;  width: 500px;  min-height: 250px;  border: 1px solid #ccc;  border-radius: 10px;  box-shadow: 3px 3px 3px #b8b8b8;  font-family: sans-serif;  color: #484848;  }


Multiple controller extensions communication

I have a Visualforce page with two controller extensions. Is there any way to get a reference to one of the extensions in the other one?


Determinant of symmetric circulant matrix.

I'm trying to solve a problem involving a symmetric circulant matrix. I've solved it one way, but it's been suggested to me that there's a more elementary way of solving it, but I can't seem to find it. Let $a,b\in \mathbb{R}$, and denote $$ D_n = \begin{vmatrix} a&b&\cdots &b\\ b&\ddots &\ddots&\vdots \\ \vdots & \ddots & \ddots & b \\ b& \cdots & b & a \end{vmatrix} $$ the $n\times n$  determinant with $a$ on the diagonal, and $b$ everywhere else. Find $D_n$. Now I'm pretty sure I solved it, but it requires a theorem that I'm supposed to prove in a later problem. That is :  Theorem: If $A$ is an $n\times n$ circulant matrix, that is such that: $$ A=\begin{pmatrix} a_0&a_1&a_2&\cdots & a_{n-1}\\a_{n-1} & a_0 & a_1 & \cdots & a_{n-2} \\ a_{n-2} & a_{n-1} & a_0 & \cdots & a_{n-3} \\ \vdots & \vdots & \vdots & \vdots & \vdots \\  a_1 & a_2 & \cdots & a_{n-1} & a_0 \end{pmatrix} $$ with $a_i\in \mathbb{C}$ for all $i\in{0,\ldots,n-1}$. Then $$ \det A = \prod_{i=1}^n P(\omega_i)$$ with $\omega_i^n=1, \, \omega_i\in \mathbb{C}$ and $P(z)=a_0+a_1z+\cdots + a_{n-1}z^{n-1}$  So here $D_n$ is indeed the determinant of a circulant matrix, and $P(z)=a+bz+\cdots +bz^{n-1}=a+b(z+\cdots z^{n-1})$. Next we note that if $\omega^n=1$, $\omega\neq 1$, then $1+\omega+\omega^2+\cdots +\omega^{n-1}=0$. So for the $n$-th roots of unity $w_i$ s.t. $w_i\neq 1$ we have $P(w_i)=a+b(w+w^2+\cdots +w^{n-1})=a-b$. Also $P(1)=a+(n-1)b$. So we can conclude that $$ \det A = \prod_{i=1}^n P(\omega_i)=(a-b)^{n-1}(a+(n-1)b) $$ Now as I said in the beginning, it was suggested that there was a solution involving only elementary row operations and noticing that the sum of the coefficient of each row is $a+(n-1)b$. I think one can show using elementary row operations that $$ D_n=\begin{vmatrix} a-b&b-a&0&\cdots &0\\ 0 & \ddots &\ddots & \ddots & \vdots \\ \vdots & \ddots & \ddots & \ddots & \vdots \\ 0 &\cdots & \cdots& a-b & b-a \\ b & b & \cdots & b & a \end{vmatrix}.$$ So here the $D_n$ is really close to being upper triangular which would allow to compute the determinant easily. And we can notice that the diagonal does have $(a-b)$ $n-1$ times so that if for some reason we could do something so that the last line is $0$ everywhere except the last coefficient which would be $a+(n-1)b$ we'd be done. But I don't see it. So I'll take any help.


Macbook not showing correct available diskspace after file deletion

I have deleted over 50gb on my MacBook Air and only showing 16gb as available? The screenshot shows 3 differents representations of the current disk space. I would say the 68.6gb is close to what has been actually used, so should be a lot more available


When using "HR" for Human Resources, should "a" or "an" be used in front of it in a sentence?

IS HR an acronym?  Should "a" or "an" be used in front of it in a sentence, such as: Do you have an HR question?


I wonder if there is an option to add a CRS to QGIS which is not listed in the internal database of the program. I read that PostGIS allows adding a custom CRS.


Return value of current watt consumption on command line

Is there a way to return the current watt consumption on the command line? I have found about the powertop program, but have not seen a way to return the Watt consumption as a value to the command line. I'm thinking of some file that I can cat or grep.


Calculate the ratio of the side length of a tetrahedron to the side length of the tetrahedron which its centroids form

$OABC$ is a regular tetrahedron. Let $E$, $F$, $G$, $H$ be the centroids of the triangles $OBA$, $OCB$, $OAC$, $ABC$, respectively. You are given that EFGH is also a regular tetrahedron. Using $OA=a$, $OB=b$, $OC=c$, find the ratio of the side length of tetrahedron $EFGH$ to the side length of tetrahedron $OABC$.  Show using vectors. Please give full proof to the answer.  Link to the picture of the tetrahedron used in this question:   the correct answer is a 1:3 ratio, however i am unsure as to how this is calculated


I've read about RAII a bit in the last few days and I always thought that I understood it. So I just wanted to write a little program that has an Object that handles a file and wanted to try RAII with throwing an exception. Here is what I did:  using namespace std;  class FileHandler{     FILE* file; public:     FileHandler(const string &s, const char *r){         cout << "opened file";         file = fopen(s.c_str(), r);         fputs("test", file);     }     ~FileHandler(){         cout << "closed file";         fclose(file);     } };  #include "FileHandler.h" #include <stdexcept>  int main() {     FileHandler fileHandler("test.txt", "w");     throw std::invalid_argument("why does this not work?");  }   From what I know about RAII the Destructor of FileHandler should be called and I should have an output on my console but somehow I don't get any output except the output for the exception. Does the exception output override my cout output or is my understanding of RAII wrong. I wanted to use this code to demonstrate to somebody else how RAII works, which is not really helpfull when I dont have the expected console output.  Thanks for any help.


Hi i have a snippet of javascript/JQuery that is reading from a and putting the values in to corresponding div's what i want to know is with what i currently have would it be possible to detect when the value has changed and flash the text or background or something along those lines, here is my code.           $(document).ready(     function () {         setInterval(function () {             $.getJSON("../../../UpdatedData/MachineCounts/MachineCounts.json", function (data) {                 $(".Midbox").empty().removeClass("YellowBackground").removeClass("redBackground");                  $.each(data, function (key, val) {                     var DID = "#" + val.controllerID + "D";                     var NID = "#" + val.controllerID + "N";                     var DSID = "#" + val.controllerID + "DS";                     var NSID = "#" + val.controllerID + "NS";                       var DayScrapPercent = val.ScrapCountDay / val.GoodCountDay * 100;                     var NightScrapPercent = val.ScrapCountNight / val.GoodCountNight * 100;                      if (isNaN(DayScrapPercent) == true) {                         DayScrapPercent = 0;                     }                      if (isNaN(NightScrapPercent) == true) {                         NightScrapPercent = 0;                     }                      var DayClass = "";                     var NightClass = "";                       if (DayScrapPercent > 3) {                         DayClass = "yellowBackground";                     } else if (DayScrapPercent > 5) {                         DayClass = "redBackground";                     }                      if (NightScrapPercent > 3) {                         NightClass = "yellowBackground";                     } else if (NightScrapPercent > 5) {                         NightClass = "redBackground";                     }                      $(DID).empty();                     $(DID).append(Math.abs(val.GoodCountDay)).addClass(DayClass);                     $(NID).empty();                     $(NID).append(Math.abs(val.GoodCountNight)).addClass(NightClass);                      $(DSID).empty();                     $(DSID).append(Math.abs(DayScrapPercent) + "%");                     $(NSID).empty();                     $(NSID).append(Math.abs(NightScrapPercent) + "%");                  });             });         }, 5000);     });   when this looks wit puts data in to divs the data is just numbers, what i need to do is detect when those numbers change and if they have changed flash when they change.


positive and negative correlation after controlling variables

i used OLS before i've include control variables i found negative association between X and Y after including  the Size i found positive association but the correlation is negative.  why this happen ?


This is meant to be a canonical Q&A for all the caching questions we get on meta    What is caching? Where is caching employed across the network?  Approximately how long ought it take for each cache to update?


I need to prove that if $\alpha\lt\beta$ are ordinals, then there exists t $\gamma\le\beta$ that $\alpha + \gamma = \beta$


How do you check systemd update content?

I am thinking of updating an Ubuntu server, and was wondering whether to update systemd or not. However, I am not certain how to inspect the contents of the systemd update. The output of apt list --upgradable shows:  systemd/xenial-updates 229-4ubuntu19 amd64 [upgradable from: 229-4ubuntu17] systemd-sysv/xenial-updates 229-4ubuntu19 amd64 [upgradable from: 229-4ubuntu17]   How do I inspect the contents of these updates to make sure I'm ok with what they are doing to my system?  Apologies if this is a basic question for the advanced Ubuntines here.


finding the stationary points of $f(x)=\frac{1}{2}x^TAx+x^Tb+a$

So we have the function $f(x)=\frac{1}{2}x^TAx+x^Tb+a$. Here $x,b \in \mathbf{R}^d$. $a \in \mathbf{R}$, $A$ is $d\times d$ symmetric, positive definite matrix with distinct positive eigenvalues. I need to find the stationary points of this function, let $x=\langle x_1,...,x_d\rangle, b= \langle b_1,...,b_d\rangle$.  Ok so $A=UDU^T$ where $U=[u_1,...,u_d]$. $D=diag\{\lambda_1,...,\lambda_d\}$  with $\lambda_1>...>\lambda_d$. Hence, $f(x)=x^TUDU^Tx+x^Tb+a$. $\triangledown f=?$


How do I combine two answers to create the best answer on stackoverflow?

I just asked my first question on stackoverflow and I'm really impressed that my question seems to be answered sufficiently already! See:    The issue I have is that the last two answers combined would provide the most complete answer. What's the proper way to go about combining them, marking the question answered, and giving credit where credit is due?  Thanks big time guys for saving us all from experts exchange hell!  Edit: Wow, 5 responses in 5 minutes. I think what makes the most sense is that I create my own answer out of the two. I don't think the second part of my question was answered though.  What is the proper way to give credit to the 2 answers that I'm combining? Is an upvote for each sufficient?


I don't know why, but I've met all its requirements for the house its on underground it has a chair, a table, a lighting source. I can even hear its background music.Its not near on the corruption. I'm on hardmode and I still didn't defeat the mechanical bosses BUT,the most confusing thing is that it has a statue message that says :Agaric wants to settle down.I really want truffle to move in its house. What should I do???


add harddisk to Ubuntu and mount it to /var/www/

I have installed an Ubuntu server on a VMWare workstation with a space of 20GB storage as seen below:    After the installation I've attached another 40GB worth storage to the existing Ubuntu server installation (seen below):    Now I want to add this 40GB to my / (root) directory or to /var/ directory but my df -h result shows;  root@Userver:~# df -h Filesystem      Size  Used Avail Use% Mounted on /dev/sda1        18G  900M   16G   6% / udev            990M  4.0K  990M   1% /dev tmpfs           400M  308K  399M   1% /run none            5.0M     0  5.0M   0% /run/lock none            999M     0  999M   0% /run/shm none            100M     0  100M   0% /run/user root@Userver:~#   What should I do now? Further, I have only ssh access to the server.   some one told me to do :  sudo mkfs.ext4 /dev/sdb -I   and when i do this command :  root@Userver:~# ls /dev/sd* /dev/sda  /dev/sda1  /dev/sda2  /dev/sda5   if you look carefully you , you don't see  "sdb" or "sdb1"  Next , i'm restart Ubuntu-server and after restart there was a "sdb" on "/dev/"  like this :  root@Userver:~# ls /dev/sd* /dev/sda  /dev/sda1  /dev/sda2  /dev/sda5  /dev/sdb   now when i do this command :  root@Userver:~# mkfs.ext4 /dev/sdb -I mkfs.ext4: option requires an argument -- 'I' Usage: mkfs.ext4 [-c|-l filename] [-b block-size] [-C cluster-size]         [-i bytes-per-inode] [-I inode-size] [-J journal-options]         [-G flex-group-size] [-N number-of-inodes]         [-m reserved-blocks-percentage] [-o creator-os]         [-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]         [-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]         [-t fs-type] [-T usage-type ] [-U UUID] [-jnqvDFKSV] device [blocks-count]   ,,,,,,,,,  please help me, i want to add the 40G hard to ubuntu 12.04, and mount it to "/var/www/"  but i cant do that  i use some how to's and i get this error's :  root@Userver:~# mount /dev/sdb1 /var/www/ mount: mount point /var/www/ does not exist   i dont know what should i do


find the principle part of Laurent expansion

Find the principle part of the Laurent expansion of the function $f(z) = \frac{1}{(e^z - 1)^2}$ about $z = 0$. Hint: First show that $f$ has a pole of order $2$ at $z = 0$.  I already found the pole of order $2$ using Laurent expansion. But I am not able to proceed further with finding the principle part.   Thank you


Mapping of message onto elliptic curve and reverse it?

I would like to perform a variant of Elliptic Curve ElGamal in java using the BouncyCastle libraries.  I currently face the difficulty of mapping a message $m$ onto the elliptic curve $E_p$. I have so far multiplied the generator $g$ of $E_p$ by the message $m$. However, this is hardly reversible. Hence I cannot retrieve the original message without storing a lookup table for my whole message space.  The post  quotes that some reversible mapping exists, described in .  After doing some research, I found . However it looks quite cryptic to me, and I believe there must exist some library doing this already.  Is there any widely used mapping available? Also, is there any library implementing this?


Django Template Variables and Javascript

When I render a page using the Django template renderer, I can pass in a dictionary variable containing various values to manipulate them in the page using {{ myVar }}.  Is there a way to access the same variable in Javascript (perhaps using the DOM, I don't know how Django makes the variables accessible)? I want to be able to lookup details using an AJAX lookup based on the values contained in the variables passed in.


How to remove the WITH ENCRYPTION from the code of the procedure - via T-SQL

I have many procedures that I use the option WITH ENCRYPTION when I create them.  You can see this on the picture below, as an example:    the problem with this is that when I want to save my previous version of my stored procedure, I cannot get the expected result, as you can see on the picture below.    the way I am backing up the code of the stored procedures is on the link below:   select 'Proc' = SCHEMA_NAME(p.schema_id)+'.'+p.name     , 'Type' = per.state_desc, 'Permission' = per.permission_name     , 'Login' = pri.name, 'Type' = pri.type_desc      , * From sys.procedures as p left join sys.database_permissions as per on p.object_id = per.major_id left join sys.database_principals as pri on per.grantee_principal_id = pri.principal_id where ...   is there a way to remove the WITH ENCRYPTION from the code of a stored procedure, before I save it?  Provided I have ownership of the procedure.  There is a nearly duplicated question on the link below    however, on this question, I own the database. I am sysdba. I can use any resources, but I would like a solution via T-SQL.


Why does $0.75 \times 1.25$ equal $0.93$ and not $1$?

If percentage points can equal decimal points, then $1.25$ should equal $125$% when multiplying $1.25$ by any number.  Therefore $125$% of $0.75$ should equal $1$ if $0.75$ is also $75$% of $1$.   Am I missing something super obvious here or what?!  Please help. Thank you!


Hi I have used a recent suggestion by @leandriis to fix the headers table, but when I tried to use his suggestion to draw another table, I'm getting several issues, here my suggestion, my output and the desired table to produce. My suggestion :     \documentclass{article}     \usepackage{geometry}     \usepackage{rotating}     \usepackage{booktabs, makecell}     \usepackage[referable]{threeparttablex}     \usepackage{siunitx}    \usepackage[skip=1ex]{caption}    \usepackage{xcolor}    \newcommand\tc[1]{\textcolor{blue}{#1}}    \NewExpandableDocumentCommand\mcc{O{1}m}    {\multicolumn{#1}{>{\bfseries}c}{#2}}    \usepackage{multirow}    \renewcommand{\theadfont}{\normalsize}    \begin{document}  \begin{table}[h!]  \centering  \begin{threeparttable}   \caption{Forecasting and encompassing test results for the bagging model and combining methods,     1995:04–2005:03 out-of-sample period}    \label{tab1}    \begin{tabular}{@{} >{\itshape}l                *{8}{S[table-format=1.2]}                 }   \toprule   \multirow{2.1}{*}{Combining method}    & \mcc[4]{$\thead{H_{0}$: BA encompasses CB}}    & \mcc[4]{$\thead{H_{0}$: CB encompasses BA}}   \\    \cmidrule(r){2-5} \cmidrule(l){6-9}   & \mcc{\hat{\lambda}_{CB}} & \mcc{MHLN_{h}} & \mcc{P-value}    & \mcc{\hat{\lambda}_{CB}} & \mcc{MHLN_{h}} & \mcc{P-value}\\   \midrule   BA model&9.13& & & & & \\   Mean            & 0.35& 2.42\tc{**} & 0.01& 0.65& 3.54\tc{**} & 0.00\\          Median          & 0.32& 2.38\tc{**} & 0.01& 0.68& 3.77\tc{**} & 0.00\\          Trimmed mean    & 0.34& 2.39\tc{**} & 0.01& 0.66& 3.67\tc{**} & 0.00\\         DMSE,$\Psi=1.00$& 0.35& 2.42\tc{**} & 1.00& 1.10& 3.54\tc{**} & 0.00\\         DMSE,$\Psi=0.90$& 0.35& 2.41\tc{**} & 1.00& 1.10& 3.55\tc{**} & 0.00\\         C(2, PB)        & 0.34& 2.34\tc{**} & 0.01& 0.66& 3.59\tc{**} & 0.00\\         C(2, PB)        & 0.36& 2.33\tc{**} & 0.01& 0.64& 3.43\tc{**} & 0.00\\         PC              & 0.59& 2.79\tc{**} & 0.00& 0.41& 2.14\tc{**} & 1.00\\                \bottomrule \end{tabular}  \end{threeparttable}  \end{table}  \end{document}  my output:  Desired Table :


Design Pattern: Singleton and AbstractFactory

From what I have gathered, singleton is bad and shouldn't be used frequently.  Is that the case or just singleton gets a bad rap?  When implementing AbstractFactory patterrns, I tend apply singleton to every  class TypeFactory extends AbstractFactory. Lets say ShapeFactory and ColorFactory, there should only be one instance of each factory, thus the use of singleton.  What you guys think? Is the usage in this case justified or bad practice?


What are the differences between mocks and stubs on Rhino Mocks?

I haven't play enough with this and usually use mocks, but I wonder what are the differences between this two and when to use one or the other on Rhino Mocks.  Update:  I also found the answer to my question in :  The difference between stubs and mocks You can get the actual definition of the these terms in this article: . I want to focus on the difference from the point of view of Rhino Mocks.  A mock is an object that we can set expectations on, and which will verify that the expected actions have indeed occurred. A stub is an object that you use in order to pass to the code under test. You can setup expectations on it, so it would act in certain ways, but those expectations will never be verified. A stub's properties will automatically behave like normal properties, and you can't set expectations on them.  If you want to verify the behavior of the code under test, you will use a mock with the appropriate expectation, and verify that. If you want just to pass a value that may need to act in a certain way, but isn't the focus of this test, you will use a stub.  IMPORTANT: A stub will never cause a test to fail.


If i have an array that I've used to create 50 random numbers, I then sort them numerically. Now lets say I wanted to print out the 10 biggest number (elements 40 to 50) I could say:  print($array[40]) print($array[41]) print($array[42]) etc etc. But is there a neater way to it? Hope I'm making myself clear.  Cheers


Is it possible to get back to `Add mode`?

After for example a Torus has been added, you can specify major segments, minor segments, radii, etc.  After some clicking around i cant seem to get back to these settings anymore. is it possible? if so, how?


Reduce Character Limit for Bounty Custom Text

I am suggesting dramatically lowering the custom text characters allowed in any bounty from 3000 to the length of a comment (600). The reasons for this is as follows:  There are no  in bounty texts  There is only  available  That many characters in a single paragraph is completely TL;DR  Allowing 3000 characters is a strong suggestion you can use more complicated formatting which makes even short (with respect to the character limit) bounty texts    Probably 100x (or more) easier to implement this than adding full markdown to bounty text   Note that this entire post is barely 1/3 the allowed character limit.


Present participle with Simple Present tense

The boy comes running.  My father stands behind me smiling. (I saw the first example in a grammar book and the second in a prose)    In which cases is this particular form (S + action-verb + s/es of the verb + 'ing' form of the another action-verb) applicable?


Why doesn't dark matter collapse into a black hole?

Dark matter supposed to be affected only by gravity and no other force. At the same time, however, dark matter forms halos around galaxies, that become visible examining how galaxies and clusters bend the light. The question is now, what does prevent these huge clouds of dark matter from collapsing? A cloud of "normal" matter has an inner pressure from its temperature. The force working here would be the electromagnetic force because the atoms and molecules of "normal" matter repel each other (compare  Veritasium - Can We Really Touch Anything?) When it collapses as a cold cloud to form stars, the inner pressure is still working, it's heating up until it forms a star hot enough to start fusion fire. When the star collapses because the pressure decreases after the core cools down after fusion slows down at the end of its life, quantum mechanical forces (Pauli principle) keep it from getting down any further until the mass is strong enough to overcome the Pauli forces and create a black hole. Now why doesn't the same happen to dark matter if there's no other force that's affecting dark matter particles (whatever they might be) except for gravity? Inner pressure can't happen because electromagnetic forces don't work here. Pauli principle can't happen because for that it's not dense enough and would again need other forces to be exchanged between the particles. Does that mean, that these DM particles have to be Bosons since they can go through each other and thus never lose any energy to each other do collapse further? However, gravity could produce some kind of inner friction too when one particle loses gravitational energy to another one passing by. PS: I am not a physicist just interested in this stuff, thus I can't do the calculations for myself.


How to prove that $a \cdot b$ is not divisible by 5 for $\frac{1}{1} + \frac{1}{2} + ... + \frac{1}{99} + \frac{1}{100} = \frac{a}{b}$?

Let  $$\frac{1}{1}  +  \frac{1}{2}  + ... + \frac{1}{99}  + \frac{1}{100}  =  \frac{a}{b},$$  where $a,b$ natural numbers and  $\gcd(a,b) = 1$. How to prove that $a \times b$ is not divisible by $5$?   I know $\frac{1}{5k+1}+\frac{1}{5k+2}+\frac{1}{5k+3}+\frac{1}{5k+4}=\frac{a}{b}$,$k \in N$ ,where a ,b relatively prime,so a is  divisible by 25, and b is not  divisible by 5.


Unique HashCode Generation for Unique object using C#

I want to generate the hash code for a object and store the generated hash code into the database. After some time I want to update the the object.Before updating the object, I want to check whether the object is changed or not using hash code. if the Generated has code and stored has codes are same I want to skip the updation, else I will update the Object. How can I implement this?


I'm starting a carpet repair business and my name is Chris. Is Chris's Carpet Repair correct?

Is Chris's Carpet Repair correct or should it be Chris' Carpet Repair?


How to loop through a directory in javascript when run locally?

For an offline application in javascript, a portrait face editor, I would like to let a script crawl through a directory containing +300 images. Keep in mind that I run my html and javascript locally, is there any way for me to fix getting all the sources of the images into my javascript. The user also should be able to add images to the directory to be crawled. I cannot use php because not every user can execute php.  I got one solution which requires input from the user and is restricted to certain browsers:   Is there a simpler way to do this?


NullPointerException when switching activites and using a global array

I have a simple Android app with 2 activities and a base activity where I store a global array of images.  The ImageGrid activity displays a grid of images that the user can touch/click to display a larger version of that image.  When clicked, ImageGrid sends the selected index of the image that was touched to the selectedImage activity.  However, everytime it does that, I get this error:     java.lang.NullPointerException: Attempt to invoke virtual method 'void   android.widget.ImageView.setImageResource(int)' on a null object   reference      Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void   android.widget.ImageView.setImageResource(int)' on a null object   reference                         at SelectedImage.onCreate(SelectedImage.java:19)   Line 19 is this:  int arrNum = arrPosition;   I've stepped through the debugger, and I do see the index position getting passed and set, so I'm at a loss as to why I'm getting a NullPointerException.  Here is the BaseActivity:  public class BaseActivity extends AppCompatActivity {      Integer[] ApocImages =  {R.drawable.image1, R.drawable.image2, R.drawable.image3, R.drawable.image4,             R.drawable.image5, R.drawable.image6, R.drawable.image7, R.drawable.image8,             R.drawable.image9, R.drawable.image10, R.drawable.image11, R.drawable.image12,             R.drawable.image13, R.drawable.image14, R.drawable.image15, R.drawable.image16}; }   ImageGrid:  public class ImageGrid extends BaseActivity {      ImageView gridThumbnail;     @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_image_grid);         GridView grid = findViewById(R.id.gridView);         final ImageView selectedImage = findViewById(R.id.imgLarge);         grid.setAdapter(new ImageAdapter(this));          grid.setOnItemClickListener(new AdapterView.OnItemClickListener() {             @Override             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {                 Intent myIntent = new Intent(ImageGrid.this, SelectedImage.class);                 int arrPos = position;                 myIntent.putExtra("selectedImage", arrPos);                 startActivity(myIntent);             }         });     }      public class ImageAdapter extends BaseAdapter {         private Context context;          public ImageAdapter(Context c) {             context = c;         }          public int getCount() {             return ApocImages.length;         }          public Object getItem(int position) {             return null;         }          public long getItemId(int position) {             return 0;         }          //gets the view for each item in the array         public View getView(int position, View contentView, ViewGroup parent) {             // populate gridview with imageview of each photo in array             gridThumbnail = new ImageView(context);             gridThumbnail.setImageResource(ApocImages[position]);             gridThumbnail.setScaleType(ImageView.ScaleType.FIT_XY);             gridThumbnail.setLayoutParams(new GridView.LayoutParams(330, 300));             return gridThumbnail;         }      } }   SelectedImage:  public class SelectedImage extends BaseActivity {      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         Context appContext = getApplicationContext();         final ImageView selectedImage = findViewById(R.id.imgLarge);          Intent intent = getIntent();         int arrPosition = intent.getIntExtra("selectedImage", 1);          int arrNum = arrPosition;         selectedImage.setImageResource(ApocImages[arrNum]);         selectedImage.setClickable(true);          selectedImage.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 //startActivity(new Intent(SelectedImage.this, ImageGrid.class));                 finish();             }         });     } }


How to vertically center align div having back ground image

I have an outer div and an inner div. Inner div has background-image.    How to vertically center align inner div image? I dont want to use margin-top