Vector class implementation using template in C++

I am implementing a Vector class using template in C++. Below is the code that I have written. There are two source files and a header file as shown below:  Vector.h:  template <class T> class Vector {     T *data;     int vSize;     int vCapacity; public:     Vector();     ~Vector();     void PushBack(const T&);     void PopBack();     int Size() const;     int Capacity() const;     void Reserve(const int&);     bool Empty() const;     T& operator[](const int&); };   Vector.cpp:  #include "Vector.h" /////////////////////////////////////////////////////////////////////////// template <class T> Vector<T>::Vector(){     data = nullptr;     vSize = 0;     vCapacity = 0; } /////////////////////////////////////////////////////////////////////////// template <class T> Vector<T>::~Vector(){ delete[] data; } /////////////////////////////////////////////////////////////////////////// template <class T> void Vector<T>::PushBack(const T& val) {     if(vSize == vCapacity)     {         if(vCapacity == 0)         {             Reserve(1);         }         else         {             Reserve(2 * vCapacity);         }     }     data[vSize] = val;     vSize++; } /////////////////////////////////////////////////////////////////////////// template <class T> void Vector<T>::PopBack() {     vSize--; } /////////////////////////////////////////////////////////////////////////// template <class T> int Vector<T>::Size() const{ return vSize; } /////////////////////////////////////////////////////////////////////////// template <class T> int Vector<T>::Capacity() const{ return vCapacity; } /////////////////////////////////////////////////////////////////////////// template <class T> void Vector<T>::Reserve(const int& newCapacity) {     T *newData;     try     {         newData = new T[newCapacity];     }     catch(...){         cout << "Memory allocation failure...";     }      for(int i = 0; i < vSize; i++)     {         newData[i] = data[i];     }     delete[] data;      data = newData;     vCapacity = newCapacity; } /////////////////////////////////////////////////////////////////////////// template <class T> bool Vector<T>::Empty() const {     return (vSize == 0); } /////////////////////////////////////////////////////////////////////////// template <class T> T& Vector<T>::operator[](const int& offset) {     return data[offset]; }   Main.cpp:  #include "Vector.h" int main() {     Vector<int> v;     return 0; }   I am getting below error.  ||=== Build: Debug in CppApp (compiler: GNU GCC Compiler) ===| obj\Debug\Main.o||In function `main':| D:\CodeBlocks\CppApp\Main.cpp|5|undefined reference to `Vector<int>::Vector()'| D:\CodeBlocks\CppApp\Main.cpp|18|undefined reference to `Vector<int>::~Vector()'| ||error: ld returned 1 exit status| ||=== Build failed: 3 error(s), 0 warning(s) (0 minute(s), 4 second(s)) ===|   I am unable to understand the error. Request you all to help. I have tried several other attempts to understand it, but failed to do so. Thank you :)


Add page number with total page number on each page?

I am using \pagestyle{plain} to add page number to each page in its bottom. If I want something like " page number / total page number" or " page number out of total page number", how shall I do that?


Significance testing of three or more correlations using Fisher's transformation

Following on from my earlier posts, as far as I can understand, if I have three correlation coefficients, I will have to test them in pairs to see if there is a significant difference among them.   This means that I would have to use Fishers transformation to work out the z score of r and then the p value of z (which the recommended calculators in the earlier posts do, thankfully) and then ascertain if the p value is higher or lower than my alpha value (0.05) for each pair.  i.e. If 21 to 30 years olds is Age Group 1, 31 to 40 years is Age Group 2, and 41 to 50 years is Age Group 2, my comparison of the correlations between their shopping habits and weight loss would be:   Group 1 vs. Group 2 Group 1 vs. Group 3 Group 2 vs. Group 3   Instead of doing three separate calculations, is there a way to do all these calculations in a single step?


How can I loop two different animations with one playing right after the other?

I am trying to loop two different animations in my game, one right after the other. In this case I am trying to have SlimeJump1 play, then SlimeJump2 play, then have them continuously play in this order. I have already tried delay sensors, and they won't work. How would I do this? The download link for the file is . Thank you!!!


Expected number of trials until completion

You've got a discrete uniform distribution - what is the expected number of trials until each point is hit at least once?  I started my thinking with maybe a Geometric distribution representing each individual point - if your probability of success is 1/100 in the uniform distribution, then would the number of trials until first success be 100? That is for one point so to have 100 points = 10000 trials until you hit 100 points?? That doesn't sound right, because if you fail to hit one specific point, you've succeeded in hitting a different point, so it's not exactly a matter of first success at one point. What am I missing?  Follow up question: how about after 100 trials, what percentage of points are expected to have been hit?


Example of a space that is connected but not path connected?

Wikipedia says that path-connectedness is a stronger property than connectedness.  My intuition cannot seem to come up with an example of an object that is connected but not path-connected. Are there any examples?


-> I have a field say Amount in Opportunity Object.   -> I have created a Validation Rule that If Amount is empty/null throw an error.  -> I have a workflow which will fire on creation of Opportunity, to empty the   Amount field.  Now when I create an Opportunity, It creates a record with Amount field as empty.  -> Now I have created a trigger  After Update Trigger, which will update another field in Opportunity, say a checkbox Revised Opportunity.  Now whenever I try to create an Opportunity there is an error caused due to trigger and after that validation rule.  I checked the debug log, I am able to see an Opportunity ID related to my newly created Opportunity and error message it displays in debug log is "Record is Read Only". I want to know how does this works? Does my record gets deleted(which I don't see in the log as being deleted) Or does the Process is not committed/rollback happens?  Because I tried creating an auto number(created two records with trigger as inactive and activated trigger and after two fails, I again inactivated the trigger and tried to save and found autonumber being incremented by 2) thinking that it won't get incremented in failing record save but auto number does get incremented. So, does it mean that my record is getting deleted in the Order of Execution?


I have a database which takes up 500gb, I have noticed that my ple is low even though I have 100gb of RAM. I have searched in google to find reasons of that and I found some interesting queries. I have a query which runs on very big table even though it uses clustered index it causes ple to drop. I checked  what is in buffer pool before and after query and moment after query is done and it looks like DB has to free some space for index used in my query and after query old indexes are loaded to the buffer pool. My question is how much RAM memory should DB have, how could I calculate it, should it be amount which will let me keep all used indexes in memory at once? Or maybe I should reduce data kept in tables so indexes will be smaller?


Please redirect to an HTTPS connection by default on stackoverflow.com  To illustrate the problem, please see the screenshot below where a man-in-the-middle attack is being used to forge responses from Stack Overflow and inject advertisements.    A wildly crude estimate of the financial cost of this attack is as follows:   Xfinity hotspots / All Wifis in the US = 1.5m/77m = 2% SO revenue = $2m in 2010 * 5x growth = $10m per year 50% of ad clicks will be on the injected ad (because it is more interactive and new) 20% of visitors in the US   LOST REVENUE IS $20,000 PER YEAR DUE TO COMCAST ALONE    Sources for numbers above


What is the purpose of sockets in layman terms?

I met several times the term "socket", so I looked it up on different sites, but each of them required too much knowledge in order to understand the explanation.  What I read were things like:   sockets fall into the same category as pipes and name pipes sockets offer some kind of two-way communication sockets are used in inter-process communication sockets are sometimes mentioned with regard to networks   I do not really get the big picture, what is the very purpose of a socket. Could you explain it maybe in terms that would not require too much technical knowledge (like C language)?


I'm trying to find out whether sequence $a_n= \frac{n!}{n^n}$ converges or not. My textbook says to compare with $\frac{1}{n}$, and my answer sheet says that $\lim_{x\to \infty} {\frac{n!}{n^n}}\leq \lim_{x\to \infty}\frac{1}{n}$. I don't get this part... Is $\frac{n!}{n^n} \leq \frac{1}{n}$? How did this relationship come about?


Windows Update randomly turning off - Virus/Rootkit?

I deleted my last question. It fixed itself  Anyway after my computer fixed its slow performance problems it now will turn off Windows Update whenever it wants to. I figure this is some sort of virus or security flaw that is making it turn off, but I am very concerned because i have ran multiple virus/malware scans with 2 different scanners (Avast and Malwarebytes) and they have picked up nothing.   In Application in Event Viewer there are multiple cases of Software Protection stopping by an unknown user.   Most of security was logging on and off, besides some misspelled passwords.  And then in System: The Windows Update service entered the stopped state. Then a couple hours later i turned it back on. User is N/A.   What i am asking is how can i fix this? I am concerned about my security of this computer and files that are on it. I havent updated my computer lately, even though Windows Update says i should, but i am nervous to do so because i am afraid this virus/malware/rootkit could do more damage.  This trusty (but dusty) old computer of mine has always filled my needs and i would hate to have to get a new computer or erase my hard drive.  Thank you, and any help is appreciated.


Proving a linear regression is a multivariate normal

Given the simple linear regression y = Beta0 + Beta1x + e (epsilon) and e~N(0,sigma^2), to prove y is a multivariate normal I must show that it is a linear combination of multivariate normals correct?   So since I was given e~N(0,sigma^2), I let zi = ei/sigma and then e = sigma * I * zi. Therefore e = (e1, ..., en) is a MVN. Now do I simply set e = y - Beta0 + Beta1x and then state simply it must be a MVN since e is? I am lost at this help and any help or suggestion would be greatly appreciated! Thanks


What is the biggest display of power through the Force in Star Wars?

I just read today's xkcd "what if" episode .  In there, it is said that the biggest display of Force power is made by Yoda when he lifts the X-Wing out of the swamp in Dagobah. The article only takes into account the original trilogy, though.   I would be very interested in what the Force really could achieve at a maximum level. I remember, for example, that in Star Wars The Force Unleashed you stop an entire spaceship (an Imperial Star Destroyer in fact!) from falling down on you.  So what is the biggest display of the Force in the Star Wars universe?  I know this question might be closely related to , but that one has more of a different angle, as it asked for the person that theoretically would be strongest instead of an actual display of the Force.


Well , Ive been in a train for 15 minutes and everytime I try to catch a pokemon They Run away Please Help !


Adding mods to Minecraft on Ubuntu 14.04

So I have learned that there are no longer any bin folders or .minecraft folders on in the versions of minecraft 1.6 or higher.  I still want to add mods though.  Is there a way to add the mods of my choice without using Magic Launcher or the bin folder (since it doesn't exist)? All help is appreciated.  Thank you :)


Find old web content via Google cache or similar

I have a bit of a problem. My client is running a Joomla 1.0 site and some content (text) was lost. There was no backup configured of the MySQL database. The content was lost approx. around the 16:th of December 2012. I tried finding the old site by using the Web Archive, but no cigar. The site is not even indexed.  I tried to retrieve it via Google cache instead. The cached page itself didn't have the content, but the preview screenshot of the website had the old content. I wrote everything I could read off the screenshot. However, there was content below the screenshot that could not be retrieved.  Here is what I typed into Google Search to find the old page:  site:gerami.se previous ass   Ass = assignments for those wondering ;)  I would really like to get the rest of the text that was below the screenshot when it was taken.  P.S: Whether this thread gets a solution or not, the moral of the story is still the same: Backup is your friend!


Simple pendulum is not so simple as it seems to be?

Does a simple pendulum come to stop due to the action of gravity ?  Consider : No air drag, No change in place.


Why is my download speed around 4Mb/s when I have 50Mb/s connection?

I have a fiber Internet connections. I've tested it at ~50Mb/s. But I downloaded some files on chrome and speed came out around 4-5Mb/s. Why is this so? Please suggest some ways how I can achieve 50Mb/s download speed?


Number of different possible values for the total angular momentum quantum number, $j$?

I wonder what is the number of different possible values that the total angular momentum quantum number $j$ can take for fixed values of the angular quantum number $\ell$ and the spin quantum number $s$. If $j$ can take the following range of values, jumping only in integer steps, $$|\ell-s| \leq j \leq \ell+s$$ is there any formula that gives the number of different values it can take?


Regarding the recalc in question rep increase what happens due to the cap?

When the recalc runs what happens regarding rep capping on particular days? Say I earned 200 solely from questions on one day, will I earn a further 200 when the recalc runs or will I earn zero?  On a similar note if I got no rep from a question upvote on a day will the recalc give me 10, 5 or 0 rep?


Allow 10k users to unilaterally accept or reject suggested edits

As a 10k+ user, I can outright edit any post and change tags using the inline editor.  I am all powerful, and you should bow down to my editorial prowess.  But, if some noob has suggested an edit, I'm immediately castrated.  I can no longer use the inline tag editor, and if I vote to accept the edit, other ... Excuse me, I've a little sick in my mouth ... other users must vote to accept the suggested edit as well before it is officially accepted!  What insanity is this?  Essentially, a noob can hobble a 10k god's editing powers!  I'd suggest that 10k users can immediately accept or reject suggested edits.  It's only right and proper.


describing all possible topologies on a set

Assuming the following: let $X$ be a set with two elements, $X$ = {$a,b$}.  what are all the possible topologies on $X$ ?  The answer I've come up with is: $$\tau_{T}=\{ \emptyset, X\} $$ $$ \tau_{a}=\{\emptyset,\{a\},X\} $$ $$\tau_{b}=\{\emptyset,\{b\},X \} $$ $$ \tau_{D}=\{\emptyset,\{a\},\{b\},X\}$$  My question is, are these correct? and are there any more?  thanks in advance


I must prove that the ring of formal power series $\mathbb{R} [[x]]$ is a Euclidean domain.    So I started and I think I should start with for each nonpower series $P$, define $f(P)$ as degree of the smallest power of $x$ occurring in $P$. In particular, for two nonzero power series $P$ and $Q$, $f(P) < f(Q)$ iff $P$ divides $Q$.


Why apps move from SD card to phone memory after upgrade and how to avoid it?

After upgrade of any app - apps move back from SD Card to phone memory.  After that, to save phone memory, I have to move upgraded app back to SD card.   Is any possibility to avoid this because it is very annoying?  I have Android 5.0.2 on Motorola E second gen phone.


I am currently in a clan with three members. When we tried to initiate a clan war it said we had insufficient clan requirements. Does anyone know what the full requirements are? Is there a minimum clan member requirement?


clean install ubuntu 14.04 erased all win7 partitions, how to recover with testdisk?

am totally new to linux, recently i have installed ubuntu 14.04 on my windows 7 professional desktop, on windows i had 3 partitions (except windows partition) while installation i had not selected any partition to install ubuntu 14.04, while in ubuntu installation i only selected replace windows option and not selected any partition selection options. after installation my desk top has only one hard disk with space of 160 gb. disk showing 5 swap partitions. So, i read and used testdisk to recover erased partitions while running testdisk some problems are facing, attached screen shot.  So, Kindly help me how to use testdisk to recover 3 partitions step by step, what are the requirements to use testdisk, and how to recover successfully without errors.  Thanks in advance,  Tell me next step form here, what to select and what to do ?  from above screen by pressing enter to continue, below screen appear. from this again next step to do ?  Regards Raju B


Show the polycount of selected objects in object mode

How to show the polycount statistics (faces, tris, etc) of selected objects in object mode? The bar on the bottom of screen shows polycount of the whole scene:    I know I can switch to edit mode and select the whole object to view its polycount, but there are two problems: 1) what if I want to know the combined polycount of two or more objects? 2) When there is a Decimate Modified applied, edit mode doesn't have the information of final result.


I`d like to learn how I can select text like with   +^{Left}    until a specific character ("-" in this case) has been found.  Thank you for your help.


Cyber-punk style book, protagonist uses nunchucks and has nanites/bugs that heal

I read this at least twenty years ago, but have no idea how old the book/story was.  Set in some indeterminate point in the future, typical have & have nots style.  The youth battle each other using various weapons but guns are banned for not being 'sporting' (not sure if all projectile weapons treated the same).  The protagonist uses nunchucks and is a loner.  Somehow he gets involved with some science group who are investigating weird growths somewhere.  He gets injured during this but has something in his pores that 'crawl' out and heals wounds but somebody doesn't understand them and keeps picking them off.  The only thing I recall is that he actually has a shotgun shell embedded in one end of the nunchucks so this could be used as gun if necessary.


Set of continuity points of a real function

I have a question about subsets $$ A \subseteq \mathbb R $$ for which there exists a function $$f : \mathbb R \to \mathbb R$$ such that the set of continuity points of $f$ is $A$. Can I characterize this kind of sets? In a topological,measurable or in some way? For example, does there exist a function continuous on $\mathbb Q$ and discontinuous on the irrationals?


Am planning to buy PS4 from Hong Kong and about to return India, do they charge custom duty tax for that once i arrive in india?  Please reply


How to make this shortcode work for post content wordpress

I have been trying but its not working.  but if i try   <?php echo do_shortcode("[mimo]"); ?> <?php echo do_shortcode("[mibaby]"); ?>   it will work fine.  But to apply it in post content using [mimo] [mibaby]  it won't work.  Here is the Functions i am using...  function wpb_custom_new_menuw() {   remove_filter( 'the_content', 'wpautop' ); } add_shortcode('mibaby', 'wpb_custom_new_menuw');    function wpb_custom_new_menu() {   remove_filter( 'the_excerpt', 'wpautop' ); } add_shortcode('mimo', 'wpb_custom_new_menu');   I AM TRYING TO disable/remove wpautop on a single post using shortcode


Characteristic polynomial of a $7 \times 7$ matrix whose entries are $5$


Cannot install bomi media player in Ubuntu 18.04

Cannot add PPA: 'ppa:~darklin20/ubuntu/bomi'.     ERROR: '~darklin20' user or team does not exist.   Showing this message when suing this command:    sudo add-apt-repository ppa:darklin20/bomi   please help me.


More specific to my problem, this is a variation on  which was promptly answered with a counterexample.  Let $\mathbb{M}_n$ be the space of $n\times n$ matrices with real entries.  Let $\overline{\mathbb{M}}_n$ be the space of square $n\times n$ matrices with entries $0$ and $1$.  For any $M\in\overline{\mathbb{M}}_n$ we have $$e^M=\exp(M)=\sum_{k=0}^\infty \frac{1}{k!}M^k.$$     Is $\exp:\overline{\mathbb{M}}_n\to\mathbb{M}_n$ injective?   In other words, are there two distinct $M_0,M_1\in \overline{\mathbb{M}}_n$ such that $e^{M_0}=e^{M_1}$?  Since for fixed $n$ the space $\overline{\mathbb{M}}_n$ is finite we can manually check -- it is injective for $n\le4$, but I haven't been able to convince myself for arbitrary $n$.  For $n=4$ there are $2^{n^2}=65536$ matrices to check, and MATLAB's expm and my hastily written matrix building code took half an hour to complete.  For $n=5$ we have $2^{25}>3.3\cdot 10^7$ matrices to test which would take ten days to run.  For larger $n$ a direct test is out of the question.  The smallest nontrivial examples in my problem are $n=6$, and the interesting ones are $n=12$ and larger.


How to know if user has clicked outside the Modal

I want to close the Modal when user click outside the Modal. I'm not able to find the event which will get fired on this case.  Component:  <aura:component>      <aura:attribute name="isOpen" type="boolean" default="false"/>
          <lightning:button variant="brand"                           label="Button"                           title="Button"                           onclick="{! c.openModel }" />         <aura:if isTrue="{!v.isOpen}" aura:id="modalpopup">

                                                                   <lightning:buttonIcon iconName="utility:close"                                               onclick="{! c.closeModel }"                                               alternativeText="close"                                               variant="bare-inverse"                                               class="slds-modal__close"/>
Modal

Popup

                                                                   <lightning:button variant="neutral"                                            label="Cancel"                                           title="Cancel"                                           onclick="{! c.closeModel }"/>                         <lightning:button variant="brand"                                            label="Like and Close"                                           title="Like and Close"                                           onclick="{! c.likenClose }"/>

                       </aura:if>
 </aura:component>


On a Mac, how to see a list of notifications that came from Google Chrome?

Google Chrome can let a webpage show notifications as a system notification (of the OS).  Is there a way to see a list of the past notifications?


I am using JabRef for my reference in LaTeX.  But the heading for this section is "Bibliography", instead of "References". Commands used in latex:  \bibliographystyle{plain} \bibliography{REFERENCES(this is my bib file)}


Importing a material from blender to unity

I made a low poly tree model that doesn't use textures and instead uses 2 colors and i imported it into unity 5.3.4 and the tree model imports itself without the colors. What i want to know is how to import the colors or how to get those colors that i have in blender to unity or if i have to make a texture has just those colors. I use cycles render and to import my models i save the .blend file in the assets folder in unity.  Thanks in advance.


I need to convert an Array to an ArrayList help please, not sure how to go about it?

I need to convert the array to an array list and am not sure how to do this, I have looked at other articles on here and couldn't seem to get it to work, if anyone could provide me with some pointers as and to how to convert this to an array list that would be fab.   import java.util.*;   public class SearchExamResults  {     public static void main(String[] args)     {         Result[] resultsArray = new Result[20];          input(resultsArray);         sortByMark(resultsArray);         output(resultsArray);     }      public static void input(Result[] array)     {         Scanner kybd = new Scanner(System.in);         for (int i = 0; i < array.length; i++)         {             System.out.println("Candidate " + (i + 1));             System.out.print("\tName: ");             String name = kybd.nextLine();             System.out.print("\tMark: ");             int mark = kybd.nextInt();             kybd.nextLine();            //to flush the kybd buffer              array[i] = new Result(name, mark);         }     }      public static void sortByMark(Result[] array)     {         //selection sort         for (int pass = 1; pass < array.length; pass++)         {             int lastElement = array.length - pass;             int largePos = findLargestMark(array, array.length - pass);             if (largePos != array.length - pass)             {                 Result temp = array[largePos];                 array[largePos] = array[lastElement];                 array[lastElement] = temp;             }             //this is for testing purposes only             //output(arr);          }     }      public static int findLargestMark(Result[] array, int last)     {         int largestPos = 0;         for (int i = 1; i <= last; i++)         {             if (array[i].getMark() > array[largestPos].getMark())             {                 largestPos = i;             }         }         return largestPos;     }      public static void output(Result[] array)     {         System.out.println("\nExam results");         System.out.println("============");          for (int i = 0; i < array.length; i++)         {             System.out.printf("\t%-20s\t%d\n", array[i].getName(), array[i].getMark());         }     }  }


I need to add custom validation to a form, lets says add article form.   I was expecting something like hook_FORM_ID_validate() to handle this, but cannot find anything relavant in the API documentation.  What is the way to add custom validation to a form?


Naively mixing two (or perhaps more) audio signals

this is my first question and I am very much a beginner in electronics so I apologize if this is a too stupid question.  I have Atari punk console and another small homemade audiomaking circuit. These two have mono audio signals as outputs and I would like to combine these as one in the simplest possible way. I know next to nothing about audio processing but I believe that the strength of the two signals is roughly the same.  What would a neat solution be? It would be really nice if I could extend the solution later on to more than just two signals but thats not really important.  Any hints, references, guides, links or ideas would be highly appreciated.


Domain redirects to cgi-sys/defaultwebpage.cgi

I have recently moved my domain to new hosting. Now when I try to access my site (example.com) it is being redirected to http://example.com/cgi-sys/defaultwebpage.cgi  If I use the domain name with a dot at the end, the website loads normally. I do not have any redirection configured, so what might be causing this?


Why ignore the denominator of bayes rule?

I am a new beginner in stats. I have specifically diverted my attention towards this because, I wish to understand the concept of Deep Bayesian Learning, so I am starting with the basics. The question is:   The Bayes rule equation is given by   $P(X | Y)$ = $\cfrac{P(Y | X). P(X)}{P(Y)}$  But, I have noticed in some places, the denominator being ignored entirely and using just the numerator of the RHS of the equation. making it:  $P(X | Y)$ = $P(Y|X).P(X)$  Is there some special case where we can ignore the P(Y)? as in when P(Y) = 1? But, if that's the case, wouldn't all the things become very easy: P(Y | X) will become 1, and P(X | Y) will be just P(X) and done.


Checking for required M4 macros...   libtool.m4 not found   glib-gettext.m4 not found   intltool.m4 not found   pkg.m4 not found ***Error***: some autoconf macros required to build Package   were not found in your aclocal path, or some forbidden   macros were found.  Perhaps you need to adjust your   ACLOCAL_FLAGS?   I've noticed most variables are paths and error output above indicates that aclocal requires one as well. If that is the case : what is aclocal, how can I find it(will apt-file search work?), and what is meant by flag anyway?


How can I recover data from an unmountable drive, and copy it to a new drive?

I recently switched my media center back to Ubuntu 16.0.4 from Windows 7. I'm running separate TV Show and Movie drives, which contain all of the content for Plex. My Movie drive mounted perfectly fine, and I was able to configure it via fstab. However, my TV show drive shows bad sectors, and won't mount. Being that this drive is the one being written to the most (new content added daily, and also watched constantly), it makes sense that it would give out before the other.  I've ordered a new WD Gold drive of the same capacity to replace it, but I need to know if there is a way to recover the data stored on here, and copy it to the new drive.


Illegal value for primitive issue in JSON

I have following JSON Format  lstSelectedIds-->     [{"Id":"a0k1k000000QTPrAAO","Name":"00006144","User__c":"0051k000000wvYAAAY","User__r":{"Name":"Wissam Mahmassani","Id":"0051k000000wvYAAAY"}},{"Id":"a0k1k000000QTQcAAO","Name":"00006191","User__c":"0051k000000wvhqAAA","User__r":{"Name":"Nischitha Devaraj","Id":"0051k000000wvhqAAA"}}]    [     {     "Id":"a0k1k000000QTPrAAO",   "Name":"00006144",   "User__c":"0051k000000wvYAAAY",   "User__r":{        "Name":"Wissam Mahmassani",      "Id":"0051k000000wvYAAAY"   }  },   {     "Id":"a0k1k000000QTQcAAO",   "Name":"00006191",   "User__c":"0051k000000wvhqAAA",   "User__r":{        "Name":"Nischitha Devaraj",      "Id":"0051k000000wvhqAAA"   }  },   {     "Id":"a0k1k000000QTfXAAW",   "Name":"00007116",   "User__c":"0051k000000wvuXAAQ",   "User__r":{        "Name":"Ranjan Vasudeva",      "Id":"0051k000000wvuXAAQ"    } } ]   cOMPONENT:  <aura:attribute name="LstOfAddedUser" type="List" description="Hold the list of added userUser Data"/>   Passing value in JS:      action.setParams({         "selectedIds":JSON.stringify(cmp.get("v.LstOfAddedUser")),         "pageNumber": pageNumber,         "pageSize": pageSize,      });   Following Line causes error:  List<String> lstSelectedIds = (List<String>)System.JSON.deserialize(selectedIds, List<String>.class);   Class:  public static UserDataTableWrapper NextPagination(string selectedIds,Decimal pageNumber, Decimal pageSize){     System.debug('lstSelectedIds-->'+selectedIds);     List<String> lstSelectedIds = (List<String>)System.JSON.deserialize(selectedIds, List<String>.class);     wrapper class:   public class UserDataTableWrapper {            @AuraEnabled            public Integer pageSize {get;set;}           @AuraEnabled           public Integer pageNumber {get;set;}           @AuraEnabled           public Integer totalRecords {get;set;}           @AuraEnabled             public Integer recordStart {get;set;}             @AuraEnabled             public Integer recordEnd {get;set;}             @AuraEnabled              public List<GSS_User_Data__c> contactList {get;set;}         }   Error:  Illegal value for primitive


Disabling the Adaptive Activation area in menus in Kubuntu 14.10 Plasma 4

I use Kubuntu 14.10 Plasma 4 and it seems to use some sort of , i.e. it  eliminates corner steering by default. This affects all applications I have tried (kickoff start menu, Eclipse, Google Chrome) so it seems to be a system setting.    (Source: E. Tanvir, J. Cullen, P. Irani and A. Cockburn. "." CHI 2008.)  Is there anyway to disable Adaptive activation areas in the menu to allow corner steering?


C string assignment gives segmentation fault

I am new to C and I want perform this task: declare and initialize a string and then reassign each string element to a new value.  Writing the code in this way:  char *str = "geeksforgeeks\0";  for (int i = 0; str[i] != '\0'; ++i) {     str[i] = 'a'; }   throws a segmentation fault.  But if I write the code in this manner:  char string[] = "geeksforgeeks\0"; char *str = string;  for (int i = 0; str[i] != '\0'; ++i) {     str[i] = 'a'; }   the program behaves correctly.  Also this code:  char str[] = "geeksforgeeks\0";  for (int i = 0; str[i] != '\0'; ++i) {     str[i] = 'a'; }   behaves correctly.  What is the difference between the two? Should't be equivalent?


What will be the pdf of $X+Y$ if $X$ and $Y$ are iid from Cauchy?

Suppose $X$ and $Y$ follow Cauchy distribution independent of each other. What will be the pdf of $X+Y$?  What I got by using convolution theorem is that the density $g$ of $X+Y$ is $:$  $$g(x) = \int_{-\infty}^{\infty} f(y) f(x-y)\ \mathrm {dy}$$ where $f$ is the density of the Cauchy distribution given by $f(x)=\frac {1} {\pi ({1+ x^2})},x \in \Bbb R$. Then the whole integration becomes $$\frac  {1} {\pi^2} \int_{-\infty}^{\infty} \frac {\mathrm {dy}} {(1+y^2)(1+(x-y)^2)}.$$ Now how do I solve this integral? Please help me in this regard.  Thank you very much.


While working on an online tutorial I probably messed up my etc/apt/ folder as every time I use apt or apt-get command I get the following error:  E: Type '&&' is not known on line 1 in source list /etc/apt/sources.list.d/kubernetes.list E: The list of sources could not be read. E: Type '&&' is not known on line 1 in source list /etc/apt/sources.list.d/kubernetes.list E: The list of sources could not be read.   Any help please


Is there a way to detect if a mouse button is currently down in JavaScript?  I know about the "mousedown" event, but that's not what I need.  Some time AFTER the mouse button is pressed, I want to be able to detect if it is still pressed down.  Is this possible?


Why does set -e not work inside subshells with parenthesis () followed by an OR list ||?

I've run across some scripting like this recently:  ( set -e ; do-stuff; do-more-stuff; ) || echo failed   This looks fine to me, but it does not work!  The set -e does not apply, when you add the ||.  Without that, it works fine:  $ ( set -e; false; echo passed; ); echo $? 1   However, if I add the ||, the set -e is ignored:  $ ( set -e; false; echo passed; ) || echo failed passed   Using a real, separate shell works as expected:  $ sh -c 'set -e; false; echo passed;' || echo failed failed   I've tried this in multiple different shells (bash, dash, ksh93) and all behave the same way, so it's not a bug.  Can someone explain this?


Is there a term for the type of misleading joke comedians such as Stephen Colbert often use?

The Late Show host, Stephen Colbert (an American talk show host, don't mind that, just think of him as some random guy you don't have to care about) quite often uses a type of joke whereby he describes one thing to mislead you, then name the other thing that you've thought the preceding description described but in fact didn't. For example:   "Some people are buying the wrong 'Fire and Fury'", instead picking up 'Fire and Fury: The Allied Bombing of Germany, 1942-1945' (...)   This is amazing, this is the meeting of Disney and Beyonce.   Disney isn't buying all of Fox (...) "not included in the acquisition: Fox News," which really is surprising, cause you'd think that     Is there a term for this kind of joke?


i have a dropdown and i have true or false value .          <mat-form-field class="mat-form-field-fluid" appearance="outline">                     <mat-label>{{ 'GENERAL.SEE_STATUS'| translate }}</mat-label>                     <mat-select formControlName="hasSeen">                         <mat-option value="" selected>                             {{ 'GENERAL.ALL' | translate }}</mat-option>                          <mat-option value=true>                             {{'NOTIFYCATION.SEEN' | translate}}                         </mat-option>                         <mat-option value=false>                             {{'NOTIFYCATION.NOT_SEEN' | translate}}                         </mat-option>                     </mat-select>                 </mat-form-field>   and i need to fill the model by the dropdown value:  loadFilters(): void {      const model = {} as SearchModel;     model.hasSeen = <boolean>this.filterFormGroup.get('hasSeen').value;      this.notificationService.updateFilter(model); }   but when i console the model it have a string value like this "true" but i need this value true .   this is my model :  export interface SearchModel {  hasSeen: boolean; }   how can i convert strign to boolean ????


SLDS Spinner with backdrop on VF Page on Button click

I am trying to add a spinner with a backdrop as the loading screen but the spinner is not working when the action function is invoking. Action function is able to call the apex method but not invoking the actionstatus.  Here's the VF Page code,  <apex:form >      <apex:actionFunction name="paymentaction" action="{!test1}" status="pageStatus"/>
             <apex:actionStatus id="pageStatus">                         <apex:facet name="start">                             <apex:outputPanel >

                             </apex:outputPanel>                                         </apex:facet>                         </apex:actionStatus>   The command button here is in a different column of the grid but that does not seem to be the problem as it is invking subsequent functions just fine,  <apex:commandButton styleClass="slds-button slds-button_outline-brand" status="pageStatus"  value="{!$Label.Obtain_Token}" id="obtainToken" onclick="return doSomeWork();"/>  Apex Method :   public void test1(){         system.debug('In Test Method');         Integer start = System.Now().millisecond();         while(System.Now().millisecond()< start+10){          }     }   What am I doing wrong here? I also looked at  and would love to implement it with Modals and backdrop?


How to read infinite Cartesian product definition

From Tao's Analysis I:    I'm having trouble parsing this {...} expression. I'm not sure about the operator/quantifier precedence, and I'm especially unclear on how to read, and understand, "$(x_\alpha)_{\alpha\in I}$". How do you write this whole expression in prose? How do I make sense of $(x_\alpha)_{\alpha\in I}$?


refreshApex on Account detail page change

I have a lwc component that used apex controller on account page when the account updated, my component is not refreshing with latest data updated on account. Is there any listener available in lwc?  handleUpdate() something like?  Code:   import { LightningElement, api, wire, track } from "lwc"; import { refreshApex } from '@salesforce/apex'; import getAccount from "@salesforce/apex/AccountHealthCheckController.getAccount"; refreshApex(this.account); //ERROR refreshApex(getAccount); //ERROR export default class AccountHealthChecklwc extends LightningElement {  @api recordId;   @track account;   @track error; @wire(getAccount, { accountId: "$recordId" })   wiredGetAccount({ error, data }) {     if (data) {       this.error = undefined;       this.validationMessages( data );       console.log(this.summary);     } else if (error) {       this.error = error;       this.account = undefined;     }   }   validationMessages( value ) {   this.account = value;    //LOGIC } }


Python 3: While loop in doesn't end although condition is met

I've been learning Python for about 5 days and I have no prior programming experience, so apologies if this is too basic a doubt; I've checked some other similar questions but the issue wasn't the same.  I'm defining some input check functions for the program that I'm making and my idea was to rely on while loops and boolean conditions to make them work, but I found out that the loop doesn't end regardless of the input being valid.  This is the simplest one I've written:  def is_num(num):     try:         num = float(num)         num_check = True     except:         print("Incorrect value. Please, enter a number.")  num_check = False while not num_check:     user_num = input("Enter a number: ")     is_num(user_num) print("Valid number.")   I do get the error message if I enter something other than a number, but if I do enter a number I just get the input prompt over and over.  I thought maybe the problem was coming from num_check only being defined inside the function so I tried out this version, but it changed literally nothing:  def is_num(num, num_check):     try:         num = float(num)         num_check = True     except:         print("Incorrect value. Please, enter a number.")  user_num_check = False while not user_num_check:     user_num = input("Enter a number: ")     is_num(user_num, user_num_check) print("Valid number.")   What should I change for this to work? Thanks!


I like to have a friendly debate, but a lot of time people just come up with nonsense arguments like "Yeah but I'm right because you are stupid.". They are meant to be insults, but is there a word for this type of argument?


Dual boot Windows 8.1 with Ubuntu on last partition with legacy boot mode

I have following scenario and want to install Ubuntu 14.10.  1 TB Hard Drive   150GB Win 8.1 Partition   200GB NTFS   200GB NTFS  200GB NTFS   120GB NTFS   68GB Unallocated   I want to install Ubuntu 14.10 as dual boot with Windows 8.1 on 68GB partition. Can anyone let me know process and step need to be take care for this?  I have fresh installation of Windows 8.1 so no need for data backup.  Note : I have installed Win 8.1 on Legacy Boot mode. So I think I have to install Ubuntu in Legacy mode as well.


In a C# (feel free to answer for other languages) loop, what's the difference between break and continue as a means to leave the structure of the loop, and go to the next iteration?  Example:  foreach (DataRow row in myTable.Rows) {     if (someConditionEvalsToTrue)     {         break; //what's the difference between this and continue ?         //continue;     } }


Prove that $\rm area(\triangle ABE) = area (ABCD)$

Here is a problem from a sample paper:  I see that $\rm area(ACE) = area(DCE)$.  I also see that $\rm AB$ is the common base for $\triangle \rm ABE$ and $\rm ABCD$.  So this means that the height of $\rm ABCD$, i.e., $\rm AD$ is exactly the half of $\rm BE$.  I can't seem to get around the rest, though.   It seems that $\rm ACED$ is a parallelogram, but that'd mean $\rm BC = CE \Rightarrow AD = DC$ which doesn't seem so looking at the figure.  Could anyone please give me a complete proof using only the theorems:   Two quadrilaterals lying on the same base and between the same parallels have the same area. Two triangles lying on the same base and between the same parallels have the same area.   I also know that the area of 1 is twice the area of 2.


Is there a way to create a StaticResource within a Apex code.  this the code i am doing:          StaticResource sr = new StaticResource();         sr.Body = file;         sr.Name = 'testLicence';         sr.ContentType = 'zip';         sr.CacheControl = 'Public';          sr.create();   but i am getting this error:   Method does not exist or incorrect signature: [StaticResource].create  and when i consulted the documentation in this link:                         it says that the create() method is supported.  What's wrong with my code ?


I want to put text in a box where only two corners of the box are visible. I've explored using tikzpicture and a new md environment.


Ubuntu 20.04 GNOME Flashback - Snap Shop transparent on non-default themes?

I found out that on Ubuntu 20.04 with GNOME Flashback, the Snap Shop utility from System Tools menu (the tool to install software on the system) window becomes completely transparent with white text when a non-standard theme is activated. Below are two screenshots: the first is from standard Radiance theme, the second is from a custom-made theme which is an exact copy of Radiance theme under another name. There is a Calculator window on the screen to demonstrate that the application looks identical in both themes. However, Snap Shop is different.  This is screenshot from Radiance theme:   This is screenshot from a copy of Radiance theme:   Any hints how to fix this?


Given the odd prime numbers,   Prove that if $x$ and $y$ are adjacent odd primes in this list, then $x + y$ has $3$ prime factors. The factors need not be distinct.  Here is an example I have provided: $3 + 5 = 8 = 2 \cdot 2 \cdot 2$. Therefore, $8$ has $3$ repeated factors of $2$.


Greatest common divisor of polynomials over $\mathbb{Q}$

I have two polynomials: $f: x^3 + 2x^2 - 2x -1$ and $g: x^3 - 4x^2 + x + 2$. I have to do two things: find $gcd(f,g)$ and find polynomials $a,b$ such as: $gcd(f,g) = a \cdot f + b \cdot v$. I have guessed their greatest common divisor: $(x-1)$, but I did it by looking for roots of both polynomials, and now I am stuck. How do I find the greatest common divisor using the Euclid algorithm? I started with $f(x) = g(x) + 3(2x^2 - x - 1)$, but then things go nuts, and I can't use Bézout's identity to bring it all back to $gcd(f,g) = a \cdot f + b \cdot v$.


Control table column width with text wrapping

The second column in the table is running into the right margin.  Is there a way to control this without resizing the table? I'd like the text in this column to wrap. \begin{table}[htbp]   \centering   \caption{My table}     \begin{tabular}{lp{30.215em}}     \textbf{Reason} & \multicolumn{1}{l}{\textbf{Explanation}} \\     \hline     \hline     \textbf{Advancement} & Individual seeks academic progress and wants to secure the best possible education for oneself \\     \hline     \textbf{Bandwagon Thinking} & Individual participates in private tutoring as a result of influence of parents, peers, societal trends and mass media  \\     \hline     \textbf{Cookie-cutter} & Individual seeks one-shot solutions (ready-made answers, shortcuts, notes, question banks) to academic concerns  \\     \hline     \textbf{Cutting edge} & \multicolumn{1}{l}{Individual seeks superiority over classmates/peers} \\     \hline     \textbf{Deficit-Oriented} & Individual recognizes academic inadequacies and lack of academic support at school/home, and seeks said support from tutoring providers \\     \hline     \textbf{Forward looking } & Individual seeks tangible and intangible benefits in the future (high academic ranks, good job, favourable social status) \\     \hline     \end{tabular} \end{table}


$G_1$ is a group of order $p$ and $G_2$ a group of order $q$, where $p, q$ are primes. Prove that the direct product $G_1\times G_2$ is cyclic.

So there's a similar question posted (twice) before, but I'm not sure if the proof will be the same. Can I use the fact that the product of $G_1$ of order $p$ and $G_2$ of order $q$ is some group $G$ of order $pq$? If this is true, how do I adapt this to prove my original question? Thanks!


Nuclear Fusion with extremely high pressure and low temperature

Theoretically, if we just create a high pressure with low (room 20C) temperature, at some point nuclear fusion can be started.  Is there any research on this topic, how high should be this pressure for different type of reaction? Maybe someone has some numbers in mind, how many GPa should we have to achieve it?  UPDATE:  I made my own calculation after all comments which I got.  I got a number $10^{21}$ Pa from thermodynamics of ideal gas. Of course it is approximation. Let's say for Deuterium-tritium we have to give energy 0.1 MeV for 2 atoms to start fusion, which means from electrostatic point of view distance between nucleus $1.44\times10^{-14}$ (14 femtometers) as @John Rennie answered. If I calculated how many atoms will fit in 1 $m^{3}$, if distance between atoms will be 14 femtometers, I will get $N=3.4\times10^{41}$ atoms. Then from $PV=\frac{N}{N_{a}}RT$ if I assume $V=1 m^{3}$ I get $P=1.4\times10^{21}$ Pa and density $2.24\times10^{21} \frac{kg}{m^{3}}$. Which is still $10^{5}$ times more than pressure in the core of the Sun. And if we consider real gas, might be number will be bigger.  Maybe in the future, if they will find another reaction with much less energy (less then 0.1MeV) it would be possible. Might be quantum tuneling can help a little bit :)


What's wrong with asking if there are any resources that cover a particular topic?

I asked if anyone knew of a , and the question was closed as "not a real question." I don't understand what is wrong with my question. It is specific and answerable (either "Yes, the URL is..." or "No, because..."). Why do people think it's off-topic?


Number of $\pm 1$ matrices whose determinant is negative or zero

Find the number of $3 \times 3$ matrices whose determinant is $(a)$ positive $(b)$ negative $(c)$ zero and whose elements are taken from $\{-1,1\}$.  This is what I tried: The total number of $3\times 3$ matrices with entries in $\{ 1 , -1\}$ is $2^9$. Now counting each rows or column of matrices as a vectors with entries in $\{-1,1\}$, there are $8$ such vectors and if any two vectors are same then its determinant is $0$. There are such $24+24=48$ ways.


Googlebot refuses to render more than index.html in Ember app

I am using Ember 3.0.0 to create a booking site. Title and meta tags are handled via ember-cli-meta-tags and seem to be rendered correctly when pages are opened in the web browser.  However, Googlebot refuses to render the app normally. Whatever I do, it just renders a blank index.html page. I've tried to shorten the time of loading the model, but even non-dynamic pages (without Ember Data requests in the model) aren't rendered.  Here is an example from my website:  <!-- begin snippet: js hide: false console: false babel: false -->  <!-- language: lang-js -->      import {       schedule     } from '@ember/runloop';     import {       get,       set     } from '@ember/object';     import ENV from '../config/environment';     import Route from '@ember/routing/route';      export default Route.extend({       title: 'Tandblekning i praktiken: Allt du behöver veta',        patientPortal: ENV.APP.patientPortal,        headTags: function() {         return [{           type: 'link',           tagId: 'canonical-link',           attrs: {             rel: 'canonical',             href: get(this, 'patientPortal') + '/tandblekning'           }         }, {           type: 'meta',           tagId: 'meta-description-tag',           attrs: {             name: 'description',             content: 'Konkret och praktisk guide för tandblekning som gör att du sparar pengar, minskar risk för skador och får vitare tänder.'           }         }];       },        titleToken: function() {         return 'Tandblekning i praktiken: Allt du behöver veta';       },        setupController(controller, model) {         this._super(controller, model);         schedule('afterRender', this, function() {           set(controller, 'after_render', true);         });       }     });  <!-- end snippet -->   When testing this page on another simulator site, I get the same rendering as on index.html as well as in Google Search results when googling tandblekning site:muntra.se.


So if I have  on the battlefield with a +1/+1 due to his ability and a  that can move +1/+1 from one creature to another. Does CG duplicate the +1/+1, and does KS get another +1/+1 due to having an island on the field or another merfolk


Calling function defined in parent class when derived class explicitly defines a template type

I have a base class that has a template type. I am explicitly overriding this template type in the child class because that child class will only ever operate on the type that it is designed for. This is leading to linker errors however. I have two functions in the base class, one is provided since it will be common for all child classes. The other function is purely virtual and is to be meant to be overridden by the child class. I can compile and link the second function just fine, however linking the first function leads to an error:   error LNK2019: unresolved external symbol "public: bool __thiscall BaseDecoder<class APacket>::unpack(class std::vector<unsigned char,class std::allocator<unsigned char> > const &,class std::vector<class Frame,class std::allocator<class Frame> > &)"     This message sort of makes sense because there is no BaseDecoder<APacket> that implements the unpack function, just a BaseDecoder<class PacketType> implementation.  Here is my class structure:  Base class:  template <class PacketType> class BaseDecoder { public:    BaseDecoder(){};    virtual ~BaseDecoder(){};      bool unpack(const std::vector<uint8_t>& traceData, std::vector<Frame>& frameData);     virtual bool decode(std::vector<Frame>& frameData, std::vector<PacketType>& packetData) = 0; }   Derived class:  class ADecoder : public BaseDecoder<APacket> { public:     ADecoder();     ~ADecoder();      bool decode(std::vector<Frame>& frameData, std::vector<APacket>& packetData) override; }   Main:  std::vector<uint8_t>* raw_data = getRawData(); std::vector<Frame> frame_data; a_decoder->BaseDecoder::unpack(*raw_data, frame_data); std::vector<APacket> a_packets; a_decoder->decode(frame_data, a_packets);   How can I get this to link the BaseDecoder<APacket> unpack() to BaseDecoder<class PacketType> unpack() instead, since that function does not actually touch the template type?


Problems when adding a fillable PDF form if the page is rotated

I need to use the TextField command of the  package inside a landscape environment, but the input of the TextField is rotated according to the orientation of the current page.  MWE:  \documentclass{article}  \usepackage{pdflscape} \usepackage{hyperref}  \begin{document}  \begin{landscape}     \begin{Form}         \TextField{Text};     \end{Form} \end{landscape}  \end{document}     Is there any way to rotate the input horizontally?  Thanks!!


going to iceland from India, do i need transit visa for layover in Helsinki & stockholm?

flying to Iceland from India & layover is at Helsinki & Stockholm, do I need transit visa?


How remove margin in a paragraph that continues in two pages?

I've created a document whose margins have different odd and even pages. I want to write a paragraph with no margin in two pages runs. If I use the command \newgeometry new paragraph starts at the top of new page, that I want to start at the same place. And the command \begin{adjustwidth}{}{} such marginalized different odd and even pages are not useful. Please guide me in this regard. I use this command for create margin:  \documentclass[11pt,fleqn]{book}  \usepackage[total={215mm,285mm},top=3cm,bottom=3cm,headsep=10pt,     vmargin=2cm,     outermargin=7cm,     innermargin=2.5cm,     marginparwidth=5cm,     marginparsep=10pt]{geometry}     \reversemarginpar       \usepackage{changepage}       \usepackage{lipsum}           \begin{document}                \lipsum[5]\lipsum[5]\lipsum[5]\lipsum[5]  \begin{adjustwidth}{}{-5cm}   \lipsum[6]\lipsum[6]   \end{adjustwidth}            \newgeometry{left=2.5cm, right=2.5cm}  \lipsum[6]\lipsum[6] \end{document}


To be more specific, i have a 16 GB USB with Ubuntu on it, and i use it to boot from it, but i want to save all my installations etc. so when i restart the computer or reboot again i wont have to restart my installations again. I also used terminal do install these programs, so will it be possible to sort of change the place where it is installed that way it will be on my C drive and ill only have to boot Ubuntu to run them. so in short I want to use the USB as another hard drive for the laptop. thanks,


How exactly do I install Minecraft Mods and what is Forge?

I'm having a really, really hard time figuring out how to install mods on Minecraft. I've looked everywhere I can think of for help but the information is almost always outdated or unhelpful.  I've seen on several sites about the use of something called Forge. The Mod I want to use requires 1.6.4 Forge and I have both Forge and the Mod folders sitting in my downloads folder.  I haven't installed any kind of mods for any game prior to this and I have little clue to the technical side of Minecraft, so please keep this in mind when you give me an answer please!  Things that might help you figure out how to help me:   I want to play this mod  and am using the 1.6.4 Forge given on a link that website gives


I am trying to clear the cache of my wire method. But I have added refreshApex in my code but I am getting error      Error: Refresh failed because resolved configuration is not available.   My Code   import { refreshApex } from '@salesforce/apex';  export default class LwcCaseCritical extends LightningElement {  caseCriticalControllerApex  /** *   @description: Get case information On page load *                  */ @wire(caseCriticalControllerApex, {caseid: '$recordId'})     getcaseCriticalControllerApex({error, data}) {          if (data) {              console.log('inside case Critical ControllerApex ');              this.caseCriticalControllerApex = data;             __showComponentLoader(this, '.pageLoader');             console.log('recordId ', this.recordId);             this.cases = data;             console.log('CriticalFlag ', this.cases.CriticalFlag__c);             this.oldPriorityValue = this.cases.Priority;               this.caseObject.CriticalFlag__c = this.cases.CriticalFlag__c;             this.caseObject.Priority = this.cases.Priority;             __hideComponentLoader(this, '.pageLoader');          } else if (error){             console.log(error);         }     }   /** *   @description: On click of save button *                  */     save(){     __showComponentLoader(this, '.pageLoader');      //this.cases.Id = this.recordId;     this.caseObject.Id = this.recordId;      console.log('cases details ' , this.cases);     console.log('caseObject details ' , this.caseObject);      saveApex({newCase : this.cases, updatedCaseValuse :this.caseObject,               errorMessage : '', oldPriorityValue: this.oldPriorityValue})         .then(result => {             this.errorMesage = result;              if(this.errorMesage !== null && this.errorMesage !== ''){                 __showNotification(this, 'Case',this.errorMesage, 'Error', '');             }else if(this.errorMesage === null || this.errorMesage === ''){                 __showNotification(this, 'Case','Case Updated', 'Success', '');                 this.refreshConsolePage();                  if(this.isEsclation === true && this.is3rdLevelUser === false){                     const clickedevt = new CustomEvent('savecomplete', {                         detail: { close : true },                     });                             // Fire the custom event                     this.dispatchEvent(clickedevt);                 }else{                     const clickedevt = new CustomEvent('savecomplete', {                         detail: { close : false },                     });                             // Fire the custom event                     this.dispatchEvent(clickedevt);                 }             }              console.log('this.isEsclation  ' + this.isEsclation );             console.log('this.is3rdLevelUser  ' + this.is3rdLevelUser );             /*             refreshApex(this.overrideCaseIfNeededApex);              refreshApex(this.showPriorityApex);             refreshApex(this.caseCriticalControllerApex);              */              __hideComponentLoader(this, '.pageLoader');             return refreshApex(this.caseCriticalControllerApex);          })         .catch(error =>{             console.log('error data ::: ' , error);         }); }  }   Do any one have nay idea why I am getting this error on click of button.


Can the ship's captain really perform your wedding when in international waters?

On , Mark Mayo posted a comment that any marriage has to be on dry land or close to it.  But I'm sure all of us have heard of ships' captains marrying couples at sea.  From the movie Casablanca:     Say, why don't we get married in Marseilles?   ...   Well, let's see. What about the engineer? Why can't he marry us on the train?   ...   Well, why not? The captain on a ship can. It doesn't seem fair that...    So is this fiction after all? If not how does it fit with Mark's comment? What special rules and such should we know?  If I'm travelling at sea with a significant other and wish to tie the knot, can we do so with any captain on any ship on any sea? Must it be international waters?


Any way to recall the file of previous cmd?

Frequently I’ll have to do some digging around to figure out what I’m doing on linux, involving quite a bit of ‘’, ‘ls -la’, ‘cd’, ‘cat’, and ‘vim’  Is there any way to quickly reuse the file/target of the previous command?  e.g. I have to look around for a file, say with ls, and when I’ve found it I’ll need to use it with a program like cat or vim. So let’s say I’ve got ‘ls -la /some/path/SomeName’ and hit , say I’ve drilled down to where this is the file I was looking for.  What I’d like to do is some kind of ‘!!’ Like when you forget to use sudo; Say I really want to use ‘cat’ but had been searching around with ‘ls’ and ‘’ - or I’ve been searching around with ‘cat’, up-arrow and continuing to refine my ‘cat /file/path/‘ and then when I’ve found what I’m looking for I’ll want to edit that file  I’d like to be able to do something like ‘cat !!’ or ‘vim !!’


We knows that $sin(x)$ and $cos(x)$ are two function with value in the closed set $[-1,1]$. How can I prove that $X=({sin(n)|n\in\mathbb{N}})$ and $Y=({cos(n)|n\in\mathbb{N}})$ are or not dense in $[-1,1]$.


Should we chair a session in which we present?

In a prestigious conference in my field, I am asked to chair a session. However,  in the same session, I have my own paper, should I chair this session?


regex to replace a pattern in Jenkinsfile (declarative) which has a `&` in the pattern

I have an Ansible Inventory file which has ansible_password value which needs to be replaced by user input  what I have is below in a windows.yaml  ansible_user=sa_user@somewindowsdomain.external ansible_password =   and I take an userInput from Jenkins, where user enters &32lihdye34jC5W  parameters {             password defaultValue: '', description: 'Please Enter ansible_password ', name: 'sa_pass'                       }  sh 'echo ${sa_pass}'   I tried below   sed -i "s/ansible_password=.*/ansible_password=${sa_pass}/g" $inventory_path/windows.yaml   which doesn't do what I wanted but got below  ansible_password=ansible_password32lihdye34jC5W  what I was expecting is  ansible_password = &32lihdye34jC5W


Today I tried to delete my account on AREA51 but was unable to do so because      this operation cannot be performed on a meta site; please continue on the main site.     I have tried   and  (the contact in the footer redirects to discuss... )   What is the main site for AREA51 where I can delete my profile?


How do you show the Windows Explorer context menu from a C# application?

I have a file listing in my application and I would like to allow people to right-click on an item and show the Windows Explorer context menu. I'm assuming I would need to use the IContextMenu interface, but I'm not really sure where to start.


Why using RMSE as loss function in logistic regression takes non convex form but doesn't in linear regression?

I am taking this deep learning course from Andrew NG. In the 3rd lecture of 2nd week of the first course, he mentions that we can use RMSE for logistic regression as well but it will take a nonconvex form having a lot of local minima and so gradient descent may not be able to find the global minima. So why using RMSE as loss function makes the cost function as non-convex in logistic regression but convex in case of linear regression?


Determining the matrix of a linear transformation

Let $A$ be an $n\times n$ matrix, and let $V$ denote the space of $n$-dimensional row vectors. What is the matrix of the linear operator ‘‘right multiplication by $A$’’ with respect to the standard basis of $V$?


Prove the following inequality using the AM-GM inequality.

I want to be able to prove that for any positive real numbers $a_1, ... , a_n$, that $$(1 + a_1)\cdots(1+a_n) \ge 2^n  \sqrt{a_1\cdots a_n}$$  I know that I must use the AM-GM inequality in some way, i.e. I want to use the fact that $a_1 + a_2 + \cdots + a_n \ge n*(a_1a_2\cdots a_n)^{1/n}$,  but I am not sure where to start. I also was considering using induction, but it isn't immediately clear what the base case is or if induction is even possible. Any guidance would be appreciated greatly.


I was trying to create a small village in Minecraft. As I am in Single Player and wanted some neighbours, I spawned a few NPC villagers using spawn eggs.  Even though they are good neighbours (they don't play the music too loud and don't argue with their wives), they won't spend the night in any of the houses I built.  Buildings are very basic structures made of wooden planks with a wooden door (I read on the Wiki it was the door that made the house for NPCs). Am I missing something? How can I decide my NPCs to live in the houses I made? Do I need to build a real estate agency (;-D)?


Desktop icons rearrange after using remote desktop connection

I sometimes remote into my desktop PC (1900x1280) from my laptop (1280x900).  When I do, Windows (Vista) on the desktop PC rearranges all my desktop icons.  I could understand this if the RDP session's desktop size was too small to fit them in, but it's not.  I have about 12 icons, which do fit on the laptop's resolution (I've tried).  Why would Windows rearrange them all like this each time?


How to convert an MKV to AVI with minimal loss

To convert an MKV to AVI, I do two things. The first thing I do is this:  ffmpeg -i filename.mkv -vcodec copy -acodec copy output.avi   or this:  ffmpeg -i filename.mkv -sameq -acodec copy output.avi   Either of these will convert the MKV to an AVI, but the problem is that the video does not play smoothly for some reason. That's fine though, because if I do one more thing it gets fixed:  ffmpeg -i output.avi -vcodec mpeg4 -b 4000k -acodec mp2 -ab 320k converted.avi   After I do this then the file plays without problem. I had success doing it this way for one file, but then I tried it on another file, and there is a slight, but noticeable loss in video quality. This is the output I get when doing the second step:  FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers   built on Dec 29 2010 18:02:10 with gcc 4.2.1 (Apple Inc. build 5664)   configuration:    libavutil     50.15. 1 / 50.15. 1   libavcodec    52.72. 2 / 52.72. 2   libavformat   52.64. 2 / 52.64. 2   libavdevice   52. 2. 0 / 52. 2. 0   libswscale     0.11. 0 /  0.11. 0  Seems stream 0 codec frame rate differs from container frame rate: 359.00 (359/1) -> 29.92 (359/12) Input #0, avi, from 'output.avi':   Metadata:     ISFT            : Lavf52.64.2   Duration: 00:04:17.21, start: 0.000000, bitrate: 3074 kb/s     Stream #0.0: Video: mpeg4, yuv420p, 704x480 [PAR 229:189 DAR 5038:2835], 29.92 fps, 29.92 tbr, 29.92 tbn, 359 tbc     Stream #0.1: Audio: vorbis, 48000 Hz, stereo, s16 Output #0, avi, to 'converted.avi':   Metadata:     ISFT            : Lavf52.64.2     Stream #0.0: Video: mpeg4, yuv420p, 704x480 [PAR 229:189 DAR 5038:2835], q=2-31, 4000 kb/s, 29.92 tbn, 29.92 tbc     Stream #0.1: Audio: mp2, 48000 Hz, stereo, s16, 320 kb/s Stream mapping:   Stream #0.0 -> #0.0   Stream #0.1 -> #0.1   I just used arbitrarily large settings on the second step and it worked nicely before but not in this case. What settings should I use?


On running  nano /etc/apt/sources.list ,  the text editor opens the sources.list file but it is completely empty! How to get the default sources.list file as I am unable to update debian (apt-get update).


Looking for title & author - short story - possibly called "Arms Race" - about rediscovery of manual arithmetic

short story - possibly called "Arms Race" - about rediscovery of manual arithmetic.   The hero rediscovers manual calculation - e.g., how to do long division with pencil and paper - in a world where everyone has ben using calculators for aeons. Brought before the president to demonstrate this, the great line in the story is the president, after using his calculator to check the hero's answer, says, "My God -- he's right." A great national project to exploit this advance over the enemy is obviously necessary...


How can this be proved $\lim_{x\to\infty}(f(x)+f'(x))=l$

If $$\lim_{x\to\infty}(f(x)+f'(x))=l$$ then prove that $$\lim_{x\to\infty}f(x)=l \text{ and } \lim_{x\to\infty}f'(x)=0 $$    I assume four cases $$\begin{array}{c|c|c|c|}   & f(x) & f'(x) \\ \hline \text{1} & \infty & -\infty \\ \hline \text{2} & -\infty & \infty \\ \hline \text{3} & l & 0 \\ \hline \text{4} & 0 & l \\ \hline \end{array}$$ and elimination(1,2,4) of not possible cases can give the answer(3).    My work is not a correct/perfect or flaw proof.What would be a correct one or is this correct.


Where is the chat in mobile application?

I am using the SE mobile app but not being able to find the chat... again (but this time the mobile app)


Is there a hot key for switching between 3D Object and Sculpt modes?

In the past, I've found the Tab key useful for switching between edit and object modes.  But now that I'm getting into sculpting, I'm finding that I need to frequently switch between sculpt and object modes and the tab key simply toggles the current mode with edit mode.  The best hotkey combination I've found so far is Ctrl+Tab, 4 and Ctrl+Tab, 2 which is kind of cumbersome since it involves an awkward Ctrl+Tab in the left hand followed by a separate keystroke.    Is there an easier way to do this? I'd like to be able to do something simple like just press 2 or 4 to switch modes.


Find all functions from naturals excluding $0$ to reals that for a particular amount of $n$ we have:  $f(m+k)=f(mk-n):(mk>n , m,k,n \in \Bbb Z^+)$  by putting $k=1$ and $m>n$ we can see that the function is periodic with cycle of $n+1$.But I can't continue.


When traveling to USA, New York, how to pay (Euro bank account)

When traveling from Europe to New York, which is the most cost-effective way to pay for anything?  My purchases will mostly be places to eat, museums, stadiums etc.  So    should I exchange money when I get in the US should I pay everything with my debit card (Master Card) should I withdraw money in the US from ATMs   Edit: This question is specific for New York city, while   e.g. In New York city it might be possible to pay everywhere with debit card and avoid bank fees (in my case), whereas in Kathmandu, Nepal there isnt an option for debit card payments in restaurants etc


How do I get my p value from my F test in Stata


How can i make my database more secure in PHP?

I want to know about my database how much secure in this way ? What else can i do for more security ? Is htmlentities and mysqli_real_escape_string enough combo for security?  <?php require 'db.php'; $mysqli2 = new mysqli('localhost','x','x','x'); session_start(); $_SESSION['message'] ='';  if (isset($_POST['username'])){     /* User login process, checks if user exists and password is correct */      // Escape email to protect against SQL injections     $username= htmlentities($_POST['username']);     $username = $mysqli->real_escape_string($username);     $result = $mysqli->query("SELECT * FROM accounts WHERE username ='$username'");      if ($result->num_rows == 0){ // User doesn't exist         $_SESSION['message'] = "You should register !";         header("location: error.php");     }     else { // User exists         $accounts = $result->fetch_assoc();         $password= htmlentities($_POST['password']);         $password = $mysqli->real_escape_string($password);         if ( password_verify($password, $accounts['password']) ) {              $_SESSION['username'] = $accounts['username'];             $_SESSION['usercode'] = $accounts['usercode'];             $usercode= $_SESSION['usercode'];             $_SESSION['email'] = $accounts['email'];             $_SESSION['active'] = $accounts['active'];             $result2 = $mysqli2->query("SELECT * FROM account_info WHERE usercode ='$usercode'");             $account_info = $result2->fetch_assoc();             $_SESSION['name']= $account_info['name'];             $_SESSION['lastname']= $account_info['lastname'];             $_SESSION['location']= $account_info['location'];             $_SESSION['phone'] = $account_info['phone'];             $_SESSION['balance'] = $account_info['balance'];             // This is how we'll know the user is logged in             $_SESSION['logged_in'] = true;              header("location: index.php");         }         else {             $_SESSION['message'] = "You have entered wrong password, try again!";             header("location: error.php");         }         }     }  ?>


I use 'Helvetica' as my font and build my document using Texmaker. But the PDF generated has jagged edges while using this font and when I use a different font (say Times or even Helvetica sans-serif) it builds just fine.     Please suggest if there is anyway I can get over this. The problem with these jagged edges is that it appears very dull and unreadable at 100% resolution.  OK guys, now here is the MWE  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \documentclass[a4paper,twoside,12pt]{book}  %% Language %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc} %\usepackage[utf8]{inputenc} \usepackage{graphicx,color,subfigure}  %% Line Spacing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage{setspace} %\singlespacing        %% 1-spacing (default) %\onehalfspacing       %% 1,5-spacing \doublespacing        %% 2-spacing  %% Other Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[left=1.5in, right=1.5in, top=1in, bottom=1in, includefoot, headheight=13.6pt]{geometry} \usepackage[pagebackref=true,breaklinks=true,letterpaper=true,colorlinks,bookmarks=false]{hyperref} \usepackage{helvet} \usepackage[square,numbers]{natbib} \usepackage{hyphenat} \usepackage{fancyhdr}   \begin{document}  \pagestyle{empty} %No headings for the first pages.  \cleardoublepage %The first chapter should start on an odd page.  \pagestyle{plain} %Now display headings: headings / fancy / ...  \pagebreak  %------------------------------------------------------------------------ \chapter{Divorce}   A major change that has occurred in the Western family is an increased incidence in divorce. Whereas in the past, divorce was a relatively rare occurrence, in recent times it has become quite commonplace. This change is borne out clearly in census figures. For example thirty years ago in Australia, only one marriage in ten ended in divorce; nowadays the figure is more than one in three (Australian Bureau of Statistics, 1996: p.45). A consequence of this change has been a substantial increase in the number of single parent families and the attendant problems that this brings (Kilmartin, 1997).   \end{document}


Slow performance - join dbo.StringList Sql Server

I need to update table from a certain population.  The code:  @IdentityNumbers dbo.StringList readonly  update d    set DeliveryNationalInsuranceBatchLogId = @BatchLogId,        LastUpdateDate=getdate(),        LastUpdateUserId=-999   from MortgageDetails d join MortgageReturnParticipationBase b     on b.Id = d.MortgageReturnParticipationBaseId join @IdentityNumbers newRow     on (newRow.item = b.IdentityNumber or newRow.item = b.MateIdentityNumber)  where (DATEADD(YEAR,70,BirthDate) <= getdate() or (MateBirthDate is null or DATEADD(YEAR,70,MateBirthDate) <= getdate()))    and b.CheckWithNationalInsurance=1    and d.IsActive=1    and b.MortgageReturnParticipationStatusId=1   I did it and it takes for a population of about 10,000 board size in just a few seconds to a minute, and for a population of about 500,000 it takes over an hour ...  I think the reason is that this StringList is what slows down the pace ...  Could this really be the problem? Is there a solution?


A friend of mine asked me to calculate the value of a perticular determinant, but after spending quite some time on it I'm unable to find a solution to it. The given determinant is:  $$         \begin{vmatrix}         0 & 1 & \cdots &n-2&n-1 \\         n-1 & 0 & \cdots &n-3&n-2 \\         \vdots & \vdots & \ddots & \vdots &\vdots\\         1 & 2 & \cdots & n-1 &0 \\         \end{vmatrix} $$  Also my friend is supposed to solve this determinant by more or less elementary methods, like elementary row operations, transpose... and no eigenvalues, nor adjoints.    First of all it seems like the value of the determinant is:  $$         \frac{1}{2n}\begin{vmatrix}         0 & n & \cdots &n&n \\         n & 0 & \cdots &n&n \\         \vdots & \vdots & \ddots & \vdots &\vdots\\         n & n & \cdots & n &0 \\         \end{vmatrix} $$  Anyway I tried adding all the rows to the last one and by taking $\frac{n(n-1)}{2}$ in front to have a row of 1s, but it didn't helped me much.  Then I tried to use the fact that:  $$         \begin{vmatrix}         A & C \\         0 & B \\         \end{vmatrix} = \det(A) \cdot \det(B) $$, where $A,B$ are square matrices. By subtracting the $(\frac{n}{2} + i)$-th column from the $i$-th ($i=0,1,2...$) and then adding the $i$-th row to the $(\frac{n}{2} + i)$-th row, one can obtain the wanted form, but again nothing more. Also this method pretty much fails when $n$ is odd.  My best attepmt was to notice that $A_{ij} + A_{ji} = n$ and using $\det(A^{T}) = \det(A)$, but unfortunatelly  $$\begin{vmatrix}         0 & n & \cdots &n&n \\         n & 0 & \cdots &n&n \\         \vdots & \vdots & \ddots & \vdots &\vdots\\         n & n & \cdots & n &0 \\         \end{vmatrix} \not = \begin{vmatrix}         0 & 1 & \cdots &n-2&n-1 \\         n-1 & 0 & \cdots &n-3&n-2 \\         \vdots & \vdots & \ddots & \vdots &\vdots\\         1 & 2 & \cdots & n-1 &0 \\         \end{vmatrix} + \left( \begin{vmatrix}         0 & 1 & \cdots &n-2&n-1 \\         n-1 & 0 & \cdots &n-3&n-2 \\         \vdots & \vdots & \ddots & \vdots &\vdots\\         1 & 2 & \cdots & n-1 &0 \\         \end{vmatrix}\right)^T$$ I tried to decompose the LHS by using the $n-$linearity of the determinants, by then one gets $2^n$ determinants on the RHS similar to the first one, but things are messy.


Is 'a career advice' grammatically correct?

I understand it is an indefinite article, so does it really depend on how we mean 'career advice'?  I read an advertisement, "Need a career advice? - Contact ... " which I'm pretty sure is wrong


In the first image, the laser colour is green.  When it is shined on the plastic cap of the pink highlighter, the colour changes, why has this happened?  Tech Details about the Laser Source are; Max output <1mW Wavelength 532nm +_10  Class II laser product


C# - Do I need to worry about if data is stored in the Stack or Heap?

I've gotten used to the memory management of C++ and having to consider if data should be stored in the Stack or Heap though coming back to C#, I'm a little confused on if this should really be a concern anymore.   I'm aware that C# uses a Garbage Collector but does that mean I still need to allocate data to either the Stack or Heap? I mainly ask this considering I'm using the new keyword a lot more then I would in C++


Show that $$\frac{\cos(\theta)-1}{\sin(\theta)} = -\tan \left(\frac{\theta}{2}\right)$$   I tried to I tried many substitutions with  $\frac{\cos(\theta)}{\sin(\theta)}=\frac{1}{\tan(\theta)}$ but fail to get to the correct direction. Any help would be appreciated.


If $G$ is a group of order $p^2$ with $p$ a prime number then $G \simeq C_{p^2}$ or $G \simeq C_p \times C_p$  Here's my attempt  We have $|G| = p^2$, Therefore, $o(g)= 1$ or $p$ or $p^2 \forall g$ where $o(g)$ denotes the order of the element of $g \in G$  Let's differentiate the $3$ cases.   If $o(g)= 1$ then $g=e$ by unicity of the identity of G If $o(g) = p^2$ then $\langle g\rangle = G \implies G \simeq C_p^2$ Now it's obvious that I have to show that if $o(g)= p$ then $G \simeq C_p \times C_p$ But I'm not sure how to do that.


Answering own question as accepted answer but request deletion

In the 10K tools flags queue I've come across   and  answer.  Or a similar  which does have another answer.  They both are the sole answers on the OP's own question. The answers basically indicates that the OP couldn't find the delete option for their original post. Initially my idea was to close-vote the question but they doesn't look that bad.  Should those answers be flagged as not answer? Should a comment to the OP be enough to point out that a question can be deleted?


A word for something which covers the eyelid of horses and lead them to run straight

I am looking for a word for a thing that covers the eyelid of horses and lead the horses to run straight without track distractions.  Something similar to funambulist.


I am trying to remember what the series 1+2+3+4+5+...+n is equal to in order to determine the series of breaks within the graph of x[x]. I know it obviously diverges as it goes to infinity, but what is the equation for when n is finite?  The sequence for the series goes 1,3,6,10,15,21,28,36,45,55,66,78,...


Can I replace sugar with honey in baking?

Can I substitute honey for sugar in baked goods.If yes then how much honey would be equal to one cup of sugar?


The following code shows that a \color{red} command increases the height of a tabular cell. I want to use a switch, not a command as \textcolor{red}{text}.  \documentclass{article}  \usepackage{xcolor} \usepackage{float}  \begin{document}  \begin{table}[H] \begin{tabular}{*{2}{p{0.45\textwidth}}} \hline \color{red} header & header \tabularnewline \hline  %  content  & content \tabularnewline  content  & content \tabularnewline  content  & content \tabularnewline \hline \end{tabular} \end{table}  \end{document}     How can I work around this problem?


The code below works and it is so clean: <?php     preg_match('/(bar)/', 'love hotel bar', $matches);     print_r($matches);  As you can see before calling the function $matches is undefined, which normally should return an error... The function parameter is filled by value and it is accessible out scopes. ❌ Bad <?php $title = get_og_tag('title'); $description = get_og_tag('description'); echo $title; //My title  ✅ Could be Good <?php get_og_tag($title, $description, $og_url, $og_image, $twitter_card); echo $title; // [error] $title, $description, ..etc, undefined...  For the code's clarity cake How to create functions like this?


Getting HRESULT E_FAIL error when trying to open database connection via connection file

I developed an Addin in AGP 2.5 where I am using connection files to open database connections at runtime. So far that worked perfect. The connection files are stored on a network drive, referenced in the Addin with absolute paths. DatabaseConnectionFile connectionFileValidering = new DatabaseConnectionFile(new Uri(AppSettings.Default.sde_validation)); Now that I am doing some maintenance on the Addin I am running into the following error when trying to open the enterprise database: Database test_db = new Database(connectionFileValidation); I am getting the following error. 'Database test_db = new Database(connectionFileValidation)' threw an exception of type 'ArcGIS.Core.Data.GeodatabaseException' Data: {System.Collections.ListDictionaryInternal} HResult: -2146233088 HelpLink: null InnerException: {"Error HRESULT E_FAIL has been returned from a call to a COM component."} Message: "A geodatabase exception has occurred." Source: "ArcGIS.Core" StackTrace: " at ArcGIS.Core.Data.Database..ctor(DatabaseConnectionFile databaseConnectionFile)" TargetSite: {Void .ctor(ArcGIS.Core.Data.DatabaseConnectionFile)} With respect to the error message I found some stuff that is not related to ArcGIS, but did not help either. Anybody here can point me the direction of a solution?


The Weasleys have a magical clock in their home, The Burrow. It doesn't tell the time, but rather tells where and how the Weasley family members are.     Mrs Weasley glanced at the grandfather clock in the corner. Harry liked this clock. It was completely useless if you wanted to know the time, but otherwise very informative. It had nine golden hands, and each of them was engraved with one of the Weasley family's names. There were no numerals around the face, but descriptions of where each family member might be. 'Home', 'school' and 'work' were there, but there was also 'lost', 'hospital', 'prison' and, in the position where the number twelve would be on a normal clock, 'mortal peril'.      — Harry Potter and the Goblet of Fire, Chapter 10: "Mayhem at the Ministry", by J.K. Rowling   Are spouses represented on the clock as well? In the main 7 books, we see the marriage of Fleur Delacour to Bill Weasley and are informed of the marriages of Hermione Granger to Ron Weasley and of Harry Potter to Ginny Weasley.  Not only that, but Molly and  Arthur have grandchildren as well. Victoire, Dominique, and Louis through Bill and Fleur, Molly and Lucy through Percy and Audrey, Fred and Roxanne through George and Angelina, Rose and Hugo through Ron and Hermione, and James, Albus, and Lily through Ginny and Harry. Are they all represented on the clock as well?  It seems that family members' hands aren't removed from the clock after they move out, since Bill and Charley were still represented even though they no longer lived at The Burrow.  So what are the criteria for inclusion on the clock?


How to calculate a Label Point for a (multi)polygon

ESRI software has a concept of a 'label point' for a (multi)polygon. It is like the centroid, except it is guaranteed to be within the (multi)polygon. Like for a U-shaped polygon, the label point is somewhere in the bottom of the U. See the ArcGIS REST API  on the subject.  I'd like to know a reference, English description, or pseudocode for how something like this is calculated for a polygon or multipolygon.   I get the vibe from results in ArcGIS that the label point is somewhere on the the medial axis transform (skeleton). But not just in its middle, because a big bulge at one end of a polygon will pull the label point into it. So it has a 'center of mass' aspect.  I haven't found an equivalent function in PostGIS (there is , but that is not quite the same thing). Nor have I found something in QGIS, but maybe I'm not looking for the right non-ESRI terminology.  This duplicates  question, but that one didn't get any high-rated non-hacky answers so I thought I'd ask again. Forgive me if it isn't the done thing.


Right Click not Working with Files in Ubuntu 18.04?

Recently, I Upgraded my Ubuntu OS from 17.10 to 18.04 LTS . Yesterday, a friend of mine gave me a USB to format. Previously, whenever I needed to format USB, after mounting USB device on right-click the options used to appear.  But now in Ubuntu 18.04, when I mounted my friend's USB, I was unable to format it, as right clicking on mounted USB device was non-functional option.  After upgrading to Ubuntu 18.04, I found files app was revamped, does this have anything to do with update ?  Anyone faced the same situation , please let me know what you did to fix this issue .    Edit : Just now discovered, what was wrong, Ubuntu no longer supports physical right-click. To perform right-click operation, just try 2 fingered tap, so easy !  Love Ubuntu !


Can I use a HMAC for Replay Attack protection?

I am considering a system where a small device accepts messages/commands from another device over a wireless channel.  I am worried about replay attacks.  The messages will be encrypted.  What are well-vetted schemes for protection against these attacks?  I am not too keen on timestamps (as described in ) as I don't really want to have to keep clocks synchronised.  I am currently thinking of using HMAC but want to be sure that I'm doing the right thing.


proof of $\sum\nolimits_{i = 1}^{n } {\prod\nolimits_{\substack{j = 1\\j \ne i}}^{n } {\frac{{x_i }}{{x_i - x_j }}} } = 1$

i found a equation that holds for any natural number of n and any $x_i \ne x_j$ as follows:   $$\sum\limits_{i = 1}^{n } {\prod\limits_{\substack{j = 1\\j \ne i}}^{n } {\frac{{x_i }}{{x_i  - x_j }}} } = 1$$  when n=2, it is given by  $$\frac{x_1}{x_1-x_2}+\frac{x_2}{x_2-x_1}=\frac{x_1 - x_2}{x_1 - x_2} = 1$$  when n=3, it is given by  $$\frac{x_1^2}{(x_1-x_2)(x_1-x_3)}+\frac{x_2^2}{(x_2-x_1)(x_2-x_3)}+\frac{x_3^2}{(x_3-x_1)(x_3-x_2)}=1$$  But, how can I prove for general $n$?


Some discussions don't belong even on meta, e.g. when it's pure noise.  But sometimes we want to make some noise amongst ourselves, don't we? At least I know I do. I've only been on Stack Overflow for a few months, but I already felt like I've started to develop some connections to other users, and just want to... chat?  So where can we do this? Is there an IRC/Google wave channel/whatever where SO users hang out where we can just ask, "How's everybody doing today?"


I have normal stereo headphones which work fine  On a specific PC running Windows 7 the external speaker and USB speakers work fine too  But when I plug in the headphones, all I hear is muffled music, no voice track? It sounds like it is being split into 5.1, and I am getting just the L & R components, and not the centre voice channel?  In the Playback devices (sound) control panel, I can adjust stereo or 5.1 for external speakers or USB speakers, but not for the headphones. The config button is grey out for them  Is this the problem, if so how do I fix it?


Can 419 and 468 shared cM indicate first cousins?

I was adopted and have known my birth family for many years.  I just did a DNA test and found I have 702 matching cM's with the daughter of my mother's brother (making her my 1st cousin). This helps validate my mother.    However, I DO NOT match any relatives of my supposed birth father.  They divorced before I was born.    I am being shown two 2nd cousin range matches with 419 & 468 cM's.  They are a brother and sister.  We have talked and are trying to understand if their father's brother could be my father.    If so, wouldn't they be 1st cousins also, like on my mothers side?  Their matching cM's are almost half of those of the matching 1st cousin on my mothers side. That leads me to believe my father is in their family but another generation back.  Perhaps he is their grandfather or on of his brothers.


Implementing Branching Conversation Dialogue in C# with XNA

How could I add logical branching conversation dialogue in C# with XNA? What I mean by this is a dialogue tree similar to this:  If the user is wearing red:      DisplayText "You're wearing a red shirt!" Else:      DisplayText "You're not wearing a red shirt!"   The key is that I can't hard-code these logic questions into C# itself; it has to be readable from some sort of external file and still executable.  My question is very similar to this question:   But my focus is more on how I can actually begin to implement this feature into my game.


Where can I find the restrictions and easements that apply to a given UK Rail Ticket?

UK rail ticketing isn't always the simplest thing in the world, but the basics aren't too hard to learn. There are  tickets valid at any time of the day, those available only outside of peak hours (typically after 9 and perhaps not in the evening rush hour), tickets only available at quiet times, tickets valid only on one train. These are mostly, but not always, valid in flavours of single (one way), day return (out and back the same day-ish), and (period) return (out on a given day, back within a month). That's it broadly, but you'll notice there's a bit of variation in even just those...  Next up, there are rules on what sort of route you can take. These largely revolve around , not doubling back, direct trains normally being fine, and not taking too long a route if there's a choice. (There's a whole art to making the most of that though, but this isn't the question for that!)  On top of all that, certain routes and/or stations will have additional restrictions, or easements where default restrictions are lifted. For example, one station might be in an area where the default rule is "off peak tickets valid after 9am", then has an additional restriction "off peak tickets to London only valid on trains arriving after 10am", and an easement "off peak tickets to stations along the insert line name here valid after 08:45".  By looking up these restrictions and easements, it's sometimes possible to save money on your journey. In the example above, you might assume you'd need a peak time ticket to travel on the 08:54 to a station along the local branch line, but the easement actually allows you to travel on a cheaper off-peak ticket instead.  How do you go about looking up what easements apply to a given ticket for a journey, and equally what extra restrictions (eg evening peak times or not-valid-via) apply?


Wine - cups-bsd but it is not going to be installed and more

On a Ubuntu 14.04 server  sudo apt-get update sudo add-apt-repository ppa:ubuntu-wine/ppa   command not found: add-apt-repository  I have to run  sudo apt-get install software-properties-common python-software-properties   Retype and now is all ok:  sudo add-apt-repository ppa:ubuntu-wine/ppa   After I type:  sudo apt-get install -y wine1.7 winetricks   but I have this:  The following packages have unmet dependencies:  wine1.7 : Depends: wine1.7-i386 (= 1:1.7.34-0ubuntu1~ppa1) but it is not installable            Recommends: cups-bsd but it is not going to be installed            Recommends: gnome-exe-thumbnailer but it is not going to be installed or                        kde-runtime but it is not going to be installed            Recommends: fonts-droid but it is not going to be installed            Recommends: fonts-liberation but it is not going to be installed            Recommends: ttf-mscorefonts-installer but it is not going to be installed            Recommends: fonts-horai-umefont but it is not going to be installed            Recommends: fonts-unfonts-core but it is not going to be installed            Recommends: ttf-wqy-microhei E: Unable to correct problems, you have held broken packages   apt-get updade or similar not works, returns me same errors. how Can install or compile manually missing package?


I had this thought earlier today. Let's just say that there are two black holes and they are going to eventually collide. Could there be any way that during the course of that, someone who passed the event horizon of black hole A could be slingshot out by black hole B?


Synthethic division is commonly taught, but I have never actually had a proof/explanation shown to me. Why does it work?  Work So Far  I related the "$x$" to powers to 10, and then proceeded to relate synthetic division to non-polynomial division, but couldn't seem to find the correlation.  Research So Far  My teacher doesn't seem to have a valid explanation for why it works. A   doesn't provide any good results either. All I seem to get is a Yahoo answers link with a badly formatted proof that makes it hard to understand and a physics forum link that links synthetic division to "normal division" by relating the "x" to 10, a conclusion I have already arrived at.


Function changes list values and not variable values in Python

Let's take a simple code:  y = [1,2,3]  def plusOne(y):     for x in range(len(y)):         y[x] += 1     return y  print plusOne(y), y   a = 2  def plusOne2(a):     a += 1     return a  print plusOne2(a), a   Values of 'y' change but value 'a' stays the same. I have already learned that it's because one is mutable and the other is not. But how to change the code so that the function doesn't change the list?  For example to do something like that (in pseudocode for simplicity):  a = [1,2,3,...,n]  function doSomething(x):     do stuff with x     return x  b = doSomething(a)  if someOperation(a) > someOperation(b):     do stuff   EDIT: Sorry, but I have another question  on nested lists. See this code:  def change(y):     yN = y[:]     for i in range(len(yN)):         if yN[i][0] == 1:             yN[i][0] = 0         else:             yN[i][0] = 1     return yN  data1 = [[1],[1],[0],[0]] data2 = change(data1)   Here it doesn't work. Why? Again: how to avoid this problem? I understand why it is not working: yN = y[:] copies values of y to yN, but the values are also lists, so the operation would have to be doubled for every list in list. How to do this operation with nested lists?


Show that a group of order $180$ is not simple.

What i deduced is that $n_5=1,6$ or $36$. We are done if $n_5=1$.   If $n_5=36$ we $N_G(P)=P$ for any Sylow $5$-subgroup P as $|N_G(P)|=\frac{180}{36}=5$ and $P$ is abelian cyclic so by Burnside p-complement theorem there exist a normal subgroup of order $36$ which is complement to $P$ , fine, and we are done, not simple.  For $n_5=6$, $|N_G(P)|=\frac{180}{6}=30$. From here I can see that by $N/C$- theorem $|N_G(P)/C_G(P)|\le 2$. In this case I am stuck, Any help please.   Thanks in advance!


Ubuntu only booting when flash drive is inserted

I'm a beginner to linux and decided to install Ubuntu on my laptop. I made a bootable usb with the most recent version of ubuntu which i wanted to install on my laptop(Asus Zenbook-UX450FDX). I wanted to completely wipe wipe laptop which was running W10 and replace it with Ubuntu. I installed ubuntu and it works as long as i have the flash drive inserted, when its not, it just shows the grub. Does anyone know how to fix this problem?