combine 2 half-height video sources into one combined video using ffmpeg

Using ffmpeg.exe (under Windows) ,  I want to produce a 1280 by 720 pixel video  that combines half-height -cropped versions of  two video sources (input streams)  that are stacked atop one another.  One source is from a webcam, which is set to capture at 1280x720. I want to use the top half of that (top 360 of the 720 lines of vertical). video="Microsoft LifeCam HD-5000"  The other (2nd) source is from video="screen-capture-recorder"  -- I have read many threads online, found via web searches. I am very confused. I could use some hand-holding. I tried the new vstack filter. I don't need pad (padding). I can't find a simple example (command line) that matches what I am looking for.  I added  -vf "crop=1280:360:1280:360"  Maybe the first two values should be different ('0's , maybe ? ) .   I tried placing that portion of the command in different places, relative to the specifications of the input -f dshow -i "video=[...]".  I'm confused by map  (graph) stuff of ffmpeg.  "[0:v][1:v]vstack[v]" -map "[v]"  Once I am able to record video, I also want to combine with audio. Audio will be from a single source.  I have successfully made many videos using just screen/desktop capture + loopback audio using Windows Direct Show -- in which I record from only a single video source ...   e.g. :   ffmpeg.exe -f dshow -framerate 30 -i video="screen-capture-recorder":audio="virtual-audio-capturer" -filter_complex amix=inputs=1 -vcodec libx264 -pix_fmt yuv420p -preset ultrafast -acodec pcm_s16le (output file)     examples of commands that I have tried, and failed are :   ffmpeg -f dshow -i video="screen-capture-recorder" -f dshow -i video="Microsoft LifeCam HD-5000" -vf "crop=1280:360:1280:360" -filter_complex vstack -vcodec libx264 -pix_fmt yuv420p -preset ultrafast 5000screen_take1.mkv   I even tried adding :  "[0:v][1:v]vstack[v]" -map "[v]" to that , above (previous) command.


Stack Exchange Usercard Squeezer™ on profile page

Look at the profile page of , who has just "lost" 100k reputation and all their bronze badges, because of this broken design.  Shouldn't the primary usercard be kept intact no matter how other elements grow?  P.S. So many design bugs these days, did SE do a large CSS refactory?  P.P.S  that squeezes the right pane ( to reproduce)


Is possible to set the command line line (not prompt) from another program?

I hope that this question won't be too ambiguous.  I would like to achieve following thing.  [user@host]# ./my_program SET THIS AS NEXT COMMAND THAT YOU CAN EDIT [user@host]# SET THIS AS NEXT COMMAND THAT YOU CAN EDIT   Is there any way of achieving it without writing explicitly to a file descriptor?  I have a working shell, let's say with PID 10150. My current solution is following:  Console 1:  [user@host]# echo $$ 10150 [user@host]#   Console 2:  [user@host]# echo -n "SET THIS AS NEXT COMMAND THAT YOU CAN EDIT" > /proc/10150/fd/0 [user@host]#   Console 1:  [user@host]# echo $$ 10150 [user@host]# SET THIS AS NEXT COMMAND THAT YOU CAN EDIT


Solarian Revelations needing Attunement of Specific Type

I bet this is somewhere, but I've checked the books and I can't find it.  I'm looking at most of the revelations that say they do something when the person is attuned or fully attuned.  For example, Dark Matter specifies that it takes a move action to get a small DR bonus.  But it then says that if you're attuned or fully attuned, you don't take the move action and, instead, get a DR equal to half your Solarian level.  I assume they mean attuned in the mode that gives it to you (in this case Graviton).  But I do not see that stipulation anywhere.  Can someone point me to that stipulation if it exists?  If not...does this mean I can be Photon attuned and get the attuned bonus from Dark Matter?


Transform bookmarks to data driven pages in ArcGIS Desktop?

We have this large project in ArcGIS with 30 maps with different extents using Bookmarks to pan between these maps/pages.   Now we would like to use Data driven pages instead. The question is, is it possible to convert bookmarks to data driven pages or do we have to create a lot of polygons covering each map extent?


When to use "the lunch" (with the definite article "the")?

In most sentences that use the word lunch, I found this word does rarely take the definite article the. For example:     I have lunch in three hours.      Shall we go out for lunch?      Let's have some lunch.      I'll take my lunch to school.   But now I wonder if this word really cannot take the definite article, and if it can, in what cases do I use the definite article and in what cases not?  And also, if the word lunch cannot take the definite article, why cannot it have it?


Let $G$ be a group and $|G|=8$, then $G$ has proper nontrivial subgroups of order $4$. I can't see why. Does it follow by Sylow Theorem?


Convert hex number to int or byte then check result number in array of byte in c#?

I have number "000001B6" (hexadecimal). I want to convert hex "000001B6" to integer or byte,  then search result number in array of byte to check if this number exists in array or not.  How can i do that in C#, such that:  byte[] temp = new byte[20];  number = 000001B6 // convert number to integer or byte then search result number in array


How do they decide to open new SE domain for a topic?

When I take a look at the available SE domains, I see some very particular and very specialized ones. There are domains which doesn't need to exist because there is already a super domain for it which encapsulates that topic.  For example, . It has a very low number of questions asked in. The questions related to Poker could be asked in the domain for Games. Same for . Why don't they make a general domain for "Games"; so that, one would like ask something about Poker may label his question with "poker", and one would like to ask something related to RPG may label his question with "role-playing-game".  I don't know much about Poker, but, how many questions can someone ask about Poker? In my opinion, some topics was really not needed to exist. There are tons of topics out there that should have a SE domain. For example, there could be a domain for movies and other TV shows. Why do they open a domain for Latex instead of covering other most general ones first?  How do SE owners decide to create new domains? What logic do they use? Why do they decide to open a small domain like ""?    EDIT: I saw that there was already a domain for , sorry about that. But this doesn't change my question. Please take my question in a general sense, the domain names I used in my question are only examples.


I am creating the ssh tunnel using ssh -D 1080 hasinet from hasnoinet host, when from another session on hasnoinet do: curl google.com:1080. It doesn't work.


After accidently deleting files in the wrong dir, using find . -delete, is there anyway to recover the files or are they permanently removed from the filesystem?  EDIT:  I am hoping to find a relatively specific answer, rather than the recovery of a single file. There are several files deleted and manual restoration of each, individually, isn't a viable option.


Windows 10: No option to Eject External HARD DRIVE (NOT USB Stick)

When I plug in my external hard drive (again, NOT USB stick), and right click on the icon in This PC, there is no option to eject the drive.     There is a system tray option to "safely eject" it, but that doesn't work at all.     The only way for me to remove it at the moment is to shut down the PC.   I am not looking for a third party solution (cuz they don't work anyway - I've tried a range: Unlocker, the Quickandeasysoftware one, etc..). I've also disabled drive indexing.  And before you mark this as a duplicate almost ALL of the internet / SU articles are either on USB sticks, or on this shutdown method (e.g. )  I just want to know if this is possible (it should be right?), and if so how.


How does the “rude or abusive” flag work?

It is possible to flag a post as “rude or abusive” (formerly “offensive”).   What is the effect of the “rude or abusive” flag? When should the “rude or abusive” flag be used? Is there any way to remove “rude or abusive” flags?      For more information on flagging, see "" in the .     Related:


How can we sum up $\sin$ and $\cos$ series when the angles are in arithmetic progression? For example here is the sum of $\cos$ series:  $$\sum_{k=0}^{n-1}\cos (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \cos \biggl( \frac{ 2 a + (n-1)\cdot d}{2}\biggr)$$  There is a slight difference in case of $\sin$, which is: $$\sum_{k=0}^{n-1}\sin (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \sin\biggl( \frac{2  a + (n-1)\cdot d}{2}\biggr)$$   How do we prove the above two identities?


There is a pending suggested edit in the queue message comes in a white page

I have seen this behavior lately when I go to edit a question if it is editing by some one else the white page coming with the message saying "There is a pending suggested edit in the queue, try again in a few minutes.". But the page coming with this message was different with an ajax message before as I can remember. Is this normal?


I haven't used java in a long while and i'm trying to teach someone the basics and get some practice in for myself. I decided to make a change machine that will give you the amount of Dollars Quaters NIckles etc one of those beginner codes.  This isn't the final code but I just have periodic print statements scattered about to test whether the code is working or not.  THE CODE OUTPUT  2 dollars and the change is 0.69  2 quaters and the change is 0.18999999999999995 1 dime and the change is 0.08999999999999994 1 nickel and the change is 0.03999999999999994 3 pennies and the change is 0.009999999999999938   THE QUESTION  It should be 4 pennies instead of 3, I thought of using an if statement like if change > 0.0 then + 1 penny but I feel like that's a brutish way of doing that could cause problems in the future but i'm also trying to keep it as simple as possible.   Is there any other suggestions on how to properly get 4 pennies, I believe there's a way to limit the decimal though I don't remember how complex it was.   If there are any suggestions to my code please feel free whether it be an easier way to do it or etc.  import java.util.Scanner;  public class changeMachine {   public static void main (String[] args) {      Scanner scan = new Scanner(System.in);      System.out.println("Price");     double price = scan.nextDouble();      System.out.println("Price " + price + "\n");      System.out.println("Cash");     double cash = scan.nextDouble();      System.out.println("Cash " + cash + "\n");      double change = (cash - price);      System.out.println("Change " + change + "\n");      double dollar = 1.00;     double quater = 0.25;     double dime = 0.10;     double nickel = 0.05;     double penny = 0.01;      int dollarAmount = (int)(change / dollar);     change = change % dollar;     System.out.println(dollarAmount + " dollars and the change is " + change);      int quaterAmount = (int)(change / quater);     change = (change % quater);     System.out.println(quaterAmount + " quaters and the change is " + change);      int dimeAmount = (int)(change / dime);     change = (change % dime);     System.out.println(dimeAmount + " dime and the change is " + change);      int nickelAmount = (int)(change / nickel);     change = (change % nickel);     System.out.println(nickelAmount + " nickel and the change is " + change);      int pennyAmount = (int)(change / penny);     change = (change % penny);     System.out.println(pennyAmount + " penny and the change is " + change);   } }


What syntax is this when setting the Elapsed property?

Can someone explain me what this System.Timer does with the ElapsedEventHandler? I don't understand this syntax:  private readonly System.Timers.Timer _timer7 = new System.Timers.Timer(); this._timer7.Elapsed += (ElapsedEventHandler) ((A_1, A_2) =>       {         this._logger.LoggingOfError("T7-Timeout");       });


How do I check if a NESTED ARRAY meta value array contains an item name?

I'm adjusting an archive page to only show products where a certain ACF meta field has a specific value but its not straight forward as the meta value is a nested array so I'm struggling to check if the value is in there. I've commented what get_post_meta(get_the_id(), 'sub_categories'); pulls through, I've tried just the value as in Oil Lubricated tried %Oil Lubricated% etc but no joy. See below query code. E.g ...  $meta_query, array(     'key'=> 'sub_categories',     'value'=> '', // Array ( [0] => Array ( [0] => Variable Speed Frequency Controller [1] => Oil Lubricated ) )     'compare'=>'LIKE' // = / exists / like  ); $wp_query->set('meta_query',$meta_query);  ...  Any help would be greatly appreciated. Cheers


Simple way to see the content of directories in Linux/UNIX file systems

In the past, I learned that in Linux/UNIX file systems, directories are just files, which contain the filenames and inode numbers of the files inside the directory.   Is there a simple way to see the content of a directory? I mean the way the files names and inodes are stored/organized.  I'm not looking for ls, find or something similiar. I also don't want to see the content of the files inside a directory. I want to see the implementation of the directories. If every directory is just a text file with some content, maybe a simple way exists to see the content of this text file.  In the bash in Linux it is not possible to do a cat folder. The output is just Is a directory.  Update The question  addresses the same issue but it has no helpful solution like the one from .


How would one create these curved arrows?

I was wondering how would one create such a diagram with curved arrows with LaTeX. I have no idea where to begin with this, so any help would be appreciated.


Separate figure legends when using \ContinuedFloat

I have a figure float with 3 subfigs in lyx which are too large to fit on one page, so am using \ContinuedFloat. The figure now goes over two pages and the figure number is the same for both, as in the screenshot.  How can I modify the second figure legend (which is a duplicate of the first) to simply read: "Figure 4 (continued)" or something similar, such that I don't have two duplicate figure legends? Is it possible through \renewcommand somehow?


What is the difference between using intel-microcode and not using it?

What are the effects and implications of choosing one of the following two options over the other?   Performance differences? Stability differences? Which of the two is better supported long-term?


I am novice in programming. I have written a program and confused in concepts of pointers.  #include <bits/stdc++.h> using namespace std; int main() {     char c[]="hello";     char *a=c;     cout<<a<<endl;     int arr[]={1,2,3,5};     int *p=arr;     cout<<p<<endl;     return 0; }   When I print a, it prints hello but when I print p it print the address. Why?


How to find out which compile steps are necessary?

I have been using LaTeX for quite a while now, but I have not found out how to determine the rules for the compilation steps needed to create the document yet.  A couple of questions come up. Please do not hesitate to provide a really short answer, I just do not know where to start.  texify belongs to MikTeX and runs pdflatex plus what else is needed. What is the equivalent for MacTeX?  When I would like to launch a recompilation script, it would probably make sense to run texify only once so that I do not have to take care of running BibTeX, pdflatex and others multiple times. Is that correct?  What would be the best approach to write a simple script that compiles everything that is needed in the correct order?  There is a grunt plugin that compiles latex, but looking at the , I do not understand how a simple pdflatex call could correctly compile everything. Is that possible?


Can I say:  There is a shop, market and pharmasy.  I have a car, house and swimming pool.  I mean, could I sometimes not duplicate articles a/an. If yes, then when?


dice toss game skipping over an if statement and not printing anything out

my code keeps skipping the if statement for a dice toss game. I think it has to do with the conditions  unsure as to how I should put the words in the parenthesis by the if statement.   I need it to tell me if it matches the guess of high/low      System.out.println("How many points would you like to wager?");      Scanner keyboard = new Scanner(System.in);     int userWager = keyboard.nextInt();      while (userWager > totalPoints){         System.out.println("You have wagered " + userWager + " points, but only have " + totalPoints);         System.out.println("Please try another amount.");         userWager = keyboard.nextInt();     }      System.out.println("Please input LOW if you think it is between 2 and 5 or HIGH for a number between 9 and 12.");     String userGuess = keyboard.nextLine();     userGuess = keyboard.nextLine();      int roll1 = (int) (Math.random() * (6 - 1) + 1);     int roll2 = (int) (Math.random() * (6 - 1) + 1);     int diceRoll = roll1 + roll2;      int pointsEarned = 0;      if (userGuess == "HIGH") {          if ((diceRoll >= 9) && (diceRoll <= 12)) {             pointsEarned = userWager * 2;             System.out.println("The dice equalled " + diceRoll);             System.out.println("Congratulations! You win " + pointsEarned);             totalPoints = calculatePoints(pointsEarned, totalPoints);          } else if ((diceRoll >= 2) && (diceRoll <= 5)) {             pointsEarned = -userWager;             System.out.println("The dice equalled " + diceRoll);             System.out.println("Sorry! You lost " + userWager);             totalPoints = calculatePoints(pointsEarned, totalPoints);         }     } else if(userGuess=="LOW"){          if ((diceRoll>=9) && (diceRoll<=12)){             pointsEarned=userWager*2;             System.out.println("The dice equalled "+diceRoll);             System.out.println("Congratulations! You win "+pointsEarned);             totalPoints = calculatePoints(pointsEarned, totalPoints);         } else if((diceRoll>=2) && (diceRoll<=5)) {             pointsEarned = -userWager;             System.out.println("The dice equalled " + diceRoll);             System.out.println("Sorry! You lost " + userWager);             totalPoints = calculatePoints(pointsEarned, totalPoints);         }     }else{         System.out.println("The dice equalled " + diceRoll);         System.out.println("You did not win or lose any points.");     }


Hello Blender Stack Exchange,  I am trying to fill a face between 4 surfaces. Two are straight edges and two are a curved line made up of short vertices that came from a SketchUp export.  The problem: I select the vertices on the top and bottom and fill the hole. It creates a strange face that ruins the curve. I would prefer it create some sort of complex curve. I want it to be smooth.  Images attached to better explain.


I would like to try taking photo of shiny objects such as light sources, diamonds etc. I want to have them photographed without shining because I will try them on image processing programs and the more shining means the more problem at that photos.  Is there any comment ?  Thanks in advance,


./ Release' does not have a Release file.(Ubuntu 18.04)

I get the folowing error E: The repository 'http://download.opensuse.org/repositories/home:/sarimkhan/xUbuntu_14.04 ./ Release' does not have a Release file.   while trying to update the system using sudo apt-get-update.


I've recently switched to Ubuntu from Windows so I'm not too familiar with how everything works.  I was doing some work on in my Google drive using Chrome. Had 1 video streaming and another playing using VLC player. Then all the windows froze. Sound was still playing, mouse would still move but it wouldn't turn into the pointing hand when I hovered over icons in the bar on the left or when I hovered over the close, maximise and minimise buttons. Keyboard shortcuts like alt+tab didn't work. I closed my laptop which suspended Linux and then reopened it. Even in the unlock screen, it was very slow and unresponsive.   At this point I decided that it would be best to reboot so I pressed the power button and it turned off. When turning the turn my laptop back on, grub opened and I selected to Ubuntu to boot and it leaves me on this screen shown in the below picture. I've rebooted a few times now and it always hangs on this screen.    Does anyone know what problem I'm having and also how to fix it?


Where do I confirm my kernel version is safe against intel meltdown

I'm worried about the intel hardware level meltdown hacking. Several days ago, I experienced my Ubuntu system malfunctioning from booting. It went to something like initramfs. I couldn't fix the issue so I changed the kernel to previous version, 4.10. (I'm using Ubuntu 16.04.) Then it succeeded to boot normally. However I'm now worried since I feel like I should use the newer version that had issue booting. What should I do? Where do I confirm which version kernel is safe?


How do you copy/duplicate a form in Cognito Forms?


How can I switch to an external db with Views API?

In Drupal 7 I have a module with a hook_form(). This form is saving data into an external postgresql database.  I want to create a views to display data recorded. So I used hook_views_data() to create a mapping between the view and my custom tables. I created a view with admin but in this view I have the following error :   SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cars' doesn't exist   I have tried something like this but it doesn't run :  function carshop_views_pre_render(&$view) {   if ($view->name == 'cars_overview') {     db_set_active('carsdb');   } db_set_active(); }


What does it mean "being normally distributed"

There is an exercise which is used to illustrate how normal distribution works. The exercise starts by saying "Suppose scores on an IQ test are normally distributed..."; What does it mean for the scores to be normally distributed.   Also there is a curve associated to the Normal Distribution, what does this curve tell, what stands on the axis?   An intuitive explanation with a supporting example (optionally), would be much welcomed.


Should I buy filters or step down adapters for multiple lenses?

Following  I ended up buying a Nikon N80 with a third party lens (28-90mm, 55mm diameter). I also have a  lens, which is 52mm.  From what I gathered, I should get a  and K2/8 Yellow filter, but I wonder if I should use a 55-52 step down filter adapter or a second set of filters?  I'm asking because of possible issues with vignetting (I doubt the 50mm lens has a wide enough angle for that though) and ghosting, but also because ideally I don't want to buy additional filters. (At the same time, I don't know if I will buy additional lenses later on once I figured out this stuff some more. Ideally I want to add a wide angle lens for indoors, but from what I gathered, I don't need to use filters indoors?)


I have process in salesforce in such a way opportunity we can relate this opportunity to this lookup field parent_opportunity__c . Which relates opportunity to other parent opportunity.  I want to write a query parent to child :  select id,(select id from opportunity where parent_opportunity__c!=null) from opportunity where parent_opportunity__c=null   I have worked with different scenarios i cant able to crack it  select id,name,(select id,name from parent_opportunity__r) from opportunity this is showing error and   select id,name,(select id,name from opportunity) from parent_opportunity__c this is also error


Transfer at Munich, do I have to clear immigration and is 40 minutes enough time?

I am visiting Paris from India. The flight is via Munich. There is only a 40 minute gap before departing to Paris from there. So my question is 40 minutes a sufficient time to get the immigration and customs check and still manage to get the Paris flight? Is it possible to do the immigration service check in Paris airport so that I would have sufficient time?


Does anyone know how to disable global fog from a particular camera?     I have two cameras in my scene; one is a mini map camera, where I need to disable global fog.  I have checked  and , but have found nothing that works.


How can I work around this TikZ bug: (\x)^2 and \x^2 produce different results in TikZ plot?

I have some files with TikZ graphics that have suddenly changed appearance since I upgraded to PGF-2.10.  Here is a minimal example:  \documentclass{minimal} \usepackage{tikz} \begin{document} \pgfversion\par \begin{tikzpicture} \draw[blue] plot[domain=-1:1] (\x,{\x^2 + \x^3}); \draw[xshift=4cm,blue] plot[domain=-1:1] (\x,{(\x)^2 + (\x)^3}); \end{tikzpicture} \end{document}   In PGF 2.00 I had this:    while in 2.10 I have this:    The one on the left in PGF 2.10 looks like the graph of y=x^3 but could also be y=x^3 + x|x|.   This has been  on sourceforge and  on the pgf-users mailing list.  Although I haven't checked myself yet, the bug remains open and some of the commenters below report that problems still exist in the CVS version.   Geoffrey Jones notes the bug is in the 2.00 CVS version:     Hi Matthew, not an answer, just an FYI   that's too large for the comment box.   My compile of your code through pgf   v2.00 produces the result you see with   v2.10, above:       I.e., the difference you observe seems   to pre-date v2.10.   There is a workaround by inserting parentheses.  But since I have so many old lecture files I'd rather find a solution that doesn't involve rewriting my TikZ code.  And I'm squeamish about using the CVS bleeding edge code even if it were fixed, since I don't want to introduce other problems.  Ideally I'd like a simple patch that I can stick at the preamble, or just fix one file in the PGF distro.


The question states: "Assume A,B,C,D are pairwise independent events. Decide if A ∩ B and B ∩ D are independent events. Then repeat this assuming the four events are mutually independent." I am not sure how to go about doing this proof and could use some insight on how to do it.


How can I block a user not to use "sudo su -" command ? Because that will give him root access anyway. I want to limit him to read only permission for all files apart from what ever I give write access.


At the end of Back to the Future II, a lightning bolt hits the DeLorean which sends it back to 1885.  At the time though, the DeLorean wasn't moving; it was relatively stationary hovering in the storm.  Yet, it's emphasised repeatedly that the DeLorean must reach 88 miles per hour (which becomes a key plot point in Back to the Future III).  So, considering the DeLorean wasn't traveling at 88mph when the lightning struck the DeLorean sending it to 1885, what is the in-universe explanation of how it travelled there?  Some other factors to bear in mind:   If a lightning bolt was sufficient to send the DeLorean time traveling, then the 88mph business would be irrelevant Note that there are the firey tracks left after the DeLorean time travels in the '66' shape.  The thing to note about this though is that we never see these before the DeLorean disappears.  These tracks are always appearing after the DeLorean has traveled away.  This would seem to indicate that the DeLorean did move, but following the activation of the time circuits.


single word that means which can be constructed at home

What is the word that means “that which can be fixed up at home”?   For example, I buy parts from a store, bring the parts home, and then can construct the thing out of those parts by myself. What is the word that means such an object, one that can be made at home in a do-it-yourself style?


I use the multiple \Diamond-product sign (\bDiamond) as described in . Now, in addition, I would like to have a filled \Diamond-product sign, i.e. filled with black. Any suggestions?


Non-Separability of Metric Space implies non equivalence of Borel $\sigma$-algebras on product space.

Let $(X_1,d_1)$ and $(X_2,d_2)$ be metric spaces. Take $$\mathcal{B}(X_1)\times \mathcal{B}(X_2)=\sigma(\{A_1\times A_2 | A_1\in \mathcal{B}(X_1), A_2\in \mathcal{B}(X_2) \})$$ Where $\sigma(A)$ denotes the smallest $\sigma$-algebra generated by $A$, and $\mathcal{B}$ denotes Borel $\sigma$-algebra.  Define the following metric on the product space: $$d((x_1,x_2),(y_1,y_2))=\sqrt{d_1(x_1,y_1)^2+d_2(x_2,y_2)^2}$$  Let $X=X_1\times X_2$, and $$\mathcal{B}(X)=\sigma(\{ \textrm{All open sets in } (X,d)\})$$     If $(X_1,d_1)$ and $(X_2,d_2)$ are separable metric spaces then $\mathcal{B}(X)=\mathcal{B}(X_1)\times \mathcal{B}(X_2)$.   Is it possible to show by counter-example that separability is necessary in that assertion?


How to obtain the latest .deb package of Vivalvi browser?

How to download the latest .deb of Vivaldi browser using wget generic  command (with the help of wildcards)? Vivaldi can't be downloaded without entering the exact name and number of the latest build. For example, wget https://downloads.vivaldi.com/stable/vivaldi-stable_3.5.2115.81-1_amd64.deb  What I want is something easy like in the case of firefox and google-chrome, where wget -nc -O ${HERE}/FirefoxSetup.tar.bz2 "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-US"  and wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb  are working very well, downloading the latest versions of these browsers without the need to specify the exact name and build number, unlike in the case of Vivaldi. I want to have a script that downloads this browser(Vivaldi) anytime without my intervention to update/change it.


How to modify or override Main page content block in drupal 7?

I had wasted my 2 days but unable to find a way that how to modify or override the main page content block in drupal 7. Please help me.  I want to edit this main page content block.


I have read pricing guides etc and since I haven't been in business for years and years its kinda hard to plug the numbers in to the formula.  Anyways I'm just having a hard time pricing a wedding.  They contacted me yesterday...they are getting married in Jasper Alberta on New Years Eve.  So for me that is 3 hours of driving there.  So 6 hours total.  I was thinking offer them 9 hours or so with a CD.  They want to know my experience.  And really for weddings I only have done a wedding and a half.  So not much experience.  I would like to get more experience...rather then saying a price and them not booking.  But at the same time making a little bit.  I have a feeling even if I said $900 they may think that it is too much for a photographer that has hardly taken any wedding pictures.  Your help would be very much appreciated.  Thanks.


How do I directly talk through a serial port via the keyboard?

I have a hardware controller that I need to communicate to via serial port. How exactly can I communicate with that port using my keyboard as input.  The serial runs on 19200 baudrate, 7 bytesize, and 1 stopbit


What was Tauriel doing during the events of The Lord of the Rings movies?

[Yes, The Hobbit movies are nonsense. But how could I call myself a fantasy fan if I didn't demand my nonsense be as logical as possible?]  Tauriel is presented as a highly-skilled fighter and a combatant for the side of good. Despite this, she apparently did nothing during Sauron's war on the free peoples.  Was she somehow     still mourning Killi, after all these decades?   Was she dead? Or is there another reason she didn't participate?


Is it fine if i simply just add more RAM?

I have Crucial 8GB 2133MHZ DDR4 Desktop Memory inside my computer currently, and want to buy a 16GB kit, should I just add the new memory to the computer? It has 4 DIMM Slots, this is my computer stats:    The RAM I want to buy is the same as the RAM that's already in.  Would it be compatible to just add 2 more sticks?   Just want to know if its fine if I just install the 16GB Kit without changing anything, also is there a specific way it should be installed? Sorry for the stupid question, just always scared of buying expensive products


How does the reparameterization trick for VAEs work and why is it important?

How does the  for variational autoencoders (VAE) work? Is there an intuitive and easy explanation without simplifying the underlying math? And why do we need the 'trick'?


How secure is it to receive an offer of post-doc position in email?

I received an unofficial offer for a post-doctoral researcher position a few days ago from a well-known and respected professor in the field, and the institution is very well-ranked. At the same time, I already have an official offer from a different place, but not comparable in value. So, I need to know how certain the unofficial offer is to justify declining the official one.   Actually, after I received the first offer officially, I contacted the other places to which I had applied, and asked them to decide on my application, and set a deadline for them by when I had to decide about my already-issued offer. I received the second offer right before the deadline as an email in clear and strong words ('I am pleased to offer you ...') similar to what you see in an official offer letter. I quickly accepted the offer.   I think that since he knew I would have to decide about the other offer, he tried to be clear in the email, encouraging me to decline the other one. However, I'm not sure whether it would be wise to do so. More specifically, does such an email work as a legally binding document (e.g., capable to be held up at a court)? I'd say the difference between the values of the positions actually justifies 1%  risk. What do you suggest?


The value of the expression   $$\dfrac{\sin x}{ \cos 3x} + \dfrac{\sin 3x}{ \cos 9x} + \dfrac{\sin 9x}{ \cos 27x}$$ in terms of $\tan x$ is    My Approach  If I take L.C.M of this as $\cos 3 \cos 9x \cos 27x$ and respectively multiply the numerator then it is getting very lengthy. Even if I will use the identity of $\sin 3x$ then also I am not getting appropriate answer. Please suggest some nice and short way of doing this question.


How to connect MacPro 2013 Thunderbolt 2 to USB C

I see several posts about USB-C and TB-3 to TB-2 but are they reversible? As I cannot find a TB-2 to USB-3 device I thought maybe I could connect my MacPro (Late 2013) to a USB-C hub which has USB-3 ports. My primary purpose is to access storage devices not displays.   How can one go from TB-2 to USB-C or USB-3?


getLatitude and getLongitude throws NullPointerException

Would you please explain me why getLongitude and getLatitude returns a NullPointerException?  The truth is the problem already has been solved, but there's one thing that is bugging me for this might be asked by our thesis coordinator. The situation is that I have to get the user's current coordinates (latitude and longitude). I've decided to use FusedLocationClient.getLastLocation() in order to get the coordinates.  mFusedLocationClient = getFusedLocationProviderClient(this);  //app already crashes once the line below is executed  mFusedLocationClient.getLastLocation().addOnSuccessListener(this, new OnSuccessListener<Location>() {             @Override             public void onSuccess(Location location) {                  if(location != null){                     //myLocation is an instance variable of this class                     myLocation = location;                 }else{                     Toast.makeText(PlaceCategoriesActivity.this, "Location fetch failed!", Toast.LENGTH_SHORT).show();                 }             }         });          latitude = myLocation.getLatitude(); //this line throws NullPointerException          longitude = myLocation.getLongitude();   The app seems to compile fine but then it crashes, upon inspecting by adding a breakpoint for debugging on myLocation.getLatiude() and myLocation.getLongititude(), it turns out that this method invokes a null pointer exception, which for me is weird because myLocation already has referenced the location object brought by the onSuccess method of the addOnSuccessListener.   I've already solved the problem by moving the last two lines of code and putting in within the listener like this:          mFusedLocationClient = getFusedLocationProviderClient(this);          mFusedLocationClient.getLastLocation().addOnSuccessListener(this, new OnSuccessListener<Location>() {             @Override             public void onSuccess(Location location) {                 if(location != null){                     myLocation = location;                      //moved the 2 lines of code and it now works                     latitude = myLocation.getLatitude();                     longitude = myLocation.getLongitude();                 }else{                     Toast.makeText(PlaceCategoriesActivity.this, "Location fetch failed!", Toast.LENGTH_SHORT).show();                 }             }         });          //Toast returns a value of 0 on latitude and 0 on longitude         Toast.makeText(this, "Lat: " + latitude + "Long: + " + longitude, Toast.LENGTH_SHORT).show();   The funny thing is that the longitude and latitude is shown on the Toast and both has a value of 0.


multiplicity of an irreducible representation

Here's a quite basic question, and I'd be very glad for an answer!  The multiplicity $m_V$ of an irreducible representation $V$ in the representation $W$ of the group $G$ is given by $$ m_V = \dim \left( Hom(V,W)^G \right) $$  where $Hom(V,W)^G$ is the space of $G$-module homomorphisms from $V$ to $W$.  How to see this?


How do I determine the probability of rolling various ranges of numbers on 4d10, 5d10, etc.?

After realizing that my knowledge of how probabilities function has waned significantly, I'm wondering what the probability of rolling multiple 6's or higher (6-10) on four 10-sided dice, five 10-sided dice, etc. up to nine 10-sided dice.   As well, what the probability of rolling a 7 or higher, 8 or higher, 9 or higher on the same sets of dice as mentioned above.   Something like; %chance rolling 3 of 6-10 on 4d10, %chance rolling 3 of 7-10 on 4d10, %chance rolling 3 of 8-10 on 4d10, %chance rolling 3 of 9-10 on 4d10, etc.  %chance rolling 3/4/5 of 6-10 on 5d10... etc.  I've tried creating some functions on AnyDice, but I either can't get the function(s) to work, or I fear I may be misunderstanding my results.  How do I make this work?


Proof: $\kappa \cdot \kappa = \kappa$ for infinite cardinals

Im looking for a detailed proof for $\kappa \cdot \kappa = \kappa $ with $\kappa $ beeing a infinite cardinal number. The problem is described in a book (Frank R. Drake, Set Theory: An Introduction to Large Cardinals) as a exercise but without any solution.  As far as i know i can proof that $\kappa \cdot \kappa = \kappa $ holds for the cardinal $\aleph_0$($\mathbb{N}$) wich can be proven with "Cantor's Diagonal Proof". But i need it for any infinite cardinal so it should also be valid for $\aleph_1,\aleph_2,...$  So im missing the induction part.  I know that it should be possible cause very roughly explained to show something like $| \mathbb{N} \cdot \mathbb{R}| = |\mathbb{R}|$. We can make a bijection if we put all the $\mathbb{N}$ numbers in between 0,1 of the $\mathbb{R}$ and still have enough space to adress all $\mathbb{R}$.  TL;DR im looking for the proof of $\kappa \cdot \kappa = \kappa $ and $\kappa \cdot \lambda = max(\kappa, \lambda) $


I have a strange situation. Pinging by ip works fine, but by host name fails. My observations:  nslookup -type=ns google.com ;; connection timed out; no servers could be reached   In one window I called:  ping google.com ping: unknown host google.com   and in the other window I had this:  sudo tcpdump -n -i eno1 |grep -A5 172.27.1.100.53 # this is my dns server 11:06:57.336938 IP 172.27.6.77.48852 > 172.27.1.100.53: 61526+ A? google.com. (28) 11:06:57.337151 IP 172.27.1.100.53 > 172.27.6.77.48852: 61526 1/0/0 A 172.217.12.110 (44) 11:06:57.337170 IP 172.27.6.77 > 172.27.1.100: ICMP 172.27.6.77 udp port 48852 unreachable, length 80   As you can see in the tcpdump there was a response from DNS server and google.com was properly resolved: 172.217.12.110.  What's going on here? Can I somehow debug it more?  I know that when I restart my network it would work fine, because it happened few times earlier. This is only workaround and it doesn't resolve my isssue.  I am using ubuntu 16.04 (desktop).  Thanks.


Asymptotic behavior of algorithms and Big O comparison

I am a little confused in a specific case with the Big O notation and the Asymptotic behavior of algorithms. While I was reading the blog  that describes these notations very well I came across this statement whether it is true or false:  A O( n ) algorithm is Θ( 1 )  The answer says that this may or may not be true depending on the algorithm. In the general case it's false. If an algorithm is Θ( 1 ), then it certainly is O( n ). But if it's O( n ) then it may not be Θ( 1 ). For example, a Θ( n ) algorithm is O( n ) but not Θ( 1 ).  I am trying a little hard to comprehend this answer. I understand that Big O implies that a program can asymptotically be no worse. So I interpret that above statement where O( n ) is worse than Θ( 1 ) and is true.  Can someone explain with an example?


I had a western digital nas but it has died. How can I get the contents off of it?

I had a western digital bookworld nas.  It has died.  How can I get the contents off of it?  Thanks.


When would I want to use fields instead of auto-implemented properties?

Is there any situation where creating a field (apart from readonly, ), are there situations where fields have any advantages over properties?


I was looking for some advice on going to China from the US. I have dual citizenship, Japan and US,  and I want to use my Japanese passport to enter China.  US to China   At the counter: show JP passport.  At immigration: show US passport (LAX doesn't have leaving immigration?). Entering China: show JP passport.   China to US   At the counter: show US passport. At immigration: show JP passport. Entering the US: show US passport.   I am worried about being asked where I was when I re-enter the US. Will it matter if I tell them China, even if I didn't go through immigration with my US passport?


Is there a way of getting the time of my machine as an integer

Okay so, first of all, I'm really new into programming. I want to get the hour and the date of my machine as an integer, I have tried googling it and looked up a lot of questions about time on StackOverflow but can't find an answer. Everything I tried didn't work out. Even just getting the time to print out, and that even though I just copied it from a website. The problem with that is, that Visual Studios tells me the function is unsafe and I should add a _s to it but that just makes things worse. I then looked up on how to tell it to ignore that but that doesn't work either. Now besides the fact, that I can't even get the time to print out, I couldn't find a way to just get date and the hours as a normal integer.


Attempt to invoke virtual method on a null object reference for Video_id

I Am getting this error                                                                                java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.kosalgeek.android.androidphpmysql/com.kosalgeek.android.androidphpmysql.YoutubeActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.Serializable android.content.Intent.getSerializableExtra(java.lang.String)' on a null object reference There's something wrong with      Video_id   . I am getting Video_id value from another class that is product.java  from the following script  public class YoutubeActivity extends YouTubeBaseActivity implements     YouTubePlayer.OnInitializedListener { Product product = (Product) getIntent().getSerializableExtra("product"); TextView etName, etPrice, etQty, etImageUrl; ImageView ivImage; String VIDEO_ID;  private static final int RECOVERY_DIALOG_REQUEST = 10; public static final String API_KEY = ""; /**  * ATTENTION: This was auto-generated to implement the App Indexing API.  * See https://g.co/AppIndexing/AndroidStudio for more information.  */ private GoogleApiClient client;     @Override protected void onCreate(Bundle savedInstanceState) {     // TODO Auto-generated method stub     super.onCreate(savedInstanceState);     setContentView(R.layout.content_youtube);      YouTubePlayerView youTubeView = (YouTubePlayerView) findViewById(R.id.youtube_view);     youTubeView.initialize(API_KEY, this);      etName = (TextView) findViewById(R.id.etName);     etPrice = (TextView) findViewById(R.id.etPrice);     etQty = (TextView) findViewById(R.id.etQty);     if (product != null) {         etName.setText(product.name);         etPrice.setText("" + product.views);         etQty.setText("" + product.v);         VIDEO_ID = product.name ;       }       // ATTENTION: This was auto-generated to implement the App Indexing API.     // See https://g.co/AppIndexing/AndroidStudio for more information.     client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build(); }   @Override public void onInitializationFailure(YouTubePlayer.Provider provider,                                     YouTubeInitializationResult errorReason) {     if (errorReason.isUserRecoverableError()) {         errorReason.getErrorDialog(this, RECOVERY_DIALOG_REQUEST).show();     } else {         String errorMessage = String.format("YouTube Error (%1$s)",                 errorReason.toString());         Toast.makeText(this, errorMessage, Toast.LENGTH_LONG).show();     }  }  @Override public void onInitializationSuccess(YouTubePlayer.Provider provider,                                     YouTubePlayer player, boolean wasRestored) {     if (!wasRestored) {         player.cueVideo(VIDEO_ID);     } }


How to detect what is causing entries in the "last" cmd's output?

last ... date      {                                 Sun Mar 31 12:00 date      |                                 Sun Mar 31 12:00 date      {                                 Sun Mar 31 00:00 date      |                                 Sun Mar 31 00:00 ...   Why are there e.x.: "{" in the last commands output? Some sort of script could do this? (on OpenBSD 5.1)


Help with commutative property of matrices problem

Given matrices $A$ and $B$, where that $AB = A + B$, prove $AB = BA$. I keep coming up with AB = AB. It seems like basic algebra, but for the life of me, I'm getting nowhere :/. Someone help please?


I am totally new to Linux, servers and websites. I recently set up Apache2, Python, PHP, and MySQL for setting up a LAMP server. I am using Xubuntu 16.04 and PHP 7.0.11. I followed a guide and placed a PHP file named testing.php in it with:  <?php phpinfo(); ?>    It doesn't show anything on localhost/testing.php All it shows is the code itself.


I have an Azpen A1040 10" tablet and I have tried multiple root methods, nothing seems to work for this kitkat device.  I see some android enthusiasts successfully rooted this device.  Please let me know what method you used?  Thanks!


Way of separating question-based and answer-based reputation?

I'd like to be able to see how much reputations I got from asking questions (i.e. up/down votes on the questions) and from answering questions (up/down votes and the answer-accepted rep bump). I wish there was some UI for that on the profile page.


Words getting cut off in LaTeX when new line starts

In my LaTeX document words are cut automatically whenever a new line is due. It is not able to wrap/justify in normal sentences. Here is an example:    This is happening throughout the document. Is there any way to fix it? I googled a lot for hours and concluded that it is normal by default for all users. I am using the following packages:  \usepackage{amsmath} \usepackage{amsfonts} \usepackage{booktabs} \usepackage{siunitx} \usepackage{multirow} \usepackage{graphicx} \usepackage{ragged2e} \usepackage{hyperref}   Overleaf example:   Is there a way to have new words on a new line only?


SQL Concat Multiple rows into Single Row based upon a value in a cell

I have a dataset like this,  Id  TestId  LabelName   Rule 1    1       NULL      ( Quality=Red )  1   1        OR        (Quality=Yellow)  1   2        NULL    ( Non Ts=True )  1   3        NULL    ( Delivery=Red )  1   3        OR      ( Delivery=Yellow )  1   4        NULL    ( New Supplier Assesment=Red )  1   4        OR      ( New Supplier Assesment=Yellow )    I want the end result like below  Id       Rule 1        (Quality=Red) OR (Quality=Yellow) OR (Non Ts=True) OR (Delivery=Red) OR (Delivery=Yellow)   I tried doing it with a Case statement and Window Functions could not obtain what i wanted. Could anyone help me out.


This was talked about a few podcasts ago. And they referenced some other site that does this.  Currently location is a string but adding a country dropdown (and for the usa a state drop down) could be a great addition to the site.  Then allow for user filtering by country / state.


I want to insert a wire into my breadboard for prototyping, however the wire is thin so it folds and frays when I try to push it into an open slot.  Is there a particular type of pin I need to use in order bridge the gap?


I have several objects that intersect each other:   I would like to draw lines on the silhouette and key details with Freestyle, however Blender does detect intersections between objects and gives a very strange result:   What I'm trying to make is something like this:   Note: This is just an example, what I'm trying to do has about 10 highly detailed objects which intersect each other, so manually combining them is not possible.  Is it possible to make Freestyle detect edges at face intersections? If not, is there a simple way of combining the objects to create a single object with the outer faces of all the objects?


Are there single player RP or old-style card games that have an RP or old strategy adventure feel? I'm looking for something to play on my own, be it a game from the dark ages, a single-player card game, or a board game. I know about old RP books, which are fun but don't cut it for me as the temptation to cheat is too great.


Show that the series converges and find its sum

Show that  $$ \sum_{n=1}^\infty \left( \frac{1}{n(n+1)} \right) = \frac{1}{2}+\frac{1}{6}+\frac{1}{12}+ \;... $$  converges and find its sum.  My solution so far:  I am thinking about finding the partial sum first and show that the series converges since its finite partial sum converges.  Now  $$ S_N=\sum_{n=1}^N \left( \frac{1}{n(n+1)} \right)=\sum_{n=1}^N \left( \frac{1}{n}-\frac{1}{n+1} \right)=\frac{1}{2}+\frac{1}{6}+\frac{1}{12}+\;...= \left( \frac{1}{1}-\frac{1}{2} \right)+\left( \frac{1}{2}-\frac{1}{3} \right) + \;...+ \left( \frac{1}{N}-\frac{1}{N+1} \right)$$  but I don't know how to go on with this. Now $ \lim_{N \to\infty} \left( \frac{1}{N}-\frac{1}{N+1} \right)=0$ but the right answer should be $1$.


What books should every software tester read?

Why those? What is it that makes you recommend those books above others?


How long can you store used cooking oil then re-use it? I deep fried a turkey one year ago and have had it refrigerated since.


How did the scientists reach the cross product?

I want to know the origin of the cross product And his relationship with' Groupe compact'


The determinant of the matrix which has $c$'s on the main diagonal and other entries are $d$

In a $2k \times 2k $ matrix all the entries on the main diagonal are $c$, and the rest of all the entries are $d$.    How do you get the determinant of the matrix?


Cannot disable Hyper-V in Windows 10 64bit

I want to disable Hyper-V, but when I go to Windows Features, untick Hyper-V and click OK. It asks me to Restart my computer, and I let it do a restart.  During the restart, it says it failed to apply the changes, and it says undoing changes. When I'm logged back into the computer, I can see that the Hyper-V is still ticked in Windows Features.  My Hyper-V manager looks like this:    I've read others threads, and they say there might be network stuff still hanging about, but I can't see anything Hyper-V related in Network and Sharing Center that is enabled.    As you can see, anything hyper-v is disabled, yet I still cannot disable hyper-v.


When to use an offset in a Poisson regression?

Does anybody know why offset in a Poisson regression is used? What do you achieve by this?


Sorting a list objects by the values of one of it's member variables

I have a problem where I need to sort a list of objects by the values of one of its members. Example.py class Example:      def __init__(self, number, kind, amount):         self.number = number         self.kind = kind         self.amount = amount      def get_number(self):         return self.date      def get_kind(self):         return self.kind      def get_amount(self):         return self.amount  Say I create an empty list and then append a few Example objects. This isn't exactly how I am doing it but for the sake of this question lets do it like so: list_of_objects = []  a = Example(0, "test", 10) b = Example(5, "test", 11) c = Example(28, "test", 10) d = Example(16, "test", 10) e = Example(2, "test", 10) f = Example(1, "test", 10) list_of_objects.append(a) list_of_objects.append(b) list_of_objects.append(c) list_of_objects.append(d) list_of_objects.append(e) list_of_objects.append(f)  Then, I need to take this list in a sort function that creates a new sorted list. This new list needs to only be sorted by the values of the first member variable (e.g. self.number). After this, it should print the sorted objects and each of their member variables like so.  0:test:10  1:test:10  2:test:10  5:test:11  16:test:10  28:test:10


I'm building an application that can accept a shapefile/mapinfo/feature class/spatialite table/etc.  So - various formats from various vendors/organizations.    So let's say the user is going through a wizard to import data (or visualizing that data in plan view)...is there generic term for spatial data?  Something that a typical user would understand that would differentiate it from a text file or standard table?  This isn't a GIS product - it just makes use of GIS data.  It is not limited to use in one area of the world.  Anyone have any experience with lowest common denominator terminology for beginner/intermediate users (advanced users would just figure it out I suppose)?  What is most obvious?   Spatial data?    Spatial file?   Geospatial data/file?    Geographic data/file/table?    Data with one weird column/file that I can't understand?


Time Machine system recovery alternative for linux

Does a Linux alternative to Time Machine (macOS) exist? I'm looking for  that lets you restore the system completely. Can programs like  or  do that?


"Timed Out" error when trying to join server

I can join the server and sometimes the map would load for the server but i would just fall through the map and it would dissconect me and say timed out, any solutions?


Things you've believed for a long time were true, but are false in reality

Do you have any things (mathematical statements, statements about mathematics) you've believed for a long time were true, but now with enough mathematical knowledge you realize were wrong? For example, my high school teacher used to tell the class that all there is to discover in math has already been discovered. Obviously, now, thinking about her statement makes me laugh out loud. What stories do you have?


Complete Induction $n\ge2$ is equal to a product of prime numbers.

Prove by complete induction that any natural number $n\ge2$ is equal to a product of prime numbers.


"On" is optional with time expressions, no?

I say "I don't have any events June 1st" and "I don't have any events on June 1st" are both acceptable grammatically. The rest of the group, which includes a couple people calling themselves linguists, says only the second is correct, i.e. you can't drop the preposition. What do authorities say on this?


How to pretend as if a package is installed apt dpkg

I'm asking a solution for general case, but specific one may work either. I have installed oracle jdk, used update-java-alternative to make that default and uninstalled openjdk that came with my distribution. Now when I install a package that depends on jre/java, it installs openjdk-jre again. So one possible solution is to keep that openjdk installed. I am asking if there exists another, ie to pretend that openjdk-jre is installed, while in truth it's not. I seek for solution that would stand any update, which in the first solution is not possible (default jre world be set to openjdk one after update). Any standard way for debian is preferred to some hacky way to edit apt list files.


Pearson's or Spearman's correlation with non-normal data

I get this question frequently enough in my statistics consulting work, that I thought I'd post it here. I have an answer, which is posted below, but I was keen to hear what others have to say.  Question: If you have two variables that are not normally distributed, should you use Spearman's rho for the correlation?


jQuery .load to bring data is working only the first time

I am trying to load more data from a database with a jQuery .load, and it works perfectly, but after the first load, it ist'n bringing more data. Also, for bringing the first content, which is brought on the first page load, i use a PHP foreach() loop, like this as a basic example:
     <?php foreach($products as $product): ?>
           <?php echo $product['name']; ?>
     <?php endforeach; ?>
  I am trying to load more data from my database on scroll, so the user don't have to click on a button. I am loading information from my database based on the method of  question, like this: $(window).scroll(function() {     if($(window).scrollTop() == $(document).height() - $(window).height()) {         //do an ajax call     } });  But as I don't know how to do the ajax call mentioned on the answer above I found, I decided to use a jquery .load passing also some POST method variables, which in this case would be productNewCount. First I set its value to 6, and when user reaches bottom of page, we sum plus six to its value, like this: $(window).scroll(function() {     var productCount = 6;      if($(window).scrollTop() == $(document).height() - $(window).height()) {         productCount = productCount + 6;          $(".grid-products").load("load-products.php", {             productNewCount: productCount         });     } });  This works great on first load, and so when this is executed, it loads on the
 the load-products.php file. Here, the variable $connection is calling my function to connect to the database, don't give too much importance to it. This is load-products.php: <?php   $connection = connect();  $product_new_count = $_POST['productNewCount'];  $sentence = $connection->prepare("     SELECT * FROM all_products ORDER BY date DESC LIMIT $product_new_count "); $sentence->execute();  $products = $sentence;  ?>  <?php foreach($products as $product): ?>
         <?php echo $product['name']; ?>
 <?php endforeach; ?>  In the sentence, we are calling to bring all the rows from the all_products table ordered through its date column, and limiting to bring only the rows product_new_count says, which its value is the productCount JS variable we brought on the main file, before its load. I made sure there are still rows available to bring, so the reason why other rows arent being shown after first load isn't because there are no rows left. Also, terminal isnt showing any errors or warnings and there is also still available space to make scroll so the function can be called. Can I bring more data through this .load method or should I use the AJAX call mentioned on the answer I found? If so how?


Ubuntu 13.10 disable bluetooth at startup

what is a easy way to disable blue-tooth at start up with Ubuntu 13.10.


Getting a PhD in Classics/Ancient History with an MA in Modern Lit

I'm getting an MA in Italian Literature but, writing my thesis on contemporary fiction, I realized that it's not really what I want to specialize in. I would like to switch to Classics/Ancient History. Do you think it is possible to get a PhD with my background? Or should I get a second MA in the new field? One third of my undergraduate studies were in Classics (both Latin and Greek), but it's been a couple of years since I looked at that stuff from an academic point of view, and my Greek is a little rusty. I know what my broad area of interest is, but I still need to check the academic literature in the field. It's hard to ask advice to my current professors, since none of them is a classicist. Thank you in advance. (PS. I'm from Italy: we start studying Latin and Greek when we're in high school. I'm getting a degree here but I'd love to move to the US for the PhD.)


Existence of $\xi$ and $\eta$ such that $f'(\xi)+f'(\eta)=\xi+\eta$

Let $f$ be continuous on $[0,1]$, differentiable in $(0,1)$. Assume futher that $f(0)=0$, $f(1)=1/2$. Show that there exist $\xi,\eta\in (0,1)$ such that  $f(\xi)+f'(\eta)=\xi+\eta$.  I saw this problem in a draft. I do not know whether it is true. Up to now, I have not find a counterexample.  My idea is as follows: $f(\xi)-\xi=\eta-f'(\eta)$.  Let $F(x)=f(x)-x$, then $F(0)=0, F(1)=-1/2$, so $f(\xi)-\xi$ can be chosen to be arbitrary $a\in (-1/2,0)$. The strategy is then to find $\eta$ such $a=\eta-f'(\eta)$. Roll's theorem may be applied. However, letting $G(x)=ax-x^2/2+f(x)$, then $G(0)=0$, $G(1)=a$. This fact does not verify that of Roll.  So how can I get across the difficulties?     If we change $f(\xi)+f'(\eta)=\xi+\eta$ to be $f'(\xi)+f'(\eta)=\xi+\eta$ for some $\xi,\eta\in (0,1), \xi\neq \eta$. Can we prove it?


Back some versions ago, when I wanted to restart, stop, start a sevice i would do something similar to this:  sudo /etc/init.d/apache2 stop to stop the apache service sudo /etc/init.d/networking start to start the networking service  Etc...  But now it has changed. How can I start, stop, restart any service in the latest Ubuntu with the new way.


Windows 10/ Ubuntu dual boot suddenly doesn't give option to boot into ububtu

I have a dual-booted pc with windows 10 and ubuntu 14.04, which has been working just fine for a few months now. I noticed yesterday, however, that now when I restart my computer it boots straight to windows without showing me the grub menu. Secure boot is still disabled. I don't know if this is related to a windows update or what, but help in resolving the issue would be most welcome.


I am getting the black screen in startup

I am using Ubuntu 12.04 LTS. Actually I upgraded my system from 11.10 to 12.04 using terminal. At first it works fine after some days, I am getting the black screen while starting the system. I am able to login after 4 to 5 times of rebooting every day. Some times it takes 10 times to login. I think this is because of me running a wrong command on the system  and i tried other answers in askubuntu.com it doesn't worked for me.  what am I supposed to do? Please do let me know  this is a ubuntu system and not booted with any cd and upgraded my Ubuntu version using terminal.


In the , the sorcerous origin "Phoenix Sorcery" is introduced. I didn't find an entry for the phoenix in the Monster Manual or Volo's Guide; I heard there is a mention of that creature in the DMG, but couldn't find it. So, where is this creature mentioned exactly? (To be clear: I know what a phoenix, as a fabled creature, is, I just am not sure what a phoenix is in D&D 5e).


How to auto-update function based on background color

I've been referencing  to help me calculate the sum of cells based on their background color in Google Sheets. From the comments and some other research it appears that changing the color doesn't trigger a change in the cell. This causes my function to never update.  Does anyone know a way to force my sum function to update when just the background color of a cell in my range changes? I've tried changing the update settings under "spreadsheet settings" already, that doesn't work.


I'm trying to get more familiar with $E(XY) = E(X)E(Y)$, and all examples that I have come across seems to satisfy this expression. My question then is, if there exist an example of two random variables $X$ and $Y$ for which $E(XY) \neq E(X)E(Y)$?  I am looking for an example using a joint probability distribution table.  Thank you.


If $\sum_{x \in X} f(x) < {\infty}$ then the set $\{x | f(x) \neq 0 \}$ is countable

Let $f:X \to R$ with $f(x) \ge 0$ for $x \in X$. Show that if $\sum_{x \in X} f(x) < {\infty}$ then the set $\{x / f(x) \neq 0 \}$ is countable  Could anyone help me to show this?


Introduction to Analysis: Multiplication Theorem for Series

I've been stuck on this problem over the weekend so I decided to ask for some direction. The problem reads:  "The multiplication theorem for series requires that the two series be absolutely convergent; if this condition is not met, their product may be divergent. Show that the series $\sum_0^∞ \frac{(-1)^i}{\sqrt{1 + i}}$ gives an example: it is conditionally convergent, but its product with itself is divergent. (Estimate the size of the odd terms $c_{2n+1}$ in the product.)"  Someone earlier suggest I show the Cauchy product and show that it diverges. If I understand correctly, the two series must converge absolutely. If I can show that two do not converge, then  I have shown what the problem ask for.   So I tried and had this in mind. I reckon the prove is not correct because I do not fully understand how to prove Cauchy product, but it's an idea.   Consider $a_n$ = $(-1)^n$, $b_n = \frac{1}{\sqrt{n+1}}$. The sum of their product, $C_n$ = $\sum_0^{\infty} c_i$ = $\sum_0^{\infty}\frac{(-1)^i}{\sqrt{1 + i}}$ conditional converges. Thus $\forall$$\epsilon$ > 0, $\exists$N s.t. n, m $\geq$ N $\rightarrow$ |$\sum_n^m c_i$| < $\epsilon$.    We assume without loss of generality that the series of $a_n$ and the series of $b_n$ does not converge absolutely.   |$\sum_0^{\infty} (-1)^i$| $\leq$ $\sum_0^{\infty} |(-1)^i|$ $\leq$ $\sum_0^{\infty} 1^i$  As n approaches infinity, the $\sum_0^{\infty} 1^i$ = $1 + 1 + ... + 1 = \infty$, thus diverging.   |$\sum_0^{\infty} \frac{1}{\sqrt{i+1}}$| = $\sum_0^{\infty} |\frac{1}{\sqrt{i+1}}|$ = $\sum_0^{\infty} \frac{1}{\sqrt{i+1}}$.   As n approaches infinity, the $\sum_0^{\infty} \frac{1}{\sqrt{i+1}}$ = $\infty$, thus diverging.   So I understand the idea, I just don't know how to go about finishing up the proof using cauchy.   Thank you for taking the time to read this and thanks in advance for commenting.


dimensional analysis of the Shannon-Hartley theorem

In the infamous  the bandwidth of the channel is measured in Hz (Hertz) but the channel capacity is measured in bps (bits per second). So, either I'm missing something obvious or there's a dimensional mismatch in the equation.. Can somebody please help me understand?


Is it possible for test error to be lower than training error

Is it possible to have test error lower than training error?  I have a classification problem with 2000 samples, 500 of which are positives, 1500 are negatives. I split my data into 70% training data, 30% test data.  Run random forest with 200 estimators and cv=10. I did this several times and compared the recall and precision score and notice the scores for my test set is significantly better. Is this possible?


Even after I heat and oil, why does food stick to my stainless steel pan?

I've had this pan for 8 years. It's low priced and average — I see no brands or names on it — not even on the bottom!  I followed   So here’s the crazy thing: stainless steel pans can be nonstick, if you’re doing it right. If you heat up your pan with oil or butter until it’s hot enough  then add your food, things will not stick. Stainless steel pans can withstand really high temperatures, so you can sear and brown things like meat in them, and you can also add water to the pan to deglaze the brown bits from the bottom and create a delicious sauce.  and   You can season a stainless steel pan and make it more or less nonstick. Here's how: Heat a stainless steel skillet over medium or medium-high for 2 minutes. Add enough vegetable oil to coat the entire bottom of the pan with a ⅛ inch of oil. Heat the oil until wisps of smoking begin to appear, about 6 minutes. When the oil begins to smoke, remove the skillet from the heat and cool the oil completely. Once the pan has cooled, pour out the excess oil and wipe up the remaining oil in the skillet using a paper towel. You want a glossy sheen left in the base of the pan—that's your nonstick surface.  Question 1 Please see pictures below. Please approve my pictures?  Can you confirm  if this is stainless steel? Question 2 If it is, then why does food stick to it? I tried to — separately — home fry potatoes, stir fry rice, boil pasta with filtered water. The potatoes rice, pasta all stuck to the bottom of the pan! I thought that all stainless steel pans were non stick? Was I wrong? Do some stainless steel pans stick? If so, how can I deduce which stainless steel pans are non stick? I'm thinking of buying a new brand name, high quality NON STICK stainless steel pan!


Sorting a HashMap based on Custom Value (in my e.g. it's a Class Called DATA)

Is there a way to sort this on the frequency (Descending/Ascending)?  public static void main(String[] args) { Map <String, Data> map = new HashMap <String, Data>();  String [] variables={"variable1", "variable2", "variable3", "variable4", "variable4", "variable1","variable1"}; int Concreteness=5;//for this example every variable will have the same cncreteness  for(int i=0; i<variables.length;i++) {     Data variable_exists=map.get(variables[i]);      if(variable_exists!=null)     variable_exists.setFrecuency(variable_exists.getFrecuency()+1);     else     map.put(variables[i], new Data(Concreteness,1));  }  for (Map.Entry<String, Data> entry : map.entrySet())  { System.out.println("variable = " + entry.getKey() + ", Frecuency = " + entry.getValue().getFrecuency()+ ", Concreteness = " + entry.getValue().getConcreteness()); } }   the output for this example would be   variable = variable4, Frecuency = 2, Concreteness = 5  variable = variable1, Frecuency = 3, Concreteness = 5  variable = variable2, Frecuency = 1, Concreteness = 5  variable = variable3, Frecuency = 1, Concreteness = 5  and here is the Data class i used  public class Data {     private int frecuency;     private int Concreteness;      Data (int Concreteness, int frecuency)     {     setFrecuency(frecuency);     setConcreteness(Concreteness);     }     public int getFrecuency()     {     return frecuency;     }      public void setFrecuency(int frecuenxy)     {     this.frecuency = frecuenxy;     }      public int getConcreteness()     {     return Concreteness;     }      public void setConcreteness(int Concreteness)     {     this.Concreteness = Concreteness;     } }


How to read/change SELinux context on mounted ext4 image from non-SELinux system?

I have a Linux system (Arch Linux) without SELinux support. I would not like to configure such support on my system. Now, I have an ext4 volume image which is known to have some SELinux context set on its files. I need to read and change that context for certain files. When I mount this image and ls -lZ it, I get a ? instead of context.  How do I access & change SELinux context on files if I don't have SELinux enabled systemwide? If this is impossible, then which is minimal SELinux configuration which will not influence overall system but will allow me to change contexts within a mounted image?


Can you explain this code and why we are passing the value of month decreasing it by one

Can you Explain this java-Calendar code  Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.MONTH, month-1);  Why we are passing the value of month decreasing it by one  calendar.set(Calendar.DAY_OF_MONTH, day); calendar.set(Calendar.YEAR, year); return calendar.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.LONG, Locale.US).toUpperCase();


A lot of reference is available for this question but I couldn't understand the difference.  That when to use congratulate on and when to use congratulate for.


so i have been experimenting A LOT with blender but this has got me stumped. I'm trying to make this character open his mouth very far (to his legs) and im wondering what the best way to go about this while also keeping the Lips and the body separate from each other. Any help i would very much appreciate.


Which Linux Distros is best for intel core 2 duo processor ram 2 gb

I will be installing  linux in my system which is very  old system and i will use it for casual work and basic programming  . Configuration:  processor Intel core 2 duo E7400 2.80 GH; Ram 2 GB ; Disk 500 GB;  I am already using ubuntu disco 19 in my laptop .So i want to try something new , lite and faster os  . I will remove windows completely and install linux. Suggest OS that work fast in this conguration and do not freeze up.  Do give some best suggestion of any linux distros apart from ubuntu 19


Am I allowed to go to the airport to catch a flight if I am supposed to self-quarantine in California, United States?

I read on :  Passengers who have been in Austria, Belgium, Brazil, China (People's Rep.), Czechia, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Iceland, Iran, Ireland (Rep.), Italy, Latvia, Liechtenstein, Lithuania, Luxembourg, Malta, Netherlands, Norway, Poland, Portugal, Slovakia, Slovenia, Spain, Sweden, Switzerland or United Kingdom (excluding overseas territories outside of Europe) in the past 14 days but are exempt from the restriction to enter the USA, must self-quarantine for 14 days once they reach their final destination.  I am in the United States (California) and must self-quarantine. Am I allowed to go to the airport to catch a flight? I am interested in both domestic and international flights.   Downvoters: the question is perfectly on-topic and the answer is not straightforward as you can see in the  and comment. E.g. . Close voters: 1) This is a problem I face. 2) I don't wish to disclose the reason for travel and subsequently I am interested to know in the general case, and not for a specific travel reason. 3) Opinion-based close voter: That's a purely factual question right here. Officials typically follow guidelines/regulations.


What actually led Feynman to the Path Integral?

It is commonly known that Feynman's  was inspired by Dirac's observation that the kernel is proportional to $\exp{\dfrac{i}{\hbar} S}$. It was Feynman, however, who had the idea of expressing the kernel as the integral of such an expression over all possible paths.  Is it known what led Feynman to try out this idea of an integral over all paths? He provides motivation from a probabilistic understanding of quantum mechanics in "Non-relativistic Quantum Mechanics" and Quantum Mechanics and Path Integrals, but is this motivation what actually led him to try out the idea of the path integral and discover that up to suitable normalization, it recovered the correct expression for the kernel and the Schrodinger equation?  Moreover, why was Dirac's observation of the proportionality of the final answer to $\exp{\dfrac{i}{\hbar} S}$ insufficient as the basis for an alternative formulation of quantum mechanics?


Find $\sum\frac{a(n)}{n(n+1)}$, where $a(n)$ --- number of 1's in binary expansion of n.

Let $a(n)$ is a , find the sum $$ \sum\limits_{n=1}^{\infty}\frac{a(n)}{n(n+1)}. $$


The following MWE:  \documentclass{article}  \usepackage{amsmath}  \begin{document}  \[ \begin{split} a &= b \\ c &= d \end{split} \]  \end{document}   compiles fine with pdflatex, but when I run make4ht on it, I get the following error:  ! Package amsmath Error: \begin{split} won't work here.  See the amsmath package documentation for explanation. Type  H <return>  for immediate help.  ...                                                l.7 \[ \begin{split} a &= b \\ c &= d \end{split}                                                   \]   Is this an incompatibility of tex4ht? Is there an easy way to deal with this? I could just use align* in this instance, but there is a reason that I want to use split instead.


Convergence of series involving in iterated logarithms $\sum \frac{1}{n(\log n)^{\alpha_1}\cdots (\log^k(n))^{\alpha_k} }$

What is the quickest way to show when  $$ S(\alpha_1,\alpha_2,\cdots,\alpha_k) = \sum\limits_{n=3}^\infty  \frac{1}{n (\log n)^{\alpha_1}\cdots (\log^k(n))^{\alpha_k}} $$  converges, where $\log^k(n)$ is the $k$-th iteration of natural logarithm?


Required Windows installer for "Geoserver 2.15.2"

Checking latest version of GeoServer 2.15.2 & found that Windows installer is not available  However "war" file option is available ,also downloaded "Platform Independent Binary" but it looks like pure Windows installer is not available as of now OR changed their deployment strategy for Windows not sure.  Does anyone know?


Apps gone missing after rebooting on jailbroken iPad 4

After school, I was doing research on Canadian Blood Service. I went into pages and than it got stuck. I wait for 3 minutes nothing happened so I hold the lock button and try to shut my iPad down but nothing works, I was listening to music at the same time and the music is still playing. I has to do a hard reset by holding home button and lock button. After the reset I found out that every single app has gone missing except for the Stock apps which comes with the phone, and my jailbreaking app suck as Cydia ifile, IAP Free and etc. I reboot many times but nothing happened. The apps are still taking up the storage but I can't see them in usage not search. Does anyone have any idea? I urgently needs help.   Thanks. and here's my iPad's info: iPad 4 White Wi-Fi 32 GB, jailbroken with Evasion 7 IOS 7.0.4 system.


How to play live microphone sound over speakers?

Is there a way I could enable live playback from microphone? It could use at karaoke or as a guitar amplifier.


I am looking for software to draw graphs with edges and nodes, show colorings, etc. Where can I find such software?


I'm a little confused, what is the difference between Stack Overflow and this (Stack Exchange)?  I ask because I asked a question (thinking it was the right place) and I was wrong.  (A little more of a description somewhere would be nice on the site, or maybe I'm and idiot and missed it :) )


Can't switch back to Classic Gmail and I hate it

I also have two Gmail accounts, I opened both on Google Chrome. One has the option for "Go back to classic Gmail" in setting button. But another account, automatically changed to "New version of Gmail" today, and there is NO OPTION for "Go back to classic Gmail" in this setting button.  I visited this , but no solution found.  Since I hate this new version, can we/I move to the classic version of Gmail?     If possible, could you please help me return to classic Gmail version.


An $n \times n$ matrix $M$ of integers has the property that $M_{ab} = M_{xy}$ iff $a+b=x+y$. How many distinct elements are there in $M$?


Why is $\langle x| x' \rangle=\delta(x-x')$?

I've tried to find any solution or proof for $$\langle x| x' \rangle=\delta(x-x'),$$ but I only came to this post:   So I got the information, that the vector $|x\rangle$ form a dirac-normalized basis for the Hilbert Space.   I know that the dirac-delta distribution is defined like this: $$\delta(x-x') = \begin{cases} 0 &\mbox{if } x\neq x' \\ \infty & \mbox{if } x=x' \end{cases},$$ this means that my x' is a point on my x axis where I have my infinite high peak. And also $$\int_{-\infty}^{\infty}dx\cdot \delta(x-x')=1.$$  But how actually correlate this with the scalar product of vectors x, x' in the Hilbert Space that form a so-called 'diracl-normailzed" basis of it?  Can you give me some tips on this please? Or maybe you actually know a link, where this is explained.


Is it safe to ssh to a compromised server?

I have a compromised server, I want to know if I ssh to that , then the malware can also compromise my local machine (transfer a file to it and ...) or not?


Refused to login into iOS app using Google auth

Download the Stack Exchange app from the App Store. Run it and login with Google. Enter email and password for the Google account. Successfuly login into Google. Jump back to Stack Exchange app. Get this error message:    Notice I tried to:   Reinstall the app. iPhone restart. Clear app data.


Who fired the shot and what is the symbolism in firing shot right next to Lucas at the end of the movie?

At the end of , during the deer hunt, there’s a shot fired right next to Lucas (deliberately missing the shot).   Who fired the shot? Is it Theo's son? What is the meaning of that scene? Is someone warning Lucas that he made a mistake and definitely, Lucas will be punished in the future?


Preview fails to open pdf with "The file couldn't be opened because you don't have permissions to view it". but I have these permissions

I've seen this earlier but never got time to bother looking closely into the problem. So when I open a pdf file I created (long time ago, though in 2014). I see this error message from Preview:    But it's a lie, because of two things:  First, it's Get Info dialog:    Where one can clearly see the Permissions section, where it says Read & Write for peetonn (Me).  And who am I?  $ whoami peetonn   Second, it's ls -Al@ output:  $ ls -l@ . total 19936 -rw-r--r--@ 1 peetonn  staff   5.0M Dec 22 15:21 window.pdf    com.apple.metadata:_kMDItemUserTags    42B     com.apple.quarantine   22B   Could it be that these Apple's extended file attributes did something nasty? How do I fix that? Btw, if I hit Space for previewing the file, I can read it...   macOS 10.12.6


Our 8 year old son saw my wife and I having sex the other day. Now I don't see anything wrong with it, yet my wife is unsure. What should happen here?


How can I make sed not append a newline character?

How can I make sed not append a newline character to an input stream that was missing one? If I can't, what's the quickest way to remove a newline character from a variable?  A code sample was requested in the comments, so here you go. Imagine a .csv file that has no newline at the end. Pipe it into a script.   Then inside that script:  function foobarize() {     sed \     -e "s|foo|bar|g" \     $1 }  INPUT=`tee` printf "$INPUT" | foobarize   If the input has no newline at the end, foobarize will add a newline to it 100% of the time.


Recurrence  for number of regions formed by diagonals of a convex polygon.

I've been having trouble with this particular problem, been thinking for it for a good hour or two, but I haven't gotten an explanation to the following question.  Suppose $a_n$ be the number of regions into which a convex polygonal region with $n+2$ sides is divided by its diagonals, assuming no three diagonals have a common point. Define $a_0 = 0$. Show that   $$a_n = a_{n-1} + {n+1 \choose 3} + n \quad (n \geq 1)$$  So far, I have that for $n \geq 1$, we look at an $(n+2)$-gon. Pick an edge from one of the $n+2$ edges from the $(n+2)$-gon. Then adjoin a triangle to it, so we can have an $(n+3)$-gon. Given the triangle that we adjoin to the $(n+2)$-gon, let's look at the exposed vertex of that triangle. We can create $n$ diagonals, since we can't create a diagonal by joining the exposed vertex to an adjacent vertex. So now, we have that $n$ diagonals run through the edge created by the intersection of the $(n+2)$-gon and the triangle. This gives us $n+1$ regions in the triangle. But now, I can't seem to find a pattern to why the $(n+2)$-gon has ${n+1 \choose 3}$ extra regions that is as a result of those $n$ diagonals traversing through the $(n+2)$-gon. Any tip or hint would be appreciated.


Existence of compact/complete metric on countable set

Let, $X$ be a countable set. Which of the following are true?   There exists metric $d$ on $X$ so that $(X,d)$ is complete. There exists metric $d$ on $X$ so that $(X,d)$ is not complete. There exists metric $d$ on $X$ so that $(X,d)$ is compact. There exists metric $d$ on $X$ so that $(X,d)$ is not compact.   4 is true as we can take discrete metric. Then $\{\{x\}:x \in X\}$ is an open cover containing no finite subcover.  If there exists a compact metric then it would automatically become complete also. Hence if 3 is true, so is 1.  What about 2? Any other comment?


I want to create a simple road. To do this I first want to apply an 'Array Modifier' which fits the curve. So in the Array modifier I changed the 'Fit Type' from 'Fixed Count' to 'Fit Curve'. But now the Path is much shorter than the road it self.  And If I extrude the curve the road goes even longer and longer. Is there a way the road is as long as the path?


Failing string comparison for command-line interaction

I've been trying to build a function to interpret command-line inputs, then runs the appropriate function from within the script file with provided arguments. Included in this function is a escape command that closes the interaction layer. This escape command should only be activated if the user enters either 'exit' or 'end'. However, for some reason, it triggers no matter what is entered. I'm stumped. Do any of you have an idea?  verinfo () x = True while x is True:     print ('Please seperate arguments with a comma.')     inputstring = input('->')     #format input string to a standard configuration     #expected is command,arg1,arg2,arg3,arg4,arg5     procstring = inputstring.split (',')     while len(procstring) < 6:         procstring.append('')         print (procstring)     #escape clause     print (procstring[0])     if procstring[0] is 'end' or 'exit':         print ('Closing')         x = False         break     elif procstring[0] is 'help' or 'Help':         Help ()      else:         print ('command invalid. List of commands can be accessed with "help"')


I'm getting these errors ramdomly, and I don't know if its normal or not.   [39441.061856] ata3.00: failed to read SCR 1 (Emask=0x40) [39441.061866] ata3.01: failed to read SCR 1 (Emask=0x40) [39441.061892] ata3.15: exception Emask 0x10 SAct 0x0 SErr 0x280100 action 0x6 frozen [39441.061897] ata3.15: irq_stat 0x08000000, interface fatal error [39441.061904] ata3.15: SError: { UnrecovData 10B8B BadCRC } [39441.061910] ata3.00: exception Emask 0x100 SAct 0x0 SErr 0x0 action 0x6 frozen [39441.061917] ata3.01: exception Emask 0x100 SAct 0xe SErr 0x0 action 0x6 frozen [39441.061923] ata3.01: failed command: READ FPDMA QUEUED [39441.061933] ata3.01: cmd 60/a8:08:b0:48:62/00:00:00:00:00/40 tag 1 ncq 86016 in [39441.061940] ata3.01: status: { DRDY } [39441.061944] ata3.01: failed command: READ FPDMA QUEUED [39441.061953] ata3.01: cmd 60/a8:10:b0:49:62/00:00:00:00:00/40 tag 2 ncq 86016 in [39441.061959] ata3.01: status: { DRDY } [39441.061963] ata3.01: failed command: READ FPDMA QUEUED [39441.061972] ata3.01: cmd 60/58:18:58:4a:62/00:00:00:00:00/40 tag 3 ncq 45056 in [39441.061978] ata3.01: status: { DRDY } [39441.061987] ata3.15: hard resetting link [39441.608302] ata3.15: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [39441.609090] ata3.00: hard resetting link [39441.929246] ata3.00: SATA link up 3.0 Gbps (SStatus 123 SControl 320) [39441.929333] ata3.01: hard resetting link [39442.249184] ata3.01: SATA link up 3.0 Gbps (SStatus 123 SControl 320) [39442.263242] ata3.00: configured for UDMA/133 [39442.277570] ata3.01: configured for UDMA/133 [39442.277725] ata3: EH complete   I'm also pasting smartctl -a for ,  and .  Thanks in advance for your help.


Q1. Are those 8 sentences grammatical ones? or if not could you tell me? Q2. Why do we use 1 instead of 3?  It seems both are similar but is there any meaning difference or any purpose?   I love it that he will resign. I love it he will resign. I love that he will resign. I love he will resign. Rumor had it that he will resign. Rumor had it he will resign. Rumor had he will resign. Rumor had that he will resign.   With the verb love, for me as second language learner, sentence (1) can be paraphrased as I love the situation(=the fact) that he will resign. While, when it comes to the verb had, the sentence, Rumor had the situation(=the fact) that he will resign., sounds bad.


PHP Fatal Error during INSERT doing a PDO

I'm stumped. When I do the following query exactly as shown, I get an error:      function update_rater($rater_result) {     $pdo = new PDO('mysql:host='.DB_SERVER.'; dbname='.DB_NAME, DB_USER, DB_PASS);     $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);     $pdo->exec('SET NAMES "utf8"');      foreach ($rater_result as $update)     {         $sample[] = array (                 'name'=>$rater_result['name'],                 'rating'=>$rater_result['rating'],                 'hits'=>$rater_result['hits'],                 'parkid'=>$rater_result['parkid'],                 'logname'=>$rater_result['logname'],                 'uname' =>$rater_result['uname']);     }     $id = $update['parkid'];         $parkid = $update['parkid'];         $rating = $update['rating'];         $hits = 1;         $uname = $update['uname'];      $sql = "INSERT INTO stars (parkid, rating, hits, logname)         VALUES ($parkid, $rating, $hits, $uname)";                    $result = $pdo->query($sql); }      Fatal error: Uncaught exception 'PDOException' with message   'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an   error in your SQL syntax; check the manual that corresponds to your   MySQL server version for the right syntax to use near ')' at line 2'   in /home/ride4w5/public_html/test_site/includes/functions.php:343   Stack trace: #0   /home/ride4w5/public_html/test_site/includes/functions.php(343):   PDO->query('INSERT INTO sta...') #1   /home/ride4w5/public_html/test_site/includes/rater/1.php(62):   update_rater(Array) #2 {main} thrown in   /home/ride4w5/public_html/test_site/includes/functions.php on line 343   However, if I do EXACTLY the same query, but change the final VALUE to either a string or a number, it works just fine. Any variable throws the error. Why is the error being thrown only for a variable and not for a value? The other variables don't cause any problem.  EDIT:   It is not ANY variable, it is just $uname that causes the problem. But if I do an   echo $uname;  exit();    it echos the variable properly. What does it not like?   Edit:  $uname comes from   $user->session_begin();  $auth->acl($user->data);  $user->setup();  $request->enable_super_globals();  $username = $user->data['username'];  $uname = $username;


what is the equivalent in Javascript of this Python code?

Here is a python code, I want to translate it to javascript, any help?  result = list() ... if not string in result:    result.append(string)   Thanks!


Is the word 'mistake' a concrete or abstract noun?

According to :  The word mistake is an abstract noun, a word for an error in action or judgement.  Is this correct? Then, why does it act like concrete nouns such as 'car' when it comes to countability? Both 'mistake' and 'car' are countable, unless they follow "by".  a. I made three mistakes today. vs. I went there by mistake. b. I saw three cars today. vs. I went there by car.  Does this prove that 'mistake' is also a concrete noun? Or is 'mistake' still an abstract noun, despite this similarity in countability?


font-not-found error: font "HoeflerText" cannot be found -- LuaLaTex error!

I am running this CV/Resume example from :   Here is a relevant fraction of the code:  \documentclass[10pt]{article} %!TEX encoding =  UTF-16 % See geometry.pdf to learn the layout options. There are lots. \usepackage[hmargin=1.25cm, vmargin=1.5cm]{geometry} %symbols - the ones you see on the left of the email and of the phone \usepackage{bbding} \usepackage{amssymb} \usepackage{eurosym} %Colors/Graphics \usepackage{color,graphicx} \usepackage[usenames,dvipsnames]{xcolor}  %Fonts and Tweaks for XeLaTeX \usepackage{fontspec,xltxtra,xunicode} \defaultfontfeatures{Mapping=tex-text} \setromanfont[Mapping=tex-text]{Hoefler Text} ...   So... when compiling with LuaLaTeX (part of MiKTeX on Windwos XP x64), I am getting the following error:  ... luaotfload | Font names database loaded: C:/Documents and Settings/Ampleforth/L ocal Settings/Application Data/MiKTeX/2.9/luatex-cache/generic/names/otfl-names .lua luaotfload | Updating the font names database: luaotfload | Scanning TEXMF and OS fonts... luaotfload | Font names database saved: %s  : C:/Documents and Settings/Ampleforth/Local Settings/Application Data/MiKTeX/2 .9/luatex-cache/generic/names/otfl-names.lua  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !  ! fontspec error: "font-not-found" !  ! The font "HoeflerText" cannot be found. !  ! See the fontspec documentation for further information. ! For immediate help type H <return>. !...............................................    l.28 \setromanfont[Mapping=tex-text]{Hoefler Text}   What is wrong? How can I install this font so LuaLaTeX is picking it up? Where to download? Any other thoughts about this?


How make a good calculator with floating point arithmetic

Here is how my calculator should work:  There is a JSON value where I can write the first multiplier - something like this:  {     "value1": 1.4 }   On the calculator I can write the second multiplier - only 10^n numbers (10, 100, ..., 10000000). And my calc should return me an integer, as I know that always people who use my calc with write less numbers after the decimal point for the first multiplier than we have 0s on the calc for the second multiplier. Yes, my calc is a very-very strange one.  Here are valid inputs:  v1=1.4; v2=100; v1=1.414; v2=100000; v1=1.1; v2=100;   What happens when I do this, for example for value1=1.4 and value2=10000 I get 13900. As far as float cannot hold any number sometimes it stores different numbers. For 1.4 internally it stores 1.399999 on my machine. I know why, but you know the QA engineer who tests my app tells me that I need to get 14000. Your calc does not work. How to make my calc so that I will print correct number?   P.S. Of course I have cut out my real problem from the context but the thing is that I have a float in a file and a 10^n number in my program as a user input. How to get correct result?  EDIT1: I don't ask why float works that way. I know why. I ask how to solve the problem even when float works that way.  EDIT2: I use RapidJson to read the JSON file which already returns me  wrong number as a double precision number. I can't use libraries that provide with higher precision floating points.


"Real": adjective or adverb? "Real" or "really" as an adverb?

According to Oxford Learner's Dictionary:     real adverb      (North American English, Scottish English, informal) very          That tastes real good.   He's a real nice guy.   I'm real sorry.      So, is it correct to use "really" instead of "real" in the examples above?  Now, let's put some other examples:     a. It's a real small town      b. It's a really small town      c. It's really a small town   Are all these three correct? Do they mean the same?


Why are these two descriptions of real n-dimensional projective space  the same?

I saw this in Basic Topology by M.A.Armstrong. It gives three descriptions of real n-dimensional  projective space $P^n$. Two of them are:  (a) Begin with the unit sphere $S^n$ in $E^{n+1}$ and identify its antipodal points.  (c) Begin with the unit ball $B^n$ and identify antipodal points of its boundary sphere.  I find it hard to imagine why these two descriptions lead to the same space.  Can you please help? Thank you.


Human visits aliens with advanced hearing and culture with heavy emphasis on music

The human visitor can't appreciate their music and takes a drug which allows him to hear as the aliens can hear. The drug opens his appreciation to the beauty of the alien's music, but the drug wears off, having burned out the part of his brain that allowed the drug to work, leaving him crushed with the realization of what he is now missing.


If A is a $k\times k$ matrix,B is a $k\times l$ matrix and C is a $l\times l$ matrix prove that:  $\det{\begin{bmatrix}A&B\\O&C\end{bmatrix}}=\det(A)\det(C)$  O is the matrix that all it's elements are equal to zero.  I know some rules for calculating determinants but I don't know how to begin in this question.


How do I reset iPhone if hard reset (power + home) won't work

I have an iPhone that is frozen while browsing with Safari (it happens all the time). I am aware that holding down the power button with the home button for 10 seconds is supposed to reset the phone. It does not. I have held down for 60 sec or longer at least 10 times, to no avail.   What other options exist to force the phone to reboot, other than waiting for the power to exhaust itself completely after several hours?


Is stage.*.example.com valid for a wildcard DNS CNAME?

We are creating a web app that will have vanity subdomains such as user1.example.com. Since we'll have many subdomains, they need to be dynamic. We want to have a public "stage" area where we can test before going live. The requirement states that all dns names start with stage.  I'm using an AWS load balancer so I have to use a CNAME. Research on google and here tell me that wildcards are supported in DNS CNAME entries (except perhaps when using godaddy) but I haven't yet convinced myself that you can have a wildcard in the middle of an entry.  Is stage.*.example.com valid for a wildcard DNS CNAME and would it work as I'd expect?  Thanks!


Sense verbs (see and hear) used in the progressive form (specific contexts)

I have a question about sense verbs used in the progressive form, namely "hearing" and "seeing" in the contexts like the ones presented in the attached images (the underscored fragments). Is there any way to explain such a usage? I know that neither of them can be accounted for by the special meanings depicted in Swan's PEU or some dictionaries ("hearing things" - to hear sounds that are not real or "seeing someone" - to have an appointment). So, is it just an emphasis on the emotions of a speaker (surprise/disappointment) or the immediacy of an action? I presume that this usage is quite widespread because I've heard similar constructions in television serials/movies and I've seen them in other comics.


The probability of at least N positive outcomes where all experiments have different probabilities

Let's say we bet on 10 different soccer matches. The probability of our team winning, for each game, is 0.17, 0.78, 0.41, 0.79, 0.47, 0.08, 0.29, 0.30, 0.35, and 0.54. What is the probability of winning at least 3 of these bets?  I know how to deal with this problem when the probability of each event is the same (coin tosses etc), but get confused when they are different.