how to solve dpkg: warning: 'tar' not found in PATH or not executable

I tried your solution but still the same problem exist.  gaja@gaja-System-Product-Name:~$ sudo su [sudo] password for gaja:  root@gaja-System-Product-Name:/home/gaja# sudo apt-get install apache2 Reading package lists... Done Building dependency tree        Reading state information... Done apache2 is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 230 not upgraded. 2 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y dpkg: warning: 'tar' not found in PATH or not executable dpkg: error: 1 expected program not found in PATH or not executable Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin E: Sub-process /usr/bin/dpkg returned an error code (2) root@gaja-System-Product-Name:/home/gaja#


What does this black-font Israeli stamp on my Passport mean?

I applied for B2 Tourist visa at Israel embassy in New Delhi last week. But my visa application got rejected and stamped a black stamp on my passport.   What does black stamp mean? After how much time should I reapply for tourist visa?


mark single form field as cause of error on form validation

I've a custom field, and I'm trying to write the validation for the field values. however when a particular field causes the failure, the whole fielset is marked in red. I only want the specific field element to be highlighted, and in the case of Unlimited I only want the specific entry highlighted.   here is the code I have so far. but the whole fieldset is marked in red when ever a validation fails.      function prodlist_field_widget_form(&$form, &$form_state, $field, $instance, $langtype, $items, $delta, $element) {       $base = $element;        if ($instance['widget']['type'] == 'prodlist_text') {         $element['#element_validate'] = array('_prodlist_text_validate');           $element['prod_type'] = array(           '#type' => 'select',           '#title' => t('Product Type'),           '#default_value' => isset($items[$delta]['prod_type']) ? $items[$delta]['prod_type'] : NULL,           '#options' => type_options(),           ) + $base;          $element['prod_description'] = array(           '#type' => 'select',           '#title' => t('Description'),           '#default_value' => isset($items[$delta]['prod_description']) ? $items[$delta]['prod_description'] : NULL,           '#options' => description_options(),           ) + $base;          $element['order_amount'] = array(           '#type' => 'textfield',           '#title' => t('Amount'),           '#default_value' => isset($items[$delta]['order_amount']) ? $items[$delta]['order_amount'] : NULL) + $base;       }       return $element;      }   function _prodlist_text_validate($element, &$form_state) {    if ($form_state['complete form']['#form_id'] == 'field_ui_field_edit_form') {     return ;   }    $values = $form_state['values'];   $language = $values['language'];   $field_name = $element['#field_name'];   $field_name_error_box = $field_name;    foreach ($values[$field_name][$language] as $delta => $item) {      if (isset($item['order_amount'])) {        if (is_numeric($item['order_amount'])) {         if($item['prod_description'] != 'no order' && $item['order_amount'] <= 0 ){           form_set_error($field_name_error_box, t('Order amount has to be more then 0'));         } else if ($item['prod_description'] == 'no order' && $item['order_amount'] > 0) {           form_set_error($field_name_error_box, t('You have created an order amount without selecting a product.'));         }         } else {         form_set_error($field_name_error_box, t('Order amount has to be numeric'));       }    }    }  }   I'm trying to set the variable $field_name_error_box = $field_name; to the correct value but it either lights up the whole form section or nothing at all.   I've tried the following, and lots of other variants without luck.  $field_name_error_box = $field_name . 'order_amount';


How to remove everything underneath a key from a JSON object

I have a JSON (All under req.body) in the format   {body :    { Cust : {...} },    { Input : {...} },    { Reciept : {image: [Array] } }  }   I want to be able to remove all the key Reciept so the new JSON would look like ...  {body :    { Cust : {...} },    { Input : {...} } }   I've tried to use delete req.body.Reciept and delete req.body.Reciept.image Both are unable to change the JSON for me. What should I be doing?  edit: When I console log req.body this is what I get :  { body:    { CustData:       { customer: 'T',         address1: '',         address2: '',         billing: '',         signature: [Object] },      InputData:       { InputDate: '2019-10-21 23:25:28',         Workers: [],         Equipment: [],         Purchases: [] },      Reciept: { image: [Array] } } }   I haven't found a solution because I have a JSON and then an array as a value for a key. I am simply trying to remove the whole Reciept key and everything attached to it.  Here is what is I am running  console.log(req.body); delete req.body.Receipt; console.log(req.body);   Here is what I get returned in the terminal   { body:    { CustData:       { customer: 'Test',         address1: '',         address2: '',         billing: '',         signature: [Object] },      InputData:       { InputDate: '2019-10-22 0:9:33',         Workers: [],         Equipment: [],         Purchases: [] },      Receipt: { image: [Array] } } }  //followed by { body:    { CustData:       { customer: 'Test',         address1: '',         address2: '',         billing: '',         signature: [Object] },      InputData:       { InputDate: '2019-10-22 0:9:33',         Workers: [],         Equipment: [],         Purchases: [] },      Receipt: { image: [Array] } } }


Word order: "10 minutes more" or "10 more minutes"?

I'm still packing my clothes. I'll need 10 minutes more.   I'm still packing my clothes. I'll need 10 more minutes.      Are both grammatically correct?


Every time i try to update or install package, i get the following error:  dpkg: unrecoverable fatal error, aborting:  reading files list for package 'libjson-glib-1.0-0:amd64': Input/output error E: Sub-process /usr/bin/dpkg returned an error code (2)     i've already tried:    sudo apt-get check   sudo apt-get install -f sudo dpkg --configure -a     What went wrong and how to fix this issue?


Considering that , maybe there are ways to track how satisfied these users are?  Since upvotes aren't an option to unregistered users, my thought was a simple, non-intrusive "Was this helpful?" box below answers, that would be shown only to unregistered users who arrived at the page from a search engine.    These "helpful" votes could be translated into upvotes for the user who provided the answer.  Maybe for every 10(?) helpful votes, the user gets one upvote.  I'm not sure what you'd want to do with the "not helpful" votes other than keep them as statistics.  (Show them to 1000+ rep users?  Use them as indicators of potential spam?  Use them as indicators of a question lacking a good answer?)  This would be good for simple questions, that get answered and forgotten quickly.  I think the user who provided the correct answer that helps lots of unregistered users should get some rep for that.  It is desired behavior that should be encouraged!  Another idea: if rep goes to the person who provided the helpful answer, maybe some rep could go to the person that asked the question as well?  (Maybe one upvote on the question for every 20 helpful votes to answers to that question?) After all, if the question is not written well, no one will arrive at the page from a search engine.  This means that well-worded, SEO friendly questions are encouraged.  Obviously, this means you'd have to account for people who are trying to cheat.  I think it shouldn't be too difficult to spot anomalous vote patterns, given the experience the SO team already has with that type of thing.  Another problem would be SEO spamming (i.e. throwing keywords into the post for no apparent reason other than to increase the chance of a Google hit), but I think the existing flagging mechanisms will control this well.  Also, if the question isn't what the user was looking for, then they probably won't find it very helpful anyway.


Does every prime $p \neq 2, 5$ divide at least one of $\{9, 99, 999, 9999, \dots\}$?

I was thinking of decimal expressions for fractions, and figured that a fraction of the form $\frac{1}{p}$ must be expressed as a repeating decimal if $p$ doesn't divide $100$. Thus, $\frac{p}{p}$ in decimal would equal $0.\overline{999\dots}$ for some number of $9$s, thus there must be some amount of $9$s such that $p | 999...$ in order for a decimal representation of $\frac{1}{p}$ to be possible.  Furthermore, the question could be rephrased to "an infinite number of" since if it divides $999\dots$ where there are $k$ nines, it also divides when there are $2k, 3k, \dots$ nines.  Is this reasoning correct? If so, this is how I thought about proving it:  We can reduce the set to $\{1, 11, 111, 1111, \dots\}$ since $p=3$ obviously works.  Let $a_k = 111\dots$ where there are $k$ ones. This satisfies the recursion $a_k = 10a_{k-1} + 1$  But I'm unsure what to do past this point (tried looking at modular cases or something but wasn't able to get anywhere). Am I on the right track at all? Is this "conjecture" even correct?


mysqld crashing almost every hour - mysqld invoked oom-killer -

I am running wordpress on a centOS digital ocean droplet my mysql keeps crashing almost every hour -- with an out of memory error manually restarting mysqld brings it back up via sudo service mysqld restart Does anyone know what could be causing this? here are my configurations and logs around the time of the crash: /etc/my.cnf [mysqld] max_connections         = 50 wait_timeout            = 3600 interactive_timeout     = 3600 open_files_limit        = 2048 table_open_cache        = 1024 max_allowed_packet      = 16M max_heap_table_size     = 256M tmp_table_size          = 256M key_buffer_size         = 128M join_buffer_size        = 2M sort_buffer_size        = 2M read_buffer_size        = 2M read_rnd_buffer_size    = 256K  /var/log/messages: /var/log/messages:Sep 16 17:51:38 centos kernel: mysqld invoked oom-killer: gfp_mask=0x6200ca(GFP_HIGHUSER_MOVABLE), nodemask=(null), order=0, oom_score_adj=0 /var/log/messages:Sep 16 17:51:38 centos kernel: ? virtballoon_oom_notify+0x25/0x70 [virtio_balloon] /var/log/messages:Sep 16 17:51:38 centos kernel: oom_kill_process.cold.29+0xb/0x10 /var/log/messages:Sep 16 17:51:38 centos kernel: [ pid ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name /var/log/messages:Sep 16 17:51:38 centos kernel: oom_reaper: reaped process 11402 (mysqld), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB  journalctl  Sep 16 17:51:38 centos kernel: mysqld invoked oom-killer: gfp_mask=0x6200ca(GFP_HIGHUSER_MOVABLE), nodemask=(null), order=0, oom_score_adj=0 Sep 16 17:51:38 centos kernel: mysqld cpuset=/ mems_allowed=0 Sep 16 17:51:38 centos kernel: CPU: 0 PID: 11418 Comm: mysqld Kdump: loaded Not tainted 4.18.0-147.5.1.el8_1.x86_64 #1      Sep 16 17:51:38 centos kernel: Out of memory: Killed process 11402 (mysqld) total-vm:1525956kB, anon-rss:419744kB, file-rss:0kB, shmem-rss:0kB Sep 16 17:51:38 centos kernel: oom_reaper: reaped process 11402 (mysqld), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB Sep 16 17:51:38 centos systemd[1]: mysqld.service: Main process exited, code=killed, status=9/KILL Sep 16 17:51:38 centos systemd[1]: mysqld.service: Failed with result 'signal'. Sep 16 17:51:38 centos systemd[1]: mysqld.service: Service RestartSec=100ms expired, scheduling restart. Sep 16 17:51:38 centos systemd[1]: mysqld.service: Scheduled restart job, restart counter is at 1. Sep 16 17:51:38 centos systemd[1]: Stopped MySQL 8.0 database server. Sep 16 17:51:38 centos systemd[1]: Starting MySQL 8.0 database server... Sep 16 17:51:38 centos mysql-check-socket[12938]: Socket file /var/lib/mysql/mysql.sock exists. Sep 16 17:51:38 centos mysql-check-socket[12938]: No process is using /var/lib/mysql/mysql.sock, which means it is a garbage, so it will be removed automatically Sep 16 17:51:39 centos systemd[1]: mysqld.service: Main process exited, code=exited, status=1/FAILURE Sep 16 17:51:39 centos systemd[1]: mysqld.service: Failed with result 'exit-code'.


Can I install KDE4 desktop on Ubuntu 15.04 using the terminal like the good 'old' days or will I have to go back to 14.04 LTS? KDE4 was beautiful.  Edit: I don't want to roll back. I want to use KDE4 desktop on Ubuntu 15.04.


When I run sudo apt-get install update && sudo apt-get install upgrade, I am getting these errors:  E: Unable to locate package update E: Unable to locate package upgrade  When I try to run sudo apt-get update && sudo apt-get upgrade, it looks it works but it still giving that kinda error :   Reading package lists... Done N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://downloads.mariadb.com/MariaDB/mariadb-10.4/repo/ubuntu bionic InRelease' doesn't support architecture 'i386' E: The repository 'http://ppa.launchpad.net/paolorotolo/android-studio/ubuntu bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://downloads.mariadb.com/Tools/ubuntu bionic InRelease' doesn't support architecture 'i386'


Seeking WW2 service record of Helmut Pelz?

I am looking to find my grandfather's service record in the German navy during the Second World War.  He was also a prisoner of war and I have the paper work for this.


Convergence of $\sum_{n=0}^\infty (\frac{n}{n+1})^{n^2}e^n$

Wolframalpha tells that $$\sum_{n=0}^\infty (\frac{n}{n+1})^{n^2}e^n$$ diverges since $$\lim_{n\to\infty}(\frac{n}{n+1})^{n^2}e^n=\sqrt{e}$$. How do you calculate this limit?   And also it tells that $$\sum_{n=0}^\infty (-1)^n(\frac{n}{n+1})^{n^2}e^n$$ is not convergent, but it didn't specify the reason. Can you give me one?


I've tried different types of metering for the same object shoot. But couldn't understand the metering exactly.  Please explain the concept of metering in detail


What does a Partial Copy Sandbox actually copy from Production?

Related to this question:    Will this bring a random selection of the data across for each object I select? Can I exclude the record data on an object or would I have to just delete it using dataloader?


List of Abbreviations / Glossary without extra packages?

I finished my dissertation and I have now been asked to add a list of abbreviations/glossary just after the table of contents. I have searched several examples but all seem to require extra packages that do not work on my mac (using texpad on mac os x maverick) so I was wondering if some generous soul could guide me through how to do that on a mac. It could also be done manually without packages as long as there is a good formatting.   Thanks in advance.


I know this question has been a billion times, but none of the answers are working (Google Chrome 61, Windows 10).    @font-face {   font-family: Antipasto;   src: url(Antipasto-ExtraBoldTrial.ttf); }  h2 {   font-family: Antipasto; }  p {   font-family: Antipasto; }  div {   display: inline; }
   <video width="30%" height="30%" controls>   <source src="video1.mp4" type="video/mp4">   No video. </video>

Title

Sentence 1

Sentence 2.

Sentence 3

     It works in the preview there, but not on my local computer.  Many of these answers are not working on my laptop either, I guess it's a graphics issue with Chrome.  Thanks for everybody for helping anyway.


How can you construct the bijection between real numbers and functions over naturals?

I was reading "Classical Recursion Theory" by Odifreddi and it starts with this phrase:      Recall that Classical Recursion Theory is the study of real numbers or, equivalently, functions over the natural numbers.   I come from Computer Science so this was puzzling to me at first. I understand he's referring to the fact that there is a bijection between $\mathbb{N}$ $\rightarrow$ $\mathbb{N}$ and $\mathbb{R}$. I know that |$\mathbb{N}$ $\rightarrow$ $\mathbb{N}$| is greater than |$\mathbb{N}$| (Cantor's diagonal), but how can you find the real $x$ corresponding to a certain function?  I know that given a real $x$ we can construct a function like this: $f(n) =$ the $n$-th digit of $x$. But what is the other way around? We can't use digits in this case, I think, because we have numbers with more than one digit; I don't think changing the digit system would help (I think every digit system has a finite alphabet?) and that way we would link more functions to the same real number.  I know that you can't compute reals in a strict sense (you would need $\infty$ digits) but I was wondering if there was at least some sketch-procedure of how to represent a function with a real number, to have at least logically a glimpse of what is the number $x$ corresponding to a generic function $f$: $\mathbb{N}$ $\rightarrow$ $\mathbb{N}$.


Cardinality of order types in $\mathbb{N}$

Let be the next equivalence relation on $B= \{R \subseteq \mathbb{N}\times\mathbb{N} \ | \ R \ is \ a \ well-order \ on \  \mathbb{N}\}$ : $$"R \equiv R' \leftrightarrow \ (\mathbb{N},R) \cong (\mathbb{N},R') \ are \ well-ordering \ sets \  isomorphic" $$  Which is the cardinality of $B/\equiv$?  Firstly, we can notice that each well-ordering set is isomorphic to an ordinal $\alpha \ $such that $\alpha < \aleph_{1}$, and so it is enough to count how many ordinals are isomorphic to a subset of $\mathbb{N}$. For example, if we consider $A$ the set of the even numbers and $B$ the set of odd numbers with the usual order relation, $A \oplus B$ is isomorphic to $\omega + \omega$. Another example could be: if we consider the order of $\mathbb{N}$ that we use in Sharkowski Theorem, that order is isomorphic to $ \omega^{2} + \omega$. Working with prime numbers we could build also $\omega^{n} \ \forall n \in \mathbb{N}$, and so $\omega^{\omega}$ and maybe something bigger. However, we know that each countable ordinal is isomorphic to a subset of $\mathbb{Q}$, but I bet that the same result is not true for $\mathbb{N}$ because it is "too small".  What can I do?


When Navigating to a standard record page from a lightning web component the related list on the record page has not been updated

I use a lighting web component to create multiple related records linked to a parent record. After this is completed I use the NavigationMixin to redirect back to the parent record. I am successfully redirected but the related list does not show the newly created records and I need to refresh the page again before they appear. Is there anyway I can force the page to be refreshed or to display these new related records when I am initially redirected? Below is the sample code of the final redirect navigateToParentRecord(){     this[NavigationMixin.Navigate]({         type: 'standard__recordPage',         attributes: {             recordId: this.recordId,             actionName: 'view'         }     }); }  Thanks


Is it possible to write two classes in C++ where each class needs to know the other exists?

This is similar to these questions:   But I am looking for a more general or "best practices" solution. This is a problem that often comes up in game design: when many objects need information from other objects and one of them will inevitably be the "most downstream" (in terms of header includes) than any other element. Seeing as there are thousands of games out there, I am assuming there is some "good" solution to this. In particular, I have a virtual base class "GameObject" to which all my game objects belong: players, bullets, zombies... and a map of "GameObject*" that stores all game objects.  My GameState class holds this map and all Game objects retain the same static pointer to the map. Each GameObject also has a vector<GameObject*> called "collisions" that holds a ptr to each GameObject that collided with it since the last update. Class GameObject {     private:     static int objID;     int id;      //maps     static std::unordered_map<int, GameObj*>* objs;      public:     //list of collisions with other objects     std::vector<GameObj*> collisions;   //Accessors - some generic accessors unsigned int getID() const; ObjType getType() const; sf::Vector2f getPos() const; virtual const sf::FloatRect& getGlobalBounds() const = 0;  //And the key function, update virtual STATE update() = 0;  } My GameState class contains a method which calls Player::update() (for all players, its a non-Static method), Zombies::update() for all zombies and so on. Update() is a pure virtual function of GameObject. If Player.h includes Zombie.h then I can go into my player class, iterate through my vector of bullets and check if any of them has collided with a zombie.  I can delete the bullet, add to the players score, etc. as necessary. However, in my Zombie class, I can deduce that the zombie has collided with a bullet but I cannot deduce how much damage that bullet does, or anything else about the bullet because the zombie doesn't know what a bullet is (i.e., I cant dynamic cast GameObj* to Bullet* and use accessor methods). So how can we solve this problem. Solutions:  It occurred to me that a primitive fix may be to include "Bullet.h" in for both Zombies and Players - which may work but does not fix the larger problem - say the player did direct damage to the zombie, for instance.  A "forward declaration" of the class did not work for me here. The compiler still gets angry over a dynamic cast from GameObject* to Bullet*  Passing all bullet/zombie information through (via the wrapper gameState class) is possible but cumbersome, not to mention I'm using a pure virtual function for all my game objects, most of which would not make use of this information being passed.  I could expand my GameObject class to hold more information about a GameObject like its damage.  However, for some GameObjects this information would be extraneous.  Finally, I could do everything I need to do to the zombie in the Player class, (via dynamic casting) but this feels disjunct, why should the player be directly modifying the zombie?   Any other clever solutions?


I have SQL server 2017. I have one 3 TB size database there. Somehow due to long running transaction the database got stuck 'IN Recovery' mode after SQL server Restarted. When I checked the sql error logs it says 2 189 255 seconds remaining (Phase 2 of 3) completed which is almost 25 days. My goal is to bring the database online even if I lose some data.  So I've ran below commands but no luck.     USE [master]   GO    RESTORE DATABASE test WITH RECOVERY   --Msg 3101, Level 16, State 1, Line 6   --Exclusive access could not be obtained because the database is in use.   --Msg 3013, Level 16, State 1, Line 6    --RESTORE DATABASE is terminating abnormally.     ALTER DATABASE test SET EMERGENCY;   GO   --Msg 5011, Level 14, State 7, Line 13   --User does not have permission to alter database 'DragonDriveConnect',    the database does not exist, or the database is not in a state that    allows access checks.   --Msg 5069, Level 16, State 1, Line 13   --ALTER DATABASE statement failed.    DBCC CHECKDB (DragonDriveConnect, REPAIR_ALLOW_DATA_LOSS) WITH    ALL_ERRORMSGS;   GO   --Msg 922, Level 14, State 1, Line 22   --Database 'DragonDriveConnect' is being recovered. Waiting until     recovery is finished.   At last I've tried to Delete the database too but that is also not working and giving me error saying Cant Delete.  How do I get out of this situation?


No notification for comment reply when using Dupe Hammer along with other close voters

User who cast a binding close vote on a question should be notified when someone comment-reply him/her, even without ever leaving a comment.  This still works fine when I am the only close voter, e.g.  (tried with my sock and deleted the comment already), however this fails to work when I'm not the only close voter, e.g. .  Tested both with a sock account and with the help of another user - no notification.  I noticed it yesterday and hoped it was a temp glitch, but then today I saw by chance , which is important for me to be notified about, since I can reopen the question with single vote.  Just to prove, a screenshot: (click to enlarge, don't want to clutter)        Can this please be fixed?


Are all the numbers in this sequence a prime number?Sequence : $31 , 331, 3331, 33331$

The given sequence is : $31,331,3331,33331....$ where the $n^{th}$ number has n $3$'s followed by a $1$. The question asked is to find are all the numbers prime? If not all how many terms from start are prime (e.g. first 30 terms , etc.) I'm completely blank of how do we approach such questions. Any reference or ideas ?


Obscure fantasy movie involving flying sea-galleons and a time weapon

Been trawling the internet for hours, can't find any trace or reference of this movie. Not really sure what station I saw it on (only once), but it was probably Sci-Fi Channel (mind you, a very long time ago:  Movie opens with flying ships (sailing galleons), that proceed to siege a towering city. The city fires back with its own cannons, and drives the invaders away. The main protagonist is a young boy who longs to be a knight... or this movie's equivalent thereof. He has an older brother who is already recognized as a warrior. The boy lives in the city that successfully repelled this siege.  The king of this city has some sort of wizard or wise-man as a councilor, who conceives an "ultimate weapon" against their enemies- an hourglass of sorts that accelerates time against a target. However, during the course of the movie this weapon is stolen by the city's enemies (led by an evil queen or sorceress), who proceeds to use it against the city itself and all its inhabitants.  So the king sends out his armies to retrieve the artifact, all the while everyone and everything begins aging rapidly. Our boy-hero watches his older brother (now much older) set out with other knights on the quest, and there's a token romance between the boy and the king's daughter. The knights do not return, however, and the time-curse continues to wreak havoc on the city.  Ultimately, the boy (now a man) sets out to find his brother, the hourglass, and save the day. He finds his brother at a wreckage-site (I believe of a flying galleon), and they share a brief moment before the elder brother finally succumbs to old age. I'm sure I'm forgetting some other poignant details, but that's essentially the crux of it. Ends... if I remember correctly, with  the artifact being disabled and the evil queen/sorceress defeated.  Question is: what is this movie titled?


Do I need to play Bioshock 1+2 first before I play Infinite?

I know that Bioshock 1+2 are considered good games, but do I have to play them in order to understand the story in Bioshock Infinite? Or can I just start with Infinite right away?


What's an easy way to create a forever zooming & looping image like this:   In particular what design applications (after effects comes to mind) allow recursive nesting of compositions?


Between Present Perfect and Simple Past, which tense indicates a finished action?

When one uses simple past tense for some action, does it imply that the action is complete?  For instance, when you say “I wrote my article yesterday,” does this imply that at this moment you have a finished article or not? So it’s      I wrote a bit of my article yesterday, but I still have to finish it.   vs.      I started and finished writing my article yesterday and now I have a finished work, so I can publish it.   What about present perfect? Does it imply completeness? If you say “I have watched this film,” does this mean that you have actually watched it from start to end?  If both these tenses imply that the action was completed, do I have to use past continuous to emphasize the incompleteness of action? For instance, “I was watching this film,” so that the implied meaning is that I started watching it, but it’s not certain that I finished it.


link errors in XCode when defining a C++ class that inherits from a templated class

Here are the contents of the files. First the templated class : in the .h file :  template <class T> class templatedClass {     public :      templatedClass(T val);     ~templatedClass() {}      void writeV();      T v; };   in the .cpp file :  template <class T> templatedClass<T>::templatedClass(T val) {     v = val; }  template <class T> void templatedClass<T>::writeV() {     std::cout << v << std::endl; }   Everything is fine when build.  Now the inherited class : in the .h file :  class inheritedClass : public templatedClass<float> {     public :      inheritedClass(float val);     ~inheritedClass() {}      void write(); };   in the .cpp file :  inheritedClass::inheritedClass(float val) : templatedClass<float>(val) {  }  void inheritedClass::write() {     writeV(); }   When building I received the following link errors :   Undefined symbols for architecture x86_64:   "templatedClass<float>::writeV()", referenced from:       inheritedClass::write() in inheritedClass.o   "templatedClass<float>::templatedClass(float)", referenced from:       inheritedClass::inheritedClass(float) in inheritedClass.o   What is wrong with my code? Have I to use special building options in XCode to succeed?  Thank you for your answer.


Proving the probability integral transform without assuming that the CDF is strictly increasing

I know that the proof of the  has been given multiple times on this site. However, the proofs I found use the hypothesis that the CDF $F_X(x)$ is strictly increasing (together, of course, with the hypothesis that $X$ is a continuous random variable). I know that actually the only required hypothesis is that $X$ is a continuous random variable, and strict monotonicity is not required. Can you show me how?  Since I'm already here, I also take the occasion to ask for a simple application of the probability integral transform :) can you show me that, if $X$ has CDF $F_X(x)$ and $Y$ is the truncation of $X$ to $[a,b]$, then $Y$ is distributed as  $F_X^{-1}(U)$ where $U\sim[F_X(a),F_X(b)]$?


The relation between the spring constant and its radius

I've observed that the spring constant of a spring with a smaller radius is higher than that of a spring with a larger even though they are made of the same material , their thickness and all other factors are same but the radius. Does this mean that the spring constant of a spring made of a given substance is not its property and is there a relation that governs such behaviour of a spring?


I want to have a deep understanding of probability.  I've tried William Feller's first book on Probability, and E.T Jaynes' Probability theory - the logic of science (which is very different from most probability books.) But, neither books could hold my interest for long. The first was too boring. The second was too tough to understand.  Please suggest some strategies and books that can help me.  As far as the level of my current knowledge goes, I know basic combinatorial probability, conditional probability, Bayesian probability, binomial, Poisson and Normal distribution. I only know how to apply the normal distribution, not how to derive it.


Unity isn't starting on 13.10 (with Cinnamon 2.0 installed)

Since upgrading to 13.10, I can't log in to unity desktop. Light dm works correctly, but attempting to log in tries to start the session then drops back to light. I've already dropped to terminal (ctrl+alt+f2) and done this:  sudo apt-get update  sudo apt-get install --reinstall ubuntu-desktop  sudo apt-get install unity   Logging in as a guest session also fails. Logging in to other window managers works with varying degrees of success.  Note: I have Cinnamon 2.0 installed from PPA.  I'm using a 2 monitor setup.  Also of note is that the session prior to my upgrade to 13.10 the background of unity failed to display at all, instead showing what was there in the screen buffer from the previous frame. The entire OS worked correctly otherwise though, so I just ignored it for the session. No other upgrades or even updates were done prior to this occurring.  My upgrade path to 13.10 was basically this: Install 13.04 alongside Windows 7, use ubuntu as a glorified web browser for a while, get updates (in preparation for 13.10), install 13.10.  I also used Unity Tweak Tool to change some aspects of unity, particularly auto-hide.  Any help or ideas would be appreciated, as I'm typing this on my phone :(


What is wrong with this fake proof $e^i = 1$?

$$e^{i} = e^{i2\pi/2\pi} = (e^{2\pi i})^{1/(2\pi)} = 1^{1/(2\pi )} = 1$$  Obviously, one of my algebraic manipulations is not valid.


Windows 7 Aero theme's "greyed out" - no found fix

Brand new machine that was working fine then randomly it changed the theme when I booted into a sort of "basic" theme (white task bar, no see through windows etc) I've done and attempted many fixes and I still don't understand why it doesn't work. I've tried these two solutions:  and  These solutions included registy changes, stopping/starting services, and force starting the aero theme. The closest I got seems to be when I went into: Control panel (category view) > Find and fix problems (System and Security) > Display Aero Desktop Effects I follow through the wizard and let it do its thing and then I get an error window that pops up: Personalization - "This theme can't be applied to the desktop. Try clicking a diffrent theme." That's what I get from the wizard. What can I do? My drivers are all up to date, there are no viruses on the computer, directx is installed and updated, and the registry is all correct. EDIT: When I boot the computer, I get a notification stating that windows failed to communicate with the windows desktop services.


What is the difference between dpkg and aptitude/apt-get?

When installing a software via dpkg -i packageA.deb, will the dependencies required by packageA be downloaded and installed automatically? How is this different from using apt-get or aptitude?


Is anti-matter matter going backwards in time?

Some sources describe antimatter as just like normal matter, but "going backwards in time". What does that really mean? Is that a good analogy in general, and can it be made mathematically precise? Physically, how could something move backwards in time?


Multiple exposures vs. adjusting exposure of single RAW?

For HDR, it's recommended to use auto exposure bracketing.  However, an advantage of RAW is the ability to adjust exposure.  Even Trey Ratcliff has said, .  My question is, what's the advantage of shooting multiple exposures as opposed to taking one RAW and tweaking its exposure?  (There must be an advantage, otherwise no one would bother with the significant limitations of AEB.)  I am looking for an explanation that discusses exactly what happens when one adjusts the exposure value of a RAW (is information lost?), and how that differs from what the camera records during a longer exposure.


How to run WIX custom action on "msiexec /x ..." call?

I'm requested to implement custom action with parameters on uninstall from command line: msiexec /x MyInstaller.msi PARAM_FILE_PATH="..." /qn  Looks like common approach looks like is this: <Custom Action="ActionName" Before="RemoveFiles">(REMOVE~="ALL") AND (NOT UPGRADINGPRODUCTCODE)</Custom> <Custom Action="ActionName" Before="InstallFinalize">(REMOVE~="ALL") AND (NOT UPGRADINGPRODUCTCODE)</Custom>  But in both cases ActionName is not executed (checked via debug output).  Tried few things. Not executed on install and uninstall: <Custom Action="ActionName" Before="RemoveFiles"></Custom>  Runs only on install (opposite of what I need): <Custom Action="ActionName" Before="InstallFinalize"></Custom>


A java.lang.NullPointerException occurs when a Java application or Java applet has been badly coded. Typically, the Java program (and consequently, the programmer) attempted to access the reference or handle to a Java object that did not exist  I have  gone round in circles reading . I have made two minimal files  - Two.java will compile.   public class Two {    public static int width;    public static int height;     public static void main(String[] args) {      int width = 320;      int height = 100;        System.out.println(width + "," + height);    }  }   One.java in eclipse will print the string intwo to console. My question is if it will print, Why is it null? I am trying to  convert  the string to int so I can do  math with it. In real life there is a lot more than two  numbers arriving in.  import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader;  public class One {   public static int width;   public static int height;    public static void main(String[] args) throws IOException, InterruptedException {     Process p = Runtime.getRuntime().exec("java -jar Two.jar");     BufferedReader is;     String intwo;     is = new BufferedReader(new InputStreamReader(p.getInputStream()));      while ((intwo = is.readLine()) != null)       System.out.println(intwo); // Prints to console      String[] items = (intwo).split(","); //java.langNullPointerException     int[] results = new int[items.length];      for (int i = 0; i < items.length; i++) {       results[i] = Integer.parseInt(items[i]);     }     System.out.println(results[1]);   } }


I want to edit a mesh of a rotated object in pose mode.  But when I select a rotated object with edit mode, it is restored to its original condition. I want to make an animation process of folding, so I could't press apply button after rotated armature. Please give me an advice.


product of two finitely generated infinite groups

I am given two finitely generated infinite groups G and H What can I say about their product  $G\times H$  I need to prove that $G\times H$  is one-ended graph


Computing $\sum_{k=1}^\infty \frac{1}{k^k}$ analytically

The series $$\sum_{k=1}^\infty \frac{1}{k^k}$$ clearly converges. Is it possible to compute its value analytically?


Are there any resources or references that concisely state the problems with political philosophy?  Recommended texts for beginners are also welcome!


I've been working on a project for a client in which I'm building a city so that I can render it and use the render as reference for drawing. However, there's this bug which I haven't encountered in any other Blender project so far: The surfaces look hatched and glitchy. It's evident when you look at the mountains or the buildings' angle with the floor in pictures 1 and 2, in both solid, material preview and eevee render mode. I don't know what is causing this. Magically, the effect seems to be completely gone when I use the orthogonal view. When I press 0 to see the camera view, the hatched look can only be seen at the mountains. With cycles renderer it seems to be all right (but I don't want to break my computer by making it render with cycles all the time when I simply want to edit the scene). This issue is very annoying, so I've been wondering if somebody else has been having the same problem and if there's a way to fix it.


I'm Thu and i'm from Viet Nam.This is my problem: My computer was setup dual the Windows 7 and Windows 8.1 So how can i install ubuntu in my computer. Thank!


What tense is this is "will have had to have seen"?

I was making a table of the sentence "You must/have to see it." ("You see it.") in different tenses and moods in German with the English equivalent.  I ended up writing these three sentences down (in English) and was unsure about what tense they were in or if they could be considered valid sentences.     (1) You will have had to see it.   (2) You will have to have seen it.   (3) You will have had to have seen it.     I believe that (1) is future perfect but I have no idea about (2) and (3).  Thanks!  ==================================================================  I'm a native English speaker and so I have never had a formal teaching of English grammar. As an example I will have used future perfect many times in my life but I have only recently known of it's existence! Most of what I have learnt is from the perspective of learning German.


Name of a special multivariate polynomial: each varaible appears alone

Is there a name for such multivariate polynomial where each varaible appears alone. For example:  $P(x,y,z)=x+x^2+3x^3+y+5y^2+z +2$  So as it can be seen there is no terms in the polynomial  where the variables are multiplied by each other like  $xy$ or  $xz^2$ for instance.


Easiest way to move from Ubuntu to Windows?

For my study next year, my computer has to run Windows. It's a requirement. Right now, I want to get used to it a little more, so I plan on installing Windows preemptively.  I'm currently running Ubuntu 14.04, though originally my laptop came with Windows 8 installed. I believe this means that my activation code or whatever is stored within the BIOS(?). I do not own a CD with Windows 8(.1) on it. I have a 250GB external hard drive -- more than enough to store all my files.  Now, my question is, what is the easiest and safest way to switch to Windows 8(.1), while keeping all my files?  I've tried dual-booting in the past, but it didn't work out for me.  I thought of this plan:   First I'd copy my entire Home folder to my external hard drive. Meanwhile, I'd search the PirateBay or KickassTorrents for a copy of Windows 8(.1) (this is legal in my home country: I'm allowed to download anything I've technically paid for)  Then I'd burn that copy to a CD or DVD Then boot up from the disk and tell it to erase all data and install Windows Lastly, I'd reallocate all my files from my hard drive to my laptop   Is this a reasonable plan of action?  I'm extremely afraid I forgot an essential step or am planning to do something that simply is not possible.


Javascript not finding div and class from ajax response

I have a page that return a lot of rows. So, I'm using the load more ajax button. This ajax return a column with an edit button and this edit button should open a modal that runs a new ajax. The modal works fine inside my regular pages, but in this one (that the table is loaded from an ajax) it is not working. When I click in the 'Edit' button, the modal opens ok but it does not load any data (not even a 'loading...' text that should be loaded regardless of the response. This is my script to populate the table:   $(document).ready(function(){       loadMoreData();       function loadMoreData(page){         $.ajax({           url : "/ajax/getcontent.php",           type: "POST",           cache:false,           data:{page_no:page, id_campanha:<?=$_GET['id']?>},           success:function(data){             $("#carregando").remove();             if (data) {               $("#pagination").remove();               $("#loadData").append(data);             }else{               $(".loadbtn").prop("disabled", true);               $(".loadbtn").html('That is all');             }           }         });       }              $(document).on('click', '.loadbtn', function(){         $(".loadbtn").html('Carregando...');         var pId = $(this).data("id");         loadMoreData(pId);       });   });   This is what is returned from the call above:
     '.$row["number"].'	     '.$row["link"].'	     '.$row["click"].'	     '.$row["date"].'	               Editar               Edit
';  And this is the script that runs when I click on "Edit" from the response above: $(document).ready(function(){         $('.userinfo').click(function(){             var userid = $(this).data('id');             // HERE IS NOT ADDING THE 'LOADING...' TO THE MODAL             $('.modal-body').text('loading..')             // AJAX request             $.ajax({                 url: '/ajax/edit.php',                 type: 'post',                 data: {id_grupo: userid, campanha:<?=$_GET['id']?>},                 success: function(response){                      // Add response in Modal body                     $('.modal-body').html(response);                      // Display Modal                     $('#modal-default').modal('show');                  }             });         });     });  Does anyone knows how can I solve it?


grub-efi-amd64-signed package failed to install into /target/ using ISO and UEFI mode

I am installing Ubuntu-18.04 using PXE ISO install in UEFI mode. The installation is failing with the below message:    I looked into this thread  but they are for manual installation. My query is for Unattended Installation over PXE server on client machine.  Please comment if I need to add more details to the question.  Thanks.


Different results after updating the code (glmnet function)

I wrote a code performing an elastic net regression with a 10-fold-crossvalidation. the original dataset has 190 variables and 1402 observations. The result were 70 remaining coefficients in the final model. Now one year later I tried to reuse the code with e new version of RStudio and updated packages. The result are only 20 remaining coefficients in the final model, although it is the same code and the same dataset. What is my mistake? How could these changes be explained? Here is the code: # Data Partition set.seed(222)  DataPartitionwho <- sample(2, nrow(dfwho), replace=T, prob = c(0.7,0.3)) trainwho <- dfwho[DataPartitionwho==1,]  testwho <- dfwho[DataPartitionwho==2,]    # Custom Control Parameters customwho <- trainControl(method ="repeatedcv", number=10, repeats=5,verboseIter=T)   # Elastic Net Regression set.seed(1234) enwho <- train(PHQ~.,trainwho,method='glmnet',tuneGrid=expand.grid(alpha=seq(0,1,length=10),lambda=seq(0.0001,1,length=5)),trControl=customwho)  enwho$bestTune #  bestEnwho <- enwho$finalModel elastic_net_coefwho <- coef(bestEnwho,s=enwho$bestTune$lambda)  elastic_net_coefwho  Would be grateful for an advice (since I am a freshman working with R). Kind regards, Josy


How to round my output in a tax program [Java]?

I need my output to float to only 2 decimal places as the output is money. For example if I run:     Enter 1 if you are single. Enter 2 if you are married      1      Enter your taxable income      27060.34      Federal Income Tax:$4060.3435   I need the federal income tax to output $4060.34 instead of $4060.3435  My code:   import static org.junit.Assert.*; import java.util.Scanner; import org.junit.Test; public class IRS {     public static void main(String[] args) {         Scanner scan = new Scanner(System.in);         System.out.println("Enter 1 if you are single. Enter 2 if you are married");         int martialstatus = scan.nextInt();         if (martialstatus == 1) {             Scanner scan2 = new Scanner(System.in);             System.out.println("Enter your taxable income");             double income = scan2.nextDouble();             if ((income > 0) && (income <= 27050.00)) {                 System.out.println("Federal Income Tax:$" + (income * .15));             }             if ((income > 27050.00) && (income <= 65550.00)) {                 System.out.println("Federal Income Tax:$" + (4057.50 + (.275 * (income - 27050))));             }             if ((income > 65550.00) && (income <= 136750.00)) {                 System.out.println("Federal Income Tax:$" + (14645.00 + (.305 * (income - 65550.00))));             }             if ((income > 136750.00) && (income <= 297350.00)) {                 System.out.println("Federal Income Tax:$" + (36361.00 + (.355 * (income - 136750.00))));             }             if (income > 297350.00) {                 System.out.println("Federal Income Tax:$" + (93374.00 + (.391 * (income - 297350.00))));             }         } else if (martialstatus == 2) {             Scanner scan3 = new Scanner(System.in);             System.out.println("Enter your taxable income");             double income2 = scan3.nextDouble();             if (income2 <= 45200.00) {                 System.out.println("Federal Income Tax:$" + (.15 * income2));             }             if ((income2 > 45200.00) && (income2 <= 109250.00)) {                 System.out.println("Federal Income Tax:$" + (6780.00 + (.275 * (income2 - 45200))));             }             if ((income2 > 109250.00) && (income2 <= 166500.00)) {                 System.out.println("Federal Income Tax:$" + (24393.75 + (.305 * (income2 - 109250.00))));             }             if ((income2 > 166500.00) && (income2 <= 297350.00)) {                 System.out.println("Federal Income Tax:$" + (41855.00 + (.355 * (income2 - 166500.00))));             }             if (income2 > 297350.00) {                 System.out.println("Federal Income Tax:$" + (88306.00 + (.391 * (income2 - 297350.00))));             }         } else {             System.out.println("Error. Try again");         }     } }


Why is `sort < "$f1" ` preferred over `sort -- "$f1"`, and why is this preferred over `sort "$f1"`?

From      Remember to use -- when passing arbitrary arguments to commands (or use redirections where possible). So sort -- "$f1" or better sort < "$f1" instead of sort "$f1".   Why is it preferred to use -- and redirection?  Why is sort < "$f1" preferred over sort -- "$f1"?  Why is  sort -- "$f1" preferred over sort "$f1"?  Thanks.


Regular Expression fails if newline is included

I'm trying to extract a simple sentence from a string delimited with a # character.  str = "#text text text \n text#"   with this pattern  pattern = '#(.+)#'   now, the funny thing is that regular expression isn't matched when the string contains newline character  out = re.findall(pattern, str) # out contains empty []   but if I remove \n from string it works fine.Any idea how to fix this ?


Joining / Connecting Lines from the Pen Tool (Illustrator)

So I made this shape using guides, shapes, and connecting all the lines with the Penn tool. This is what it looks like   Now because I used the pen tool not all the lines are connected, ex:   Because of this some of the corners are messed up, here is what they should look like   But some of them look like this because the lines are not one shape   I can't seem to get the "join" function to work when I select two of the points. Is there a good way to join the points together to make them one pen path or shape??


How do I prove that the summation $$\sum_{k=0}^{\infty}k^2x^{k} = \dfrac{x(1+x)}{(1-x)^3}\text{, }|x| < 1\text{?}$$


I have given the wrong permission to the /etc folder  chmod -R 777 /etc   When I want to login as root it gives me an error and the following output.   How can I correct the permissions?  system13@motpl:~$ sudo su sudo: /etc/sudoers is mode 0777, should be 0440 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin system13@motpl:~$ su root Password:  su: Authentication failure system13@motpl:~$


Forbid any combination of values after the first one in mysql

I have a relation table in Mysql with 3 columns   ID (Primary key and Auto Increment) Ref_id1 (Reference ID from table1) Ref_id2 (Reference ID from table1 also)   How can i forbid, in database level, any pair combination of Ref_id1 and Ref_id2 from reappearing.  EDIT:  For example:  After i insert a row like this  id    Ref_id1    Ref_id2   1        1          2  i want to forbid ANY other row with the same pair of Ref_id1 and Ref_id2 (which a UNIQUE INDEX can solve) AND any row with the reversed pair   Ref_id1    Ref_id2      2          1   PS. Sorry for the ugly coding, i'm new to the community and i can't use the tools correctly  EDIT 2:  My question is different from the duplicate proposed because i want to be able to restrict BOTH insertions   Pair1:  Ref_id1   Ref_id2     1         2  AND  Pair2:  Ref_id1   Ref_id2     2         1  AFTER my original insertion.  EDIT 3:  If this helps at all: Both Ref_id1 and Ref_id2 are foreign keys from the same column of a foreign table


How do we see the private messages that moderators sent us?

I've got a message sent to me from a moderator which appears in the top-left notification dropdown box.  Clicking on the "item" brings me to a page where the message is shown. But after reading it I've closed the browser tab.  How can I get to the message page again?


Why is the electric field is the negative gradient of potential energy function?

I know gradient shows you the direction in which function is increasing most. So does electric field direction show us in which direction potential energy function is decreasing most....  My efforts : we know electric field lines go from positive to negative charge. So that's where value of electric potential energy function is decreasing. As we know electric field lines show us the electric field direction. So electric field points out the direction in which potential energy function is decreasing so it's the negative gradient vector of the potential energy function. Am I right with this reasoning?


Java Wrong Output: [Ljava.lang.String;@2e5c649

Before anyone comments about it, yes I already searched for this thing but I couldn't find the answer I needed. Here's the problem:  I want to output a few random words from a list. The output I get is [Ljava.lang.String;@2e5c649  Here's the code:   import java.util.Random; public static String[] GenerateRandomWords(int n) {     String[] list = {"random" , "school", "game", "habit", "window", "animal", "hidden", "puzzle", "coding", "gaming", "programmer", "box", "laptop", "swing", "jungle",             "house", "picture", "program", "table", "cookie", "project", "mathematics", "think", "graphics", "interface", "innovation", "analysis", "reduce", "screen",             "company", "cow", "banana", "apple", "milk", "tea", "coffee", "job", "cake", "collection", "movie", "toolkit", "tree", "speaker", "microphone", "workshop",             "progress", "story", "article", "music", "script", "language", "instruction,", "key", "sun", "age", "joy", "volume", "orange", "hotdog", "museum", "career",             "radical", "outside", "brother", "balance", "reserve", "action", "notebook", "research", "complete", "remember", "teenager"};     String newarr[] = new String[n];   for (int i=0;i<n;i++)     {         int rand = new Random().nextInt(list.length);         newarr[i]=list[rand];      }      return newarr;  }  public static void main(String[] args) {     System.out.println(GenerateRandomWords(5)); }   }


Hangar of alien ships with pre-programmed destinations discovered on the Moon

I read this book in the 80's.  In the near future, humans found an hangar full of small alien space ships in the Moon (~3 passengers). Ships have no controls other than START/STOP.  You can't select a destination. The ship takes you to a random (but valuable) location far away. Trip duration is unknown. An indicator light goes on when half of the trip is completed. The trip can be too long and you will die of starvation/lack of oxygen.  The ship returns automatically to his Moon base.  The story is about one of those expeditions aboard an alien ship.


Find the remainder when $45!$ is divided by $47$?  My approach I am using Wilson's theorem to solve the problem. I reduced the expression into ($47$-$1$-$1$)!/$47!$=$(47$-$1$)/$47$!-$1$/$47!$=-$1$-$1$=-$2$  Am I right in my approach.Please correct me if I am wrong? Please correct me how to approach towards the problem.


Where is the result of the "apt-get update" package list stored

I have 20 to 3o computers on my network and I have a copy of the debian packages on /var/cache/apt/archives but when I take this downloaded copy to any other machine I need to hit an "apt-get update" , How do I avoid this ? Where is the list of packages which is updated by that command stored. I need to copy them as well, and use it on a computer which is completely offline.


Summation by parts (finite calculus) of $\sum\limits_{i=0}^{n}i\cdot a^i$

I'm studying the calculus of finite differences and have read about summation by parts:  $\sum f(x)\Delta g(x) = f(x)g(x) - \sum g(x+h)\Delta f(x)$.  The tutorials I'm using go a bit woolly at the point of introducing this technique: they use examples where they set $\Delta g(x)$ to $2^x$, and don't really show how to use it for anything a bit harder. I'm at a loss for basic examples.  I wondered if it is possible to determine  $S.n = \sum\limits_{i=0}^{n}i\cdot a^i$  using summation by parts?  If so, how is it done?  Thanks in advance.


How would the graph of $y=(-1)^x$ look like?

Question  When typing in $y=(-1)^x$ into a graphing calculator, it does not display anything at all. And once you think about it, you begin to realize that the f(x) values flip from positive to negative. How would this graph look like?


Hi I am currently starting out blender and i have created a face using vertices. I filled the face and now i want to subdivide it. However, the subdivision tool does not work on any of the faces. Can anyone explain to me how to subdivide the faces and why subdivide works on primitives such as cubes but not on the created face? Thank you


Is there a simple way to show that $$n!\over r!(n-r)!$$ is always an integer?


Will the "Accept rate" score encourage unwanted behavior?

I understand the idea behind showing a users "accept rate" when they post a question, which is to encourage people to accept answers to their questions but it seems like it can/will encourage unwanted behavior as well. This unwanted behavior would be:   Accepting an answer that isn't correct just to increase their accept rate score. Not answering questions asked by those with low accept rate scores.   In an ideal world, these behaviors wouldn't exist but there is no such thing as an ideal world.


How do I remove an input language that appears after restart and doesn't show up in settings?

I have 2 keyboards (input languages): English and Russian.  After every update requiring a restart, 2 Latvian input methods show up. So I have in total 4: EN, RU, 2 x LV.  If I go to settings, it only shows 2: EN and RU. So I can't remove LV from here.  What I tried:   If I manually add LV and remove it, I'm left with 3 layouts: EN, RU, LV.  The first time it happened,  helped. But now the DWORD is set, and keyboards still appear and stay after restarts. Tried changing Country / Display settings / Defualts & Overrides   The questions:   How do I remove the second LV keyboard? How do I prevent them from re-appearing?   OS: Windows 10 Pro, version 1607. Primary display language: EN.


Since yesterday, March 10, 2015 I find that anything from i.stack.imgur.com won't load anymore (unless I still have it cached..), loading never finishes, images are not displayed..  Question: does anybody else see this?  My provider is 1und1 in Germany; I have contacted them, but would like to hear from other customers, if they experience the same issue?  I tried several browsers on several machines, all with the same result; and also on other folks machines with different IPSs, all of which work fine..  The issue is both with any StackExchange site (with images on  imgur) and also with loading images from there directly, e.g.:    http://i.stack.imgur.com/j4y77.png   Update Seems like the problem has been fixed by today (March 12 '15). No explanation yet; I suspect it got onto a Blacklist..


Free/Open Source alternative to Teamviewer

Is there a free/open source alternative to teamviewer that will allow me to help a friend running Ubuntu 14.04 with the default unity desktop?  Some years ago Ubuntu had a way to share screen/mouse built in (I think it was called "share desktop") but I can't find it in 14.04.  Notes:   I want a shared desktop session not a separate one. I'm already able to VNC to a separate session but I need to see and click what my friend sees. I don't want to change my friends Unity desktop. He has trouble adapting to such changes.


How was Quicksilver able to listen Walkman during Pentagon super speed fight in kitchen?

In X-Men: Days of the Future Past movie, there's a scene in Pentagon kitchen in which guards shoot bullet and Quicksilver puts his headphones ON to listen "Time in a Bottle" before playing as speed god.  Definitely, Sony Walkman of 70s can't play songs at 5000x. Can Quicksilver make other things faster? Or, it's a plot hole?


How do you choose what variables are dependent/independent in regression?

I have a project for my regression course. I'm curious how one chooses the dependent/independent variables. From my understanding, we want a model that has as little variance as possible, so would I choose the model that has the fewest outliers?


Runtime exception error in android studio logcat. It is showing two errors at the same time: Runtime exception and NullPointerException

I am creating a simple static application in android studio. When I tried to run the application using USB debugging option, It crashed and showed two errors in logcat:   I am new to android studio and it is my first project, please help me in debugging this error.  Here is the screenshot for the MainActivity Java code where the error is supposed to be:


Let $W$ be a subspace of the finite-dimensional vector space $V$. Show that there is a subspace $U$ of $V$ such that $V \cong U \oplus W$  I understand that by saying $V$ is finite-dimensional means that both $U$ and $W$ are finite-dimensional as well.   I also understand that it is asking to prove that there is a $U \subset V$ such that $V$ is isomorphic to the direct sum of its subspaces $U$ and $W$. To be isomorphic it must be both injective and surjective.  I guess I'm getting confused on how to actually prove the isomorphism given the information. Is this the same as proving $V = U \oplus W$ or does the $\cong$ make a difference? How does one go about proving this?


I've installed Matlab on my Ubuntu 18.04. Every time I want to open it I need to call it.  /usr/local/MATLAB/R2017a/bin/matlab   I think it is too long and waste of a little time. There has to be an easier way to open it. How can I open it simply by writing its name or is there any easier way?


I have a two prong led that when power is supplied to it, it twinkles and changes colors.  How does that actually work? It's too cheap in my opinion to have a micro controller in the diode and it looks like a normal "radio shack" diode.


What's the part at the end of the shoelace called in English?

What are the (usually) plastic part of the shoelace called? The end part I mean? Mine's broken but I can't do a DIY fix without knowing the name.


Hall's marriage theorem in bipartite graph

In a bipartite graph $G$ with parts $X$ and Y, for each $x∈X$ and $y∈Y$, $\deg(x)≥\deg(y)$. Show that $G$ has an matching that infects each vertex of $X$.


External drive shared between Windows Server and Mac OSX

I have an external drive that I want to keep in my windows server as a shared volume to use to access with my main computer which is a mac laptop.  Occasionally there are some large files that can't be transferred over the network due to their size and I would like to take out the external and temporally plug it into my mac to copy these files.  Since mac cant write to NTFS formatted drives and windows won't even detect HFS+ formatted drives, is there any other workaround that will let me share the entire volume over the network through windows server but enables me to from time to time plug it directly into my mac laptop? Thanks!


Is there a way to exclude all files, in all subfolders, and keep the folder structure?


SPEED of LIGHT as photons reach black holes

As photons reach a black hole and begin fall in - is their speed increased as they go down (like a vacuum cleaner does to dust).


Multicollinearity between categorical and continuous predictors

How can I check collinearity between categorical and continuous predictors (there are four predictors)?


I was reading the "Oxford Word Skills" book when I got a question:  Since "roast" itself can act as an adjective (and of course as a verb), is it correct to say either "roasted chicken" or "roast chicken"? Or, the first option is not correct? The book has offered the second phrase, so which one is a more proper word to use? As a general question, if a word has a verb and an adjective form (like what we see here), and since P.P of verbs can also act as an adjective, is there any rule to use one over the other? Or is it optional? Thanks in advance...


How to compute $\lim_{x\to\infty} \frac{2^x}{x^{200}}$?

I am trying to solve this limit: $$\lim_{x\to\infty} \frac{2^x}{x^{200}}$$  The first result is an indetermination of the kind $\frac{\infty}{\infty}$ but here applying L'Hopital would be too long, I do not see any substitution by means of equivalent infinitesimals possible and simplifying the limit neither.  How can I solve it? The solution must be $\infty$. Thank you!


What is an Intuitive Explanation for the Sha-2 Hash algorithms?

I know the needs of a basic cryptographic hash function (one way, collision unlikely, and minor changes in input are likely to produce major changes in output) and I can read the code for Sha-2 (it is only about 100 lines long or so). However, I have no idea what, and can find nobody who can explain, the intuition behind the algorithm. Why does the Sha family satisfy these requirements? I understand that "why" questions can be difficult to answer, but there needs to be some rhyme or reason behind its implementation.


How to add an object from another scene?

I'm am trying to create a scene in Blender, by adding in another object from a previously created scene that is on a separate .blend file. How can I do this? I have tried to append an object from one .blend to another, but it still won't work. Can I get some help in trying to figure this out?   The other answers to this question haven't worked. Is it a bug? How can I do this?


I have a model: $$ \ln({\rm earnings}) = a+b_1{\rm female}+b_2{\rm white}+b_3{\rm female}\times{\rm white} $$ ${\rm female}$ and ${\rm white}$ are dummy variables.  I have interpreted $b_1$ and $b_2$:    $b_1$ = change in female earnings comparing to male given you are non white $b_2$ = change in white earnings comparing to non white given you are male   But I am unable to interpret the coefficient of the interaction term ($b_3$). Please help me with this.  Let me make it more clear what I need out of this regression $$ \ln({\rm earnings}) = 2.618656-.0899657{\rm female}+.382019{\rm white}-.2754126 {\rm female}\times{\rm white} $$ Now i know there is gender pay difference with b1, i also know there is race pay difference with b2. Now with b3 i need to know is their a gender pay gap for whites only. How can i figure that out with regression above and without test.


What does object.isQueryable() actually mean?

What does is actually mean when a user  can 'query' an Object?  In other words: what rights does a user have when the Object.isQueryable() returns True?  Pages like  only say that isQueryable returns whether the user can 'query' the object. But what does that mean?


I need to have an alpha channel within my movie clips. The problem is, if I render the video with one of settings which were supporting alpha channels my computer and other programs haven't been able to use my video files.


Why are fingerprints different even in identical twins?

Why are fingerprints different from person to person? It can't be genetics. Even identical twins has different sets of fingerprints. What is the deciding factor that form and shape our fingerprints?


Curious offset when using foreach with nodes

I'm drawing graphs by hand and came across the following curious behaviour: When addressing nodes in a foreach loop in order using a regular structure via evaluate=, the node position seems to wander. The same behaviour does not appear when addressing via remember= or a random setup:    I'd love some information as to why that happens and how to avoid that, either by adjusting or using an alternative structure.  \documentclass{standalone} \usepackage{tikz}  \usetikzlibrary{math} \begin{document}  \begin{tikzpicture} \foreach \t in {0,20,...,360}     \fill[color=blue] (\t:2cm) circle (2pt) node (A\t) {}; \foreach \t [remember=\t as \lastt (initially 0)] in {20, 40, 60, 80, 100}     \draw (A\t) -- (A\lastt); \foreach \t [remember=\t as \lastt (initially 120)] in {140, 160, 180, 200, 220}     \draw (A\t) -- (A\lastt); \foreach \t [remember=\t as \lastt (initially 240)] in {260, 280, 300, 320, 340}     \draw (A\t) -- (A\lastt); \foreach \t [evaluate=\t as \tt using \t+120] in {0, 20,...,220}     \draw (A\t) -- (A\tt); \foreach \t [evaluate=\t as \tt using \t+240] in {0, 20,...,100}     \draw (A\t) -- (A\tt); \draw (A0) -- (A100) (A120) -- (A220) (A240) -- (A340); \draw (0,-2.5) node {Lattice}; \end{tikzpicture}  \begin{tikzpicture}  \pgfmathsetseed{8} \foreach \t in {0,20,...,360}     \fill[color=blue] (\t:2cm) circle (2pt) node (A\t) {}; \tikzmath{ %C style brackets for slightly better readability%     int \x, \y, \a;     for \a in {0, ..., 30}{         \x = random(18)*20;         \y = random(18)*20;         {\draw (A\x) -- (A\y);};     }; } \draw (0,-2.5) node {Random}; \end{tikzpicture} \begin{tikzpicture} \foreach \t in {0,20,...,360}     \fill[color=blue] (\t:2cm) circle (2pt) node (A\t) {}; \foreach \x [remember=\x as \lastx (initially 0)] in {220,300,280,340,100,340,300,260,180,240,260,20,260,320,40,240,60,320,240,160,180,240,200,260,80,120,300,140} \draw (A\x) -- (A\lastx); \draw (0,-2.5) node{Preferential}; \end{tikzpicture}  \end{document}


Demonstrate that 4k + 3 cannot be perfect square

I wonder if it can be mathematically demonstrated that   4k + 3 != n^2 where k,n are N (natural) numbers?   My daughter (6's grade) has a problem and the book's answer is just enumerating k elements  {3,7,11,19,23,27...}    saying that they cannot be perfect square.  Thank you,


I am trying to read .e00 file in qgis but it says "Invalid Data Source". I don't know whether it is a vector or raster data. So, I tried importing it as both vector and raster but am getting same message. The file in mention is soil texure data found .  I am wondering if there is a way to change the file format or to open it as such in QGIS.  EDIT:I did go through the answer of the question   which suggests that I can import it as such as a vector but I am getting the error as above.


Computing $\int_{-\infty}^{\infty} \frac{\cos x}{x^{2} + a^{2}}dx$ using residue calculus

I need to find $\displaystyle\int_{-\infty}^{\infty} \frac{\cos x}{x^{2} + a^{2}}\ dx$ where $a > 0$. To do this, I set $f(z) = \displaystyle\frac{\cos z}{z^{2} + a^{2}}$ and integrate along the semi-circle of radius $R$. For the residue at $ia$ I get $\displaystyle\frac{\cos(ia)}{2ia}$. Then letting $R \rightarrow \infty$, the integral over the arc is zero, so I get $\displaystyle\int_{-\infty}^{\infty} \frac{\cos x}{x^{2} + a^{2}}\ dx = 2 \pi i \frac{\cos(ia)}{2ia} = \frac{\pi \cos(ia)}{a}$. But this is supposed to be $\displaystyle\frac{\pi e^{-a}}{a}$, so I am doing something wrong.  In a similar problem, I have to evaluate $\displaystyle\int_{-\infty}^{\infty} \frac{x \sin x}{x^{2} + a^{2}}\ dx$ and get $\pi i \sin(ia)$ whereas this is supposed to be $\pi e^{-a}$. I think I am getting some detail wrong in both cases. Can anyone enlighten me?


I can run ubuntu from my USB thumbdrive but I'm not sure it's INSTALLED on my thumbdrive

I just followed directions on how to get ubuntu onto a USB thumbdrive using OSX.  I can restart my macbook air and hold down the alt/option key and boot into Ubuntu fine.. BUT.. Ubuntu says it want's to run an INSTALLER.. I am afraid if I do that it's going to overwrite my internal harddrive and brick my macbook air... or at least overwrite my OSX filesystem - ... Is it safe to run the installer?  will it complete installation in some way on the USB thumbdrive and make it so if I want to run ubuntu I just boot into the thumbdrive and I'm off to the races?  After doing some more reading here it looks like I need to get a second USB THumbdrive and use the installer on the first drive to install Ubuntu 'for real' onto the second drive so that I'm not always in 'live' mode?  Is that correct?  Thanks!  I hope my question is clear.


I'm trying to solve the following problem     $$\text{Evaluate:} \lim_{b \to 1^+} \int_1^b \frac{dx}{\sqrt{x(x-1)(b-x)}}$$   I'm tempted to think it's 0 because the bounds would be about equal, but that's not the correct answer. But I don't know what integration techniques to use, so any hints are greatly appreciated.  I don't know how to solve for the indefinite integral itself.


bash fork: retry: Resource temporarily unavailable

I am trying to run a shell script which will create process using a shell script. I get Resource temporarily unavailable error. how to identify which limit (memory/process/filecount) is creating this problem. Below is my ulimit -a results.  core file size          (blocks, -c) 0 data seg size           (kbytes, -d) unlimited scheduling priority             (-e) 0 file size               (blocks, -f) unlimited pending signals                 (-i) 563959 max locked memory       (kbytes, -l) unlimited max memory size         (kbytes, -m) unlimited open files                      (-n) 65535 pipe size            (512 bytes, -p) 8 POSIX message queues     (bytes, -q) 819200 real-time priority              (-r) 0 stack size              (kbytes, -s) unlimited cpu time               (seconds, -t) unlimited max user processes              (-u) 10000000 virtual memory          (kbytes, -v) unlimited file locks                      (-x) unlimited


I want to create a function that performs a function passed by parameter on a set of data. How do you pass a function as a parameter in C?


Describe the curve in the complex plane determined by $z = e^{(-1-i)t}$ where $0\leq t \leq 2\pi$.


In the top answer to the question , the following was stated:     This RMS is a mathematical quantity (used in many math fields) used to compare both alternating and direct currents (or voltage). In other words (as an example), the RMS value of AC (current) is the direct current which when passed through a resistor for a given period of time would produce the same heat as that produced by alternating current when passed through the same resistor for the same time.   ()  The RMS value, specifically applied to a sinusoidal voltage source $V_\mathrm{p}$ is given by:  $$V_{\mathrm{RMS}} = {V_\mathrm{p} \over {\sqrt 2}}$$  Here is where my intuition conflicts (where it probably goes off).   I'd imagine the average voltage that would be "felt" (direction insignificant / i.e. absolute value) by the circuit would equate to the true average value of the voltage, which is given by integrating a half period and dividing by the length of the period (the mathematical procedure of finding the average height of a function over a given interval)  I.e. the avg. Voltage, it seems to me, should be given by the equation:  $$V_{\mathrm{avg.}} = {2V_\mathrm{p} \over {π}}$$  I know that the two conversion coefficients are close but I simply cannot see why the RMS value is the one that conforms to reality. Please enlighten me! :)


Sum of rows conditional on two conditions

I'd like to use array function to get conditional sum based on two columns. Given the example, for each ID I want to calculate the sum of value column if column B is -1  ID | B | value | ________________ A1   1     2 A2   1     3 A3   1     4 A3  -1     5 A3  -1     1 A2   1     5 A1   1     1 A2  -1     2   The outcome should be  ID | value_total | __________________ A1  1      0 A2  1      2 A3  1      6


Why, conceptually, is it that $\binom{n}{r} = \binom{n-1}{r-1} + \binom{n-1}{r}$?

Why, conceptually, is it that $$\binom{n}{r} = \binom{n-1}{r-1} + \binom{n-1}{r}?$$ I know how to prove that this is true, but I don't understand conceptually why it makes sense.


How to implement list() support in a class

Suppose there is a class: class C:     def __init__(self):         self.data = [1, 2, 3, 4, 5]  How to implement support for list() function so that: c = C() l = list(c)  so that l = [1, 2, 3, 4, 5]?


Find the limit as $x$ goes to infinity of the $x$-th root of a polynomial in $x$

I'm trying to solve the following  $$\lim_{x\to \infty} \sqrt[x]{p(x)}$$  where $p(x)$ is a polynomial of finite degree.  I've tried to use the continuity of $\exp$ and $\log$ :  $$\exp(\log(\lim_{x\to \infty} \sqrt[x]{p(x)}))=\exp(\lim_{x\to \infty}\log( \sqrt[x]{p(x)}))=\exp(\lim_{x\to \infty}(\frac{\log(p(x))}{x})$$  I would like to conclude that the limit is zero so it turns out to be $e^0=1$ How can I do it rigorously? I've seen that log is asymptotically slower than x. I would get it if in the denominator there was $p(x)$ with a change of variable.


Good books on graph theory for self-study?

Recently I plan to study graph theory. I tried to read the book , yet I found the text hard to follow and problems too difficult. I'm just midway in chapter 2 and I already found several problems that I can't solve even after reading the hint and thinking for hours. (Is it just me or is it that the problems in this book are indeed really hard? And should I pursue reading this book?) So I want another book that (hopefully) satisfies the following:   Comprehensive. Has good problems with detailed hints (compared to the book above).


Can we get the status of Ajax call, like 20% completed?

Am calling an ajax call to validate n number of data.Since it takes lot of time to complete, I thought of showing the user the progress bar or tell that 1/n completed In-order to display that, I should get the status from the controller.Can someone please tell me is there any way to get the status from controller before completing? Or Is there any other better way to implement.


100.000 children in Master Detail relationship? What's the downside?

I know that  to keep the number of child records in Master-Detail relationships (MDR) below 10.000 records.  In one situation I am heavily relying on Sharing being inherited in Master-Detail relationships so I plan to convert a Lookup with 100.000 child records to a MDR.  What will happen? Is the 10K a hard limit or what problems will occur?


Why the need of Axiom of Countable Choice?

Two theorems:  $(1)$   $(2)$   Linked are the formal proofs on Proofwiki.   I do not understand why they had to use the Axiom of Countable Choice (ACC) the first proof but settled with "from the definition of countable" in the second. I think that $(1)$ should depend on ACC iff $(2)$ depends on it.


I can not do that because org->gnome->gedit does not exist in dconfChange the background color of the embedded terminal in gedit

The embedded terminal in gedit has a white background and I would like to change it to black as it is in the teminal. I have tried this  but, the gedit key org->gnome->gedit does not exist in dconf and find doesn't find anything for gedit in dconf. How else can I change the background color?  I can not do that because org->gnome->gedit does not exist in dconf.


How exactly did Voldemort look before his Killing Curse rebounded?

When he came to Dumbledore asking for a job at Hogwarts, he hid Ravenclaw's diadem in the Room of Requirements. When Harry saw the memory, he noticed that although he did not look like the handsome Tom Riddle, his features were not snake-like as of then. Ravenclaw's diadem was his last Horcrux before Nagini (or Harry). If he didn't make any more Horcruxes until 1981, did he still look like he did on the day he asked for the job when he killed the Potters?


I have a table which have field name ID. My data showing like below  LE001001 LE0010010 LE001003 LE001005 LE001006 LE001007 LE001008 LE001009   But I want to show my data by sorting like below  LE001001 LE001003 LE001005 LE001006 LE001007 LE001008 LE001009 LE0010010   Please help me to crate query


Differences in meaning when the verb tense changes (headlines)

What is the difference between the examples below?  Generally, in a newspaper, news is based on past tense (things which have already happened).   Then why are headlines written in ways that says: He Kills (shouldn't it be: He Killed)?  For example:  Parliament passes bill vs. Parliament passed bill  Also  He kills his friend vs. He killed his friend  Please help.


Hi I have created both list and site workflows. All the workflows which i have created could be seen in sharepoint designer as in the below picture.    But in the browser only site workflows are visible  ! How to visible list workflow in browser ? Is there anything am missing or list workflow cannot be visible in browser uh ?  Thanks in advance


Can you identify this bike/frame? Mt FUJI LTD., serial 1104482

I've done as much digging as I know how and I simply cannot find any information on this frame, It has a sticker on the lower referencing a shop called "Helens Bicycles" and as far as I'm aware it was sold for bicycle tours. It has caliper brakes and an older style threaded head. I do know the Rock Shoxs are after market and I'm using the rims the bike came with which match the gear shifter etc (Shimano Deore XT light action)


Disabling PRIMARY or cut buffer "copy on select"

I've been fairly happily using Ctrl-C/Ctrl-V, with the occasional Ctrl-Ins/Shift-Ins here and there on Linux for quite some time, but I've recently switched over to urxvt and am finding the clipboard interaction situation pretty intolerable.  I would simply switch back to another emulator, but I'd rather have a go at solving this first.  Right now, I'm using autocutsel to sync CLIPBOARD and PRIMARY, but while this works well for copying text from urxvt to most other apps, it generally degrades the overall usefulness of the clipboard because it gets accidentally overwritten any time I select text anywhere.  The ideal solution would be to disable the PRIMARY "copy on select" behavior system-wide but Googling hasn't found me a solution. , but sadly remains unanswered.  To summarize, desired behavior:   urxvt selection: no-op Ctrl-Ins: copies to PRIMARY (autocutsel syncs to CLIPBOARD) Shift-Ins: pastes from PRIMARY elsewhere selection: no-op Ctrl-C: copies to CLIPBOARD (autocutsel syncs to PRIMARY) Ctrl-V: pastes from CLIPBOARD   NOTE: Please let me know if I'm misunderstanding either what Ctrl-Ins/Shift-Ins do or how autocutsel works.  EXTRA NOTE: There is  but that is about doing exactly the opposite (disabling CLIPBOARD) which will result in copying being implicit rather than explicit; as it says in that answer:     You can ignore PRIMARY if you want (but note that some older applications like xterm may only support PRIMARY   So the specific problem here is (a) supporting the modern explicitly populated CLIPBOARD while (b) still retaining access clipped contents from older applications


Show that $y^2=x^3+23$ has no integer solutions (hint: use $y^2+4$)

I saw a previous proof on this site that addresses this question, but the proof leaves off with a number of form $4k-1$ can't divide $t^2+1$. Why is this? Thanks.


Which packages should be loaded after hyperref instead of before?

The hyperref documentation says: "Make sure it comes last of your loaded packages". The reason is that it redefines many LaTeX commands. It's a rule of thumb that helps to avoid errors.  However, there are exceptions, for instance the amsrefs user's guide notes that amsrefs has to be loaded after hyperref.  To avoid problems when adding hypertext functionality: do you know further such exceptions?


Expire Files In A Folder: Delete Files After x Days

I'm looking to make a "Drop Folder" in a windows shared drive that is accessible to everyone. I'd like files to be deleted automagically if they sit in the folder for more than X days.  However, it seems like all methods I've found to do this, use the last modified date, last access time, or creation date of a file.  I'm trying to make this a folder that a user can drop files in to share with somebody. If someone copies or moves files into here, I'd like the clock to start ticking at this point. However, the last modified date and creation date of a file will not be updated unless someone actually modifies the file. The last access time is updated too frequently... it seems that just opening a directory in windows explorer will update the last access time.  Anyone know of a solution to this? I'm thinking that cataloging the hash of files on a daily basis and then expiring files based on hashes older than a certain date might be a solution.... but taking hashes of files can be time consuming.  Any ideas would be greatly appreciated!  Note: I've already looked at quite a lot of answers on here... looked into File Server Resource Monitor, powershell scripts, batch scripts, etc.  They still use the last access time, last modified time or creation time... which, as described, do not fit the above needs.


How can I use jQuery to redirect to another page?

I have a log-in form that I want to validate and redirect (if the username and password are correct) with jQuery, and the redirect isn't working.   This is my code:   $(document).ready(function() {     $('#lc-login').click(function() {         var username = $('#username').val();         var pass = $('#pass').val();                  if (testUser(username) === true && testPass(pass) === true) {                         window.location.replace("http://www.domain.com/home.html");         } else {             alert('warning message');         }     }); });   I've try replacing the window.location.replace with window.location.href and still nothing. I should say that the testUser and testPass are working fine, because if I add a simple alert('the validation is ok!'), the message is appearing on my screen.


How do you search a std::string for a substring in C++?

I'm trying to parse a simple string in C++.  I know the string contains some text with a colon, followed immediately by a space, then a number.  I'd like to extract just the number part of the string.  I can't just tokenize on the space (using sstream and <<) because the text in front of the colon may or may not have spaces in it. Some example strings might be:  Total disk space: 9852465 Free disk space: 6243863 Sectors: 4095  I'd like to use the standard library, but if you have another solution you can post that too, since others with the same question might like to see different solutions.


Why should we expect the stock market to continue to generate returns long-term?

It is often said that the market is expected to go up in the long-term, even if it may be shaky in the short-term.  The argument offered for this proposition is a simple visual picture of the S&P500 index.  I have two counter-arguments.  Firstly, it seems much of this argument hinges on the abnormal growth of the past 10 years. Take a look at the same picture above, and cut off everything that happens after 2008. An investor looking at this chart in 2009 would see a massive growth since the 50s, but would they still be so confident that the market still has growth potential in it? Might they not instead think that the best is over, that they missed the "real" growth of the 20th century, and that it's all a bumpy Keynesian ride from here on out? Of course, that didn't turn out to be the case, but the point still stands: the "picture argument" collapses if one ignores just 10 years of data, which suggests it isn't as robust as it may seem. Let's assume that the market has always grown, with no bumpy rides at all, since forever. Why should that mean it will always grow? That is akin to taking a step towards a cliff, and not falling over, so you tell yourself "I haven't fallen over yet, so that means I can keep walking towards the cliff and never fall off!". Well, no, at some point you'll reach the edge and then fall. How do we know it isn't the same with the stock market? The market grows, until it doesn't. We're not throwing dice here, the market is not random, it grows based on reality, and that reality may change at any given moment. Indeed, thinking about it in this way, the argument that the market "always grows" may end up defeating itself! Because if people end up believing that the market always grows, that will lead to people investing more of their money in the market, which will inflate the value of the market above and beyond its "actual" worth. At some point, that house of cards will come crashing down. Has it happened yet? No. But what reason is there to suppose that the cliff isn't out there?  My question is, what are the responses to these counter-arguments?  What reason is there to expect that the stock market will continue to generate returns in the future, beyond the (unsatisfying) appeal to past performance?


How can we make our character move smoothly across tiles? He moves tile by tile, but that looks unprofessional. In addition, when you hold down the arrow keys he zips across the screen. How can we prevent that from happening?


show that there's a linear ordering such that $R \subseteq R^*$

Show that if $R$ is a partial ordering on a set $A$, then there exists a linear ordering $R^*$ on $A$ such that $R \subseteq R^*$


Polynomial equal to sum of squares of polynomials

Given a nonnegative polynomial $p(x)$ on $\mathbb{R}$, does there exist some $k$ such that for some polynomials $f_1,\ldots ,f_k$ we have $p(x)=\sum_{i=1}^k(f_i)^2$?   I think yes, because of the nonnegative nature of $p(x)$, but am unable to prove. Any hints. Thanks beforehand.


Define additional math operators to be typeset in roman

Mathematical operators, such as function names, should be set in roman type, not italics. Latex already has commands for some operators, including \max, \min, and \log.  How can I define additional such commands?


How to find mod for this particular question 19^16 mod 20413

Having trouble trying to understand how to tackle this question.  $19^{16} \mod{20413}$. When approaching this question I understand the steps involved such as $19^{16} / 20413 = 1.413028039\cdot10^{16}$. However not sure what to subtract this answer to achieve a $0$ before the decimal point in order to multiply by $20413$ to get the answer. From the answer sheet the intended answer is $11546$.  Appreciate the help.


find $\sum_{k=0}^{t}(-1)^k\binom{t}{k}^2$ for odd t then for even t

find $$\sum_{k=0}^{t}(-1)^k\binom{t}{k}^2$$ for $t=2n$ then for $t=2n+1$  I tried by expand $(1-x)^n(1-x)^n$, with no result.  Any Help ?


C Variadic Macro to simplify calls to fprintf

I have defined a clunky macro to give myself a reduced probability of making mistakes in a project with a large amount of unique logging situations...  #define BANG(...) {fprintf(stderr, "in %s(), ", __func__);\                    fprintf(stderr, ##__VA_ARGS__);}   And I can call this quite successfully like this...  BANG("Something went wrong\n");           But the following (obviously) breaks in frightening ways...  if(emulatorExitCode == 1)     BANG("emulatorExitCode: %d (an error)\n", emulatorExitCode);         else     everythingIsWonderful = 1;   I know the reason of course, it's the semicolon I accidentally left on the end of the call to BANG();  That rogue semicolon causes the if/else construct to separate into two fragments, disassociated from eachother.  Here's the compiler error...  main.c:74:3: error: ‘else’ without a previous ‘if’   So far so good, the workaround is to have -Wall -Werror -Wextra -Wpedantic in my compiler arguments so I cannot accidentally cause a horrible mess of my logic.  And as long as I always leave out the semicolon on the end of the BANG() macro calls I'll be OK because the macro definition uses braces around the two fprintf(); calls.  But I'm worried that other people maintaining my code later will not realise that this is a problem (it's really not obvious) and get in a mess.  Question  Can this macro #define be rewritten to either reduce the danger posed by the problematic semicolon OR can it be rewritten to roll these two calls to fprintf into a single call?  The latter is complicated by the fact that it's variadic AND has the famously head-scratchy printf-family semantics to deal with.


Is there a simple way to deploy a Java web app in tomcat on linux on the port 80 ( not 8080)

I am trying to deploy a webapp written in Java 11 ( only Servlets, no framework used). I want to use Tomcat 10 on Ubuntu 20.04 and deploy the appp on port 80. I installed Java 11, Tomcat 10, and MySQL. Tomcat is installed using a user dedicated to it. I read that it is a good practice for security purposes. People argued that it is dangereous to use the Root user to deploy Tomcat. So, I succeeded to deploy it on the default port 8080. To Access the app, I need to type: . The problem is that I want it to be accessed on port 80. That is because users will find it very strange to access the app on  If i change the port number in the file server.xml, it does not work. It is because the port 80 is a privileged port on linux, and I am running the app using a non-root user. I read some articles about it and the possibilities are the following :  using iptables and redirecting requests arriving on the port 80 to the port 8080.  using a proxy server such as Apache or Nginx and running Tomcat behind it. In that case, the logic is that Apache is easily accessed on port 80 and it Can communicate with Tomcat on port 8080 using a connector.  running Tomcat as Root user on the port 80 (which is a privileged port) and change the server.xml file. Not a good idea for security.  using Windows server instead of linux since I was informed it does not have privileged ports.   I think that those solutions are too much bizare. Is there not something simpler ? If not, why is there not a webserver easy to use for Java as Apache is easy to use for PHP on linux ? Your help is welcome. Best, Professor wawou.


I have destiny on ps4 as a disk but I have none of the dlc's. I just bought the legendary edition and PlayStation store is saying cannot add the follwing content to downloads. A disc version of the same aplication has been used on this ps4, you must delete the disc Version. If I delete it and download the legendary edition will I still have my data.


What's the difference between \newcommand and \newcommand*?

I just spotted someone use \newcommand* in an answer and realised that I'd never quite sorted out in my head what the star (asterisk) was there for.  (This one is practically impossible to search for on the internet so this is a good place to record the answer!)


I want to set IP Rotation using iptables so I am using below code.My server Virtualization Type is OpenVZ. My server provider has enabled all the options then also don't know what is the wrong, It is showing error iptables: No chain/target/match by that name.  iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o venet0 -m statistic --mode nth --every 5 --packet 0 -j SNAT --to-source x.x.x.1 iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o venet0 -m statistic --mode nth --every 5 --packet 0 -j SNAT --to-source x.x.x.2 iptables -t nat -I POSTROUTING -m state --state NEW -p tcp --dport 25 -o venet0 -m statistic --mode nth --every 5 --packet 0 -j SNAT --to-source x.x.x.3   They are also ready to enable my needed options so if need any specific option to enable then please tell me.Or is there any other problem ??? Please help me to solve this. I found similar question here : , but I can find any specific answer there like how to solve it with OpenVZ. So, I have created new question for attention.


Why are the sites so far from each other? It looks like improper UI.        Two consecutive items are at a distance of about ¾ of screen height.  Also kindly tell me what the three parallel horizontal line at the beginning of the sites do.


When im making a forward selection and looking for the AIC, I get some large negative numbers. My code: OnlyIntercept = lm(Risk ~ 1, data = train.df) step.forward = step(OnlyIntercept, scope=list(lower = OnlyIntercept, upper = logReg), direction = "forward", k=2)  The output for model with only intercept:  Start:  AIC=-1309 Risk ~ 1                  Df Sum of Sq RSS   AIC + Score_MV       1     26.85 200 -1424 + Score_A        1     22.80 204 -1406 + District_Loss  1     12.55 214 -1360 + PARA_A         1      9.96 217 -1349 + Sector_score   1      7.07 220 -1337 + Score_B.1      1      5.82 221 -1331 + Money_Value    1      5.39 222 -1330 + TOTAL          1      5.31 222 -1329 + PARA_B         1      4.17 223 -1324 + History        1      3.40 224 -1321 + numbers        1      3.19 224 -1320 <none>                       227 -1309  Even with all more variables included, the AIC is still very negative. How do i interpret this?


What is the limit of the Box-Cox transformation as lambda goes to 0?

I am running into this problem and was told this could help.


What is the meaning of "Manuscript submitted"?

I submitted a manuscript to a journal about two months ago, its status was remains "manuscript submitted" until yesterday. In fact I saw no changes from the beginning to now and every process just happened in one day. I mean in yesterday it became "with editor" and soon after that "Decision in Process". It seems to me it will be rejected. But the strange thing for me that why it was not "with editor" from the beginning?


Was Emil Blonksy a failure as a super-soldier?

In The Incredible Hulk, Emil Blonksy receives a serum based on that from Project: REBIRTH that is intended to make him a stronger, faster soldier. Based on the events at the University confrontation with The Hulk, this was a success.  However as Erskine states in "Captain America: The First Avenger":     The serum amplifies everything that is inside, so good becomes great; bad becomes worse.   The only reason that Emil Blonksy became the Abomination was because he asked for more serum, and eventually pressured Samuel Sterns to give him further treatment.  Given Blonksy's pre-serum attitude, could the serum he received be considered a success (given that it made him 'worse')? Also if the treatment were used on someone good with the qualities of Steve Rogers could the actual success of Project REBIRTH be replicated?  Note: This is primarily about the Marvel Cinematic Universe, but if there are comic references that show that other people have the potential that Steve Rogers had under the influence of the super-soldier serum thats good too.