android using if else with getStringextra doesnt work

so umm my if else is buggy it only shows the else option and not the if(data == "heavy") i just want that is type is equal to heavy and not light then one of the linearlayout vanishes goes invisible and the other way around... help me please...  heres my code:      Intent intentType = getIntent();     String valueType = intentType.getStringExtra("type");     EditText displayType = (EditText) findViewById(R.id.editTextType1);     displayType.setText(valueType);      LinearLayout one = (LinearLayout) findViewById(R.id.type1);     LinearLayout two = (LinearLayout) findViewById(R.id.type2);       String data = displayType.getText().toString();     if(data == "heavy") {         one.setVisibility(View.VISIBLE);         two.setVisibility(View.INVISIBLE);     } else {         one.setVisibility(View.INVISIBLE);         two.setVisibility(View.VISIBLE);     }   the codes from previous .java file:      EditText units = (EditText) findViewById(R.id.editTextUnits);     units.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             Intent intent = new Intent(new Intent(MainActivity.this, MainActivity3.class));             Intent intentType = getIntent();             String valueType = intentType.getStringExtra("type");             intent.putExtra("type", valueType);             startActivity(intent);         }     });   the other .java file   private void SetOnClickWeightButton(){         Button btn = (Button) findViewById(R.id.buttonWeight);         btn.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 Intent intent = new Intent(MainActivity2.this, MainActivity.class);                 intent.putExtra("type", "heavy");                 startActivity(intent);             }         });     } private void SetOnClickLengthtButton(){      Button btn = (Button) findViewById(R.id.buttonLength);     btn.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             Intent intent = new Intent(MainActivity2.this, MainActivity.class);             intent.putExtra("type", "light");             startActivity(intent);         }     }); }


Creating a formula field using IF statement with Text return

I am creating a Formula field that returns texts when:    1Picklist_Status = Activated, the return text should be A else null   2Picklist_Status = Sold, the return should be B else null      1Picklist_Status = ChangeofMind , the return should be C else null   So these are 2 picklist fields that would update the formula field if a OR b is true. The problem here is that my return type is text, so I can't use OR parameter. pls help


calling a function template from a second class

I’m trying to call a function template defined inside a class from within another class, but I’m stuck. I get error:   1>class1.obj : error LNK2019: riferimento al simbolo esterno "public: void __thiscall class2::output<double,long>(double,long,float)" (??$output@NJ@class2@@QAEXNJM@Z) non risolto nella funzione "public: void __thiscall class1::x(class class2 &)" (?x@class1@@QAEXAAVclass2@@@Z)  1>class1.obj : error LNK2019: riferimento al simbolo esterno "public: void __thiscall class2::output<float,int>(float,int,float)" (??$output@MH@class2@@QAEXMHM@Z) non risolto nella funzione "public: void __thiscall class1::y(class class2 &)" (?y@class1@@QAEXAAVclass2@@@Z)  1>C:\xxx.exe : fatal error LNK1120: 2 esterni non risolti   If I uncomment lines with duplicate functions (the ones without templates) it is ok. Can you help fix it?  File: “class1.h”  #ifndef CLASS1 #define CLASS1 #include "class2.h" class class1{ public: void x(class2& c ); void y(class2& c ); }; #endif   File: “class1.cpp”  #include "class1.h" void class1::x( class2& c ) { double img; long integ; float y; c.output(img, integ, y); } void class1::y(class2& c ) { float img; int integ; float y; c.output(img, integ, y); }   File: “class2.h”  #ifndef CLASS2 #define CLASS2 class class2{ void output2(double img, long integ, float y); void output2(float img, int integ, float y); public: template <typename T1, typename T2> void output(T1 img, T2 integ, float y); //void output(double img, long integ, float y); //void output(float img, int integ, float y); }; #endif   File: “class2.cpp”  #include "class2.h" template <typename T1, typename T2> void class2::output(T1 img, T2 integ, float y) {output2(img, integ, y);} //void class2::output(double img, long integ, float y) //{output2(img, integ, y);} //void class2::output(float img, int integ, float y) //{ output2(img, integ, y);} void class2::output2(double img, long integ, float y){/*...*/} void class2::output2(float img, int integ, float y){/*...*/}   EDIT  I’m talking about function templates and not class templates. I’ve seen the question I would be duplicating before, but it is not what I’m looking for. I have two functions inside a class that are identical except for their parameters type.  I only wanted a simple trick to avoid writing and maintaining identical code for two functions inside the same class. Anyway I’ve found a solution, adding these two lines at the bottom of class2.cpp:  template void class2::output<double, long>(double img, long integ, float y); template void class2::output<float, int>(float img, int integ, float y);


How do I add a .sty file to my MacTeX/TeXShop installation?

I've searched online, but I have not found any clear instructions how to permanently add .sty files to my TeXShop installation. I'm using a Mac with OSX (TeXShop is a mac only program).  What is the best way of doing this? The one comprehensive set of instructions I found .   I've got as far as extracting the files (running LaTeX on the .ins and . dtx files) but after that I don't know what to do. I also don't understand how to update the index of my distribution, and whether there are particular OSX specifics (the instructions are for Windows).


Could electromagnetic charge curve something like spacetime in analogy with general relativity?

Newtonian gravity and electrostatics have the same form; this analogy is extended when we look at full dynamic electromagnetism, and correspondingly "gravitomagnetism". We are quite capable of observing higher-order general relativistic effects, because mass (and energy) attracts more of itself and we get very large quantities of it. It would be difficult to isolate a net charge on planetary scales, though -- the whole Sun has a charge of 77 Coulombs. How plausible is it to consider that classical electromagnetism is just the low-charge limit of a larger theory, that curves spacetime (or something like that -- in some way that only affects charge) in a more complicated, dynamical way?  I'm aware that, as electromagnetic waves move through space, they would carry energy themselves, bending spacetime somewhat. I lack the GR background to understand how that behaves, though. My first thought is that - if a single photon moved through space, its energy is so small as to only bend spacetime a very small amount, with radii of curvature much less than its own wavelength. As the energy of the photon goes up, and the radius goes down, so does the wavelength. So to see nonlinear behavior would require enormous numbers of coherent photons.


Add an option to weed out questions I've answered in custom filters

When making a custom filter with my tags/other criteria, I noticed that it lists a lot of questions that I've already answered.  I apply these filters to look for questions where I can provide a (possibly) helpful answer, and the number of questions I can't answer grows and grows as the number of answers I have posted increases.  Can we please add an option to exclude these questions from our filters?


Studying for CISSP these choices seemed limited:     What is the advantage of digital signatures over message authentication codes?         Digital Signature provides integrity verification while message authentication code does not   Digital Signature provides confidentiality while message authentication code does not   Digital Signatures provide authenticity while message authentication code does not   Digital Signatures works faster than message authentication codes      Using the following chart as a reference, I'm leaning towards #2, but none of the choices really fit properly…  Cryptographic primitive | Hash |    MAC    | Digital Security Goal           |      |           | signature ------------------------+------+-----------+------------- Integrity               |  Yes |    Yes    |   Yes Authentication          |  No  |    Yes    |   Yes Non-repudiation         |  No  |    No     |   Yes ------------------------+------+-----------+------------- Kind of keys            | none | symmetric | asymmetric                         |      |    keys   |    keys   Hopefully an expert here can clarify.


Uniform continuity of a function and cauchy sequences

So I'm pretty sure this is almost immediate from the definitions, please tell me if I am incorrect..  Consider two cauchy sequences in D, $\{x_n\}$ and $\{y_m\}$. Since $f$ is uniform continuous we know that there exists $\delta > 0$ for all $     \epsilon > 0$ such that for $x_n , y_m$ ($\forall n,m)$  $|x_n - y_m| < \delta  \implies |f(x_n) - f(y_m)| < \epsilon$  $f(x_n), f(y_n)$ are clearly sequences, and since we have this inequality for all $n,m$ we conclude that $f(x_n) , f(y_n)$ are cauchy sequences.


Is it possible to have authoryear-style citations with the IEEEtran document class?

For school I have to write a paper and use the IEEEtran bibliography style:  \bibliographystyle{IEEEtran} % argument is your BibTeX string definitions and bibliography database(s) \bibliography{IEEEabrv,bibliography.bib}   Now I want to include the natbib package so I can cite my papers in the following way:     Cook et. al. [1]   The entry for that cite in my bib file is as follows:  @ARTICLE{cook2009ambient,   author = {Cook, D.J. and Augusto, J.C. and Jakkula, V.R.},   title = {Ambient intelligence: Technologies, applications, and opportunities},   journal = {Pervasive and Mobile Computing},   year = {2009},   volume = {5},   pages = {277--298},   number = {4} }   Now if I include the natbib package it complains: "natbib bibliography not compatible with author-year citations" So I load it with option numbers but then my authors are not shown in the latex file.  So how can I cite in the explained way? Without changing anything of the bibliographystyle option. Thanks!  EDIT: I included the template we start with from school:      \documentclass[10pt,journal,compsoc,twoside,a4paper]{IEEEtran}     \usepackage{cite}     \usepackage[pdftex]{graphicx}     \usepackage[cmex10]{amsmath}     \usepackage{algorithmic}     \usepackage[tight,normalsize,sf,SF]{subfigure}     \usepackage{url}       \hyphenation{}      \begin{document}     \title{Butler Robot Localization Using Dash7 Technology}      \author     {              \thanks             {              }     }      \IEEEcompsoctitleabstractindextext{%     \begin{abstract}      \end{abstract}      \begin{IEEEkeywords}      \end{IEEEkeywords}}      % make the title area     \maketitle     \pagestyle{empty}     \thispagestyle{empty}     \IEEEdisplaynotcompsoctitleabstractindextext     \section{Example}     Example!      % references section  \bibliographystyle{IEEEtran} % argument is your BibTeX string definitions and bibliography database(s) \bibliography{IEEEabrv,bibliography.bib}  \vfill  \end{document}


Making CMD run as administrator mode automatically

I like to do a Win+R+ CMD + Enter but it doesn't run the command prompt in "administrator mode".  I am aware that I can "right-click" run as admin, however I was wondering is there anyway to make the CMD run automatically in administrator mode? (usually most of the things that I need to do with CMD requires admin access anyway)


How to accomplish SQL Server 2012+2014 high availability

Maybe I'm searching for the wrong thing, but I can't see how I can do this.  I have two servers:   Server A (has SQL Server 2012 installed) Server B (has SQL Server 2014 installed)   Server A provides an API via IIS. The code both inserts and gets data from the database depending on the API call.  Server B does exactly the same for its local database.  I would like to have it so that the two databases are consistent copies of each other. I do believe this is what HA accomplishes.   So a load balancer, for example, might direct API calls to A sometimes, and B sometimes, but the data needs to be consistent either way.  I found some documentation on HA for SQL Server 2012, but not on how to do this for a mixed environment of 2012 and 2014.  Any help or pointers to documentation would be great! Thanks.


Will dual booting make my laptop's performance speed slower than it was before? I have previously installed Ubuntu 14 in my desktop along with Windows 7. I thought it might be the reason for my pc to get slower. I am planning to install Ubuntu in my laptop so I am asking.


how to copy the bash file itself to the output dir

I want to save a copy of the bash file each time I run it. It should be saved to the output dictionary. I am doing it like this in the mytrainrtest.sh file: mkdir -p "${EXP_DIR}/train" cp "${WORK_DIR}"/mytrainrtest.sh "${EXP_DIR}"/.  Now I have much more bash files with name my****** as copies of the upper one, each with different names. How can I write the line, so the bash file will recognize its name to copy itself?


java program throws nullpointer exception some times not? why it is happening?

I wrote this program to sync multiple threads, the functionality of this prog is each runner thread gets some random value and we need to sort them in order but the prog some times get null pointer exception some times not. this is relayrace.java  package com.mani.threadstrail; import java.util.Random;  import java.util.LinkedList; import java.util.List;  public class RelayRace extends Thread{  public static void main(String[] args) {     // TODO Auto-generated method stub     for(int i=0;i<10;i++)    {        RelayRace r= new RelayRace();        r.setName("runner-"+ i);        r.start();    }   try {     Thread.sleep(1000);     Runner.sortings();     Runner.printlist();  } catch (InterruptedException e) {     // TODO Auto-generated catch block     e.printStackTrace(); }   }  public void run() {     Random rand = new Random();      int  n = rand.nextInt(50) + 1;     System.out.println(Thread.currentThread().getName()+"  "+ n);     Runner r1 = new Runner(n,Thread.currentThread().getName());     r1.add(); }   }  this is runner.java  package com.mani.threadstrail;  import java.util.Collections; import java.util.LinkedList; import java.util.List;   public class Runner implements Comparable<Runner> {    static List<Runner> a = new LinkedList<Runner>();    public int speed;   public String name;   Runner(int speed,String name){       this.name=name;       this.speed= speed;   }   public synchronized void add() {        a.add(this);    }   static synchronized void printlist() {       for(Runner st:a){             System.out.println(st.speed+" "+st.name);         }   }  static void sortings() {      Collections.sort(a);  }  @Override public int compareTo(Runner o) {     return -(this.speed-o.speed); }   }


Why I can't print pages correctly in the StackExchange platform

This is the actual page, for example:     :   But when I try to print it this is what I get:        You can see that the page was narrowed.  It happens in any question in this site. If I try to print it horizontally, some of the lines are disappear. I have tried all ready in many computers and in all of them the problem exist!  I usually print the questions I'm asking since it's more convenient for me to read from a paper, only recently this problem occurred.


possessive apostrophe(s) in definition of abbreviation

Consider the following two sentences, dealing with a singular "ISP":     (1) The virus penetrated the Internet Service Provider's (ISP)'s firewall.   or     (2) The virus penetrated the Internet Service Provider (ISP)'s firewall.   The subtle difference is that (1) has a possessive apostrophe both on the term and its abbreviation, whereas (2) only has it on the abbreviation.  Which of the above two is more commonly preferred?


Difference between "within" and "inside"

I am Indonesian and I think my English is bad especially when it comes to vocabulary. One day I ran into the words within and inside. I opened Google Translate, translated both words into Indonesian, and the meaning was the same. It said "dalam". So what is the difference between the two?


Say we have a random variable $Y$ which is positive, and a binary variable $X$, i.e. takes values 0 and 1 only.  I have seen (in various places) that:  $$Cov(X,Y) = E[Y | X = 1| - E[Y | X = 0|$$  How do you prove this?  I tried attacking it using the definition:  $$Cov(X,Y) = E[XY| - E[X]E[Y]$$  but it led nowhere.


How am I able to separate two C statements by a comma (,)?

I was editing the source code of a program I had written few days back, and observed an interesting thing.  I had below two statements:  newNode->data = 5   and  newNode->next = NUll   And there was a comma (,) instead of a semi-colon (;) separating above two statements. I was surprised because, I always thought this should result in an error.  Below, I have written a short C program to show what I mean to ask.  #include<stdio.h> #include<stdlib.h>  /*node structure definition*/ struct node {     int data;     struct node *next; };  /*----------main()------------*/ int main(int argc, char *argv[]) {     struct node *newNode = NULL;         newNode = malloc(sizeof(struct node));      /*Below is the interesting statement*/      /*LABEL: QUESTION HERE*/      newNode->data = 5,     newNode->next = NULL;      printf("data: %d\n",newNode->data);      while(newNode->next != NULL)     {         printf("Not Null\n");     }      return 0; }    Please see below compilation and sample run of the above program.  Lunix $ gcc -Wall testComma.c -o testComma Lunix $ ./testComma data: 5 Lunix $   As you see, the program compiles and run with no issues.   Using comma (,) instead of semi-colon (;) should not result in an error here ? Why ?   I thought I knew what C statements are but looks like I don't! Could someone explain the reason why there is no error in this case?


I've been buying wire-to-wire and wire-to-board Molex connectors that look like this:    from a local hardware store for years (the image is taken from SparkFun, which sells them with the crimp terminals and wire pre-installed).  I'd now like to buy a large number of them from an online supplier (e.g., DigiKey or Molex themselves) but I can't figure out what specific type of Molex connector they are.  has quite a variety of connectors and I'm finding it difficult to determine which product line these ones belong to.  Their pitch is approximately 2.5 mm (possibly 2.54) and they use crimp terminals that are held in place by a raised metal "flap" (one per terminal) that catches on a narrow rectangular hole in the plastic casing (in the photo above, these holes are on the underside of the female end of the connector).


Categories other than "off-topic" should allow custom close reasons

Custom close reasons are a great boon to Stack Exchange sites, allowing the community to provide more tailored advice to site-specific situations. Their big problem (aside from being limited to three by default) is that they are all lumped under "off-topic". This is often confusing.  I suggest that all close categories but "exact duplicate" should support customized close reasons — not just the "off-topic" category.  For example, the recommendation close reason     Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam.   This would make more sense as a child of primarily opinion-based.    Similarly, the "why doesn't this work" close reason     Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: .   This would make more sense as a child of unclear what you're asking.  Similar examples can be given for pretty much any of the Stack Exchange sites.


Is there a standard way to mark web content obsolete?

I was just listening to someone talk about how the older content is the more relevant it is seen by search engines even if it is obsolete info.  But it seems in many cases it is good to leave content in place for historical\reference reasons.  Is there a standard way (tag, meta-tag, http response code) to mark up a page as obsolete?    Or at least is there a standard way to tell the search engines that the pages are less relevant.  To be absolutely clear, I am not asking how to make the pages unavailable (for which there are clear HTTP status codes), but rather how to acknowledge that they may no longer be relevant except for historically.


Minimum distance to reach opposite corner

An ant is caught on one corner of a cuboid with sides $l, b,$ and $h$. It wants to reach the diagonally opposite corner, However, the ant can perform a walk only along the faces of the cuboid. What is the least amount of distance that the ant needs to walk to reach the other corner?  Example : Let $l=b=h=4$ then answer is $8.944271$. How to find it for given $l , b $ and $h$ ?


How to get a drive formatted with exfat working?

In Ubuntu 13.04 there was an option to use the PPA by Relan in order to get ExFat functionality. Seeing that in Ubuntu this functionality is now available from the repositories without the PPA I tried this but failed to make it work.  So my question is how do I enable exfat support?


Zero divisors in $\mathbb{Z} / b\mathbb{Z}$

How can I describe the set of all zero divisors in the ring  $\mathbb{Z} / b\mathbb{Z}$ for $b \in \mathbb{Z}, \, b\geq 2$ with a mathematical proof? I know that the set of zero divisors just contains the equivalence classes of the numbers $x,y$ such that $x*y = b$. So now $[x], [y]$ are in the set of zero divisors. But i would like to give a mathematical prove and a with a precise description of the set


I'm running 14.04LTS and this is the first time using a wireless card on my computer. In my previous residence, I was able to have my computer connected via ethernet. However now that I have moved, this is not possible and didn't think it would be a huge issue.  I'm using an Alfa AWUS036NH wireless card to connect to the router in the living room. The router is on the other end of the house, but I have no problem connecting and have a decent signal. I try to keep a connection to my VPN almost 100% of the time, but I've seen it disconnect multiple times. It appears to be doing it at random. I've seen it work perfectly for over an hour, and then I've also seen it disconnect in less than 10 minutes.  It wouldn't be a big deal because it seems like it stays connected to the router, but drops the VPN connection, because it then instantly says "Connected to Wireless Network". I have seen it briefly disconnect me when not even using the VPN service, so I'm guessing this is something related to software, or my wireless card?


C# get private method by reflection from another class and invoke it

In Java you can invoke a private method like so:  Method m = obj.getClass().getDeclaredMethod("foo", null);  m.setAccessible(true); m.invoke("bar");   What is the equivalence in C#? I need to call a private method in the Unit Test.


SC2272-M4 Behaviour when using relay SRD-05VDC-SL-C 5V DC

I'm currently encountering a problem when using a relay switch with a 5v receiver. When using the same receiver with a row of LEDS it works flawlessly. I've noticed that the relay keeps making the switching noise over and over like I'm pressing the transmitter really fast apart from the fact I'm not. Also, when the transmitter is moved closer to the receiver from 20" to around 1" the problem stops. Below is some circuits to help show you my setup.  Any help appreciated thanks.  Setup Specs   USB 5v DC (2AMPS) Receiver (XY-DJM-5V - SC2272-M4) Relay (SRD-05VDC-SL-C 5V DC) Transmitter (XY-04) Diode (1N4001) Transistor (2N2222A) Resistor (1.8K Ohms)          – Schematic created using   Antenna Signal Workaround or Booster  I believe this issue is related to wireless signal on D0. Basically above 20" inches the output to the relay drops from 5.05v to 0.5v and is obviously causing the problem. I think I need to boost the signal or replace the transistor with something that triggers at low and high current but have no clue. Any help appreciated, I'm new at this.  Board Setup


How to make X.org listen tcp port to remote connections?

Ubuntu 15.04 64-bit desktop.  After install system X server run with -nolisten tcp option:  922 tty7     Ssl+   0:05  \_ /usr/bin/X -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch   I add xserver-allow-tcp=true into  /etc/lightdm/lightdm.conf and reboot. So X now started without -nolisten tcp:  2688 tty7     Ssl+   0:07  \_ /usr/bin/X -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 vt7 -novtswitch   But X not actually listen any tcp port:  sudo netstat -Wpnatu Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      645/cupsd        tcp        0      0 192.168.1.110:55524     192.168.1.2:22          ESTABLISHED 4016/slogin      tcp        0      0 192.168.1.110:1008      192.168.1.2:2049        ESTABLISHED -                tcp6       0      0 ::1:631                 :::*                    LISTEN      645/cupsd        tcp6       1      0 ::1:57617               ::1:631                 CLOSE_WAIT  2955/indicator-prin tcp6       1      0 ::1:57413               ::1:631                 CLOSE_WAIT  782/cups-browsed tcp6       1      0 ::1:57412               ::1:631                 CLOSE_WAIT  782/cups-browsed udp        0      0 0.0.0.0:32586           0.0.0.0:*                           790/dhclient     udp        0      0 0.0.0.0:68              0.0.0.0:*                           790/dhclient     udp        0      0 0.0.0.0:631             0.0.0.0:*                           782/cups-browsed udp        0      0 0.0.0.0:5353            0.0.0.0:*                           663/avahi-daemon: r udp        0      0 0.0.0.0:44534           0.0.0.0:*                           663/avahi-daemon: r udp6       0      0 :::40820                :::*                                663/avahi-daemon: r udp6       0      0 :::54127                :::*                                790/dhclient     udp6       0      0 :::5353                 :::*                                663/avahi-daemon: r   So, what else i must to do?  UPD:      With Xorg 1.17 and later, -nolisten tcp is the default, and you need   to explicitly state -listen tcp to enable tcp connections.   According this comment by alanc, i try add another line to lightdm.conf:  xserver-command=X -listen tcp   Finally all work as expected. My result lightdm.conf:  [Seat:*] autologin-guest=false autologin-user=ubuntu autologin-user-timeout=0 autologin-session=lightdm-autologin xserver-allow-tcp=true xserver-command=X -listen tcp   And it's completely solved my problem.


Generate t distributed random variable in matlab

How can we generate t distributed random variables with given mean and covariance in matlab. trnd is a function in matlab but we can get random variable with different degrees of freedom but how to get random variable with given mean and covariance?


How do I activate WindowsXP now that support has ended?

What Options are there to activate Windows XP nowadays?  The "regular" methods provided with XP (phone and online) don't work anymore. The phone number is not valid for activation anymore (I tried the German one) and the online activation does not work either (in a quick test within a DMZ other protocols like ICMP or HTTP worked fine when I accessed an internet server).    The latest question/answer I could find here on superuser is this one:  which doesn't provide an answer to my question. In addition the question asks only if it can be done in general not how (neither does the existing answer say how), and about other problems (dual boot), so I decided to post the question again as specific question just about the activation process.  The solutions can be a workaround (disabling the activation check), but for security reasons, it shouldn't contain a binary download. Preferably it also shouldn't require a network/internet connection. Although there is no way around using WinXP, I want to minimize security risks.  EDIT1: Since quite a few people asked, please note why (in my opinion) this question is not a duplicate of , please see my explanation above. I made a thorough explanation in meta .  EDIT2: it was suggested to call MS support and/or sales unfortunately they do not help with WinXP anymore.  EDIT3: please be aware that running an outdated OS without security updates poses security risks explained  as  points out correctly. Therefore, if possible you should change/upgrade the OS of your device. However in some cases it's not an option to change to a different OS, e.g. because certain drivers/HW/SW is only compatible with Win XP.  EDIT4:  note, the activation process comes after entering a installation/serial key (e.g. from the licence sticker)


What is more, partitions of the number $N$ into at most $k$ terms, or partitions of the number $N + k$ into exactly $k$ terms? We consider partitions that differ only in order to be the same. Looks like pretty easy combinatorial problem, but I have no idea that should work here. I tried draw , and build some bijections. As I know, there no any formula for finding number of partitions, so I need some more ideas/hints for this problem


Why do we write "Tsk" for the sound of disapproval?

Wikipedia says , which isn't true at all.  For instance, there's the one usually done twice in rapid succession with the tongue against the upper side teeth/gums - to "gee up" a horse, indicate "mock-conspiratorial" agreement, etc.  So far as I know, we don't even attempt an onomatopoeic written representation of that one, but the one formed by suction against the back of the front teeth/palate is normally written as either "tut" or "tsk". Sometimes people actually say "tut" or "tut-tut" (presumably, influenced by the written form).  But I've never heard anybody say anything remotely resembling "tsk". So where does the "k" come from in that written representation?


How could one go about proving that $$x^{\log n} = n^{\log x}\ {?}$$ I'm not really sure how to get started.


When one says I was washing my hair, is it singular or plural? What is the singular for hair?


How to prove $A=(A\setminus B)\cup (A\cap B)$. I have seen this  and the solution is clear to me. Initially I was satisfied by my prove but now I think it is wrong.   How I have proved  $$(A\cup B)=(A\setminus B)\cup(A\cap B)\cup(B\setminus A)\\   (A\cup B)\cap A=[(A\setminus B)\cup(A\cap B)\cup(B\setminus A)]\cap A=[(A\setminus B)\cap A]\cup[(A\cap B)\cap A]\cup[(B\setminus A)\cap A]\\   A=(A\setminus B)\cup(A\cap B)\cup\phi=(A\setminus B)\cup(A\cap B)$$  Have I proved it correctly. If yes then how? I mean that I have used $A=(A\setminus B)\cup (A\cap B)$ and $B=(B\setminus A)\cup (A\cap B)$ to get the $(A\cup B)=(A\setminus B)\cup(A\cap B)\cup(B\setminus A)$ and then I'm using it to prove $A=(A\setminus B)\cup (A\cap B)$. This means that I'm using a statement to prove itself!  Kindly help me.


Prevent bad rankings on a Q and A site for questions without an answer by using noindex until answered

I have a website on which users can ask a question and also answer it. So, when a user asks a question, it creates a new webpage on website and below that question lies its answers.  I don't want search engines to index those pages or questions which don't have an answer, so I added an if condition stating if the question doesn't have answer show the noindex meta tag, if it does, then don't show it.  I was wondering if it is the right way to do so?  I mean, first when the question is asked and Google will crawl it, it will see the noindex tag. But after some time when it will have an answer, Google will see that it can be indexed.  Will it affect the ranking and overall performance in Google search results?


Best way to allow water to flow inside this mesh?

I am a blender beginner and after watching some tutorials online I figured I'd give modeling and animation a try. I am trying to make an oil hourglass animation that will move the liquid downwards., I have a physical reference of it. The only issue is that my liquid doesn't seem to want to pass through 2 holes I made on the container mesh, I suspect it's because of the wrong facing normals right outside of it:  I managed to get the liquid to flow inside of the top sphere.  but It won't flow into the rest of the mesh.  Will I have to create a new mesh? Help is appreciated, thank you!


How to proof squareroot inequality by induction?

Hello so I'm making an exercise where you need to proof the following: $$1+\frac{1}{\sqrt{2}}+...+\frac{1}{\sqrt{n}}\leqq2\sqrt{n}\text{ with }n\in\mathbb{N}$$ But I seem to be stuck, this is what I have: Base Case Take $n$=1, then $\frac{1}{\sqrt{1}}\leqq 2\sqrt{1}$, which is true Induction case take $k$ $\in\mathbb{N}$ and assume that: $$1+\frac{1}{\sqrt{2}}+...+\frac{1}{\sqrt{k}}\leqq2\sqrt{k}$$ add k+1, then: $$1+\frac{1}{\sqrt{2}}+...+\frac{1}{\sqrt{k}}+\frac{1}{\sqrt{k+1}}\leqq2\sqrt{k+1}$$ This is where I'm stuck, normally you could replace $1+\frac{1}{\sqrt{2}}+...+\frac{1}{\sqrt{k}}$ with $2\sqrt{k}$ and then prove that the lefthand side equals the righthandside. But because its less than or equal I (at least I think)  can't replace it, so now I can't show if its less than or equal. So I can't seem to find a way to proof it by induction. If you know the answer please share your wisdom Thanks in advance.


Why can reversing the order of quantifiers in a statement change its truth value?

The statement $$\forall x \in \mathcal{R} \exists n \in \mathcal{N} (n>x)$$ Is true, but $$\exists n \in \mathcal{N} \forall x \in \mathcal{R} (n>x)$$ Is false.  Why does reversing the order of the quantifiers cause the first statement to become false?


How to insert an unbreakable space when LaTeX3 syntax is turned on

Usually ~ is used to insert an unbreakable space, however, it is used to insert a normal space in LaTeX3, if I understand it correctly. So how do I insert an unbreakable space in this case? Just use the penalty to get the same affect?


My database value is Ã‰cole Polytechnique FÃ©dÃ©rale de Lausanne. I cannot convert to html characters. I tried to convert using following method,  echo html_entity_decode(Ã‰cole Polytechnique FÃ©dÃ©rale de Lausanne'); echo html_entity_decode($Event['Event_speaker']);   Ist statement i got the actual result and the second one display exactly same as db value.  In my header am using  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta charset="utf-8">   Can someone help??


Trace of a matrix, characteristic polynomial

I know that may be trivial, but I don't know how to prove that if  $$w(\lambda)=(\lambda-\lambda_1)^{r1}\cdot \ldots \cdot (\lambda-\lambda_{k})^{r_k}$$ is a characteristic polynomial of matrix $A\in M_{n \times  n}(K)$ where $K=\mathbb{R} \ \vee \ K=\mathbb{C}$ then tr$(A)=r_{1}\lambda_1+_{\cdot \cdot \cdot}+r_k\lambda_k$ and that if $$(\forall \ k\in \left \{ 1,2,... \right \})  \ \text{tr}(A^k)=0$$ then $A$ is singular.  Any hints appreciated.


Override theme template from module without implementing a theme

I have a project on D8 where I don't use any custom themes, I use default seven theme for everything because there is no need of any visual theming.  So My question: Is it possible to override theme template using module? without implementing theme at all?  I have a case where I want to add custom third party generated value in node's template.  This is what I have done:   Implemented custom template:  function MY_MODULE_theme($existing, $type, $theme, $path) {   return array(     'video_teaser' => [       'template' => 'video_teaser',       'variables' => NULL,     ]   ); }   Implemented hook_theme_suggestions_alter:  function MY_MODULE_theme_suggestions_alter(array &$suggestions, array $variables, $hook) {   if(in_array('node__teaser', $suggestions)){     $suggestions[] = 'video_teaser';   } }    And this, works, instead of default template, my video_teser template is used.  BUT: I have a problem passing default node variables to my custom template, they aren't passed automatically and I couldn't find the way to do this using current approach.


Are there any video lectures that teach Weinberg's QFT books?

I am reading Weinberg's QFT books. I wonder is there any course can help me with it.


Can you use sizeof() to print the size of an array pointed to by char *?

char *one = new char[1024]; char one1[] = "hello"; one = hello; cout << sizeof(one) << endl;   I really want the last line to output sizeof(one1) but I know as it stands it will output the size of the pointer which is 4 or 8. Is there a way to extract the sizeof() of the array from just the pointer to the first letter?


Is it possible to convert a drop bar road bike with 2x7 Tourney brifters to flat bar using Tourney rapidfire shifters? I believe they only come in 3x7 variant, so is it posible to use that and just limit the front derailleur? Will this even be compatible?


Use of apostrophe in a mixed singular-plural context

This isn't my homework. This came up during a friendly debate last night with my mom.  What would be the correct use of the apostrophe and/or plural in the sentence One of my friend(s) house(s) is on sale. in each of the following cases? My guesses are in bold, but do correct me if of them are any are incorrect.  (a) I have exactly one friend, and he has exactly one house which is on sale.       One of my friends' house is on sale.   (b) I have many friends and one of them is selling his only house.       One of my friends' house is on sale.   (c) I have exactly one friend and he is selling one of his many houses.       One of my friends' houses is on sale.   (d) I have many friends and one of them is selling one his many houses.       One of my friends' houses is on sale.   I think the form One of my friend's... will be incorrect in all cases, unless the noun cannot be realized in plural form, such as in One of my mother's friends is a dentist. Is this right?


How to customize the_archive_title()? Cannot figure out how to change the value it produces

I've searched the web for help on this, I found similar questions, but not exactly what I'm looking for. Hopefully someone can help.  The following code is in my theme's archive.php file:   <?php     the_archive_title( '
', '
' );     the_archive_description( '
', '
' ); ?>    the_archive_title section of the code is causing the following text to appear on my WP page:    Archives: Projects   It's formatted a certain way where the text is large and bold. It looks really nice however, I want to change the value of this. I want it to display the following instead:   Viewing All Offices   I've literally have tried to do everything. I'm a bit of a noob at WP, but this is my first time doing this. I could not figure how how to change the text value to that.   If someone can please help me out, that would be great. Looking for the most cleanest and secure solution.


I need to run a query like:  SELECT p.id, p.name,         (SELECT name            FROM sites s           WHERE s.id = p.site_id) AS site_list   FROM publications p   But I'd like the sub-select to return a comma separated list, instead of a column of data.  Is this even possible, and if so, how?


I am using   foreach(glob("config/pages/*.php") as $page){   to get the list of all files in the directory of config/pages/ Can I have this show up by the oldest file first and the newest file last?  I am wanting to make a navigational menu out of all of this. My full source code is as follows but I need the oldest file to show up first, Maybe I could add a variable to each file like: `$order = 1;' where the number would be the order in the list?   so for example for page home.php the $order would be equal to 0 and about.php would be equal to 1. And then somehow sorting based on counting in order from 0?

<?php echo $config['site_title']; ?>
  <?php      $files = glob("config/pages/*.php");      $files = array_combine(array_map("filemtime", $files), $files);      ksort($files);       foreach($files as $page){          // Remove the conifg/pages/ from the string         $strip1 = str_replace('config/pages/', '', $page);          // Remove the .php from the string         $strip2 = str_replace('.php', '', $strip1);          // Uppercase the first letter in the string         $capit = ucfirst($strip2);          // Re-define the string as the display title         $title = $capit;          // Remove the .php and replace it with .html         $html = str_replace('.php', '.html', $strip1);          // Re-define the string for the link url         $link = $html;          // Display the end string with html elements to user         echo "
".$title."
";     }  ?>


I am trying to import  CSV file and get no reported errors but there are no points visible. If I click on "zoom to extent" nothing happens (even if I move away from the location of the points before doing this.  I have shut off all raster layers but they were not hiding the points.  I have tried to find an answer here but none seem to fit my problem. I have followed the steps in this tutorial:   Here is an image of the CSV file:    here is the import dialog box:   and here is the QGIS attribute table after import:   I am saving in WGS84.  I tried the local projection (NAD83 Zone 19N) but that made no difference.   I am using QGIS 2.12.1 on Windows 10. Any suggestions on what I am doing wrong?


Land Cover vector data for Saskatchewan / Manitoba Canada

Looking for Land Cover (aka Land Use) vector data for Saskatchewan / Manitoba Canada. Using  I can see the data but not download it as seen  Another source is  but they also seem to only have it in viewer format.


Can $R \times R$ be isomorphic to $R$ as rings?

I know from  that $R \times R$ can be isomorphic to $R$, as $R$-modules.     But can they ever be isomorphic as rings?


Install ubuntu 13.04 alongside windows 8

Currently I am using Windows 8 in my dell N4050 machine. It has 4GB of RAM, 320GB HDD. Now I want to install ubuntu 13.04 alongside Windows. I tried several times after reading some blogs. But every time I failed.   I downloaded Ubuntu 32bit from the official site and made my pendrive into bootable device using Universal-USB-Installer-1.9.3.7.exe.   I could not burn a DVD and boot from it because my DVD drive is not working somehow.   By the way, I did all the normal stuff what is needed for installing Ubuntu. In installation process Install ubuntu alongside windows 8 should have appeared but I just saw Replace Ubuntu with Windows 8 and Something else. Then I tried going with something else, I did not see such option where I can chose to use ubuntu alongside windows.


Combinatorial interpretations to prove a sum of binomials

Prove the identity $\binom{n}{0}-\binom{n}{1}+\binom{n}{2}-\binom{n}{3}+...=0$ using a combinatorial interpretation of the positive and negative terms. While I know about Pascal's triangle/binomial coefficients from other classes I've taken, we have not learned it yet in this course, so I can't use row symmetry. The other thing I would think to use would be a bijection, but as far as practicalities go, I am unsure of how to set it up. Also, we have already learned how to prove this using the binomial theorem, so I can't use that to solve this.


Can you compare AIC values as long as the models are based on the same dataset?

I am doing some forecasting in R using Rob Hyndman's forecast package. The paper belonging to the package can be found .  In the paper, after explaining the automatic forecasting algorithms, the authors implement the algorithms on the same data set. However, after estimating both an exponential smoothing and ARIMA model they make a statement I do no understand (on page 17):     Note that the information criteria are not comparable.    I thought that an advantage of using AIC for model selection is that we can compare AIC values from different models, as long as they are estimated using the same data set. Is this incorrect?  This matter is of particular interest to me, as I was planning on combining forecasts from different model classes (e.g. exponential smoothing and ARIMA) using so called Akaike weights (see Burnham and Anderson, 2002, for discussion on Akaike weights)  References   Burnham, K. P., & Anderson, D. R. (2002). Model selection and multi-model inference: a practical information-theoretic approach. Springer Verlag.


How to obtain regression coefficients of a multiple linear regression model from simple linear regression models?

Suppose I have a multiple linear regression model $$ Y=\beta_0+\beta_1X_1+\cdots+\beta_pX_p+\epsilon$$  How can I obtain the regression coefficients $\hat{\beta_i}$ by fitting just a series of simple linear regression models (additionally using sample means of the response/predictor variables if needed)?


Not getting association bonus using google ID

I have one login (using my goggle login) and use two or three stack exchange sites. On stackoverflow I have a 3000 rep but I don't seem to be getting an association bonus on any of the other accounts.  So how does the association bonus work? And/or how do I associate the various accounts?  I've looked at the other association related questions and can't immediately see anything that applies


Background Video is shown in Rendered mode but not when szene is rendered

i have a 3D Object and want to add a background image( if possible even a movie) to this 3D Object. I use Cycles to render and tried a plane with the  image as texture. When i go into render mode, it looks like this(picture with background) and when rendered, it has no background. The key also looks into  a different direction.  Should i even use Cycles for this or use motion tracking? i tried to use that but had several problems.     Rendered mode   When scene is rendered


Why if $n \mid m$, then $(a^n-1) \mid (a^m-1)$?

My Number Theory book says that for $n, m$ be positive integers and $a>1$, then     $(a^n -1)\mid(a^m -1)$ if and only if $n\mid m$.   I understand the proof for only if part, but in if part the autor says "it is clear". However a tried to prove that but a get stuck. Can you give a hint?


When I open the directory of a file, Nautilus is opened minimized.  How can I make open in maximized as main window ?


How to unlink a Microsoft account from a Windows account in Windows 1903

It used to be possible to disconnect a linked Microsoft account from a local account from the "Accounts" settings page, but Microsoft in their wisdom have removed this option.  I accidentally linked my Microsoft account (something I don't want as I have no desire for MS to be copying my account info to the cloud).  How do I go back to having a local account?


Horizontally and vertically center the image

I tried several versions regarding the centering of image in div and I failed. Please help. This is html code (bootstrap)`

`   Css: .proizvodSlider {     height: 380px; }  I just need a fixed height, other styles can add arbitrary.


RabbitMQ management console not accessible on Windows Server 2016 http://localhost:15672/

I have finished installing RabbitMQ on Windows Server 2016, and service is running and plugins are installed however i cannot access the RabbitMQ Management Console. Can someone please assist on what could be the cause?


I have downloaded a bad version of wine and so my applications no longer work. I am finding it hard to locate all the programs that I downloaded using it and thought that it would be easier to just wipe my system and start again. Is there a simple way of doing this?  I don't have a disc drive so if there is an option to do this from USB that would be great.  Thanks for any help


Using the fundamental theorem of calculus to. this problem.

From:  Suppose $f$ is a real function on $(0, 1]$ and $f \in \mathscr{R}$ on $[c,1]$ for every $c>0$. Define $\int_0^1 f(x)dx=\lim_{c\to 0} \int_c^1 f(x)dx$ if this limit exists (and is finite). If $f \in \mathscr{R}$ on $[0,1]$, show that this definition of the integral agrees with the old one.  Can I use the fundamental theorem of calculus to prove this problem? $$|\int_c^1 f(x)dx-\int_0^1 f(x)dx|=|\int_0^c f(x)dx|$$, and define $$F(c)=\int_0^c f(x)dx$$ is continuous so $$\lim_{c\to 0}|\int_0^c f(x)dx|=|\lim_{c\to 0}F(c)|=0$$


I do not know how to explain what is happening, I imported a model that I had saved some time ago. But it is with the mesh in a very strange way.  I already checked play for a new project, normals, remove doubles, decimate, merge vertex loose, but nothing solves!


Why if $Z/m\oplus Z/n = Z/mn$ then $(n,m)=1$

Prove that if $Z/m\oplus Z/n = Z/mn$ then $(n,m)=1$.   I have proved the converse, but here there is something I am missing. Hints instead of full answers are appreciated. Thanks.


Calling different classes with if else statements

I'm writing a java program that is like a physics lesson:  import javax.swing.JOptionPane; public class PhysicsClass {       public static void main(String[] args) {         int g = -1;         while (g<0){             String input = JOptionPane.showInputDialog("Welcome! What's your name? ");             if(input.length() > 0){                 g++;              System.out.println("Great! Lets begin.");             }             else{                  System.out.println(" ok then.");                 System.exit(0);             }         }           String[] firstChoice = {"Kinematics", "Dynamics", "Impulse/Momentum", "Energy/Power"};              JOptionPane.showInputDialog(null,                     "Which one of these Topic would you like to start with?",                      "Please pick a topic to start with",                     JOptionPane.INFORMATION_MESSAGE, null,                     firstChoice, firstChoice[0]);               int i = 0;             while (i<0){             String Choice = "";             if (Choice == firstChoice[0]){              Kinematics.IntroToKinematics();              i++;              }             else if (Choice == firstChoice[1]){                 Dynamics.DynamicsIntro();              i++;             }             else if (Choice == firstChoice[2]){                 ImpulseAndMomentum.ImpulseAndMomentumIntro();              i++;             }             else if (Choice == firstChoice[3]){                 EnergyAndPower.EnergyAndPowerIntro();              i++;             }             else{                 System.out.println("Please pick one.");             }             }   I want whatever choice you pick in the first choice array to then go to the respected class. So if I choose kinematics, it will call on the kinematics class, for which the first few lines are:  import javax.swing.JOptionPane;  public class Kinematics {      public static void IntroToKinematics() {         JOptionPane.showInternalMessageDialog(null, "Kinematics is one of the most basic"                 + " ideas of Newtonian Physics. It encompasses: speed, distance, time"                 + " displacement, acceleration and many key base concepts that form the the "                 + " foundation for most physic subjects. It will poke its head in everything"                 + "we cover.", "intro", JOptionPane.INFORMATION_MESSAGE);     }  }   It doesn't give me any errors but when I choose one of the strings from the array, it doesn't do anything. I think it might have something to do with the if else statements I used. Thanks for any and all help, I'm still relatively new to Java so any tips would be appreciated.


Find $\lim_{n\to  \infty}((n+1)!)^{\frac{1}{n+1}}-((n)!)^{\frac{1}{n}}.$   We need to deal the limit $\lim_{n\to \infty} \frac{\log(1)+\log(2)+...+\log(n)}{n}$. We know that $\lim_{n\to \infty} \log(n)=\infty \implies \lim_{n\to \infty} \frac{\log(1)+\log(2)+...+\log(n)}{n}=\infty$(since, By Cauchy's first theorem on limit). Hence we get $\infty-\infty$. How do I show that there exists finite limit?


Need help getting Cycles to match Eevee brightness

Pic 1 is Eevee  Pic 2 is Cycles at exposure of 1  Pic 3 is Cycles at exposure of 5  Note that the backgorunds are of similar exposure in 1 & 2, implying that while the 3rd may be nice and bright, that's only because the exposure is overkill. That actual background/world color is fairly close to black. Side note: I assume it's a 2.8 bug but the option to change the energy of the light disappears when you switch to cycles.


I am told that good developers can spot/utilize the difference between Null and False and 0 and all the other good "nothing" entities. What is the difference, specifically in PHP?  Does it have something to do with ===?


Change spacing when using ctrl to move specific amount of units

When I want to move/rotate/scale with a defined spacing or amount of units I use the ctrl key but it moves one whole blender unit, does anyone know how can  I change this spacing so that it moves 0.1 blender units?


Meaning of "it is" at the end of sentence

I was googling but I couldn't find any answers:  What is the precise meaning of the words 'it is', when they are used in a way        Are we going to the cinema on Friday or Saturday?   I don't have any time on Friday.   OK, then Saturday it is.


I have noticed that more often than not people tend to respond with answers to questions in comments as opposed to creating answers for a question.  Any thoughts as to why?  I am getting more heavily involved and just want to stay in tune with status quo.


Unmet dependencies for libgl1-mesa-dev while initializing build environment for android

I am trying to setup build environment on  Ubuntu 12.04 (precise)(64bit). I am following the guide at . I encountered the following message.  $ sudo apt-get install  libgl1-mesa-dev [sudo] password for buddy:  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libgl1-mesa-dev : Depends: mesa-common-dev (= 9.2.0~git20131002+9.2.2eb55601-0ubuntu0sarvatt~precise)                    Depends: libdrm-dev (>= 2.4.45) E: Unable to correct problems, you have held broken packages.   I tried installing mesa-common-dev  $ sudo apt-get install  mesa-common-dev   message  The following packages have unmet dependencies:  mesa-common-dev : Depends: libdrm-dev (>= 2.4.45)   Then I tried installing   $ sudo apt-get install libdrm-dev   message  The following packages have unmet dependencies:  libdrm-dev : Depends: libdrm2 (= 2.4.46-1ubuntu0.0.0.1) but 2.4.46+git20130702.c6d73cfe-0ubuntu0sarvatt~precise is to be installed               Depends: libdrm-intel1 (= 2.4.46-1ubuntu0.0.0.1) but 2.4.46+git20130702.c6d73cfe-0ubuntu0sarvatt~precise is to be installed               Depends: libdrm-radeon1 (= 2.4.46-1ubuntu0.0.0.1) but 2.4.46+git20130702.c6d73cfe-0ubuntu0sarvatt~precise is to be installed               Depends: libdrm-nouveau1a (= 2.4.46-1ubuntu0.0.0.1) but 2.4.46+git20130702.c6d73cfe-0ubuntu0sarvatt~precise is to be installed               Depends: libdrm-nouveau2 (= 2.4.46-1ubuntu0.0.0.1) but 2.4.46+git20130702.c6d73cfe-0ubuntu0sarvatt~precise is to be installed               Depends: libkms1 (= 2.4.46-1ubuntu0.0.0.1) but 2.4.46+git20130702.c6d73cfe-0ubuntu0sarvatt~precise is to be installed E: Unable to correct problems, you have held broken packages.   Then I tried the following steps mentioned here:  skipping the Disable/Remove/Purge PPAs part.


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


how can I change file association globally?

gedit is set by default to open about any source file. I've gone through the file properties and changed default application to VIM for C and C++ files.  I'd need to do this for any source file I open now, for python files, for text files, for ruby, any, since gedit is set to open all of them.  How can I change this to open with VIM without going the hassle of setting "open with" one by one?


Conditional Mean E[X|X>Y] when X,Y are Uniform

X and Y are independent and identically distributed uniform (0,1) random variables. Find E(X|X>Y) Please explain it step by step. I am getting ans 0.5 while the actual answer given is 0.66


Regex Matching on Regex101 but not matching with preg_match or preg_match_all php functions

$regex = "/<[^>]+>\s(.*)\s+(?=<[^>]+pt10 pb5">)/i";  $str = "
          Quick and delicious appetizer with mince and bread for your feast menu. You can serve these mouth watering strips as a snack with noon tea.
";   tested on regex101 and regexr and working fine on both but not with php functions and I also tried to find any character that I need to escape but not found anything.  thanx in advance for help


I have built an iron farm somewhere far away from my actual spawn chunks in my single player world. In hindsight, this was a dumb idea, but I can't exactly change it anymore. I'd like to keep the thing running all the time, so I'm looking for a way to keep the chunks loaded.  I'm running minecraft 1.12.1, is it possible at the moment? I have looked at some chunk loader mods, but chicken chunk loader hasn't been updated yet, and the others simply didn't work.  I have tried moving the spawn chunks, but that hasn't done anything either.  Edit: I have worked this out with IronAnvil, and it ended up being a render setting in optifine which didn't load them correctly somehow. It has been working fine after I reset my optifine settings to default.


By the end of the Batman Trilogy, how many people came to know the true Identity of Bruce Wayne?

In Batman Begins, very few people knew about the true identity of Bruce Wayne, but as the series progressed the number of people knowing this fact dramatically increased.  Can you provide the list of all the people who knew about his true identity by the end of The Dark Knight Rises?


The minimum perimeter and maximum height of a triangle under constraints

I do not get the following formulas :   The minimum perimeter of any triangle (abc), given the heights corresponding to the a and b-sides. The maximum height corresponding to the side b of any triangle (abc), given the value of its perimeter and height corresponding to the a-side.


Configuring libinput-gestures for a MacBook like experience

99% of the time I'm using my trackpoint, but sometimes its nice to use the trackpad. I'm running libinput as my driver, and found out that libinput-gestures should be able to give me multi-touch configurations. I have everything installed but how do i configure libinput-gestures to give me a MacBook like experience.  I would like to atleast enable 1 finger click, 2 finger right click, 2 swipe finger left to go back in the browser, and 4 finger swipe up to show all applications. Any other gesture would be nice too.  If there is another way of doing this, I'm all ears... or all eyes haha


Finite group acting on a smooth manifold $M$ by diffeomorphisms. Fixed Point set is Smooth Manifold

Let $M$ be a smooth manifold and let $G$ be a finite group acting on $M$ by diffeomorphisms. Show that the set of fixed points $M^G := \{m \in M \mid g . m = m, \forall g \in G\}$ is a smooth manifold What I tried Since $M$ is a smooth manifold, then there exist a maximal smooth atlas $\mathfrak{A}=\{(U_\alpha, V_\alpha, \phi_\alpha)\}_{\alpha \in I}$. Now I want to prove that the fixed point set $M^G$ defined above is a smooth manifold and I want to establish a chart for the same. I am unable to understand how will I use the fact that the group $G$ is finite here. Also I think it is diffcult for me to get some charts for $M^G$. Can anyone help me this way?


Can a template member function specialization also be an instantiation?

I'm running into an issue with template specialization. The following builds and runs, but I'm not sure it should:  // template.h template <typename T> class interface{ public:    void doSomething(); };  // template.cpp #include "template.h" #include <iostream> template <> void interface<int>::doSomething(){std::cout << "Did something\n";}  // main.cpp #include "template.h" int main(){    interface<int> instance;    instance.doSomething();    return 0;  };  g++ main.cpp template.cpp; ./a.out   My understanding was that all compilation units were supposed to have access to all template specializations, which main.cpp does not. If I understand what's happening correctly, the specialization in template.cpp also instantiates interface< int >, so the symbol is generated and everything links happily. However, I'm pretty sure this falls into the realm of undefinedness and I can't count on this always working everywhere. Can someone please confirm or deny my suspicions?  Thanks!


I need a hand with scaling a tikz generated picture. I have an example of using tikz I found in one of the websites (not my own work). I am trying to scale and fit it into a6 layout. I read library graphics defines two commands resizebox{}{}{} and scalebox{}{}, which apparently tikz also includes. However, the commands generate series of errors: ! Undefined control sequence. The reason why I am trying to scale the whole picture is scale=0.5 while defining environment tizkpicture also does not work. The example: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{xcolor} \usepackage[landscape,margin=0.5cm,a6paper]{geometry} \usepackage{tikz} \usetikzlibrary{positioning,calendar} \usetikzlibrary{decorations.markings}  \newcommand{\calrow}[1]{\node[anchor=base east](lun){l}; \node[base right=of lun](mar){m}; \node[base right=of mar](mer){m}; \node[base right=of mer](gio){g}; \node[base right=of gio](ven){v}; \node[base right=of ven](sab){s}; \node[base right=of sab](dom){d}; \node[darkgreen,above=of gio]{\textbf{#1}};}  \newcommand{\calperiod}[1]{\calendar[dates=\the\year-#1-01 to \the\year-#1-last] if(Sunday) [black!50] \holidays;}  \newcommand{\holidays}{% holidays in Italy if (equals=01-01) [black!50]% if (equals=01-06) [black!50]% if (equals=04-04) [black!50]% if (equals=04-05) [black!50]% if (equals=04-25) [black!50]% if (equals=05-01) [black!50]% if (equals=05-01) [black!50]% if (equals=06-02) [black!50]% if (equals=08-15) [black!50]% if (equals=11-01) [black!50]% if (equals=12-08) [black!50]% if (equals=12-25) [black!50]% if (equals=12-26) [black!50]% }  \colorlet{darkgreen}{green!50!black}  \begin{document}  \null \vfill  \resizebox{\textwidth}{!}{%     \begin{tikzpicture}[every calendar/.style={week list}]         \sffamily         \matrix[row 1/.style={darkgreen, node distance=.3ex}, row 3/.style={darkgreen, node distance=.3ex}, column sep=1ex, draw=darkgreen,thick,rounded corners=5pt, postaction={decorate,decoration={markings,mark=at position 0.51 with {\node[fill=white,text=darkgreen,font={\bfseries\Large}] (year) {\the\year};}}}]         {%             % first row: week day and month             \calrow{January} & \calrow{February} & \calrow{March} &             \calrow{April} & \calrow{May} & \calrow{June} \\                          % second row: calendar             \calperiod{01} & \calperiod{02} & \calperiod{03} &             \calperiod{04} & \calperiod{05} & \calperiod{06} \\[1ex]                          % third row: week day and month             \calrow{July} & \calrow{August} & \calrow{September} &             \calrow{October} & \calrow{November} & \calrow{December} \\             % forth row: calendar             \calperiod{07} & \calperiod{08} & \calperiod{09} &             \calperiod{10} & \calperiod{11} & \calperiod{12} \\         };     \end{tikzpicture} }  \vfill  \end{document}


How can I make the integral symbol bigger independent of the rest of equation? The symbol appears with the same size of a delimiter.


Checking if two Poisson samples have the same mean

This is an elementary question, but I wasn't able to find the answer.  I have two measurements: n1 events in time t1 and n2 events in time t2, both produced (say) by Poisson processes with possibly-different lambda values.  This is actually from a news article, which essentially claims that since $n_1/t_1\neq n_2/t_2$ that the two are different, but I'm not sure that the claim is valid.  Suppose that the time periods were not chosen maliciously (to maximize the events in one or the other).  Can I just do a t-test, or would that not be appropriate?  The number of events is too small for me to comfortably call the distributions approximately normal.


Fresh salmon that was frozen after: till when can it still be eaten raw

I always buy fresh salmon filet, cut it into pieces and put it in the freezer. I usually take a frozen piece cut it and eat it raw.  My question is: for how long can a frozen salmon filet (frozen after being fresh) still be eaten raw without the need to cook it?


How to test parameters passed to functions using junit?

I want to test the function replacefl for checking whether my "String s" has  undergone the required changes inside the function. Since the parameters passed in java are pass by values, so how can I test the behaviour of the parameter.   public class Abc{  void replcefl(String s){          s = s.subSequence(1, s.length() - 1).toString();      } }   The test class :   public class AbcTest{     Abc abc = new Abc();      @Test     public void testfl{        String testString="{Chandan}";        String resultString="Chandan";         abc.replacefl(testString);        assertEquals( resultString, testString);     }      }   Here the test case is not working because it is pass by value. Can you please help me out in how to write test case for this particular function which returns void.


Let $\{x_n\}_{n\in\mathbb{N}}$ be a sequence with $\lim\limits_{n\to\infty}x_n = a$, $\{t_n\}_{n\in\mathbb{N}}$ be a sequence with $\lim\limits_{n\to\infty}t_1+t_2+\ldots+t_n = +\infty$.  Prove that  $$\lim_{n\to\infty}\frac{t_1x_1+t_2x_2+\ldots+t_nx_n}{t_1+t_2+\ldots+t_n} = a$$  My idea is use that  $$(t_1+\ldots+t_n)\min\{x_n: n\in\mathbb{N}\}\leq t_1x_1+\ldots+t_nx_n \leq (t_1+\ldots+t_n)\max\{x_n: n\in\mathbb{N}\}$$  But I'm not sure if $\lim\limits_{n\to\infty}\min\{x_n: n\in\mathbb{N}\} = \lim\limits_{n\to\infty}\max\{x_n: n\in\mathbb{N}\} = \lim\limits_{n\to\infty}x_n$.


This theory has yet to be proven. This theory is yet to be proven. This is yet to be done. This has yet to be done. I have yet to spend summer in the mountains. I am yet to spend summer in the mountains.  Are they all correct? How are "have yet to do" and "be yet to do" different? Thank you!


Windows 10 (1809): How To Use the Dark Theme for UWX Apps but the Light Theme for win32 Programs?

The latest version of Windows 10 (1809) has added a new feature to Windows Explorer (and various win32 programs). Specifically, if one uses the Dark Theme for UWX apps, the Windows Explorer also turns dark.   Here's an example of how an UWX app looks after enabling the Dark Theme:     Here's an example of how the Windows Explorer looks after enabling the Dark Theme:     However, while I enjoy the dark theme for UWX apps, I prefer using the light theme for Windows Explorer (and other win32 programs).   Question: Is there an option or a "hack" that allows me to use the dark theme for UWX apps, but the light theme for Windows Explorer (and possibly other win32 programs)?


Use of the term 'disappeared' - meaning 'exterminate'

Is it correct to say “...a young man who had been ‘disappeared’.”  I need this to align with a statement used earlier in the text: “Many civilians simply ‘disappeared’ with no trace found afterwards.”  Many thanks in advance for all input.


Please help me, I can't using bindValue() in PDOStatement.          $statement = self::$dbConn->prepare("SELECT  * FROM :tableDB WHERE id = :id");         $statement->bindValue(":id", $id, PDO::PARAM_INT);         $statement->bindValue(":tableDB", $tableDB, PDO::PARAM_STR);         $statement->execute();         $statement->setFetchMode(PDO::FETCH_ASSOC);         $result = $statement->fetchAll();   When i run this script.          $statement = self::$dbConn->prepare("SELECT  * FROM :tableDB WHERE id = :id");         $statement->bindValue(":id", $id, PDO::PARAM_INT); // Return true         $statement->bindValue(":tableDB", $tableDB, PDO::PARAM_STR); // Return true   But when run to:   $statement->execute(); // Return false.


How to Store/Retrieve Chinese characters in Oracle 11G database using PHP?

i want to store chinese characters from an html page into oracle database using ajax concept.  Front end : HTML & PHP. Back end  : Oracle 11G.   Oracle Characteristics:  NLS_LANGUAGE = AMERICAN NLS_CHARACTERSET = AL32UTF8 NLS_NCHAR_CHARACTERSET = AL16UTF16   The above characteristics cannot be changed.   when i try to store chinese character using form submit it's storing successfully, if i try to store through ajax i am getting weird characters in the database.  in the ajax page i have added this line:  header("Content-type: text/html; charset=utf-8");   and in the html page added the below line:  <meta http-equiv="Content-type" value="text/html; charset=utf-8">   i have gone through many stack overflow suggestions but no luck.  please advice me on how to solve this.  Thanks in advance.  Code:HTML Code.  <html> <head> <meta http-equiv="Content-type" value="text/html; charset=utf-8"> <title>Test</title> <script src="jquery.min.js"></script> <script> function addForm() { var english=document.getElementById('txt_english').value; var id=document.getElementById('txt_id').value; var chinese=document.getElementById('txt_chinese').value; $.ajax( {     type : "POST",     async: false,     url :"ajax/ajax_add_form.php",     data :     {     english:english,     chinese:chinese,     id:id     } }).done( function(html) {         alert(html);  }); } </script> </head> <body> <input type='text' name='txt_id' id='txt_id' value='' /><br> <input type='text' name='txt_english' id='txt_english' value='' />                           <input type='text' name='txt_chinese' id='txt_chinese' value='' />  <button type="button" onclick="addForm()">Click Me!</button>  </body> </html>   PHP Code: ajax/ajax_add_form.php  <?php header("Content-type: text/html; charset=utf-8"); include("../config.php"); extract($_REQUEST); $sql=oci_parse($conn,"insert into test(id,english,chinese)values('".$id."','".$english."','".$chinese."')"); oci_execute($sql); echo "success"; ?>


Law of Total Probability/Independence question

Hey first I want to start of by saying that this is homework. I'm just looking for guidance. These problems involve using a deck of cards.  I want to find the conditional property that the second card will be an ace given that the first is a heart. I did this by by trying to find P(B/A)   A: heart was the first card B: drawing the ace as the second card P(B/A) = P(A n B) / P(A)          I know that the probability of getting a heart as the first          card and the ace on the second is 1/52 from a previous problem        = (1/52)/(13/52)        = (1/13) P(B/A) = (1/13)   Now the second portion of the question asks to find the probability that the second card draws an ace using the law of total probability. I think this is how you implement it  A: Second card is an ace B: First card is not an ace C: First card is an ace P(A) = P(A|C)P(C) + P(A|B)P(B) P(A|C)P(C) = (((4 choose 1)(3 choose 1))/(52 choose 2)) * (4/52) P(A|B)P(B) = (((48 choose 1)(4 choose 1))/(52 choose 2)) * (48/52) P(A) = 386/2783   However the last part of the question asks if they are independent or not, and I know that they are only independent if   A: First card is a heart B: Second card is an ace P(B|A) = P(B)   And after the above calculations they are not independent. However after some further thought I feel like this might be wrong. I think that whether the first card is a heart should be independent of whether you choose an ace as your second draw. If someone could deny or confirm this, it would be great.


Best Practice for adding jQuery reference in Master Page

I have a site collection on the root directory http://pc51:1001 and a site collection under  the sites  directory http://pc51:1001/sites/First .  I am trying to add jQuery file reference in Master Page so it will work on both site collections  What is the best practice method for adding a jQuery reference in the Master Page?  My jQuery file resides in /Style Library/ABC/Js/jquery-1.10.2.min.js


Leading "For" in site descriptions reads badly in non-English languages

So far the description for all sites is in the same format     For [some people]   However the leading word "For" is always in English, so it reads, um... a bit strange when followed by words in other languages     For programadores profissionais e entusiastas   For programadores y profesionales de la informática   For программистов   For лингвистов, этимологов, и энтузиастов русского языка   For プログラマーとプログラミングに熱心の人     Reading that feels like reading a frase γραπτός на misturado sprachen.      Reading that feels like reading a sentence written in mixed languages.  (Word order: Spanish, Greek, Russian, Portuguese, German)   Can we simply remove the leading "For" and re-write the site description for non-English sites (maybe there's no need to rewrite them)?


So, i was helping out someone with her laptop (it has Windows 7 Ultimate, not sure 32 or 64 bit) and she has a browser hijack. I cleaned most of it, however, Windows internet shortcuts don't open the right page, but the page from the hijack. The question is: how do I solve this? The browser she is using is Google Chrome.  Edit: I meant when under New-Shortcut and make it lead to a website, it opens the bad page.


How to evenly space vertices along several segments bezier curve

Is there a way I can separate the vertices on the the segments evenly without moving the end points? I would like for the vertices to maintain the current curve.


For example, the Belt of Giant Strength is an item with caster level 8.  Can you craft a magic item without meeting its caster level requirement? Is it treated like all other requirements, increasing the DC by 5 if not met? Does the creator have to meet this one particular requirement?


Prove that ${F_{n+1}} = \sum_{k=0}^{n}\binom{n-k}{k}$ where ${F_{n}}$ is n-th Fibonacci number

Question:  Prove that ${F_{n+1}}$ = $\sum_{k=0}^{n} \binom{n-k}{k}$ where ${F_{n}}$ is n-th Fibonacci number.  My idea:  I guess I could use induction so ${F_{n}}\to{F_{n+1}}$ where we see that for $n=0$ and $n=1$ it is true so that would be our base. Then - ${F_{n+1}}= \sum_{k=0}^{n+1} \binom{n-k+1}{k}$ but I have no idea what to do with it, does anyone have any idea? Maybe use some binomial or Fibonacci properties?


I am analyzing data from different dichotomous variables. When analyzing association between these variables, what is the most recommended method?


Let E be a non empty 􏰁finite set, and let ∗ be an associative law on E. Show that there exists an element s ∈ E such that s ∗ s = s.

right now my tactics are to use some kind of proof by induction/contradiction, but have not really got anywhere. Any suggestion is appreciated


I am a new developer in java, and i am making a small app i am getting error about null object reference Here Is My Logcat File: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.torque, PID: 24687 java.lang.IllegalStateException: Could not execute method for android:onClick at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:414) at android.view.View.performClick(View.java:5610) at android.view.View$PerformClick.run(View.java:22265) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6077) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:409) at android.view.View.performClick(View.java:5610)  at android.view.View$PerformClick.run(View.java:22265)  at android.os.Handler.handleCallback(Handler.java:751)  at android.os.Handler.dispatchMessage(Handler.java:95)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:6077)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.drawerlayout.widget.DrawerLayout.openDrawer(int)' on a null object reference at com.example.torque.NavDrawermenu.openDrawers(NavDrawermenu.java:48) at com.example.torque.ProfileActivity.ClickMenu(ProfileActivity.java:19) its showing errors in my two files Profileactivity and nav drawer activity Here is Navdrawer.java Code I Think the error is in the openDrawer function: public void ClickMenu(View view) {     openDrawer(drawerLayout); }  public static void openDrawer( DrawerLayout drawerLayout) { drawerLayout.openDrawer(GravityCompat.START); }


When clicking a Button to switch from the main Activity to my "ColoursGame" Activity the app crashes.  I'm still a beginner so not an expert at debugging.  The main activity code  Button colorsGame = (Button) findViewById(R.id.colours);             colorsGame.setOnClickListener(new View.OnClickListener() {                 @Override                 public void onClick(View v) {                     startActivity(new Intent(MainActivity.this, ColoursGame.class));                 }             });   Manifest new activity  <activity android:name=".ColoursGame"         android:label="ColourGame"         android:theme="@style/AppTheme.NoActionBar"></activity>   ColoursGame Activity OnCreate code  public class ColoursGame extends Activity {  int livesCount = 3; String x;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_colours_game);      Button start = (Button) findViewById(R.id.startColors);     start.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             vSwitch.showNext();             x = String.valueOf(livesCount);             lives.setText(x);             text();             textColor();             backgroundColor();              start();         }     });  }   The Error  E/AndroidRuntime: FATAL EXCEPTION: main               Process: com.aynaar.numbersgameforkids, PID: 3278               java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.aynaar.numbersgameforkids/com.aynaar.numbersgameforkids.ColoursGame}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.Window.findViewById(int)' on a null object reference                   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2548)                   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)                   at android.app.ActivityThread.-wrap12(ActivityThread.java)                   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)                   at android.os.Handler.dispatchMessage(Handler.java:102)                   at android.os.Looper.loop(Looper.java:154)                   at android.app.ActivityThread.main(ActivityThread.java:6077)                   at java.lang.reflect.Method.invoke(Native Method)                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)                Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.Window.findViewById(int)' on a null object reference                   at android.app.Activity.findViewById(Activity.java:2323)                   at com.aynaar.numbersgameforkids.ColoursGame.<init>(ColoursGame.java:42)                   at java.lang.Class.newInstance(Native Method)                   at android.app.Instrumentation.newActivity(Instrumentation.java:1078)                   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2538)                   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)                    at android.app.ActivityThread.-wrap12(ActivityThread.java)                    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)                    at android.os.Handler.dispatchMessage(Handler.java:102)                    at android.os.Looper.loop(Looper.java:154)                    at android.app.ActivityThread.main(ActivityThread.java:6077)                    at java.lang.reflect.Method.invoke(Native Method)                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)


this is a very short question, probably I'm missing  something really simple: according to Drude model, we have for the drift velocity of electrons, being also the average velocity: $$ v_d = \frac {-e E \tau } m  ,$$ where $ \tau$ is average free path time. Now, how can this be the average electron velocity? This velocity comes from the whole momentum increase during the free path, shouldn't we consider the average electron being only at half of the path, dividing the velocity by 2?


Lets say there is an open interval (a,b) where a,b are real numbers. Is it true that (a,b) has cardinality equal to real numbers?


Is there a PPA with the latest version of LibreOffice?

There was recently another release of , but it is  a pain to have to manually go to their website and download the packages every time there is a new release. Is there a PPA that always has the latest version of LibreOffice?


Let F be a non-empty ordered field. Can F be a finite field and if so does there exist a simple example of such an F?


If you're calling a method on an array, should that method be static?

so I'm fairly new to Java and I've looked up a lot of information on static methods and static fields, and nothing seems to really answer my question so I'm going to ask it here. I'm creating a program that uses an arrayList of Card objects and performs methods on those card objects. For example:  Card chooseNewCard() {     currentCardIndex = num;     return myCards.get(currentCardIndex); }   With the myCards being the name of the array.List I'm not sure if 2 part questions are allowed but my question(s) is should a method like this be static, and if so what does that say about where the objects of the class should be created? To clarify the last part, when you're dealing with static objects, should the objects be created near the instance variables, or in the main method or within another method?  Thank you in advance, again I'm very new to Java so I could be thinking about this the entire wrong way.


When I try to reference figures, eg "see Figure~\ref{lattice1}", the output it "Figure ??". Did I label it wrong?

\documentclass{article}  \begin{document}  \begin{figure} %  \begin{subfigure}[b]{0.30\textwidth} \centering  \begin{tikzpicture}[   decoration={     markings,     mark=between positions 0 and 1 step 25pt with { \draw [fill] (0,0) circle [radius=2pt];}   } ] \path[postaction={decorate}] (0,4) to (4,4); \path[postaction={decorate}] (0,3) to (4,3); \path[postaction={decorate}] (0,2) to (4,2); \path[postaction={decorate}] (0,1) to (4,1); \path[postaction={decorate}] (0,0) to (4,0); \draw [<->] (2.3,2) -- (1.75,2) -- (1.75,2.65); \draw [dashed] (0, 1.5) -- (4,1.5); \draw [dashed] (0, 2.5) -- (4,2.5); \end{tikzpicture}  \label{lattice1} \caption{A lattice of sources. Equation~(\ref{G01}) is the field generated by the central row.} \end{subfigure} % \begin{subfigure}[b]{0.30\textwidth} \centering \begin{tikzpicture}[   decoration={     markings,     mark=between positions 0 and 1 step 25pt with { \draw [fill] (0,0) circle [radius=2pt];}   } ] \path[postaction={decorate}] (0,4) to (4,4); \path[postaction={decorate}] (0,3) to (4,3); \path[postaction={decorate}] (0,2) to (4,2); \path[postaction={decorate}] (0,1) to (4,1); \path[postaction={decorate}] (0,0) to (4,0); \draw [<->] (2.3,2) -- (1.75,2) -- (1.75,2.65); \draw [dashed] (1.25,0) -- (1.25,4); \draw [dashed] (2.25,0) -- (2.25,4); \end{tikzpicture} \label{lattice2} \caption{A lattice of sources. Equation~(\ref{F0}) is the field generated by the central column.} \end{subfigure} % \begin{subfigure}[b]{0.30\textwidth} \centering \begin{tikzpicture}[   decoration={     markings,     mark=between positions 0 and 1 step 25pt with { \draw [fill] (0,0) circle [radius=2pt];}   } ] \path[postaction={decorate}] (0,4) to (4,4); \path[postaction={decorate}] (0,3) to (4,3); \path[postaction={decorate}] (0,2) to (4,2); \path[postaction={decorate}] (0,1) to (4,1); \path[postaction={decorate}] (0,0) to (4,0); \draw [<->] (2.3,2) -- (1.75,2) -- (1.75,2.65); \draw [dashed] (1.25,0) -- (1.25,4); \draw [dashed] (2.25,0) -- (2.25,4); \draw [dashed] (0, 1.5) -- (4,1.5); \draw [dashed] (0, 2.5) -- (4,2.5); \end{tikzpicture}  \label{lattice3} \caption{A lattice of sources. Equation~(\ref{G0}) is the field generated close to the central source.} \end{subfigure} % \label{lattice}  \end{figure}  \end{document}


How do I change extensions of different file types

I have many files with different extensions in one directory (for example .aa, .1ab, .412 . etc). How can I change extensions of all this files to .txt There is now other files in folder, only those I want to change extensions.  Thank You.


Word for “all the groups an item belongs to”?

To expand on the title slightly: all of the groups to which an item belongs directly or indirectly? That seems to make "parent groups," my first choice, ill-fitting.   The key concept here is membership, but that term generally refers to the items in the group, not the groups themselves.  A bit more explanation:  An item's relationship to a group may be direct or indirect because groups are hierarchical. The term would describe all of the relevant groups in the hierarchy.  An example:  Fuji is an apple. Apples are fruit. Fuji belongs to apples and fruit.  The phrase I need to construct is along the lines of: Fuji and "the groups to which it belongs."  Edit  As Barrie pointed out, my example involves categorical relationship, but that won't necessarily be the type of membership I'm referring to. The membership is arbitrary and changeable.  Edit 2  My example caused more confusion than good. The best metaphor for what I'd like to express is: a child has parents and grandparents, who are collectively his ancestors. I want to say: a user has groups and (super?) groups, which are collectively _?_.


How do I make this twisted surface on a bottle?

I am trying to replicate the attached image, but I am stuck on the twisted pattern on the surface of the bottle. I have tried a displacement modifier with a texture with no luck. Maybe I am just doing it wrong. Or is it best to make this a part of the geometry? Keep in mind that I want to fill the bottle with some water later, so the geometry should preferably not make this impossible to get right.  What would be a good way to go about this?


How to set up if statements inside a loop

I'm very new to this, this being only my second project for my class.  When I run this, no matter what my input is, x is always > 0. I ran the debugger and found that it increments x at both city 1 and 2, so I figured I do not have my if statements set up correctly. We were instructed to prompt the user for 3 cities, and if any are a match, we tell them. Thanks in advance!  import java.util.Scanner; public class PR2  {  public static void main(String[] args)  {     int x = 0;     Scanner input = new Scanner(System.in);     String[] City = new String[3];     City[0] = "Orlando";     City[1] = "New York";       for (int i = 0; i < 3; i++)     {         System.out.println("Please enter a city you have visited.");         City[i] = input.nextLine();     }      for (int i = 0; i < 3; i++)     {            if (City[i] == City[0])         {             x++;         }         else if (City[i] == City[1])         {             x++;         }     }     if (x > 0)     {         System.out.println("At least one city you have entered is a match.");     }     if (x == 0)     {         System.out.println("Sorry, none of the cities you have entered are a match.");     }   }   }


I was wondering if you could tell me some online videos or other resources to learn theory of linear models. I am a visual learner. I learn more from video lectures. My focus is to learn:  Matrices, generalized inverses, projection matrices, multivariate distributions, conditional distributions, quadratic forms and their distributions, MLE and least square estimators, estimability and Gauss-Markov theorem, confidence intervals, general linear models, ANOVA and F-tests.  Thank you so much for your time.


Why does computer data get destroyed when it gets downloaded?

Whenever an enemy ship downloads something from the board computer or whenever a hologram gets transferred, the data gets removed from the board computer. It's almost as if the data was a physical object. Why doesn't the original data get preserved like with current computers? It seems so illogical to do it that way.  Some examples:   Voyager 6x24 - The doctor gets transferred to the alpha quadrant in order to treat Louis Zimmerman. The Voyager doesn't have the EMH for that time period   Voyager 7x05 - The Doctor's mobile emitter gets stolen and replaced with a replicated copy. The original Doctor isn't in the board computer anymore   Voyager 7x06 - Barclays hologram gets intercepted on the way to the Delta quadrant and you can hear on multiple occasions in the episode that the hologram is gone.


Correct way to validate config entities?

In Drupal 8, how do I validate a ConfigEntity? I tried adding constraints, but then I found out this only works for ContentEntity, not ConfigEntity.  My ConfigEntity has 2 fields, and the options of the second field should be limited based on what's selected in the first.   Through Drupals #ajax mechanism I can limit the items in the second dropdown - that all works. However, with Javascript disabled or when creating the ConfigEntity programmatically, someone can still select a wrong value for the second dropdown, that doesn't work with the first dropdown selection. I checked ConfigEntityBase but couldn't find anything related to validation.


We are creating a pamphlet which shows Available Functions:     Engineering   Manufacturing   Operations   Finance   Human Resources       Should they all be capitalized, and if so, should "Resources" after Human also be? They will be bulleted.


What happens behind the scenes when python adds small ints?

I was fiddling around with id recently and realized that (c?)Python does something quite sensible: it ensures that small ints always have the same id.   >>> a, b, c, d, e = 1, 2, 3, 4, 5 >>> f, g, h, i, j = 1, 2, 3, 4, 5 >>> [id(x) == id(y) for x, y in zip([a, b, c, d, e], [f, g, h, i, j])] [True, True, True, True, True]   But then it occurred to me to wonder whether the same is true for the results of mathematical operations. Turns out it is:  >>> nines = [(x + y, 9) for x, y in enumerate(reversed(range(10)))] >>> [id(x) == id(y) for x, y in nines] [True, True, True, True, True, True, True, True, True, True]   Seems like it starts failing at n=257...  >>> a, b = 200 + 56, 256 >>> id(a) == id(b) True >>> a, b = 200 + 57, 257 >>> id(a) == id(b) False   But sometimes it still works even with larger numbers:  >>> [id(2 * x + y) == id(300 + x) for x, y in enumerate(reversed(range(301)))][:10] [True, True, True, True, True, True, True, True, True, True]   What's going on here? How does python do this?


How do I stop sed from adding extra newline characters

I am running the following 2 sed commands. The first one adds newline characters where I want them, the second also adds newline characters where I want them, BUT also adds an extra one at the end of the file where there wasn't one before.  sed -e 's|\<LIST_G_STATEMENT>|&\ |g' ${XMLDIR}/statement_tmp_1.xml > ${XMLDIR}/statement_tmp_2.xml  sed -e 's|\</LIST_G_STATEMENT>|&\ |g' ${XMLDIR}/statement_tmp_2.xml > ${XMLDIR}/statement_tmp_3.xml   Using od -c on all 3 of the files gives the following output.  statement_tmp_1.xml (no \n at end of file)  1314700    T   A   T   E   M   E   N   T   >   <   /   L   I   S   T   _ 1314720    G   _   S   T   A   T   E   M   E   N   T   >   <   /   G   _ 1314740    S   E   T   U   P   >   <   /   L   I   S   T   _   G   _   S 1314760    E   T   U   P   >   <   /   A   R   X   S   G   P   O   > 1314777   statement_tmp_2.xml (no \n at end of file)  1314700    S   T   A   T   E   M   E   N   T   >   <   /   L   I   S   T 1314720    _   G   _   S   T   A   T   E   M   E   N   T   >   <   /   G 1314740    _   S   E   T   U   P   >   <   /   L   I   S   T   _   G   _ 1314760    S   E   T   U   P   >   <   /   A   R   X   S   G   P   O   > 1315000   statement_tmp_3.xml (\n at end of file - where did it come from?)  1314700    S   T   A   T   E   M   E   N   T   >   <   /   L   I   S   T 1314720    _   G   _   S   T   A   T   E   M   E   N   T   >  \n   <   / 1314740    G   _   S   E   T   U   P   >   <   /   L   I   S   T   _   G 1314760    _   S   E   T   U   P   >   <   /   A   R   X   S   G   P   O 1315000    >  \n 1315002   I am running AIX 5.3  Basically, I either want it to stop adding the extra \n, or find a way of removing it.


float ff = (float)31.15;  double dd = 31.15;  var frst = Math.Round(ff, 1, MidpointRounding.AwayFromZero);  var drst = Math.Round(dd, 1, MidpointRounding.AwayFromZero);   frst: 31.1  drst: 31.2  Can someone explain why?


Prove: $A,B\in\mathscr P(\Bbb R)\setminus\emptyset ,a \lt b\ \forall a \in A,\forall b \in B\implies \sup A \lt \inf B$

This is a true or false question that I need to prove. I deduced that if $a \leq u$ being $ u = \sup A $ and $ v \leq b $  being $v = \inf B $ so $ a \leq u \leq v \leq b$. But I do not know if it is the right demostration or it needs more explanation.


Is the comma here necessary, obligatory, or should it not be included?

Jack smiles, takes out his phone, and hands it to her. In this particular sentence, is the second comma necessary, obligatory, or should it not be included?


I noticed this plant growing on the Azores islands. It has a surprisingly perfect distribution of branches, which gives it the appearance of a fake decorative plant. Does anybody know what type of tree this is?   I apologise for the image, I could not find any better ones.  Edit: here is another image I found:


My rear wheel axle has broken this is second time

Hi! my bike is Trek Marlin 4. I don't know why my axle broke so easy and this happened second time.  its almost winter in my nation we don't have good bicycle shops. They will be close so soon. I can't order a new one what should I do and I want to know why this happened ? Please help me  Is it possible to weld?  I bought my bike about 4 months ago.


Can you raise $\pi$ to a real power to make it rational?

We're all familair with this beautiful proof whether or not an irrational number to an irrational power can be rational. It goes something like this:  Take $(\sqrt{2})^{\sqrt{2}}$  If it's rational, then you proved it, if it's irrational, take $((\sqrt{2})^{\sqrt{2}} ){^\sqrt{2}} = 2$ and you've proved it.  I'm wondering if you can raise $\pi$ or $e$ to a certain non-trivial real power to make it rational? And if not, where is the proof that it can't be done?   p.s. - I almost left out the real part, but then I realized that $e^{i\pi} = -1$.


What is this time format? "2019-03-31T08:29:00"

I am trying to determine what time format is this string "2019-03-31T08:29:00" so I can convert it to datetime object but I can't find the answer to this.  Can somebody help please?