In physics, I have come across some definitions of physical quantities (one such definition is that of the physical quantity Force, $\vec{F} \equiv m\vec{a} $) that do not tell us what physical quantities are.   I guess the following statement:     Experiments tell us that these definitions are reasonably accurate, and that they help us construct reasonable mathematical models   (Corrections are welcome)   My question is, do all definitions in physics avoid the questions, "What is Force?", "What is momentum?", etc.?

Operational definitions are constructed from the observations we make in nature. Experiments show us that two objects $m_1$ and $m_2$ in a local inertial frame, isolated from the rest of the universe, interact in a way such that the ratio of their accelerations $a_1$ and $a_2$ is a constant. Also from observations, an object's acceleration depends on a property (which is observed to be an inherent property) termed mass. The property Mass is then defined as, $$m_2 \equiv m_1 \frac{a_1}{a_2}$$     We could define some other property, call it property $Z$, such that, $Z_2 \equiv Z_1 (\frac{a_1}{a_2})^2$. This property is not useful when compared with mass.    How is it evident that the definition of Mass and not property $Z$ (or any other property) is useful? What is the need of defining mass when it is known that mass is the amount of matter in a substance?       The operational definition of Force sidesteps the question, "What is a Force?"     How does the definition of Force avoid the question?  Are there any operational definitions of physical quantities that tell us what physical quantities are or do these definitions only exist because they help us do physics?


console.log(Number.MIN_VALUE);  // 5e-324 console.log(Number.MIN_VALUE - 1); // -1   Value of Number.MIN_VALUE is 5e-324, but if I subtract 1 from it, -1 is returned.  It looks like some garbage value but I'm wondering why JavaScript interpreter cannot represent it. Otherwise, Number.MAX_VALUE + 1 is same with Number.MAX_VALUE(1.7976931348623157e+308).  Is there something different between calculating Numbers.MAX_VALUE and Numbers.MIN_VALUE?

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


I know the speed of light problem has been beaten do death by hundreds of questions and answers, but I wanted to explore a new possibility and perhaps show an indication that light-speed as a constant is a man-made theoretical limit.  Would you please tell me if my musings are incorrect?  Now onto the subject at hand.   Suppose somewhere in the universe there are about 5000 different celestial bodies in a gargantuan solar system, each spread out the distance between the earth and the moon, each weighing approximately the size of 1 earth.   If by certain miracle, the orbits of those celestial bodies (planetoid objects) are arranged as such that 1) they are on the same plane, and b) all bodies line up almost perfectly with one another (at the time of the experiment).   It follows that if we launch a space vehicle, say a shuttle, and use gravity assist around those celestial bodies, we could theoretically increase the speed of that vehicle (provided that it doesn't rip itself apart from the inertia) 5000 times. As we have already achieved speeds of 150,000 mph using gravity assist in the past - wouldn't it follow that doing this 5000 times in sequence would eventually break the light speed barrier?

In Newtonian mechanics, if we throw an object in against direction of gravity with speed $v$ and it achieve max height of $h$. Now if we allow object to fall from that height $h$, it will eventually attain speed $v$ when it reach position where we launch it.   Now applying same idea to a black hole in general relativity. Speed require to escape black hole gravity is greater than $c$, so if we throw something into black hole with almost the speed of light, the object speed will exceed speed of light $c$ before hitting black hole surface! How relativity explain this? Can space-time curvature reduce speed of this freely falling object from attaining speed of light?


I cannot seem to get the Windows username of the logged in user via Php / Apache.  I have downloaded and added this module in Apache:  LoadModule authnz_sspi_module modules/mod_authnz_sspi.so   But when I call this from PHP via:  print $_SERVER['REMOTE_USER'] ;   I still get: Notice: Undefined index: REMOTE_USER. Please note this is an intranet site so running on an internal LAN. The server hosting the site is XAMPP.  I have also tried this:  but I am getting a prompt to re-enter my username and password (using Chrome and IE) something which I do not want. I also added this to my httpd.conf:  <Directory "C:/xampp/htdocs">  Options None  AllowOverride All  Order allow,deny  Allow from all  #AuthName "SSPI Protected Place"  AuthType SSPI  SSPIAuth On  SSPIAuthoritative On  SSPIOfferBasic On  SSPIOmitDomain On  Require valid-user  </Directory>

I have a PHP web application on an intranet that can extract the IP and host name of the current user on that page, but I was wondering if there is a way to get/extract their Active Directory/Windows username as well. Is this possible?


I have come across a problem with the console handler of my code. I don't know if reading in after assigning it to s.nextLine(); discards the current value of in. Not sure if anything else could affect the String from being read correctly in one line, and incorrectly in the next.  Thanks in advance!  while (loop == true) {         Scanner s = new Scanner(System.in);         String a = s.nextLine();         String in = a;         info("User input: " + in, "DEBUG", 0);         if (in == "kill") {             info("Are you sure you would like to kill the running instance? [Y/N]", "CONSOLE", 0);             if (in == "Y" || in == "y") {                 info("Starting KILL method.", "CONSOLE", 0);                 s.close();                 loop = false             } else if (in == "N" || in == "n") {                 info("Cancelled.", "CONSOLE", 0);             } else {                 info("Illegal arguements given. Cancelled.", "CONSOLE", 0);             }          } else {             info("Illegal Arguements given.", "CONSOLE", 0);         }      }   When I typed kill in the console, it gave me this:  [info @ DEBUG/0]> User input: kill [info @ CONSOLE/0]> Illegal Arguements given.

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 would like to connect a bell to a transformer as part of a project im working on. The only thing i cannot seem to find an answer to is wether or not the output from a transformer is fixed:  Say i was to plug a 24v 330ma step-down transformer into the bell (which operates at 24v 30ma), what would happen?:  A: The transformer overprovides, the bell takes everthing it's given and burns itself out.  B: Only the required amount of current is taken by the bell and everthing operates as normal.  C: Something else (?).

I'm trying to make a welder-like transformer, but I'm having the problem that apparently I'm drawing too much current from the primary side of the transformer as the variac I'm using to supply about 10V is getting too hot. The variac is a chinese model rated for 20A, and unfortunately I have a 30A circuit and 30A fuse installed so the variac is smoking and trying to catch fire instead of fuse-blowing.   How can I limit the current on the primary side to 20A?  I did some calculations on the reactance of that coil and determined its current limiting capability is a very high current limit (293A, 0.001 H). The formula I'm using is 2 x PI x 60Hz x L = Ohms impedance. Whats puzzling to me is that this formula doesn't account for the magnetic permeability of the core or anything. Or is that already accounted for in the L reading? I measured the L via an LCR gauge across the coil wound around the transformer.  Another thing I'm wondering about is will an increase in current on the secondary side of a transformer (due to low resistance) cause an increase in current in the primary side?  I know the ratio of turns is inversely related to current (high voltage, low current : low voltage, high current), but isn't current determined by resistance of the load? Does a high current on secondary from low resistance cause a proportionately higher current on the primary?  Is a transformer like a set of 3 gears, with gear size being turns/voltage, the middle gear being flux, and the speed of the first and last gear being current? I like to visualize electronic components like water or physical machines.  Sorry for all the questions but this will sure help me out a bit.  My current course of action is to get an AC welding transformer and rewind the secondary with thick wire (2 ga) for high current output. I'm hoping that the primary's inductance is high enough to limit primary current to 20A (same as the welder's spec).   Thanks


I'm a long-time Linux user, and a non-native speaker. Just like in Windows, Linux supports the Alt+Shift keyboard combination to switch between input languages. However, its behavior is more forgiving if you mistype and press Alt, followed by Shift, without overlap. On Linux (and  OSX), this results in nothing. On Windows, it detects the lone "Alt" key being pressed, and activates the menu bar of whatever app you're running.  On Windows, this is especially unnerving in a chat application like Skype, when you are frequently switching between languages, and you may not immediately see that you mistyped, Windows selected the menu for you, and the next characters you're typing actually open up some weird menu, or log you out, or inadvertently start a video call. So it's a pet peeve, but it's driving me crazy.  In short, the question boils down to how do you make Left Alt in Windows to behave purely as a modifier key (without triggering any action if it is pressed all by itself)?  AutoHotKey or AutoIt hackery is okay. However  solution doesn't really work, since it breaks most Alt+something shortcuts.

In Windows 7 how can I disable the function that activates the menu bar when Alt is pressed?  Are there some registry values to modify this behaviour?


We are asked to show that $$\left|\dfrac{\mathrm dy}{\mathrm dx}\right|+\left|y\right| +1=0$$ has no real solutions.    My proposed solution: Of course, $\left|\dfrac{\mathrm dy}{\mathrm dx}\right|$ and $\left|y\right|$ are non-negatives and 1 is positive. So, sum of all three of them can't be equal to zero (must be positive here) for any function $y=f(x)$.    My question: Is this argument strong enough to show that the ODE has no real solutions?

The given differential equation $$\lvert{dy\over{dx}}\rvert\,+\mid{y}\mid+1=0 $$  I don't know how to deal with modulus sign in order to prove the statement  Reference-Different Equations by Shipley L Ross Ch1 Exercise 7(a)


I don't know if this is the right place to ask this kind of question but here goes.  I have 3 IPs on my server,  which I'm running for shared hosting. The main shared IP gets blacklisted sometimes, obviously sometimes an account is compromised and it sends  out spam so the IP gets blacklisted, that I can understand, I try to limit it as much as I can but where I am from, it is really hard to convince a customer to update their CMS so they don't keep getting hacked.  And that goes for most accounts so no point of kicking them all really : )  The strange thing though is, I have an important account on a dedicated IP, which I thought will solve the blacklisting problem for him! To my surprise this IP address got blocked as well even though it did not send out any spam, maybe only because it is on the same subnet?? Or how do those blacklists end up blocking my other IP?  Also if you guys can point me to the right direction as to what measures I should take to prevent this from happening again and again, I thought clamd or spamassassin should work to prevent spam, but obviously they work for incoming messages not outgoing messages.  I decided to take a somewhat drastic  measure, I will setup a script that runs every hour or so, count the number of messages in the queue for each domain, and if the number exceeds X amount of messages, the domain will be blocked from sending email until reviewed.  Is there anything I can do to actually DETECT outgoing spam, so it does not have to flood the queue.  Thanks

This is a  about Fighting Spam.   Also related:                    There are so many techniques and so much to know about fighting SPAM. What widely used techniques and technologies are available to Administrator, Domain Owners, and End Users to help keep the junk out of our inboxes?  We're looking for an answer that covers different tech from various angles. The accepted answer should include a variety of technologies (eg SPF/SenderID, DomainKeys/DKIM, Graylisting, DNS RBLs, Reputation Services, Filtering Software [SpamAssassin, etc]); best practices (eg mail on Port 25 should never be allowed to relay, Port 587 should be used; etc), terminology (eg, Open Relay, Backscatter, MSA/MTA/MUA, Spam/Ham), and possibly other techniques.


From this, I know that $d=sa+tb$ for $s,t\in \mathbb{Z}$. Also, that $d|a$ and $d|b$. I don't know where to go from there.   I understand that if $a/d$ and $b/d$ were not relatively prime, then $d$ would not be the GCD.

Prove that if $d$ is a common divisor of two integers $a$ and $b$, then $d=\gcd(a,b)$ if and only if $\gcd(a/d,b/d)=1$.   So far I used what was given so I have $a=dk$, $b=ld$ and $\gcd(a,b)=d$ can be written as a linear combination of $ax+by=d$ but I am unsure how to use the information.   Where do I go from here? Can someone show me how to solve this using Bezout's Identity if possible?


When doing drush pm-list I get a whole list of modules but too much info also, like this:  Mail               Privatemsg filter (privatemsg_filter)          7.x-1.4 Mail               Privatemsg Limits (privatemsg_limits)          7.x-1.4 Mail               Privatemsg roles (privatemsg_roles)            7.x-1.4`    I have to edit in notepad++ and run macros...  I want the module list, but ONLY drush module names X_Y   Is there a way to get a clean list like:  module_a module_b module_c    ONLY  And then can use it as:  drush en module_a module_b module_c

Is there a way of having a list of all the used (active) modules on a site ?  I am in the process of documenting a site and would like to list all the active modules, I know I can take them from admin/modules but there must be another way.


Is it necessary to do data normalization(standardization) before using gbdt?what effect does it have if I don't do that proprecessing?

Doing research about the xgboost algorithm I went through the .   I have heard that xgboost does not care much about the scale of the input features  In this approach trees are regularized using the complexity definition $$ \Omega(f) = \gamma T + \frac12 \lambda \sum_{j=1}^T w_j^2 $$ where $\gamma$ and $\lambda$ are parameters, $T$ is the number of terminal leaves and $w_j$ is the score in each leaf.  So does this not make it important to scale the features before feeding into xgboost? $\sum_{j=1}^T w_j^2$ term in the regularization part of the cost function is directly influenced by the scale of the features


Show if $U_1\subset\ U_2$, then $U_2^\bot\subset\ U_1^\bot$   I'm thinking using contradiction.  $\exists v\in U_2^\bot$ s.t. $v\notin U_1^\bot$ $\Rightarrow$ $\exists u\in U_1$ s.t. $u\notin U_2$  Let $v\in U_2^\bot$ and $v\notin U_1^\bot$, then $\exists u_2\in U_2$ s.t. $\lt v,u_2\gt =0$ and $\forall u_1 \in U_1, \lt v,u_1\gt \neq 0$  This implies, $\forall u_1 \in U_1, u_1\neq u_2$. Hence, $U_1\not\subset U_2$  I feel like this should be really easy with direct proof, but I keep getting $U_1^\bot = U_2^\bot$. What am I doing wrong?  Any hint will be helpful. Thank you!

Suppose $V$ is an inner product space and $U_1, U_2$ are subsets, then I'd like to show that $U_1 \subset U_2$ if and only if $U^{\perp}_2 \subset U^{\perp}_1$. I can show the first forward direction, by first taking $w \in U^{\perp}_2$. Then, $w$ must be a vector where $<w, u_2> = 0$ for all $u_2 \in U_2$. But, since $U_1 \subset U_2$, then $<w, u_1> = 0$ for all $u_1 \in U_1$. Hence, $w \in U^{\perp}_1$.   I am not sure how to show the opposite direction. My proof is as follows:  Take $u_1 \in U_1$. Now, let $w \in U^{\perp}_2$. Then, $<w,u_2> = 0$ for all $u_2 \in U_2$. But, $U^{\perp}_2 \subset U^{\perp}_1$, and so $w \in U^{\perp}_1$ as well. Hence, $<w,u_1> = 0$ for all $u_1 \in U_1$. After this, I am not sure how to complete the proof. Am I in the right direction? Thanks!


It has been asked to evaluate $$\lim_{(x,y)\to(0,0)} \frac{x^3 + y^3}{x-y}$$ if it exists at all and otherwise to disprove it.  After much thoughts , I came up with an idea of substituting $y$ with $x-mx^3$ which devolved the limit to $(2/m)$ and thus served my purpose of disproving the existence of a limit.  But, thinking of such half-weird substitutions take some reasonable amount of time; the luxury of which is seldom available at examinations. So, what are  other better methods to disprove the existence of this limit?  Any general algorithm (??) on disproving the existence of bi-variate limits (without indulging into trick-substitutions) will be also appreciated.

How to show that $\lim \limits_{(x, y) \to (0,0)} f(x, y)$ does not   exist where,         $$f(x, y) =  \begin{cases} \dfrac{x^3 + y^3}{x - y} \; ; & x \neq y \\  0 \; \;\;\;\;\;\;\;\;\;\;\; ; & x = y  \end{cases}  $$   I tried bounding the value of the function as $(x, y)$ approaches $(0,0)$ but was not successful. I graphed the function and saw that it was actually approaching $0$ but Microsoft Math failed to render some points around the $x = y$ plane. So I imagine I need to find points $(x, y)$ such that $x$ is extremely close to $y$ but $(x, y)$ is not as close to $(0,0)$ to show that the function does not approach $0$ around the origin. But was unable to think of any.   Hints or suggestions would be awesome. Any help is appreciated.


Wifi disables abruptly. Tried the solution available on the internet.None worked.Need to disable and enable wifi to start the connection. Cant upgrade to Ubuntu 18.04 as download stops due to wifi issue.Need help.   output after running lspci command:  $ lspci -knn | grep -i net -A3 02:00.1 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 12)          Subsystem: ASUSTeK Computer Inc. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [1043:200f]          Kernel driver in use: r8169          Kernel modules: r8169  03:00.0 Network controller [0280]: Ralink corp. RT3290 Wireless 802.11n 1T/1R PCIe [1814:3290]          Subsystem: Foxconn International, Inc. RT3290 Wireless 802.11n 1T/1R PCIe [105b:e055]          Kernel driver in use: rt2800pci          Kernel modules: rt2800pci

I have found that there is a large community suffering from the problems with the WiFi-Bluetooth card Ralink RT-3290. It has been a problem since 2012-2013.  None of the solutions I've found is simple, effective and durable.  I managed, with great effort, some results. But when there is a kernel update, the problems return.  Can anyone provide a simple , effective and lasting solution? Is there a project from Ubuntu's developers to attack the problem?


My friend and I are building a CMS specifically designed for online roleplaying. For the playtest we are using it to run a superheroes-themed game. We've built in-site tools to help making posting and character creation easier, and we're continually working on it based on playtester feedback.  Right now we have a few playtesters helping us to test the system, but they're all people we know — we have no experience with folks who are unfamiliar with our system and how we are doing things.  How do we attract folks to be playtesters for our game/platform ?

I'm just putting the finishing touches on the 9th iteration of my self-designed RPG system (with its own setting), and though it was woefully rocky in its early days I think that it's really coming together well. I'm running a handful of pbp games in v8.3, and have collected some encouraging data, and v9.0 is really feeling close to my initial vision.  Now, however, I'd like to see the game tested from a GM's point of view. When 9.0 is fully written up I'd like to find a group to pick up and use the materials with my input being limited to observation, and question fielding.  Do groups exist who like to playtest different systems? I can't imagine it's the world's most attractive pitch to try someone's homebrew pet project, but I also think this one stands up. If so, how or where do I find them?  Again, I'm keen to hand off the entire system to another GM with his/her own players, observe, and be available in whatever capacity becomes necessary. I'd consider this the next step after GMing playtests myself. And I'd be looking specifically for an online venue, as being based in New Zealand doesn't lend itself to large-scale conventions or the like.


I'm writing a Python program (on OS X/Linux) in which a user has to type some words in a while loop. This is the relevant part of it:  i = 0 array = [] while (i < 10):    array.append(raw_input("Prompt: "))    i = i + 1   However I'd like to stop the input as soon as the user types a SPACE, without the need to press ENTER.   I know I can't do this using raw_input, however I did not find any way to achieve what I'm trying to do. Basically I would like the user to be able to type one word after the other, using the SPACE button instead of ENTER to input the next word.  Do you have any idea? Thanks in advance.

Is there a way of reading one single character from the user input? For instance, they press one key at the terminal and it is returned (sort of like getch()). I know there's a function in Windows for it, but I'd like something that is cross-platform.


I have a Windows Failover Cluster set up with SQL 2016 Enterprise SP2. TDE was implemented on a DB, on node1 the DB is able to start without issues. However, when a failover occurs, on node2 the DB always goes into "Recovery Pending" state and has to be failed over back to node1 in order to start correctly.   Error: 15581, Severity: 16, State: 7. Please create a master key in the database or open the master key in the session before performing this operation.  I have checked the certificates and everything seems to match up. Not sure what is happening that it only seems to be able to start on node1 and not on node2.

I disabled TDE on a database and once completed I dropped the DB certificate for it. Later I performed a manual failover to node2 and ran steps to enable TDE once again. However encryption state is stuck in state 2 with 0% of progress.  The error log shows:      Database Encryption scan for database  was aborted. Reissue ALTER DB to resume the scan.   Every time I reissue the alter statement to turn encryption on it shows the same error. If I try setting encryption off I get an error that an encryption process is ongoing and can't get turned off.   I read this question but when I try to delete the certificate it gives me an error that the certificate is in use.


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

This question is about non-normalisable states in quantum mechanics, e.g. the eigenstates of the position operator $|x\rangle$ which are defined by the eigenvalue equation  $$\tag{1} \hat{X}|x\rangle = x|x\rangle.$$  Since the spectrum of the operator is continuous, the states are not square normalisable. Instead one has an equation such as  $$\tag{2} \langle x'|x\rangle = \delta(x-x')$$  which gives the overlap meaning as a . However it is clear that there is still at least an ambiguity in choosing a constant, i.e. why no have  $$\langle x'|x\rangle = a \times \delta(x-x')$$  where $a$ is $a \in \mathbb{R} $.    So I went to see how Equation (2) is derived. In Schleich's textbook on quantum optics in phase space I found the following, very short and in my opinion not clear/complete derivation.  From Equation (1) which can be taken to be the definition of the position operator and the assumption that the operator is hermitian which is a fundamental postulate of quantum mechanics one obtains:  $$\tag{3} \left( x - x' \right) \langle x'|x\rangle = 0.$$  That was easy so far, but then Schleich jumps immediately to equation (2). But the solutions for $\langle x'|x\rangle$ of (3) are all functions/generalised functions that are non-zero everywhere except at $x=x'$. So my question is: Why is (2) the unique solution? Where does the additional information come from?  My suspicion is that we impose another requirement, which is probably the completeness of the states, which would make (2) clear since it is the identity element in the position representation.


I have added this line at the end of ~/.bashrc  export JAVA_HOME=/usr/java/jdk1.5.0_07/bin/java   But when I execute echo $JAVA_HOME, I don't get anything as output, I expected "/usr/java/jdk1.5.0_07/bin/java".  Any idea?  OS: Ubuntu 11.10

This is irritating me. I seen several suggestions (all using different files and syntax) and none of them worked.  How do I set an environment variable for a specific user? I am on debian squeeze. What is the exact syntax I should put in the file to make ABC = "123"?


I am currently reading about MOSFET curves. I thought that the linear region and the triode region are the same , but I suspect I was wrong. my questions are briefly :  Whether ohmic and linear region are the same. What is exactly the triode region and how it is different from ohmic/linear region?

For someone trying to learn about FETs, it seems there is no consistency in terminology (unless I am reading things wrong.) I am trying to understand the FET as a switch (for power applications.) It has become clear that you want to operate a switch in the ohmic region. To get to the ohmic region you would need to go from cut off -> saturation -> ohmic region. TI refers to it like this in an   From this I implied that the 'linear' region is in fact rather confusingly the saturation region of the FET as shown all across the web for a FET curve:  However, when I went to wikipedia I came across the following image:  This is saying the exact opposite of what I understood which is saying that the ohmic region is the linear region. Infineon has an app note around FET switching, titled  They refer to the linear mode as the saturation region as shown from this:  So what is it then? Also just to be clear: Is the reason we want to minimise time in the saturation region with an FET because here we have a VDS and an ID current flowing through the FET, whilst as soon as the FEY reaches linear region, it's VDS would fall close to 0 and hence minimise losses? When we say the FET is saturated, it means for a given Vgs, Vds makes no difference to drain current (because channel can't let more electrons to flow?) Shouldn't the ohmic region be called saturated? Since increasing VGS makes no difference to drain current as the ID is now limited by the circuit and not the FET? Edit: Answers in electronic stack exchange say it is the saturation region:


This is a repost of a closed previous question to provide more details. I'm working on an alternative to iframes because WP.org balks at them and tends to reject plugins that have them (I know this from experience)  So, here's the code I have to try to replace an iframe: add_action('wp_ajax_myAction', array($this, 'myAction_ajax_handler'));  public function myAction_ajax_handler() {    echo time();    wp_die(); }  When the admin page is displayed, I have this:    echo '';    echo '

';    ?>               <?php  It works. Here's my questions. Is this the proper way to do this? Is there a better way to do this instead of polling with setTimeout? EDIT  Clarification: The purpose is to have PHP provide the time, not JS.  Reason being, if this is the proper method to do a wp_ajax call to a PHP function and provide the time then other things can be substituted for time(), like querying a database and outputting the results. This then gives me a template to get near real-time PHP results onto an admin page without the user constantly clicking the refresh button. I've seen examples that use XMLHttpRequest.onload = function () {   // Do something with the retrieved data ( found in xmlhttp.response ) };  instead of onreadystatechange.  Does it matter which I use? I realize the downside of polling is that it's hitting the /wp-admin/wp-ajax.php roughly every second in this example.  And yes, a push notification method would be much nicer and I've even looked at server-sent events (Content-Type: text/event-stream"). So far, I've seen nothing that I'd be able to comprehend and integrate into WP admin pages. WebSockets was suggested in a previous post.  While I've played with WebSockets and I could likely get it to work, not all shared hosting sites have Node.JS installed by default or even allow WebSockets.  As a plugin, this would need to work basic WP installs on cheap shared hosting. Thanks!

Question edited: I'm working on an alternative to iframes because WP.org balks at them and tends to reject plugins that have them (I know this from experience)  So, here's the code I have to try to replace an iframe: add_action('wp_ajax_myAction', array($this, 'myAction_ajax_handler'));  public function myAction_ajax_handler() {    echo time();    wp_die(); }  When the admin page is displayed, I have this:    echo '';    echo '

';    ?>               <?php  It works. Here's my questions. Is this the proper way to do this? Is there a better way to do this instead of polling with setTimeout? Thanks!


Does a continuous spectrum of an observable always imply that the corresponding eigenvectors will not be normalizable? If yes, how to prove it?

These facts are taken for granted in a QM text I read. The purportedly guaranteed non-normalizability of eigenfunctions which correspond to a continuous eigenvalue spectrum is only partly justified by the author, who merely states that the non-normalizability is linked to the fact that such eigenfunctions do not tend to zero at infinity.  Not a very satisfying answer. What I'm really after is an explanation based in functional analysis. I believe there is a generalized result about inner products being finite for discrete spectra but infinite for continuous spectra.  Can anyone shed some light on this?


This is my proof.   Let Φ: R->R' be a ring homomorphismm. Then R/KerΦ is isomorphic to Φ(R). Since Φ(R) is onto and R' is a field, then R/KerΦ is also a field. Let R be a commutative ring with unity. Since R/KerΦ is a field, then kerΦ is a maximal ideal of R.   Any comment on my proof? Thank you.   in this question, its not stated that R is a commutative ring while the ones posted here has R as a commutative ring.

Let $f:R\to S$ be a surjective homomorphism, where $R$ is a commutative ring and $S$ is a field. Prove that $\ker(f)$ is a maximal ideal.  I already know that $\ker(f)$ is an ideal of $R$. I tried to consider some ideal $J$ of $R$ such that $\ker(f) \subset J$. If we can show that for arbitrary $y\in J$, $f(y)=0$ then we are good. But I don't know how to show that. Specifically, how does being surjective come into play?  Another theorem I know is that if $f$ is a surjective homomorphism, then quotient ring $R/\ker(f)$ is isomorphic to $S$. Don't know if that's gonna help.


i want to disable my Caps Lock key and move it to my Scoll Lock key.  The value of my Scancode Map is:  00 00 00 00 00 00 00 00 03 00 00 00 00 00 3A 00 3A 00 46 00 00 00 00 00  This worked in Windows 8, but not 8.1.  What should I do?  Thanks.

How can I remap keyboard keys in windows 8.1? I'm looking for a simple utility which will modify registry and would not require running at startup. I tried sharpkeys but, it does not seem to work in windows 8.1. Any other suggestions? Or a simple how-to tutorial for windows 8.1?  Edit: Keytweak isn't working either. Actually I want to map an unused key to function key (fn) and neither sharpkeys nor keytweak detect the keystroke for that key.   Thanks


I'd like to create a bash script. Therefore, I defined a variable   pattern1=Today,\ 15:46   I had to add a \ before the space " " because otherwise I get the error "command not found"  Now, I used this command to search the pattern in out.txt:  grep -c '$pattern1' out.txt   Here grep doesn't find anything.  However, when I type in   grep -c 'Today, 15:46' out.txt   I get a result.  Also with the following code, I don't get any result:  define pattern2=15:46 grep -c '$pattern2$ out.txt   Where is the mistake? Can grep not look for a previously defined pattern? Is there a trick to look for the pattern anyway?  I'd be grateful for every help!  Kind regards, X3nion

Sometimes I see shell scripts use all of these different ways of quoting some text: "...", '...', $'...', and $"...". Why are there so many different kinds of quote being used? Do they behave differently or affect what I can do inside them?


The tag pages - such as  refer to "master" and "synonym."  The "create a tag synonym" page refers to them as "source" and "target."    Could we have them with consistent names?

On the list of tag synonyms page, the terms "Master" and "Synonym" are used.  This is clear. The "Master" tag is the tag that actually is used on the site and the "Synonym" is the tag that gets changed.    But, on the creation page, the wording is less clear:    Here, we have "Source" and "Target". I'm sure that if someone explained which is which to me, I'd understand it but it isn't instantly clear and so I'm requesting that we use the same wording on this page as on the synonym page.  Even if it were clear, why are we using two different terms for each? This makes little sense.


I have two functions to see if a file exists, I am wondering which one of them is considered the most Pythonic, A, B or none? Is it a good practice to always use exceptions?  import os.path from os import path  # Method A def file_exists_A(file):      try:         with open(file, 'r') as f:             print("Method A: file exists")     except Exception as e:         print('Method A: file not found\n')  # Method B def file_exists_B(file):      try:         if path.exists(file):             print("Method B: file exists")     except Exception as e:         print("Method B: file not found\n")  file_exists_A("file.txt") #file_exists_B("file.txt")

How do I check whether a file exists or not, without using the  statement?


My journal publisher’s class file uses newtx fonts, so I’ve tried to update my MikTeX installation. The MikTeX package manager reports that all of newtxtt, newtxsf, minion2newtx and newtx itself (only the last is new) are installed. I’ve run (as administrator and as myself) updmap as well as FNDB. A simple hello world file (appended) will compile and produce a dvi, but converting it to pdf or viewing it in yap or … tries to run miktex-makepk to make pk fonts and these fail. Compiling with pdflatex (which is what I’d really like to do) fails in the same way:   Trying to make PK font ntx-Regular-tlf-t1 at 600 DPI... Running miktex-makemf.exe... miktex-makemf: The ntx-Regular-tlf-t source file could not be found. Running ttf2pk.exe... miktex-makepk: PK font ntx-Regular-tlf-t1 could not be created.    Yap->Document Properties reports that it finds:   ntxmi, txmi in Program Files (x86)\MikTex 2.9\fonts\vf\public\newtx\... rtxmi and rtxptmn in Users\steve\AppData\Local\MikTex\2.9\fonts\pk\mo… mtxmi and ntx-Regul.. are Not loadable    My settings show the following roots  c:ProgramData\MikTex\2.9     [CommonData] d:\sjs_d\Documents\localtexmf c:\Program Files (x86)\MiKTeX 2.9   [CommonInstall]   updmap reports:  $ updmap --verbose | grep newt C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/public/newtx: skipping, existing cache is valid: 73 fonts, 0 dirs C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/public/newtxsf: skipping, existing cache is valid: 4 fonts, 0 dirs C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/public/newtxtt: skipping, existing cache is valid: 4 fonts, 0 dirs C:/Program Files (x86)/MiKTeX 2.9/fonts/opentype/public/newtx: skipping, existing cache is valid: 4 fonts, 0 dirs   I’m not a font guru at all. With type1 and opentype fonts, are pk fonts needed (this question no doubt reveals my ignorance)? I’m not sure, of course, whether I have all the T1 fonts here. Googling suggests I need the .mf files to create the pk fonts, but .mf files are not present in the installed packages AFAICT.    \documentclass{article} \usepackage{newtxtext} \usepackage{newtxmath} \begin{document}  Hello world.  \[ Hello maths world \]  \end{document}

Every once in a while after updating MiKTeX, the installation gets into an inconsistent state. This might be a problem with the packages (an example is described in ), but sometimes packages are split or renamed. The cases I remember are when  and when miktex-etex-base-2,9 was renamed to miktex-etex-base-2.9 (if I recall correctly; I am sure it was either that or something very similar). In each case the MiKTeX Update process suggested to remove the "old" packages but it didn't give the user any hints about him having to manually add the respective replacement packages back in the package manager to get one's MiKTeX installation back into a usable state.  What are best practices for keeping MiKTeX up to date? Note that I'm not asking about installing new packages or fonts in general; there are other questions covering this area.   In which order should one execute the Update process and the Synchronization of the repository? , it is recommended to check the MiKTeX homepage before updating. What else should one do? When and in which order (and why) should one execute the "Refresh FNDB" and "Update Formats" processes within the MiKTeX Options menu? What else can happen? Other advice?


In every opening sequence so far on Rick & Morty, no matter the season, we see at the end a scene where they flee in their spaceship from a Cthulhu-like creature, while Summer is holding which seems to be a spawn of the creature. Can we state if this creature is, in fact, Cthulhu? Is there enough evidence to accept or refuse the possibility?

The show Rick and Morty has seen a couple of different title sequences throughout its three season (so far) run:                                Which of these scenes are from actual episodes? They do not need to be actual copies, just depictions of the same scene. They may be from after credit scenes, such as the one where   .


**Failed to load the package list**  This is a serious problem. Try again later. If this problem appears again, please report an error to the developers.  Details E:Unable to parse package file /var/lib/apt/lists/ppa.launchpad.net_tsvetko.tsvetkov_trusty-backports_ubuntu_dists_xenial_main_binary-amd64_Packages (1),  E:Unable to parse package file /var/lib/apt/lists/ppa.launchpad.net_tsvetko.tsvetkov_trusty-backports_ubuntu_dists_xenial_main_binary-i386_Packages (1),  E:Unable to parse package file /var/lib/apt/lists/ppa.launchpad.net_tsvetko.tsvetkov_trusty-backports_ubuntu_dists_xenial_main_binary-all_Packages (1),  E:Unable to parse package file /var/lib/apt/lists/ppa.launchpad.net_tsvetko.tsvetkov_trusty-backports_ubuntu_dists_xenial_main_i18n_Translation-en (1),  W:You may want to run apt-get update to correct these problems,  E:The package cache file is corrupted

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


when I try to update my 18.04 with sudo apt update command it fails. I have the following results and I don't know what's the problem.      Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Hit:2 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu bionic InRelease Hit:3 http://us.archive.ubuntu.com/ubuntu bionic InRelease                 Get:4 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Reading package lists... Done                                                   E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 5h 36min 49s). Updates for this repository will not be applied. E: Release file for http://us.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 6h 26min 40s). Updates for this repository will not be applied.

I keep getting this error every time I try to sudo apt update:  Hit:1 ubuntu bionic InRelease Ign:3 linux/chrome/deb stable InRelease                    Get:2 /ubuntu bionic-updates InRelease [88.7 kB]    Get:5 /linux/chrome/deb stable Release [943 B]              Get:6 http://dl.google.com/linux/chrome/deb stable Release.gpg [819 B]          Get:4 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]  Get:7 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]     Reading package lists... Done                                  E: Release file for http://dl.google.com/linux/chrome/deb/dists/stable/Release is not valid yet (invalid for another 2h 45min 28s). Updates for this repository will not be applied. E: Release file for http://us.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 4h 34min 33s). Updates for this repository will not be applied. E: Release file for http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease is not valid yet (invalid for another 1h 22min 16s). Updates for this repository will not be applied. E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 4h 32min 36s).    Updates for this repository will not be applied.  I've reset my timezone to UTC, but that didn't work. I also found a different answer where they said I should try   sudo apt-get -o Acquire::Check-Valid-Until=false update   but that didn't work either. I got the same error both times.


Show that if $F$ is a field, $f(x) \in F[x]$, then $f(x) \cdot F[x]$ is an ideal in $F[x]$, and every ideal of $F[x]$ is of this form.  I'm not sure how to start proving that. If anyone could give me a hint it would be highly appreciated.

If $F$ is a field, then $F[x]$ is a principal ideal domain   By a previous theorem, we know that $F[x]$ is an integral domain. Now, let $I$ be an ideal in $F[x]$. If $I = \{0\}$, then $I = \langle 0 \rangle$. If $I \neq \{0\}$, then among all the elements of $I$, let $g(x)$ be one of minimum degree. We will show that $I = \langle g(x) \rangle$. Since $g(x) \in I$, we have $\langle g(x) \rangle \subseteq I$. Now let $f(x) \in I$. Then, by the division algorithm, we may write $f(x) = g(x)q(x) + r(x)$, where $r(x) =0$ or deg $r(x) \lt$ deg $g(x)$. Since $r(x) = f(x) - g(x)q(x) \in I$, the minimality of deg $g(x)$ implies that the latter condition cannot hold. So, $r(x) = 0$ and, therefore, $f(x) \in \langle g(x) \rangle$. This shows that $ I \subseteq g(x)$.  My question is: What is a polynomial of minimum degree in this context?  And how does this minimality imply that deg $r(x) \lt$ deg $g(x)$ cannot hold?


Note: This question is not answered in the above linked question, nor is it a duplicate. This question addresses the problem with the ordering of special characters when using text-direction: rtl, which it turns out can be solved with the unicode-bidi: bidi-override as pointed out by @Serlite below.  I have a div containing some text that I'd like to overflow to the left, not to the right.  For example, if the div contains all letters of the alphabet, the default behaviour is as follows:    I, however, want the contents of the div to be displayed like this:    Using direction: rtl in the styles for that div works fine, and achieves this effect perfectly for the above example, as well as if the contents contains just numbers (or a mix of alphanumeric characters) as shown below.  Standard behaviour:    Behaviour after setting direction: rtl:    The problem occurs when special characters are entered into the div, such as * and #.  Setting the string *#0123456789 as the div contents causes the following to be displayed:    Note the * moving from the start of the string to the end.  It's difficult to show the problem with just images, so  is a quick jsfiddle to better demonstrate it.  In general, it seems like weird things happen when setting the direction property, and so I'm guessing it's probably not the way to go.  Is there a way I can force the last characters to always be visible while the first characters overflow to the left?

I have a div with overflow:hidden, inside which I show a phone number as the user types it. The text inside the div is aligned to right and incoming characters are added to right as the text grows to left.  But once the text is big enough not to fit in the div, last characters of the number is automatically cropped and the user cannot see the new characters she types.  What I want to do is crop the left characters, like the div is showing the rightmost of its content and overflowing to the left side. How can I create this effect?


new Array // outputs []  [] // outputs []   But new Array === [] is false. Why so?    console.log(new Array === [])

A strict equality operator will tell you if two object types are equal. However, is there a way to tell if two objects are equal, much like the hash code value in Java?  Stack Overflow question  is similar to this question, but requires a more academic answer. The scenario above demonstrates why it would be necessary to have one, and I'm wondering if there is any equivalent solution.


I don't know if this is a well-known fact, but I have observed that every number, no matter how large, that is equally divided by $9$, will equal $9$ if you add all the numbers it is made from until there is $1$ digit. A quick example of what I mean:  $9*99 = 891$ $8+9+1 = 18$ $1+8 = 9$  This works even with really long numbers like $4376331$ Why is that? This doesn't work with any other number. Similarly for $11$ and alternating digits sums.


If I try to convert below value to Number or parseFloat, the decimal precision getting lose.   var tt = "1234.12345678912345"  console.log(tt);  var ss = Number(tt); console.log(ss);  var rr = parseFloat(tt); console.log(rr);  var ee = +(tt); console.log(ee);  var ww = tt * 1; console.log(ww);    Please check the code snippet.  Is there a way to convert a string to Number without losing decimal precision?

Is there a way to represent a number with higher than 53-bit precision in JavaScript? In other words, is there a way to represent 64-bit precision number?  I am trying to implement some logic in which each bit of a 64-bit number represents something. I lose the lower significant bits when I try to set bits higher than 2^53.  Math.pow(2,53) + Math.pow(2,0) == Math.pow(2,53)   Is there a way to implement a custom library or something to achieve this?


From measurements I can tell that weight, as a function of tire pressure increase, is not linear but more something like this:    50kg = 1 change in pressure  100kg = more than 2 changes in pressure, no matter how much that is at this point.  Also the change in pressure is higher for the front seats compared to the rear ones.   Part of a possible explanation: as said, the heavy engine does already influence the front tires more, so the same payload results in a higher pressure increase.  Cons of this explanation (or well maybe/probably the pressures just add up, and the part mentioned before has a higher influence): Of course also the position plays an important role. In the rear you sit much more directly on the rear tires while in the front seats you are pretty much in the middle between rear and front tires.  In the front, the pressure increase is better distributed. Lets say 500 total increase when I sit in the front left, then alone 200 are on the front left but also 200 are on the rear left. When I sit though in the back, more than 300 of the 500 is from the tire where I sit. A better distribution should be like 50kg here and 50 there and this results in a total increase of less than 100kg at one spot, looking at the curve.  $pV=nRT$ as far as I remember. I guess for the short time directly after someone enters the car we can assume the tire to be compressed adiabatically and of course the gas energy to be constant, so it simplifies to $p$~$1/V$.   But how do V and p(=F/A) change so that the measurements could be explained? (Measured with 0,03 millibar resolution)  Where does the form of the curve come from?  Of course I read this question's answers:  and it gave some nice insights. But here I have some empiric data which I cannot explain. For example different pressure change in rear/front seats but mainly where the curves form come from..

Does tire pressure measured by a meter on tire gauge change with load? (I am not interested in pressure produced by car tires onto the road).  Car spec usually says "inflate to 220kPa normal load, 300kPa full load". Does this mean the measured pressure should be 300kPa only after the car was loaded, or can one inflate the tires to the recommended 300kPa while empty and then load the car with 500kg without needing to re-measure the pressure?  There are basically both answers to be found when researching the non-physics forums on the internet:   One explanation says that the tire will compress under bigger load, making the volume inside the tire smaller, hence pressure higher. It also states this is the reason why the spec plate in the car has two values - you should simply expect to measure higher pressure on the tires while the car is loaded. There are also explanations stating that the air does not escape from the tire, hence the amount of air inside the tire is constant and the pressure measured on the tires is constant even if the car is loaded (and based on observations, tires normally compress when the car is loaded). This would mean one needs to put more air into the tires when the car is loaded to ensure higher pressure.   To a layman, both sound feasible.  Is one of the explanations simplifying based on normal load assumptions? (i.e. tire pressure does not change if car is loaded with at most 1000kg, but would change if there was an enormous load put on the car?)  Where is the truth?


I have two branches:  ----master   |   |----lf   I developed some new feature in branch lf and get some output. Then, I tried to switch back to master (through git checkout) and execute the program to compare the result. Unfortunately, git checkout master will update what I did in lf:  M   Makefile M   src/mainloop.c M   src/threadpool.c M   src/threadpool.h Already on 'master' Your branch is up to date with 'origin/master'.   As a result, I get the exact same project in two branches. This is not what I want. I don't want master auto update what I changed in lf.  My question are:   How to recover the code in master before I do branch (git branch lf)? How to switch between different branches with no auto-update?

I am working on a git repository with a master branch and another topic branch. I have switched to topic branch and modified a file. Now, if I switched to master branch that same file is shown as modified.   For example:  git status in git-build branch:  # On branch git-build # Changes to be committed: #   (use "git reset HEAD <file>..." to unstage) # #       modified:   cvsup_current #   Switch to master branch  [root@redbull builder_scripts (git-build)]# git co master M       builder_scripts/cvsup_current Switched to branch "master"   git status in master branch  [root@redbull builder_scripts (master)]# git status # On branch master # Changes to be committed: #   (use "git reset HEAD <file>..." to unstage) # #       modified:   cvsup_current #   Why is that the file is shown as modified in master branch even though it was modified in git-build branch?   My understanding was that the branches are independent of each other and when I change from one branch to another the changes do not "spill over" from one branch to another. So I am obviously missing some thing here.   Anyone got a clue stick?


I have windows 7 on my laptop and dual boot of 12.04 LTS now I want to upgrade to 14.10 how to uninstall 12.04 ?

Possible Duplicate:          Is it possible to upgrade a 10.04 lucid installation to 11.04 Natty, without upgrading to 10.10 first? What about other versions?


Is there any way to find out what an entire file looked like in a particular commit after applying all changes to it? I know there is a difference between 2 files(what was added and removed) and that's what shown in git. But that's not what I'm looking for.

Is there a command in Git to see (either dumped to stdout, or in $PAGER or $EDITOR) a particular version of a particular file?


While binding the data always getting extra row ...   {this.state.items.map(myitems1 => {             return (
                 {myitems1.Item_x0020_Name}                 <button onClick={e => this.dosometing(myitems1.Id)}>                   Offline                 </button>
             );           })}   Heading

I am having problem while looping.  I am always getting an extra button. Please help.   {this.state.items.map(myitems1 => {     return (
            {myitems1.Item_x0020_Name}            <button onClick={e => this.dosometing(myitems1.Id)}>Offline</button>
     ); })}   I can see the collection has only three (3) values, But I am getting 4 buttons on screen.   Getting always extra


I have just been introduced to the topic of integration. My teacher said:   $$\int_{a}^{b} f(x) dx$$  Is the same thing as:  $$\int_{a}^{b} f(\alpha) d\alpha$$  I asked her why, and she said "it is a dummy variable."  But then I thought, are all variables dummy variables? how do you identify a dummy variable?

I do not understand how dummy variables work in math.   Suppose we have:  $$I_1 = \int_{0}^{\infty} e^{-x^2} dx$$  How is this equivalent to:  $$I_2 = \int_{0}^{\infty} e^{-y^2} dy$$  How does this dummy variable system work?   Since $y$ is the dependent variable for $I_1$ How can $y$ itself be and independent variable for $I_2$  ??  Thanks!


I have been trying to convert my linux box which is running Mint into a router. eth0 has a public IP address of 71.xx.xx.xx. I created an eth0:0 and gave it an IP address of 10.0.0.100. I started a DHCP server that is on eth0 (because it won't use eth0:0) and that's giving out addresses between 10.0.0.101 and 10.0.0.200. I can ping between eth0 and eth0:0 on the same machine. I have a another laptop connected to the linux box via a switch and it's able to receive an IP address via the DHCP server.   The problem is with routing traffic from eth0:0 and eth0 (and vice-versa) so that computers on the private, 10.0.0.x network can access the internet via the static IP on eth0.

So I have been trying to convert my linux box which is running Mint into an router. eth0 has a public address that has 71.xx.xx.xx for an IP addr. I created an eth0:0 and set it an IP address , 10.0.0.100. I started a DHCP server that is on eth0 ( because it wont use eth0:0) and that's giving out addresses between 10.0.0.101 and 10.0.0.200. I can ping between eth0 and eth0:0 on the same machine. I have a another laptop connected to the linux via a switch and its able to receive an ip addr via the DHCP server. Problem is how do I route traffic from and to eth0:0 to eth0 and vice versa so that computers on the private network that is 10.0.0.x can access internet via the static IP on eth0.


I have a list of dicts of dicts like this:  mydic = [{'name':'a', 'loc':{'locname':'z'}, 'id':{'value':'1'}},{'name':'b', 'loc':{'locname':'o'}, 'id':{'value':'2'}}]   How do I sort it by locname? I should get this:  mydic_sorted = [{'name':'b', 'loc':{'locname':'o'}, 'id':{'value':'2'}}, {'name':'a', 'loc':{'locname':'z'}, 'id':{'value':'1'}}]

I have a list of dictionaries and want each item to be sorted by a specific value. Take into consideration the list: [{'name':'Homer', 'age':39}, {'name':'Bart', 'age':10}]  When sorted by name, it should become: [{'name':'Bart', 'age':10}, {'name':'Homer', 'age':39}]


This is just something im trying out, i just recently started coding in java would like some help. Would like to ask user to pick their favorite movie, then take their input and use if statements to give different responses to each response.   import java.util.Scanner; public class miniFFF { public static void main (String[]p) {      System.out.println("What is your favourite movie? pick from the answers below:");     System.out.println("a");     System.out.println("b");     System.out.println("c");     System.out.println("d");     System.out.println("e");          answer();     //ifStatements();     System.exit(0);     }      public static String answer() {         String favMovie;         Scanner test = new Scanner(System.in);         favMovie = test.next();          if(favMovie == "a") {             System.out.println("1234");         }          else if (favMovie == "b") {              System.out.println("123");         }         return favMovie;   }   }

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 am working under ubuntu 14.0.4. I have an application which I did in c++. This computer in which I am working is going to be use only for execute this applications, nothing else, no internet, no personal computer, only for run this applications.  The thing is that I need to enable the root account in this computer I undestand the risk, but it is going only to run this application. So what I want to do is whenever I boot the computer start automatic root user always. How can I do that?  Many thanks

I would like to enable the root account on my Ubuntu installation.  I realize the security implications of this.


Is there such a thing at all? I feel the front is dangerous because it may hit the ground first. I also feel that near the wings is not safe because they are fuel tanks.

So to clarify, there are lots of different planes, so for the sake of argument, there are areas:   front left front right front middle forward front, right, middle over the left wing over the right wing middle, between the wings mid-way back, left, right, or middle at the back left, right, or middle pilot seat co-pilot seat jump-seat, if it exists   So that's 18ish possible safe zones in the plane.  Is there a particular area that statistically people have survived more (or less) in?


I installed Ubuntu 14 on oracle virtual box but my wifi is not working. I went to additional driver in ubuntu but in my laptop it shows No additional driver available. I also tried to change the setting of virtualbox network part but the problem still persist.  Please help

I just installed my first Ubuntu Server (12.04) instance and immediately ran into the following problems:   Running apt-get install or update fails (see below) Running ifconfig produces peculiar IP addresses starting with 10.x.x.x and my router does not see the server at all in its "Attached Devices" page (its a consumer grade Netgear)   When I run apt-get I get 50+ of the following errors:  Failed to fetch <some-http-url>. Temporary failure resolving <blah>.ubuntu.com   I read up on this error for 12.04, and found some similar posts on this forum and on server fault that recommended going into /etc/resolv.conf and adding an entry:  nameserver 8.8.8.8   To my surprise, I found that /etc/resolv.conf was a symlink pointing to somewhere else  and I had to delete it first, then create a new one with the entry indicated above.  I restarted the server and tried running apt-get again, same results.  How do I start diagnosing the problem (I'm a relatively new Linux/Ubuntu user)?  Additional details that may help:   This is actually a virtual machine running as a VirtualBox guest OS The physical host that is running this VM is my laptop which has a wireless connection; I'm wondering if (somehow) the laptop is getting the network wirelessly, but perhaps either the VBox VM and/or the Ubuntu server OS isn't configured for wireless and so nothing is "getting through"?   Thanks in advance for any pointers!  Edit:  Here is a snapshot of my VM's Network settings (only Adapter 1 has any information populating its fields, so I assume my VM has only 1 adapter):    Here is the output when I run ifconfig from the terminal:    And here is the output when I run route from the terminal:    Running ping google.com:


I am required to embed fonts in my document, in order to ensure the printing of my thesis goes well. The recommendation is to include \usepackage{lmodern}. Unfortunately, my document uses bold small caps, which renders as bold lower case when I use lmodern.  (The thesis should look similar to the default template. Thus I can not use a completely different font)  (I currently use \usepackage[T1]{fontenc}, although I do not know if that is relevant)  How can I embed bold small caps?  MWE (removing \usepackage{lmodern} causes desired output):  \documentclass[pdftex,10pt,b5paper,twoside]{book} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[lmargin=25mm,rmargin=25mm,tmargin=27mm,bmargin=30mm]{geometry}  \usepackage{lmodern} \usepackage[]{glossaries} \makeglossaries \newacronym{sqp}{\textsc{sqp}}{sequential quadratic programming} \newacronym{doe}{\textsc{d}o\textsc{e}}{design of experiments}  \begin{document} \printglossary[type=\acronymtype, title=Acronyms ]  \section{Demo} In text ok: \acrshort{doe} and \acrshort{sqp} \end{document}   Edit: I included lmodern to ensure embedded fonts.  This broke bold small caps. When I removed lmodern, and checked if the fonts are embedded, this was the case.  Thus I do not need the package, and I think my problem is solved.

I just ran into the problem of embedding fonts while trying to publish with lulu.com. Although everyone apparently is 'supposed' to handle those 35 standard fonts for some strange reason they won't accept pdf's without them included. So one way that according to  is supposed to work (I haven't tried yet, but hopefully it does work) is to convert the pdf to ps and then back to pdf and include the fonts at that time:  pdftops file.pdf ps2pdf14 -dPDFSETTINGS=/prepress file.ps   But this feels at least to me like the wrong way of doing things. Is there some way of passing the parameter directly to pdflatex to tell it to embed those fonts?   And, if not -- How do we go about getting such a feature? (Because it can't only be me who has this sort of problems)


All chat.SE links redirected to Area 51 starting from the last minute... bug?  (Just click any chat.SE links)

If I type chat.stackexchange.com into my browser, it resolves as area51.stackexchange.com.   The same happens if I click the chat link from the dropdown on a site, as well.   This just started within the last couple of minutes. I'm using Chrome, if that matters any.


How is the Jedi Mind Trick not a Dark Side technique? Isn't tricking another person's mind unethical? How can the Jedi use it and not become Dark?

In The Phantom Menace alone, Qui-Gon (and in part Obi-Wan) are quick to use Jedi mind tricks and not only gamble but also cheat at it. They seem happy with this fact.  Do Jedi have morals and ethics, or a code of honor?


In any triangle, prove that: $a\cos A+b\cos B+c\cos C= 4R\sin A.\sin B.\sin C$  My Attempt: $$L.H.S=a\cos A+ b\sin A+ c\sin C$$ $$=2R.\sin A. \cos A+ 2R\sin B\cos B+2R\sin C\cos C$$ $$=R.\sin (2A)+R.\sin (2B)+R.\sin (2C)$$ $$=R(\sin (2A)+\sin (2B)+\sin (2C)$$

Prove that $\sin(2A)+\sin(2B)+\sin(2C)=4\sin(A)\sin(B)\sin(C)$ when $A,B,C$ are angles of a triangle   This question came up in a miscellaneous problem set I have been working on to refresh my memory on several topics I did earlier this year. I have tried changing $4\sin(A)\sin(B)\sin(C)$ to  $$4\sin(B+C)\sin(A+C)\sin(A+B)$$ by making substitutions by reorganizing $A+B+C=\pi$. I then did the same thing to the other side to get $$-2(\sin(B+C)\cos(B+C)+\sin(A+C)\cos(A+C)+\sin(A+B)\cos(A+B))$$ and then tried using the compound angle formula to see if i got an equality. However the whole thing became one huge mess and I didn't seem to get any closer to the solution. I am pretty sure there is some simpler way of proving the equality, but I can't seem to figure it out. Maybe there is a geometric interpretation or maybe it can be done using just algebra and trig. Any hint's would be appreciated (I would prefer an algebraic approach, but it would be nice to see some geometric proofs as well)


I'm basically trying to create a program that accepts user-input to insert into a singly linked list, then searches if said a certain element exists in the linked list. The problem is that all I'm getting for an output is  "does not exists", even if it has been inserted at the beginning of the program.  For some reason, using initialized values, eg. "llist.push("test")" works, but using "llist.push(item)", which uses user-input, doesn't work. I've tried looking for similar problems online, but can't find any, please help me as I'm new to Java. Thanks in advance!  class Node  {      String data;      Node next;      Node(String d)      {          data = d;          next = null;      }  }   public class javalinkedlist {      Node head = null;       public void push(String new_data)      {       Node new_node = new Node(new_data);      new_node.next = head;      head = new_node;  }   public boolean search(Node head, String x)  {      Node current = head;      while (current != null)      {          if (current.data == x)              return true;          current = current.next;      }      return false; }   public static void main(String args[])  {      LinkedList llist = new LinkedList();      Scanner input = new Scanner(System.in);     System.out.print("Enter: ");     String item = input.next();     llist.push(item);      if (llist.search(llist.head, "test"))          System.out.println("exists");      else         System.out.println("does not exist");  }    }


UK passport expired 29/1/19 on day of travel to Canary Islands, Spain. Thomas Cook airline advised okay for one year at departure gate, thus I am in Spain with an expired passport, but what next for return journey in three weeks time (still to be booked ) Must I apply for an emergency passport for £100 ? Look forward to hearing from those who may know or advise relevant law ?

My British passport has been expired for more than 10 years. Can I enter the UK with my South African passport? Will I be able to get a visa?  Approximately a year ago, my husband and I traveled to the UK. When organizing his visa, they told me that I wouldn't be able to get a visa, so I had to get an emergency travel document (ETD) which I luckily could get. This time around, I am unable to get an ETD, because my UK passport is over the limit allowed.  Oh yes, I was born in South Africa, and am an SA Citizen.


in windows I use the netsh wlan command. how I can use it in ubuntu 16.10

I know how to create a hotspot when connected to a wired network, but when I am using internet from a WiFi connection, this disconnects the wireless connection the moment I activate the hotspot.  In Windows I can use , which enables me to share the internet connection from the same wireless adapter as I am creating an access point on. As you can read on the :     Access Point mode allows you to create a hotspot using the same Wi-Fi card that you are using to access the Internet.   How do I do this on Ubuntu?


I have a problem with proving the below sequent in intuitionistic logic: $$ \neg \neg A \to \neg \neg B \vdash \neg \neg (A \to B) $$ I stuck here:  What should I put in $6th$ line? Is my approach even correct? I noticed that Generally, I have problems with proving sequents with double negation in intuitionistic logic. Is there any pattern for solving such examples?

Does the equivalence $$\neg\neg (P \rightarrow Q) \leftrightarrow (\neg\neg P \rightarrow \neg\neg Q)$$ hold in propositional intuitionistic logic? In propositional classical logic the equivalence holds obviously since $P \leftrightarrow \neg\neg P$. However, the similar-looking implication $\neg\neg (P \vee Q) \rightarrow (\neg\neg P \vee \neg\neg Q)$ is . The validity of the backward implication comes up in  as well.


I'm trying create a list of Messages a user can type in an textarea on the site and delete any of them using a button he automatically creates with each message.  My idea is that I create a div in which I first put the message of the user in and then prepend the button with the same ID of the div; This way I call the ID of the button and remove all elements with the same ID.  <script> var theButtonId = 1; $(document).ready(function() { $('#commentButton1').click(function() {     var toAdd = $("textarea#commentTextarea1").val(); //Content to add     var theId = "dieButtons"+theButtonId.toString(); //creating unique ID      // Adding first Div           $('#targetField').append(          $('<div />', {             id: theId,             }));     // Adding content     $('#'+theId).append(         $('<div />', {              text: toAdd              }));     //(-----1-----)Adding Button             $('#'+theId).prepend(          $('<button />', {              type: 'button',              id: theId,              class: 'commentButton2',              text: "-"              }));     theButtonId++;     }); }); //Button Command $(document).on("ready", function(){   //(-----2-----) $('.commentButton2').on("click", function(){      var thisId = $(this).attr("id");        $("#"+thisId).remove(); }); }); </script>   It perfectly lists the elements in the #textfield  I added a button directly in my HTML code which deletes certain divs, as well as itself using the code above. This is why I know that the Problem is that the created Buttons at (-----1-----) don't react to the command in (-----2-----)  I already tried to create an Input of type button and put a .click function instead of .on("click", [...]).

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Tried - sudo apt update  sudo apt-get install python3-setuptools  giving error - E: Package 'python3-setuptools' has no installation candidate  Tried - sudo apt update  sudo apt install python3-pip  giving error - E: Package 'python3-pip' has no installation candidate  When checked for universal repository - sudo add-apt-repository universe  'universe' distribution component is already enabled for all sources.  For any other command too, giving error as python3-packagename has no installation candidate. I checked the version of python, it is 3.8.2 . I installed 3.9 now and how to make it default. I want to try it so that whether it may works.

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


My keyboard setting is German. After restart the login screen keyboard setting is always US English.  How can I permanently change the keyboard to German, also for login after restart?

I'm from Belgium, and on my own user account, the input source is set to a Belgian (actually French) keyboard. The input sources menu is enabled in the menu bar, so I can switch it to the Belgian keyboard before entering my password, but how can I permanently change the input source used for login? I'm the system admin, and I know how to get root access if necessary.  It worked perfectly in Mountain Lion.


I know \DeclareOption{option name}{option content} but how is this used to pass a variable number into the package? for example, \usepackage[margin=1in]{geometry} passes 1in to the margin option of geometry; how could I replicate that behavior in my own package?

In my macro file, I have certain theorem environments defined, for example.  \newtheorem{theorem}{Theorem} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary}  \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition}   Again, these lines are in my macros.sty file of shortcuts.  In the past, I have changed the numbering of theorem, etc... by using \numberwithin. I have recently learned that I can instead edit the \newtheorem line. For example, if I want results numbered according to section I can use  \newtheorem{theorem}{Theorem}[section]   My question now is about future situations when I have two documents, which both use the same macros.sty file, but in one document I want to number results by section and in the other document I want to number results by something else, say chapter.  How can I accomplish this without creating two different .sty files?   EDIT: I think I should add that I am looking for a way to do this without going back to \numberwithin. The reason for this is because \numberwithin doesn't seem to work well with the thmtools package.


I just have a VirtualBox running Windows 10 and I needed to expand it's hard drive disk space so I ran the following command:  VBoxManage modifyhd --resize 22500 ~/"VirtualBox VMs"/"Windows 10"/"Windows 10.vdi"   And, when I went into the specs of the VirtualBox, the space had expanded (which is good!), but I then tried decompressing a file in the VirtualBox and it threw an error saying that the disk had the original amount of space (and that I have insufficient space to decompress the file). When I checked the Local Drive to confirm, it did in fact not change.  How do I get the Local Drive to recognize the additional space?  Note: I cannot scrap the OS  EDIT  Solution, courtesy of @Ramhound.   I expanded the volume on the host OS but not the guest OS. So, in Windows, the space was just considered unallocated. I had to go into Disk Management in Windows and extend the volume. Here's the outline of how to do that:

I tried resizing my VirtualBox disk (.vdi) with VBoxManage, but it didn't resize the hard drive.  The command while in the root folder of VirtualBox was:    VBoxManage modifyhd "C:\Users\<name>\VirtualBox Vms\Linux Mint 14.1\Linux Mint 14.vdi" --resize 30000.    The output showed 0%...20%....40%...100% looking like it was successful.  Now my .vdi in VirtualBox shows the virtual size as being 29.30gb, but the actual size is still 7.90gb.  When I boot into Linux Mint, it still notifies me that the hard drive is out of space.


I have a page with some content on it and some remaining space at the bottom of this page.  |=========| | header  | |---------| |         | |  page   | | content | |         | |---------| |remaining| |  space  | |---------| | footer  | |=========|   I want to place figure which fit exactly in this remaining page space. Picture must be placed at the end of page without page breaking. \externalfigure[fig][factor=fit] does not work when height of picture is too high to fit in remaining space, and picture placed on next page.

Sometimes I don't need to have a specific picture size, but for layout reasons I would like to scale the image so that the rest of the page is filled. How can I achieve that?


My database communicates incorrectly with my page coded in php. First just some of the special characters displayed incorrectly, but when I applied mysqli_set_charset for my connection and default latin1 was overridden to correct utf8, my problem seemed just to change, but it wasn't solved: whenever I sent a text to database, it ended just before the first non-ASCII character. I searched more and found out that to state the encoding in a meta tag is not enough, that I must use headers. At first, I included header('Content-Type: text/html; charset=utf-8'); statement to the top of some of my pages. Not the texts taken from or inserted into database are correct, but on the rest of the page all special characters display like this: �  Also, having the header function called in every file is not very practical. I'm a beginner with headers, so I don't know how to apply this settings globally. I know .htaccess file can be used for this and my host claims to support it, so I started experimenting with it. I tried all the options suggested , but nothing changed.  I guess both problems have the same cause: the files I get from the server are in a different charset (I don't have a proof, but the server seem to prefer latin). So how to tell the server I want them in utf8?  Settings as read by apache_request_headers (the important fields):  ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 ACCEPT-LANGUAGE: cs,en-us;q=0.7,en;q=0.3 ACCEPT-ENCODING: gzip, deflate   Only  sees some informations about charsets (and it varies in the languages):  Accept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7 Accept-Language: de,en;q=0.7,en-us;q=0.3   Here is my .htaccess file:  <FilesMatch ".(html|htm|js|css|php)$"> FileETag None <ifModule mod_headers.c> Header unset ETag Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT" AddCharset UTF-8 .php </ifModule> </FilesMatch>   Instead of "AddCharset UTF-8 .php" I used alternatives too, but nothing worked. But I'm a beginner, so there might be some mistake.  If I need something completely different, please guide me. Someone suggested  might help, but here I'm lost even more than with the HTTP headers.  EDIT: I can't see my answer in the linked question. Yes, it guided me to php.ini, but I got only more subquestions, not answers (anything listed there don't work for me).  First, the php.ini file for my server is stored in the part of server I can't access. So I tried to create my own php.ini file in hope it will work. It consists of chunks of code I found elsewhere (I can't confess I understand it):  default_charset = "utf-8"; AddDefaultCharset UTF-8;  [iconv] iconv.input_encoding = utf-8; iconv.internal_encoding = utf-8; iconv.output_encoding = utf-8;  exif.encode_unicode = utf-8;   Again, no joy here. What's wrong?

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.


Define $a_n=\left ( 1+\frac{1}{n} \right )^n$ for $n\geq 1$. I want to show that it is increasing. First, we have $$\frac{a_{n+1}}{a_n}=\left ( \frac{1+\frac{1}{n+1}}{1+\frac{1}{n}} \right )^n\left ( 1+\frac{1}{n+1} \right )=\left ( 1-\frac{1}{(n+1)^2} \right )^n\left ( \frac{n+2}{n+1} \right )$$ Using the Bernoulli inequality, we see that, for all $n\geq 1$, $$\left ( 1-\frac{1}{(n+1)^2} \right )^n\geq 1-\frac{n}{(n+1)^2}=\frac{n^2+n+1}{n^2+2n+1}.$$ How do you then show that  $$\left ( 1-\frac{n}{(n+1)^2} \right )\left ( \frac{n+2}{n+1} \right )>1?$$  Edit: This is not a duplicate question; the question is not to show about the existence of the definition of Euler number $e$. The question is about showing that it is increasing, the way I have shown that I have been stuck with, not other ways. It seems that the question is too easy that I have been too tired to think at this late.

Here is my candidate for  the most elementary proof that $\lim_{n \to \infty}(1+1/n)^n $ exists. I would be interested in seeing others.  $***$ Added after some comments: I prove here by very elementary means that the limit exists. Calling the limit "$e$" names it. $***$  It only needs Bernoulli's inequality (BI) in the form $(1+x)^n \ge 1+nx$ for $x > -1$ and $n$ a positive integer, with equality only if $x = 0$ or $n = 1$. This is easily proved by induction: It is true for $n=1$, and $(1+x)^{n+1} = (1+x)(1+x)^n \ge (1+x)(1+nx) = 1+(n+1)x+nx^2 \ge 1+(n+1)x $. (If $-1 < x < 0$, if $1+nx \ge 0$, the above proof goes through, and if $1+nx < 0$, $1+mx < 0$ for all $m \ge n$ so certainly $(1+x)^m > 1+mx$.)  This proof originally appeared in N.S Mendelsohn, An application of a famous inequality, Amer. Math. Monthly 58 (1951), 563 and uses the arithmetic-geometric mean inequality (AGMI) in the form $\big(\sum_{i=1}^n v_i/n\big)^n \ge \prod_{i=1}^n v_i$  (all $v_i$ positive) with equality if and only if all the $v_i$ are equal.  Let $a_n = (1+1/n)^n$ and $b_n = (1+1/n)^{n+1}$.  We will prove that $a_n$ is an increasing sequence  and $b_n$ is an decreasing sequence.  Since $a_n < b_n$, this implies,  for any positive integers $n$ and $m$ with $m < n$  that $a_m < a_n < b_n < b_m$.  For $a_n$, consider n values of $1+1/n$ and $1$ value of $1$.  Since their sum is $n+2$ and their product is $(1+1/n)^n$, by the AGMI,  $((n+2)/(n+1))^{n+1} > (1+1/n)^n$,  or $(1+1/(n+1))^{n+1} > (1+1/n)^n$,  or $a_{n+1} > a_n$.  For $b_n$, consider $n$ values of $1-1/n$ and $1$ value of $1$.  Since their sum is $n$ and their product is $(1-1/n)^n$, by the AGMI,  $(n/(n+1))^{n+1} > (1-1/n)^n$  or $(1+1/n)^{n+1} < (1+1/(n-1))^n$,  or $b_n > b_{n+1}$.  Since $b_n-a_n  = (1+1/n)^{n+1} - (1+1/n)^n = (1+1/n)^n(1/n) =a_n/n $ and every $a_n$ is less than any $b_n$ and $b_3 = (1+1/3)^4 = 256/81 < 4$, $b_n-a_n < 4/n$, so $b_n$ and $a_n$ converge to a common limit.  These proofs do not seem to be really elementary,  since they use the AGMI.  However, they use a special form of the AGMI,  where all but one of the values are the same,  and this will now be shown to be implied by BI,  and thus be truly elementary.   Suppose we have $n-1$ values of $u$ and $1$ value of $v$ with $u$ and $v$ positive.  The AGMI for these values is  $(((n-1)u+v)/n)^n \ge u^{n-1}v$  with equality if and only if $u = v$.  We will now show that this is implied by BI: $(((n-1)u+v)/n)^n \ge u^{n-1}v$  is the same as  $(u+(v-u)/n)^n \ge u^n(v/u)$.  Dividing by $u^n$,  this is equivalent to  $(1+(v/u-1)/n)^n \ge v/u$.  By BI,  since $(v/u-1)/n > -1/n > -1$, $(1+(v/u-1)/n)^n \ge 1+n((v/u-1)/n) = v/u$  with equality only if $n=1$ or $v/u-1 = 0$. Thus BI implies this version of the AGMI.


Yesterday I faced somebody's angry and have downvoted several times so I asked the support about the reversal for downvotes and they answered that works same way as the upvoting reversal. Nice, but today when I logged in to my account, I have noticed that I received a upvoting reversal of 295 points!!!!(please, let me add more exclamations)!!!!!!!!!!  Here's my reputation board:    I'm so curious to figure out what was that for.  I have got +8 points for the downvoting reversal, which was five(-10) in fact. And you can count in your hands the upvotes I have received since Aug 16, about 8 I have counted.

I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back?


Is there a convenient way to not typeset a particular column in a tabular environment by modifying only the preamble of the tabular? That is, without modifying the body of the tabular itself?  My first idea was to do @{}>{\nullfont}c@{} to zero out the spacing around the ignored column (here, a c column) and typeset it with a null font. I also tried several difference sizes of space inside @{}.  This works, but the spacing between columns is not the same as it would be if I'd just left out the column entirely. See the following MWE, where I've committed a deadly sin with vertical rules (doubled, even! ) to show the difference clearly:  \documentclass{article} \usepackage{array}  \begin{document} \begin{tabular}{c|@{}>{\nullfont}c@{\,}|c}   a & b & c \\   d & e & f \end{tabular}  \begin{tabular}{c||c}   a & c \\   d & f \end{tabular} \end{document}     What should be inserted so the spacing matches? I've tried various combinations of the standard spacing commands.   Or, is there a more convenient way to do this than what I've proposed?

I have a set of 10 tables and each has an extra column that I don't want. Specifically, these tables are descriptions of database tables exported by phpMyAdmin, and they all have a "MIME" column that I would like to remove. Is there a way to do this other than using string manipulation / find and replace?   I have tried setting the column to p{0in}, but the column title still remains.


I'm going to invite my parents and brother to Germany for a visit of two weeks. I will send them the invitation; I earn a decent salary and am able to share the cost for them.    Should I invite them and also show the sponsorship (Verpflichtungserklärung) for both my parents and brother? Do my parents need to demonstrate their own financial ability?  My brother works in my uncle's business and he doesn't have payslips to support his own financial claims. Can my parents show that they also support my brother financially?

I'm from India. My sister is staying in Stuttgart, Germany. She is inviting myself and our mother to visit her. I wanted to know, what should be the minimum bank balance required in my sister's account to invite us to Germany?


My deck is a ramp deck. It has a lot of creatures under 3 Mana. It is a mono green deck with elves and hydras.

A Commander deck consists of 100 unique cards, of which one is designated as the Commander and must be either a Legendary Creature or an allowed Planeswalker.  I'm still very unfamiliar with this format.  How would you go about figuring out the number of lands to put into your commander deck?


I'm using a contrived example here, but am curious about the meaning of the below quotation:     "Users not adding their phone numbers and accepting the TOS will be rejected"   Is there ambiguity in that language as to which users would be rejected?  Possible scenarios:   User adding the phone number and accepting the TOS User adding their phone number but not accepting the TOS User not adding their phone number but accepting the TOS User not adding their phone number and not accepting the TOS   I am most interested in #2 above.

I recently read this sentence:     Do not declare this callback function with a void return type and cast the function pointer to LPTHREAD_START_ROUTINE when creating the thread.   and wasn't sure if it was ambiguous or not. Which of these are correct interpretations:         do not declare this callback function with a void return type   do not cast the function pointer to LPTHREAD_START_ROUTINE when creating the thread   do cast the function pointer to LPTHREAD_START_ROUTINE when creating the thread      Edit: I found some example code, seems like (1) and (3) is the intended interpretation.


Could someone give me the content of a fresh .bashrc ? I did not find it with Google.  Why ? Because I unfortunately ecrased it.

I've been trying to install Android developer tools on Eclipse, and I followed the information in .  Like the video said, I added the following two lines of code to the .bashrc file:  export PATH=$(PATH):-/android-sdk/tools/ export PATH=$(PATH):-/android-sdk/platform-tools/   It seems, however, that this did not help me to install the Android files on Eclipse, as I am still having problems with that. What's more, it seems that I can't make any command in the terminal without getting a major error now! Every time I try to make a command in the terminal I get the following message:     The command could not be located because '/usr/bin' is not included in   the PATH environment variable.   Is there away to restore .bashrc to its default?


I want to save the output from a bash script which is invoked from a C program to a variable declared in the C program. I searched and tried successfully calling a script using system, and I tried this, but it didn't work:  char* a; system("a=`ls`"); printf("%s",a);

I've got a utility that outputs a list of files required by a game.  How can I run that utility within a C program and grab its output so I can act on it within the same program? UPDATE: Good call on the lack of information.  The utility spits out a series of strings, and this is supposed to be portable across Mac/Windows/Linux.  Please note, I'm looking for a programmatic way to execute the utility and retain its output (which goes to stdout).


I did a scan of Math.SE and couldn't find this, so I will post:   I am working on Bass's Analysis exercise 2.3 in page 15 (on book)   The problem states, given:  $$ A_1 \subset A_2 \subset A_3 ... $$  where each finite $A_i$ is a $\sigma$ -algebra, prove that $\bigcup_{\forall i} A_i $ is a $\sigma$-algbra or find a counter example.  Now I was able to show that: $\bigcup_{\forall i} A_i $ is a set algebra by considering that any finite collection of set $u_1 ... u_m \in \bigcup_{\forall i} A_i$ must belong to $A_{u_1} ,... A_{u_m}$ respectively and therefore there is a finite indexed $A_k$  that contains $A_{u_1} ,... A_{u_m}$ and therefore all the countable unions and intersections of $u_1 ... u_m \in \bigcup_{\forall i}$ must be contained in $A_k$ (and similarly the complements of the sets).   Now this argument dies if you consider a countably infinite sequence of sets $u_1, u_2 , u_3...$ since you can no longer talk about the "largest, finite-index m such that $A_m$ contains $u_1, u_2 ... $  "  Which is causing me start to doubt that $\bigcup_{\forall i} A_i $  is even a $\sigma$ algebra in the first place. Does anyone know how to find a counterexample? Or how to modify the proof to circumvent this obstacle.

If $\mathcal{F}_1 \subset \mathcal{F}_2 \subset \dotsb$ are sigma algebras, what is wrong with claiming that $\cup_i\mathcal{F}_i$ is a sigma algebra?  It seems closed under complement since for all $x$ in the union, $x$ has to belong to some $\mathcal{F}_i$, and so must its complement.  It seems closed under countable union, since for any countable unions of $x_i$ within it, each of the $x_i$ must be in some $\mathcal{F}_j$, and so we can stop the sequence at any point and take the highest $j$ and we know that all the $x_i$'s up to that point are in $\mathcal{F}_j$, and thus so must be their union. There must be some counterexample, but I don't see it.


Here is a simplified version of my scenario:  class Base {     class Entry     {         ...     }      std::vector<Entry *> entryList;      void processEntry() = 0;      void OnProcessEntry(); // processEntry callback };  class Derived : public Base {     class Entry : public Base::Entry     {         ...     }      void processEntry()      {          ...          entryList.push_back(new Entry);           OnProcessEntry();     } };   When I copy a Derived::Entry pointer into entryList, the object is sliced to Base::Entry. Is there any way I can get the Entry back to its original "unsliced" state within the base class method OnProcessEntry?  If anybody can recommend a more appropriate title please do and I will edit.  Thanks.

Someone mentioned it in the IRC as the slicing problem.


The project is to encoding decoding： abcdefghijklmnopqrstuvwxyz kngcadsxbvfhjtiumylzqropwe at first, program should asks the user to enter a key string like above. The program will then read the file and output to the console its encoded contents.Capital letters are mapped the same way as the lower case letters above, but remain capitalized.For example, with the key above, every 'A' becomes a 'K' when encoding a text. Numbers and other characters are not encoded and remain the same. For example, with the mapping above, every 'a' becomes a 'k' when encoding a text, and every 'k' becomes an 'a' when decoding.  Run 1: Enter encoding key: maxnrslkbpwfzjidouetchgvyq Enter the file name: sampleInput.txt ************** Encoded Contents **************** Grfxizr ti XE 20A! Xizdctrue mur liin mt siffigbjl bjetucxtbije, act jit mt urmnbjl yicu zbjn. Bs yic mctizmtr m zree, yic lrt mj mctizmtrn zree.    Good Bye!  I get error : Exception in thread "main" java.lang.NullPointerException  on line char outputFile= hmap.get(FileChar);  C:\Users.....\AppData\Local\NetBeans\Cache\8.1\executor-snippets\run.xml:53: Java returned: 1  which I want assign input file to hash map get value.   is it the reason because I dont make key value about other characters except [a-z] in hashmap like“， ！ ," etc, then it dont have this key value then make null exception?  Here is some code for hashmap :  HashMap<Character,Character>hmap = new HashMap<>();   for(int j =0; j<26; j++){        if(Character.isUpperCase(originalResult.charAt(j))){                hmap.put(originalResult.charAt(j),Character.toUpperCase(inputResult.charAt(j)));       }       else{       hmap.put(originalResult.charAt(j),inputResult.charAt(j));       }   }   Here is  some code I think the problem:  while((Fileline =bin.readLine())!=null ) {     char[] FileArray = Fileline.toCharArray();      for(int j=0;j<Fileline.length();j++ )     {         FileChar =FileArray[j];           char outputFile= hmap.get(FileChar);   ////here is the problem        }      System.out.println( String.valueOf(outputFile)); }   I think the problem might be the char when I print like:  while((Fileline =bin.readLine())!=null ){      char[] FileArray = Fileline.toCharArray();     for(int j=0;j<Fileline.length();j++ ){           FileChar =FileArray[j];            s = new String(String.valueOf(FileChar));    }    System.out.println(s);   the result is nothing:  y  .  but when I print in the loop，it looks each line only have one letter,and lots of line：  while((Fileline =bin.readLine())!=null ){      char[] FileArray = Fileline.toCharArray();     for(int j=0;j<Fileline.length();j++ ){           FileChar =FileArray[j];            s = new String(String.valueOf(FileChar));          System.out.println(s);   }

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 got this error but my game still works. Should I be worried? I can provide the coding that cause this error if needed.  Error:  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException         at main.GamePanel.paintComponent(GamePanel.java:77)         at javax.swing.JComponent.paint(Unknown Source)         at javax.swing.JComponent.paintChildren(Unknown Source)         at javax.swing.JComponent.paint(Unknown Source)         at javax.swing.JComponent.paintChildren(Unknown Source)         at javax.swing.JComponent.paint(Unknown Source)         at javax.swing.JLayeredPane.paint(Unknown Source)         at javax.swing.JComponent.paintChildren(Unknown Source)         at javax.swing.JComponent.paintToOffscreen(Unknown Source)         at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)         at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)         at javax.swing.RepaintManager.paint(Unknown Source)         at javax.swing.JComponent.paint(Unknown Source)         at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)         at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)         at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)         at java.awt.Container.paint(Unknown Source)         at java.awt.Window.paint(Unknown Source)         at javax.swing.RepaintManager$4.run(Unknown Source)         at javax.swing.RepaintManager$4.run(Unknown Source)         at java.security.AccessController.doPrivileged(Native Method)         at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)         at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)         at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)         at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)         at javax.swing.RepaintManager.access$1300(Unknown Source)         at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)         at java.awt.event.InvocationEvent.dispatch(Unknown Source)         at java.awt.EventQueue.dispatchEventImpl(Unknown Source)         at java.awt.EventQueue.access$500(Unknown Source)         at java.awt.EventQueue$3.run(Unknown Source)         at java.awt.EventQueue$3.run(Unknown Source)         at java.security.AccessController.doPrivileged(Native Method)         at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)         at java.awt.EventQueue.dispatchEvent(Unknown Source)         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)         at java.awt.EventDispatchThread.run(Unknown Source)