How to get current URL with JavaScript? I have this portion of the code. I want to know how can I read the url as the current page instead a fix url  Here is the portion of the coding:  var str='';       if(model_id != 0 ) str = model_id+"+";       if(year_id != 0 ) str +=year_id+"+";        url='http://store.ijdmtoy.com/SearchResults.asp?Search='+str; top.location.href=url;   You see currently it has a fix reading the url    For example, I am currently on   How can I change the code so it will automatically read as
Get current URL with jQuery? I am using jQuery. How do I get the path of the current URL and assign it to a variable?  Example URL:  http://localhost/menuname.de?foo=bar&amp;amp;number=0
I want to install Open JDK or Oracle JDK to my machine but I got an error during installation. The error is:  Selecting previously unselected package oracle-java8-installer. dpkg: warning: files list file for package 'unity-scope-gourmet' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'unity-scope-guayadeque' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'unity-scope-gmusicbrowser' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'unity-scope-manpages' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'unity-scope-firefoxbookmarks' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'unity-scope-gdrive' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'unity-scope-home' missing; assuming package has no files currently installed E: Sub-process /usr/bin/dpkg returned an error code (2)   I searched on Google and try to something for install/reinstall this packages. Finally i try to remove Unity. I faced this error for my every tries. I am using Xmonad. How can I fix this issue? Shells have a useful feature where pressing the keyboard UP arrow replaces the contents of the current command line with the previous command that was entered. (And if you do it again, the command before that, and so on.)  I would like a similar feature, where pressing (some other button) replaces the contents of the current command line with the last line of output from the previous command (and if you do it again, the previous line of output , and so on.)  Is there any shell that provides a feature like this?  The motivation is that you often want to run a command, and then run another command with part of the previous commands's output as input. (No, I don't want to do anything involving piping the output of one command into the next. I'm looking for an interactive experience, where you run the first command, see its output, and then get a line of that output into your next command, without having to reach for the mouse to do a clumsy copy-and-paste.) What can I do to give the players the same feel their characters would have about wilderness travel? I find that in a lot of our group's games, traveling long distances through wilderness is too easy.  In real life, it's quite arduous traveling overland.  No one who's just walked a hundred miles is eager to repeat the trip.  But here's the problem -- for the players, it's trivial to travel a long way.  You just say "then we walk over the Groblick Hills to Dorridge", and you get there.  The players find it easy, but there's no way the characters would be eager to set out on a long stretch across the wilderness.  What can I do to give the players the same feel their characters would have about wilderness travel?  One thing I'd like to avoid (if possible) is to just make it perilous by throwing in a bunch of fantasy monster encounters.  Imagine some hobbits off in Gondor -- sure, they'd love to go home to the Shire, but it's mighty tempting to stay an extra day in the inn before setting off on the journey. Saving Photoshop multilayer file to PDF without layers size difference Why is it that when I save a file that has many, many layers to a PDF without layers as a copy that the file size is larger than flattening the layers and then saving the file as a copy to PDF? 19Mb vs. 5Mb?? Wouldn't saving a file without layers be the same as flattening the layers and then saving the file?? Can anyone explain this? To my understanding, this is the default configuration of /etc/crontab:  # m h dom mon dow user  command 17 *    * * *   root    cd / &amp;&amp; run-parts --report /etc/cron.hourly 25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / &amp;&amp; run-parts --report /etc/cron.daily ) 47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / &amp;&amp; run-parts --report /etc/cron.weekly ) 52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / &amp;&amp; run-parts --report /etc/cron.monthly )   Why were these specific times chosen for the default entries?  At first I assumed that they are somewhat randomized on installation to even out the system load, but that doesn't seem to be correct. Every partially defined isometry can be extended to a isometry I know that the following theorem holds true:  Let $S$ be a subset of $\mathbb R^n$, and let $f:S\to \mathbb R^n$ a map such that $d(p,q)=d(f(p),f(q))$ for every $p,q \in S$ (here $d$ is the usual euclidean distance). Suppose that $0 \in S$ and $f(0)=0$. Then $f$ can be extended to an orthogonal transformation of $\mathbb R^n$.  I have two questions:   Can someone give me a reference of a proof of this theorem? I believe that the previous theorem holds true also if we change $\mathbb R^n$ with $\mathbb C^n$ and "orthogonal" with "unitary", with nearly the same proof. Does it holds true also in the $ \ell^2$ space? With the same proof? I am a first year Ph. D student, and I have been working on a new topic of research.  I worked day and night to prove something new and verified it. I began my Ph. D while my supervisor was on travel, but he returned before I had been here for long.  When he returned, he told me we have to stop and not continue without any reasonable reasons.  After a few months he began treating me poorly---always belittling and underestimating---although I got two grants from a top conference, made videos and podcasts, and constantly received praise for my good work and personality.    It seems that I have been treated as a competitor, not a collaborator.  Although agreeing with my approaches in private, my supervisor said false words to the committee to take the decision and stop my Ph. D work!  It is not surprising, as there was another former senior Ph. D student who I met on campus, who was not allowed to defend his Ph. D: this same supervisor claimed he was not able to finish his dissertation although he had published in a peer reviewed journal and having citation as well, it was scary and not familiar.  In front of committee, he lied, and said something without proving. I asked if he can make a detailed constructive criticism, but he could not.  All I can say that they are a gang literally, and he said words that show that he is jealous and doesn't want to see me having self confidence in my self. I know no one will believe me, but this is the truth.  Honestly, I am distressed and I'm losing sleep.  I had this dream where there were many people who saw me fail.  All things considered, I don't know whether what happened is good or bad, and I definitely don't know what I should do next!  I would be grateful for your advice and whether there is someone has encountered any similar situation. Which is correct?   Sheila and Angie are wearing the same shirt today.  Sheila and Angie are wearing the same shirts today. Sheila and Angie are wearing same shirts today. What are some good tips on how to extrude text in Adobe Illustrator? I'm bit of a newbie in Adobe Illustrator and have been learning the application by trying to follow some tutorials and recreating some cool stuff I come across on the web.   That being said, I'm having trouble replicating the effect found in the following image using the standard 'Extrude &amp; Bevel' options. I've also tried copying + pasting the text in front, back, in place and that came out even more horrendous. 'Extrude &amp; Bevel' gives me a nice approximation but nothing that pops out like in the example.   Any tips on how to fine tune my 'Extrude &amp; Bevel' settings or an entirely different method of achieving a similar effect would be very much appreciated. Thanks for your time and help!  How can I create a 3D effect on my text similar to the one in the following image, using Illustrator's Extrude and Bevel tools? Each Stack Exchange site should provide users the option of using a dark mode design/theme.  Why is this feature missing?  The major IDEs are already a letdown regarding dark color schemes. Is it possible to animate which characters of a text object are assigned to a material? Upon realizing it is a sarcophagus, he decides to sacrifice himself (I think by disconnecting his air) and exist in it for eternity along with the original creature. It may have been in an old Omni magazine, or some other periodical. I thought it may have been in the anthology "Dead Astronauts" but I did not find the story in there. How do I activate Dauntless Cathar's ability? has the following ability:     {1}{W}, Exile Dauntless Cathar from your graveyard: Put a 1/1 white Spirit creature token with flying onto the battlefield. Activate this ability only any time you could cast a sorcery.   Please clarify. If the card is IN my hand, how can I exile if FROM the graveyard if it is not there? Did the writers mean SEND it to graveyard, or actually exile it? Confused, the writing does not make sense. I'm going to submit form using cURL, where some of the contents is come from other file, selected using sed  If param1 is line matching pattern from other file using sed, below command will works fine:  curl -d param1="$(sed -n '/matchpattern/p' file.txt)" -d param2=value2 http://example.com/submit   Now, go to the problem. I want show only text between 2 matching pattern excluding the matching pattern itself.  Lets say file.txt contains:  Bla bla bla firstmatch It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. secondmatch The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English.   Currently, lots of "beetween 2 matching pattern" sed command won't remove firstmatch and secondmatch.  I want the result to become:  It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. Finding local maximum and minimum Specify a field in attribute table with raster calculator How do Stack Overflow questions appear in Google search results in seconds? I am trying to make a computer monitor. This means I have to have an image texture for the screen. My image texture is currently connected to an Emission BSDF shader. Unfortunately, when the emission is bright enough to emit light, the image is white-washed. I tried adding a Brightness/contrast node to the image before pushing it into the Emission BSDF, but it seems to directly counter the Emission's strength.  The desired light level   The desired image brightness Everybody has to obey their own parents I am new here and I don't really know how to post, so please forgive my mistakes. My question is this: Is a sentence like "everybody has to obey their own parents" nowadays completely acceptable under a grammatical point of view or it is still preferable, in written form, to use "everybody has to obey his/her own parents"? Thank you very much and sorry if this has been asked before. 80's Animated movie: An old man joins mission to save a boy stranded on a hostile world