Probability of winning the game 1-2-3-4-5-6-7-8-9-10-J-Q-K

A similar question to mine was answered here on stackexchange:    However, I am unable to follow the formulas so perhaps someone could show the calculation and the way they arrived at it to answer this question.  My card game is very similar, except the counting of cards goes all the way from 1 (Ace) through to King and then restarts.  If you can make it through an entire deck of cards without hitting the same ranked card you win.  So, for example, if you call out Ace - 2 -3 - 4 - 5 - 6, etc. and hit "7" when you've just called out "7", you lose.  What is the chance of winning this card game?


Adding objects to an object in javascript

I'm sure this has been explained somewhere, but I have never found it so, here I go:  Let's say I have an object that contains functions move, attack, defend. How can I add them to a unit-object, without adding them one at a time, or adding a sub.object: units.commands = commands, rather: units = commands OR units.prototype = commands.  Another simple example:      var one = function  () {         this.a = 1;     };     var two = function  () {         this.z = 1;     };     var jee = new one(),     jee2 = new two();     jee = jee2;     console.log(jee); // Should have z AND a.


How Google Maps continuously gets' updated even without Internet?

few days back i was going to my friend's house but i was not sure about his[my friend] exact location so i used Google maps and didn't closed the Map's tab. On my way to his house when i checked maps i was amazed to see that even without internet my location was getting updated continuously even maps were detecting the direction of my mobile device.Surely it's now an old technology and it didn't amazed me that way but actually i was thinking that what sort of techniques & technology (Programmatically) they are using to access my location and even direction of my device, so fastly?


Why “ps aux” in Linux does not show the process whose pid=0?

The process with pid=0 exits after system init?  According to this    It is called the idle process, but why is not it listed in ps aux?


Taiwan maximum stay -- on landing or passing immigration?

"Taiwan visa maximum stay clarification" confirms that for Taiwan visa exempt stay you start counting the number of days after the day of arrival (redundantly, as the information is available on governmental websites).  That is NOT my question.   My question is what is the "day of arrival"? Is it when your plane was scheduled to land? Is it when your plane lands? Is it when you pass immigration? (This information does not seem to be available elsewhere.)  So, for example, if you have a late night flight and dawdle and don't pass immigration until after 12am, does that count as arriving the day our plane landed or the day we passed immigration ?


I am using following htaccess code to stop hot linking my image files  Options +FollowSymlinks Options +SymlinksIfOwnerMatch  RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://(.+\.)?article-stack.com/ [NC] RewriteCond %{HTTP_REFERER} !^$ ReWriteRule .*.(png|gif|jpg)$ - [N,F,L]   Still the imge of my site are accessible from other sites. how can i stop it?


How much space does Ubuntu take up after it's already installed?

I know how much space is required to install Ubuntu.  How much space does a Ubuntu installation take up on the disk?


How to suppress the reset of the subsection counter

I am using the class report right now, and would like to use \subsection as a running counter throughout the entire chapter, without reseting it in a new \section.  Tried to research this myself, but since google is flooded with how to reset counter, I couldn't find what I was searching for.


What's the deepest reason why QCD bound states have integer charge?

What's the deepest reason why QCD bound states have integer electric charge, i.e. equal to an integer times the electron charge?  Given that the quarks have the fractional electric charges they do, this is a consequence of color confinement. The charges of the quarks are constrained in the context of the standard model by anomaly cancellation, and can be explained by grand unification. The GUT explanation for the charges doesn't care about the bound state spectrum of the QCD sector, so it just seems to be a coincidence that hadrons (which are composite) have integer charge, and that leptons (which are elementary) also have integer charge.   Now maybe there's some anthropic argument for why such a coincidence is useful (in the case of proton and electron, it gives us atoms as we know them). Or maybe you can argue that GUTs naturally produce fractionally charged particles and strongly coupled sectors, and it's just not much of a coincidence.   But I remain curious as to whether Seiberg duality, anyons, some UV/IR relationship... could really produce something like the lepton-hadron charge coincidence, for deeper reasons. I suppose one is looking for a theory in which properties of bound states in one sector have a direct and nontrivial relationship to properties of elementary states in another sector. Is there anything like this out there?   (This question was prompted by muster-mark's many recent questions about fractional charge, and by a  that the hadron-lepton charge coincidence is a "semi-coincidence", which assured me that I wasn't overlooking some obvious explanation.)


$A \in M_{n}(\mathbb{R})$ has inverse if and only if it's rank is n.

I am having trouble trying to prove that a matrix $A \in M_{n}(\mathbb{R})$ has inverse if and only if it's rank($A$) = n. What I was trying to do is to prove it using the fact that  $$rank(A) = \dim(\text{column-space of} \ A)$$ but I don´t really know how to continue.   Thank you for your help.


Why does WCF return myObject[] instead of List like I was expecting?

I am returning a List from my WCF method.  In my client code, it's return type shows as MyObject[].  I have to either use MyObject[], or IList, or IEnumerable...   WCFClient myClient = new WCFClient();      MyObject[] list = myClient.GetMyStuff(); or     IList<MyObject> list = myClient.GetMyStuff(); or     IEnumerable<MyObject> list = myClient.GetMyStuff();   All I am doing is taking this collection and binding it to a grid.  What is the best object to assign my returned collection?


gdalwarp UTM Zone 1 to WGS84 - fails to transform

I have a global dataset consisting of tiles in UTM projection that I want to mosaic and therefore need to reproject to a common projection.  Can I solve my reprojection error with  options to gdalwarp or do I need to manipulate the input files?  Reprojection is done with gdalwarp and the following command:  gdalwarp -t_srs EPSG:4326 -of GTiff -co "COMPRESS=LZW" N01_50.TIF N01_50_wgs84.TIF   Tiles in UTM Zone01 produce the following error and the result is visibly distorted (spans around the globe in E-W direction). All other tiles work fine.  ERROR 1: Too many points (441 out of 441) failed to transform,  unable to compute output bounds.  Warning 1: Unable to compute source region for output window 6006,0,6007,340,   Here is the output of gdalsrsinfo and the :  PROJCS["WGS 84 / UTM zone 1N", GEOGCS["WGS 84",     DATUM["WGS_1984",         SPHEROID["WGS 84",6378137,298.257223563,             AUTHORITY["EPSG","7030"]],         AUTHORITY["EPSG","6326"]],     PRIMEM["Greenwich",0],     UNIT["degree",0.0174532925199433],     AUTHORITY["EPSG","4326"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-177], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",500000], PARAMETER["false_northing",0], UNIT["meters",1], AUTHORITY["EPSG","32601"]]


How to escape strings in SQL Server using PHP?

I'm looking for the alternative of mysql_real_escape_string() for SQL Server. Is addslashes() my best option or there is another alternative function that can be used?  An alternative for mysql_error() would also be useful.


Thevenin equivalent resistance of circuit with diagonal resistors

I'm trying to find the Thevenin equivalent for part A of this circuit:    I begin by opening the circuit at the dotted line of part A. Then I try to find \$V_{oc}\$ across the two terminals that are open. I can see that the 47kΩ is in series with the 18kΩ since no current flows to the open circuit, and that the 15kΩ is in series with the 33kΩ. However I'm having a lot of trouble redrawing the circuit. Not really sure about how to make it look simpler. Any ideas?


else condition does not work in my code in twig template

In the code given below  content.field_image_link[0]['#url']  is empty but it still enters the if condition and adds html what is incorrect in the below code due to which it enters the if condition whereas it should enter the second if condition given below  {% if content.field_image_link[0]['#url'] %}  {% block paragraph %}
      {% block content %}      {% if content.field_image_link[0]['#url'] %}    {{ content.field_image_2 }}
  {{ content.field_image_link[0]['#title'] }}
 {% endif %} {% if content.field_image_link[0]['#url'] == '' %} {{ content.field_image_2 }}
                                                                                {{ content.field_image_link[0]['#title'] }}
 {% endif %}     {% endblock %}
  {% endblock paragraph %}


I have used live() to create a click event, on the table row, but the data in the table was getting cached, and then after some googling, I discovered that on() is the correct way to add an event to the selector.  $('#landingContactTable tbody tr').on("click", function(e) { . .   Table is showing 25 records, but has more records that can be viewed by clicking the "next" at the bottom of the table. But when I go to next set of records, I cannot select on the table rows, the click event somehow seems not working on the second set or records.  When I was using live(), it was caching the data and I was able to select the rows on the second set of records, but then I need a way to remove the "click" event if the user clicks "rest"?  Please let me know how to achieve this? Thanks


Difference between "see a movie" and "watch a movie"

I'm learning English now so I need some helps to build on my English.   My question is if I can use the word "see" in "see a movie", because I understand that the correct word to "see a movie or to see tv" is WATCH but I heard some people saying "see a movie" not "watch a movie".   I am so confused really. It's too basic I know but help me please, thanks.


Is there any guarantee to be sure the left side of && operator is always evaluated first?

As the title says: Is there any guarantee from C++ Standard to be sure the left side of && (or and) operator always evaluated first? To be honest, I couldn't search in , I don't know which section I most look for. Sample of Problem: I want to do something like this: std::unordered_map<std::size_t, std::weak_ptr<T>> objects;  bool f (std::size_t const id) {   bool result = false;    if (not objects.at(id).expired()) {     auto const& object = objects.at(id).lock();      /* Here left side of `and` most be evaluated first */     result = object->parent->remove(id) and               objects.erase(id) == 1;   }    return result; }  And want to be sure there is no problem with the code.


Can't find Python2.7 when trying to install Django in Ubuntu 14.04

I'm using  to install Django with Postgresql in my Ubuntu 14.04.  In the 4th step, it asked me to go to my python directory, so I ran $ whereis python2.7 and I got multiple directories. One is the shortcut stored in /usr/bin, one is a library in usr/lib/python2.7, and there are many others.  And because of this very reason, I'm not sure where I am supposed to navigate to find my Python directory and continue the installation.


Show that the multiplicative group $(\mathbb{Z}/p\mathbb{Z})^*$ is cyclic

I'm looking for a proof of this that does not rely on the Chinese remainder theorem, since the exercise is from a book that has not reached such a point (Aluffi, Algebra).  Show that for $p$ prime, the multiplicative group $G=(\mathbb{Z}/p\mathbb{Z})^*$ is cyclic. You may use that for $p$ prime, the equation $x^d=1$ has at most $d$ solutions in $\mathbb{Z}/p\mathbb{Z}$. (hint: for $g\in G$ of maximal order, $\forall h\in G, |h|\;|\;|g|$, and in particular, $h^{|g|}=1$.)  My only idea for now is constructing an element $a\in G$ such that $|a|=|G|$, using the fact that a group of order $n$ is cyclic $\iff\exists$ an element of order $n$.


I can't install tux-paint , tux-math , tux-typing ,k geography. please tall me how to install this app in ubuntu software?


From wikipedia I obtain the following definition of an injective function :     Let $f$ be a function whose domain is a set $A$. The function $f$ is injective if for all $a$ and $b$ in $A$, if $f(a) = f(b)$, then $a = b$; that is, $f(a) = f(b)$ implies $a = b$.    From this I conclude that a function $f$ is injective if the below statement is true for all $a,b \in A$:  $$f(a)=f(b) \implies a=b$$  My question is: Can I re-formulate the above statement as $f(a)=f(b) \iff a=b$ ?


Solving linear regression with weights and constraints

I would like to solve a linear regression (in R) with weights $w$ and a constraint.  In other words, I would like to find $x$ that minimizes the sum of squares $$\sum_i w_i(b_i-Ax_i)^2$$  On top of that I have an external vector $d$, which I would like to use in a constraint, such that $d \cdot x \le 5$.  Is this something that would be possible to do in R with solve.QP or perhaps some other R script?  Edit: I am adding a bounty for a solution that doesn't require any other custom software except the cran packages. While rstan works perfectly unfortunately I am unable to install it on my production servers due to old versions of some libraries.


How to create 3D curved text the right way for boolean operations?

The duplicate question above is different from this question, is I need to boolean the text from a cilinder. And that requires converting it to a mesh, which messes up the text in similar matter shown below.  I want to do the following, but it doesn't yield nice results:   Create some text Add Modifier "Curve" ALT + C -> "Mesh from curve" Give it some dimension: Add modifier "Solidify"   Then the result looks like this:   See especially the 'e'. I want to use this curved text to cut out the text from a cilinder. But that will never work propery as the letters are already messed up. Without curving they look fine, but I want it curved.  I must be possible to have nice curved 3D text in blender! How can I achieve this? I finally want to print  Thanks!


Discriminant analysis vs logistic regression

I found some pros of discriminant analysis and I've got questions about them. So:     When the classes are well-separated, the parameter estimates for   logistic regression are surprisingly unstable. Coefficients may go to   infinity. LDA doesn't suffer from this problem.      If number of features is small and the distribution of the predictors   $X$ is approximately normal in each of the classes, the linear   discriminant model is again more stable than the logistic regression   model.    What is stability and why is it important? (If logistic regression provides a good fit that does its job, then why should I care about stability?)      LDA is popular when we have more than two response classes, because it   also provides low-dimensional views of the data.    I just don't understand that. How does LDA provide low-dimensional views? If you can name more pros or cons, that would be nice.


How to keep the audio profile at A2DP while using a mic with Bluetooth headset? (Push-to-talk)

I have a CEL-TEC F5A headset. The spec says:      Bluetooth 4.0, profiles: Headset, Hands free, A2DP, AVRCP/HSP/HFP   It plays nicely with High Fidelity Playback (A2DP sink) profile.  When I want to switch audio input to the headset's microphone, the output profile automatically changes to Headset Head Unit (HFS/HFP) and the quality is terrible - like 8bit sound or something. When I switch it back to A2DP, the input is back to desktop mic.  I've read few of other questions and seems A2DP is expected not to support input, right? But the HFP part in HFS/HFP is High Fidelity Playback I guess? That sounds like it could work as a headset and still not sound like 1950's phone.  How could I simplify switching between the profiles so that it is HFS/HFP when I talk and A2DP when I listen? E.g. as a push-to-talk.  Ubuntu 17.10, no sound customization IIRC, everything latest.   My output:  $ pactl list cards Card #0         Name: alsa_card.pci-0000_00_03.0 ...  Card #4         Name: bluez_card.00_19_5D_25_6F_6C         Driver: module-bluez5-device.c         Owner Module: 30         Properties:                 device.description = "F5A"                 device.string = "00:19:5D:25:6F:6C"                 device.api = "bluez"                 device.class = "sound"                 device.bus = "bluetooth"                 device.form_factor = "headset"                 bluez.path = "/org/bluez/hci0/dev_00_19_5D_25_6F_6C"                 bluez.class = "0x240404"                 bluez.alias = "F5A"                 device.icon_name = "audio-headset-bluetooth"                 device.intended_roles = "phone"         Profiles:                 a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 10, available: yes)                 headset_head_unit: Headset Head Unit (HSP/HFP) (sinks: 1, sources: 1, priority: 20, available: yes)                 off: Off (sinks: 0, sources: 0, priority: 0, available: yes)         Active Profile: a2dp_sink         Ports:                 headset-output: Headset (priority: 0, latency offset: 0 usec, available)                         Part of profile(s): a2dp_sink, headset_head_unit                 headset-input: Headset (priority: 0, latency offset: 0 usec)                         Part of profile(s): headset_head_unit   The problem here is not that the microphone does not work, but rather that the audio quality worsens when it is activated.


I need to use Times New Roman Font. I've followed the instructions to install/reinstall mscorefonts installer. I am asked to accept EULA but when I hit ENTER nothing happens.  What should I do to finish reinstall process? Thanks!


Where to place my local website starting with the 2.4.7 version of apache2?

I recently installed Ubuntu 14.04, then I installed lamp-server and placed my webpages in /var/www directory, but when I opened localhost in the browser there was nothing. I think that happened because Zend updated Apache.  Whatever the reason may be, I want to know where to keep my php files so that I can access them from my browser.


Will the below code cause memory leak in c++

class someclass {};  class base {     int a;     int *pint;     someclass objsomeclass;     someclass* psomeclass; public:     base()     {         objsomeclass = someclass();         psomeclass = new someclass();         pint = new int();          throw "constructor failed";         a = 43;     } }  int main() {     base temp(); }   In the above code, the constructor throws. Which objects will be leaked, and how can the memory leaks be avoided?  int main() {     base *temp = new base(); }   How about in the above code? How can the memory leaks be avoided after the constructor throws?


How often do Spirit $9 Fares get posted?

I'm a semi-frequent traveler (3-5x/year), and I'm debating whether to join the Spirit $9 Fare Club.  My question is, how frequently do these club fares pop up? How does Spirit schedule these things?  For example, do they pop up on Tuesdays, or on a set schedule?  Do they happen during the holidays?  I'm guessing it's a probability game, on the chance there will be a reduced fare on the route I'm taking, at the time I'm booking. But I'm wondering how often during the year and in general these club fares pop up. And if people have tips on the best time to book to grab these reduced fares.


Is there a way one could improve the rendering of this gradient? After creating a gradient swatch and applying it to a rectangle that fills the entire page to use as a background, the gradient looks bad so I would like to improve the quality of it and High Quality display performance doesn't change anything:


When does Hamiltonian equals to energy of the system?

In classical mechanics, the Hamiltonian is well defined by the Lagrangian. Whereas, energy is a very ambiguous term. We just say $E=T+U$, and usually it equals to Hamiltonian. Does there exist a way that, by just looking at the Lagrangian mathematically, we immediately know the relationship between the Hamiltonian and the energy of the system?  And if we have a system, the Hamiltonian of which does not equal to energy, what is the physical meaning of that difference?


. It is a mathematical expression/sequence/set of numbers with the arrow exactly under any one of the numbers (with or without n= 0). How to do it in latex? Any of the up arrow types (single line or double line) shown in the figure is okay.


How to create a shape, in a form of two basic shapes partially substracted?

When I have a circle shape and now I substract from it a little square in the middle, what I get is a shape that looks like hollowed circle. But in fact in its paths I still have my whole shape of circle and a 'substraction path'of a shape of square. How to make it a real substracted path, so when I combine this shape with others, the substraction path doesn't affect them?  Here is more of an explanation:  1) at first I make asimple substraction on a square - notice what happens on a vector mask: it is a square and a substraction of a rectangle. It wouldnt bug me that much if not when...    2) then I add another shape...  3) and finally try to merge this two into one shape.     The substraction makes a nice Cshape with the first shape, but also messes up the other shape.  The effect I need is just a C shaped polygon that I can merge /wo ruining rest of composition, and still get the nice, resizable shape of the whole.  sorry for not inserting images, but my reputation won't let me.


How to show $\frac{3^n}{n!}\to 0$ without involving with series?  I tried squeeze theorem, but I can't find a sequence bigger than this one and converges to $0$.   Could someone suggest an idea?


Is it OK to write recommendation letters for two students for the same institution and how to avoid the competition?

I am a teacher in a high school for gifted students and a student (let's call him A) asks me for a recommendation letter some time ago to apply to a top-level university (say AU: Awesome University) in our country. His level is below the average but he is very motivated and worked very hard. He is also a very nice, dedicated student with a good sense of ethics. His rather low score is explained by the high standards of my school: it is highly considered at the national level and in some countries around, and senior students can validate in advance some university courses. So I am sure that A will do well at university and I really want him to enter in AU.  Recently, after I accepted writing a recommendation letter for A, a second student, B, asked me for a recommendation letter for the same university AU. B is a great student with excellent grades. She always works with passion and could be considered as a dream student. I of course would be very happy to write her a recommandation letter and I have no worries about the outcome of the application of her application to AU. But I am worried on how my recommandation letter for A will be compared to the letter for B and whether writing for B would lower A's chances to enter university.  The shorter, the better, here are my questions:   Is there any (maybe unofficial) policy about writing recommendation letters for two students for the same institution?  Do my worries about one of the two recommendation letters disregarded by comparison with the other one make any sense? If my worries are founded, how can I avoid the competition between the two letters?


How much older was Hermione after her third year at Hogwarts?

In her third year at Hogwarts, Hermione is given a time-turner so she can take more classes. Several of her classes are concurrent to each other, so she attends one class (for 1-2 hours) goes back in time, and attends a different class during the same time frame.  But from an aging point of view, she should age 4 hours in relation to the 2 hours everyone else ages. How much older should Hermione be relative to everyone else after using the time-turner for an entire school year?


How to not "duplicate" a table if it has a unique constraint over many columns?

I have a very large table (35GB) that is unique over a combination of four of its columns.    The table isn't very wide and the four columns it is unique over are the columns that are larger (in bytes).  The end result is that the index to keep the table unique is 21GB.  This isn't a result of the index bloating in size over time but is the size of the the index immediately after it is created.  I don't need to optimize for insert speed at all, as inserts will only happen in batches once per month.  There won't be any updates to any rows once they are inserted.  I'm running PostgreSQL 9.5.0.  Is there a way to not duplicate such a large portion of the database just to enforce a unique constraint?  Possibly using something like a clustered index?  Full table description:  CREATE TABLE medi_cal_base_eligibility (     client_index_number text NOT NULL,     medi_cal_date date NOT NULL,     eligibility_date date NOT NULL,     aidcode text,     responsible_county text,     status text,     cardinal smallint NOT NULL,     id SERIAL PRIMARY KEY );   Indexes:  "medi_cal_base_eligibility_pkey" PRIMARY KEY, btree      (id) "medi_cal_base_eligibility_uq_dates_cin_cardinal" UNIQUE CONSTRAINT, btree      (eligibility_date, client_index_number, medi_cal_date, cardinal)


Currently there is 1 known type of electric field, it has positive(positrons and protons) and negative(electrons) charges. I would expect the charges of alternate electric fields to act the same regarding attraction and repulsion. They could hypothetically have different electric permittivities and magnetic permeabilities though.  I'm wondering if it's possible that there are other kinds of electric fields with their very own charges in existence. If they did exist, they would be very hard to detect.  Because these charges would be electrically neutral from our electric field's perspective they would essentially act like neutrinos and pass through everything. They may be able to interact with our matter gravitationally. This might be the cause of unusual phenomena like dark matter and energy.  Is it possible, given our current understanding of physics, that these alter-charges could exist?


Cardinality of ordered pairs of subsets of {1, ..., n} computed in 2 different ways

It is an assignment question, thus I am simply looking for a hint to unblock myself.     Let $S$ be a collection of all ordered pairs of subsets of $\{1, ..., n\}$, not necessarily disjoint. That is,   $$ S = \{(A,B) : A \subseteq \{1, ..., n\}, b \subseteq \{1, ..., n\} $$   Show by computing the size of $S$ in the different ways that   $$ 4^n = \sum_{k=0}^{n}{3^k{{n}\choose{k}}} $$   So far the left side is obvious that it is simply picking a $A$ then picking a $B$ in $\{1,...,n\}$. $$ |S| = 2^n \times 2^n = 4^n $$ The right side however is what has me stuck. Looking at the $3^k$, I can tell that it's the number of ways to pick $(A,B)$ disjoint subsets of $\{1,...,k\}$, $n\choose{k}$ is the number of ways to pick a third set. I've wrote ways to combine the third set into $(A,B)$ but I can't seem to find something intuitive that works for all $A, B$


I'm making an app with a custom list in multiple languages.  Is there an easy way so that I only have to create the site columns, content type and list once? So I don't have to create them for each language?  My app will be in English, French and Dutch.  My lists elements.xml looks like this  <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/">     <!-- Do not change the value of the Name attribute below. If it does not match the folder name of the List project item, an error will occur when the project is run. -->     <ListTemplate         Name="List1"         Type="10000"         BaseType="0"         OnQuickLaunch="TRUE"         SecurityBits="11"         Sequence="410"         DisplayName="List1"         Description="My List Definition"         Image="/_layouts/15/images/itgen.png"/>   <Field       Name="Adres"       ID="{2a32d9eb-ad3b-4dbb-abba-66dd01ca7c6e}"       DisplayName="$Resources:Adres"       Type="Text"       Required="TRUE" />   <Field       Name="Naampje"       ID="{ac47be45-2f43-4d16-9a06-162c85945ec9}"       DisplayName="$Resources:Naampje"       Type="Text"       Required="FALSE" />   <Field     Name="Nickname"     ID="{6B0A2CD7-A7F9-41ca-B932-F3BEBB603793}"     DisplayName="$Resources:Bijnaam"     Type="Text"     Required="FALSE" />  </Elements>   Well if i change my language in Sharepoint (Office 365) it's not changing the titles from dutch to the other languages i have added.


I just installed Ubuntu 18. Since the top bar is only on the primary monitor, I can't use the mouse to grab and move my Chrome window (the top of the screen looks like below). Trying to do so results in grabbing a single tab and opening it in a new window.     Is there a way around this? Ideally, I'd like to have the top bar  across all screens. Another obvious disadvantage of only having the top bar on one screen is that the window menu of any window, not just Chrome, is displayed on the left upper corner of my left screen even when the window is in the lower right corner of the right screen.


Because I now and then need to use scandinavian letters despite using US Dvorak as my layout, I would like to use Caps Lock as a compose key. (I don't need Caps Lock at all, I'm not a forum troll)  How would one accomplish this?  Using Linux Mint 17 with xfce, if that makes a difference.  For the record, I am the only user of this PC, and would prefer to have this be the system default, mainly in xorg, but also in tty if that's not too much drudgery.


The interaction between waves and particles according to their wavelength

Why do EM waves with a large wavelength like those in the red range (and radio waves) interact with particles less than those in the blue range?  That is the reason why the sky is blue, is that right?


I don't know why I keep receiving the following error messages, when running apt-get update:  W: Failed to fetch http://ppa.launchpad.net/ferramroberto/sopcast/ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found W: Failed to fetch http://ppa.launchpad.net/ferramroberto/sopcast/ubuntu/dists/trusty/main/binary-i386/Packages  404  Not Found


Temperature on the surface of the sun calculated with the Stefan-Boltzmann-rule

In , the following calculation for the temperature on the surface of the Sun is made:  $\sigma=5.67*10^{-8}\frac{W}{m^2K^4}$ (Stefan-Boltzmann constant)  $S = 1367\frac{W}{m^2}$ (solar constant)  $D = 1.496*10^{11} m$ (Earth-Sun average distance)  $R = 6.963*10^8 m$ (radius of the Sun)  $T = (\frac{P}{\sigma A})^\frac{1}{4} = (\frac{S4 \pi D^2}{\sigma 4\pi R^2})^\frac{1}{4}=(\frac{SD^2}{\sigma R^2})^\frac{1}{4} = 5775.8\ K$  (Wikipedia gives 5777K because the radius was rounded to $6.96*10^8m$)  This calculation is perfectly clear.  But in Gerthsen Kneser Vogel there is an exercise where Sherlock Holmes estimated the  temperature of the sun only knowing the root of the fraction of D and R.  Lets say, he estimated this fraction to 225, so the square root is about   15, how does he come to 6000 K ? The value $(\frac{S}{\sigma})^\frac{1}{4}$  has about the value 400. It cannot be the approximate average temperature  on earth, which is about 300K. What do I miss ?


I was messing around with some try...catch...finally executions and noticed a breakpoint in finally won't seem to be hit:      try {         System.out.println("in try");         int num = 5 / 0;     } catch (ArithmeticException e) {         System.out.println("in catch");     } finally {         System.out.println(); //breakpoint here         System.out.println("in finally");     }   The breakpoint in the finally doesn't seem to hit, however it prints out successfully.  However, if I change the try to int num = 5 / 1;, and therefore not going in to the catch, the breakpoint is hit.  I'm using Netbeans 8.1.  Is there a reason for this?


Are two norms equivalent if they induce the same topology on a vector space?

Whenever two norms are equivalent in the sense that $\|x\|_1\le c_1\cdot \|x\|_2$ and $\|x\|_2\le c_2\cdot \|x\|_1$, they generate the same topology. Is the reverse also true, i.e. if a topology is generated by two different norms, are the norms equivalent in the above sense? We know this to be true for $\mathbb{R}^n$, but is it generally true, and if not, what are some counterexamples?  What about a Hausdorff, translationally invariant vector space topology generated by two different metrics, are the metrics equivalent in the sense $d_1(x,y)\le c_1\cdot d_2(x,y)$ and vice versa?


I am running 12.04 on usb would now like to install on C: will it overwrite windows XP

I am running 12.04 on a USB stick on a machine with Windows XP and would now like to install 12.04 on my C: drive using the Windows installe. Will it run alongside my existing system?


how to create child A from child B and cast to Parent?

Context: I want to utilise state objects within my program to determine how the program functions during a state. I have an abstract class State that each state derives from (to keep things simple lets say we have MenuState and AboutState), The current state is stored as type State.  I want to be able to create a new instance of AboutState from within MenuState and vice versa so that I can control which program state I am currently in and change state easily (This would return a State object since that is what my current states type is)  The problem I am getting is obviously that if I first create AboutState, MenuState does not exist yet (to the compiler) and crashes on compile. I thought to fix this by forward declaring MenuState but I cannot cast MenuState in the function because I have only forward declared it rather than creating a full class.  Essentially How do I forward declare / fix this circular reference issue, so that I can create each of the objects from the other?  I primarily use Java so excuse the obvious errors below but you get the point, I can't cast temp -> IWorldState even if I forward declare. (I think)  class AboutState : public IWorldState { public:     AboutState() {};     virtual IWorldState* handleInput(std::string input) {         MainMenuState temp;                 *IWorldState state = (IWorldState)temp;         return state;         } };  class MainMenuState : public IWorldState { public:     MainMenuState() {};     virtual IWorldState* handleInput(std::string input) {                  AboutState temp;                 *IWorldState state = (IWorldState)temp;         return state;         } };   Also don't know know if It's ok to ask in the same question, but is there a more appropriate way to do this kinda functionality with objects or is there a different type of approach to moving between the different states? I considered the idea of creating all states at the start and passing the next state as a parameter to the constructor but i feel It's unnecessary if I can get this working.


Does an Oathbreaker Paladin keep or lose their Paladin powers?

I would like to know what happens with the powers of paladin — Divine Sense, Lay on Hands, Divine Smite and Divine Health — when a paladin becomes an Oathbreaker.


How to determine which app is creating a notification

I am running Android 2.2 on HTC Legend. I have a LOT of applications installed on it.  Today, after I changed my mobile operator, a notification appeared in the top bar. When I click on it, it says that my connection to Google is wrong and asks for the password.  However, since this is a dialog overlay, I have no mean to know if it is an application that I can trust (like a native one), or some sort of scam.  Any idea on how to identify from which app/service this message comes from?


How was Umbridge even able to cast a Patronus?

In DH, while      Harry, Ron, and Hermione are infiltrating the Ministry,   Umbridge casts a Patronus to keep the Dememtors at bay.  But if she was capable of such a charm, surely she could have kept some centaurs at bay.     “Nooooo!” he heard Umbridge shriek.      “Noooooo . . . I am Senior   Undersecretary . . . you cannot . . . unhand me, you animals . . .   nooooo!”      He saw a flash of red light and knew that she had attempted to Stun   one of them — then she screamed very loudly. Lifting his head a few   inches, Harry saw that Umbridge had been seized from behind by   Bane and lifted high into the air, wriggling and yelling with fright.    So how did she do it?


I installed Ubuntu 12.04 LTS on a hard drive, and after that on a different partition on the same hard drive with windows7. In both cases, after Ubuntu finished installing, the computer reboots, and it boots automatic into window7, without any boot menu to select the OS. So, How can I make my bootloader to see both windows and Ubuntu?


Finding a basis of an infinite-dimensional vector space?

The other day, my teacher was talking infinite-dimensional vector spaces and complications that arise when trying to find a basis for those. He mentioned that it's been proven that some (or all, do not quite remember) infinite-dimensional vector spaces have a basis (the result uses an Axiom of Choice, if I remember correctly), that is, an infinite list of linearly independent vectors, such that any element in the space can be written as a finite linear combination of them. However, my teacher mentioned that actually finding one is really complicated, and I got a sense that it was basically impossible, which reminded me of Banach-Tarski paradox, where it's technically 'possible' to decompose the sphere in a given paradoxical way, but this cannot be actually exhibited. So my question is, is the basis situation analogous to that, or is it actually possible to explicitly find a basis for infinite-dimensional vector spaces?


Possible to do a MySQL foreign key to one of two possible tables?

Well here's my problem I have three tables; regions, countries, states.  Countries can be inside of regions, states can be inside of regions.  Regions are the top of the food chain.  Now I'm adding a popular_areas table with two columns; region_id and popular_place_id.  Is it possible to make popular_place_id be a foreign key to either countries OR states.  I'm probably going to have to add a popular_place_type column to determine whether the id is describing a country or state either way.


How to get Calibri font to display nicely

I have Calibri installed because it's the default font for M$ Office and so many of my clients send me documents using this font.  But it displays without anti-aliasing which is horrible. It's like being on a Windoze machine again :-O    It only seems to happen at small sizes; it's antialiased at larger sizes. Can I disable this?  EDIT:  My /etc/fonts/config.avail/10-antialias.conf contains  <?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <!--  Use the Antialiasing -->   <match target="font">     <edit name="antialias" mode="assign"><bool>true</bool></edit>   </match> </fontconfig>   And  % fc-match calibri           calibri.ttf: "Calibri" "Regular"


How can I put my name in the lower corner of my pictures using photoshop?

How can I put my name in the lower corner of my pictures using Photoshop? Specifically, how can I put my name in mass numbers of my pictures using Photoshop? I have 1500 photos from a recent biology trip that need my name in them so people know that the works are mine. I can do it one by one, but is there a faster way to do it?


create another mysql database help performance?

I want to know if I use different databases can help performs.  I have one big table in support_chat with more than 5 million rows and I need to scan this all  the time (3s with ajax) to check new messages on support. If I move this table to another db in the same computer, can it help anything? (let users, sells, comments table faster)  eg:  db1:      users table     sells table     comments table     support_chat table // move this table to db2   db2:  suport_chat table


How to add program icons to the desktop?

For example, I'd like a Terminal icon on the desktop.


Is this possible to have the following observation

x+x+x+x+x+...... Up to finite x times= x^2   Differentiating both sides  we get 1+1+1+1+1......=2x  What is wrong in this?? Attempt: I'm thinking that the above statement written is only for natural numbers..


How to secure JS Applications with Jquery or Angular JS

I developed a Complete SPA application with jquery with ajax like asana. In this app, including some features like, Listing Users,  When clicking a user loading his tasks, When clicking a specific task loading the task details . etc...  I completed all the development parts with jquery, But When a user clicking a task from my app, I collecting the task id from an html element attribute and sent to ajax php page.   We can change the attribute value with firebug easily. After that clicking the task name its collecting a wrong value.  How can I solve this type of Security issues with jquery.


Is it possible to create new keyword for your own type (like `double` for `System.Double`)?

I wonder if anyone can explain how the System.double is different from System.Double and how these differences are constructed in code.  if one looks at the Class:  public struct Double : IComparable, IFormattable, IConvertible, IComparable<Double>, IEquatable<Double>   from:   There is no clarity between the double and Double Types.  Using Visual Studio 2015, it is recommended that one uses the double key word instead of Double as the conversion is less.  If I were to write a custom Data Type and derive from double, for example, would constructing it by dynamic be enough to get the ball rolling.  It baffles me at how .NET has derived the base Data Types.  EDIT: A search on the net shows there is a lot of confusion on this topic. For example:  using System;  public class QBit : IComparable, IFormattable, IConvertible {  internal _qbit  public string Value { get { return _qbit; }  public QBit() { _qbit = "1978"; }  }   In another class:  using System;  using qbit = QBit;  public class Spinstate {  internal _state  public string Value { get { return _state; }  public QBit() { qbit = new QBit (); _state = qbit.Value; }  }   Is not the same as a , this is an . How to declare a Keyword?  EDIT: A KEYWORD is defined as:     Keywords are predefined reserved identifiers that have special meanings to the compiler. They cannot be used as identifiers in your program unless they include @ as a prefix. For example, @if is a legal identifier but if is not because it is a keyword.   The  '' is defined as follows:     The double keyword signifies a simple type that stores 64-bit floating-point values. The following table shows the precision and approximate range for the double type.   The Type is as specified by the , which is a binary64 Double precision floating-point format - Still, we are no closer to Defining a Keyword in Code and more importantly "and how they are constructed"


balance scale problem for 13 (not 12) items

The 12-item balance scale puzzle is very familiar.  The object is to find the lone non-standard item (if one exists) out of a group of 12 seemingly identical items, using a balance scale and a maximum of three weighings. Did you know that it is possible to accomplish the same outcome given a set of 13 seemingly identical items?  I've scoured the web for a discussion of this problem/solution and have not found one. Am I the only one that has solved this problem?  BTW: If you allow four (4) weighings on a balance scale, how many seemingly identical items can you analyze and be assured of finding the lone non-standard item within the group?  If there is sufficient interest, I will publish the answers in a future post.


Why is logistic regression a linear classifier?

Since we are using the logistic function to transform a linear combination of the input into a non-linear output, how can logistic regression be considered a linear classifier?  Linear regression is just like a neural network without the hidden layer, so why are neural networks considered non-linear classifiers and logistic regression is linear?


Blender 2.8 Cycles - Winter landscape, weird artefacts in few of the cut-out trees

I come across an issue when rendering tree particles.  All of my trees in the attached image are from the source tree. The source tree is free of alpha mask problems. As one can see, most of them show up perfectly fine. Still, some show strange black artefacts. Which seems weird as they are part of the same particle system.  Any suggestions? I appreciate your help.  Thanks.


Ordinal dependent variable with continuous independent variables

I have an ordinal dependent variable, named D, which varies from very small, small, medium, big, to very big. This variable depends on the independent variables X, V, which are continuous variables. Could I perform an ordinal logistic regression analysis in the former data in order to obtain the relationship between D and X, V? Could I obtain in this way the D variable as percentages?


What do the remaining columns (after column 2) in a Z table mean

In the  , I can understand the first 2 columns. The first column is the Z value, the second column is Prob(X<=Z). But what do the remaining columns mean?


Home Page plagiarism risks from a competitors

What are SEO risks and what are the best courses of action via Google, when an industry competitor duplicates 95% of your home page content and passes it as their own. Especially when your own website has ranked for years etc and held this unique copy for years.   Further to this - what are the implications when another industry competitor replicates both your entire site design template and word for word content across your ENTIRE website?


What is the use of a Junit @Before and @Test annotations in java? How can I use them with netbeans?


How do I simply run an ubuntu touch app from the terminal?

I've got a qml file and I just want to ssh to the phone and do  qmlscene myfile.qml   Is it possible without doing all that stuff with SDK and packages? Just vim and some simple commands that can fit into person's memory.


How to recover a forgotten Apple ID without access to a trusted device or a IOS device

iPhone is considered to be the best in case of security. What should be done if the Apple ID is lost or forgotten and the iPhone is turned off, and there is no other way to start it?  This has happened with me twice and this time the problem is again the same. It's a big loss for me to buy a new iPhone every time. Please give me best guide so I can fix this problem.


Evaluation of $\int_1^\infty \frac{1}{x(x^2+1)} dx$

Evaluate the integral  $$\int_1^\infty \frac{1}{x(x^2+1)} dx$$    Update: I know that this can be solved with many methods and I do know some of them. I'm just searching for the (agreeably) most efficient way to do this.


Why can mathematical equations describe this world?

Since I want to understand the world, I learn physics from textbooks. But I feel there is a gap between the textbook and the world. I do not know     why the equations in the textbook can control the whole world? How can I bridge the gap? In research, how can one distinguish whether what we do is meaningful in reality or not?   Any help or suggestions or comments will be appreciated.


By making the substitution $x=\pi -t$ show that; $$\int_{0}^{\pi} xf(\sin x)dx = \frac{1}{2}\pi \int_{0}^{\pi} f(\sin x)dx$$ where $f(\sin x) $ is a given function of $\sin x$.  I get $dx = -dt$ and that $\sin (\pi -t) = \sin t$ which gives me;  $$\int_{0}^{\pi} xf(\sin x)dx =\int_{0}^{\pi} tf(\sin t)dt - \pi \int_{0}^{\pi} f(\sin t)dt$$  Clearly I am missing a minus sign somewhere so where have I gone wrong?(note; the integral in t is equal to the integral in x, they're just variables)


Unity missing? Can't see top or side panels

I just removed some effects using ccsm, switched to the AMD proprietary driver, rebooted and after I log in, the unity panel is no longer there. If I hit the windows key or the alt key, nothing happens. I can hit ctrl+alt+t to get a terminal (and thus launch apps via commandline).  Does anyone know how I can fix this? What logs do I need to post here for help?  Edit #1:  As suggested by @cprofitt I just ran:  dconf reset -f /org/compiz/ && setsid unity   I'm seeing some compiz messages in the terminal now:  unity-panel-service: no process found compiz (core) - Info: Loading plugin: core compiz (core) - Info: Starting plugin: core compiz (core) - Info: Loading plugin: ccp compiz (core) - Info: Starting plugin: ccp compizconfig - Info: Backend     : gsettings compizconfig - Info: Integration : true compizconfig - Info: Profile     : unity compiz (core) - Info: Loading plugin: composite compiz (core) - Info: Starting plugin: composite compiz (core) - Info: Loading plugin: opengl X Error of failed request:  BadRequest (invalid request code or no such operation)   Major opcode of failed request:  155 (ATIFGLEXTENSION)   Minor opcode of failed request:  66 ()   Serial number of failed request:  23   Current serial number in output stream:  23 compiz (core) - Info: Unity is not supported by your hardware. Enabling software rendering instead (slow). X Error of failed request:  BadRequest (invalid request code or no such operation)   Major opcode of failed request:  155 (ATIFGLEXTENSION)   Minor opcode of failed request:  66 ()   Serial number of failed request:  23   Current serial number in output stream:  23 compiz (core) - Info: Unity is not supported by your hardware. Enabling software rendering instead (slow). compiz (core) - Info: Starting plugin: opengl Compiz (opengl) - Fatal: glXQueryExtensionsString is NULL for screen 0 compiz (core) - Error: Plugin initScreen failed: opengl compiz (core) - Error: Failed to start plugin: opengl compiz (core) - Info: Unloading plugin: opengl compiz (core) - Info: Loading plugin: compiztoolbox compiz (core) - Info: Starting plugin: compiztoolbox compiz (core) - Error: Plugin 'opengl' not loaded.


Supremum vs. Maximum in the definition of the Lp norm

The $L_p$ norm $||A||_p$ is defined as  $$\sup_{x \neq 0} \frac{||Ax||_p}{||x||_p} = \max_{||x||_p = 1} ||Ax||_p \tag{1}$$  I'm not quite getting why the LHS uses $\sup$ but the RHS uses $\max$. I know how both are defined but somehow I don't get it. The maximum requires the solution to be contained in the candidate set while the supremum does not. Thus, why does (1) hold?


This a code of timer that save information in pause and reset. every time I start app this information are put to timer. because I don't want start timer from 0. I want start timer from last time. so in the beginning It should retrieve the last time information.  public class TimerActivity extends Activity { private Button startButton; private Button pauseButton; private Button resetButton;  private TextView timerValue;  private long startTime = 0L;  private Handler customHandler = new Handler();  long timeInMilliseconds = 0L; long timeSwapBuff = 0L; long updatedTime = 0L;     @Override public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.main);     SharedPreferences prefs = this.getSharedPreferences("timer", Context.MODE_PRIVATE);     final SharedPreferences.Editor editor = getPreferences(MODE_PRIVATE).edit();        timeSwapBuff=prefs.getLong("timeSwapBuff", 0);     startTime=prefs.getLong("startTime", 0);     updatedTime=prefs.getLong("updatedTime", 0);        Log.i("timeSwapBuff", ""+timeSwapBuff);     Log.i("startTime", ""+startTime);     Log.i("updatedTime", ""+updatedTime);           timeInMilliseconds = SystemClock.uptimeMillis() - startTime;        updatedTime = timeSwapBuff + timeInMilliseconds;      int secs = (int) (updatedTime / 1000);     int mins = secs / 60;     secs = secs % 60;     int milliseconds = (int) (updatedTime % 1000);       // error at this line for set text       timerValue.setText("" + mins + ":"             + String.format("%02d", secs) + ":"             + String.format("%03d", milliseconds));         timerValue = (TextView) findViewById(R.id.timerValue);      startButton = (Button) findViewById(R.id.start);      resetButton = (Button) findViewById(R.id.reset);      pauseButton = (Button) findViewById(R.id.pause);      startButton.setOnClickListener(new View.OnClickListener() {          public void onClick(View view) {             startTime = SystemClock.uptimeMillis();             customHandler.postDelayed(updateTimerThread, 0);          }     });       pauseButton.setOnClickListener(new View.OnClickListener() {          public void onClick(View view) {              timeSwapBuff += timeInMilliseconds;             customHandler.removeCallbacks(updateTimerThread);              editor.putLong("timeSwapBuff", timeSwapBuff);             editor.putLong("startTime", startTime);             editor.putLong("updatedTime", updatedTime);           }     });       resetButton.setOnClickListener(new View.OnClickListener() {          public void onClick(View view) {               startTime=SystemClock.uptimeMillis();             timeSwapBuff=0;             customHandler.removeCallbacks(updateTimerThread);              timerValue.setText("" + 0 + ":"                     + String.format("%02d", 00) + ":"                     + String.format("%03d", 000));              editor.putLong("timeSwapBuff", timeSwapBuff);             editor.putLong("startTime", startTime);             editor.putLong("updatedTime", updatedTime);          }     });  }  private Runnable updateTimerThread = new Runnable() {      public void run() {           timeInMilliseconds = SystemClock.uptimeMillis() - startTime;            updatedTime = timeSwapBuff + timeInMilliseconds;          int secs = (int) (updatedTime / 1000);         int mins = secs / 60;         secs = secs % 60;         int milliseconds = (int) (updatedTime % 1000);         timerValue.setText("" + mins + ":"                 + String.format("%02d", secs) + ":"                 + String.format("%03d", milliseconds));         customHandler.postDelayed(this, 0);     }  };      }


Clarification regarding hint given for showing $p(x)$ is irreducible over $\mathbb{Q}(\sqrt{-2})$.

I want to prove that the polynomial $p(x) = x^{4} - 4x^{2} + 8x + 2$ is irreducible over $\mathbb{Q}(\sqrt{-2})$.  Following a series of hints given by my textbook, I start by using the fact that $\mathbb{Z}(\sqrt{-2})$ is a unique factorization domain. So then by a corollary to Gauss' Lemma, I observe that $p(x)$ is irreducible over $\mathbb{Q}(\sqrt{-2})$ iff it is irreducible over $\mathbb{Z}[\sqrt{-2}]$.  Suppose $p(x)$ has a linear factor $x - \alpha$ in $\mathbb{Z}[\sqrt{-2}]$. My hint says that I should be able to infer that $\alpha$ is a divisor of $2$ in $\mathbb{Z}[\sqrt{-2}]$ (this is obvious) and then conclude that $\alpha \in \{\pm 1, \pm 2, \pm \sqrt{-2}\}$. What I don't get is how it even makes sense to consider that $\alpha = \pm \sqrt{-2}$ in the integer field?


I'm currently developing a 3D game engine in C# using OpenTK.  I have basic game objects, and each game object has transform (translation, rotation and scaling). A game object can have components (much like Unity).  One game object (The camera game object) has three components, A camera, free move and a free look component. The free move component allows the user to move the camera around the scene, whilst the free look camera is SUPPOSED to rotate the camera. However, I get this odd effect:    (Note that, the plane isn't changing position, it seems the camera is ... turning upside down?)  On top of that, once I rotate the camera, moving the camera (using the arrow keys) gets really weird, up can become down, left can become right. It's all very odd.  Anywho, here is the update method for my Free Look component:  protected override void OnUpdate(object sender, UpdateEventArgs e) {     Rectangle bounds = Game.GetCurrentGame().Window.Bounds;      Vector2 center = new Vector2(bounds.Left + (bounds.Width / 2), bounds.Top + (bounds.Height / 2));      Vector2 mousePosition = new Vector2(System.Windows.Forms.Cursor.Position.X,                                             System.Windows.Forms.Cursor.Position.Y);     Vector2 deltaPosition = center - mousePosition;      bool rotX = deltaPosition.X != 0;     bool rotY = deltaPosition.Y != 0;      if(rotY)         Transform.Rotate(new Vector3(0, 1, 0), MathHelper.DegreesToRadians(-deltaPosition.X * sensitivity));     if(rotX)         Transform.Rotate(new Vector3(1, 0, 0), MathHelper.DegreesToRadians(-deltaPosition.Y * sensitivity));      if (rotY || rotX)         System.Windows.Forms.Cursor.Position = new Point((int)center.X, (int)center.Y);      base.OnUpdate(sender, e); }   here is the Rotate method in my transform class:  public void Rotate(Vector3 axis, float angle) {     rotation = (Quaternion.FromAxisAngle(axis, angle) * rotation).Normalized(); }   I hope someone can help me get to the bottom of this, I've been so frustrated!  If there's any other code you need to see, just let me know.


What happens with ETF if underlying index changes rapidly in a short period of time?

Since public interest in ETF is growing rapidly, and any novice investor looking where to put their money would probably see recommendations to invest in ETF literally within the first page of the most naïve google search on the topic, I've been thinking under what circumstances that might become a bubble and what this bubble might look like. One scenario came up in my mind, and while being unlikely, it's theoretical possibility is still bothering me somewhat. It looks like the biggest risk in ETF is that it might blindly inflate stocks that happened to be part of the index, but belong to the companies that are not doing so well. If there are many companies like that, and their inflation is significant, the bubble might burst when conventional invertors notice these overpriced assets and dump them. The paradox of the index, say S&P500 is that it's abstract and wouldn't tank too much on its own, because 50 stale companies will be replaced by companies that were in positions 500-550 before. Like, after all, there always will be top 500 companies in the US. Even if they collapse overnight, the next day their position will be taken by another 500 companies. But what would happen to VOO over this night? Vanguard needs to sell those stock real fast and repurchase new stocks to reflect changes in index? Is it possible that gap between VOO and the S&P500 itself becomes very significant and unfixable? Can this theoretically happen?


Installing Ubuntu on Compaq Presario CQ 5210

I am trying to see if I can install Ubuntu 18.04 (or any other LTS version) in my old Compaq desktop. Here are the specs of the computer:    I went through the Ubuntu hardware certified website   ()  There was nothing on that website on Compaq, and when checking the HP computers, there were very few and none had the same motherboard as my desktop  I also installed a GT 730 (GPU) but that is a side question  Thank you for any help anyone can provide about this


mysql_insert_id alternative for postgresql

is there an alternative for mysql_insert_id() php function for PostgreSQL? Most of the frameworks are solving the problem partially by finding the current value of the sequence used in the ID. However, there are times that the primary key is not a serial column....


Redirect to HTTPS and subdirectory is visible

I am forcing HTTPS and redirecting to subdirectory with:  RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301]  RewriteCond %{HTTP_HOST} ^domain.com$ [NC,OR] RewriteCond %{HTTP_HOST} ^www.domain.com$ RewriteRule (.*) /www_domain_com/$1   and all is working, but http://www.domain.com. I see in browser address bar: https://www.domain.com/www_domain_com/.  My goal is to remove this subdirectory from url and have ssl in all requests and all requests redirected to that subdirectory.


Are the rationals a closed or open set in $\mathbb{R}$?

I have a feeling they are neither closed nor open as the $\mathbb{R} \setminus \mathbb{Q}$ cannot be open or closed either...


May I mention in my CV that I am a reviewer for a journal if I co-refereed?

Recently, a collaborator of mine received a paper to referee from a journal, and he proposed me that we review the paper together. When he submitted the report, he indicated to the journal that he reviewed the manuscript with me. Am I allowed to write in my CV that I am a reviewer for this journal?


I found the following problem in our problembook and I am clueless how to start     Transform to a fraction form:      $3.\overline{123}$   This is the first time I am trying to solve such a problem and I don't know how to start.  Could you please help me?  Thanks


Why doesn't Blender detect RTX 2060 with OpenCL?

Though the question was asked many times, I can't find explanation for Nvidia RTX 2060. Nvidia drivers got OpenCL support. I don't understand why Blender says no GPU detected to render cycles with OpenCL. Did blender drop OpenCL support in favour of CUDA?


I would like to know what exactly the term  means. It comes from electron scattering experiments which are used to deduce the charge distribution of a nucleus and the cross section is given as a function of the scattering angle. But I don't understand what it means.


Suppose that, $\lim\limits_{x\to x_0}f(x)$ and $\lim\limits_{x\to x_0}g(x)$ exist and $\lim\limits_{x\to x_0}g(x)\neq0$. Then, prove that $$\lim\limits_{x\to x_0}\frac{f(x)}{g(x)}=\frac{\lim\limits_{x\to x_0}f(x)}{\lim\limits_{x\to x_0}g(x)}$$


One to at most one relation or multiple null columns?

I have a table with many attributes that can be grouped in logical groups, and thus the idea of putting these attributes in separate tables seems attractive.  The logical groups don't represent entities themselves.  When one attribute in the group is set, most of the rest of the attributes in that group also must be set (but not all).  The fields's type of the groups generally are VARCHAR(15-20).  There's no BLOB or TEXT fields either.  The logical groups don't represent subtypes, because they aren't mutually exclusive.  The entity is requested more for reading than for writing.  Hence a large table looks appropriate.  Also, this way the joins are avoided in queries.  The part of this approach I don't like is the large number of nullable fields.   Looking for Expert advice.


Solving a contest problem related to Stone-Weierstrass theorem

Problem : Let $f$ be a real valued continuous function on $[-1,1]$, such that $f(x)=f(-x)$ for all $x \in [-1,1]$. Show that for every $\epsilon \gt 0$  there is a polynomial $p(x)$ with rational coefficients such that for every $x \in [-1,1]$, $$|f(x)-p(x^2)| \lt \epsilon$$.  This problem had appeared in ISI JRF exam, 2017.  I know that the set of polynomials with rational coefficients over $[-1,1]$ is dense in the set of real valued continuous functions on $[-1,1[$. So I'm directly using it here.  So for every $\epsilon \gt 0$ three exists a polynomial with rational coefficients $q(x)$ such that for all $ x \in [-1,1]$, $|f(x)-q(x)| \lt \epsilon$.  Since $f(x)=f(-x)$ for all $x \in [-1,1]$, we have $|f(x)-q(|x|)| \lt \epsilon$ for all $x \in [-1,1]$.  I am stuck here. What can be done next? Applying Stone-Weierstrass again to get $p$ as required? Thanks.


my App Store is broken for Mac High Sierra 10.13.5

I will click featured or something else and it automatically redirects me to updates.   What sequence of things can I try to unstick this or reset the application so I can browse the features and other sections of the Mac App Store?


How do i configure universal USB modems (e.g. iBall 3.5G Connect)

There is no user guide with this USB modem for linux installation and it is not detected automatically in Ubuntu 11.10. Help.


how to open usb drive on my virtualbox installed in ubuntu

I have Ubuntu 14 as host os. And I have installed VirtualBox inside ubuntu. Now as a guest OS i have installed windows 7. And i want to access USB drive inside this Guest windows 7.  please guide me to follow the steps.


I need compatible Ubuntu version no. to install on the following configuration  CPU P4- 512MB RAM   300 MHZ CLOCK FREQU


How to forbid a specific package to be installed?

Can I configure Ubuntu to never install a specific package even if it is required by another package I install?


Why Does Depth of Field Happen? Is there a simple explanation?

I think if our eyes are good there are not many situations where we naturally percieve a shallow DOF. How is it that lenses create this? What happens for shallow DOF to happen in photos and on movies?


Is there a way to review suggested edits, low quality posts, late answers, etc. through the Stack Exchange application?  If yes, please explain how.  If not, will this be considered as a feature request?  I am currently using the SE Android app.


Prove that there are no natural numbers to satisfy the equation.

Prove that there are no natural numbers to satisfy the equation: $a^2+b^2=3(c^2+d^2)$. I tried to factorize it: $a^2 + b^2 - 3 (c^2 + d^2)=0$  but I am not getting anywhere. I can't think of anything else!!


elementary proof that infinite primes quadratic residue modulo $p$

$p \gt 2$ is a prime, then  there are infinite primes $q$  such that $q$  is a quadratic residue modulo $p$.  With , the problem is  easy! How about  Without the use of the theorem? Can one find  an elementary proof?    p.s.  there are  several  elementary ways(without Dirichlet) to show that there are infinite primes $q$  such that $q$  is a quadratic non-residue modulo $p$  Proof 1  The least $q>0$ quadratic non-residue modulo $p$  is a prime . Consider   $$a_0=q, a_1=q+p,a_2=q+pa_1,a_3=q+pa_1a_2,\dotsc, a_n=q+pa_1a_2\dotsb a_{n-1},\dotsc $$ then $(a_i,a_j)=1$  Proof 2  Only $\dfrac{p-1}2$ quadratic non-residues modulo $p$, so there is a integer $a$ such that $(\dfrac{a^2+1}p)=-1$.   In not, only finite $q_1,q_2,\dotsc, q_n$. then there exists $k\in\Bbb Z$ such that $kq_1q_2\dotsb q_n \equiv a \pmod p$. Consider   $$ (kq_1q_2\dotsb q_n)^2 +1$$


Apache shows empty Index of even though there are files in /var/www/

Even though I have files placed in my var/www/ folder and apache2 is running, I don't get any files listed. Also I can't access any files directly and inserting an index.html file does nothing.  I'm on trusty 64


Bibliography in LaTeX: Spaces between words

I'm writing the bibliography. LaTeX don't write it well. I don't know why. I have tried the two methods: \begin{the bibliography} and using BiBTeX. The result is the same.  The result is longer spaces between some words.     Using the first method(without BibTeX). The first entry at the image is:  \bibitem{Stack1} Stack Overflow. \tit{Simple Bluetooth data receiver Android}. \url{http://stackoverflow.com/questions/9164138/simple-bluetooth-data-receiver-android}.   \tit{} is like \textit{}  I have written a small example:  \documentclass[12pt,a4paper]{book}  \usepackage[utf8]{inputenc}  \usepackage[left=1.8in,right=1.8in,top=0.6in,bottom=0.6in]{geometry}   \usepackage[pdftex,bookmarksnumbered,hidelinks,breaklinks]{hyperref}   \begin{document}  \begin{thebibliography}{99}  \bibitem{Dani} Daniel García. \textit{Activando y desactivando el bluetooth en Android}. \url{http://danielggarcia.wordpress.com/2013/10/19/bluetooth-i-activando-y-desactivando-el-bluetooth-en-android/}. \end{thebibliography}  \end{document}   And the result is


Check if object is NOT of type (!= equivalent for "IS") - C#

This works just fine:      protected void txtTest_Load(object sender, EventArgs e)     {         if (sender is TextBox) {...}      }   Is there a way to check if sender is NOT a TextBox, some kind of an equivalent of != for "is"?  Please, don't suggest moving the logic to ELSE{} :)


Find all the primes $p$ so that $$x^3+x \equiv 1 \pmod p \tag{1}$$ has integer solutions.   We consider $x$ and $y$ are the same solutions iff $x\equiv y \pmod p.$  We can prove that $(1)$ cannot have exactly $2$ solutions unless $p=31$. When $p=31$, the solutions of $(1)$ are $x \equiv {17\text{ (double), } 28} \pmod {31}.$  My question is: when does $(1)$ have no solution, and when does $(1)$ have $1$ solution and when does $(1)$ have $3$ solutions? (As Ma Ming has pointed out, an equation of degree $3$ has no more than $3$ solutions.)  I have proved that if $p \not = 31$, and $a$ is a solution of $(1)$, then $(1)$ has $3$ solutions iff  $$\left(\frac{a-1}{p} \right)=\left(\frac{a+3}{p} \right),$$ here $\left( \frac{a}{p} \right)$ is the Jacobi symbol. Thanks in advance!


How to permanently switch off discrete graphic card?

I got a integrated GD, which is Intel, and another discrete GD, AMD Radeon 6490 HD I am using ubuntu 11.10  1st, when I boot into Windows, my GD is indeed AMD Radeon 6490 HD, but when I boot into Ubuntu, it shows that I have AMD Radeon 6470 instead.  2nd, I try most methods only to install driver for my AMD/ATI graphic card. First by jockey(fail, boot with unity 2D instead) and install manually (fail, boot into blank screen).   3rd, I give up using the AMD/ATI graphic card. Then I got a new problem. Both my graphic cards are powered on on startup, which causes my laptop to over heat.   I view the content of /sys/kernel/debug/vgaswitcheroo/switch  0:DIS: :Pwr:0000:01:00.0 1:IGD:+:Pwr:0000:00:02.0   Then I switch off IGD using echo OFF > /sys/kernel/debug/vgaswitcheroo/switch and I get  0:DIS: :Off:0000:01:00.0 1:IGD:+:Pwr:0000:00:02.0   But after I reboot, the discrete graphic card is powered on again. How to solve this?


Using Use prepared statements and parameterized queries in PHP and MySQLi

I am learning how to use prepared statements in my simple login system to make it more secure.  I have followed a few different tutorials to get it working but cant get it to work. When i enter the username and password wrong it gives me the error. When i enter the username and password correct i still get the error.  What am i doing wrong?  I am new to this so apologies for any obvious errors.  I have also looked into hashing my password as it is being stored as plain text in the database at the moment but that will be my next step after i get this working.  Here is my code:  <?php  error_reporting(E_ALL); ini_set('display_errors', 1); session_start(); // Starting Session $error=''; // Variable To Store Error Message  if($SERVER['REQUESTMETHOD'] == 'POST') { if (empty($POST['username']) || empty($POST['password'])) {  $error = "Enter Username and Password";  }  else { // Define $username and $password $username = $_POST['username']; $password = $_POST['password'];  //connect to database include('dbconx.php');  }  $stmt = $con->prepare("SELECT * from admin where password=? AND username=?"); $stmt->bind_param('ss', $username, $password);  $stmt->execute(); $stmt->bind_result($id, $username, $password); $stmt->store_result(); if($stmt->num_rows == 1) //To check if the row exists {          $_SESSION['login_user'] = $username; // Initializing Session         header("location: confirm.php"); // Redirecting To Other Page      } else { $error = "Username or Password is incorrect"; }  mysqli_close($con); // Closing Connection }  ?>


How to delete Ubuntu and install fresh windows copy?

Long story short,i deleted my windows 8 genuine copy while trying to install ubuntu so i am left with ubuntu now.I would like to delete ubuntu and install the free windows 10 copy as i have lost my windows key.I have access to a usb. Can someone guide me,please.


Using coordinate system in ArcGIS Desktop?

I have a few layers. The layers have been made by a different company. So   How do I combine them all together so that they have the same coordinate systems?    I already add the layers, right click < Data frame properties < coordinate system. And select a coordinate system. But it shows the same.  The layers do not seem to overlap. (For example I pick a river layer at the same place, and I add a road layer also from the same place.) But they don't overlap.    Is it because the size of the layers are different?    Or is the coordinate system from map info is different from the beginning?


Full context from :  bash$ eval "`seq 10000 | sed -e 's/.*/export var&=ZZZZZZZZZZZZZZ/'`"   If it's just concatenation or something, comment instead of answering so I can delete. My testing seems to show that it's numbering the variable name itself somehow (nested within all three quotation types). Googling investigation didn't turn up results no matter how I escaped it because of the special character &.  var1=ZZZZZZZZZZZZZZ var2=ZZZZZZZZZZZZZZ var3=ZZZZZZZZZZZZZZ var4=ZZZZZZZZZZZZZZ var5=ZZZZZZZZZZZZZZ var6=ZZZZZZZZZZZZZZ var7=ZZZZZZZZZZZZZZ var8=ZZZZZZZZZZZZZZ var9=ZZZZZZZZZZZZZZ var10=ZZZZZZZZZZZZZZ


How to calculate Total Rows Size of a table

How can I calculate Size of a table.   Example:  CREATE TABLE EMPLOYEE_INFO ( EMP_ID INT, EMP_FNAME VARCHAR (30), EMP_LNAME VARCHAR (40), EMP_CNTRY CHAR(40), EMP_Age tintyint, EMP_SAL BIGINT )


Old docs-beta meta appears as unknown site in android app

Back in the day, when SO Documentation was in its beta phases and had its own meta site, I registered and added it to my sites on the android app. I just noticed it appears as "Unknown Site docs-beta":         I'm guessing the same behavior would reproduce with any closed site (such as failed betas), although I can't think of a way to test this theory at the moment.  System details:   App version: 1.0.89 Android version: 5.1.1 Phone model: Nexus 4   P.S. IMHO, this is a bug report on the android app, not a documentation specific question. If the mods, disagree, please migrate it to MSO.


Accessing static member externally and through inheritance c++

I have a class that houses a ID3D11Device member that I'd like to make static, since for now, I want the ID3D11Deviceto be accessed by multiple Entity class instances. The problem is, I'm unable to access the Direct3D class, housing the ID3D11Device static member outside of it's object without directly instantiating the Direct3D class.  Since multiple classes inherit from the Direct3D class (Which in turn inherits from a WindowsClass for hwnd detail), I'd like to keep it as a base class, as to keep access with all classes inheriting from Direct3D as this example proposes:  class Direct3D: WindowsClass{ public:     Direct3D();     ~Direct3D();      static ID3D11Device* Device; }   And an inherited class:  class EntityType: Direct3D{ public:     EntityType();     ~EntityType();      void SomeDeviceDependentFunction(); }   Where the member is defined as:  void EntityType::SomeDeviceDependentFunction(){ //Perform some action calling Direct3D::Device.  }   Note that the class Direct3D is defined in Direct3D.h, EntityType is defined in EntityType.h, and so on. So everything looks gravy in concept until I go to compile and receive the dreaded error:  Error  52  error LNK2001: unresolved external symbol "public: static struct ID3D11Device * Direct3d::Device" (?Device@Direct3d@@2PAUID3D11Device@@A)   C:\Us...tions.obj   Win32Project1  And:  Error  40  error LNK2005: "class std::vector<struct IndexVertexKey,class std::allocator<struct IndexVertexKey> > Geometry" (?Geometry@@3V?$vector@UIndexVertexKey@@V?$allocator@UIndexVertexKey@@@std@@@std@@A) already defined in D3DPipeline.obj C:\Use...nagement.obj   Win32Project1  (Please note that the compile errors here do not relate directly to the examples given above, but are caused by them.)  To summarize, how can I control inherited classes where they are loosely coupled, (object to object) or where I can reference includes safely without dying of cross-references?


Bash script to take screenshot and save the image - Ubuntu

I wrote a bash script as below:  #!/bin/bash echo "Enter a file name" read filename import -window root $HOME/Desktop/$filename.png   I expected this script to take a screen shot and save the image with the given filename on my desktop.  Problem:  My Ubuntu terminal is giving error:     import: Command Not Found


Description-like environment with fixed labels width

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


I want maximum one citation name in my text. Therefore I used the option maxcitenames=1 in the biblatex package. This works for all my references except for two: verdonck2009 and verdonck2011. I am not sure whether this is because the author name is the same or because of some other reason. I have put a MWE example below together with my bibtex references. The result of the MWE example is added in the image at the bottom. As you can see it uses only one citation name, except for verdonck2009 and verdonck2011. Any ideas on how this can be solved?  \documentclass[a4paper,12pt,oneside]{book} \usepackage[backend=biber, natbib=true, style=authoryear, maxcitenames=1, maxbibnames=99]{biblatex} \addbibresource{bib/literature.bib}  \begin{document}  In \citet{verdonck2009}, \citet{verdonck2011}, \citet{kaas2008} and \citet{england2002} is stated that...  \printbibliography \end{document}  @article{verdonck2009, title={A robustification of the chain-ladder method}, author={Verdonck, T and Van Wouwe, M and Dhaene, J}, journal={North American Actuarial Journal}, volume={13}, number={2}, pages={280--298}, year={2009}, publisher={Taylor \& Francis} }  @article{england2002, title={Stochastic claims reserving in general insurance}, author={England, P  and Verrall, R}, journal={British Actuarial Journal}, volume={8}, number={03}, pages={443--518}, year={2002}, publisher={Cambridge Univ Press} }  @article{verdonck2011, title={The influence of individual claims on the chain-ladder estimates: Analysis and diagnostic tool}, author={Verdonck, T and Debruyne, M}, journal={Insurance: Mathematics and Economics}, volume={48}, number={1}, pages={85--98}, year={2011}, publisher={Elsevier} }  @book{kaas2008, title={Modern actuarial risk theory: using R}, author={Kaas, R and Goovaerts, M and Dhaene, J and Denuit, M}, volume={128}, year={2008}, publisher={Springer Science \& Business Media} }


Why does logging out log you out EVERYWHERE?

I am always logged into StackOverflow and a few other Stack Exchange sites on my computer and iPhone. However, when I go to school, I may need to login on the school's computers to do something.  After completing what I needed to do, I will logout. The message on the logout page states that it is a global logout. At first, I thought this meant that it would just log out all your Stack Exchange profiles from the computer. Unbeknownst to me, it actually logs you out everywhere, even on my home computer and iPhone!  Can we change this or clarify the message?


How to Recover Lost Media Files (Photos, Music, etc) from iPhone 6 Device

Do you know how to recover media files from iPhone 6? I lost my photos and music by some accident.


I was trying to search in man find, and I would like to know what's going on.  $ man find | grep Like              Like -lname, but the match is case insensitive.  This is a GNU              Like -name, but the match is case insensitive.              Like -path, but the match is case insensitive.              Like -regex, but the match is case insensitive.              Like -name, but the contents of the symbolic link are matched $ man find | grep "\-name"      find / \! -name "*.c" -print      find /usr/src -name CVS -prune -o -depth +6 -print      find /usr/src -name CVS -prune -o -mindepth 7 -print $ man find | grep "name,"              and there is no such group name, then gname is treated as a group              and there is no such user name, then uname is treated as a user   What's going on? How come I can see lines that contain -name, but I don't get those results if I search for -name or name, and why does that show different things? I imagine it has to do with some “metadata” in man page not shown in the terminal, but I don't know.


All figures are showing up as a solid black rectangle

I am working on a TeX project. I can compile everything without error nor warnings. However, all of my figures are showing up as a solid black rectangle. Does anyone have a clue of what might be going on?  I have all the figures with the correct filenames at the project folder.  Minimal working code:  \begin{figure}[h!]     \centering      \includegraphics[width=6cm]{fig3.png}     \caption{Something goes here}\label{fig3} \end{figure}


how to copy all properties and methods of an object in javascript?

I have read  and I know how to copy properties from the object. But I not only want to copy object's properties but I also want the copied object to have all the methods as the parent object had and I am not able to figure out how: Here is what's happening: var obj = {     'firstname' : "Harsh",        // <<< Parent object     'lastnmae'  : "singh",      introduce() {         console.log("Hello I am " + this.firstname);     } }  var objCopy = JSON.parse(JSON.stringify(obj));   // deep copying the parent object  obj.introduce();  // << works fine when called on the parent object objCopy.introduce(); // << does not work                      // but I thought objCopy is the copy of obj ???  EDIT: I don't want shallow copying , I want a deep copy of the object. Most methods that I have come across copy only properties and not functions. I have gone through other articles but haven't found any answers.


Is it always possible to define energy of a system?

Does the concept of energy always exist for any physical system?  If yes is there a proof?  If no, any counterexamples?


What if there is more than one judgement? eg.  comfortable, cheap armchair bright sunny day  can we say,  cheap, comfortable armchair sunny bright day  Can the order be changed?


What can I use to measure the bandwidth a specific Windows application uses?

Ideally, I'd like to hear of an application to show how much bandwidth each application is consuming on my local Windows PC. Alternatively, instructions to use any other application for this purpose. The simpler the better. Something that works for Windows 2000/XP/Vista/7 (if possible).  Any ideas? Thanks.


I am beginning to explore Ubuntu as a new user.  I am running Ubuntu 18.04.1 LTS from a flash drive. In attempting to install software that was not already bundled in the Ubuntu download I read on this forum that I should use the command line of the terminal to install the Synaptic package manager. I entered the command  sudo apt-get install synaptic    but I get the following responses:  Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package Synaptic   What do I need to do to be able to install widely used open source software apps that are not the defaults in this download of Ubuntu?


What art exists about classification of monoids?

For groups, there is a solid foundation to classify them  What art exists for monoids?


After Revenge of the Sith when Luke and Leia are born, they are hidden so that Darth Vader, their father, won’t find them. But, they changed Leia's last name because she was adopted by Senator Organa and his wife so they changed hers to Leia Organa. I know that Luke was adopted by his aunt and uncle but still, why wouldn’t they change his last name? Skywalker wasn’t a very common name then so if Vader ever heard of a Skywalker living on Tatooine, he would most likely suspect something. So why not change Luke’s last name so that all of any suspicion could be avoided?


Completely securely deleting a single file

My impression is that, if one wishes to be able to delete a certain file completely, without wiping an entire drive, one should never store it on an SSD.  Is that right?  Even with whole-disk-encryption, if the key is obtained, there seems to be no way to be sure forensic methods couldn't recover the file, short of issuing a firmware wipe command to the drive AND filling all of it with non-data (since the firmware command can't generally be relied on).  So, if one wants the ability to delete something completely securely, and not the entire drive it's stored on, one should only store it on HDDs and USB sticks.  Right?


How to determine if installing updates will require a reboot?

I have some Ubuntu Server machines which I'd like to keep up-to-date, but not always if it requires a reboot.  Is there a way to tell if pending package updates require a reboot BEFORE installing the packages?


Can any 2x2 matrix be written like sum of two squared matrices?

How to prove that for any $A$ is a $2\times2$ matrix with real elements exist $B$ and $C$ so that $A=B^2+C^2$? So far, I used Cayley-Hamilton theorem and I have: $A =$ $\frac{1}{Tr(A)}A^2 + \frac{det(A)}{Tr(A)}I_n$. I know that I need a positive trace, so I choose $A_1 = A + tI_n$ and $\lim_{t\to∞}(A + tI_n) = \infty$


What is the purpose of a pull-up resistor in a microcontroller?

I'm reading about the AVR microcontroller. In a chapter on I/O ports I've stumbled accross a concept that I have trouble understanding: the pull-up resistor.  Here is a quote from the textbook:     PORT register role in inputting data:      There is a pull-up resistor for each of the AVR pins. If we put s into bits of the PORTx register, the pull-up resistors are activated. In cases in which nothing is connected to the pin or the connected devices have high impedance, the resistor pulls up the pin. See figure 4-4. If we put 0s into the bits of the PORTx register, the pull-up resistor is inactive.   And the associated diagram:    Now, bear with me; it is my understanding that we control the data direction of the ports by writing 1s or 0s in the DDRx register. So if I want to read data from a port I clear the DDRx register (0s) and get my data from the PINx register. Conversely, if I want to write data I set the DDRx register (1s) and write to the PORTx register.  Okay? So the book gives assembly-code examples of how we activate the pull-up resistors of a port. We do this by writing to the PORTx register without setting the DDRx!  What is the function or desired effect of doing this? It is not clear to me, even after having read half of the book.


Converting int array to String array in java

Hello i want to convert int Array into Required Format.  i have int array and how to convert it ? i want this String format  int a = [1,2,3,4] list a = [1,2,3,4] String = ["1","2","3"];


install 13.04 from usb on dell inspiron 600m

I am trying to boot from a usb drive.  I created the usb on an ACER running Win 7 Home premium.  I used the ubuntu-13.04-desktop-1386 using the universal USB installer.  I am trying to install on a Dell inspiron 600m.  When I try to boot, I get a message "SYSLINUX 4.06 EDD 2012-10-23 copyright (C) 1994-2012 H. Peter Anvin et al" The next line has a blinking underscore.  It will not allow me to enter anything.  What do I do? Did I try to use the wrong version Linux? If so, what should I use?    I don't care which version from 12.04 - 13.04 I load.  I couldeven use an earlier version if it will work.  I just want it to boot, so I can install linux as the only OS on this machine.


How to make so that page will have no number in latex? I mean for example if i dont want first page to have number "1" under


Can a PC with the Alert feat alert his friends?

Assume the following situation: The party has been surprised by an ambush. Every PC is surprised except PC Bob because he has the Alert feat. Thanks to his high initiative bonus Bob gets to go first. He shouts "look out" to alert his party members of the imminent threat. The idea is that his party members are no longer surprised because he warned them.   While I think that this makes sense from a storytelling perspective, I am afraid this would be too strong. as it allows one PC with the Alert feat to give the "not surprised" benefit to other members of his party pretty much for free.  Is this allowed? Are there rules or an official ruling or similar on this?  If not, do you have any experience with this situation, and how did it play out in your games?


Where are some good sites I can find for free action RPGs?

I really like to role-play online with people, but I only have a few people I know who role-play, and I wanted to know if there were any forum sites that are solely for role-playing and having fun.


Any way to open windows from the windows bar using a shortcut? for example to open the first window on the left Ctrl+1, to open the second window on the left Ctrl+2.  Im using xfce4 at this moment, but if under xfce4 is not possible, is there any other desktop environment that permits this?  Since I have several windows open for the same application, I not searching for sortcuts related to the application but as I say below, to the window.


My solution:   1) $ cl(A) \subseteq  cl(cl(A))$  let $x \in cl(cl(A))$ by definition $U_x \cap cl(A) \neq \varnothing $ $ \forall U_x \in Tau$  such that $x\in U_x $ .Thus $x \in cl(cl(A))$ $cl(A) \subseteq cl(cl(A))$ Is it true? And how prove other side.


It seems that you cannot delete an answer from the iOS app.  Is this be design or overlooked?  For the benefit of those with the privileges heres a post I needed to delete:


Value of $a$ such that $ax^2-4x+9$ has integer roots

The question is to find out the value of $a$ such that $ax^2-4x+9=0$ has integer roots.  If $a$ is 1 then the roots if they are rational are integers.But the discriminant in such case is -ve so $a\neq 1$ Similarly by rational root theorem $a \neq -1$ So $a$ must be a fraction of the form $1/b$ such that $b$ is a integer. Now the condition of the equation $x^2-4bx+9b$ to have rational roots and thereby integers because the leading coefficient is unity is that its discriminant must be a perfect square.so $16b^2-36b$ is a perfect square.I couldn't get how to determine $b$ from this.Any ideas?Thanks   This link  doesn't have the attempt in which I am unable to proceed.


Create Unix Named Socket from the Command Line

Is there a command similar to mkfifo but for domain sockets?


How do I check the status of my drivers and install them if needed?

I'm trying to learn how to use Ubuntu, but I must say I didn't have half as many issues with 16 as I have had with 18.04  I'm using a laptop and I'm at a beginner-level. (But I'm willing to learn) And basically I'm having a lot of lag, and perhaps I don't have the correct drivers.   I'd need an easy command to pull up my system info, and then run a check on my drivers and download what's needed.  Proc: AMD e1-1200 APU with Radeon HD graphics x2, Mem: 3.5m total, 1.7g used, 651m free, Swap: 3.6g total, 29m used, 3.6g free  CPU MHz:             778.147, CPU max MHz:         1400.0000, CPU min MHz:         777.0000


jquery function not working inside second document ready

This is a very strange issue that is confusing me completely. I will paste the whole code just to make sure nothing is missed.     echo "                                  ";   and right below that:                  echo "                                  ";   this returns Uncaught ReferenceError: notice is not defined  if I run notice() in the above (commented) part, it works. How this makes sense?  Ok, let me rephrase a question - how is this ($(function() {) a different scope? What would be the right code to call this function afterwards?


The following was introduced to me in class as «an old theorem, almost forgotten, by an old mathematician, Cesàro, 1960».  Theorem  Suppose $\{a_n\}$ is a real sequence. Set:  $$A_n=\frac{1}{n+1}\sum_{k=1}^na_k.$$  Then:  $$\liminf_na_n\leq\liminf_NA_N\leq\limsup_NA_N\leq\limsup_na_n.$$  I tried googling for it, but was unable to find it. I cannot seem to be able to prove it myself. How would I go about this?


I want to take a floating point number in C++, like 2.25125, and a int array filled with the binary value that is used to store the float in memory (IEEE 754).  So I could take a number, and end up with a int num[16] array with the binary value of the float: num[0] would be 1 num[1] would be 1 num[2] would be 0 num[3] would be 1 and so on...  Putting an int into an array isn't difficult, just the process of getting the binary value of a float is where I'm stuck. Can you just read the binary in the memory that the float variable? If not, how could I go about doing this in C++?  EDIT: The reason for doing the comparison this way is that I am wanting to learn to do bitwise operations in C++.


How much is the average cost of 1 hour of graphic design in Miami, FL USA?

I have a potential client from USA, and I live in another country. I would like to know (an average price in dollars), how much a graphic/web designer would charge per hour for maintaining the website (the website is already done). I hope you can help me!   Regards!


Install Ubuntu alongside Windows (legacy mode)

I want to install Ubuntu 14.04 alongside Windows 8.1. My computer works only with Legacy mode (can't boot Windows when switched to UEFI).   When I boot from usb with Ubuntu it says "This computer currently has no detected operating systems".  How should I proceed to install Ubuntu with Windows?


Find a universe and a predicate that satisfy the following formula

Consider the formula F =∀x ∃y ∃z (¬(x=y) ∧ ¬P(x,y) ∧ ¬(x=z) ∧ P(x,z)). I have to find a universe $U$ which cardinality is given by n, while n >= 3. Furthermore I should find a predicate $P: U^{2} \rightarrow \{0,1\} $ which satisfies the given formula F. The universe should be defined in terms of n, meaning that if I would tell you n = 5 everything should work. I tried several  things but don't understand how to define this universe in terms of n.


"Happy for you are improving"—grammatically correct?

Is it correct to say I am happy for you are improving! or does it necessarily have to be with that, as in here: I am happy that you are improving! ?


how can i fix "errors were encounterd while processing: mmodemanager whoopsie

I am using an Ubuntu 13.10 image on my android and I cant seem to install the Ubuntu gnome desktop.  Device information:  - Sony Xperia S (LT26I  - Arm-V7  - Snapdragon S3 1.83ghz  - Adreno 220 GPU  - four Armhf cpus  Ubuntu Information:  - Linux 3.40 Kernel  - version 13.10  envi@ubuntu:~$ adb shell * daemon not running. starting it now on port 5037 * * daemon started successfully * shell@android:/ $ su root@android:/ # linux shell Starting Shell as root@localhost root@localhost:/# sudo apt-get install gnome-shell ubuntu-gnome-desktop Reading package lists... Done Building dependency tree        Reading state information... Done gnome-shell is already the newesshell startingt version. ubuntu-gnome-desktop is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 2 not fully installed or removed. Need to get 0 B/300 kB of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y dpkg: error processing modemmanager (--configure):  Package is in a very bad inconsistent state - you should  reinstall it before attempting configuration. Setting up whoopsie (0.2.24.1) ... invoke-rc.d: unknown initscript, /etc/init.d/whoopsie not found. dpkg: error processing whoopsie (--configure):  subprocess installed post-installation script returned error exit status 100 Errors were encountered while processing:  modemmanager  whoopsie E: Sub-process /usr/bin/dpkg returned an error code (1)


Number of lines in double spacing (compared to Word)

I am a newbie to LaTeX. I noticed that my document is almost a page longer in Word compared to LaTeX. (~7.25 in latex, ~8.25 in Word). This seems to be because my Word document has 23 lines per page, where my LaTeX document has 27. I think the margins are the same (I set them to be, but haven't measured them).  The beginning of my document looks like this:  \documentclass[12pt]{article} \usepackage[margin=1.25in,top=1in,bottom=1in]{geometry} \usepackage{textcomp} \usepackage{setspace} \doublespacing   ...and that's pretty much all the formatting I have.  Is the default "double spacing" in LaTeX/setspace smaller than Word? How can I manually adjust this (in LaTeX)?


'If he did respect' is possible in the second conditional

He is not a popular teacher. He does not respect students. He  would be   a popular teacher if he respected students.   One of my students wrote:     If he did respect students he would be~.   Have you seen this? I haven't. What do you think?


Is it proper to cite something when using it just as an example?

In academic writing, is it proper to cite something to provide it as an example of something else? For instance, we have lines like this in a number of our papers:     Many research endeavors, including environmental and coastal hazard prediction [1], climate modeling [2], high-energy physics simulations [3,4], and genome mapping [5] generate large data volumes on a yearly basis.   Each citation is merely providing an example of a research project that generates large volumes of data (more often than not, it's not even a paper, just a URL), and content from the cited source is not otherwise used anywhere in the paper.   I suppose I tend to think of citations as references to work whose content contributes to a significant portion of content in the paper. A citation then indicates some kind of "weighty" relation between the paper and the thing being cited. In the example I provided, it seems to me that invoking the "weighty" power of citation simply to say "yes, such a data producing project of this type does in fact exist, in case you were wondering"--and doing so five times--is somewhat excessive and that it might serve better as a footmark.  To me it seems these should either be footnotes or just be left out. In any case, it seems they should not go in the bibliography.


For a point data set with temperature data I have, I want to create their Thiessen Polygons in R. So far, the only algorithm I have found is that of Carson Farmer (). I would like to know if there is a ready to use function that creates Thiessn Polygons?