I've heard that light can form a curve if they travel near high-mass stars or even a black hole with strong gravity. Which is according to this   $$\large F_{g}=\dfrac{Gm_1m_2}{r^2}.$$  But I've also heard that photons do not have (rest) mass! So it doesn't fit that equation anymore! But why can photons be pulled by gravities without (rest) mass? Could someone explain that?

I understand that mass-energy equivalence is often misinterpreted as saying that mass can be converted into energy and vice versa.  The reality is that energy is always manifested as mass in some form, but I struggle with some cases:  Understood Nuclear Decay Example  In the case of a simple nuclear reaction, for instance, the total system mass remains the same since the mass deficit (in rest masses) is accounted for in the greater relativistic masses of the products per $E=\Delta m c^2$.  When a neutron decays and you are left with a fast proton and a relativistic electron.  If you could weigh those two without slowing them down, you would find it weighed as much as the original neutron.  Light in a Box  This becomes more difficult for me when moving to massless particles like photons.  Photons can transmit energy from one heavy particle to another.  When a photon is absorbed the relativistic mass (not the rest mass) of the (previously stationary) particle that absorbs it increases.  But if my understanding is correct, the energy must still be manifested as mass somehow while the photon is in-flight, in spite of the fact that the photon does not have mass.  So let's consider a box with the interior entirely lined with perfect mirrors.  I have the tare weight of the box with no photons in it.  When photons are present the box has an additional quantifiable amount of energy (quantified below) due to the in-flight photons.  Say there are $N$ photons... obviously assume $N$ is large.  $$\Delta m = \frac{ E }{ c^2 } = \frac{ N h }{ \lambda c}$$  Interactions are limited to reflections with the wall, which manifest as a constant pressure on the walls.  If I hold this box in a constant gravitational field (like the surface of Earth) then there will be a gradient in the pressure that pushes down slightly.  Is this correct?  Wouldn't there still technically be mass as the photons are in-flight, which would cause its own gravitational field just as all matter does?  How is this all consistent with the assertion that photons are massless?  Is it really correct to say that photons don't have mass?  It seems to be a big stretch.  Please offer a more complete and physically accurate account of this mirror-box.


How do I make a \$220 \Omega\$ 0.5 W resistor using 0.25 W resistors (no matter what the value of the resistors). All I know is  \$V = I \times R\$ (which we call Ohm's law)  \$P = I \times V\$ (sometimes called Watt's law)

I want to join 3 resistors connected in parallel into one. Like this   If for the total resistance I use  $$R_t = \frac{R}{3}$$  But what about the power of them?


How can write text over stretched tilde in math mode? I want the tilde length to be automatically stretched to the size of the text on it. Like this figure!  MWE: \documentclass{article} \usepackage{amsmath, amssymb} \begin{document} \[ \sin x\stackrel{x\to 0}{\sim} x \] \end{document}

I am able to produce a standard length \sim with a tiny S above it, but I would like the \sim tilde to be longer (maybe one and half times as wide as a capital letter).  Any tips on how to change the width/length of \sim?


I need to output onto a button in realtime what is being written into a text input field.
     <input id="input" type="text" pattern="[0-9]+" name="amount">

     <button id="output" type="submit" name="submit">         //display output here     </button>
   I would use something like this:     But since both the input field and the button are dynamically loaded by ajax, this doesn't work.  I would also be willing to use jQuery since it's already being used on the page anyway.  Thanks.

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.


I've got 2 methods of storing pages. The first is simple; store it in a file. The second is to store it in the database which is I'm having issues with. The whole "system" is based around an "engine" which outputs the page by injecting it into a HTML template. To put it simply: the code must be executed before it reaches the engine. Hopefully this will make a little more sense with some code. page.class.php    ... // Page was found in the database             $this->name = $pageVariables['name'];             $this->requiredAuth = $pageVariables['requiredAuth'];             if ($parsed) {                 ob_start();                 echo $pageVariables['content'];                 $this->contents = ob_get_clean();                 var_dump($this->contents);             } else {                 $this->contents = $pageVariables['content'];             } ... // File exists on the system, load it                 $fileContents = file_get_contents($this->url);                 if ($parsed) {                     ob_start();                     include($this->url);                     $this->contents = ob_get_clean(); var_dump($this-contents);                     if (isset($pageName)) {                         $this->name = $pageName;                     }                     if (isset($requiredAuth)) {                         $this->requiredAuth = $requiredAuth;                     }                     if (isset($useEngine)) {                         $this->useEngine = $useEngine;                     }                 } else {                     $this->contents = $fileContents;                 }   The if ($parsed) {...} is there so the page can be fetched un-parsed for editing purposes. Obviously that is a cut down version, but I hope that shows enough. If I load a page with the code  Hello World
 <?php echo 'Hello World'; ?>   from the database the output I get is  Hello World
 <?php echo 'Hello World'; ?>   however, the same code stored in a file outputs      Hello World     Hello World   I have tried using eval(), but that will only evaluate PHP code, and fails when I include the HTML/PHP mixture. Maybe there's a better way of going about this (storing it, executing etc), but this is the issue as I currently see it.

I'm trying to write a page that calls PHP that's stored in a MySQL database. The page that is stored in the MySQL database contains PHP (and HTML) code which I want to run on page load.  How could I go about doing this?


Okay, my character on Skyrim is a Khajiit and IM not very far in the game....but i would like to know where i have to go in order to become a werewolf?

I've heard that one of (maybe the only?) secret races in this game is a werewolf.  How do I become a werewolf?  And by extension, how do I cure lycanthropy, that is, if there even is a cure?


import bpy  ob = bpy.data.objects child = ob['cube'] parent = ob['armature'] bone = parent.pose.bones['bone']  child.parent = parent child.parent_type = 'BONE' child.parent_bone = bone  I wrote the script above to carry out bone parenting with Python. The parenting setting works correctly, but at the end, the child object's transformation will have an offset. How can I achieve bone parenting without offset?  Additional questions about batFINGER's answers. I tested the script. But I still get the offset. Did I make a mistake? I recorded two GIF to clarify the question. In the case of the parenting using operator, the cube's transform is maintained, but in the case of parenting using script, the cube's transform changed. Bone parenting using operator  Bone parenting using script    After creating an armature, change the bone transforms in pose mode. Operate bone parenting with cube & bone of armature. The ops method keeps the cube in place, but the script method changes the cube by the bone transform I want to achieve ops result using python script.  Result by ops (Ctrl+P/Bone after select cube and armature)  Result by script

I have just spent the better part of my day trying many different examples in an attempt to simply parent an object to a bone without the object moving (aka keep_transform). But no matter what I try it always offsets:  object.parent = armature object.parent_bone = bone #object now in weird position object.parent_type = 'BONE'   I also tried this as :  object.parent = armature object.parent_bone = bone bpy.context.active_pose_bone bpy.ops.object.parent_set(type='BONE', keep_transform=True)   But get error "Error: No active bone"  I notice the object I am parenting to the bone in the armature is always moving to the bone's tail when I need it to be positioned at the head.   Is there anything I can do to programmatically affix the object to the bone's head? Any help her would be most encouraging, I just keep hitting walls with this.  One idea I had was to just offset the object by the head/tail delta, but because blender allows parenting-in-place I figured I should stick to convention.  Thanks.


I am trying to install  on my Linux machine. Right or wrong, at the end of the instructions they say to      add this line to the file .bashrc in your home directory: export PATH="/home/username/anaconda/bin:$PATH"   I do not know much of how the PATH in bash works. But, I have another PATH in my .bashrc file:  export PATH="/usr/local/share/rsi/idl/bin:$PATH"   How am I supposed to add the new path?

I'm wondering where a new path has to be added to the PATH environment variable. I know this can be accomplished by editing .bashrc (for example), but it's not clear how to do this.  This way:  export PATH=~/opt/bin:$PATH   or this?    export PATH=$PATH:~/opt/bin


I am having a problem while uploading a string to MySQL database. Here's the things I use:   EditText for user input PHP file that receives string from the application and inserts into the database   The PHP file I use for communication:  <?php  $con = mysql_connect("SERVER","DB_NAME","PASS"); if (!$con)     {     die('Could not Connect:'. mysql_error());     } mysql_select_db("DB_NAME",$con);   mysql_query ("INSERT INTO table_name (id) VALUES('".$_REQUEST['st_Id']."')");  mysql_close($con); ?>   When I try to insert text into the EditText in android and that text includes a quotation marks the operation fails, otherwise the operation is working fine. I guess the problem in the PHP file while receiving the string but I have no idea how to solve it.  Any ideas?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I am looking for a comprehensive book or notes in algebraic geometry and topology techniques used in string theory compactifications covering topics like orientifolds, orbiolds, Calabi Yau manifolds and toric geometry, divisors, resolution of singularities, fiber bundles etc.  If it contains explicit examples and exercises it would be useful.

Could you please recommend any good texts on algebraic geometry (just over the complex numbers rather than arbitrary fields) and on complex geometry including Kahler manifolds that could serve as an informal introduction to the subject for a theoretical physicist (having in mind the applications in physics, e.g. in the string theory)?   What I want for a moment is to get some informal picture of the subject rather than being dug up into the gory details of the proofs and lost in higher and higher layers of abstraction of commutative algebra and category theory. The texts I have found so far are all rather dry and almost completely lack this informal streak, and all of them are geared towards pure mathematicians, so if there exists something like "Algebraic geometry for physicists" and "Kahler manifolds for physicists" (of course, they would probably have different titles :)), I would greatly appreciate the relevant references.


After I removed the Python 3 package from my Ubuntu 18.04, I also lost the terminal, software centre and some other useful applications.  What do I need to do now?

I am a new Ubuntu user running Ubuntu 13.04.  I've been trying to install and use a DeDRM tool, but I've been having problems doing so. I was following some directions that said I needed a version of Python 2.7, but not anything Python 3.0 or later (because 3.0 versions are missing some necessary libraries?). I tried to install Python 2.7.5.6, but it didn't work. I thought it was probably because I had the later version of Python, so I went through terminal and removed Python 3.3, so I could install the earlier version of Python.  Now that I've uninstalled Python 3.3, a lot of applications no longer work, including the terminal and the Ubuntu Software Center. I have no idea how to fix this problem now.


Can someone give an explanation/proof of whether these two numbers lie on the real number line?

Is infinity a number? Why or why not?  Some commentary: I've found that this is an incredibly simple question to ask — where I grew up, it was a popular argument starter in elementary school — but a difficult one to answer in an intelligent manner. I'm hoping to see a combination of strong citations and solid reasoning in the answers.


I am Peruvian going from USA to Italy and I have to stop in London's airport, do I need a visa for a couple of hours?

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


I want to update my database if ID is already exist else insert if ID is not exist.  process.php:  $servername = "localhost"; $username = "root"; $password = ""; $dbname = "maindata"; // Create connection $conn = mysqli_connect($servername, $username, $password, $dbname); // Check connection if (!$conn) {  die("<center>Connection failed: " . mysqli_connect_error() . "</center"); }       $id = $_POST['id'];    $aname = $_POST['aname'];    $xsummary = $_POST['xsummary'];  $sql=mysql_query("SELECT * FROM info WHERE ID = $id");  if (mysql_num_rows($sql) == $id)  {  $sql="update info set AccountName= '$aname', ExecutiveSummary='$xsummary'"; }  else {  $sql="insert into AccountName= '$aname', ExecutiveSummary= '$xsummary'"; }   Some one help me on my problem.  Thanks in advance.

While executing an INSERT statement with many rows, I want to skip duplicate entries that would otherwise cause failure. After some research, my options appear to be the use of either:  ON DUPLICATE KEY UPDATE which implies an unnecessary update at some cost, or INSERT IGNORE implies an invitation for other kinds of failure to slip in unannounced.  Am I right in these assumptions? What's the best way to simply skip the rows that might cause duplicates and just continue on to the other rows?


I am actually trying to design the navbar for website and I am facing issue , I have one logo to show on the left and UL to right side on nav , I have created both and now I want them both to be center-vertical in their div container , unfortunately I am not able to center-vertical UL tag , need some help in css or html ! Here I am attaching the html   header {   height: 100vh;   background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url(../../img/static/cover.jpg);   background-size: cover;   background-repeat: no-repeat; }  .div_nav {   overflow: auto;   width: 80%;   margin: 0px auto;   padding: 16px 32px;   background-color: rgba(139, 0, 139, 0.459); }  .nav_logo {   background-color: darkorange;   height: 72px;   width: auto; }  .nav_ul {   background-color: darkslateblue;   float: right;   margin: auto 0px;   list-style: none; }  .nav_ul li {   margin-left: 16px;   display: inline-block; }  .nav_ul li a {   color: #fff;   text-decoration: none;   text-transform: uppercase;   font-family: 'Montserrat', sans-serif; }

Para

Sagro

Miasa

Varga

        here I am attaching the image of output which I am currently getting

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


I know it is defined as $ dP \wedge dx  $ or explicitly,  $$ \frac{\partial P }{\partial y } dy \wedge dx   . $$  The question is, could it be $dx \wedge d P $?  Or  $$  \frac{\partial P }{\partial y }  dx \wedge dy ?    $$  I know the question must be very naive or even stupid. But I am indeed confused.


I want to know how to calculate the flowrate (Q) of a drain tank flowing through a pipe (see the figure below)  All I know is that Q=Velocity(V) x Area (A)  V= sqrt(2*g*H)=sqrt(2*9.81*10)=14m/s.  I believe this is wrong since we are not considering the friction in the pipe. How can i calculate the Exact Q of this problem. assuming the material of the pipe is known.

Anybody kindly help me to find how to calculate pressure in bar from flow rate. I have a pipe and from that I am transferring water at a constant flow rate of 5ml/min. At this flow rate, with a 0.5 cm diameter pipe, what will be the pressure generated by water?


One week after installation of The Perfect Server - Ubuntu 12.04 LTS I got server crash.   In log files I don't see any errors so I made photos. One more thing I inserted new ram modules ( before was 4 Gb, now 16 Gb).        Then I tried to make memtest and got:  error to small lover memory (0x99100 > 0x8f000)   After all i replaced my old ram module but errors there still occurred.  How to resolve this ?

I have problem with my server. For server configuration I followed   My screen is flashing every 20 seconds with  [ 545.828437] Quota error (device dm-4): find_block_dqentry: Quota for id 107 referenced but not present [ 545.829017] Quota error (device dm-4): qtree_read_dquot: Can't read quota structure for id 107   ( I also did photos because cant find thease errors in logs).    My fstab:  proc            /proc           proc    nodev,noexec,nosuid 0       0 /dev/mapper/prasytojas--vg-root /               ext4    errors=remount-ro,usrjquota=quota.user,grpjquota=quota.group,jqfmt=vfsv0 0       1 /dev/mapper/isw_bjaiaiijih_RAIDAS1 /boot           ext2    defaults        0       2 /dev/mapper/prasytojas--vg-swap_1 none            swap    sw              0       0 /var/log/ispconfig/httpd/aus.lt /var/www/clients/client1/web1/log    none    bind,nobootwait    0 0 /var/log/ispconfig/httpd/pra.lt /var/www/clients/client1/web3/log    none    bind,nobootwait    0 0 /var/log/ispconfig/httpd/ve.lt /var/www/clients/client1/web4/log    none    bind,nobootwait    0 0 /var/log/ispconfig/httpd/1d.lt /var/www/clients/client1/web5/log    none    bind,nobootwait    0 0   How can I fix this?


Despite whatever be the shape of object that you drop in water, it be 1D, 2D, 3D, they all produce ripples in a circular pattern, is this pattern followed under water as well (in terms of density changes, like compressions and rarefactions) I assume it to be semispherical under water but have no proof, and why is this pattern so in the first place?  I know the question is there. My Actual question is written in bold above. Does it have to do with energy?

I have had a question since childhood.  Why do we always get circular waves (ripples) in water even when we throw irregularly shaped object in it?


I was taking a look at a HDD and I found a document (from Toshiba, link: ) that says:  "One Gigabyte (1GB) means 10^9 = 1,000,000,000 bytes using powers of 10. A computer operating system, however, reports storage capacity using powers of 2 for the definition of 1GB = 2 ^30 = 1,073,741,824 bytes, and therefore shows less storage capacity."  Then powers of 10 are bigger than powers of 2, OK.   Example 10^2 = 100 and 2^2 = 4.   But I do not understand the document which says for the same storage capacity:  1GB is 1,000,000,000 bytes (powers of 10) and 1,073,741,824 bytes (powers of 2), then: it shows less storage capacity (the powers of 2). Why is it less? If I see for 1GB more storage capacity in powers of 2 than powers of 10.

From all the hard drives I have bought, they never seem to be as large as the advertised size; from 320 GB down to 290 GB, from 500 GB down to 450 GB, etc. Is there a technical reason for this?


We say that two sets $A$ and $B$ are comparables if and only if $|A|\leq |B|$ or $|B|\leq |A|$.  I want prove that this criterio is equivalent to axiom of choice. If I use Zorn lemma it is simple prove that A-C implies that criterio but I don’t know how to prove that that criterio implies A-C. Some ideas?

If, for any two sets $A$ and $B$, Either $|A|<|B|, |B|<|A|$ or $|A|=|B|$ holds, does the axiom of choice holds? Why?


Let $K$ be a field of characteristic zero and $K(x)$ the field of rational functions with coefficients in $K$. Let $K(u)$ denote the subfield of $K(x)$ generated by $u \in K(x)$ over $K$.  My questions are following:        Suppose that $u=x^{2}$. Prove that $K(x)/K(x^{2})$ is Galois and   find all elements of the Galois group Gal$(K(x)/K(x^{2}))$.      My attempt: Let $f(X)=X^2-u \in (K(u))[X]$. $f(X)$ is linear, and thus irreducible in $(K[X])[u]=(K[u])[X]$. Gauss’ Lemma tells us that the polynomial $f(X)$ is also irreducible over $(K(u))[X]$. Moreover, $f(X)=(X-x)(X+x)$ then $f(X)$ is separable over $k(u)$ and $\pm x$ are roots of $f(X)$. This means that, $K(x)$ is the splitting field for separable polynomial $f(X)$ over $K(u)$. Therefore $K(x)/K(x^{2})$ is Galois. In addition, $[K(x):K(x^{2})]=2$. Can we conclude that Gal$(K(x)/K(x^{2}))\simeq \Bbb Z/2\Bbb Z$? I am aware that Gal$(K(x)/K) \simeq PGL_2(K)$ but I couldn't figure out what are exactly elements of Gal$(K(x)/K(x^{2}))$?        Suppose that $u=x^{2}-x$. Prove that $K(x)/K(x^{2}-x)$ is Galois and   find all elements of the Galois group Gal$(K(x)/K(x^{2}-x))$.      My attempt: Similar to that in above discussion, I found that $K(x)$ is the splitting field for separable polynomial $g(X)=X^2-X-x^2+x$ over $K(x^{2}-x)$. Therefore $K(x)/K(x^{2}-x)$ is Galois and we can write Gal$(K(x)/K(x^{2}-x))\simeq \Bbb Z/2\Bbb Z$? The similar question arises, for $\sigma\in $ Gal$(K(x)/K(x^{2}-x))$, can we determine $\sigma$?        Prove that $K(x^{2}) \cap K(x^{2}-x)=K$.      It is clear to me that $K \subseteq K(x^{2}) \cap K(x^{2}-x)$. But I can't prove the reverse inclusion.  Any help would be much appreciated.

Let $K=F(x)$ be the rational function field over a field $F$ of characteristic $0$, let $L_1=F(x^2)$, and $L_2=F(x^2+x)$. How to show that $L_1\cap L_2 = F$?


How to run a scheduled job every 1 minute , and automatically start the re-scheduled automatically again and again same process. I am trying this example below way. But it can't reschedule automatically and time interval also not clear. Could you please give me an example another way.  Global class SchedulebatchAccountUpdate1 Implements Schedulable {     global void execute(SchedulableContext sc) {     batchAccountUpdate1 c = new batchAccountUpdate1();     Database.executeBatch(c);     }   Public static void SchedulerMethod() {         String sch = '0 0 * * * ?';     system.schedule('My Jobs scheduled name', sch, new SchedulebatchAccountUpdate1());     } }

I have a need to execute the Apex class every minute.   I have a Sites VF page and in that I have link called "Export to Excel" which exports bulk data (say 50000 records of my wrapper class type) through Batch Apex.  The application is used by about 100 users When more than 5 users click on that link simultaneously (at the same time), or within a minute batch jobs fails.  Am planning to have a custom object and make an entry in it whenever the users click on that link and populate whatever necessary details needed for executing that job and will also have a status column. If the status is yet to process and if the number of running process is less than 5 (or) 3, planning to call an apex batch job and this caller class will be a schedulable type and thought of scheduling it every minute. Unfortunately am unable to schedule it for every minute.   Any ideas for doing a custom implementation for scheduling my job every minute without installing any external apps? Or is there an alternative solution for my problem?


I am running Windows 7 Ultimate. I am trying to use windows Media player to stream to my PS3.  They are both on the same router and I can stream using another program. I go to media streaming options and try and select 'All Networks', because there I can see al my devices.  But as soon as I click ok to save the settings it closes the window and reverts back to 'Local Network' and here for some reason I cannot see any of my devices.  Any help would be appreciated

I have a computer and a  connected wirelessly to my router, but it seems no matter how hard I try I can not get my PC to show up on my PS3.  I've also tried setting up a media server with TVersity but my PS3 just won't find it. Any suggestions?


Find all values of $n \in \mathbb{N}$ for which the fraction $\frac{3^n-2}{2^n-3}$ is reducible.   Attempt:  We find all values of $n$ for which $\gcd(3^n-2,2^n-3)=1$ and take the complement. Since $2^n-3$ is odd and $3^n-2$ is odd, we see that $\gcd(3^n-2,2^n-3)=1$ is equivalent to $\gcd(6^n-2^{n+1},2^n-3)=1$. We then obtain $\gcd(3^{n+1}-2^{n+1},2^n-3) = 1$ and finally $\gcd(3^{n+1}-6,2^{n}-3)=1$.   This doesn't seem to get me anywhere.  Original solution:  We find all values of $n$ for which $\gcd(3^n-2,2^n-3)=1$ and take the complement. Since $2^n-3$ is odd and $3^n-2$ is odd, we see that $\gcd(3^n-2,2^n-3)=1$ is equivalent to $\gcd(6^n-4,2^n-3)=1$. We then obtain $\gcd(5,2^n-3) = 1$ is equivalent to our required condition. Then since the powers of $2$ modulo $5$ cycle as $2,4,3,1,\ldots$ we see that $\gcd(5,2^n-3) = 1$ occurs only when $n \neq 3+4k$ for $k \in \mathbb{Z}^+ \cup \{0\}$. Therefore, our solution set is $n=3+4k$.

Prove that $\gcd(3^n-2,2^n-3)=1$ if and only if $\gcd(5,2^n-3)=1$ where $n$ is a natural number.   I didn't see an easy way to prove this using the Euclidean algorithm, but it seems true that both gcd's are not $1$ only if $n = 3+4k$. Is there an easy way to prove the statement?


I would like to have a class template with basic implementations of my methods, and a set of subclasses that use the template class with particular types (double, int, char*) and override some subset of those base implementations, as needed. However, my overridden methods don't seem to get called unless I declare the object as an instance of the subclass. In exploring this problem I came up with the following code:  #include <iostream>  template <typename T> class BaseClass { public:     virtual void print1 (T thing) {         std::cout << "Base print1: " << thing << std::endl;     }      virtual void print2 (T thing) {         std::cout << "Base print2: " << thing << std::endl;     } };  class IntClass : public BaseClass<int> { public:     void print2 (int thing) {         std::cout << "Int print2: " << thing << std::endl;     } };  int main() {     BaseClass<int> thing = IntClass();     thing.print1(1);     thing.print2(1);      IntClass thing2 = IntClass();     thing2.print1(2);     thing2.print2(2);      return 0; }   My expected output would be:  Base print1: 1 Int print2: 1 Base print1: 2 Int print2: 2   But instead, I get:  Base print1: 1 Base print2: 1 Base print1: 2 Int print2: 2   Is it possible to achieve my goal here, or am I better off creating separate base classes for each type in this case?  Apologies if my terminology is a bit off - I am relatively new to C++.

Someone mentioned it in the IRC as the slicing problem.


If question was deleted during manual refreshing iOS app shows this text:         Tapping on the "Open in Chrome" link opens incorrect URL:         App Version: 1.6.2.5 Device: iPad Air 2 (Wi-Fi) OS Version: Version 10.2 (Build 14C92)

I tried to follow a comment link from the Inbox into the question on the iOS app. A message popped up saying Page Not Found but that the link could be opened in Chrome; presumably the OP deleted it. However the link it tried to open when clicked was https://posts/comments/69702622...  Similar behaviour occurs when I try to click through a link to a deleted post from another post or comment; e.g. following the link in  then clicking Open in Chrome takes me to https://q/41223344.   This only happens with Chrome, switching my preferred browser to Safari works just fine.    App Version: 1.6.2.5 Device: iPhone 6s OS Version: Version 10.1.1 (Build 14B100)


I tried installing hadoop and I no longer need stuff from it. When launching shell , it gives the following and many commands are unrecognized now , how do I reset it to default ?  bash: export: `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin: /bin:/usr/games:/usr/local/games:/usr/local/hadoop/bin': not a valid identifier astitva@astitva-Vostro-3446:~$

I accidentally unset all the directories of $PATH while trying to add a new one in ~/.bashrc. I opened a new terminal window as I was editing and now $PATH is empty. I'm worried if I boot from another drive to find the $PATH I won't be able to boot into this drive again.  Basically, what is the default result of echo $PATH?


My purpose of travel is to attend an academic conference at Amsterdam.   I'm also planning to visit Paris before attending the conference. So, my first port of entry is Paris.  Where should I apply for my Schengen visa? I want to apply at the French embassy as the processing time is fast. Is this fine?

My port of entry and exit is Frankfurt, Germany. However i will only be spending a day or two there. I am visiting Spain and Portugal for a week each. So should I be applying to Spain embassy or German embassy? I am an Indian citizen.


I've asked a question and after some edits I fatally and inadvertently changed it to community wiki. Is it possible, using rollback, to return to the point where community wiki flag is not set?

I accidentally checked the box on a question. Can this be undone?


How would you say this in another way:  'I'm rooting for France tonight.' 'Oh yeah? I'm with Belgium.'  Other than supporting, of course.

What are other ways one can say that have the same meaning as, "I'm rooting for you?"


What are the rules around indicating required fields in a flow that has some pages that have all required fields and some that are mixed?   Is it better to denote optional fields in this case?

How should required field validation be handled visually?  Note: assume asterisk is red  *Name:[_______________]   or  Name:*[_______________]   or  Name: [_______________]*   or  Name: [____red bg____  ]  or  Name(<- font color red): [_______________]  or  You tell me a better way!


Here is a simple script to calculate date of birth from getdate or any set date. I've seen many answers to this calculation but all seem to have issues like rounding and such.  Do you see any issues with script below for age calculation?  DECLARE @DoB AS DATE = '1968-10-24' DECLARE @cDate AS DATE = CAST('2000-10-23' AS DATE) SELECT   --Get Year difference      DATEDIFF(YEAR,@DoB,@cDate) -      --Cases where year difference will be augmented     CASE          --If Date of Birth greater than date passed return 0         WHEN YEAR(@DoB) - YEAR(@cDate) >= 0 THEN DATEDIFF(YEAR,@DoB,@cDate)          --If date of birth month less than date passed subtract one year         WHEN MONTH(@DoB) - MONTH(@cDate) > 0 THEN 1           --If date of birth day less than date passed subtract one year         WHEN MONTH(@DoB) - MONTH(@cDate) = 0 AND DAY(@DoB) - DAY(@cDate) > 0 THEN 1           --All cases passed subtract zero         ELSE 0     END

What would be the best way to calculate someone's age in years, months, and days in T-SQL (SQL Server 2000)?  The datediff function doesn't handle year boundaries well, plus getting the months and days separate will be a bear.  I know I can do it on the client side relatively easily, but I'd like to have it done in my .


I've been using ubuntu 20.04 on a Thinkpad t430s with intel graphics for around a year now with no problems. Yesterday, Ubuntu asked me to install an update. After the update, my graphics was suddenly extremely glitchy. Icons from the desktop flash through my browser, scrolling is inconsistent. Sometimes graphics breaks down altogether and I have to restart the laptop. The problems are worse in xorg. Switching to Ubuntu on Wayland makes it usable (although still glitchy), but xorg is terrible. I tried sudo apt purge install xserv-xorg-video-intel sudo apt-get install xserv-xorg-video-intel  but xorg is still as glitchy as ever. Wayland is usable, but still having problems (for example, rendering features of my firefox add-ons). I believe I have the T430s with only intel graphics. sudo lshw -c video  yields   *-display                     description: VGA compatible controller    product: 3rd Gen Core processor Graphics Controller    vendor: Intel Corporation    physical id: 2    bus info: pci@0000:00:02.0    version: 09    width: 64 bits    clock: 33MHz    capabilities: msi pm vga_controller bus_master cap_list rom    configuration: driver=i915 latency=0    resources: irq:33 memory:d0000000-d03fffff memory:c0000000-cfffffff ioport:5000(size=64) memory:c0000-dffff  Has anyone got any ideas on how I can fix this? Otherwise, I am going to have to reinstall everything and probably restart with 18.04.

I'm not sure what's caused it. I haven't changed any system settings. The only thing I've done that may have broken something is updating my software. My update was: upgrade linux-generic-hwe-20.04:amd64 5.8.0.48.54~20.04.32 5.8.0.49.55~20.04.33 upgrade linux-image-generic-hwe-20.04:amd64 5.8.0.48.54~20.04.32  upgrade linux-headers-generic-hwe-20.04:amd64 5.8.0.48.54~20.04.32  upgrade linux-image-extra-virtual:amd64 5.4.0.70.73 5.4.0.71.74 upgrade linux-image-generic:amd64 5.4.0.70.73 5.4.0.71.74 upgrade linux-libc-dev:amd64 5.4.0-70.78 5.4.0-71.79 upgrade libseccomp2:amd64 2.4.3-1ubuntu3.20.04.3 2.5.1-1ubuntu1~20.04.1 upgrade nomachine:amd64 7.3.2-3 7.4.1-3```  Removing nomachine did not solve the problem. It was far worse before, I'm not sure how to describe exactly, but my entire screen's UI was glitching out. So I rebooted and that stopped, but now the terminal text looks like this:  I haven't changed any terminal settings. This seems to be occurring in the entire OS. Here is another example:  Not sure how to go about troubleshooting this? I don't have the time to reinstall the OS, nor do I think I should have to because this is just ridiculous and shouldn't happen. I'm not aware of anything I've done to make the system unstable. Edit Earlier I also tried booting the PC. It failed and got stuck on some command in a terminal (didn't manage to take a photo of what it said). So I rebooted into recovery mode with both available kernels. I was getting strange glitches like this:  That didn't work. So I rebooted the PC normally, and now I somehow logged in fine. Now I'm getting popups saying to report a system error. It says this:  Environment  Ubuntu 20.04.2 LTS GNOME 3.36.8  sudo lshw -class display   *-display        description: VGA compatible controller        product: Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller        vendor: Intel Corporation        physical id: 2        bus info: pci@0000:00:02.0        version: 06        width: 64 bits        clock: 33MHz        capabilities: msi pm vga_controller bus_master cap_list rom        configuration: driver=i915 latency=0        resources: irq:33 memory:f7800000-f7bfffff memory:e0000000-efffffff ioport:f000(size=64) memory:c0000-dffff  I also did , which passed with 0 errors. Let me know if more details are required.


In The Last Jedi we find out that      Luke started a training academy for future Jedi Knights. Ben Solo/Kylo Ren turned against Luke, burnt down the school and fled. He gathered a gang of followers around him from the ex-pupils and killed any who would not join him.  What happened to those pupils that sided with Kylo Ren? I think we see them gathered together in Rey's Force-vision in The Force Awakens.   Is there any further info on these characters in current canon?

In The Last Jedi, it is mentioned that some students followed Kylo Ren on the run from the academy. In a document, are you informed of the fate of these students?


I have a WFS in EPSG:4167. My map view has EPSG:3857. How to make the WFS work on a map view with different coordinates?   I used this to define my coordinate system from wfs:  import { register } from 'ol/proj/proj4.js'; proj4.defs("EPSG:4167", "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs");  register(proj4);   Note it is a third party wfs, so I only can use this EPSG.  Any ideas?   My first thought is that I should get the geojson from WFS and then transform the entire geojson using proj4 lib and display it on map (I'm using openlayers). Not sure if this is the best approach.

I have to display a layer from a WFS service () using OpenLayers 3.x API (..there's a reason). The WFS service is exposed in .  In similar cases I have always used the following code successfully:  var sourceWFS = new ol.source.Vector({     loader: function (extent) {         $.ajax('http://wms.pcn.minambiente.it/ogc?map=/ms_ogc/wfs/Bacini_idrografici.map', {             type: 'GET',             data: {                 service: 'WFS',                 version: '1.1.0',                 request: 'GetFeature',                 typename: 'ID.ACQUEFISICHE.BACINIIDROGRAFICI.PRINCIPALI',                 srsname: 'EPSG:4326',                 bbox: extent.join(',') + ',EPSG:4326'             }         }).done(loadFeatures)         .fail(function () {         alert("error loading vector layer");         });     },     strategy: ol.loadingstrategy.bbox, });  function loadFeatures(response) { var formatWFS = new ol.format.WFS();   sourceWFS.addFeatures(formatWFS.readFeatures(response)); }  var vectorLayerWFS = new ol.layer.Vector({   source: sourceWFS, });   But now, this layer WFS isn't displayed on the map and I do not understand why?  What's wrong?


Let's suppose Mary is a directory. Is the following path ~/Mary relative?

This is merely just a vocabulary question, but which keeps turning around in my head.  It comes from a practice exam from a  preparation book. The correct answer according to the book is that ~/Documents is a relative directory because it is relative to the home directory.  However, this book contains an honourable ratio of typos and mistakes so I cannot take for granted everything which is written there. Here I do not agree because for me ~ acts as a variable expanded by the shell into either the content of the $HOME variable or the current user home directory path (cf. ), so the actual path is /home/myuser/Documents which is indeed an absolute directory.  Even , for once, seems of no help to me on this topic (even if it seems to confirm that the book is wrong on this one):     An absolute or full path points to the same location in a file system   regardless of the current working directory. To do that, it must   contain the root directory.      By contrast, a relative path starts from some given working directory,   avoiding the need to provide the full absolute path.   Here again, I do not agree: according to this definition, the path /opt/kde3/bin/../lib which does not depends of the current working directory should be an absolute one, however my current understanding of this matches the book's author making this path a relative one.  A quick web-search is just adding to my frustration, according to :     absolute path - A path relative to the root directory. Its first character must be the pathname separator.   So $HOME/Documents, or even just $HOME would not be considered absolute directories? Or does this definition implies variable expansion? What about the shell's ~ character? Is there any reliable definition of relative vs. absolute directory I can find somewhere and am I wrong all of the way?


I have an issue with Ubuntu 18.04 Nvidia gamma setting; the adjustment does not stick. When the OS restarts, it goes back to default. I'm new to Linux and I am just stuck. I don't really know what else I need to do. Any help will be greatly appreciated. Thank you.

How can I run the following xrandrcommand on startup?  xrandr   cvt 1368 768  xrandr --newmode "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync xrandr --addmode VGA1 1368x768_60.00 xrandr --output VGA1 --mode 1368x768_60.00


A. I had visited them two months ago.   B. I visited them two months ago.    Which one is correct?

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


I am purely modeling things without using any animating features, such as inserting keyframes Apparently I realised I accidentally inserted some keyframes after changing position of objects without knowing Below are screenshots :  This is currently at 3rd frame; this is what I want for my final output. As you can see below there are some keyframes inserted  This is 38th frame and as you can see some of the objects slowly move to this position from where they were on the first image. How can I make objects stay where they are on the first image? Can I disable the keyframe feature? Thank you all always in advance

Sorry for a simple question, but I have animated the movement of a door; just a movement of the X axis. Turns out I'll do this in code instead, so I want to delete this animation. How do I delete an animation completely from an object?  For that matter, at this point I could just as well delete everything animation related, so any hint of how to do that would be OK.


I have an 8-year-old son, who likes to spend too much time playing computer games and browsing the internet. I have allowed him an hour of computer time in the morning and an hour in the evening. However, I can't be there all the time to watch if he keeps to our agreement.  What could I do to make the computer automatically close after X minutes. I don't want a solution, where you have to put a time, like 10:30AM for when the computer closes. I want to be able to start a kind of timer from when he logs on and then make it shut down or lock the computer after X minutes.  I have a Windows 7.

Is there a way to lock a Windows XP machine via the command line?  The shutdown command doesn't have an option for it.


Online Ide test for GNU c++ 14 and GNU c++17  Input tested:    6 6  Expected output:   "="  Actual output: ">"  But in codeBlocks(gcc) I am getting correct ,I know its compiler issue how can I correct it PLease help  #include<bits/stdc++.h> using namespace std; int32_t main(){     int x,y;     cin>>x>>y;     double lhs = 1.0*y*log(x);     double rhs = 1.0*x*log(y);   //  cout<<"  lhs "<<lhs<<endl;     //cout<<"  rhs "<<rhs<<endl;     if(rhs>lhs){         cout<<"<";      }     else if(lhs==rhs){         cout<<"=";     }     else{         cout<<">";     } }

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


How to find top Stack Overflow users by their technology stack and location?

I want to see who has the highest score in a specific tag (for example c#) in my country. Is there any query or script for that? I've found , but it doesn't work. Can any one take a look at it and see what's its problem? I also have found  which does similar, however gets users which only have a tag badge.


I was told in another language that it is bad practice to call the equivalent to quit() or exit() in Python. Rather then calling a similar function to quit() or exit() in Python that it is better to let the program end "naturally". In that the main document ends after completing any function/method calls or any condition checking, etc... Is this also true in Python or is it fine to use these functions for ending the program? Edit: I will include a link to my actual code to hopefully add some clarification, it is the bottom two function that I'm having issues with

I am aware of the die() command in PHP which exits a script early.  How can I do this in Python?


I wanted to create a .bashrc function that would simplify passing data to a write-protected file.  function pipe {       sudo bash -c "$1" }   Unfortunately the command  pipe echo something > /etc/importantfile   still shows me that permission is denied. How should I fix it?

Why does redirection, using sudo give me an error for the following commands?   $ sudo printf "foo" >/etc/file bash: /etc/file: Permission denied  $ sudo printf "foo" ~/file; cat ~file >/etc/file  bash: /etc/file: Permission denied   ...yet I have no such problem when I use an editor, or cp. I don't think I've ever tried this before, so I don't know if there is something haywire on my system, or if this is normal. It seems a bit restrictive to be normal, but(?) maybe it is intended to be restrictive...  (using Ubuntu)


I heard it is usually better not routing at 90 degree angles. However what about with via, as I've read that it is usually recommended to use one layer for horizontal and another layer for vertical. Can I route safely like the picture below?

I understand that right angle pcb traces should be avoided because it can cause problems during manufacturing.    But what about right angle through a via?  Will this have any negative effects?  I have a multi layer board and I don't have that much space. I have come across a point where the only place I can place a via is right next to the pad I want to connect to, and my trace is coming from directly above.


Actually, I know that the integral diverge. But Im having trouble proving it. Here's what I've tried: we know that for each point that the $ sin=0 $ the value of the function is $ 1 $, hence, for each $ x_{k}=\frac{\pi k}{5} $ it follows that $ f(x_k) = 1 $. since $ f $ is continious, there is a $ \delta_k $ such that for any $ y_{k}\in(x_{k},x_{k}+\delta_{k}) $, it follows that in the interval $ [x_{k},y_{k}] $ , $ f(x) > \frac{1}{2} $. If I could find an explicit expression for $ y_k $ that is depend on $ k $, I could evaluate the integral, since the inregrand is a positive function, it follows that : $ \intop_{0}^{\infty}\frac{dx}{1+\left(x\sin5x\right)^{2}}>\sum_{k=1}^{\infty}\intop_{x_{k}}^{y_{k}}f\left(x\right)dx\geq\sum_{k=1}^{\infty}\frac{1}{2}|y_{k}-x_{k}| $ But Im not sure how to evaluate the $ \delta_k $ or the $ y_k $ in order to continue. Thanks in advance.

I would like your help with deciding whether the following integral converges or not:  $$\int_{0}^{\infty}\frac{dx}{1+(x\sin5x)^2}.$$  I tried to compare it to other functions and to change the variables, but it didn't work for me.  Thanks a lot!


how do I get around this? as I don't know what I can do? to fix this issue

I won a Samsung Galaxy S6 Edge, signed into it with my Google account, played around with it, wiped it, and sold it.  Now the person can't get past setup because it's saying he must login with an account previously synced to the phone.   Is there anything I can do from my side to remove this lock?


When dealing with the , sometimes the original question is of some interest - for instance, it might indicate some conceptual mistake by the OP that should be corrected, even it is unrelated to the actual answer. In such cases, is it a good idea to post two separate answers?  ( roughly fits the scenario above. The original answer was an educated guess on the cause of the immediate problem. After some discussion, the OP clarified the requirements, making it possible to suggest more significant improvements which were only loosely related to the initial issue. In that occasion, I ended up editing the original answer rather than adding a second one.)

If someone asks how to do XYZ, and you think doing XYZ at all is a Bad Idea™, is it valid to post an answer saying so? You aren't answering the question, but instead, arguing the question's validity.  You could do this in a comment, but I don't think comments carry enough weight on occasion.  For example, I came across this today ; for those not wanting to link away:     I would like to build a wiki based website about professors, so that students can share information and check the reputation of the professor before working for him.   and I really wanted to post an answer that said, "I think this is a very bad idea". (In fact I did anyway, despite awareness that it could get myself flamed.)  Was I wrong? What should I have done instead?


I bought the new MBP 2016 with Touch Bar. So far I know that Touch Bar is not available for Ubuntu users, but it is fine. I think this technology will be available in a couple of months. Does anyone tried to install Ubuntu on dual-booting on this computer? If so, does this technology work fine or not (and why)?  EDIT :   Knowing that I'm not talking about the Touch Bar directly. My question is rather related to the compatibility of Ubuntu with this new device. I'd like someone could explicit his/her experience so far. So, if a person has succeeded to install it, I'd like how he did it and if it works well.  Thanks in advance!

I'm considering buying the MacBook Pro (Late 2016) with Touch Bar. As I'm a programmer and a Ubuntu user, could anyone tell me if the Touch Bar is compatible with Ubuntu?


Given a binary matrix, I have find out the maximum size square sub-matrix with all 1s.  For example, consider the below binary matrix:     0  1  1  0  1     1  1  0  1  0     0  1  1  1  0    1  1  1  1  0    1  1  1  1  1    0  0  0  0  0   The maximum square sub-matrix with all set bits is  1  1  1 1  1  1 1  1  1   I searched the web for solutions and I found a relation to construct an auxiliary matrix:   If M[i][j] is 1 then             S[i][j] = min(S[i][j-1], S[i-1][j], S[i-1][j-1]) + 1          Else /*If M[i][j] is 0*/             S[i][j] = 0    Where M[][] is the original matrix and s[][] is the auxiliary matrix?   What does this relation signify? And how is it helpful.

What's the most efficient algorithm to find the rectangle with the largest area which will fit in the empty space?  Let's say the screen looks like this ('#' represents filled area):  .................... ..............###### ##.................. .................### .................### #####............... #####............... #####...............   A probable solution is:  .................... ..............###### ##...++++++++++++... .....++++++++++++### .....++++++++++++### #####++++++++++++... #####++++++++++++... #####++++++++++++...   Normally I'd enjoy figuring out a solution. Although this time I'd like to avoid wasting time fumbling around on my own since this has a practical use for a project I'm working on. Is there a well-known solution?  Shog9 wrote:     Is your input an array (as implied by the other responses), or a list of occlusions in the form of arbitrarily sized, positioned rectangles (as might be the case in a windowing system when dealing with window positions)?   Yes, I have a structure which keeps track of a set of windows placed on the screen. I also have a grid which keeps track of all the areas between each edge, whether they are empty or filled, and the pixel position of their left or top edge. I think there is some modified form which would take advantage of this property. Do you know of any?


has a nice list over initialization of arrays. I have a  int array[100] = {-1};   expecting it to be full with -1's but its not, only first value is and the rest are 0's mixed with random values.  The code  int array[100] = {0};   works just fine and sets each element to 0.  What am I missing here.. Can't one initialize it if the value isn't zero ?  And 2: Is the default initialization (as above) faster than the usual loop through the whole array and assign a value or does it do the same thing?

I have a large array in C (not C++ if that makes a difference). I want to initialize all members of the same value.  I could swear I once knew a simple way to do this. I could use memset() in my case, but isn't there a way to do this that is built right into the C syntax?


When I click the gear icon to open the system menu on my PC, these options are presented:   Suspend Restart... Shutdown...   The restart options seems redundant, because it literally does the same thing as the shutdown one - brings up the overlay menu that is focused on the shutdown shortcut.  I thought this option was supposed to be already removed. In fact, it doesn't exist on my laptop.  How can I bring the system menu back it its normal/original state?  Both computers running Ubuntu 14.04.

The dropdown menu I get when I click on the gear link in the top right corner only shows these options:   Lock Computer Logout Suspend Hibernate Shutdown   There is no "restart" or "reboot".  How can I make that option available?  Bonus question: Can I remove Hibernate, Lock, and Suspend?


I want to make a simple grid in HTML/CSS and therefore I decided to name them "1/2", 1/4", "2/4" etc. but these classes arent valid in css. I know there is a workaround out there but after a 30 minutes research I thought here I could get my answer.  .1/2{   width: 50%; }   I specifically need a workaround that I didn't found anywhere in this forum or on another site. Dont suggest me a generel name convention for declaring my css classes pls, I know what's valid and whats not, but I need this workaround.

What characters/symbols are allowed within the CSS class selectors? I know that the following characters are invalid, but what characters are valid?  ~ ! @ $ % ^ & * ( ) + = , . / ' ; : " ? > < [ ] \ { } | ` #


Update 1 - The suggested approach won't work, because of I need to load the whole Config, it's a contract between my code and external call (see my questions). The technique won't work at least because of Configuration is sealed.   I have and Xml string representing an entire config file as input and need to create an instance of System.Configuration.Configuration out of it for passing into an external routine, which performs:  ServiceModelSectionGroup.GetSectionGroup(configuration);   as part of its logic.  Wonder if it's possible to do it w/out using a file system (Can't call App domain for any direct manipulations neither).

I'm trying to unit test a custom ConfigurationSection I've written, and I'd like to load some arbitrary configuration XML into a  for each test (rather than put the test configuration xml in the Tests.dll.config file.  That is, I'd like to do something like this:  Configuration testConfig = new Configuration("<?xml version=\"1.0\"?><configuration>...</configuration>"); MyCustomConfigSection section = testConfig.GetSection("mycustomconfigsection"); Assert.That(section != null);   However, it looks like  will only give you Configuration instances that are associated with an EXE file or a machine config.  Is there a way to load arbitrary XML into a Configuration instance?


I have a huge word-list file. I want to remove numeric only lines.  Can I do this using sed or something else?  Input:  Pass123 Dexg43 111116 246814 dancer@ Cody1234 Cody1234   Expected Output:  Pass123 Dexg43 dancer@ Cody1234 Cody1234   I need lines with 11116 and 246814 removed, the rest are ok.

I have a wordlist that I'd like to extract every line of text from that contains only numbers, to a new file.  What do I do?


Could someone please help me with how do I calculate the sum of the $$\sum_{n=1}^{\infty}\frac{1}{4n^{2}-1}$$ infinite series? I see that $$\lim_{n\rightarrow\infty}\frac{1}{4n^{2}-1}=0$$ so the series is convergent based on the Cauchy's convergence test. But how do I calculate the sum? Thank you.

I am trying to calculate the sum of this infinite series after having read the series chapter of my textbook: $$\sum_{n=1}^{\infty}\frac{1}{4n^2-1}$$  my steps:   $$\sum_{n=1}^{\infty}\frac{1}{4n^2-1}=\sum_{n=1}^{\infty}\frac{2}{4n^2-1}-\sum_{n=1}^{\infty}\frac{1}{4n^2-1}=..help..=sum$$  I am lacking some important properties, I feel I am coming to the right step and cannot spit that out..


I need to access to Terminal. Simply clicking on the icon on the desktop does not work. Ctrl+ALT+F2 works. It asks for login and password. Login is OK. Password, the system seems not to receive my orders. I type my password, but nothing appears on the screen. I have UBUNTU 18.04.2 LTS.

When I'm about to install a program in the terminal it wants the password:  [sudo] password for xxx:   But when I start to type my password nothing happens. What should I do?


Since most of the space between the nucleus and electron is empty space is that space in a vacuum? I’ve not seen any info on this online or in textbooks does anyone have anything on this?

Zero dimensional points do not take up space, so then wouldn't everything in the universe be literally empty? Or is there something that I'm missing?


In normal mode, I can use mouse left button to copy and right button to paste, but not with mouse mode:   -m        --mouse         Enable the use of the mouse    Is copy/paste still possible with mouse mode?

I'm asking this question while using xfce4-terminal, but I'm interested in a general solution: is there a way to stop a terminal emulator announcing mouse support in consoles? I need mouse-select and copy-paste much more frequent that I need mouse support in vim or wherever.


I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


Every time I try I get this JsonSyntaxException:  ---- Minecraft Crash Report ---- // Ouch. That hurt :(  Time: 8/8/14 8:59 AM Description: Starting integrated server  com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 at com.google.gson.Gson.fromJson(Gson.java:815) at com.google.gson.Gson.fromJson(Gson.java:768) at ns.b(SourceFile:156) at ns.<init>(SourceFile:42) at net.minecraft.server.MinecraftServer.<init>(SourceFile:114) at bsx.<init>(SourceFile:38) at bao.a(SourceFile:1610) at bdx.e(SourceFile:162) at bdx.a(SourceFile:127) at bdw.a(SourceFile:172) at bdw.k(SourceFile:232) at bdw.p(SourceFile:211) at bao.p(SourceFile:1328) at bao.ak(SourceFile:774) at bao.f(SourceFile:728) at net.minecraft.client.main.Main.main(SourceFile:148) Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:338) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:79) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60) at com.google.gson.Gson.fromJson(Gson.java:803) ... 15 more   A detailed walkthrough of the error, its code path and all known details is as follows: ---------------------------------------------------------------------------------------  -- Head -- Stacktrace:     at com.google.gson.Gson.fromJson(Gson.java:815)     at com.google.gson.Gson.fromJson(Gson.java:768)     at ns.b(SourceFile:156)     at ns.<init>(SourceFile:42)     at net.minecraft.server.MinecraftServer.<init>(SourceFile:114)     at bsx.<init>(SourceFile:38)  -- Starting integrated server -- Details:     Level ID: New World     Level Name: New World Stacktrace:     at bao.a(SourceFile:1610)     at bdx.e(SourceFile:162)     at bdx.a(SourceFile:127)     at bdw.a(SourceFile:172)     at bdw.k(SourceFile:232)     at bdw.p(SourceFile:211)  -- Affected screen -- Details:     Screen name: bee Stacktrace:     at bao.p(SourceFile:1328)     at bao.ak(SourceFile:774)     at bao.f(SourceFile:728)     at net.minecraft.client.main.Main.main(SourceFile:148)  -- System Details -- Details:     Minecraft Version: 1.7.10     Operating System: Windows 8 (x86) version 6.2     Java Version: 1.7.0_25, Oracle Corporation     Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation     Memory: 222667112 bytes (212 MB) / 377651200 bytes (360 MB) up to 523501568 bytes (499 MB)     JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx512M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M     AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used     IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95     Launched Version: 1.7.10     LWJGL: 2.9.1     OpenGL: AMD Radeon HD 7340 Graphics GL version 4.3.12618 Compatibility Profile Context 13.251.9001.0, ATI Technologies Inc.     GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported.      Is Modded: Probably not. Jar signature remains and client brand is untouched.     Type: Client (map_client.txt)     Resource Packs: []     Current Language: English (US)     Profiler Position: N/A (disabled)     Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used     Anisotropic Filtering: Off (1)

Whenever I click the icon on my desktop to get to Minecraft, the launcher loads as usual, like it should. But when I click the "Play" button, the launcher goes away, but then comes back saying this:  [17:15:14] [Client thread/INFO]: Setting user: kassidygallowway [17:15:14] [Client thread/INFO]: (Session ID is token:7b2075512917473abe32b04ffd11b2a4:ce288cc1399b4266a07c19cc48d47531) Exception in thread "Client thread" com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1     at com.google.gson.Gson.fromJson(Gson.java:815)     at com.google.gson.Gson.fromJson(Gson.java:768)     at lu.b(SourceFile:151)     at lu.<init>(SourceFile:43)     at net.minecraft.server.MinecraftServer.<init>(SourceFile:155)     at bpp.<init>(SourceFile:41)     at avf.<init>(SourceFile:293)     at net.minecraft.client.main.Main.main(SourceFile:124) Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1     at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:338)     at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:79)     at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60)     at com.google.gson.Gson.fromJson(Gson.java:803)     ... 7 more   I have no idea what this means (I dont know codes or anything like that). It does this over and over again, no matter how many times I press Play.


I have the following:  I created the curved side using the Spin tool.  I would like to now modify the two rectangles you can see on either side of it so that they follow around that curve, but am not sure how to achieve that.  Any help would be greatly appreciated.

I want to make this:    from this:    I created the beveled edge by beveling on the cube, then beveling the inner edge, however that resulted in a weird diamond shape:    So I ended up disolving edges and fighting with the uncooperative knife tool for the next 2 minutes or so, just to get a clean bevelled edge like I wanted. How to do it faster, without the hassle?


I uploaded an sql file of about 300k and I got this error each time I try to access phpmyadmin: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 100663304 bytes) in C:\xampp\phpMyAdmin\libraries\Util.php on line 2302  I have tried so many methods to get over it, they did not work. I tried increasing memory limit too.  so, I need a way to only drop the last file i had uploaded.

This error message is being presented, any suggestions?     Allowed memory size of 33554432 bytes exhausted (tried to allocate   43148176 bytes) in php


When I try to edit any post on stackoverflow.com (I have experimented with at least 5 random posts) I recieve a blank page with the text "This post has been deleted - no more edits are allowed". I believe it is highly unlikely that the five posts that I checked have been deleted (even one with 107 votes). How would I be able to fix this?

Scenario:   Assume you are a user suffering some type of being banned, where if you try to suggest an edit. You will not be able to do so, and instead you get a message like "You are temporarily banned from suggesting edits - please review your edit history." Navigate to anything similar to this:   Using the link "" you will arrive at a page containing (only) this message:     This post has been deleted - no more edits are allowed  Change 'reputation' to any other valid tag, eg 'new-user', and the same scenario can be repeated for that tag also (though its 'improve wiki tag' also varies of course).   Related feature requests:   appears to me as a way to prevent this scenario from happening.  Possible duplicate questions:  To avoid creating a duplicate question, I searched for . The search results do not contain any question titles that seem related to my question here.  I also think this issue is not a duplicate of "".  My Questions:   It appears to me that this message is at least misleading, if not wrong. No? Shouldn't it display a normal error message indicating that the user is not allowed to edit due to an account restriction? Why would it think that the post is deleted?


I opened the Minecraft launcher today and was not able to log in, so I went to Minecraft.net and was still not able to log in. I was able to change my password and email, and need to import my account into my new email. When I attempted to do so, even with my updated password, it did not work. My username must have been changed, does anyone know a way to get my account back?

I tried to log into Minecraft today to find that my password isn't working. I tried to change it, but I can't login to my email because I forgot the answer to my security question. I tried changing the email to a different one, but that didn't work for some reason (it kept saying "invalid email"). I don't have my transation ID because I forgot which credit card I used.  Does this mean that I have to buy a new Minecraft account?


I am using twitter bootstrap for a project and want to create a dropdown menu and have the list items act as a file upload but cant seem to edit it in such a way!I do not want a button in my dropdown menu nor do I want a separate button or entity that shelters the button. I want a dropdown menu where the list item acts as a file upload button and is styled as such, below is the base html code using bootstrap 3.0  <ul>     <li>         <input type="file">             <span class="glyphicon glyphicon-file">             </span>             File Upload     </li> </ul>   I know how to edit it to be a button but am not sure how to make it so it looks like a regular <li> but also act as the file input! Is this even possible?

How do you style an input type="file" button?


I prefer to use regex not any HTML Parser. Best way to extract base64 image from a HTMl that string is like:  "
This is test

"  I need this line so I can have access to base 64 image: /9j/4AAQSkZJRgABAQAAAQABAAD/4gKgSUNDX1BST0ZJTEUA....+tzPaXLlstlSjpcxKPEqV/zH//2Q==

I'm looking for a library/method to parse an html file with more html specific features than generic xml parsing libraries.


Let $\mathcal{C}([-1, 1]) = \{f: [-1, 1] \to \mathbb{R}\mid f \text{ is continuous}\}$, $\mathcal{C}^{1}([-1, 1]) = \{f: [-1, 1] \to \mathbb{R}\mid f' \text{ is continuous}\}$, where both sets are equipped with the supremum norm $||\cdot||_\infty$. Let $h: \mathcal{C}^{1}([-1, 1]): \to \mathcal{C}([-1, 1]), [h(f)](t) = f'(t), t \in [-1, 1]$ be the derivative mapping from the set of continuously differentiable functions to continuous functions. I want to show that $h$ is not a continuous mapping w.r.t. the supremum norm, but I have not yet managed to "hack" the intuition for functional analysis. Specifically, what we want to demonstrate is that $\exists \epsilon > 0: \forall \delta > 0: \forall f, g \in \mathcal{C}^{1}([-1 ,1]): d_{\mathcal{C}^{1}}(f, g) < \delta\land d_{\mathcal{C}}(h(f), h(g)) \geq \epsilon$. Where I am currently stuck is that before inspecting the derivative mapping, let $f(t) = \cos(t)$ and $h(t) = 0$. Both are evidently continuous, but $||f - h||_\infty = \sup_{t \in [-1, 1]}\left|\cos(t) - 0\right| = 1$. So to my understanding, even a redefined $[h(f)](t) = f(t)$ should not be continous, as for no $\delta$ is $1 < 0.5$. Or am I mistaken? In the case that I am correct, does this same claim show that the original (derivative mapping) $h$ is not continuous?

Let $C^1([0 , 1])$ be the subspace of $C([0 , 1])$ consisting of the functions that have a continuous derivative throughout $[0 , 1]$. Show that the mapping $\Psi:f → f~'$ from $C^1([0 , 1])$ to $C([0 , 1])$ is not continuous.   Definitions Used : $f~'$ denotes the derivative of a function $f$.  $C([0 , 1])$ denotes the set of bounded continuous functions from $([0 , 1])$ to $\mathbb R$ and uses the metric $e(f_1,f_2) = \sup \{ f_1(x) - f_2(x)~|~x \in [0,1]\}$  Solution attempt:  If we prove that $\exists ~f_1,f_2 \in C([0 , 1])~|~~\sup |f_1~'(x) - f_2~'~(x)| > \epsilon$ whenever $ \sup|f_1(x) - f_2(x)| < \delta$  $\implies $ we need to find functions $f_1,f_2 \in C([0 , 1])~$ such that $|f_1~'(x) - f_2~'~(x)| > \epsilon$ whenever $|f_1(x) - f_2(x)| < \delta~\forall x \in [0,1]$  Could someone please tell me if I have I proceeded in the right manner?  How do I move next?   Thank you very much for your help.


Are there any problems when using the stack instead of the heap?  Basically I want some 200 positions in memory (or more, 1000, who knows, this is hypothetical anyways), I can allocate it in the stack using an array, or on the heap using malloc(). On the heap I have to remember to always free() the memory...but using the stack, as soon as the function returns, all the memory is nicely cleaned for me.  I am just wondering if there are any issues with holding large amounts of memory on the stack. As far as I know, the stack and the heap are basically the same, just they sit on opposite sides in a RAM frame, and they grow towards the other, like in the image below.

Programming language books explain that value types are created on the stack, and reference types are created on the heap, without explaining what these two things are. I haven't read a clear explanation of this.  I understand what a stack is. But,    Where and what are they (physically in a real computer's memory)? To what extent are they controlled by the OS or language run-time? What is their scope? What determines the size of each of them? What makes one faster?


Suppose lim x→a f(x) = L and lim x→a g(x) = M, prove that  lim x→a [f(x)/g(x)]= L/M provided M ≠ 0 and g(x) ≠ 0, for x suﬃciently close to a (but not equal to a).  What does mean by for x suﬃciently close to a (but not equal to a) and how can I prove that?  thanks

In real analysis, we have been asked to finish a proof of the quotient rule for limits (Given that $f(x)$ approaches $L$ and $g(x)$ approaches M as $x$ approaches a, prove that $\frac{f(x)}{g(x)}$ approaches $\frac{L}{M}$. I know that I could rewrite the quotient as multiplication and prove it that way but that is not the way the proof we are completing starts off. Here is how the proof in the book starts:  We showed in a previous exercise that $|g(x)| > \frac{|M|}{2}$ for all $x$ belonging to $D$ near $a$. In particular, $g(x)$ does not equal $0$ for all $x$ belonging to $D$ near $a$. Consequently, $\frac{f(x)}{g(x)}$ makes sense near $a$. Let $\epsilon > 0$ be given. The proof is based on the triangle inequality:  \begin{align*} \left|\frac{f(x)}{g(x)} - \frac{L}{M}\right| &= \left|\frac{f(x)}{g(x)} - \frac{L}{g(x)} + \frac{L}{g(x)} - \frac{L}{M}\right|\\ & = \left|\frac{f(x)}{g(x)} - \frac{L}{g(x)} + L \frac{M - g(x)}{Mg(x)}\right| \\ &\leq \left|\frac{1}{g(x)}\right| |f(x) - L| + \left|\frac{L}{M}\right| \left|\frac{1}{g(x)}\right| |M - g(x)|. \end{align*} We are expected to pick up the proof at this point.  I was thinking that since I want everything above $< \frac{\epsilon}{2} + \frac{\epsilon}{2}=\epsilon$, that I would construct $\epsilon_f$ and $\epsilon_g$ based on $\epsilon$. So, I said we want $|\frac{1}{g(x)}| |f(x) - L| < \epsilon/2$ and because the limit approaches $L$ end up with $\epsilon_f$ equals $\frac{\epsilon|M|}{4}$. I intended to do the same for the g part; however, when I go to define $\epsilon_g$ it involves $M$. Am I allowed to use $M$ in that definition for $\epsilon_g$? And if not, any ideas on where to go from here?  Thank you!!


I know how to customize the default plymouth theme and also I know how to install other custom themes I could download from gnome-art and some websites. But I don't know how to make my own theme which has an animation included. Can anybody tell me how the pros make it? I don't want much more. Just want to know how to make a rotating loading animation theme. I just want a spinner or something like that.

I am making a custom distribution, and have a question about the Ubuntu Logo with 5 dots displayed when booting up.  The Ubuntu-Logo-Script in the /lib/plymouth/themes/ubuntutext folder has the word Ubuntu and beneath that 5 progressing 'dots'. Is it possible to remove the progress bar dots, and instead replace it with a faded Ubuntu logo, that gradually colors up to full?


I have used both uptime and cat /proc/uptime commands. I know the idle time in the later can be greater than running time (multiprocessors). However, when I add both running and idle times, and compare it to the uptime (5:30 hrs) they are not equal. I assume it's because the uptime returns the real time and the cat /proc/uptime returns processor(s) time.    Short things clear, I want to know the reason exactly and I want to know which one to choose, according to the topic.  Also, is it possible to get the processor(s) time in the last 24 hours?  NOTE: Please read this  to understand where this is going.   *Distributor ID:    Ubuntu Description:    Ubuntu 12.04.2 LTS Release:    12.04 Codename:   precise *

First and foremost I want to know how long my laptop (unix, apple, OSX 10.9 mavericks) has been 'awake' (i.e. how long its been open, or since it last 'slept').  I' also be interested in how long since the last restart, and time since the last shutdown (if those two things can be differentiated).  I've tried the who and w commands, which seem to show me time for the whole system, and for individual processes (terminals?) since the system last restarted.  Is there a way to tell how long the system has been awake, explicitly? Does the reported process times include sleep-time (i.e. when my laptop is closed)? Is there a way to distinguish between restart and shutdown?


I have been in survival and then I changed it to lan world so I can use cheats.  all the sudden, when I turn my gamemode back to survival I can't break blocks!!!! This has been happening for the past few months and I want to fix my world.  I do not like when this happens to me because then I can't play my own survival/hardcore game.  How do I change this random glitch in my world back to normal?

I'm playing on a Survival world with cheats on, "easy" difficulty, and at night in-game. I didn't have a sword or anything to make a sword with, and I was starving, so I switched to Creative to give myself a stack of food and a bed to set my spawn point. When I switched back to Survival, I couldn't destroy or place blocks. I'm on single player, and my Internet is fine, and I can destroy blocks still if I switch to creative. I've tried resetting the button one, and reloading the map, and it still doesn't work. I've even tried deleting everything I gave myself in Creative. This happened before on a different world and I ended up deleting it.  This only happens on this world. How do I fix it?  If I know I'm in the correct game mode, what else can cause this?  Are there different causes in multiplayer?


This might be a very stupid question for Science students, but I had this doubt always, since childhood. I still don't understand even when I'm adult because I didn't read science in detail.  When I would ask the same question from my teachers, first my classmates and teachers would laugh. Then he would reply:     This has no answer. Why is a man a man?   I felt bad.  Now, I do feel like it has something to do with Photons. But since I don't know much Physics, and I'm not in touch with it, I can't understand it.  Is there any basic way to help me understand this?  Like I can feel that light can enter from anything which has pores.  I can understand that air can't flow through glass.  But I just can't feel/understand how light can pass through it.

Once I asked this question from my teacher and he replied "Because it passes light.". "And why does it pass light?" I asked and he said, "Because it is transparent.".  The same question again, Why glass is transparent? Why does light pass through it, while for opaque objects, it does not?


I would like to parse some JSON and for that I need to create a POJO class. My POJO looks like below;  public class MyPOJO {      private String public;      public String getPublic(){         return public;     }      public void setPublic(String public){         this.public = public;     } }   There is an attribute public in the JSON, so I have to include it here. But java is showing error because public is a access modifier. How can I fix this?

Is there any tricky way to use Java reserved words as variable, method, class, interface, package, or enum constant names?


I'm working on an email to my supervisor with feedback about department meetings. I want to say:     Our meetings have been increasingly less productive recently.   I could probably re-word it to say "The productivity of our meetings has been declining recently," but I don't want to.    :P    If increasingly means , can it be used to indicate a more and more severe reduction in a quality?

I was reading a news story recently, and saw this sentence:      "Police used tear gas and what appeared to be plastic bullets against increasingly smaller groups of protesters."   I wasn't sure if it was right or not. It seems somewhat oxymoronic. Can something become increasingly smaller? Is that logical?


In an unfortunate series of events, I happened to create a folder named --bindir=. Thing is, I cannot cd to him because when I try to cd I get this message:  bash: cd: --: invalid option cd: usage: cd [-L][-P [-e]]] [dir]   I also get similar messages for other binaries I am executing with that as a parameter, e.g rm -rf, rmdir, ls etc.  I know this sounds funny, and like those epic fail stories, but I would be glad if you could propose a fix, because I'm all out of them.  As a post of proof that I am not trolling or anything, here is a picture of that epic fail:

How do you remove a file whose filename begins with a dash (hyphen or minus) -?  I'm ssh'd into a remote OSX server and I have this file in my directory:  tohru:~ $ ls -l total 8 -rw-r--r--    1 me  staff  1352 Aug 18 14:33 --help ...   How in the world can I delete --help from a CLI?  This issue is something that I come across in different forms on occasion, these files are easy to create, but hard to get rid of.  I have tried using backslash  rm \-\-help   I have tried quotes  rm "--help"   How do I prevent the minus (dash or hyphen) character to be interpreted as an option?


When an electron revolves around a nucleus, It uses its energy in form of kinetic energy and so it release energy and then moves . It means that it release energy continuously, Otherwise, if it does not release energy(in form of Kinetic energy) continuously. Then its motion around nucleus is not possible.Please make me understand this concept?

In  article it says:     The electrons can only orbit stably, without radiating, in certain orbits (called by Bohr the "stationary orbits") at a certain discrete set of distances from the nucleus. These orbits are associated with definite energies and are also called energy shells or energy levels. In these orbits, the electron's acceleration does not result in radiation and energy loss as required by classical electromagnetics. The Bohr model of an atom was based upon Planck's quantum theory of radiation.   My question is: how can this be if it is actually impossible? Any accelerating point charge should emit radiation, as explained , for example. It is not like I can posit the existence of an orbit where the electron is stable, just out of mid air. What am I missing here?


I am an Indian Citizen currently working in USA on H1b visa. I will be travelling from Boston to New Delhi (India) via Zurich. Please help me out with information if I will need a transit visa to go via Zurich or not. I have a 1hr 45mins stopover in Zurich.  I have a valid Indian Passport but my currently stamped H1b visa is expired. I have a valid I-797 which I will use to get a H1b visa stamping in India. I have a confirmed round trip ticket to come back to Boston.  Please let me know if I need a Transit Visa in Zurich based on my situation.

I am travelling from US to India, with an Indian passport but expired F1 visa and going there to get my H1B visa stamping. I have a stop at Zurich for 2 hours while flying to India. Do I need a transit visa for my trip?


I am encountering this error:  Err:26 http://ppa.launchpad.net/midori/ppa/ubuntu bionic Release                                             404  Not Found [IP: 91.189.95.83 80]

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


Is the following statement correct?   If $X$ and $Y$ are independent then $\operatorname{Var}(X)\lt \operatorname{Var}(XY)$ and $\operatorname{Var}(Y)\lt \operatorname{Var}(XY).$

What is the formula for variance of product of dependent variables?   In the case of independent variables the formula is simple:  $$ {\rm var}(XY) = E(X^{2}Y^{2}) - E(XY)^{2} = {\rm var}(X){\rm var}(Y) + {\rm var}(X)E(Y)^2 + {\rm var}(Y)E(X)^2 $$ But what is the formula for correlated variables?  By the way, how can I find the correlation based on the statistical data?


I have a sony vaio notebook with preinstalled Microsoft 8.1 version operating system. Now, I need to have a DUAL BOOTING system with Ubuntu (PenDriveLinux) distribution, installed alongside windows 8.1. Is it possible?.  Any pointers are appreciated. Thanks in advance.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


Scenario: I have a Linux computer in AP mode and for whatever reason, I do not have a DCHP server installed. Now, I connect a couple laptops to said AP. How do I tell the AP (computer) that the new devices belong to such-and-such IP address?

I have configured network adapter of guest Ubuntu to work in a bridged mode so I could ssh to it from the host machine.   The problem is that the guest Ubuntu ip address keep changing.   Even though it changes  within a very short range 192.168.0.4-10 it is still takes time to configure Putty and other programs each time.  Is there a way to make the guest Ubuntu ip address to be static?  My guest OS has the full GUI.


I came across something this morning which made me think... If you store a variable in Python, and I assume most languages, as x = 0.1, and then you display this value to 30 decimal places you get: '0.100000000000000005551115123126' I read an article online which explained that the number is stored in binary on the computer and the discrepancy is due to base conversion. My question is how do physicists and nano-scientists get around this problem when they do computation? I always thought that if I input data into my calculator using scientific-notation it will give me a reliable accurate result but now I am wondering if this is really the case? There must be a simple solution? Thanks.

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


I have a 2017 DaVinci Django mountain bike and I am planning to upgrade my cassette to a 11/46 from 11/42. I would like to buy a new KMC chain. How may links do I need?114 or 116? Maybe it’s a different number. Can you help?

I am replacing the chain on my road bike soon.  How do I know how many links to get?  Does it have to exactly 114 or 116.  Or is it not a big deal?  I ordered a 116 link chain.  Will I need to shorten it?  Thank you.


Foreword: I'm aware that I'm doing unusual stuff with LaTeX :P I noticed that when I use \edef in something that contains an unicode (non-ASCII) character, TeX not only expands the macros, but also expands said unicode character (an ó, for example). I also learned that LaTeX does some  with these characters when writing the auxiliary files. But these two facts don't add up Ç_Ç. For example, the following code will throw an error when compiled for the second time to add the \listoftables. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \edef\WeirdWayOfInsertingACaption{Fósforo}  \begin{document}  \listoftables  \begin{table}  \caption{\WeirdWayOfInsertingACaption}  \begin{tabular}{cccc}   Can & I & Haz & LOT?  \end{tabular} \end{table}  \end{document}  It will break beacuse \edef somehow expands the ó in such a way that LaTeX fails to spot it and write the \IeC{\'o} to the .toc file. Instead it writes a plain ó, and when the \listoftables command tries to write the List of Tables, we get this error:  ! Package inputenc Error: Unicode char �sfo (U+14B) (inputenc)                not set up for use with LaTeX.  Is it possible to make the above code work keeping the \edef?

Is it somehow possible to have utf8 characters (e.g. german umlauts) inside \edef ? The following example document behaves fine if the umlaut is given directly as argument like \convertTest{Müller}. The resulting output is "Mueller" after conversion. If "Müller" is given via a \edef like in \convertTest{\authorname}, the resulting output is not as expected ("M.ller"), although the message on \newcommand entry (before convert) is the same.   \documentclass{article}  \usepackage[ngerman]{babel}   \usepackage[utf8]{inputenc}   \usepackage[T1]{fontenc}   \usepackage{stringstrings}   \newcommand{\convertTest}[1]{   \message {before convert: #1}   \convertword[q]{#1}{}{ue}   \message {after convert: \thestring}   \thestring \  }  \begin{document}   \convertTest{Müller}   \edef\authorname{Müller} \convertTest{\authorname}   \end{document}


Many times I have seen answers that are exact copies of other answers to the same question, with minor changes like different variable names. This does not add any value to anything; just extra load on the servers. Could we have a way to identify them as such so they can be dealt with?

When flagging an answer there doesn't seem to be an option for duplicates. Is there an etiquette for this, or nothing in place?  If there is nothing in place can I suggest a flag as duplicate option. It seems rather annoying that people just rep hunt by duplicating previously stated answers, with changes that are limited or non existent.  I think the only use case where this might cause upset is when someone has genuinely submitted an answer, and someone else has just submitted theirs as they have been writing.   In this scenario, where the time between answers is short and a factor, then perhaps a 'merge' function could be introduced. Which then assigns joint authorship, splits the reputation for the answer and allows an editor to take the best of both duplicate answers.


Today I found one of my website fully being displayed at another domain that is not mine. Is this some kind of DNS hack or what is the purpose of these actions ? Because I seen this before, few years ago, all content from Adobe Exchange (user uploaded content) was being displayed at many other domains.   Should I be worried about anything ?  Edit: I pinged that domain and it shows same IP address as my own domain. My site is a new/small social networking site with a bit under 3000 users. I found this other domain while looking at traffic sources.  Edit: The other domain that shows my site is forum.[domain].com and their main domain shows illegal downloads, it also has 20 000 Alexa traffic rank.  Temporary I made a test in my php scripts and if http_host is different than my domain, then it exists, this seems to work, but I probably need to edit some DNS settings to stop it from serving my site to outside domains. How do I do that ?  Edit: Inside Plesk panel under ip addresses I removed the default domain for that IP and this caused that other site to show a default Plesk panel (same page that is shown if someone directly types my IP in browser.

Someone has pointed their domain (www.bomberball.net) to the same IP as my domain (www.kapparate.com) , and Google is now showing the former when searching for Kapparate, rather than the latter. What's the best way to block requests coming from www.bomberball.net ?


I came across this maths statement \begin{align*} f(t+h) &= f(t) + h\frac{d}{dt}f(t) + \frac{h^2}{2!}\frac{d^2}{dt^2}f(t) + \frac{h^3}{3!}\frac{d^3}{dt^3}f(t) + \cdots \\ &= f(t) + hDf(t) + \frac{h^2}{2!}D^2f(t) + \frac{h^3}{3!}D^3f(t) + \cdots   \\ &= \left(1 + hD + \frac{h^2}{2!}D^2 + \frac{h^3}{3!}D^3 + \cdots \right)f(t) \\ &= e^{hD}f(t).  \end{align*} I doubt this is a correct thing since I cannot understand the meaning of $e^{hD}f(t)$ where $D=\dfrac{d}{dt}$ is a differential operator. As an extra information, I found this info when reading something related to Grunwald fractional derivative.   Edit: My question is, can we actually factorise the operator $D$ and take a Taylor series for it as done above? This is because, I imagine that, if $t+h$ is a value on the x-axis, then $f(t+h)$ is a value on the y-axis. On the other hand, $e^{hD}f(t) = e^{h\frac{d}{dt}}f(t)$ is not a value, thus how can $f(t+h)$ be equivalent to $e^{h\frac{d}{dt}}f(t)$?

Today I read the answer to , in which the poster integrates $x^5e^x$ by making these manipulations with the differential operator $D$: $$\frac1Dx^5e^x=e^x\frac{1}{1+D}x^5=e^x(1-D+D^2+...)x^5$$  which I was amazed by but yet suspicious of. After reading a bit on differential operators, I know a few properties. For example, $D+a$ (where $a$ is constant) is a polynomial differential operator which comes from the differential equation $y'+ay = q(x)$. Also, for polynomials $f$ and $g$, $f(x)\cdot g(x)=h(x)$ implies $h(D)u=f(D) \circ [g(D)u]$ with $u$ being a function and $f(D), g(D), h(D)$ being polynomial differential operators. Since $(1+x) \cdot \frac1{1+x} = 1$, I know that if we applied the operator $(1+D)$ to some function, $\frac{1}{1+D}$ would invert it back to the original function.  However, this still doesn't help me make sense of the meaning of $\frac{1}{1+D}$. For example:   If $1+D$ comes from the differential equation $y'+ay+q$, where does $\frac{1}{1+D}$ come from? In other words, if $(1+D)y = 1\cdot y + Dy = y' + y$, how do we compute $\frac{1}{1+D}y$? (Is it even possible, and how does it relate to integration?) How do we justify the power series of the operator? How do we know there are no convergence issues?


I have a datable code to generate a string, which is sb.ToString().  DataTable dt = dbaccess.GetDataTable("TEST"); // get datatable List<DataRow> drlist = dt.AsEnumerable().ToList(); // each row only has one element. StringBuilder sb = new StringBuilder();  foreach (DataRow row in drlist) {     foreach (string str in row.ItemArray)     {         sb.Append(str);     } }   The datatable is   NULL 0 138 337 1666 1680 2511 8113   You see that there is "NULL" to cause the error "Unable to cast object of type 'System.DBNull' to type 'System.String'.  How to fix it?

This question comes up occasionally, but I haven't seen a satisfactory answer.  A typical pattern is (row is a DataRow):   if (row["value"] != DBNull.Value)  {       someObject.Member = row["value"];  }   My first question is which is more efficient (I've flipped the condition):    row["value"] == DBNull.Value; // Or   row["value"] is DBNull; // Or   row["value"].GetType() == typeof(DBNull) // Or... any suggestions?    indicates that .GetType() should be faster, but maybe the compiler knows a few tricks I don't?  Second question, is it worth caching the value of row["value"] or does the compiler optimize the indexer away anyway?  For example:    object valueHolder;   if (DBNull.Value == (valueHolder = row["value"])) {}   Notes:   row["value"] exists. I don't know the column index of the column (hence the column name lookup). I'm asking specifically about checking for DBNull and then assignment (not about premature optimization, etc.).   I benchmarked a few scenarios (time in seconds, 10,000,000 trials):  row["value"] == DBNull.Value: 00:00:01.5478995 row["value"] is DBNull: 00:00:01.6306578 row["value"].GetType() == typeof(DBNull): 00:00:02.0138757   Object.ReferenceEquals has the same performance as "=="  The most interesting result? If you mismatch the name of the column by case (for example, "Value" instead of "value", it takes roughly ten times longer (for a string):  row["Value"] == DBNull.Value: 00:00:12.2792374   The moral of the story seems to be that if you can't look up a column by its index, then ensure that the column name you feed to the indexer matches the DataColumn's name exactly.  Caching the value also appears to be nearly twice as fast:  No Caching: 00:00:03.0996622 With Caching: 00:00:01.5659920   So the most efficient method seems to be:   object temp;  string variable;  if (DBNull.Value != (temp = row["value"]))  {       variable = temp.ToString();  }


For some reason when I render or turn into active camera mode the mesh obj disappear as I move farther. I need help on how to increase that view range.

I have created a simple model here   When rendering it the end of it is cut off   How can I get the camera to render a longer distance?


I need to get all mac Addresses from my network-card.  So i use nmap from Debian, combined with PHP.  But, without root privilege, this only gives me the IP address and status from a target. With root privilege, i get IP, status, and adresse MAC.  How i can execute this command (or a script.sh with nmap inside), with root privilege and without do a "cracked server" (like ALL=NOPASSWD)

I have a shell script called boot.sh on an Ngnix server  I am trying to call it via PHP, but I don't think I have permissions.   How can I give www-data permission to run boot.sh - and only boot.sh  When trying sudo chown or sudo chgrp I am getting Operation Not Permitted


The title is a mouthful, I know, but basically my question is exactly what Wynncraft managed to do. When right-clicking a villager, you would normally open their trading GUI. However, is there a way in Vanilla Minecraft to replace the opening of the GUI with let's say... activating a tellraw command? If you need a visual, I suggest going to the server "play.wynncraft.com" and interacting with the NPCs there.

Is there a way so that I make make it when I left click/right click with a certain item it applies an effect? I know that you can apply attributes to wearing armor and things but I want it so when you use the item it applies an effect on your player.  For example, let's say I want something so that when I right click with a certain item (let's say an iron ingot that was given to me) I'll then have a jump boost for 10 seconds. So kinda like a potion in a way.  Is this possible with command blocks/commands/any mods?