Changing the default ANSI to UTF-8 in Notepad

I got an e-book reader a few months ago, and I finally figured out why it doesn't display .txt files correctly. It doesn't like ANSI. It has no problem with the other 3 types of coding notepad provides.    For a reason I chose UTF-8 and decoded all the .txt files I have on it (we are talking thousands of small but important documents). They work correctly and now I pay attention to save in UTF-8, but I know myself, I know that at some point I will forget it, and save in the default ANSI.  So the question after the small novel: Is there any way to change the default coding when saving a newly opened notepad? (Win 7)    I know about the way to change the default when opening a previously created .txt file but it's a pain to always create the new document first.


How to manipulate data coming from Apex in LWC?

I am learning LWC(newbie). I have the below situation where I want to add one additional property to an Object.   I am wiring an Apex method as below and inside loop, I am trying to add one additional property to all Contacts. Going through the Docs, I came to know that the Object is read-only.    JS File :  import { LightningElement, api, wire } from 'lwc'; import allContacts from '@salesforce/apex/contactAuraService.getAllContacts';  export default class TestPopover extends LightningElement {     @api contacts;      @wire(allContacts)     cons({error, data}) {         if(data) {             this.contacts = data;             this.error = undefined;             //alert('data = '+JSON.stringify(this.contacts));             for(let i=0; i<this.contacts.length; i++) {                  Object.defineProperty(this.contacts[i], 'short', {                     value : this.contacts[i].Level__c.charAt(0)                 })             }         }         else if(error) {             this.contacts = undefined;             this.error = error;             alert('In error');         }     }  }   Please help how do I add this additional property to each contact. This is my first question in here. Please excuse if anything is unclear, I will try to edit it again as required.  Thanks, Lokesh


Largest determinant possible of n by n matrix?

If each entry of a three by three matrix can either be a 0 or a 5, what is the largest determinant possible?


Is something wrong with StackOverflow's spam filter? Recently there have been huge numbers of spam topics related to football streaming. They have all been spam flagged and deleted but there are more getting posted all the time, I just flagged another 6 or so a few minutes ago. This has been going on for around 3 days now with these topics getting constantly posted over and over again in the  tag.


Is disabling an app functionally similar to unistalling it?

I don't know much about how apk and apps in android work. Title says it all. In my specific case, I installed icon packs from a playstore app to be used along with Nova Launcher. Now I want to get rid of the app that provided the icons pack (it is occupying space). I disabled it with pm disble .. command. And the icons aren't gone. So, I guess, I'd be fine if I delted the app as well. but I am not sure.   So, does uninstalling an app does more messing with the system than uninstalling it does?


How do I get to Orgrimmar from Silvermoon City at level 11?

I have a level 11 Blood Elf and want to spend some of my honor points. I've heard that I could spend them in Orgrimmar, but the only problem is getting there.  How do I get to Orgrimmar from Silvermoon City? I'm not in a level 25 guild, so nobody can teleport me there. :(


How did this person gain possession of the Infinity Stones?

In the final fight with Thanos, Tony Stark has a struggle with Thanos to get the gauntlet off him. Later it is shown that the stones are now with Tony on his suit.  The question is, how did he get it off the gauntlet and onto his suit?


Can I upgrade my BIOS(LENOVO DPK21A) to UEFI?

I have a Lenovo Ideacentre K330B running Windows 10 Home and I want to change it's BIOS to UEFI. It has a Lenovo motherboard. Here are some specs -    BIOS Version/Date: "LENOVO DPK21A, 8/8/2011" Bios Mode: Legacy   I've been searching around the internet for a straightforward way to do this but haven't had any luck. Any tips?


I have an array of String, and the items are like : 02:11, 11:12.. I want to delete the 0 in first position.  if (orari[i].substring(0,0) == "0") {    orari[i] = orari[i].substring(1,4); }   It doesn't work, why?


I left India on 8th October 2014 and started working in USA from 13th Oct 2014. For my income in India, my employer deducted tax at source (Rs 30,000). In US too, my employer deducted tax at source but I filed for extension for income tax. Now that I have fulfilled substantial presence test in US, I am filing the return as Resident Alien for 2014 (I have never been to US before and I am on H1B). So the questions:   Should I declare India's income while filing tax return for US for Calendar year 2014? In India, if I declare that I didn't work after October, I'll get 100% tax refund as my income will be below tax bracket (after deductions like 80C etc). So I think that is not correct. How to know the amount of tax I have to pay in India? Do I have to declare my US income there?   I don't have any other income from any sources in India.


Allow deselecting a message by tapping them again

It's great that we can access more options by tapping on a message. But what about a tap-to-deselect? At the moment, we have to press the close button on the top left of the screen.  Advantages:   Seems intuitive to me. I keep trying to do it! Easier for one-handed operation for right-handed people.   Disadvantages:


How do I create a container which sits directly in the middle of the page and zooms

I am currently working on a small little personal project which is just a simple page which displays the total amount of COVID-19 cases. I am quite new to HTML and CSS and was just wondering what the best way is to put these items in a container and directly centre them both horizontally and vertically. I have looked around quite a bit and have been unable to find what I am looking for. This is the current code that I am using

        I know that I am going to want to put the div container tags around the start and end of the script command. Any help would be greatly appreciated.


Bug report: comment form's data-placeholdertext attribute text is not HTML-escaped

From the HTML:  <form id="add-comment-17854275" data-placeholdertext="Use comments to ask for more information or suggest improvements. Avoid comments like "+1" or "thanks"."></form>	   The quotes surrounding "+1" and "thanks" should be escaped to &quot;.


I am a vegetarian. I am a meaterarian.     Is 'meaterarian' the opposite of 'vegetarian'? Do you have proper expressions for people who like eating meat a lot or who eat meat alone?


How did Google find my unlinked newly created pages?

I am building a new site, but creating the content using a subdirectory on an existing site. I have never posted a link to this subdirectory anywhere, yet searching Google reveals that Google has found these pages on my site and indexed them.  Further, I updated the site with a robots.txt file that WMT reports as being read, and testing the blocked pages using the WMT test tool indicates that the pages will not be indexed. Apparently this does not remove the pages from existing results, though I submitted a request to do so.  How did Google find these pages to begin with? Is it because I used a common subdirectory name and Google guesses at common subdirectories?


Where does $HOME variable comes from and why I can't change it?

I know this is stupid, but last 30 minutes I am trying to change $HOME variable to other value, doing $Env:HOME = "desired value" did nothing for me, I tried couple other suggestions from the first 10 results from Google and not I am actually stuck, hence asking this rather stupid question.  Here is why I want to change it. I gave my laptop to our IT's because my hard disk broke and I had to replace it with new one, so I wanted them to install me fresh Windows image which they did, but then they put for a user name that is stupid and I want to replace.  I searched in internet and saw that changing actually the name of user is not an easy job, so I've decided to create new and move slowly to it. What do I mean move slowly to him? - all my apps currently are working with the previous user (C:\Users\annoyingUser) installing\storing everything there which I would like to change.   Then I noticed that $HOME is referring to C:\Users\annoyingUser and I presume a lot of applications use this variable so I've decided to change it value, but with no success so far.  tl;dr; Can you guys help me change its value, seems like I am missing something?  Things I've tried so far in powershell:   $Env:HOME = "C:\Users\DesiredUser" Noticed that I don't have such variable(hence asking where $HOME comes from since when I use it in the terminal everything looks fine)  in environment variables window so I've added one for the user and one system. - didn't work either way. [Environment]::SetEnvironmentVariable("HOME","C:\Users\DesiredUser")


I understand that in "saturation mode", a BJT functions as a simple switch. I've used this before driving LEDs, but I'm not sure I understand clearly how I got the transistor into that state.  Does a BJT become saturated by raising Vbe above a certain threshold? I doubt this, because BJTs, as I understand them, are current-controlled, not voltage-controlled.  Does a BJT become saturated by allowing Ib to go over a certain threshold? If so, does this threshold depend on the "load" that is connected to the collector? Is a transistor saturated simply because Ib is high enough that the beta of the transistor is no longer the limiting factor in Ic?


Formula for the expectation $E|X|=\int_{0}^{\infty} P[|X|>t] dt$

I wonder why $E|X|=\int_{0}^{\infty} P[|X|>t] dt$. X is a positive random variable with density $f_X$  What I have done so far $$\int_{0}^{\infty} P[|X|>t] dt = \int_{0}^{\infty} \int_{t}^{\infty} f_X (y) dy dt =  \int_{0}^{\infty} \int_{0}^{y} f_X (y) dt dy $$  From there, I am not sure how to proceed.  Thanks in advance!


Let a, b, c be integers with at most one of the three equal to 0. Prove that if gcd(a,c)=1, then gcd(ab,c)=gcd(b,c).

So far I have two strategies in mind for proving this:  1) Bezout’s Identity:  ax+cy=1 --> bax+bcy=b ==> gcd(ab,bc)=b  2)Properties of Prime numbers: if gcd(a,c)=1, then a and c do not share any prime factors   Both ideas have left me at a dead end


I have trouble reading the following simplex heatmap.    Description of the figure: Consider a three-label classification problem. Simplex corners indicate where one label has very high probability, with the opposite edge showing the probability range for the other two classes when that label has very low probability. Simplex centers represent a uniform posterior distribution.  I understand that the three sides are analogous to three axes (one for each label), and that, say, at the bottom-right vertex, the probability of one label is 1 while the probability of others is 0. However, I can't figure out how to interpret a point in the interior or on an edge of the simplex. For example, what are the values of the three probabilities for a point on the mid-point of the left edge, or for the point at the intersection of the dotted line originating at 0.2 on base and that originating at 0.8 on the left edge.  My failure to visualize this representation seems to be stemmed from the fact that 3-dimensional data is represented in 2 dimensions, that too with non-orthogonal axes.  Image taken from   P.S. For now, ignore the actual heatmap (i.e. the intensity of color at some point). Also, I am not sure if this question should be asked here or at Maths-StackExchange


I am planning to do a study that uses binary dependent variable, such as a person is either in the labour force or not in the labour force. The function will have independent variables, for example age, gender, etc. It will based on primary data with more than 100 sample units. Should I use logit model or probit model?


Anyone help give a counterexample when $\inf_{x∈X}(\sup_{y∈Y}F(x,y) )\le \sup_{y∈Y}(\inf_{x∈X}F(x,y) )$ is false

Let $F(x,y)$ be a $X\times Y \to \Bbb R$ function and $X,Y$ are subsets in $\Bbb R^n$, anyone help give a counterexample when $\inf_{x∈X}(\sup_{y∈Y}F(x,y) )\le \sup_{y∈Y}(\inf_{x∈X}F(x,y) )$ is false?    PS: The other direction is true because


Negating ")" inside a regex search pattern

I'm trying to use regex in python to replace strings. I'd like to replace "SERVERS)" with "SERV" in a string.  example_String = "This is a great SERVERS)"  re.sub("SERVERS)","SERV", example_String)   I expected it to be a straight forward swap, but as I read more into the error, it looks like I need to set the regex pattern to read the ")" as a regular character and not a special regex character.   I'm not very familiar with regex , and would appreciate the help!  Edit : I'm importing data from a database (which is user input), there's quite a few similar issues as mentioned in the question.  re.escape() fits the bill perfectly , thanks!


Find the most general harmonic function of the form $f(|z|), z \in \mathbb{C} \smallsetminus {0} $. I know that harmonic functions satisfy: $$  \frac {\partial^{2} f} {\partial x^{2}} + \frac {\partial^{2} f} {\partial y^{2}} = 0  $$ But, how do I use this to derive the most general harmonic function? For many of these questions, usually, a form like $az^{2} + bz +c $ is given. Can anyone give me some hints?


Builder pattern, templates and nested class

I'm trying to develop a nested builder class in C++, but I keep getting this "invalid use of incomplete type 'class Npc::Builder<'T>" error. I've searched a lot and I couldn't find an answer. Can anyone help me, please?  Here's my code:  Npc.h class Npc{      ...     template<class T, class enable_if<is_base_of<Npc, T>::value>::type* = nullptr>     class Builder{      private:         T* instance;      public:         Npc::Builder<T>* create();         Npc::Builder<T>* name(string name);         Npc::Builder<T>* charClass(string charClass);         Npc::Builder<T>* hp(int hp);         Npc::Builder<T>* mana(int mana);         Npc::Builder<T>* attackPower(int attackPower);         Npc::Builder<T>* magicPower(int magicPower);         Npc::Builder<T>* defense(int defense);         Npc::Builder<T>* magicDefense(int magicDefense);         T* build();     }; };   Npc.cpp ... template<class T, class enable_if<is_base_of<Npc, T>::value>::type* = nullptr> Npc::Builder<T>* Npc::Builder<T>::create() {    ... }  main.cpp ... Npc::Builder<Warrior>* builder = new Npc::Builder<Warrior>(); ...   Thanks!


How to export polygon coordinates to CSV (not WKT)?

I am trying to export polygon coordinates from a shapefile to a CSV file, but so far all my attempts have failed. I have found numerous questions and answers about this, but none have solved my problem.   I have downloaded the file   www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_0_countries.zip  which is a shapefile containing a basic world map. I have imported the shapefile into QGIS by adding a vector layer, and then I try to export the polygons with coordinates for each country. The tips that I have found suggest either saving the layer by right-clicking it and then selecting Save as or opening the attribute table and copying it into Excel. If I try these I only get master information with one row for each country in the map.   Does anyone know how I can retrieve detail information for each country containing the polygons with coordinates?


I found this in some notes from a course in number theory. How do i work to solve this?


How do I make a window bigger than my screen?

I want to resize my web browser to be a higher resolution than my screen.  I remember being able to do this in Windows 95 by setting the desktop resolution higher than the monitor resolution. How can I do it in Ubuntu?


How do I hide the icon for a mounted volume from the dock on Ubuntu 19.10 and later?

I just upgraded from Ubuntu 19.04 to Ubuntu 19.10. This made that my second internal HDD show up in the launcher bar or Ubuntu Dock, which it did not before.  I read that I should mount it to /mnt instead of /media, but this device was auto-mounted years ago (I believe in Ubuntu 16.04 or so) and I have a lot of symlinks and other references to the path in /media already.  How can I remove the icon from the dock without unmounting it or having to mount it to a different location? I can not even move it to another location on the bar.


is related, but different. Here I'm asking if there is a paradox and if my attempt at resolution has merit, and if not where exactly does it fail. Attempt at resolution poses a scenario in which motion of the lab frame is safely assumed to be zero and inertial.    The Earth rotates a full cycle every 24 hours. Alhpa Centauri is 4 light years away. The Newtonian formula for speed of an object moving in a circle is $$\vec{v}=\vec{\omega}\times \vec{r}$$  Where $\vec{v}$ is velocity along the circle, $\vec{\omega}$ is angular velocity and $\vec{r}$ is distance from axis of rotation.   Using the above numbers, we get $v=(2 \pi/24hrs)\times 4lyrs=(\pi/3)(lyrs/hr)$  $$\frac{1 lyr}{1hr}=\frac{1\times c \times 8766hrs}{1hr}=8766c$$  This means $v=(\pi/3)(8766c)>c$, an impossibility.   Does Alhpa Centauri hit superluminal speeds in any coordinate system ? I'm skeptical, based on the following.   Possible Answer  Consider a frame, spinning in the lab about its z-axis, that axis being oriented towards Alpha Centauri. Consider another Cartesian frame not rotating in the lab. Set up a "light clock" in the lab consisting of a light beam bouncing between two mirrors, one on the floor, one on the ceiling, separated by a distance $L$.   The  motion of the light beam moves perpendicularly to the direction of relative motion. So the distances along the z axis are expected to be preserved. The same principle applies to distances along the r-axis. In addition, a light beam moving radially in ward or outward for one frame should have the same motion in the other. It could be detected and this probably null, not only by the above argument, but arguments from isotropy.  Let primes represent measurements in the rotating frame, unprimed, the non-spinning lab frame. By the above, Then for one half tick of the lab's clock $r_0=r_0'$, $\Delta{z}=\Delta {z'}=L$:  $$c\Delta t=L$$ $$c^2(\Delta t')^2=r_0^2 d\theta'^2+L^2$$  Swapping out $L$, and with some algebra:  $$\Delta t'^2=\frac{(\Delta{t})^2}{1-\frac{r_0^2\omega'^2}{c^2}}$$  Where $w'=d\theta'/dt'$. So there is a formula for time dilation.   Letting $\Delta{t}=L/c:$  $$\Delta t'^2=\frac{L^2}{c^2-r_0^2w'^2}$$  Divide both sides into $L^2=\Delta{z'}^2=\Delta z^2$.  $$\frac{L^2}{(\Delta t')^2}=c^2-r_0^2w'^2$$  $$r_0^2w'^2=c^2-\frac{L^2}{(\Delta{t'})^2}$$  So:  $$r_0^2w'^2+\frac{L^2}{(\Delta{t'})^2}=c^2$$  The first term on the left side of the equation represents angular motion. The second term represents motion along the z axis.   $$(\frac{\Delta{z'}}{\Delta{t'}})^2=c^2-r_0^2w'^2$$  The total squared distance traveled according to the rotating frame is $c^2\Delta{t'}^2$. From this we subtract the vertical squared distance traveled, then divide by $\Delta{t'^2}$ to get the sum of the square of the components of other contributors to velocity:  $$v_{alt}^2=\frac{w'^2r_0^2L^2}{c^2-r_0^2w'^2}\frac{1-w'^2r_0^2/c^2}{(L^2/c^2)}=w'^2r_0^2$$  So regardless of any object's position away from the common axis, the square of either component will be less than $c$. So Alpha Centauri is not traveling at the speed of light however far away it might be or however rapidly the earth rotates.


Is it possible to remove string element in array of object using method?

How to remove String element in array using different method. Any ideas on how to make it? I currently have this but it's not working and I'm out of ideas. else if(operations ==2){                 String searchStudentNumber = sc.next();                 StudentAssistant[] copy = new StudentAssistant[studAssistant.length-1];             for(int i=0,j=0;i<studAssistant.length;i++){                 if(copy[i]!= searchStudentNumber){                     copy[j++] =                 }             }   //                for(int i = 0; i<sACounter; i++) ////                    if(studAssistant[i].getStudentNumber().equals(searchStudentNumber)){ //                    if(studAssistant[i].equals(searchStudentNumber)){   ////                        studAssistant[i].searchStudentNumber(searchStudentNumber); //                        studAssistant[i] = null; //                        break; //                    }                   }


Proving subspace of Banach space is finite dimensional

Let $S$ be a subspace of $C([0,1])$ whose elements satisfy $\|f\|_{L^\infty}\leq K\|f\|_{L^2}$. Prove that it's finite dimensional.  The obvious observation is that the $L^\infty$ and $L^2$ norms are equivalent (since the space is finite), but I can't see how to directly exploit this. The only way I know to prove a subspace is finite dimensional is to show the unit ball is compact. Using the equivalence of the norms it then seems like it'd be sufficient to prove that a sequence with $\|f_n\|_\infty$ has a subsequence converging in the (usually weaker) $L^2$ topology. I'm not sure this is true, am I on the right track?


Why should I use char instead of varchar?

Char and varchar are datatypes in SQL, as they are in many other languages(So this question could be multi-language).  From what I understand, the difference is that if I declared a Char as Char(20) it would allocate 20 (bytes/bits) [Could someone clarify this bit too? For now, I'll use bytes.]. Then if I only used 16 bytes, I would still have four allocated to that field. (A waste of 4 bytes of memory.)  However, if I declared a varchar as varchar(20) and only used 16 bytes, it would only allocate 16 bytes.   Surely this is better? Why would anyone choose char? Is it foe legacy reasons, or is there something I'm missing?


Is `sizeof(char*)` always equal to `sizeof(double*)`?

Small code snippets in C.  #include<stdio.h>  int main() {     printf("%zu\n%zu\n", sizeof(char*), sizeof(double*)); }   Output:(GCC 64 bit)  8 8   Is sizeof(char*) always equal to sizeof(double*)?   What C standard say about this?


Need a formula to update unformatted phone numbers?

I have an import of phone numbers and fax numbers that get updated every night into the standard phone and fax fields.  The problem is they get save without formatting (ex. 1234567899)  I need to have these updated with the correct phone number format with the dashes (ex 555-555-5555).  Does anyone know a formula I can use? to create a workflow rule to have these updated or a validation rule? Thanks.


Does the Spell Attack modifier apply to spell damage?

My group and I are new to D&D and we read through the rules for the D&D Next play test.  It seems to indicate that attack modifiers apply to damage as a bonus.  Does this apply with the magic modifier to spell damage?  So does 18 intelligence for a level 1 Wizard give +5 bonus damage to spells?  I don't see how the attack bonus otherwise would be relevant since it seems the opposing creatures have to make a DC check against the spells.  Am I missing anything?


How to organize the system below? Especially the 2nd row of the system.  $$\left\{\begin{eqnarray} 4x-3y+2z+4&=&0\\ x-\frac y3+\frac z2&=&-\frac16\\ 5x+2z&=&3y-3\\ \end{eqnarray}\right.$$


Do you think it would be worthwhile to provide hints as to what language to use for the syntax highlighting?  Sometimes I find the highlighting on SQL or VB.NET answers is more distracting than helpful; for example:       to pick the two I've been looking at recently.


Evaluating the integral $\int_0^{\frac{\pi}{2}}\log\left(\frac{1+a\cos(x)}{1-a\cos(x)}\right)\frac{1}{\cos(x)}dx$

How can I evaluate the following integral?     $$ \int_0^{\pi/2} \log\left(\frac{1 + a\cos\left(x\right)}{1 - a\cos\left(x\right)}\right)\, \frac{1}{\cos\left(x\right)}\,{\rm d}x\,, \qquad\left\vert\,a\,\right\vert \le 1$$   I tried differentiating under the integral with respect to the parameter $a$, and I also tried expanding the log term in a Taylor series and then switching the order of integration and summation. I ran into difficulties with both approaches.


Can I play blessed alliance after damage resolves to make him sac a creature I didn't kill?

I was reading over various questions and it occurred to me that I might not be using  as effectively as I could be. Am I able to cast Blessed Alliance after damage has been resolved, but still during combat, to make my opponent sac a creature that has been declared as an attacker? I believe I can, as 510.3 says active player gets priority and 510.2 is damage is dealt, and state based actions will be checked before active player gets priority.   Therefore, the specific example I'm asking about is, if my opponent attacks with two creatures, one I can kill with my blocker and one I cannot, can I block the one I can kill, and after it dies cast Blessed Alliance to make him sacrifice the other? I believe 510.3 means that it is still the combat phase, and his other creature is still "attacking" as defined by the rules of the game, but I am unsure.     I believe this question is also relevant, as the linked answer states that you can play instants during each of those phases, and end of combat is one. Are creatures that attacked still "attacking creatures" when I get priority at the end of combat?


Tortle Monk's Natural Armor and Unarmored Defense

Depending on your skills, at some point the Monk's Unarmored Defense (10 + DEX + WIS) can and will exceed the Tortle's Natural Armor of 17.  When this happens, do you get the choice of taking the highest of the two, or are you stuck with one or the other?  IE, will Unarmored Defense always overwrite Natural Armor, or will Natural Armor always overwrite Unarmored Defense, or can you choose between the two?


Mean value theorem for twice differentiable function

Let $f:(0,\infty)\to \Bbb R$ be a twice differentiable function. In  answer, it is asserted that the MVT lets one write $$f(x+h)=f(x)+f'(x)h+\frac12 f''(\xi)h^2$$ for some $\xi\in (x,x+h)$.  It is not clear to me why this should be the case. Using the MVT, one can write $f''(\xi)h=f'(x+h)-f'(x)$ for some $\xi\in (x,x+h)$. Using that, the claim rephrases to $$f(x+h)=f(x)+\frac{1}{2}f'(x)h+\frac{1}{2}f'(x+h)h$$ and I don't see why that should hold.  I'm sure I'm being stupid, therefore I much welcome clarification.


Interweaving A and E (e.g., æ) in written words

New to this particular community.   My question relates to the word propaedeutic. In particular, I have witnessed the "a" interwoven with "e" to produce propædeutic. I once read that this is an example of a diphthong. Is the æ glyph simply used to denote a difference in pronunciation? Could anyone shed light on the roots of this linguistic practice?   And, if I may, why is propaedeutic, or propedeutic more generally, not recognized as a word when written out in this context?  Any insight?


Is the term "errored out" a grammatically correct phrase, or just a colloquial one?

I was wondering whether it is OK to use "errored out" as part of a status message in my code — is it grammatically correct to use it, or is there a better choice of words that I can use in its place?


Why am I getting GLib errors when I launch Firefox?

I am new to Linux and have been poking around a lot in Terminal. I launched Firefox from the command line and noticed that I began getting the below. It still opens and seems to run as it should. I don't remember seeing this before deleting Chrome or before using proxychains. Any thoughts?  (firefox:8321): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed  (firefox:8321): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed  (firefox:8321): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed  (firefox:8321): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed


I'm learning Python and I don't understand this notation

Note how the start is always included, and the end always excluded. This makes sure that s[:i] + s[i:] is always equal to s:  >>> word[:2] + word[2:] 'Python' >>> word[:4] + word[4:] 'Python'   I don't understand what thee above notation is.


Help me fix dependencies at sudo apt-get -f install failure

So I was having some problems with my network manager and I tried to reinstall it as it wouldn't work at all.   Fast forward a few packages later and now the network manager and network work but I have no icon, on the top right side, with the networks. I have  with the erorr message :      "Error: BrokenCount>0".    Following the instructions provided doesn't solve the problem as I still get the error as bellow.  The Ubuntu Software installer doesn't work as well. When I try to install/update something it just loads a little and then stops as if I canceled.  If someone could solve this one I would be thankful.  sudo apt-get -f install Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... failed. The following packages have unmet dependencies:  aptitude:i386 : Depends: libapt-pkg4.12:i386 (>= 0.8.16~exp12ubuntu6) but it is not installable              Depends: libboost-iostreams1.46.1:i386 (>= 1.46.1-1) but it is not installable              Depends: libc6:i386 (>= 2.4) but it is not installed              Depends: libcwidget3:i386 but it is not installable              Depends: libept1.4.12:i386 but it is not installable              Depends: libgcc1:i386 (>= 1:4.1.1) but it is not installed              Depends: libncursesw5:i386 (>= 5.6+20070908) but it is not installed              Depends: libsigc++-2.0-0c2a:i386 (>= 2.0.2) but it is not installable              Depends: libsqlite3-0:i386 (>= 3.6.5) but it is not installed              Depends: libstdc++6:i386 (>= 4.6) but it is not installed              Depends: libtinfo5:i386 but it is not installed              Depends: libxapian22:i386 but it is not installable              Recommends: apt-xapian-index:i386 but it is not installable              Recommends: libparse-debianchangelog-perl:i386 but it is not installable  libnl-genl-3-200 : Depends: libnl-3-200 (= 3.2.27-1ubuntu0.16.04.1) but 3.2.29-0ubuntu2.1 is installed  libnspr4:i386 : Depends: libc6:i386 (>= 2.17) but it is not installed  ppa-purge : Depends: aptitude E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. E: Unable to correct dependencies`


Cannot authenticate to area51 whereas area51.meta works

I've already posted this on area51 meta but as it is a tumbleweed question over there doesn't get a lot of traction,  (link only works for 10K+ users) and posting here instead (and probably be downvoted back into the stone age). OK, so I'm a total security and privacy nazi nerd, so I actively refuse all cookies everywhere except for the sites I visit more than once/week. So  is allowed to store session cookies only as are all the other sites in the SE network which I regularly visit like Ask Ubuntu, Super User, Server Fault, Stack Overflow, sstatic.net etc and it works nicely. For some or other reason, if I authenticate on area51 I can see some kind of avatar when I'm on :  And I was able to post and subsequently edit this question over there... but (and that's a big but)  if I go to the main area51 site (), it looks like I never logged on:  And if I try to log in, it won't let me! What am I missing here? Additional info: Just noticed that surfing to  gives the following output under FireFox: discuss.area51.stackexchange.com uses an invalid security certificate.  The certificate is only valid for the following names:   *.stackexchange.com, stackoverflow.com, *.stackoverflow.com, stackauth.com, sstatic.net,  *.sstatic.net, serverfault.com, *.serverfault.com, superuser.com,  *.superuser.com, stackapps.com, openid.stackauth.com, stackexchange.com,  *.meta.stackexchange.com, meta.stackexchange.com, mathoverflow.net,  *.mathoverflow.net, askubuntu.com, *.askubuntu.com, stacksnippets.net,  *.blogoverflow.com, blogoverflow.com, *.meta.stackoverflow.com,  *.stackoverflow.email, stackoverflow.email, stackoverflow.blog  Error code: SSL_ERROR_BAD_CERT_DOMAIN   Correlation, causation or not related?


Reflection is quad dependent and looks non realistic

Im rendering varous objects with a Sharp glossy effect but the reflections are quad dependent on the object (image below), meaning they behave separately within every quad making it look 8bit-like. Can anyone tell me why this happens?. (Im pretty sure subdividing would fix it but I want to know why I cant have a low poly object reflecting normaly.  The object has 2 modifiers: Subdiv Surface and Solidify. (Perhaps the Subdiv is causing it?). Help me you Blender savys I dont have a powerful CPU to test and test within every render would take me hours and hours.  Image:


"You must have 50 reputation to comment"

I am really, really angry with the ridiculous "reputation" system which disallows just about anything.  I want to improve posts by commenting - thus building actual reputation -, yet there is no way 'cause your fake "reputation" system is in the way.  Oh, and I'm not allowed to use harsh language to describe all this, right? Even though it would be appropriate. Who made you the arbiter of all this? Learn to accept free language, [harsh word here]. I want a FREE site for knowledge exchange.


I'm pretty new to statistics and I need your help. I just installed the R software and I have no idea how to work with it. I have a small sample looking as follows:  Group A : 10, 12, 14, 19, 20, 23, 34, 41, 12, 13 Group B :  8, 12, 14, 15, 15, 16, 21, 36, 14, 19   I want to apply t-test but before that I would like to apply Shapiro test to know whether my sample comes from a population which has a normal distribution. I know there is a function shapiro.test() but how can I give my numbers as an input to this function?   Can I simply enter shapiro.test(10,12,14,19,20,23,34,41,12,13, 8,12, 14,15,15,16,21,36,14,19)?


If you read enough mathematics, you eventually come across several so-called "special functions". I'm always left wondering what on Earth these things are actually for.  We have the Euler Gamma function, the Beta function, the infamous Riemann zeta function, the Airy functions, the Möbius function, the Bessel functions, the Jacobi theta functions, the digamma and polygamma functions, the polylog, the Chebyshev polynomials, Weierstrass's elliptic functions, the Dedekind eta function, the hypergeometric functions, etc etc etc.  If you try looking any of these functions up, you generally get a huge page of dense, complex-looking formulas recounting the sixteen different ways to define the function, the myriad of properties and identities it has, and so on and so forth. But nowhere does it mention why this is useful.  I have just about figured out that the Euler Gamma function extends the factorial to non-integer values. I still don't know how that's "useful" in some way. Bessel J somehow appears at random in a few unrelated contexts, as do the Chebyshev polynomials. And that's about as far as I've got.  Obviously, I'm not expecting anyone to give an exhaustive explanation of what every single special function ever invented actually does. I suppose that if you don't know what a function does, that means you probably don't need it yet. But I would like to have some basic intuition as to why all these millions of functions have been defined, and what people use them for.


JQuery | How to get attributes of iframe from other html?

I want get the attribute 'src' of a iframe from other html.  I can get the attribute of a iframe in the same html but not from other html,   look my code:  /////////iframe attribute from the same html//////////     var Mframe_src = $("#Mframe").attr('src');     alert(Mframe_src);  //////////iframe attribute from other html////////////  var frame_Ads = $("#Mframe").contents();  var Ads_src = frame_Ads.find("#ads");  alert(Ads_src.attr('src')); /// the alert present me undefined


Is it just me, or did the user profile layout just change (to a collapsed bar)?

I hope this isn't how the profile is supposed to look, whether now or as intended for rollout in the future.


Why windirstat only report 95GB usage even though clearly we have used 237GB

My SSD is almost full. I right click windirstat and choose run as administrator Now drive C clearly uses most of it's 250GB capacity  This is what windirstat says  It only reports 95 GB. So I do not know what hidden files I have to delete. How do I make windirstat to report all used space? Any other way to know? Windirstat run as administrator This is the system drive


Is it possible that the VPS service provider can access my Windows VPS even I have changed the default password?

I wonder if there is a chance that the VPS service provider can access my Windows VPS even I have changed the default password?


When is it appropriate to use SQL Server Developer Edition?

Do you use SQL Server Developer Edition on server-class machines in DEV and STAGING environments?  I am working on a large project where (if it passes the proof of concept stage) we will have several large geographically distributed enterprise class database servers running SQL Server 2012 Enterprise Edition.  We will have a production environment will initially have 3 servers, our Staging environment will have a minimum of 3 servers, and our Development environment will have 1 server (hosting three instances).  I was under the impression that we would only need to acquire Enterprise licences for the actual production servers, and we could get by with developer edition in our developer and staging environments because they are not "production".  Other sources have told me that we need to have an enterprise licence on all of the above mentioned machines, and that the developer edition is only meant for a single developer on their workstation.  Since developer edition has all the sexy features of Enterprise, I can't really see the value of it on a workstation class machine, especially for developing and testing the type of high availability system we are building.  If we have to fork out Enterprise licences for a dev server, that will just about kill our proof of concept stage, thus killing the project.  Forcing an enterprise licence on a staging environment will make management just want to skip staging altogether.


One of the outlet has no power in my house. I found the neutral wire is also hot like the black wire. There are only two wires, no ground wire involved. The wiring in the house is very new (~ 1 year). What would be the problem?


Elegant way to typeset labels for matrix coefficients

In The Econometrics of Financial Markets by Campbell, Lo and MacKinlay -- a beautifully typeset book -- I have found gorgeous cross correlation matrices of the style below.    What is an elegant way to typeset these labels for the rows and columns in LaTeX (ideally in conjunction with the amsmath matrices)?


What is the easiest way to earn 9999 coins

9999 coins is super tricky and maximum number getting this many coins allows you to buy outfits that cost 9999 skeleton and 3D 8 bit blocky version also this can help you participate endlessly in challenges. If you want to buy many outfits this is your number also do you want toad hints each is 50 get this many coins for endless ones.


Trying to solve this integral $ \int x^xdx $

I am trying to solve the following integral which supposedly cannot be solved by "normal" means.   $$ \int x^xdx $$  Here's what I've come up with so far:  $$ x^x=e^{x\ln(x)}$$  $$\frac{d(x^x)}{dx}=x^x\ln(x)+x^x$$  This must mean that:  $$\int \left(x^x\ln(x)+x^x\right)dx=x^x$$  this means: $$ x^x-\int x^x\ln(x)dx=\int x^xdx $$  If I can solve $$ \int x^x\ln(x)dx$$  I can solve $$\int x^xdx$$  Any ideas on how to solve the integral? Thanks in advance.


Is there a UNIX command to list all recently removed files from a system

Accidentally a rm -rf command was launched to my root directory instead of current directory. I stopped file removing by Ctrl+C but some files has already been removed. Is there a LINUX command to list all recently removed files from the system to get the affected applications ?  Operating System: CentOS 6.3


Professor Lupin's character always seemed to be poor- a werewolf, no job, shabby robes. Yet when he was teaching Harry to produce a patronus, he gave him chocolate frogs, butterbeer and the best bar of Honeydukes chocolate. Couldn't he afford a new set of robes, considering he had been able to afford all that. And being a teacher at the best wizarding school, I expect he would have been paid a handsome salary? If Dumbledore could offer ten galleons to a house elf, even Remus Lupin would have gotten a handsome salary? I am sincerely confused and would appreciate it if someone could provide a satisfactory answer.    From one of the comments, I noted the fact that Lupin already had some chocolate when he was on the train as he was asleep when the trolley witch passed. Was he carrying it in case an incident like Harry's occurred or was it actually just a way to introduce that particular scene?


App craches 'attempt to invoke virtual method'

My app craches when i try to update my database it gives me the following problem      attempt to invoke virtual method 'android.database.cursor com.leoni.bd.Gestion_db.FindDate(java.lang.String)' on a null object  reference   i couldn't find the null object i tried many things but it didn't work  ! i need help please !   this is my Gestion_db.java class   private SQLiteDatabase _myDbm;  public Gestion_db(Context pContext) {      SqliteCreator s = new SqliteCreator(pContext, Stat.DB_NAME, null, 1);      _myDbm = s.getWritableDatabase(); }  public void close() {     _myDbm.close(); }  public Cursor FindDate(String Attribute) {         String query = "SELECT * FROM " +Stat.TABLE_NAME +" WHERE ? LIKE '%?%' ";         return _myDbm.rawQuery(query, new String[] {Stat.COL_DATE,Attribute});      }   this is the method from my Controle.java activity wich contain the cursor  //header of the activity  private Gestion_db _myGestionDB; private String _myRecognizedText = null;  // Mise à jour de la base de données quelque soit l'action private void MiseAJour() {      String dateCourante = new SimpleDateFormat("yyyy:MM:dd",Locale.getDefault()).format(new Date());     Boolean existe=false;      Cursor c = _myGestionDB.FindDate(dateCourante);      if (c.getCount() != 0) {          c.moveToFirst();          while (!c.isAfterLast()) {               String ldate = c.getString(c.getColumnIndex(Stat.COL_DATE));             String lMatricule = c.getString(c.getColumnIndex(Stat.COL_TEXTE_OCR));              if (ldate.equals(dateCourante)&& lMatricule.equals(_myRecognizedText)) {                 existe=true;                 break;              }             c.moveToNext();          }        }      if (existe){         UpdateHeure(_myHeure);      }else{         AddVoyage();     }  }   this ic Stat.java class wich contains some Strings  public class Stat { public static final String DB_NAME = "leoni.db"; public static final String URL_CHECK = "http://192.168.1.6/check.php"; public static final String GET_URL = "http://192.168.1.6/getChauffeurs.php"; public static final String COL_ID = "_id";  // Gestion des déplacements public static final String TABLE_NAME = "gestion_des_deplacements"; public static final String COL_TEXTE_OCR = "texte_ocr"; public static final String COL_DATE = "date"; public static final String COL_HEURE_DEPART = "heure_depart"; public static final String COL_HEURE_ARRIVEE = "heure_arrive"; public static final String CREATE_TABLE_DEPLACEMENTS = "CREATE TABLE "         + Stat.TABLE_NAME + " (" + Stat.COL_ID         + " INTEGER PRIMARY KEY autoincrement," + Stat.COL_TEXTE_OCR         + " VARCHAR(40)" + "," + Stat.COL_CHAUFFEUR + " VARCHAR(50)" + ","         + Stat.COL_DATE + " VARCHAR(50)" + "," + Stat.COL_HEURE_DEPART         + " VARCHAR(30)" + "," + Stat.COL_HEURE_ARRIVEE + " VARCHAR(30));";  // Gestion des chauffeurs public static final String COL_MATRICULE = "matricule"; public static final String COL_CHAUFFEUR = "chauffeur";  }


If we take the analogy that in an empty space the space is just a flat sheet then if there is a single planet or a star then the flat sheet will curve below the planet leaving a curvature shaped like a hemisphere below the object, my question is, Does this curvature change as space expands?


What would be the Slater's determinant of an excited state?

Setup  Introducing this spinorbital notation:  \begin{align} \Psi_1=\chi_{(r1)}\alpha_{(\omega1)}  &= 1 \\ \Psi_1=\chi_{(r1)}\beta_{(\omega1)}  &= \bar{1} \end{align}  and the Slater's determinant, for a system of two electrons, is:  \begin{align} |\Psi\rangle = \frac{1}{\sqrt{2}}\cdot \left|  \begin{array}{cc} 1 & \bar{1}  \\ 2 & \bar{2}  \\ \end{array}  \right| = |1\bar{2}-\bar{1}2\rangle \end{align}  Question  Based on the example, what would be the Slater's determinant representation for an excited state like $\Psi_a^r$ (i.e. with parallel spins like: $|\bar{1}\bar{1}\rangle$ or $|\bar{1}\bar{2}\rangle$) and $\Psi_{ab}^{rs}$ (feel free to use any number) ?


What is going on grammatically when we speak of a "happy day"?

Ordinarily in English, adjectives directly describe the noun being modified; thus an adjective indicating an emotion attributes that emotion to the noun - "I am happy" means that I am the one experiencing happiness. But if I say "it was a happy day", I am not claiming that the day experienced happiness - it is not a conscious entity. To my mind, these are two entirely separate functions performed by the same word "happy". In other languages, adjectives (or what might reasonably be labelled as such) commonly work this way - I have often seen native speakers of Chinese or Japanese confuse the English "scared / be afraid" with "scary / be frightening" because (as I understand it) in those languages, both concepts would ordinarily be expressed with the same word, inflected the same way. Yet as far as I can imagine at the moment, English does this only in very limited cases. I may be scared, but the cause was scary. I may be hungry, but my food is not - and neither is my mealtime, nor anything else related to my proposed solution to hunger. Am I overlooking something? Is there a term for this way of using adjectives in English, and are there a bunch more examples that aren't coming to mind at the moment? Or is "happy day" just a magical set phrase that I've been using unquestioningly all these years?


Do infinitely many points in a plane with integer distances lie on a line?

Someone posted a question on the notice board at my University's library. I've been thinking about it for a while, but fail to see how it is possible. Could someone verify that this is a valid question and point me in the right direction?  'Given an infinite set of points in a plane, if the distance between any two points is an integer, prove that all these points lie on a straight line.'


Any Ideas how to setup a IP4200with Ubuntu 12.04 64bit?  As far as I know, there is no official driver by canon.   oneiric is not working  Hope somebody can help me, thanks.


Query to fill the empty column with the next available value from the Data Extension

I have a data extension with a customerID and 15 products assigned to them(screenshot attached)    Some of the 15 products are missing the value and I would like to write a query so if Product1 is empty to get the value of Product2 and so on.  i.e. if product1 product3 and product5 are empty to show the first 12 products with the value inherited from the next product and last 3 products to be empty in this case because there is 3 empty products.  Is this possible?


Can we allow close voter to suggest other SE site

Currently, if I am voting to close a question as belonging on another SE site there is a fixed list, presumably auto-generated, of which other sites to choose from but often that list doesn't include the site that I know would actually welcome the question.  While the automatic selection of sites could be improved why not simply have a select other button that allows the close voter, with sufficient reputation, to pick any SE site and adds it to the list for subsequent voters to second. It may not be a bad idea to require that the site suggester have a minimum reputation threshold on the referred site as well.  A recent example was  which I believed belongs on  but when I select Close->Off Topic->Other Site the options I was given were:   Neither of which do I think to be as good a fit.  Note that I am aware of  but differ in that I am making a concrete proposal of how to address the issue where to refer misplaced questions rather than a general request for "more options".


Concatenate distinct values from multiple rows and multiple columns

I have this table:  VAT | Email1 | Email2 000 | a@a.it | b@b.it 000 | a@a.it | - 000 | a@a.it | c@c.it 000 |  -      | d@d.it   I want this result:  VAT | Emails 000 |  a@a.it, b@b.it, c@c.it, d@d.it   How can I do this in SQL?  Note that I want to concatenate values from multiple columns and multiple rows simultaneously.


Direction of velocity and acceleration for a pendulum

The image below shows the direction between acceleration and velocity change with time. But it seems to me that the direction is not opposite. Can you please see and tell if this is correct?


Has English adopted any common morphemes from languages that are not Greek, Latin, or French?

Has English adopted any common morphemes from any "exotic"-type languages?  By that, I'm trying to exclude our most frequent borrowings; i.e. French, Latin, and Greek, from which nearly all our suffixes and prefixes are borrowed — endings like -ance, -ette,  -ience, -ium, -ology, and innumerable more.  (Prefixes would be for example, anti-, circ-, princ-)  However, once you escape those big 3, I find it gets a lot harder; I personally can't think of any off the top of my head.  Can anyone else?


How can I add the session name to my screen status display?

This is my current .screenrc files which is mostly copied from the link in the code  #First iteration 2014-09-06, not quite sure of stuff to add # got a fancy hardstatus line noted below hardstatus on hardstatus alwayslastline # hardstatus string "%w"  # blagged this hardstatus like from https://bbs.archlinux.org/viewtopic.php?id=55618, not quite sure what it does hardstatus string '%{= kG}%{C}Screen: %{c}%{= kG}[%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{C} %d-%m %{W}%c %{g}]'   I now want the session name to appear in it as well, and the one I have settled on is from this answer -   The solution runs along these line:  hardstatus string '%H:%`' backtick 0 30 30 sh -c 'screen -ls | grep --color=no -o "$PPID[^[:space:]]*"'   It is an area I am not familiar with and I wonder how the backtick command fits in it, ie whether it is a screen command at all.


How to get list index and element simultaneously in Python?

I find myself frequently writing code like this:  k = 0 for i in mylist:     # y[k] = some function of i     k += 1   Instead, I could do  for k in range(K):     # y[k] = some function of mylist[k]   but that doesn't seem "pythonic". (You know... indexing. Ick!) Is there some syntax that allows me to extract both the index (k) and the element (i) simultaneously using either a loop, list comprehension, or generator? The task is in scientific computing, so there is a lot of stuff in the loop body, making a list comprehension probably not powerful enough on its own, I think.  I welcome tips on related concepts, too, that I might not have even though of. Thank you.


How do I get long command lines to wrap to the next line?

Something I have noticed in Ubuntu for a long time that has been frustrating to me is when I am typing a command at the command line that gets longer (wider) than the terminal width, instead of wrapping to a new line, it goes back to column 1 on the same line and starts over-writing the beginning of my command line. (It doesn't actually overwrite the actual command, but visually, it is overwriting the text that was displayed).  It's hard to explain without seeing it, but let's say my terminal was 20 characters wide (Mine is more like 120 characters - but for the sake of an example), and I want to echo the English alphabet.  What I type is this:  echo abcdefghijklmnopqrstuvwxyz   But what my terminal looks like before I hit the  key is:  pqrstuvwxyzghijklmno   When I hit enter, it echos  abcdefghijklmnopqrstuvwxyz   so I know the command was received properly.  It just wrapped my typing after the "o" and started over on the same line.    What I would expect to happen, if I typed this command in on a terminal that was only 20 characters wide would be this:  echo abcdefghijklmno pqrstuvwxyz   Background: I am using bash as my shell, and I have this line in my ~/.bashrc:  set -o vi   to be able to navigate the command line with VI commands.  I am currently using Ubuntu 10.10 server, and connecting to the server with Putty.  In any other environment I have worked in, if I type a long command line, it will add a new line underneath the line I am working on when my command gets longer than the terminal width and when I keep typing I can see my command on 2 different lines.  But for as long as I can remember using Ubuntu, my long commands only occupy 1 line.  This also happens when I am going back to previous commands in the history (I hit Esc, then 'K' to go back to previous commands) - when I get to a previous command that was longer than the terminal width, the command line gets mangled and I cannot tell where I am at in the command.  The only work-around I have found to see the entire long command is to hit "Esc-V", which opens up the current command in a VI editor.  I don't think I have anything odd in my .bashrc file.  I commented out the "set -o vi" line, and I still had the problem.  I downloaded a fresh copy of Putty and didn't make any changes to the configuration - I just typed in my host name to connect, and I still have the problem, so I don't think it's anything with Putty (unless I need to make some config changes)  Has anyone else had this problem, and can anyone think of how to fix it?  Edit  It was my .bashrc file.  I've copied the same profile from machine to machine, and I used special characters in my $PS1 that are somehow throwing it off.  I'm now sticking with the standard bash variables for my $PS1.  Thanks to @ændrük for the tip on the .bashrc!  ...End Edit...


Alternatives for MTP, PTP and USB Storage regarding data transfer in Android 4.x.x and 5.0

It has been known that USB Storage functionality was removed in Android 4.4.x and subsequent version of Android.   PTP doesn't work very well on cross-platforms, not to mention it restricts files to certain media types.   MTP works in Windows and in some Linux distributions with certain tweaks. However, it is not very stable and breaks often when transferring huge files (on all of my three Android devices).  The question is to suggest some good alternatives for file transfer between Desktop and Android without compromising data transfer speed (via USB cable). It implies that no data transfer apps using hotspot/wifi should be suggested like Airdroid, WeLine, Webkey et al.    Note that the solution should work on at least all of the Android 4.x.x versions and possibly on 5.0 too. A similar question was asked  but its limited to Android 4.0.x.


How does a filtering capacitor smoth a changing current?

Lets assume,in picture blow, the current be in its peak voltage moment. then when the current begins to fall (assume a moment after the peak moment) we know the current is blocked by diodes (actually two diodes) and then the cap discharge its stored charged to load. my question is why diodes block this current? Why the diode doesn't allow the rest of falling voltage current to go into the load? Is this because of the fast rate of voltage chaining for this falling voltage current?


Find correlation between grades from two raters

The question is whether we can find a correlation between two sets of grades (categorical data). Let’s say we have a dog competition and there are 1000 dogs participating. There are two rounds of assessment first round dog owners give their assessment on the scale from A to C. Where A is excellent and C is bad. There are four criteria for assessment during both tours (behaviour etc). second round one judge gives his assessment of one dog based on the same assessment criteria as in round 1. however, grades vary from M - meeting expectation, E - exceeding expectation, B - Bellow expectation. We understand that M is B, E is A and B is C. After two rounds our table would look like:  | dog             | round one | round two | | --------------- | --------- | --------- | | Dog1_criteria1  | A         | B         | | Dog1_criteria2  | A         | E         | | Dog1_criteria3  | A         | E         | | Dog1_criteria4  | B         | M         | | Dog2_criteria1  | A         | E         | | Dog2_criteria2  | B         | M         | | Dog2_criteria3  | A         | E         | | Dog2_criteria4  | C         | B         | ....  How do we find a correlation between the two sets of answers? Thank you!


Replicate moment.js fromNow() and toNow() in C#

I tried to ask this question but some users thought it was a duplicate and closed the question. I explained it in a comment but in any case, I wrote an extension method in C# and it will appear in an answer.


Can a passenger refused entry due to lack of papers claim a refund from the airline?

A relative of mine traveled to Spain with a Turkish passport from South America. She didn't knew she needed a visa for Spain and was allowed boarding by the airline.  Upon arrival she was held in a "detention room" uncommunicated for 24 hours (she was treated well by Spanish authorities though) until she was deported for failing to have the correct documents.  As standard procedure she was assigned a lawyer who told her that airlines pay penalties when this happens.  My question is, can she request a refund for being allowed boarding despite being inadmissible?


graph of a function, measure theory, real analysis

the graph of continuous function $f:\Bbb{R}\to \Bbb{R}$ has measure $0$.  the graph of measurable function $f:\Bbb{R}\to \Bbb{R}$ is measurable. it can also be shown it has measure 0:   But could you show me an example of:   (noncontinuous) function with graph of positive measure? (nonmeasurable) function which has nonmeasurable graph?   Thanks in advance.


Homomorphic image of a Sylow p-subgroup is Sylow p-subgroup.

Let $G$ be finite group and $\phi$ : $G \to H$ be a group epimorphism. If $P$ is a Sylow p-subgroup of $G$ then $\phi(P)$ is a Sylow p-subgroup of $H$.   It looks very simple but I'm stuck here.  Let $\lvert P\rvert=p^{k}$. Clearly $\lvert \phi(P)\rvert=p^{n}$ where $n\leq k$. Suppose $\phi(P)$ is not a maximal p-subgroup in $H$ and let $Q$ be a maximal p-subgroup of $H$ containing $\phi(P)$. Then $\lvert Q\rvert=p^{m}$ where $n<m$ and $\phi^{-1}(Q)$ is strictly larger than $P$.   For the rest of the proof, what can I do? Thanks.


Evaluate the integral $\int_{\left | z \right |=3} (e^{z}-1)dz/(z(z-1)(z-i))$

I want to evaluate the integral $$\int_{\left | z \right |=3} \frac{e^{z}-1}{z(z-1)(z-i)}\,dz$$    by using the following  theorem:      If a function $f$ is analytic everywhere in the finite plane except for a finite number of singularities interior to a positively oriented simple closed curve $C$, then    $$\int_{C}f(z) dz=2\pi i\text{Res}\left ( \frac{1}{z^{2}}f(\frac{1}{z}), 0 \right ).$$   Since $$\frac{1}{z^{2}}f(\frac{1}{z})=\frac{1+\frac{1}{2!z}+\frac{1}{3!z^{2}}\cdot \cdot \cdot }{1-(1+i)z+iz^{2}},$$  so I did long division, but the coefficient of 1/z(the residue of $\frac{1}{z^{2}}f(\frac{1}{z})$) is $0$.  I know the method of calculating the residues at each singularities $0$, $1$, $i$, respectively. This method gives me the answer $2\pi i(0+\frac{e-1}{1-i}+\frac{e^{i}-1}{i(i-1)})$ which is not $0$.   Why answers are different?? Why does not hold long division method? Any help please.


As a beginner in Bayesian estimation I believe I have made progress on the understanding of the estimation process.  However, after the estimation and evaluation/comparison of the models I find myself stuck in the understanding of the forecasting issue.  For example, I estimate a simple linear regression model ,like this one: $Y_t = \alpha_0 + \alpha_1 X_t + \epsilon$, by various methods: OLS regression,median regression and Bayesian Methods.  Now comes my question: In the Bayesian literature I´ve have seen several interesting ways to do the forecasting, for example, i could put in a framework of dynamic linear models.  However, I wonder how can I do a simple exercise of forecasting without resorting to dynamic linear models. In fact, I would like to understand the passage from the Bayesian estimation to forecasting exercises. In my mind, i would have to "forecast" the posteriors distribution for each time, t, t=1,2,3,4.., 10. But then others doubts comes to my mind.  Could you help me?  Thanks a lot.


De-linkify links in network profile if a network-wide suspension is applied

I noticed , with a network-wide suspension. They've filled their profile clear full of spam links, and the thing that delinks links in suspended profiles is working on per-site profiles. But on his , the links are still links. They're nofollowed, but users can still (accidentally?) click them. Can we unlink them on the network profile too? If they deserved a network suspension, they likely can't be trusted with clickable links either.


Option to add a Stack Exchange Login to Existing Account has gone AWOL

When I was trying to help , I noticed that there is no "Sign Up" or "Login" option for a Stack Exchange account when you are already signed in.  I know it used to be there, what happened to it?  Ok, I see both the signup and login options when I am not logged in        But if I log (I tried with my test account since it doesn't have an SE account already associated):        In the second picture, there is no more SE login option.  The account definitely does not have an SE login associated, but I can't see it on my account either and I do have an SE account.


I checked that their pronunciations are /ster/ and /der/ But I can't hear the difference between them! Can anyone tell me the difference and how to pronounce them separately?


I am testing out a B+W 49mm Circular Polarizer filter, but there is no marking, or indication where the starting position supposed to be.   If the filter is supposed to be turned to turn polarization on/off, how do you tell which is which?   I must be missing something obvious, but i've googled around and checked the manufacturer page and there is no mention of this.   I am only guessing that some of the markings on the filter should be used to figure this out.. Also, should these effects be visible through the viewfinder (provided it's looking through the lens)?


This is likely the same problem I saw reported countless times. However, mine comes with a twist, so I wonder if anyone can provide extra insight. Briefly, my laptop randomly shuts down (I think it happens only on battery). It's an early 2011 17" version running the latest macOS.  A few weeks ago I reinstalled the whole macOS after it wouldn't turn on anymore. I thought it might've been a hardware issue as many people suggest replacing the motherboard, but I was still able to boot it in the safe mode, which would suggest it's a software component issue.  Fast-forward and it's started happening again, although only infrequently and I am able to turn it back on very quickly if I have a charger nearby. Now, here are 2 insights I noticed and wonder if anyone can explain futher.  1/ Once the laptop "dies", I usually need to connect it to the charger to start it again. It feels like giving it some juice to power up. The battery level doesn't seem to play a role here (happens on 90% too). Sometimes if I connect the charger, turn it on, remove charger, it dies instantly. As if I had to keep the charger in for a certain amount of time until it feels confident to run without it. Feels like teaching a child ride a bike.  2/ Lately, I developed a new theory that it happens only when discharging AND I have to have the laptop on my lap, bed, or other unstable surface. I am paying attention now if it happens again when I work on desk, I couldn't replicate it so far. It's this point that drives me crazy, wondering what it could be.  Any experience with this issue is welcome. 😸  [UPDATE]: I removed case from the Macbook, dusted it off a bit and since then it's been running without any issues again. I haven't changed any settings or components. Computers are weird.


Proving Distributivity of Matrix Multiplication

If $A,B,C$ are matrices I am thinking how to show that $$ A(B + C) = AB + AC$$  Is possible to show without sums like $\sum_i a_i, ..., \sum_j b_j$? It seems if I do the proof with many indexes then is tedious and I don't learn much from it.


How to randomly obtain colours different to previous colour shades?

The program is currently filling out charts with colours chosen for it, once the chart exceeds the limit of colours given, it picks a colour at random.   Is there a viable way of acquiring the colour without it being of the same shade as the previous ones?  Code:   public List<string> getColors(int columns) {     List<string> colors = new List<string>();     colors.Add("\"rgba(77,77,77,0.8)\"");     colors.Add("\"rgba(241,88,84,0.8)\"");     colors.Add("\"rgba(93,165,218,0.8)\"");     colors.Add("\"rgba(96,189,104,0.8)\"");     colors.Add("\"rgba(222,207,63,0.8)\"");     colors.Add("\"rgba(178,118,178,0.8)\"");     colors.Add("\"rgba(187,253,241,0.8)\"");     colors.Add("\"rgba(178,145,47,0.8)\"");     if (columns > colors.Count)     {         Color c = GetRandomColour();         colors.Add(String.Format("\"rgba({0},{1},{2},0.8)\"",                     c.R.ToString(), c.G.ToString(), c.B.ToString()));     }     return colors; }  private static readonly Random rand = new Random();  private Color GetRandomColour() {     return Color.FromArgb(rand.Next(256), rand.Next(256), rand.Next(256)); }


AIC and transformation of the independent variable

I set up different models: always same dependent variable and dataset, only the independent variable changes. All model assumptions are fullfilled. Now i do a model selection with the AIC. I look at the model with an independent variable without and with a log transformation. The model with the log transformed dependend variable a has a lower AIC. Then i look at variable b and here the untransformed variable has a lower AIC. In total i  look at 14 independend variables and the log transformation shows lower AIC for 6 of them. My question is if i should use only log transformed or only not transformed data or just decide it for each variable after looking at the AIC?


Replaced Windows 7 with Ubuntu 13.04 but won't boot from internal HDD

The installation went fine until I restarted. I remember enabling boot from removable disk and was thinking of disabling it as it boot up. Pressed F8 nothing happened. Instead it went straight to the Purple Ubuntu loading screen. If I try to boot without the usb, it just gives me a blank black screen with a blinking _.   I am fairly new to this and I am hoping for a fix. Thanks in advance.


I normally use \verb|\LaTeXe| to typeset the command \LaTeXe in my document. But now I want to frame or/and colorize the command \LaTeXe. How can we do that?  \documentclass{article} \usepackage{xcolor} \begin{document} \textcolor{blue}{text}\\ % without \verb is ok \textcolor{blue}{\verb|\LaTeXe|}\\ % this is illegal, but I want to colorize the command \LaTeX2e \fbox{text}\\ % without \verb is ok \fbox{\verb|\LaTeXe|} % this is illegal too, but I want to frame around the command \LaTeXe. So how can I do that? \end{document}


Rails.vim tab complete doesn't halt at multiple possibilities

When I use 's tab complete with :E (or any other method) it autocompletes a lot more forcefully that I'd like. For example if I want to go to the admin/products controller and I type :Econtroller ad and press tab, it might complete to :Econtroller addresses or I guess the first possible match. I wish it stopped and let me type more.  Is this an issue in rails.vim? Vim itself? Or a failure of my configuration?  I'm using MacVim v7.4. And the latest release of rails.vim installed via Vundle.  Any advice is appreciated.


The impression that I got from the  films was that if  was successful, most of the world was going to suffer greatly. Basically everyone would serve Voldemort as slaves or die. So what's the point of serving someone who's probably going to ultimately end up betraying and/or enslaving you? I know the  hated , but is that really enough to justify tearing down Wizard society? Why exactly do the Death Eaters serve Lord Voldemort? Fear? Is the post-Voldemort world not that bad? (I for one welcome our )


Proving $A^{B\cup C} \sim A^B\times A^C$

let $A, B, C$ be sets so $B\cap C = \varnothing$. prove that $A^{B\cup C} \sim A^B\times A^C$.  I don't know how to start with solving this question. I know we need to define a function $A^{B\cup C} \to A^{B}\times A^{C}$ that is a bijective function but can't think of one. I'm looking for a simple function that can prove this theorem.


iPad, cellular data sim card, London UK?

I will travel from USA to London in Aug. I want to buy an iPad in USA which will work with a data sim card, which I assume to be available in London.  Questions:    Which type of iPad has the highest probability of working with a data sim card bought in London? Also, once I land in London with my iPad, what would be an optimal type of data sim card?   I hope to find people who are walking around in London now with a data sim card in their iPad. I'd like to find out how happy they are with the service and any pitfalls which might await me.  I have studied ; it told me to contact my carrier, so I called T-Mobile USA and found them not to be knowledgeable. I spent lots of time on their site and talking to phone support. Also I tried contacting T-Mobile UK via their website and gave up after it seemed they want me to have a UK phone to set up an account.


'Earth' or 'earth' in Christian/theological texts

I am writing a book about the Gospel of Thomas and am using the word 'earth' 116 times      (Jesus walked on E/earth...;   If the understanding that the E/earth is not at the center of the universe was revolutionary...;   The E/earth and everything on it consists of atoms...)    I don't know if E/earth, since it refers to planet E/earth, should be capitalized or lowercase. Google says, if you use an article ('the earth'), it should be lowercase while ('on Earth') should be uppercase. Is that a fixed rule? Since always the planet E/earth is spoken of, would the reader be confused that sometimes 'Earth' is capitalized and sometimes not?   I am quoting a lot of Bible verses and Bible texts usually use lowercase for 'earth', so than one would get 'on earth' - lowercase when a Bible verse is quoted, but 'on Earth' - capitalized within the text, which I find inconsistent.   If anybody could recommend how I might handle this issue, I would greatly appreciate it.   I have googled extensively but still can't find the answer.


What is the equivalent of hook_translated_menu_link_alter() to alter a menu link?

I want to alter the menu link in Drupal 8. In Drupal 7 we can achieve this using .  function module_translated_menu_link_alter(&$item, $map) {   global $user;    if (!empty($item['access'])) {     // Administrator will access all menu's.     if (strpos(current_path(), 'admin/structure/menu/manage/' . $item['menu_name']) === 0 && user_access('administer menu')) {       return;     }     // If userid is equal to menu user id.     if ($user->uid == 1) {       $access = 'UNBLOCK';       break;     }    // Block menu.     else {       $access = 'BLOCK';     }     // Access FALSE if Menu not for USER.     if ($access == 'BLOCK') {       $item['access'] = FALSE;     }   } }   In Drupal 7 I am hiding/disabling menu based on some conditions like the user ID.  Similarly, I want to alter the menu link in Drupal 8. How can I achieve it?


What exactly is a bound state and why does it have negative energy?

Could you give me an idea of what  mean and what is their importance in quantum-mechanics problems with a potential (e.g. a potential described by a delta function)?  Why, when a stable bound state exists, the energies of the related stationary wavefunctions are negative?  I figured it out, mathematically (for instance in the case of a potential described by a Delta function), but what is the physical meaning?


Mapping Circles by Möbius Transformation

I need to find a Möbius transformation which takes the circles $|z|=1$ and $|z-\frac{1}{4}|=\frac{1}{4}$ to concentric circles. I can assume that the images are centered at $0$, and that the unit circle is mapped to itself and the point $1$ is fixed. So I'm looking for a function of the form $Tz= \frac{z-a}{\overline{a}z-1}\frac{\overline{a}-1}{1-a}$.  I tried using $a=4$ which maps $\frac{1}{4}$ to $0$, but this doesn't work. So I'm not sure how to choose $a$.


What type of control joint is best for my concrete project?

I'm looking at getting a lot of concrete work done and am looking to educate myself past the minimal anecdotal information I posses so that I can have a better conversation with prospective contractors.    Expansion joints, saw cut or hand troweled - is this just preference or is there a good reason to go for one over another? From an aesthetic perspective I like hand troweled but I've been told that the saw cut can leave the concrete stronger as you are interacting with the wet concrete less.   Google doesn't seem to provide much info by way of POV on this, just that there are options, so I look to the community here to see if there is a collective wisdom.  For perspective, this is for a standard 4" thick driveway, 6" thick apron, and garage floor.


How to vertically center text next to absolute container?

I'd like to vertically center this text next to the image to get a result like this:     .container {   position: absolute;    width: 50%; }  .span {   vertical-align:middle;   display: inline; }

              should be vertically centered next to image

     How to edit my code to center this text next to the ABSOLUTE container?  Any help would be very appreciated. Thanks.


so I need to use a template class as a container, so I need to create a new associative container that's derived from STL set, so far this is what I have (Code Snippets from relevant parts).  In UpdatableSet.h  #include <set>  template <class T> class UpdatableSet : public std::set<T> { public:     UpdatableSet(){};     ~UpdatableSet(){};     bool add(T); private:     std::set<T> set; };   add(T), this method is supposed to add the T to the set and if it was successful, return true, or return false, not sure if this is correct or not, because I don't fully understand the concepts.  template <class T> bool UpdatableSet<T>::add(T update) {      if(set.insert(update).good())     {         return true;     }     else          return false;  }   in main  UpdatableSet<CDAlbum> updatableAlbumSet; //Want this to be a set of objects of the CDAlbum kind updatableAlbumSet.add(theCDAlbum); //how do I use this to add to the set?   Ultimately I'm getting this compilation error  symbol                             in file bool UpdatableSet::add(CDAlbum) task2Main.o ld: fatal: symbol referencing errors. No output written to a.out  EDIT: So you guys were right, I've figured out that I've needed to create the methods myself instead of deriving it from set.  here's how it looks now  in UpdatableSet.h  template <class T> class UpdatableSet {        public:     UpdatableSet(){};     ~UpdatableSet(){};     bool add(T);     int size();     int begin();     int end();     typedef typename set<T>::iterator iterator;      private:     std::set<T> set;  };  template <class T> bool UpdatableSet<T>::add(T update) {     return set.insert(update).second; }  template <class T> int UpdatableSet<T>::size() {     return set.size(); }  template <class T> int UpdatableSet<T>::begin() {     return set.begin(); }  template <class T> int UpdatableSet<T>::end() {     return set.end(); }   However I'm getting this error now "task2Main.cpp", line 67: Error: Cannot use int to initialize __rwstd::__rb_tree, std::less, std::allocator>::const_iterator.  "task2Main.cpp", line 67: Error: The operation "__rwstd::__rb_tree, std::less, std::allocator>::const_iterator != int" is illegal.


Is it normal/advised to finish your masters to get a better PhD offer?

Let's say someone finishes their honours degree and would like to do their PhD.  However, the scholarship offers they receive aren't at the places they'd have hoped.  My question is whether it is worth doing an additional year to finish their masters with the hope of getting into their preferred university.  My personal situation is that I would like to study in Singapore or Hong Kong, but only received offers from Australian universities.


I would like to move a polygon's center to another location by specifying a latitude and longitude. I am using a EPSG:4326 - WGS 84 projection.


How can I prevent chrome from remember its last location?

When I run Chrome , it remembers its last position As you can see here :  (also , if I start a new 100x100 chrome instance , the next time I invoke a new chrome , it is opened same size , near it - I don't want that) Question : Is there any setting/switch for chrome to not remember its last location ? NB I'm looking for a solution without using extension


Downvoting should cancel an upvote before attempting to apply the downvote

It seems that to some users, clicking "downvote" would be the way to cancel their upvote. However, if the user has insufficient rep, they receive an error message. Maybe clicking downvote should cancel an upvote (if available) and require a second click to actually downvote (after all, who is likely to go from a positive to a negative opinion?).  Obviously if there is no upvote set, downvote should immediately downvote.  For example, .


How yo use Type.GetType() to pass an unknown type at runtime to a Generic Method

There is a slight possibility I could have worded the title incorrectly and  I apologize if this comes across as already answered (and I just have not found it).  Having said that I have searched this site for several hours and have come across several very involved attempts (not clear enough) of using reflection, which I don't want to use because of performance reasons. I am already using Type.GetType() which searches through the .dll to find the type.  So, without further ado, here goes..  I have a method in a class that accepts a generic type:  public class SomeClass {     public TList Execute<TList, TItem>(string text)         where TList : ICollection<TItem>, new()         where TItem : new()     {         TList list = new TList();         TItem item = new TItem();         ...set properties and add to list...         ...implementation not important...         return list;     } }   Usage (calling method):  public void callingMethod(string typeNameString, string typeItemNameString) {     Type T = Type.GetType(typeNameString);     Type Ti = Type.GetType(typeItemNameString);      SomeClass sc = new SomeClass();      // and here is where things falls apart drastically..     // not sure exactly what to do here as it seems noting works     var result = sc.Execute<T,Ti>("hello text"); //no luck..'T' is a variable but used as a type     var result = sc.Execute<Type.GetType(typeNameString),Ti>("hello text"); //no luck...operator '<' cannot be appliedto operands of type 'method group' and 'Type'      //This works fine     List<Invoice> _invoices = sc.Execute<Invoices, Invoice>("hello text"); }  public class Invoice { //properties omitted }  public class Invoices : List<Invoice> {}   This seems like a very straight forward/logical approach, but is proving not to be the case.  What am I missing?  I appreciate the time and dedication individuals take to respond to questions on this forum.


Generation of pixel statistics in multiband raster

I want do generate for each pixel the average and standard deviation or better the variance coefficient for raster with 57 bands. The average should be average of the value for all bands. The result should be one raster, text file or something similar.  I tried a lot of tools. so far I have not been able to solve my problem.  I have no experience with Python, which is maybe my main problem.  Have you some ideas? If you recommend me solutions with Python could you do it foolproof?   The  from 2014 couldn't help me.


Show the date on the System Tray in Windows 10

I have my Taskbar moved to the left side of the screen.  How do I show the date below the clock on the system tray?  Windows 10 is quite new, so there isn't much on the internet about it.


I want to make a 3D arrowhead in latex. I used the below code but it only can achieve a 2D arrowhead. Is it possible to make 3D arrow head in latex?   This is my code  \documentclass{llncs} \usepackage{amsmath, amsfonts, amssymb} \usepackage{graphicx} \usepackage{amssymb} \usepackage{tikz} \usepackage{caption} \usetikzlibrary{arrows,positioning,calc,topaths, fit, backgrounds} \usetikzlibrary{arrows,positioning,calc,topaths, fit, backgrounds} \definecolor{arrow_color}{rgb}{0.2, 1, 0.6}  \begin{document} \begin{figure}  \begin{tikzpicture} \node[rotate=-90,inner sep=0pt] at (1,0.0) {\tikz\draw[line width=2, -triangle 90,arrow_color, shorten >=-2mm, shorten <=0mm](0,0) ;}; \end{tikzpicture} \end{figure} \end{document}   The current output is


Prove that every natural number $n\geqslant 12$ can be written as a linear combination of $4$ and $5$ with non negative integer coefficients.   I proceeded by induction.  For $n=12$ we have $12=3\cdot 4 +0\cdot 5$  Let $n>12$  Suppose that the hypothesis is valid  for every $k\in \mathbb{N}$ with $12<k<n$  Now by doing some calculations we see that for $n=13,14,\ldots,24$ can be written as a linear combination of $4$ and $5$ with non negative integer coefficients.  Suppose that $n>24$ then $n=12+(12+k)$ where  $12<12+k<n$ and by induction hypothesis $12+k=4x+5y$ , $x,y\geqslant0$  We conclude  that $n=12+4x+5y$.  Is this proof right or does it have a logical mistake?  My question is a proof verification and about a possible logical mistake in using the strong induction. It's not an exercise that I want someone to solve for me.


Why is the complexity of reverse algorithm O(n)?

I have this implementation of reverse algorithm:  function reverse(a) {     let left = 0;     let right = a.length - 1;      while (left < right) {         let tmp = a[left];         a[left] = a[right];         a[right] = tmp;          left += 1;         right -= 1;     }      return a; }   For any array of n elements the loop will run n/2 times. But I read everywhere that reverse algorithm complexity is O(n)? So why is the complexity O(n)? Because of two operations on each cycle?


$f$ is an entire function with Im $f\geq 0$

$f$ is an entire function with $\operatorname{Im}f \geq 0$. Then which of the followings are true: 1) $f$ is constant. 2) $\operatorname{Re}f$ is constant. 3) $f = 0$. 4) $f'$ is a non-zero constant.  That (3) & (4) are wrong can be shown by using $f(z) = i$. But I'm clueless about the remaining two options.


Why is the derivative of $e^x$ equal to $e^x$? And why the derivative of $a^x$ is equal to $ a^x\ln a$?

I don't understand the reasoning behind it. I was trying to figure it out with the chain rule in the case of $e^x$, but the I would get $(X(e)^x-1)(e^x)$ and I can't find the reasoning by my own


Store a method's name in a variable and call that method using that variable

I want to call a method whose name (with or without parentheses and parameters) is stored in a string variable and call this method using this variable.  Until now I have found that in Java if you do this:  String str = "func();"; System.out.println(str);   This would call method func(). But I don't think this is recommended. So, my question is:   Is it okay to do this? Is there any other way to do this?   Thanks.


I have a do While loop as follow:  do{       System.out.println("Enter customer type (r/c/t): ");       customerType = sc.next();    }    while(customerType !="r");   I am expecting the program to loop as long as I don't type r when the program prompts me so. However the program still loops when I type r, I am not sure why, hope someone can help. Thank you.


Is there any way to cause lava source blocks to replicate in Minecraft?

You can create an infinite well using two buckets of water and a hole that is one block deep and two blocks by two blocks wide.  I'm wondering if it's possible to do a similar thing with lava, now that obsidian is so valuable for making portals.  I have an idea for making it easier for creating portals, but it's dependent on having an effectively infinite source of lava very close to where I want to create the portal.  So is this possible?  If so, how?


I tried to align the equation and have some text on the equal sign. But it turns out that the equal sign that has text over it is no longer aligned to previous one anymore (I believe it is the text "ccc" that is aligned). How do I fix the problem to let the equal sign aligned but not text over it?  \begin{equation} \begin{split}     a  &= b \\                &\overset{ccc}{=}d\\        &= e\\ \end{split} \end{equation}


Are all the primes greater than $3$ in form of $6n\pm1$

today I've encountered the following excercise:  Show that all the primes greater than $3$ are in form of $6n\pm1$...  My initial thought was that numbers are in form of $6n,\quad 6n\pm1,\quad 6n\pm2, \quad 6n\pm3$ in respect to $6$ and $6n\pm2=2(3n\pm1),\quad 6n\pm3=3(2n\pm1)$ so since they are multiples of $2$ and $3$ they can't represent primes. This however didn't completely satisfy me, because I've shown that other forms in respect to $6$ aren't primes, but that doesn't necessarily mean that $6n\pm1$ must be prime. I thought perhaps I can do induction but I don't know what inital property to use for a start, or perhaps I am overseeing it right now.  Thanks in advance!


Expected number of steps for a bug to reach position $N$

A bug starts at time $0$ at position $0$. At each step, the bug either moves to the right by $1$ step $(+1)$ with probability $1/2$, or returns to the origin with probability $1/2$. What is the expected number of steps for this bug to reach position $N$?  I tried to first find the possibility that this bug reaches $N$ as the number of steps goes to infinity. The recurrence equation I find is $$p_n = \frac{1}{2}p_{n-1}$$, where $p_n$ is the possibility for the bug starting at position $n$ to reach $N$. We also have the boundary condition $p_N = 1$. Then we see that $p_{N-1}=2$, and that $p_0 = 2^N$, which doesn't make sense at all because it is greater than $1$. I think I should sort out the value of probability first, and think about the number of expected steps later.  I'm sure there is something wrong with the recurrence equation, but what's wrong about it?


MySQL high availability, failover and replication with Latency

We are in the process of implementing a new CMS (Drupal 6.x) that runs on MySQL. We have two data centers -- primary and secondary -- with known latency between them. We're unsure which version of MySQL we will run ... either Community or Enterprise, but that is a TBD. Looks like we will be running the InnoDB engine, OS is going to be RedHat EL 5.5 The primary servers are going to be active, while the secondary will be passive or hot stand-bys.   I would like to implement replication, high availability and automated failover in MySQL across the two data centers.   After a failover to the secondary servers, when we fail-back to the primary servers, we'd like to have data synched from the secondary DB to the primary DB quickly and completely so that we can continue to serve content from the primary servers.  I am interested in knowing what technologies/tools/best practices can be used to solve/address these issues. Also, any gotchas or ah-ha moments would be much appreciated as well. I've read up on MySQL replication, clustering, and at some 3rd party tools like Tungsten and Dolphinics, but I a unsure what the is best course of action.  Thank you for your time!  KM


CPU usage pegged at 100% on windows vista

According to Task Manager the CPU Usage is 100% but when I click on the "Processes" and sort by CPU in descending order I see that the process using the most CPU is taskmgr.exe at 02%. All the others are at 00%. So what's eating up all my CPU cycles?  The CPU is a Intel Core 2 Solo CPU U3500 @ 1.40GHz. So it's not a spectacular CPU but still...  the behavior I'm seeing still doesn't make any sense.  Also, Aero is disabled.


How to describe a systematic way to do division with remainder in $Z[i]$

link 1:   link 2:    I have found 2 solutions, the second one convinced me. But so far I cannot formally prove that the method given in the first link gives a reminder with its size function less then the size function of the divisor. And I think maybe there exist Gaussian integers $a+bi$, $c+di$, such that using the division algorithm in link 1 to divide $c+di$ by $a+bi$ gives a remainder whose size function value is greater than the size function value of $a+bi$.  Is it possible? If it is possible, could someone find such $a+bi$ and $c+di$?If the method in link 1 also allows us to always get a remainder with size function value less then the divisor, could someone formally prove that?  Thanks in advance!


Calculation of $\displaystyle \int\sqrt{\tan x+2}\;dx$  $\bf{My\; solution::}$ Let $\displaystyle \tan x+2 = t^2 $, Then   $$\displaystyle \sec^2 (x)dx = 2tdt\Rightarrow dx = \frac{2t}{1+\tan^2 x}dt = \frac{2t}{1+(t^2-2)^2}dt$$  So Integral convert into $$\displaystyle \int \frac{2t^2}{(t^2-2)^2+1^2}dt$$  Let $\displaystyle (t^2-2) = u\Rightarrow t^2=u+2\;,$ Then $\displaystyle tdt=\frac{1}{2}du$  Now How can i solve after that  please help me  Thanks


Apt upgrade failing - unmet dependencies - libsensonrs-config

Im trying to update from 19.10 to latest Ubuntu, but im getting the following error: ~ # apt upgrade -y Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libsensors-config : Conflicts: libsensors4 but 1:3.4.0-4 is to be installed E: Broken packages  Any suggestions on how to fix this?


How should a GM deal with "standing orders?"

I have a player who always tells me whenever he goes into a dungeon or other hazardous location,     I am always checking for traps wherever I go. Assume that I am always looking around, wary and being alert for the slightest sound. Also, assume that I am searching for secret doors as well.   And also     I always recover my spent ammo [crossbow bolts]. Unless I say otherwise, I always reload my crossbow.   For the first case, I just assume that he is being alert but the player still gets upset when I ask him to make the skill check rolls. For the second case, I told him outright that I am not his automated helper.  The player also seems to mean that "Since I am actively looking/searching etc., I should either a) automatically pass without making a check or b) get a big bonus to my checks." So what happens is things like "I am going down the alleyway, being extra careful, checking all my sides", then he rolls awfully (or the opposition rolls too well) and the player complains that he should get a free pass.  I'm not the kind of GM that says "you didn't say you put on clothes so you are now wandering outside naked", but perhaps the player picked up this habit from other games.  How should a GM deal with a player's desire for this kind of "standing orders?" Is it reasonable to have them checking for everything and doing everything automatically?  Does the burden need to be on me, the GM, to do so?


maximum of a function from proportions using optim() in R

I would like to receive the maximum of a function f(x) where the x are proportions that sum to one.   f.max <- function(x){       x1 <- x[1]             x2 <- x[2]       x3 <- x[3]        x4 <- 1 - (x1 + x2 + x3)           #(x1 + x2 + x3 + x4) should always be 1            d <- (x1*x3 + x1*x4 + x2*x3 + x2*x4)        x1*4 + x2*6 + x3*3 + x4*2 + d*8    #function to be maximized       }  optim( par=rep(0.25,3), fn=f.max, gr=NULL, method=c("L-BFGS-B"), lower=rep(0,3), upper=rep(1,3), control=list(fnscale=-1) )   While I can constrain the inital values in optim() by the lower= and upper= statement, I do not manage to specify that the maximization is done so that always: (x1 + x2 + x3 + x4) = 1


Remove the kicking command, or improve it

Kicking in chat is pretty useless and/or pointless. Everything that happens when you are kicked is, you are sent to the room list. There's no kick message, no "kicked by" message, no kick reason, nothing. For all a user knows, it's either a transient bug or a network hiccup. How is that useful?  The user can also immediately rejoin the chat. There's no repercussions for the user being kicked, it's just annoying. Even as a mod-only tool it's basically useless and annoying/confusing rather than a helpful moderation tool.  You may want to consider either removing it, or turning it into something more effective -- maybe user-specific room-specific 30 seconds long silencing.


Could excess 401(k) contributions be used to game/maximize matches from different employers?

Suppose I max out my 401(k) really early. This avoids the risk that if I lose the job I would have lost the chance to contribute to it fully. However there is another risk. My company doesn't match. Suppose I do lose my job in the middle of the year and go to another company that matches. Then I would lose out on the ability to get the matches from the new company in the rest of the year, because I (technically) cannot contribute more 401(k).  But... Since the new employer doesn't know how much I may have contributed, I may (should this scenario of changing jobs really occur) simply pretend I didn't know anything and contribute to the new company's 401(k) plan anyway (taking advantage of the matches), as if I didn't have 401(k) contributions already. Then, after the end of the year, I can ask the old 401(k) plan for excess contributions back from that plan, as  before April 15th.  To summarize, the strategy is, if I switch jobs, contribute fully to each job, and then at the end of the year, strategically withdraw excess contributions from the one that had the lowest match.  Would this strategy: (a) work? (b) make sense? (c) be legal? (d) be ethical?


Does using the guest account in Ubuntu help for Spectre and Meltdown protection?

I was wondering if I use my computer running Ubuntu only for browsing while using the guest account on an unpatched PC logging in to any site I browse - will it be possible to steal any passwords typed into the browser or not?   Can e.g. a harmful web site steal my administrator password for the PC or even the WiFi password?


I have the same problem with this topic   My problem is that what should I do if I want a result:  1 | A, B 2 | A


Existence of fixed point given a mapping

Let $A$ be a closed and bounded subset of $\mathbb{R}^{n}$. Given that $f: A \to A$ satisfies $d(f(x),f(y)) < d(x,y)$ for all $x,y \in A$, $x\neq y$ where $d$ is the usual Euclidean metric. Show that $f$ has a unique fixed point.    My observations:    Since $\mathbb{R^{n}}$ is complete, then $(A,d)$ is complete since $A$ is closed; Since $A$ is bounded, then $A \subset B_{R}$ for some $R > 0$; Banach Fixed Point Theorem guarantees a unique fixed point if $f$ is contraction on $A$.   Please correct me if I am wrong. My quandry here is showing that $f$ is a contraction, i.e.  $$ d(f(x),f(y)) \leqslant k\cdot d(x,y), \hspace{3mm} k \in (0,1) $$  I'm looking for some hints or tips. Thank you.


I am interested in the subsequent measurement of energy, like assume the energy of the electron was measured to be $E_1$ and the wavefunction of the electron is described by a finite superposition of eigenfunction of energy. After the first measurement will the subsequent measurement have the same energy measurement which is $E_1$. I think this question has been asked multiple times, but what I am confused about is that if all the subsequent measurement was of state $E_1$ that means that the uncertainty in energy is zero, which implies that the uncertainty in time measurement has to be infinite.


Is it possible to transfer schools in the middle of a Master's program?

I entered my university a year ago. I am enrolled in the master's thesis program. I wanted to do a thesis  , but none of the faculty in my department who do fluid dynamics have an opening for a new researcher in their group. It seems I wont be able to find a thesis advisor in my subfield. What's my best option in this situation? is it possible to transfer schools a year in?


In my addon panel, how can I have an object selection box?  And what data type would I use to store the the selected object?  It should look like this:


Let $C$ be a figure "8" in th $xy$ plane and let $S$ be the cylindrical surface over $C$ that is,  $$S=\{(x,y,z)\in \mathbb{R}^3; (x,y)\in C\}.$$  Is the set $S$ a regular surface ?  So my answer is no because based on the proposition 2 in Do Carmo page 62 the image of local charts should be in this forms: $z=f(x,y)$ or $y=g(x,z)$ or $x=h(y,z)$,  but the projection of $S$ in any of the planes doesn't have a one-to-one functions so $S$ in not a regular surface  what do you think ?


If I am looking to build a network based on road features and attributes, is Network Analyst my best bet?   Is it my only bet?   The world of FOSS (Free and Open Source) is new and exciting to me, but I find it difficult to navigate as a newbie.  My intended uses would include tracing the network, finding intersecting features at given locations along the network, and creating network decision rules for route creation.     Answers so far have been great, but could anyone share their personal experiences and preferences as far as routing interfaces are concerned?