New tabs containing questionable sites/malware warnings etc. keep popping up unsolicited on Chrome on my Samsung 7 mobile phone.  Sometimes as many as 10+ in an hour.  Sometimes I can be using a different app and I will automatically be redirected to a new unsolicited web page in Chrome.  I have tried everything including clearing cache etc. and various antivirus/malware scans.  Even cleared nonessential apps from my phone.  Would like to uninstall and reinstall Chrome, but understand that's not possible.  Any ideas?

I've recently bought a new Android smartphone. After setting it up and loading my contacts onto it I thought that would be it.  Now after some days, every time I unlock the phone it takes a few seconds before it opens the default browser and opens some spam website. I tried to see what was causing it. I removed any apps I didn't know I could trust, but the problem persisted. After trying to solve it for some time I gave up and reset the phone to factory default. Now after having it reset to the default it ran without issues for roughly a week before the problem reappeared.    I tried to uninstall some apps in order to see if they were to cause of it, but nothing changed after doing so. However I did notice that if I turn off the wifi it won't even try to open the browser (I haven't tried mobile data since I don't have a bundle). This makes me feel like it might be related to something on the network but that wouldn't explain why only that phone would have the issue when there are at least 6 android phones on that very same network.  I hope that there is someone who can help me find the cause of this issue and help me solve it.  TL;DR When unlocking my phone, it opens the browser and tries to open a spam website. But only does so while connected to the wifi.  Things I've tried so far:   Factory reset (only helped for a limited time) Clearing the browser cache and all related data  Removing any app I don't know to be reliable Attempting to find what triggers it (seems like some type of internet connection is required??)   The device is the Doogee Shoot 1. As for the browser, the default is set to be the Android browser, but if I change the default it would use Chrome just as well. It seems to really just use the browser that is set to default.


I have created some aliases but tab completion doesn't work for them.  I mean I created an alias impulse typing impul+TAB gives expected result but after that it doesn't works.  I mean it doesn't shows the prediction or auto completion for that command.

I am looking to get tab-completion on my command line aliases, for example, say I defined the following alias :   alias apt-inst='sudo aptitude install'   Is there a way to get the completions provided by aptitude when I hit the tab key? i.e. when I write 'sudo aptitude install gnumer' and hit tab, aptitude completes this to gnumeric, or if there was uncertainty lists all the available packages starting with gnumer. If I do it using my alias, nothing - no completion.


I am a member of an amateur high-powered rocketry club at my university, and as a result, I work with motors for these Rockets on a semi-regular basis.   I'm concerned, however, that at some point I'll have to travel following working with these, get pulled over for a random security check, and test positively for explosive residue.   I carry a card identifying me as a member of the national association of rocketry, and would likely have timestamped pictures on my phone of any recent work or launches. Would this be enough to prove that I have been working with explosives for legitimate reasons?

I, as a hobby, do a fair amount of historical weaponry, particular a focus on firearms. As a result I have a number of black powder rifles and pistols and often times get gunpowder absolutely everywhere.  This is normally fine but recently I was traveling international and got pulled aside for a swab check (see  )  Luckily they didn't detect anything but it makes me wonder, what if they had? What happens if explosive compounds are found and how can I help prevent/minmize any misunderstandings?


I'm having trouble while making a project, I want to create this :    But for now, it's just lines with a circle to fake the transparency, I try using pathfinder but I didn't find how to do it.  I find a solution by making it a pattern but I prefer having an object I can edit if I need.  Thank you in advance to the nice people who will answer and sorry for my broken english.

I have some text. I changed it to outline. Drew a rectangle on it. Selected all and then pathfinder->minus front. I got a weird result. How can get my desired effect in this way?


When I launch gedit or firefox from a terminal, the terminal is occupied(by occupied I mean no other commands can be run from the same terminal window) untill I press ctrl+c but it kills gedit or firefox. Any way other than opening a new terminal window?

Some GUI apps launch cleanly via the Terminal command line, but some don't, and they cause the Terminal to wait for the app to terminate. Even then, some don't "release" the command line.  The mysterious ampersand & suffix seems to cause the terminal to put the process into the background (but I'm not sure what happens there).  Is there a way to launch an app via the Terminal so that there is no "hang on" effect, just like launching something via Alt+F2?  I'd like to have the command line available again immediately, without something still in the background and printing in the terminal.


Whenever I try to render my blender animation, I get this weird sequence render and uses an older version of my animation, and just creates junk files.   I'm using JPEG format, rendering into a new folder. I have tried restarting blender, saving then reopening the file, but this didn't fix it. Please help, I need to get this animation rendered so I can make sure everything looks OK from an animated rendered view.

Blender is rendering an older version of my project, not the most recent one. I have made it using the Blender Render but it does not want to render in cycles either. A black and grey screen is rendered as if everything is transparent. Checked general camera, lighting and compute devises in case I messed something up but I can't find anything. All my textures and objects look normal, does anybody know what is wrong or what to check?  Ok added link:


Windows 8, has a amazing new updated Magnifier Application, improved from Win7 for those of us who cannot see clearly.  Does Ubuntu have a Magnifying application which you can either mouse over, or crop a section of the screen to zoom in on it?

I'm trying to get an Ubuntu laptop functional for a visually impaired friend. Her impairment is such that a screen magnifier would solve the issue.  I've tried out Kmag (as its the only hit when searching the software center for "magnifier"), but it seems odd the Ubuntu lacks a default.  So I'm assuming I'm missing something obvious.


I want to pass a string from one activity to another, then use the string in a conditional statement. the code below does this but the if statement in the 2nd activity does not execute the code? any ideas why as the BoxTicked string contains the string "true"              String BoxTicked = "true";      Intent i = new Intent(getApplicationContext(), secondActivity.class);      i.putExtra("BoxTicked", BoxTicked);      startActivity(i);   (2nd Activity)      Intent i = getIntent();     String s = i.getStringExtra("BoxTicked");      if(s == "true") {        // Do something     }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I just reviewed this:    But while reviewing, it already displays the "put on hold as not a real question" section, and it asked:     Should this question be closed as: ?   So as it stands, the audits are broken, since we already know that the question is "on hold" while reviewing, and it is incredibly hard to miss the huge grey box at the bottom.  Another with screenshot:

The other day, I got an obviously good question in a Close Vote Review.  Even if I didn't read the question,  is a bit of a giveaway.  Today I got one where   Also, on sites other than SO (where I understand the queues are huge), the number of reviews needed is often low enough (single digits) that you usually notice when you get an extra one.  I don't mind - I'm quite happy to get easy-to-pass audits - but maybe they could be a little harder...


I have the following problem with my computer. Мy video card is quite old and I have great trouble finding drivers for it:   Acer Aspire 5745G-333G32 Mn  CPU: Intel® Core™ i3-330M Processor ( 2.13 GHz, 3MB) HDD: 320 GB SATA (5400 rpm) Graphics card : Nvidia GeForce G 310M 512MB   Yesterday I decided to install driver version 340.93 but without success and had to reinstall again. Could someone tell me, what drivers are best for me and I will not have a problem after their installation because then I always have again reinstall.

I just ordered the Nvidia GTX card. I have a dilemma, though. Should I keep using the driver which is available in "additional drivers" in Ubuntu, or should I install the driver from the Nvidia site?  So which driver is the best for me?


Given $\mathbf{x}$^$\mathbf{a}$=$\mathbf{b-x}$  Prove  $(a^2+1)\mathbf{x}=\mathbf{a}$^$\mathbf{b+b(a.b)a}$  I have been using this same dot product and crossproduct method, but don't get it.  The method I used is similar to a question that I recently posted here.

If $\mathbf{a} \wedge \mathbf{x}$= $\mathbf{a} \wedge \mathbf{b}$ and $\mathbf{a}\cdot \mathbf{(x-b)}=2a^2$, show that $\mathbf{x=2a+b}$.  I take cross product throughout  $$\mathbf{a} \wedge \mathbf{a} \wedge \mathbf{x} = \mathbf{a} \wedge \mathbf{a} \wedge \mathbf{b}$$  $$\mathbf{(a.x).a-(a.a).x}=\mathbf{(a.b).a-(a.a).b}$$  $$\mathbf{(a.x).a-|a|^{2}.x}=\mathbf{(a.b).a-|a|^2.b}$$  $$\mathbf{|a|^2(x-b)-(a.x).a-(a.b).a}=0$$  Then,I do not know how to proceed.  A second part in the question is  Given $\mathbf{x}$^$\mathbf{a}$=$\mathbf{b-x}$  Prove  $(a^2+1)\mathbf{x}=\mathbf{a}$^$\mathbf{b+b(a.b)a}$  I have been using this same dot product and crossproduct method, but don't get it.


I'm working on java selenium tests and I am trying to setup a fluent/method-chaining design code: I have a generic button class that allows navigating from a page class to the other. Buttons are attributes of my pages classes. Method in the button class should be able to return generic page classes that were defined on button instantiation (the page you are on, the page the button leads to etc.). But I can't figure how to do it without breaking the fluent design in the main class: Button.java public class Button<T, U> {     public T observe() {         return new T(); // Does not work     }      public U click() {         return new U(); // Does not work     } }  FirstPage.java public class FirstPage {     public Button<FirstPage, SecondPage> buttonOnFirstPage = new Button<>(); }  SecondPage.java public class SecondPage {     public Button<SecondPage, AnotherPage> buttonOnSecondPage = new Button<>(); }  And finally what I want to be able to do without casting or mentioning types, in order to benefit from autocompletion and other fancy IDE stuff: BrowsingTest.java public class BrowsingTest {     public static void main(String[] args) {         new FirstPage()             .buttonOnFirstPage.observe()             .buttonOnFirstPage.click()             .buttonOnSecondPage.observe()             .buttonOnSecondPage.click(); //etc.     } }  Any idea on how I can build that button class? Thanks a lot!

Is it possible to create an instance of a generic type in Java? I'm thinking based on what I've seen that the answer is no (due to type erasure), but I'd be interested if anyone can see something I'm missing:  class SomeContainer<E> {     E createContents()     {         return what???     } }   EDIT: It turns out that  could be used to resolve my issue, but it requires a lot of reflection-based code, as some of the answers below have indicated.  I'll leave this open for a little while to see if anyone comes up with anything dramatically different than Ian Robertson's .


My PC is a Dell approximately 7-8 years old running Ubuntu 16.10  I have watched tutorials on youtube and tried to install the ubuntu restricted extras to help make the install a bit easier to no avail.  When i type in the command   sudo apt-get install ubuntu-restricted-extras   It tells me to enter my password then nothing happens.   Can you help - How to install some type of flash on my desktop computer?

I am having problems with Adobe Flash in Ubuntu, what are my options?


I have a python program that creates some .csv files in the same directory as the python script. I navigate the directory containing the script in nautilus and then run the program. The new files do not show up in the open nautilus window after the program ends. I have to press F5 to "refresh" the nautilus window for the new file to be listed in the directory. Is there any way I can have this happen automatically? Is this a feature or a bug?

I'm using Ubuntu 14.04 and when I'm doing experiments which creates new files inside a particular folder X. But I can't see these new files inside X without refreshing X.  I have increased the count to 1M in  /proc/sys/fs/inotify/max_user_watches   but still the issue is not fixed.   How to fix it?  EDIT As suggested, output of cat /etc/xdg/autostart/user-dirs-update-gtk.desktop  [Desktop Entry] Encoding=UTF-8 Exec=xdg-user-dirs-gtk-update Name=User folders update Comment=Update common folders names to match current locale Terminal=false OnlyShowIn=GNOME;LXDE;Unity; Type=Application StartupNotify=false X-KDE-autostart-after=panel NoDisplay=true X-Ubuntu-Gettext-Domain=xdg-user-dirs-gtk


I am trying to figure out if $x^2+1$ has any roots in $Z_{103}[x]$, but I don't have any idea of how I should find the answer. Any help would be much appreciated. Thank you.

I came across this problem and I believe Lagrange's theorem is the key to its solution.  The question is:     Let $p$ be an odd prime. Prove that there is some integer $x$ such that $x^2 \equiv −1 \pmod p$ if and only if $p \equiv 1 \pmod 4$.   I appreciate any help.  Thanks.


It's incredible that I cannot seem to find a way of just simply colouring in the edges/verts differently to the colour of the faces of the shape. It ought to be simple right? And then... being able to just raise the thickness level on the line of the edge...   How do you do it?

Is there a way to vary the thickness and color of lines created by just edges and vertices? I realize that a face can be defined and then color and material applied, but is there any way to apply a color to the edges?


I'm just following a tutorial on youtube, but when it comes to the end I cannot render the file, it always stucks and makes the screen black sometimes just showing nothing.  If anyone can help it would be appreciated. Thank you.

Essentially, my problem is that i am trying to render a scene, however, blender crashes on me early during the render. I only have about 14 total objects in the scene. (It's not that complex) I tried to render a different blender file which was bigger than the one that i am having problems with, and the scene renders just fine. There is no difference in the render presets for both of these files. However, i still cannot render the other scene. It gets to preparing scene data, but then it crashes.  Thank you.


For example,  $FB is $180 today.  If it were to lose 50% of it's value it would be worth $90.  If it was to then gain 50% back it would be worth $135.  So the percentage change was the same but the dollar change was different.  I suppose this presumes that bad news affects the percentage drop in the same way that good news affects a percentage gain, if bad news makes the stock drop less (all other things being equal) than 50% here then it might not be the case.  Does this mean that losing in the stock market is far more destructive to your portfolio than winning and that you should not lose at all costs?

If you start with $100K, and you get a 50% gain, it's $150K.  Then, you get a 50% loss: now it's $75K. Reverse the order (i.e. lose 50%, gain 50%), it's the same thing (a 25% loss).  So, 50% up then 50% down, or 20% up then 20% down, you don't get back to "even"; it's a loss.  My question is: how can one make this notion work to their advantage, instead of to their disadvantage?  I'm wondering if you have any strategies/thoughts/ideas on how to make this effect work for you, instead of against you. Or is my thinking on this as a strategy somehow incorrect?  The effect seems to diminish with lower swings in returns.  E.g. the +20% / -20% case, results in a 4% loss.  I.e. 100K -> 120K -> 96K.  Not clear what the formula for it is, but it's not linear.


We say chi square with $n$ degrees of freedom. It reduces if different constraints are introduced. What is the concept behind degrees of freedom?

From , there are three interpretations of the degrees of freedom of a statistic:     In statistics, the number of degrees of freedom is the number of   values in the final calculation of a statistic that are free to vary.      Estimates of statistical parameters can be based upon different   amounts of information or data. The number of independent pieces of   information that go into the estimate of a parameter is called the   degrees of freedom (df). In general, the degrees of freedom of an   estimate of a parameter is equal to the number of independent scores   that go into the estimate minus the number of parameters used as   intermediate steps in the estimation of the parameter itself (which,   in sample variance, is one, since the sample mean is the only   intermediate step).      Mathematically, degrees of freedom is the dimension of the domain of a   random vector, or essentially the number of 'free' components: how   many components need to be known before the vector is fully   determined.   The bold words are what I don't quite understand. If possible, some mathematical formulations will help clarify the concept.  Also do the three interpretations agree with each other?


I've got some adware and it opens a URL. Let's call it "ads".  I tried to troubleshoot with different anti-spyware but it was ineffective.  I want to intercept ANY call to Chrome which is opening the page called "ads". When it happens I want to know what was the caller process (if outside Chrome) or the extension (if inside Chrome).  Can you help me?    The supposed duplicate question is extremely generic so the answers assume to deal with kind of virus which are dangerous and thus the proposed solution may involve a system format or a previous backup. Here the idea is completely different. While an antivirus is a software and it doesn't have any artificial intelligence I know very well the solution I need: "simply and immediately block and delete whatever tries to open the ads page".  The problem is just technical. If this operation would be obvious through the antivirus or windows many adware problems could be easier to solve. That's why I see this question as being important. Because it's about a methodological investigation which can be used against a whole class of problems.

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


I've recently gotten a new computer (16" base model with 8GB GPU), and its 500GB of storage had dropped to just 80 when I checked it. Here's the screenshot:    I've checked through all my folders, and adding all the items in (from the above window) Documents -> File Browser, as well as every other unique item in the sidebar, comes to roughly 445GB. So all my files take up less than half of my storage space, while this Other takes up nearly the rest! I am unable to work productively (recording videos) as I have no room to store them. Where can I find out what this is, and how to delete/remove/edit its contents? This problem didn't occur on my other computer (also running Catalina).   Edit  I have tried these solutions from the duplicated question and from the , and neither of them have worked, even after restarting multiple times. How can I remove, or even access, this storage space?  sudo tmutil  listlocalsnapshotdates / |grep 20|while read f; do tmutil deletelocalsnapshots $f; done tmutil  listlocalsnapshotdates / |grep 20|while read f; do tmutil deletelocalsnapshots $f; done   From duplicate:  tmutil listlocalsnapshots / tmutil deletelocalsnapshots <snapshot number>   One snapshot failed to delete entirely - I wonder if this is the one causing the oversized storage?    I state once more - the solutions listed  and  did not help at all, if anything worsening the problem (the used space is now 287GB). Any help will be greatly appreciated.  Another edit - DaisyDisk also did not show these files:

My Mid 2012 MacBook Pro 13" says I suddenly ran out of Storage space.   My Mac barely has any data and my upgrade to Sierra was a clean install. Nothing was ported from previous backups.   If you see the image below, the "System" section in the left column says that it is consuming 466.82 GB. What I don't understand is why does my Mac require so much space? As far as I know, it should never increase 50 GB of space. Any help is appreciated.


public class ExampleString {     public static void main(String[] args) {         String s1="u cannot change me!";         String s2="u cannot change me!";         String s3="u cannot"+" change me!";         String s4="u cannot";         String s5=s4+" change me!";         final String s6="u cannot";         String s7=s6+" change me!";          System.out.println("s1==s2 "+(s1==s2));//true         System.out.println("s1==s3 "+(s1==s3));//true         System.out.println("s1==s5 "+(s1==s5));//false  why  it is false         System.out.println("s1==s7 "+(s1==s7));//true   why  it is true         System.out.println("s4==s6 "+(s4==s6));//true        //  System.out.println("s5 "+s5);        // System.out.println("s7 "+s7);         System.out.println("s5==s7 "+(s5==s7));//false  why                          } }   in case of s5 am doing  concatenation but it will give ouput false in case of s7 also am doing concatenation it will give true. am declaring s6 am declaring string as final string am getting true  my question is why it is giving like that or what is the difference between them

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


So I was playing in minecraft modded with Mo'Creatures and I have a cat on my head and I can't get it off. I can't find anything about how to get it off and whatever I try it doesn't work. Also I'm using the 1.10.2 version of Mo'Creatures. So how do I get my cat off my head?

I installed the Mo'Creatures mod into Minecraft, then made a fish bowl. After catching a fish I went to put it on top of a bookshelf in my room, but instead of placing it, the bowl just dropped at my feet. When I tried to pick it up my character put it on his head. Now I'm stuck with a fish bowl on my head and I can't find any mention anywhere of how to get it off. There are a number of other animals from the mod that you can put on your head for some effect, but no mention of how to remove them pretty much anywhere.


Show that every proper subgroup of $S_3$ is cyclic. So I approached it like this, $$|S_3|=6$$ So divisors of 6 are 2 and 3 (excluding 1 and 6, because improper subgroups). Both 2 and 3 are prime and any group of prime order is cyclic. Is that a correct approach?

We have the group $(S_3, \circ)$, where $S_3=\{(1)(2)(3),(1)(2,3),(1,2)(3),(1,2,3),(1,3,2),(1,3)(2)\}$. How can I find all cyclic subgroups from this?  I know that I could go through each element and exponentiate it to see if I get all other terms. However, I would guess there is a more efficient way of solving this problem.


Accented characters weren't displaying in PHP so I added header('Content-Type: text/html; charset=UTF-8'); to the header.  Still no joy.  But I've solved it: <!DOCTYPE html> <html> <head> <?php header('Content-Type: text/html; charset=UTF-8"'); ?> <meta http-equiv="Content-type" content="text/html" charset=utf-8" / > </head> <body>   Hélène </body> </html>  Notice the difference?  Why should a single double quote before the final single quote make all the difference? If I drop the php making an html file and insert a double quote before utf-8 in the meta tag the way it should be then it doesn't work! I'm using Chrome Version 88.0.4324.150 (Official Build) (64-bit) - haven't tested with other browsers.  Any ideas?

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I want to store Spanish characters in SQL (á, é, í, ó, ú, ü, ñ, ¿, ¡).  Consider the following query:  INSERT INTO students (name) VALUES('áéíóú')   When I run the query in phpMyAdmin the characters are stored correctly.  However, when I run the query from my php code they are stored as Ã¡Ã©ÃÃ³Ãº  Here is the relevant code:  <?php ... $query = "INSERT INTO students (name) VALUES('áéíóú')"; ?>


I have a Windows 7 laptop which has one HDMI connection. I connect one monitor via HDMI to this laptop no problem. Can I connect more than one monitor to this laptop and achieve HDMI quality even though I have just one HDMI port ?

Equaling 3 Displays Total (or 2, if the laptop display cannot be used).  I work at home on two large monitors, but at the office on a laptop with a single large monitor. Is it possible to attach two (or more?) external monitors to a laptop without having them clone each-others display?


Is it correct to write,  Agreed.  instead of,  I agree.  I am confused by this single-word sentence.  Why is it in the past tense?  Or is "Agreed" a (past-participle) adjective, like "Gone" or "Done"? Can I thus write,  Concurred. Consented. Withdrawn. Been.  Sample conversation:  He: "Agreed." is a complete sentence. She: Concurred.

What is the shortest comprehensive sentence in English?


I would like to send personalized fields from a Data Extension  through a Cloud Page using an Inbox PUSH. When a client open the message in the Inbox section from the APP , I would like to show for example the name from each client. The idea is to show personalized data from the client and be able to keep for a period this info in their inbox . This is the simple code I am using , but the name is not showing up . Is something missing? Is it possible right now in Marketing Cloud ? Any help is appreciated. %%[ var @sk, @Name set @sk = RequestParameter("data_extension") set @Name = Lookup("data_extension","Nombre","Id_Cliente", @sk) ]%% Your name is : %%=v(@Name)=%%

I'm trying to use push with AppInbox/Cloud Pages. I want the Cloud Page that is linked to the push message to be able to display dynamic content based on an attribute for that contact. This page -  - says that it is possible to personalise Cloud Page content but doesn't say how. I've already had a Salesforce support case opened and closed with no luck - apparently it's not their job to assist me with how to do something even if they say something is possible but back it up with no documentation for how it might be done. I've tried the normal way you'd do it from an email, using both the _subscriberkey personalisation string as well as the RequestParameter function with fields from the entry source DE, but neither of these work. Given you're selecting a static Cloud Page when you set up the send and there's no visible way to add attributes, how do you actually get a Cloud Page to pick up these values?


When setting up an ML framework for binary classification do we need to standardize our training and test sets separately? This answer claims to standardize separately (although never states the target variable type)  If we are not standardizing the target variable, isn't it better to standardise our numeric descriptor variables with respect to the full dataset? For example, say we are trying to predict if a transaction is fraudulent ($Y \in \{0,1\}$) based on Amount ($X_1$) and Customer Age ($X_2$) for a dataset of 1000 transactions. If we randomly split 80/20 and then standardize, I would think that the test set's standardized values for both $X_1$ and $X_2$ are less accurate given n=200 (when we could use n=1000, resulting in having a mean closer to the variable's true mean). If we had a real-world situation of wanting to test 1 new transaction we cannot standardize without the prior data. Is this correct or am I missing something? Thanks.

A common good practice in Machine Learning is to do feature normalization or data standardization of the predictor variables, that's it, center the data substracting the mean and normalize it dividing by the variance (or standard deviation too). For self containment and to my understanding we do this to achieve two main things:   Avoid extra small model weights for the purpose of numerical stability. Ensure quick convergence of optimization algorithms like e.g. Conjugate Gradient so that the large magnitude of one predictor dimension w.r.t. the others doesn't lead to slow convergence.   We usually split the data into training, validation and testing sets. In the literature we usually see that to do feature normalization they take the mean and variance (or standard deviation) over the whole set of predictor variables. The big flaw I see here is that if you do that, you are in fact introducing future information into the training predictor variables namely the future information contained in the mean and variance.  Therefore, I do feature normalization over the training data and save the mean and variance. Then I apply feature normalization to the predictor variables of the validation and test data sets using the training mean and variances. Are there any fundamental flaws with this? can anyone recommend a better alternative?


I would like to ask for an advice. Recently, I was developing a conference site with Drupal 7. The site is hosted at domain1.com. However, the conference is covered by another organization and they require that conference page will be accessible from their own domain something like.: organization.com/conference2014 Fortunately, Drupal has base_url parameter and the site is accessible from organization.com/conference2014 domain. BUt, my problem is when I want to access administration interface of Drupal through organization.com/conference2014?q=user/login I get redirected to organization.com site which is administrated by the organization admin. Moreover, when I access again organization.com/conference2014 - it still asks me for the password.  I got adviced to introduce trigger after the user successfully logs in to the site organization.com/conference2014. It does redirect me but the administration interface/overlays is not there. Any ideas how to tackle this problem?  Martin

I am developing a conference site with Drupal 7. The site is hosted at domain1.com. The conference is covered by another organization, and they require the conference page to be accessible from their own domain, something like organization.com/conference2014. Fortunately, Drupal has the $base_url variable and the site is accessible from organization.com/conference2014.  My problem is when I want to access administration interface of Drupal from organization.com/conference2014?q=user/login. After I enter my credentials, Drupal redirects me to the organization.com site which is administrated by the organization administrator. When I access again organization.com/conference2014, it still asks me for the password.  What I need to achieve is, after entering the credentials, being redirected to organization.com/conference2014, and being to perform any administration task.  Do you have any idea on how to tackle this problem?


I'm working on a project where I must write a class SeparateChainingMap that represents a separate chaining hash table and implements the Map interface.Every time that I run my code I am getting a Null Pointer exception caused by my insert method. Can anyone provide guidance on what I am doing wrong?  I've included all of my code so far below. The NullPointerException is being thrown when I call the insert method.   import java.util.LinkedList; import java.util.*;   public class SeparateChainingMap<K extends Comparable<? super K>, V>   implements Map<K,V> {  public static final int INITIAL_SIZE = 10; private int currentSize; private LinkedList<Pair<K,V>>[] table;   @SuppressWarnings("unchecked") public SeparateChainingMap() {     table = (LinkedList<Pair<K,V>>[]) new LinkedList[INITIAL_SIZE];  }  @SuppressWarnings("unchecked") public SeparateChainingMap (int size) {     LinkedList<Pair<K,V>> [] table = new LinkedList[INITIAL_SIZE];     for (int i=0; i<table.length; i++) {         table[i] = new LinkedList<Pair<K,V>>();     } }  //Introducing the hash function private int myHash(Pair<K,V> x) {     int hashValue = x.hashCode();     //divide the hashValue by mod table length     hashValue %= table.length;      if(hashValue<0) {         hashValue += table.length;     }     System.out.println(hashValue);     return hashValue; }  //rehash function @SuppressWarnings("unchecked") private void rehash() {     LinkedList<Pair<K,V>>[] oldTable = table;      //Create new double-sized empty tables     table = (LinkedList<Pair<K,V>>[]) new LinkedList[2 * table.length];      for (int j=0; j< table.length; j++) {         table[j] = new LinkedList<>();     }       //Copy table over     currentSize = 0;     for (int i=0; i<oldTable.length; i++) {         for(int j=0; j<oldTable[i].size(); j++){             insert(oldTable[i].get(j));          }      }         }  //Find an item in the hash table. returns true if x is found public boolean contains(Pair<K,V> x) {     LinkedList<Pair<K,V>> thisList = table[myHash(x)];     return thisList.contains(x); }  //Method for inserting a pair into the hash table public void insert(Pair<K,V> x) {     LinkedList<Pair<K,V>> thisList = table[myHash(x)];      if(!thisList.contains(x))     {         thisList.add(x);     }      if (++currentSize > table.length) {         rehash();     }   }  public void remove (Pair<K,V> x) {     LinkedList<Pair<K,V>> thisList = table[myHash(x)];      if(thisList.contains(x)) {         thisList.remove(x);         currentSize--;      } }  public void makeEmpty() {     for(int i = 0; i<table.length; i++) {         table[i].clear();     currentSize = 0;     } }  //map functions @SuppressWarnings("unchecked") public V get (K key) {     Pair<K,V> pair = new Pair<K,V>(key,null);     int i = myHash(pair);      for(int j=0; j<table.length; j++) {          if(i == j) {             for(int k=0; k<table[j].size(); k++)             {                 if(key.equals(table[j].get(k).key)){                     V value = table[j].get(k).value;                     return value;                 }             }           }      }       return null; }  public void put(K key, V value) {     Pair<K,V> pair = new Pair<K,V>(key, value);     insert(pair);  }   public static void main(String args[]) { @SuppressWarnings("unchecked")  SeparateChainingMap<String,Integer> SCM = new SeparateChainingMap<>();  SCM.put("Alice", 243);   }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I want to upload a file in background using JavaScript and XMLHttpRequest but my page "upload.php" receive empty $_POST and $_FILES.  var formData = new FormData(); formData.append("file", file); xhr.open("POST", "upload.php", true); xhr.setRequestHeader('Cache-Control','no-cache'); xhr.setRequestHeader("Content-Type","multipart/form-data");      xhr.send(formData);   I have try a lot a things in xhr.setRequestHeader() but nothings work.

I would like to upload a file asynchronously with jQuery.     $(document).ready(function () {     $("#uploadbutton").click(function () {         var filename = $("#file").val();          $.ajax({             type: "POST",             url: "addFile.do",             enctype: 'multipart/form-data',             data: {                 file: filename             },             success: function () {                 alert("Data Uploaded: ");             }         });     }); });  File <input type="file" id="file" name="file" size="10"/> <input id="uploadbutton" type="button" value="Upload"/>     Instead of the file being uploaded, I am only getting the filename. What can I do to fix this problem?


I understand that the HTTP protocol, especially of the secured type, secured with some data encryption method such as TLS and certified with some SSL certification, is the main way to transfer data in the world wide web.  Well, if so, Why are post, get and put needed on top of HTTPS protocol?:   Why acting by the HTTP(S) protocol isn't enough for requesting and serving data and another layer is needed on top of that as I described? Why, when we or others (say, a program) interact with a webserver, the data is both requested and served (if at all) in different methods such as post, get and put (and maybe also delete?) on top of HTTPS protocol?   An answer will let me better maintain my websites in general.

Can we not implement the HTTP protocol using just a request body and a response body?   For example, the URL will contain request, which will be mapped to a function depending on programming language on server side say a Servlet and in response HTML and JavaScript response will be sent across.   Why does HTTP protocol have notion of methods?  From the answers, I get some sense of why concept of methods is there..This leads to another related question:  For example in gmail compose link, the PUT/POST request and data will be sent. How does the browser come to know which method to use? Does the gmail page sent by server include the method name to use when calling gmail compose request? when we call www.gmail.com , it must be using GET method, how does the browser know that this method to use?  PS : I don't have enough credits to comment on answers, so I am not able to comment on many questions raised by people related to intention behind this question.   As some answers tell, we can create new users on DELETE method, then this raises question the intention behind notion of methods in http protocol, because at the end of the day, it totally depends on servers what function they want to map an URL to. Why should client tell servers what methods to use for an URL.


I've seen a few examples of this, but I can't seem to get it to work in my particular situation.  Lets say there is the below file.  foo line 1 line 2 line 3 bar junk junk foo line 1 line 2 baz line 4 bar   I'm trying to catch everything between 'foo' and 'bar' as long as it contains 'baz' with a one liner.  Everything I've found so far is great for finding everything between foo and bar, but nothing seems to be good for only finding it if it contains baz.  Edit:  The below works for me:  sed -n '/foo/{:a;N;/bar/!ba; /baz/p}' input.txt

I have a multi line log entry format that I need to process.   The log looks something like this:   --START-- Device=B Data=asdfasdf Lorem=Ipsum --END-- --START-- Device=A Data=asdfasdf Lorem=Ipsum --END-- --START-- Device=B Data=asdfasdf --END-- --START-- Device=A Data=asdfasdf --END-- --START-- Device=B Data=asdfasdf --END-- --START-- Device=C Data=asdfasdf Lorem=Ipsum --END--   I want to print everything between --START-- and --END-- if a particular pattern is matched.   e.g:   Print all entries where Device=A  --START-- Device=A Data=asdfasdf Lorem=Ipsum --END-- --START-- Device=A Data=asdfasdf --END--   All I've been able to do so far is write:   sed -e -n '/--START--/,/--END--/p' < input   Which effectively prints the input but I think I need to add {} to filter with N and then print if that condition matches.   I also think I'm completely lost.  Any idea on how to print multiple lines if a single line matches a condition?


Ubuntu noob here. When using Windows I just copy paste this in cmd:  set Path=C:\Program Files\Java\jdk1.8.0_60\bin set HomePath= C:\Program Files\Java\ jdk1.8.0_60   What would the syntax for this be in Ubuntu? assuming /usr/bin/java. A concise answer would be appreciated.

I installed Java JDK on Ubuntu 12.04 and added Java home to my path at ~/.bashrc:  export PATH=/opt/jdk1.7.0_40/jdk1.7.0_40/bin:$PATH   This looks a little bit strange but it's really my path.  After this I installed maven through:  sudo apt-get install maven   It installed all the needed libraries and now when I run mvn -version, I see:  Error: JAVA_HOME is not defined correctly.   We cannot execute /opt/jdk1.7.0_40/bin/java   What is wrong with it?   How to solve this trouble?


I have a web server using Apache 2.4.10.  Let's assume I have several domain name :  www1.example.com. www2.example.com. www3.example.com.   I want my web server to be only contacted using these domain names. This mean that I don't want people connecting to my server using HTTP by typing my IP address, or using another domain name (let's assume there is a lot of wwwX.duplicate-example.com created by another person and pointing to my IP).  At least, I want them to connect to a default 404 page I'll set under /var/www/404/index.html.  At this moment, I can run my 3 wwwX.example.com. website with separate page using VirtualHost :  <VirtualHost *:80>     DocumentRoot "/www/www1"     ServerName www1.example.com      # Other directives here ... </VirtualHost>  <VirtualHost *:80>     DocumentRoot "/www/www2"     ServerName www2.example.com      # Other directives here ... </VirtualHost>  <VirtualHost *:80>     DocumentRoot "/www/www3"     ServerName www3.example.com      # Other directives here ... </VirtualHost>

I'm having problems with apache server (CentOS VPS at Amazon). When apache starts, it starts to receive hundreds of requests, this is an example of the log:  173.208.216.165 - - [25/Jan/2015:18:23:11 +0000] "GET http://go.padstm.com/resources/img/iebt.png HTTP/1.0" 200 36023 "http://go.padstm.com/?id=173374&t=iframe&var=33110" "Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/4.0 (.NET CLR 3.5.30729)"   The path /resources/img/iebt.png is in my server, but not go.padstm.com. The strangest thing is that apache is accepting all the requests.  Other example: in this case, the entire resource is NOT in my server, but apache returns 200:  198.204.239.250 - - [25/Jan/2015:19:04:39 +0000] "GET http://fstads.com/show.php?z=26&pl=494&j=1&code=1422237874120 HTTP/1.0" 200 10819 "http://financezhen.com/?p=186#respond" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.2a1pre) Gecko/20110324 Firefox/4.2a1pre"   I don't know why these requests goes to my server, or why it returns 200...  Also, when apache starts and module prefork is enabled, it launches multiple httpd processes. If worker module is enabled, it launches multiple threads. Ok, but in both cases apache ends up consuming all the CPU and memory of the server, and there is not traffic directed to my server.  More info: ProxyRequests is Off. Also: I'm using ip-based vhosts:  NameVirtualHost xxx.xxx.xxx.xxx:80  <VirtualHost xxx.xxx.xxx.xxx:80>     ServerName mydomain.com     ServerAlias www.mydomain.com     DocumentRoot /var/www/html/w3prod     ServerAdmin admin@localhost     UseCanonicalName Off     CustomLog /var/log/httpd/w3prod.mydomain.com combined     ErrorLog /var/log/httpd/w3prod_error.mydomain.com </VirtualHost> <VirtualHost xxx.xxx.xxx.xxx:80>     ServerName picfarm.mydomain.com     ServerAlias www.picfarm.mydomain.com     DocumentRoot /var/www/html/picfarm     ServerAdmin admin@localhost     UseCanonicalName Off     CustomLog /var/log/httpd/picfarm.mydomain.com combined     ErrorLog /var/log/httpd/picfarm_error.mydomain.com </VirtualHost> <VirtualHost xxx.xxx.xxx.xxx:80>     ServerName test.mydomain.com     ServerAlias www.test.mydomain.com     DocumentRoot /var/www/html/engine-test     ServerAdmin admin@localhost     UseCanonicalName Off     CustomLog /var/log/httpd/test.mydomain.com combined     ErrorLog  /var/log/httpd/test_error.mydomain.com     ProxyRequests Off     ProxyPreserveHost On     <Proxy *>             Order deny,allow             Allow from all     </Proxy>     ProxyPass /bosh http://xxx.xxx.xxx.xxx:7070/http-bind/     ProxyPassReverse /bosh http://xxx.xxx.xxx.xxx:7070/http-bind/     ProxyPass / http://xxx.xxx.xxx.xxx:8080/     ProxyPassReverse / http://xxx.xxx.xxx.xxx:8080/ </VirtualHost>   Any help would be appreciated. Thanks!


So if $f(z)=az+b$, is an entire injective map from $\Bbb C$ to $\Bbb C$, for both a and b are complex numbers and a is not equal to 0.   I've proved that if f is an injective entire function, it cannot have an essential singularity at infinity, but then how to show that $f(z)$ has to be a polynomial? And why $f(z)$ has to satisfy that $f(z)=az+b$?

I'm a little confused at both the overall logic in this proof. Are we simply using $g(z)$ to make conclusions about $f(z)$, because $g(z)$ is the reciprocal of $f$? Is the proof assuming that $f$ is injective and entire (all the while knowing that it has some sort of singularity at $z = 0$), and then trying to reach contradictions in the essential singularity and removable singularity cases? Then, once it concludes that $z = 0$ is a pole singularity, it reaches the conclusion that $f$ must be of the form $f(z) = az + b$?  Also, more specific questions about the different cases:   Removable singularity case: Why is $f$ bounded on the closed circle if $f$ is continuous? Am I missing something simple? Essential singularity case: Why exactly is $f(\{|z| > r \} \cap f(\{|z|<r\}) \neq \emptyset$? $f(\{|z| > r \})$ is dense, but how does $f(\{|z|<r\}$ being open guarantee that their union is non-empty?


My original OS was / is W7 and whenever I installed Ubuntu 14.04 LTS it gave me 17GB of space but now I want to expand it for certain applications.    I kinda am new to the whole disk and partitioning thing so GOOD help would be appreciated.  I also installed Ubuntu alongside W7.

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


There is duplicate question   but I need a non-park tool tool. Something I can order from AliExpress.   The cassete looks like this  I don't have enough reputation on bicycles to add comment to the duplicate question  (so my only option is to post it as question)

What tool is needed to remove a Shimano HG-50 freewheel from the wheel hub? It looks like a 12mm or 13mm Allen key. Will this do it or is there some detail I have missed?


I'm trying to center div's inside one outter div, but I can't.  My html is something like this :

       Inner Div

       Inner Div

       Inner Div

   And my css is something like this :   .outterDiv{  width: 600px;  border: 1px solid #f00;  text-align: center; }  .innerDivBig{   margin: 0 auto;   display:table; }   Here is .

How can I horizontally center a
 within another
 using CSS?

Foo foo


I am running a task on my Ubuntu 18.04 Server which imports and processes a huge file.  I am running putty over SSH on my laptop to administrate the whole process and the output from the task.  The laptop is not capable to run the whole time of the import and to show the process. I want to make it possible to login at a later time and see the same things I saw at the earlier stage.  Is this possible?  Duplicate Edit: I dont need this for a lag or a disconned over minutes. I want to be able to reconnect after some days and still see the same. I want a similiar functionality like Remote Desktop for Windows.

Is there a way to connect to an ssh session that was disconnected?  We are having problems with our network connection to a remote site that we are working on separately; however, in the mean time we experience a large number of disconnects due to lost packets while connected to servers at the remote location.  Many times the session stays active for a while, and sometimes it happens to be in the middle of some action (file editing, running some process, etc...) that I need to get back to rather than restart if possible.


I have problem with running my Eclipse. I tried 3.7, 4.2 and 4.3 versions with java 6 and java 7.  Nothing can help me. It shows me popup screen but it doesn't start to load( I dont have chance to choose workspace). Starting it with -debug -console parameters shows that it stops running in this moment:  Time to load bundles: 10 Starting application: 6374 osgi>    I have started JVisualVM but I cannot observe anything special. There are no deadlocks etc.  Edit  My observations were to deep... After ~60s pid of eclipse is dead.  Edit 2  Now it stops on   Time to load bundles: 8 org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized.  Will retry after the state location is initialized. Starting application: 3557   Edit 3  I have managed to start it but only with -clean parameter and with choosing workspace from command line -data parameter.

I am using Eclipse 3.3 ("Europa"). Periodically, Eclipse takes an inordinately long time (perhaps forever) to start up. The only thing I can see in the Eclipse log is:       !ENTRY org.eclipse.core.resources 2 10035 2008-10-16 09:47:34.801     !MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.   Googling reveals  that I remove the folder:  workspace\.metadata\.plugins\org.eclipse.core.resources\.root\.indexes   This does not appear to have helped.  Short of starting with a new workspace (something which I am not keen to do, as it takes me hours to set up all my projects again properly), is there a way to make Eclipse start up properly?


I have a simple document that begins on page 2 and identifying information on the title page. The following code demonstrates this:  \title{Merchant Agreement Skeleton} \author{Merchant} \date{\today}  \documentclass[9pt]{article} \usepackage{multicol} \usepackage[margin=0.55in]{geometry} \usepackage{setspace} \singlespace \setlength{\columnsep}{10mm} \usepackage{titlesec} \titlelabel{\thetitle.\quad}   \begin{document} ... \end{document}   I'd like to be able to include a figure on the title page and generally be able to have identifiers along the lines of this document.

The standard titlepage is quite simple. I am looking for a very  and need help customizing my title page.  It should match the  classicthesis doctoral thesis template  Below a minimal working example:   \documentclass[12pt,a4paper,footinclude=true,twoside,headinclude=true]{scrbook} \XeTeXinputencoding iso-8859-1 \usepackage[marginparsep=8pt,left=3.5cm,right=3.5cm,top=3cm,bottom=3cm]{geometry}  \usepackage[parts,pdfspacing,dottedtoc]{classicthesis}    \frontmatter  \begin{document}     \pagestyle{scrheadings}        %this is the place to set up my cover sheet.       %*******************************************************      % Abstract     %*******************************************************    %\renewcommand{\abstractname}{Abstract}    \pdfbookmark[1]{Résumé}{Résumé}   \begingroup    \let\clearpage\relax    \let\cleardoublepage\relax    \let\cleardoublepage\relax       \chapter{Résumé}     Résumé de la thèse en français\dots      \vfill      \chapter*{Summary}   Résumé de la thèse en anglais\dots    \endgroup             \vfill     \end{document}


I have a Poisson GLM in R that is overdispersed, so I fit a quasipoisson GLM, however the residual deviance nor the degree of freedom change. Can that happen? What does it mean in that case?

In modeling claim count data in an insurance environment, I began with Poisson but then noticed overdispersion. A Quasi-Poisson better modeled the greater mean-variance relationship than the basic Poisson, but I noticed that the coefficients were identical in both Poisson and Quasi-Poisson models.   If this isn't an error, why is this happening? What is the benefit of using Quasi-Poisson over Poisson?  Things to note:   The underlying losses are on an excess basis, which (I believe) prevented the Tweedie from working - but it was the first distribution I tried. I also examined NB, ZIP, ZINB, and Hurdle models, but still found the Quasi-Poisson provided the best fit.  I tested for overdispersion via dispersiontest in the AER package. My dispersion parameter was approximately 8.4, with p-value at the 10^-16 magnitude.   I am using glm() with family = poisson or quasipoisson and a log link for code.  When running the Poisson code, I come out with warnings of "In dpois(y, mu, log = TRUE) : non-integer x = ...".   Helpful SE Threads per Ben's guidance:


Some days ago, I found myself in the middle of a much-used road to recreate a photo of the same scene from over a hundred years ago. The result is quite alright, but far from perfect.  What techniques, tools and tricks do photographers use who create perfectly matching modern equivalents of old photos? I haven’t found any tutorial online, so I ask you how to find   the right spot, the right focal length, and the right angle   ?

I have old photos of a town and landscape around it. I'd like to take these photos again, from the same locations. In some cases I am struggling with finding the original location of the camera.   I can identify objects on the photo, I know their position on the map in some cases even their dimensions, but I don't know anything about camera or lens. Are there any techniques (or even better any ready-made software) to calculate position of the camera from the photo?


A part of my batch script involves creating a timestamp in the batch file. I am using the following code to get the date in yyyy-mm-dd format set mydate=!date:~10,4!-!date:~4,2!-!date:~7,2!  This when the setting on my pc is mm-dd-yy and date command returns The current date is: Mon 09/26/2016 and my above command converts it into 2016-09-26  but the problem is when i run my script on another machine which has a dd-mm-yy format where the date command returns this:  The current date is: 26-Sep-16 and my above command gives me this: -ep-16  How can i always get the date in my desired format (yyy-mm-dd) irrespective of the date format settings on the computer?

Update: Now that it's 2016 I'd use PowerShell for this unless there's a really compelling backwards-compatible reason for it, particularly because of the regional settings issue with using date. See @npocmaka's     What's a Windows command line statement(s) I can use to get the current datetime in a format that I can put into a filename?  I want to have a .bat file that zips up a directory into an archive with the current date and time as part of the name, for example, Code_2008-10-14_2257.zip. Is there any easy way I can do this, independent of the regional settings of the machine?  I don't really mind about the date format, ideally it'd be yyyy-mm-dd, but anything simple is fine.  So far I've got this, which on my machine gives me Tue_10_14_2008_230050_91:  rem Get the datetime in a format that can go in a filename. set _my_datetime=%date%_%time% set _my_datetime=%_my_datetime: =_% set _my_datetime=%_my_datetime::=% set _my_datetime=%_my_datetime:/=_% set _my_datetime=%_my_datetime:.=_%  rem Now use the timestamp by in a new ZIP file name. "d:\Program Files\7-Zip\7z.exe" a -r Code_%_my_datetime%.zip Code   I can live with this, but it seems a bit clunky. Ideally it'd be briefer and have the format mentioned earlier.  I'm using Windows Server 2003 and Windows XP Professional. I don't want to install additional utilities to achieve this (although I realise there are some that will do nice date formatting).


For example, in this question  there was another answer posted by Alex Poole after my answer. Afterwards, he deleted his answer since it was sort of duplicate.   However, the main page still shows his name along with the topic title, here   I understand that a deleted post is not actually permanently deleted, but stays unseen by other members, and only the poster can see it.   But the name shown beside the topic title in the main page is somewhat misleading. In the example shown, the entire thread doesn't show that posters name or contribution, but the main page is showing up. It is not going to hamper anything, I just had an observation.

:        It's way over two days and the link points to :        What caused the answer to get stuck in the list? Lots of posts get deleted and cleared from the list just fine so can't see what happened here.


I am trying to subtract a small double number from a large double number in C++. Here is my code  int main()  { double a=166666166667000000.000000; double b=1.0; double c=4.0; double d=10.0;  double ans_b=a-b; double ans_c=a-c; double ans_d=a-d;  printf("%f\n%f\n%f\n",ans_b,ans_c,ans_d); return 0; }   This Code is giving me following output -   166666166667000000.000000 166666166667000000.000000 166666166667000000.000000   However, all three are supposed to be different. Why does subtraction with double type behaves this way?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I'm creating a new Level 10 Character who is starting off multi-classing.  Each class has the following equipment:  Class #1        (a) a handaxe and a light hammer or (b) any   two simple weapons   a light crossbow and 20 bolts   (a) scale mail or (b) studded leather armor   thieves’ tools and a dungeoneer’s pack      Class #2        (a) two shortswords or (b) a shortsword and   shield   A quarterstaff and light armor   Your choice of gaming set   An ancient tome and a explorer’s pack      When selecting my starting equipment, do I get everything, mix and match (take hand axe and light hammer from Class #1, then quarterstaff and light armor from Class #2), or everything from one which class that he started as?  I know the DM can decide any of those, but what is the rule?

When multi-classing, do you take the equipment from your new class and add it to the equipment you got from your main class?


I believed I had been taught that only exponential family distributions have conjugate priors but I have recently read that ' all exponential family distributions have conjugate priors', leaving the possibility that there are non exponential family distributions with such. Is this a slip of the tongue or was my original learning mistaken?

Do all conjugate priors have to come from the exponential family? If not, what other families are known to have/produce conjugate priors?


I'm trying to write an exe that runs with out any window how cat I do that? How can I run/write an exe that will not open any window?  (A code example can be very useful).  Thank you very much!

How would you program a C/C++ application that could run without opening a window or console?


Improper integral of  $$\int_0^\infty x^ne^{-x/a} \, dx$$   I tried to do it by using Partial Integral and looked for the trend of $a$ and $n$ but it's confusing and I cannot finish it  Is there any other method to solve this? (I think of the Laplace Transform, but cannot find any relation)

Evaluating the integral $\int_{0}^{\infty}  e^{-x}x^n dx$ where n=0,1,2 ...   1st Integration by part: let $a=x^n$, $da= nx^{n-1} dx$, Also $db=e^{-x}$, $b=-e^{-x}$ We have $$ -x^n e^{-x} + n\int x^{n-1}e^{-x} dx$$  2nd: let $a=x^{n-1}, da= (n-1)x^{n-2}, db= e^{-x}, b= -e^{-x}$ We have $$-x^n e^{-x} + n\left[x^{n-1}(-e^{-x}) - \int(n-1)x^{n-2}\cdot -e^{-x}\right]$$  How would you find the general form? What would it be?


I usually see these sentences containing 'part of' or 'a part of' ,like  1.An apartment or compartment is part of a larger whole.  2.He spends at least a part of his time in reading.  What's the difference beween them, and how to use them in different conditions? Thanks a lot.

This question may seem to be very simple, but something I get confused whenever I want to speak.  I read a book entitled "re-start your English", and saw a sentence.     This is a leg. It is part of your body.      This is a neck. It is 'a' part of your body.   Why didn't they use 'a' in the first sentence? And why did they use one in the second one?  I'm not a native, so I hope you will please understand,  even if there's something awkward about my question.


I have been trying to simplify $\sum_{i=1}^{n-2}i(n-1-i)$  i.e - remove the summation, put it in polynomial form  Since $i$ is the changing variable, I don't think this is possible.  I also know that the simplified answer should be in polynomial form with highest degree 3, as this stems from a nested loop time complexity problem in programming.  Is it possible if we rewrite this summation, as it has a kind of symmetrical property.  The second half of the summation is identical to the first half.

While thinking about  I found out that this equality might be useful there: $$n\cdot 1 + (n-1)\cdot 2 + \dots + 2\cdot (n-1) + 1\cdot n = \frac{n(n+1)(n+2)}6$$ To rewrite it in a more compact way: $$\sum_{k=1}^n k(n+1-k)=\frac{n(n+1)(n+2)}6.$$  This equality is relatively easy to prove: $$\sum_{k=1}^n k(n+1-k)= (n+1)\sum_{k=1}^n k - \sum_{k=1}^n k^2 = (n+1) \frac{n(n+1)}2 - \frac{n(n+1)(2n+1)}6  = n(n+1) \left(\frac{n+1}2-\frac{2n+1}6\right) = n(n+1)\frac{3(n+1)-(2n+1)}6 =  \frac{n(n+1)(n+2)}6.$$ (We only used the known formulas for the   and the .)   Are there some other nice proofs of this equality? (Induction, combinatorial arguments, visual proofs, ...)     EDIT: Now I found another question which asks about the same identity:  (I have tried to search before posting. But the answers posted here so far gave me some new ideas for good keywords to search which lead me to finding that question.) The questions are, in my opinion, not exact duplicates since the other question asks specifically about combinatorial proofs and my question does not have that restriction. But I agree that this is a very minor distinction. In any case, if you think that one of them should be closed as a duplicate, then you can vote to close. I will refrain from voting to close/reopen on this question. (If one of the two questions is voted to be a duplicate of the other one, they probably cannot be merged, since the summation variables are off by one.)


I keep Ubuntu18.04 and Windows10 in dual boot. After updating the windows10, the GRUB menu to select the OS disappeared.  Things I have tried so far -   Boot repair by logging in system from bootable pen drive -  updating uefi from window by running bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi and restarting. Tried EasyUEFI app ()   "Fast Startup" is disabled on Windows10.  When I clicked on "Install" option while I had boot my system from bootable drive, it was able to detect existing installed Ubuntu18.04 and all the partitions are also there so I am sure it's not uninstalled but I am not able to fix it this time.  I had faced similar issue after past windows10 update but it always got fixed by running bcdedit command. This time nothing seems to work.

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


I have a legal site started in 2011, which used to rank top 5 for a particular keyword now disappeared to 6th page in google organic rankings.  The site hit its peak in 2017, but dropped in rankings dramatically and never recovered as of Oct 2019. You will see in the graph, the massive drop in Jan 2019, is attributed to converting our site from html to wordpress.    I cant seem to think of any other reason , except competitors reporting by site as spam to google. There is no manual penalty or nothing. I disavowed bad links last month, the rankings slightly improved but as as high as 2017 levels. We have setup 403 redirects of all old pages to new pages when moving our site html to wordpress.  The site has excellent quality content despite this rankings never recovered. I have exhausted all options in SEO.   Which google core update or algorithm hit this site? What could have caused this rankings drop?  Any suggestions will give us some hope.

There has been a significant drop (90%) in traffic from Google to one of my well-established sites (6+ years) in the last week. Searches show that the top 3 wide keywords all dropped 4 spots. Searches for other keywords do not show ANY results in the first 10 to 25 pages of results, while previously one 1st or 2nd page at most.  Since there are , the question really is:  What steps are necessary to figure out what caused such a drop?  There have been no major changes during this period or the last month on the site and certainly not in the homepage which has dropped in rank. Over all the years of running this site and plenty of others, I have never experienced this. There are is duplicate content on my site and I have rigorously used canonical links for the last few years to ensure it is not misinterpreted as such.


This is my first tex question. I couldn't find a duplicate since I'm not even sure how to describe this layout in English...It looks like this:  [item1]     [explanation of item1......may be very long             accross several lines, may contain math, and             need to be wrapped automatically]  [item2]     [explanation of item2.......................             ............................................             ....................]   The space between items and explanations should be adjustable (usually several tabs in vim).   I have tried the alltt package and use tabs(spaces) to get the layout, however, it cannot do automatic line wrapping and I have to manually break lines, so that's not really a solution.  Thanks in advance for any help.

Which is the right way to do something like 'description' list but with customizable and fixed-width labels? I.e. something like this:  Label:         Text text text text text text                text text text text. Longer label:  Text text text text text text                Text text text text.   The way I see it to use two-column table (first columt for labels and second column for descriptions), but this solution seems ugly. Is there any other way?


I need to change permission for all the files on my hard disk [not system files]. I have retrieved more than 1.2 Lack files and I need permissions to delete or write those files .

I would like the user to have full rights on this folder (as well as all sub-directories and files in it):  ~/.blabla   currently owned by root.  I have found numerous posts (in this forum and elsewhere) on how to do this for files but I can't find a way to do it for whole folders.


Let $R$ be the ring of continuous functions $\mathbb{R}\rightarrow\mathbb{R}$ with the usual operations and $I$ the subset of functions $f$ with $f(x_0)=0$ for some $x_0\in\mathbb{R}$.  It's easy to see that $I$ is a prime ideal but I can't see how to show that is maximal and what is the quotient $R/I$.

Well, the problem I'm trying to solve is this:      Let $A$ be the ring of all continuous functions from $\mathbb{R} \to \mathbb{R}$. Show that $M = \{f \in A: f(0)=0\}$ is a maximal ideal of $A$.   I tried to show that if $J$ is an ideal of A that properly contains M, so $J = A$: we know that there is a function $g \in J$ with $g(0) \neq 0$. So, we have that $$J \supseteq \langle g, M\rangle=\{ag+f;a \in A, f\in M\}$$   I tried to show that 1 $\in$ $\langle g,M\rangle$. However I'd have to find some function $h(x)\in A$ such that $h(x)(ag+f) = 1$, but this function $h$ has to be different from 0 for all x $\in \mathbb{R}$, so I don't know how to find this function.  My second idea to solve this problem was prove that the quocient $A/M$ is a field. We have that $$A/M = \{h(x) + M; h(x) \in A\},$$ but again I have the problem to show that all elements of $A/M$ are units.  If someone could help, I would be really grateful (:


I tried to decrease the headheigth size as I think the white space is a little bit big when there is a new chapter headline (as seen at the picture).  But when I tried to decrease the size, it gave me an error:  Package Fancyhdr Warning: \headheight is too small (5.0pt): Make it at least 13.59999pt. We now make it that large for the rest of the document. This may cause the page layout to be inconsistent, however.  I have already searched about this issue but I haven't found any solution yet. I used this template and already changed a bit: \documentclass[11pt, a4paper, oneside]{report} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc}  %\renewcommand{\familydefault}{\sfdefault} \usepackage{lmodern}  \usepackage[backend=biber,style=alphabetic,sorting=ynt]{biblatex} \usepackage{microtype} \addbibresource{references.bib}  \usepackage[ngerman]{babel} \usepackage{csquotes} \usepackage{subcaption} \usepackage[hidelinks]{hyperref} \usepackage{ragged2e}  \usepackage{acronym} \usepackage{graphicx} \graphicspath{ {./images/} }  \usepackage{fancyhdr} \setlength{\headheight}{15pt} --> Here I tried to decrease the size  Since this are my first steps in LaTeX, I am sure this can be quite easily solved but right now it seems I am unable to find a solution.

I want to decrease the vertical space between the top of the page and the chapter heading. I have tried to follow the instructions for titlesec but I am not successful. I have tried the following two setups without any changes occuring.  First:  \documentclass[12pt]{report}   \usepackage[compact]{titlesec}   \begin{document}   \chapter{Characters}  The origin of the group determinant begins with Richard Dedekind in the late 1800's. He began to explore the idea after studying the discriminant in a normal field [A]. He made several observations about the group determinant, but was only able to prove some of them.   \end{document}   Second:  \documentclass[12pt]{report}   \usepackage{titlesec}   \titleformat{\chapter}[display]   {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}   \titlespacing{\chapter}{0pt}{0pt}{0pt}   \begin{document}   \chapter{Characters}    The origin of the group determinant begins with Richard Dedekind in the late 1800's. He began to explore the idea after studying the discriminant in a normal field [A]. He made several observations about the group determinant, but was only able to prove some of them.   \end{document}


I'm travelling to the US from the UK under the visa waiver programme (ESTA approved).  I'm going for 1 week, coming back to the UK for 3 days (for work reasons), then going back to the US for another 3 weeks. Is this going to be a problem at border control, i.e. are they going to think I'm trying to reset a 90-day visit even though I'm only there for a few weeks at a time?

I am visiting the US in August 2014 for a week, returning home to the UK & will then be visiting for another 2 weeks in October 2014.  My question is, can I use the same ESTA or would I need to reapply for the second visit? I think the ESTA lasts 90 days but I am unsure if you can leave & re-enter?


I am trying to compare the color gamut of a few screens but some of the screen's specs show the percentages in sRGB and some in adobe RGB. For example one screen has 72% Adobe RGB and another has 100% sRGB. How can I compare these two values when they are in different color spaces?  I know that there is some overlap between the color spaces, does this mean I can use some kind of equation to calculate the comparison at least to an approximate value?  or do I just have to decide which color space I want to use and go from there?  I just can't find a comparison chart or the way to calculate this, although I did find an occasional post that states that 91% Adobe RGB is about 89 sRGB and similar posts. How did they arrive at this conclusion?

Is sRGB included in Adobe RGB, and Adobe RGB included in ProPhoto RGB? Meaning that a photo in a "lower space" will look like exactly the same in a "higher space", e.g. a sRGB photo will look like exactly the same in a Adobe RGB space.  I noticed the size of a sRGB photo is bigger than the same one in Adobe RGB, which I don't understand since the color space is bigger.


I've created a script to empty my trash. I want to be able to execute it without having to use the terminal. Is there anyway I could do this?

How can I make a bash script executable by double clicking just like .exe files in Windows? I tried , but there are two consequences:   the terminal twinkles, disappears, and nothing is done. you must specify to run in terminal in order to work.   I have a script that installs tomcat on an offline PC, including all dependencies of tomcat in the script. I need to make the script work on double clicking like windows since most who use the script will not be familiar with Ubuntu.  Forget the above explanation. I want to make a script that can be run by double-clicking on it, without using the terminal. Anybody knows how?


I have a piece of code which has several loops in it. By checking a condition (using an if statement) I want to come out of all the loops except the last one. Is there a way to do it without modifying much of my code as I have very less time to submit it.   for file in dirs:    ....    ....    #Opens a file in the directory    with open(path, 'rU') as csvfile:        ....       ....       ....       #Iterates over every row in the File       for row in csvreader:           ...           #If the data is insufficient, the next row will be iterated.            if len(Parameters)>15:                                  #If this condition is not satisfied then I need to go to the next iteration of the first 'for' loop           #Without Calculating the Average_Slip             ....           ....           Calculation_of_Slip()            #Because when all the rows are done iterating, Average_Slip encounters an error as the input values depend on the Slip.              #Instead I need to go to the next file in the directory     Average_slip(Slip_3MW,Slip_7MW,Slip_9MW,Counter_1, Counter_2, Counter_3, Counter_4)   I am sure I am missing something very simple but can anyone please help me.

Given the following code (that doesn't work):  while True:     #snip: print out current state     while True:         ok = get_input("Is this ok? (y/n)")         if ok.lower() == "y": break 2 #this doesn't work :(         if ok.lower() == "n": break     #do more processing with menus and stuff   Is there a way to make this work? Or do I have do one check to break out of the input loop, then another, more limited, check in the outside loop to break out all together if the user is satisfied?


So I keep getting the error: UnboundLocalError: local variable 'old_result' referenced before assignment and I dont exactly know why. I usually code in javascript, so im new to python but as much as ive figured its because i declare old_result in the function again, but I would like to make it global and just change its value in the function. Anyway I can fix this?  from PIL import Image, ImageGrab import pytesseract import threading import winsound   old_result = 100  def ocrit():     threading.Timer(5.0, ocrit).start()     img = ImageGrab.grab(bbox=(110,70,250,200))     result = pytesseract.image_to_string(img,      lang='eng')     print(result)     new_result = int(result)      if new_result < old_result:         print("play da music")         old_result = new_result   ocrit()

How can I create or use a global variable in a function?  If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?


I need to find the infinite sum of the following series expansion   $$1/3 + 2/3^2 + 3/3^3 + 4/3^4 + \dots + k/3^k + \dots$$  I know that  $$x/(1 - x) = x + x^2 + x^3 + \dots + x^k + \dots$$   We need to find the $x$ value in order to find the infinite sum. What could the $x$ value be? I am not sure.

I would like to know: How come that  $$\sum_{n=1}^\infty n x^n=\frac{x}{(x-1)^2}$$  Why isn't it infinity?


I am trying to understand  paper. It uses PCA and further uses LDA for dimensionality reduction.   I have read about eigenfaces and PCA approach but I am not familiar with LDA and I am unable to understand the mathematics behind the scatter matrices : why to minimize the determinant of projected scatter matrices and how we perform it.   Can anyone explain the maths behind LDA and how the generalized eigenvalues come into picture or point to some related tutorial where I can understand the approach?

Apparently,     the Fisher analysis aims at simultaneously maximising the   between-class separation, while minimising the within-class   dispersion. A useful measure of the discrimination power of a variable   is hence given by the diagonal quantity: $B_{ii}/W_{ii}$.     I understand that the size (p x p) of the Between (B) and Within-Class (W) matrices are given by the number of input variables, p. Given this, how can $B_{ii}/W_{ii}$ be a "useful measure of the discrimination power" of a single variable? At least two variables are required to construct the matrices B and W, so the respective traces would represent more than one variable.  Update: Am I right in thinking that $B_{ii}/W_{ii}$ is not a trace over a trace, where the sum is implied, but the matrix element $B_{ii}$ divided by $W_{ii}$? Currently that is the only way I can reconcile the expression with the concept.


I'd like to update TextBox.Text in a thread but it doesn't work and I get this error (In French) :     System.InvalidOperationException : 'Opération inter-threads non valide : le contrôle 'TextBOX' a fait l'objet d'un accès à partir d'un thread autre que celui sur lequel il a été créé.'   In English (Google Translate) it looks like :     System.InvalidOperationException: 'Invalid inter-thread operation: The' TextBOX 'control has been accessed from a thread other than the one on which it was created.'   How can I do so ? Here is my code :  using System; using System.IO; using System.Windows.Forms; using System.Threading.Tasks;  namespace Ace {     public partial class Checker : Form     {          public Checker()         {             InitializeComponent();         }          private void Checker_Load(object sender, EventArgs e)         {             status("Checking ...");             check();             status("Done !");         }          public void check()         {             int threads = 10;             var lines = File.ReadLines("test.txt");             Parallel.ForEach(lines, new ParallelOptions { MaxDegreeOfParallelism = threads }, line =>             {                 TextBox.Text = TextBox.Text + line + "\n"; // THIS LINE             });         }     } }   Thanks in advance.

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


I recall reading a book a long time ago which had an interesting concept of magic. Essentially, magic created superhumans by taking the attributes of one person and giving them to another. So, for example, the king had three or four people bound to him magically, each of whom had no physical strength whatsoever because they were giving it to the king. I specifically remember a moment where the newly-coronated king meets the people who had given their mental capacity to his father - the "King's Wits" they were called.  But I can't for the life of me remember what the book(s) were called. I only read the second or third one in a series, and it was ten or fifteen years ago. I recall the cover art included some big non-human creatures with oversized noses. I thought the magic system was interesting, and figured I might like to re-read the book(s). Anybody know what I'm talking about?

I read a fantasy novel years back. I honestly don't remember much of the plot (it was SEVERAL years back) but I remember the magic system that was used.  It was possible for an individual to grant portions of their physical and/or mental powers to another person.  For example, a person could grant his/her sight to someone else and spend the rest of their life blind (or with exceedingly poor vision) while the recipient would see twice as well as anyone else. In the book there were whole cities devoted to enhancing the nations army, or a specific person, etc.  Anyone have a thought what this book or series is?


Say i hit www.google.com in browser , my question is how data is served from google(or any other website) server to my browser. I raed couple of articles/videos . Based on them here is mine understanding and some inline questions   I enter www.google.com in browser  Browser resolves google name with IP though DNS server(with the help of my Internet service Provider(ISP)) Data travels from my latop to modem in my room Modem send the data to my ISP say comcast Now each ISP is connected to internet exchange physically(through wire) Right ? Google server is also connected to Internet exchange.If yes not sure how ? Similarly if i host my new website through any web hosting service provider(WHSP), then that WHSP must be connected to internet exchange Then router at internet exchange will route the data to google server connected to Internet exchange Google server will process the request and send the response back    Please correct if i am wrong somewhere here ?

What happens behind the scenes when we type www.cnn.com in a browser and how does information gets displayed on the screen?   A technical explanation would be highly appreciated.


I have a slightly unusual situation. I've got some files in a folder (as you do), and I'd like to make a copy of them to another locations (easy so far). However, I'd like this secondary copy to automatically update and synchronise with the first. I already do this between two of my computers using syncthing, but I can't work out how to do it on the one computer!

I want to synchronise two folders in real time under Windows 7.  Basically, I want to monitor a folder and synchronise each change (new files, changed files, deleted files) to another drive. It has to be in real time, so it gets synchronised instantly when a change happens. A one-direction synchronisation is enough.  I tried Microsoft's , but it does only syncing by hand or scheduled (thus not satisfying the "real-time" requirement).  Can this be achieved with Windows 7 itself? If not, are there other methods of doing this?


I found out that even the users less than 1000 rep has expanded usercards, like me. In the privilege of the established user, the usercard section is gone. When did this change apply?

Pursuant to discussion on the , several have asked how far they'll need to search to determine if a user has expressed their preferred pronouns. This requested feature could create an easy solution for that concern.  On sites where I've reached the  privilege level, users can hover over my picture to see a snippet of my profile:    This is where I've included my preferred pronouns, and where I see many others including them as well.  By making this feature universal, users could quickly and easily check for preferred pronouns without needing to navigate to another page.


this is my adapter code:  public class DataAdapter extends RecyclerView.Adapter<DataAdapter.ViewHolder>  implements Filterable{   private ArrayList<AutoData> resultList; private ItemClickListener itemClickListener;    public DataAdapter(ArrayList<AutoData> resultList) {     this.resultList= resultList;     this.itemClickListener = itemClickListener; }  @Override public DataAdapter.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {     View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_place_card, viewGroup, false);      return new ViewHolder(view, itemClickListener); }  @Override public Filter getFilter(){      Filter filter = new Filter() {         @Override         protected FilterResults performFiltering(CharSequence charSequence) {             FilterResults filterResults = new FilterResults();              filterResults.values = resultList;             filterResults.count = resultList.size();             return filterResults;         }          @Override         protected void publishResults(CharSequence charSequence, FilterResults filterResults) {           }     };     return filter; } @SuppressLint("NewApi") @Override public void onBindViewHolder(ViewHolder viewHolder, int position) {      viewHolder.tv_name.setText(resultList.get(position).getName());     viewHolder.tv_address.setText(resultList.get(position).getAddress());  }  @Override public int getItemCount() {     return resultList.size(); }    public static class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener{      private TextView tv_name;     private TextView tv_address;     private EditText editText;     private WeakReference<ItemClickListener> itemClickListenerWeakReference;        public ViewHolder(View view, ItemClickListener itemClickListener) {         super(view);          itemClickListenerWeakReference = new WeakReference<>(itemClickListener);         tv_name = (TextView)view.findViewById(R.id.name_text_view);         tv_address = (TextView)view.findViewById(R.id.address_text_view);         view.setOnClickListener(this);          editText = (EditText) view.findViewById(R.id.location_input);      }       Context mCon;       MainActivity mainActivity;       @Override     public void onClick(View v) {           String string = (String) tv_name.getText();         Toast.makeText(v.getContext(), "ROW PRESSED = " + string, Toast.LENGTH_SHORT).show();         mainActivity.etPlace.setText((string));     } }   when I run my app I see this Error:     java.lang.NullPointerException: Attempt to read from field   'android.widget.EditText   com.example.user2.trafficmap.MainActivity.etPlace' on a null object   reference                         at com.example.user2.trafficmap.DataAdapter$ViewHolder.onClick(DataAdapter.java:133)   how can I fix this problem?

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


If we bring a floating balloon in a accelerated train, the balloon will move forward in the same direction as the acceleration as shown in the following figure.     However if a pendulum is hung on the train ceiling, the ball moves backward. We also get moved backward in the accelerated train.  Could you explain why the floating balloon behaves differently?

I noticed that when I had a helium filled, latex balloon inside of my car, it moved forward in the cabin as I accelerated forward. The faster I accelerated forward, the faster the balloon went from the back of the car to the front of the car. The balloon didn't have a string.  This became a game with my 4 year old as we drove home. We figured out where the balloon would go based on how fast I accelerated, turned corners etc.  I expected that it would act a lot like the water in a cup does, but it was the total opposite it seemed.  What forces caused this behavior?  I assumed it has something to do with the fluid dynamics in the closed cabin, but I can't figure it out.


Question: A rectangle and an ellipse are both centred at $(0,0)$.        The vertices of the rectangle are concurrent with the ellipse as shown         Prove that the maximum possible area of the rectangle occurs when the x coordinate of   point $P$ is $x = \frac{a}{\sqrt{2}} $     What I have done  Let equation of ellipse be   $$ \frac{x^2}{a^2} + \frac{y^2}{b^2} = 1$$  Solving for y  $$ y = \sqrt{ b^2 - \frac{b^2x^2}{a^2}} $$  Let area of a rectangle be $4xy$  $$ A = 4xy $$  $$ A = 4x(\sqrt{ b^2 - \frac{b^2x^2}{a^2}}) $$  $$ A'(x) = 4(\sqrt{ b^2 - \frac{b^2x^2}{a^2}}) + 4x\left( (b^2 - \frac{b^2x^2}{a^2})^{\frac{-1}{2}} \times \frac{-2b^2x}{a^2} \right) $$  $$ A'(x) = 4\sqrt{ b^2 - \frac{b^2x^2}{a^2}} + \frac{-8x^2b^2}{\sqrt{ b^2 - \frac{b^2x^2}{a^2}}a^2} = 0 $$  $$ 4a^2\left(b^2 - \frac{b^2x^2}{a^2} \right) - 8x^2b^2 = 0 , \sqrt{ b^2 - \frac{b^2x^2}{a^2}a^2} \neq 0 $$  $$ 4a^2\left(b^2 - \frac{b^2x^2}{a^2} \right) - 8x^2b^2 = 0 $$  $$ 4a^2b^2 - 4b^2x^2 - 8x^2b^2 = 0  $$  $$ 4a^2b^2 - 12x^2b^2 = 0  $$  $$ 12x^2b^2 = 4a^2b^2 $$  $$ x^2 = \frac{a^2}{3} $$  $$ x = \frac{a}{\sqrt{3}} , x>0 $$  Where did I go wrong?  edit:The duplicate question is the same but both posts have different approaches on how to solve it so I don't think it should be marked as a duplicate..

The actual problem reads:      Find the area of the largest rectangle that can be inscribed in the ellipse    $$\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1.$$   I got as far as coming up with the equation for the area to be $A=4xy$ but then when trying to find the derivative I don't think I'm doing it right.


When a diamond moderator locks a question, there's a choice to have it auto-unlock in an hour, a day, a week, or not at all. Generally, this function works fine.  However, I locked every post on  for an hour, and while the question auto-unlocked an hour later, I had to manually unlock the answers. I doubt it's a cron issue because the question was the last thing I locked, so if it unlocked, everything else should have as well.  Furthermore, the lock box displayed a "Unlocks in xx minutes" note (visible to mods only, I think) on the question lock, but not on any of the answer locks.  On that basis, I'm pretty sure the timer lock on answers doesn't work. If it's supposed to work, please fix it; if there's supposed to be no timer at all, please make it work nonetheless, because it would be incredibly useful in situations like this.

Tested on Stack Overflow, Stack Overflow Meta and Pets.  Questions  Temporary locks on questions are showing the duration (mod only).  Stack Overflow.   Meta Stack Overflow.   Pets.   Answers  On answers they are not and there's no way to find the lock duration when we use timeline tools to examine the post.  Pets.   Stack Overflow.   Meta Stack Overflow.   Is this something that hasn't been implemented or is it a bug?  If it hasn't been implemented can we please have it implemented?


So the other day I was making a window frame and baking to a plane..Got my results.. Then, Made several out of planes..baked, worked fine..  Now.. I am making a building model and tried the same thing...Horrible results.  Can anyone look at this and give me some ideas? Thanks.  Both models are in same exact location..I have tried different shaders.. I'm trying to keep tri and vert count low as possible as it's a mobile game.  First image shows the window frame..second the ugly normal being baked..then low pol and high pol meshes.  I'm relatively new and this is my learning model so I want to perfect everything possible on this model before I move on to the next.

I'm trying to bake a normal map from a high poly mesh, and apply on a low poly mesh (in Unreal Engine 4). Bare with me as I'm new to Blender, and especially new to normal map baking with Blender.  I'm not sure how to accomplish this task. The guides I've seen and read, explain how to uv unwrap the low poly mesh -> select the high poly -> shift-select the low poly -> hit bake (normal -> "Selected Active").  For some reason, everything shows up completely blue (no color variation -> No elevation information), and I'm not sure how to accomplish the baking?  The UV of the low poly:    Normal Map:    Low poly VS. High poly:    Could anyone help me?  EDIT:  Of course I'm aligning the 2 meshes so Blender can read the elevation differences.


In DJ Griffiths' ''Introduction to Quantum Mechanics" to describe an unstable particle that spontaneously disintegrates he assumed an imaginary part in the potential. What does that signify? What is meant by an imaginary potential? I have added the image of the problem.

In section 134 of Vol. 3 (Quantum Mechanics), Landau and Lifshitz make the energy complex in order to describe a particle that can decay:  $$ E = E_0 - \frac{1}{2}i \Gamma. $$  The propagator $U(t) = \exp(-i H t)$ then makes the wavefunction die exponentially with time.  But also, $H$ is non-Hermitian.  My question: Do we have to modify the basic postulates of quantum mechanics (as described by Shankar, say, or the earlier sections of Landau & Lifshitz) to describe unstable particles?


package bankproject;  import java.io.IOException; import java.net.URL; import java.util.ResourceBundle; import java.util.function.UnaryOperator; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.input.KeyEvent; import javafx.scene.control.Button; import javafx.scene.input.MouseEvent; import javafx.scene.control.Label; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; import javafx.scene.layout.AnchorPane; import javafx.scene.text.Font; import java.util.Arrays; import java.util.List;  /**  *  * @author chris  */ public class FXMLDocumentController implements Initializable {      @FXML     public TextField aANum;     public AccountManager am;     public TextField aAName;      @FXML     public void addBtn(ActionEvent event) {         String name;         double d;          name = aAName.getText();         d=Double.parseDouble(aANum.getText());          System.out.println(name+d); // <-- tested output here and im able to view it         am.addAccount(name, d); ///<----getting the null error here when trying to created a new account that requires(string,double)     }      @Override     public void initialize(URL url, ResourceBundle rb) {      } }   Ive cut down my code back to basic due to me getting the error across multiply screens. and commented where I am getting the error.  what I am trying to do is add a name and a double from a two separate textfields with a single button on the same page of my form. if I take away the am.addAccount" line I am able to print the values to the console. only when i try and add them to the account do i get the null point error.  Thanks in advance for any help and advice.