Add a new field collection item to an existing field collection

I have 1 field collection  Field collection: CKT Info child2   machine name: field_ckt_info_child2  In that have 2 fields:  Field1: English CKT child2   machine name: field_eng  Field2: Maths CKT Child2   Machine name: field_maths_ckt_child2  I have set field setting "unlimited" to this field collection. Now I just want to add new field collection item in existing Field collection(CKT Info child2) programmatically. I have tried below code but it's not creating new field collection item.   function createFC()  {    $field_collection_item = entity_create('field_collection_item', array('field_name' => 'field_maths_ckt_child2'));    $field_collection_item->setHostEntity($node);    $field_collection_item->set('field_maths_ckt_child2', "SET SUCCESS");    $field_collection->save(); }


How to trim a list with duplicated elements in Python?

I wish to trim the list  [0,0,0,0,0,0,1,1,1,1,2,2,2,2,2,2,2,3,3,3,3, ... , 145,145,145]  into  [0,1,2,3,4,...,145]   I know the "C-Programming-style" way of doing it in Python.  I am here to ask for an intelligent and smart way of doing this.


GRUB booting only Ubuntu but not Windows 8

I have Windows 8 installed in C drive (by default from Lenovo) & Ubuntu separately installed in another partition.  When I start my computer it leads straight to the GRUB menu. There I can see options to load Ubuntu and Windows 8.   When I select Ubuntu it works fine, but when I select Windows 8 option, then it leads straight back to the GRUB menu.  Hence I am unable to boot into Windows 8 via the GRUB menu (the only way I can boot into Windows 8 is by using the one touch recovery button).


Why are so many important verbs irregular?

In many languages, including English, the most important verbs are irregular. Examples include:   to be  to do  to get  to go  to have  to make   The same applies (roughly) to many other languages I know about (Dutch, German, French, Spanish, Swedish) and presumably to many other languages too.  Is there any reason why these everyday verbs tend to be irregular?


cp: cannot stat: No such file or directory exists

Orienting myself with basic terminal commands (Ubuntu 16.04); I have a file listed in my Downloads folder; a Jupyter notebook file called, 'Indexing and Slicing.ipynb' and wish to copy the file to my user directory, 'uswang'. After navigating to the Downloads folder, I tried the command;   cp Indexing and Slicing.ipynb /home/uswang (To be 100% certain I even copy/paste the full file name) but receive the error,  cp: cannot stat 'Indexing': No such file or directory cp: cannot stat 'and':No such file or directory cp: cannot stat 'Slicing': No such file or directory   I get the same error when trying the mv command.  Why would this be the case? Tried researching other cp cannot stat entries, but none seem to relate directly to my predicament - Thanks


What is the origin of the term "throw the book"?

I'm curious if "the book" in question is the bible?  Does anyone know where this term first entered the lexicon?


Converting decimal degrees units to km in R?

I am trying to figure out how I can transform my unit of length from decimal degree to km when I import the following simple ArcGIS polygon shape.  Ultimately, I would like to have this information available when I assign this spatial polygon to my window in spatstat [i.e., Window area = xx square unit & Unit of length: xx km].   I did came across this post:   This is what I've done so far, but I don't understand why/if I need to do so. Doesn't my div0A SpatialPolygonsDataFrame already has my CRS argument defined? Why do I need to spTransform then?  library(spatstat) library(maptools) library(lattice) library(sp) library(foreign) require("rgdal") div0A <- readOGR(dsn="Archive", layer="Projections") > summary(div0A) Object of class SpatialPolygonsDataFrame Coordinates:      min       max x -80.00 -57.63430 y  66.25  78.16666 Is projected: FALSE proj4string : [+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0] Data attributes:        Id      NPAzimutha         UTM20            UTM19           AlberEA        Min.   :0   Min.   :348877   Min.   :349232   Min.   :349162   Min.   :348656    1st Qu.:0   1st Qu.:348877   1st Qu.:349232   1st Qu.:349162   1st Qu.:348656    Median :0   Median :348877   Median :349232   Median :349162   Median :348656    Mean   :0   Mean   :348877   Mean   :349232   Mean   :349162   Mean   :348656    3rd Qu.:0   3rd Qu.:348877   3rd Qu.:349232   3rd Qu.:349162   3rd Qu.:348656    Max.   :0   Max.   :348877   Max.   :349232   Max.   :349162   Max.   :348656   proj4string(div0A) <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs") xxlcc <- spTransform(div0A, CRS("+init=epsg:4326")) res1 <- lapply(slot(xxlcc, "polygons"), function(x)   sapply(slot(x, "Polygons"), slot, "area"))  > summary(unlist(res1))    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.   89.72   89.72   89.72   89.72   89.72   89.72  newW<-as(xxlcc, "owin") > summary(newW) Window: polygonal boundary single connected closed polygon with 29 vertices enclosing rectangle: [-80, -57.6343]x[66.25, 78.16666]units Window area =  89.7204 square units   Does this look correct? How can I specify/know my unit of length in km? Moreover, this window is ~Baffin Bay, west of Greenland and I am wondering if I should be using a different datum? E.g. EPSG Projection 4747 - GR96? Although, I will have to create ppp object, for which the coordinates have been taken with GPS satellite navigation system.  I would appreciate if someone can walk me through this or suggest an online example or further readings. I read chapter 4: Spatial Data Import and Export in Applied Spatial Data Analysis with R (2008), but I'm obviously very new to all of this.


Below query is used in one of my product. I am not able to understand why 1=1 is mentioned. it is always going to true. select * from emp; select * from emp where 1=1;  As per my understanding both are same. What could be the intention of developer to put 1=1 in below query? he can simply write where condition in one of the and condition. SELECT   msi.concatenated_segments item_code, mmt.transaction_date, mtt.transaction_type_name, mmt.transaction_quantity, mcd.prior_cost, mcd.new_cost    FROM  mtl_cst_actual_cost_details mcd, mtl_system_items_kfv msi, mtl_material_transactions mmt, mtl_COST_types mtt WHERE 1 = 1  -------------------------------------------------This I am refering AND mcd.inventory_item_id = msi.inventory_item_id AND mcd.organization_id = msi.organization_id AND mcd.transaction_id = mmt.transaction_id AND mmt.inventory_item_id = msi.inventory_item_id AND mmt.organization_id = msi.organization_id AND mmt.transaction_type_id = mtt.transaction_type_id ORDER BY mcd.creation_date DESC;


So I’ve noticed when my hand or anything gets close to the little dot on the screen above the speaker my iPhone screen turns off. It’s not the camera on the back or the front. It’s the little dot above the speaker on the screen.  Is there anyway I can stop that from happening?


Need help computing: $\displaystyle\lim _{n\to\infty}\sum _{k=1}^{n}\frac{\sqrt{k}}{{n}^{\frac{3}{2}}}$  Now my intuition is that using Stolz-Cesaro  $\displaystyle\lim _{n\to\infty}\sum _{k=1}^n\frac{\sqrt{k}}{n^{\frac{3}{2}}}=\lim _{ n\to\infty}\frac{1}{n}\sum _{k=1}^n\sqrt{\frac{k}{n}}=1$  Is it correct or not?


$a \in G$ commutes with all its conjugates iff $a$ belongs to an abelian normal subgroup of $G$

Let $a\in G$, where $G$ is a group. Prove that $a$ commutes with each of its conjugates in $G$ if and only if $a$ belongs to an abelian normal subgroup of $G$.   This is what I did:  $"⟹"$   First, I thought  of $<a>$ to be that normal subgroup containing a. But if it is true, I am not sure how to prove it. Then I thought of another subgroup, namely $C_G(a)$.   I conclude from the hypothesis given that $Cl_G(a) ⊂ C_G(a)$  And I know that  $|Cl_G(a)| = |G :  C_G(a)|$ by G acting transitively on $Cl(a)$ by conjugation. But I don't know how to get that $ C_G(a)$ is normal in $G$.  I am thinking also of  a normal subgroup of $G$ , say $K$ containing $a$, so  $<a>$ $\cap$ $K$ and  $ C_G(a)$ $\cap$ $K$ are subgroups of G inheriting abelianity from   $<a>$  and $ C_G(a)$ respectively, and normality from $K$.  $"\Leftarrow"$   Let $a ∈ H$ s.t. $H$ is an abelian normal subgroup of G. So $ah=ha$, ∀ $h∈H$.  Since $H$ is normal in $G$, hence $g^{-1}hg ∈ H$, ∀ $g∈G$   So $g^{-1}ag ∈ H$, ∀ $g∈G$   Which means     $Cl_G(a)$ $\subseteq$ $ H$  Therefore, a commutes with each of its conjugates in G.  Could someone correct me?


How do I test local inner class methods in java?

In many application I often have algorithms which make use of dedicated sub-algorithms (or simply well defined pieces of code).   Till now, when I wrote the main algorithm, i created a private method for each sub-algorithm like in the example below (OldStyle):  public class OldStyle {      public int mainAlg() {         int x = subAlg01();         int y = subAlg02();         int z = x * y;         return z;     }      private int subAlg01() {         return 3;     }      private int subAlg02() {         return 5;     } }   This worked fine but I didn't like having a proliferation of methods (subAlg01 and subAlg02) which, even if private, were only used by one method (mainAlg).  Recently I dicovered the use of local inner classes and now my example is (NewStyle):  public class NewStyle {      public int mainAlg() {         class Nested {              public int subAlg01() {                 return 3;             }              public int subAlg02() {                 return 5;             }         }         Nested n = new Nested();         int x = n.subAlg01();         int y = n.subAlg02();         int z = x * y;         return z;     } }   I like it very much but now I have the following problem: how do I test subAlg01 and subAlg02 using JUnit?  By the way: I'm using eclipse.  Thanks for you help.  Edit: I try to explain better: I have, let's say, a sorting algorithm and I want to test it to be sure it runs as expected. This sorting algorithms is used by only method m of class X. I could make it a private method of class X but class X usually has nothing to do with sorting, so why "spoil" class X with the sorting method? So I put it inside method m. Some time later I want to improve my sorting algorithm (I make it faster) but I want to be sure that it's behavior is as expected, so I want to re-test it with the original tests.  That's what I want to do, maybe there is no solution, I hope someone may help me.  Edit after answer choice. I selected Rodney answer because his solution is the one I adopted:  a standalone helper class helps me (it's a helper!) to have a clear view of what are the sub methods and it also gives me the ability to test them.


When I start my pc the screen stays black. There are no beeps.  I have tested the screen with my laptop so the screen and cable both work. I have also tried taking out the GPU and plugging the cable directly into the motherboard but that didn't change anything. Clearing the CMOS also didn't work.  I'm not sure if it's related but the HDD activity light keeps blinking the whole time when the pc is on.  It just started happening today, I haven't changed anything so at the moment I have no idea what could be causing the issue.


how to look the value of thedata by lookup index?

I have list of data array which I want to look the values by its index (id) and store to the index id from the data array. I can do it in spreadsheet VALUE LOOKUP function, but I still have lots of data to do this and I don't think spreadsheet function will be fast for huge data sets. I want you help me to let me know the script that can do it faster. My data array, index id and proposed out put is as follows.  data array   Id  Value   1    10 2    20 3    30 4    40 6    60 8    80 10   100   index   Id   1 2 3 4 5 6 7 8 9 10 11 12 13   Output will be   ID    Value 1  10 2  20 3  30 4  40 5  NULL 6  60 7  NULL 8  80 9  NULL  10 100 11  NULL 12  NULL 13  NULL   Thank you for helping again.


Why does performance of a regular hard drive decrease over the duration of a benchmark while SSD doesn't?

I use HD Tune to measure performance of the hard drive.  The tests typically take 2-3 minutes and the transfer rate of a regular hard drive decreases dramatically as the test comes to a close.    However, the SSD drive performance stays the same over (pic below) the life of the test.  This happens on all my computers.  Why is that?


Derivation of closed form lasso solution: KKT optimality conditions

As defined in this thread  I would like to see a derivation of the closed form soft-thresholding solution for the LASSO using the KKT optimality conditions. Does anybody know how to do it?


How would you prove the following limit?  $$\lim_{(x,y) \to (0,0)} \frac{x^3y}{x^4+y^2} = 0$$  I think the best way is using the squeeze theorem but I can't find left expression.  $$0 \le \frac{x^3y}{x^4 + y^2} \le \frac{x^3y}{x^4} \le \frac{x^3y}{x^3} \le y = 0.$$  But I'm not sure I'm right (especially at $\frac{x^3y}{x^4} \le \frac{x^3y}{x^3}).$  If I'm right - I'd glad if you can accept it.  If I'm wrong - can you please correct me?  Thanks in advance!


How to further capitalize the First letter of a word already in block?

What I am wishing for is something like the capitalization of word in block in section headings.    How may I have it in normal text mode?  e.g.     I want to further capitalize the B in BLOCK.


Command run in terminal, not with shortcuts

As explain in this , I want to add shortcuts to switch workspaces (in Mate).  I found a way to switch workspace for the terminal: wmctrl -s $(wmctrl -d | grep "*" | awk '{print $1+1}').  But this command line does not work when I add it in the shortcut manager. Does any one know why ?


What exactly is happening when we use the same word twice in a row?

Example:     A: Hey, I just bought a mouse.   B: A mouse mouse? Or a computer mouse?   What is this exactly? And are there any rules?


How to set a specific window size and placement for all windows that open to default

I want my windows to be a specific size (not full screen) and to be in the middle of the screen by default. When I close the application and re-open it, it will be the dimensions I want it to be by default. Is there an easy way to do that? I'm using Ubuntu 11.10 and the Unity desktop enviroment.


Memory and CPU optimizers: Are they gimmicks?

Are tools which analyse which enable you to use  and also tools which help you to regain memory (can't think of any just yet but seen plenty) a gimmick? Do these tools really work?


What is a good estimate of total play time for Zelda Skyward Sword?

I want to complete Skyward Sword before Christmas, I'm trying to get a good grasp on how much time I need to finish it off. At the very least, I want to beat the game, but I tend to get most of the items as well (I never quite can get everything, but...) This is the first time that I've played my way through it.   So, what would be a fair estimate of how much total time I need to complete the game?


What is the difference between "Made in..." and "Product of..."? Both are often seen on product labeling; my understanding is that "Made in" is not used for agricultural goods while "Product of" is?


Explain why we use this formula to calculate total resistance

Why do we use this formula to find the total resistance? Lets say we have three resistors in a parallel circuit  $$R_t = \frac{1}{\frac{1}{R_1} + \frac{1}{R_2} + \frac{1}{R_3}}$$  Where does it come from?


How much Voltage and Energy ends up in this Capacitor?

In the circuit below the switch is open and the capacitor starts with an initial energy of 0J and an initial potential of 0V in it.  The switch is closed and both the battery and the inductor's magnetic field charges the capacitor up. Everything then settles down and comes to a full rest.    The Question is: Once the process is complete after the closing of the switch and everything is settled down and has come to rest, How much energy in the form of joules should the capacitor have in it as well as how much voltage should the capacitor be charged up to?  This is a real world circuit with losses in the battery source, the connecting wires, the switch, the capacitor, the diode and the inductor. So not a perfect circuit by any means.  There is no inductance value, and in fact several different types of coil sizes and resistances were tried with the same result, so that's the reason for leaving off the inductance value. The inductance value is not 0 nor is the resistance value 0.  The answer doesn't have to be exact and just a general answer is expected. If the inductance somehow changes the answer to different answers then just include an inductance of some value, just as long as it's not 0H.         – Schematic created using


I was wondering: is it possible to assign two bevels instead of one to the geometry of a curve, and maybe "warp" through them using weights?  Basically I have a loop curve that has a circular bevel (above curve, left), but at certain points it should gradually become an oval shape (above curve, right, selected) (or whatever shape i decide to bevel it with).  Thanks for the wisdom, peace


What are the chances of finding power armor in the wasteland?

I've reached maximum vault dweller capacity for a while now and in my journey to the top, never have I once found power armor while exploring the wasteland. I have come across many +7 outfits, but never power armor. Am I just super unlucky, and then what are the chances/probability of coming across one?


what qualities should I be looking for in a long range lens

I am trying to get a long range lens for taking pictures of animals.  I have read many questions and realize I need at least a 300 mm and I know they all depend on price...I'm not to go crazy with price but I would like a very good for wildlife even if it cost more. My question is what brand and I saw some quotes say fast what does that mean? I have a nikon d3000


FFMPEG Multicast to multiple addresses at the same time

I have the following ffmpeg command which creates a multicast audio transmission to a IP address and port: ffmpeg -re -i Sample.mp3 -filter_complex "aresample=8000,asetnsamples=n=160,volume=0dB" -acodec pcm_mulaw -ac 1 -vn -f rtp rtp://229.1.2.3:500  However, I need to be able to run the multicast broadcast on a few different IP addresses. One way is to run multiple ffmpeg instances for each IP. But this seems a bit of a resource intensive way. Is there a way I can on the same single command have multiple multicast IP addresses and ports?


Sometimes, sites in beta can be shut down due to stuff like lack of activity. Has this ever happened to a Stack Exchange Network site that had already left beta? If so, what caused that?


Why is not there a feature to follow questions?

On Quora, there is a feature to follow questions asked, either privately or publicly, so whenever one or more new answers are added, followers get notified. As far as I know, there is no feature like that on Stack Exchange. That is annoying me. Sometimes, there are very interesting questions to which equally interesting answers may be written anytime. Sometimes, any question may get one or more great answers even after a long period of time of being asked. I want to follow questions that interest me, so that if one or more new answers are added, I get notified, even it is years afters the question was first asked. Other people have suggested marking questions as favorite and checking them every once in a while, but I find it a bad idea, and that it will be time-consuming to do so. The placeholder in Title is "What's your bug, feature request, or meta-discussion topic? Be specific." So, this is my feature request. I hope that it will not fall on deaf ears.


Which of the following are correct and which are wrong?   The 2000-year-old computer The 2000 year-old computer The 2000 year old computer The 2000-years-old computer The 2000 years-old computer The 2000 years old computer   In a documentary, BBC4 used the title The 2000 year-old computer, which I believe to be wrong. Am I right?


Why apt install snapd before installing 3rd party software?

After installing Ubuntu 20.04 I removed snapd and want to use good old apt, but when I type:  sudo apt install chromium-browser   I get this:  The following additional packages will be installed: snapd The following NEW packages will be installed: chromium-browser snapd   Which installed:   snapd  and then use snapd to install chromium.    I understand that Chromium team go with snap-only approach (, which is bad, but it's their choice), but I added chromium ppa which won't work for Ubuntu 20.04.   Can I disable snap-only installation for apt?  I faced several issuses with snap, eg. the current version of Chromium from snap can't open xdg-open links, while apt version on Ubuntu 18.04 can.


Converting a external product to accept power from a voltage divider

I'm currently working on converting  voice recording module to accept power from a 9V power supply. I have successfully soldered the battery connections so the chip can be powered from two wires. When I connect the two wires directly to a 3.3~ishV power supply unit, the chip performs record and playback flawlessly. But when I attempt to wire it to a voltage divider, to wire down the voltage from 9v to the operating 3.3~ishV, the voltage going to the chip only appears to get around 2V (as opposed to the 3.45 that I would suspect). I tried increasing the input voltage from 9V to 12V and the chip still wants to hold at 2V.  Any ideas as to why this is happening? I suspect it has something to do with current, but I left my smarty pants at home today.


Why this simple reference to figures does not work as expected?

I'm trying to reference two figures, but somehow the tagging mechanisms is not working properly. I have done this thousand of times, and it's driving me crazy. I have come to the following minimal example:  \documentclass[a4paper,12pt]{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \begin{document}  \section{Section name}  Reference to Fig. \ref{fig:1}.  Reference to Fig. \ref{fig:2}.   \begin{figure}   \label{fig:1}   \centering   \rule{10cm}{5cm}   \caption{xx} \end{figure}  \begin{figure}   \label{fig:2}   \centering   \rule{10cm}{5cm}   \caption{xx} \end{figure}   \end{document}   And the output I get looks like:    What am I doing wrong here???


"Not only my husband but also my son is a doctor"

Starting to review grammar. It's a little confusing for me to identify which is the correct one.     Not only my husband but also my son is a doctor.    Someone said that it must be doctors because there are two subjects in the sentence. But someone else believes it must be a doctor because it follows is.


I have windows 8 before installing ubuntu 13.04 on my lenovo z580 laptop. While installing ubuntu i have chosen to erase the disk without knowing. I cant find any files of my hard disk. Plese help me. Thank u very much if it is helpful.


How to react when the poster of a neighbouring answer updates his version with your own answer

Here is another case which came as a bit of surprise to me:    There was initially  posted there, which I considered conceptually wrong, so I posted my .  Soon the author of the original answer edited his version by appending mine, only with very cosmetic changes.  When I asked him in the comments about the reason for that, he had got somewhat sensitive, I think.  How should I react if thing like this happen again? Should I react at all?


How can I get steam to recognize existing game files (Far Cry 3)?

I've downloaded Far Cry 3 through the steam account on my laptop, then copied the files to the Steam account on my desktop PC. I've put the game folder into the common files folder, just as I always do when I copy a game from another computer. This has always worked before. But this time, steam is acting as if the files weren't there, and is trying to download all 10 GB of it, again.   I'm reasonably sure I've put the Far Cry file into the correct directory (steamapps\common). When I tell steam to open local files, it opens the correct Far Cry folder, which has all 10 GB of the required data in it, and when I tell steam to check the files for errors, it tells me everything's fine. And yet it keeps downloading the game and right now is telling me it's got 300 MB downloaded and ten hours to go. What can I do to make it recognize the existing files?


I'm trying to get text from server and then check it a to know what actions to take with the text adopted. The problem is that when I try to check if the received text for example is "Exited" the query always return the value "false" when the received text is really "Exited".  Here is the code :  class Get_Message_From_Server implements Runnable    {     public void run()      {           InputStream iStream = null;       try        {         iStream = Duplex_Socket_Acceptor.getInputStream();        }       catch (IOException e)        {         // TODO Auto-generated catch block         e.printStackTrace();        }       //Create byte array of size image       byte[] Reading_Buffer = null;        try        {           Reading_Buffer = new byte [Duplex_Socket_Acceptor.getReceiveBufferSize()];       //New_Buffer = new byte [100];        }       catch (IOException e1)        {         // TODO Auto-generated catch block         e1.printStackTrace();        }        byte[] Byte_Char_1 = new byte[1];        int Byte_String_Lenght = 0;        //read size       try        {         iStream.read(Reading_Buffer);          String Reading_Buffer_Stream_Lenghtor = new String(Reading_Buffer);          //System.out.println("full : " + Reading_Buffer_Stream_Lenghtor);          Byte_String_Lenght = Reading_Buffer_Stream_Lenghtor.indexOf(new String(Byte_Char_1));        }       catch (IOException e)        {         // TODO Auto-generated catch block         e.printStackTrace();        }       //Convert to String       Meassage = new String(Reading_Buffer);        Meassage = Meassage.substring(0, Byte_String_Lenght);//The text that received        Message_Getted = 1;     }   }   The query :  if(Message_1 != "Exited")//the message query   {    System.out.println("Continued 253");    continue;   }   Its always return the value - false   its important to know that the message is in Utf - 8 encoding   so how i can to fix the issue ?


Having problems with declaring classes with static members

So basically I am trying to create a class and a (static) function to access it, but for some reason the code refuses to compile and throws 2 "unresolved external symbol" errors.  // game.cpp #include "game.h"  CGame::CGame() {     // ... }  CGame* CGame::getInstance() {     if (s_instance == nullptr)         s_instance = new CGame();      return s_instance; }  void CGame::run() {     // ... }   ...  // main.cpp #include "game.h"  int main() {     CGame::getInstance()->run(); }   ...  #ifndef _GAME_ #define _GAME_  class CGame { private:     static CGame* s_instance;  public:     static CGame* getInstance();      void run(); // For testing purposes     CGame(); };  #endif _GAME_   What is the problem here, how can I possibly create a class I [can] use without declaring it?


I am currently taking MIT6.006 and I came across this problem on the problem set. Despite the fact I have learned Discrete Mathematics before, I have never seen such notation before, and I would like to know what it means and how it works, Thank you: $$ f_3(n) = \binom n2$$


C#, Object reference for nonstatic field

I have COM server application which controls another application CANoe. I want to show a progress bar on Form2 of COM application. The value of progress bar should be updated in the EventHandler. The eventHandler calls a method of form2 which will update the value of progress bar. The EventHandler is in main form.   private void mCANoeProgProgressChangedInternal(string sysvarName, object Value) // in main Form {     if (mCANoeMeasurement != null && mCANoeMeasurement.Running)     {         ProgressBarForm.Prog_progress(Value);     } }   And in Form 2 -   public void Prog_progress(object value) {     progressBarProg.Value = (int)value; }   it is showing an error      "An object reference required for the non-static field, method or   property 'Form2.Prog_progress(object)'"   at - ProgressBarForm.Prog_progress(Value); in main form.    Please provide your comments.


Can't install Ubuntu on Bay Trail, it keep freezing on first minute

Currently, I'm using Windows 7 as my Operating System. But I want migrate from Windows to Ubuntu totally. So, I want to fresh Install an Ubuntu OS.  My laptop (ASUS X453MA), has a Bay Trail proccesor. I'm using a flashdisk to install the Ubuntu.  When I reboot my laptop, the Ubuntu 19.10 on my flashdisk is working perfectly. It show Ubuntu loading screen, and of course I can try Ubuntu for some seconds.  Yes from some seconds, and the problem is, when I try Ubuntu for a minute, it keep freezing randomly. Even when I tried to install, it keep freezing at select keyboard or partition steps.  As  say, it causes Bay Trail affected by c-state bug. And the solution is set intel_idle.max_cstate=1 in GRUB.  What I'm asking is, Is possible my Laptop using Ubuntu? How to set the intel_idle.max_cstate=1 while I'm trying to install Ubuntu?  I'm totally new to Ubuntu / Linux.


A critically wounded soldier who recovers gets a permanent Will penalty due to the psychological trauma. Does this stack for each time the soldier has to recover? If so, what's the limit on how low a soldier's Will can go? Does the penalty eventually stop stacking? Do low-Will soldiers always die instead of getting critically wounded? Or can I eventually deploy negative-Will panicky messes?


NullPointerException when setting data in constructor Java

I'm trying to get property values as an Array in order to use them to display some data in a PDF file. When I try something like this all properties values are equal null.  Product p = new Product("989-ST", "Magazine Vogue"); System.out.println(p.getData().length); for(String e : p.getData()){ System.out.print(e + " "); } //--Output:: 2 //--null     null   My Prdocut class is like:  Public class Product { private String sku; private String descripcion;   public Product() {  }  public Product(String sku, String descripcion) {     sku = this.sku;     descripcion = this.descripcion;  }  public String getDescripcion() {     return descripcion; } public void setDescripcion(String descripcion) {     this.descripcion = descripcion; } public String getSku() {     return sku; } public void setSku(String sku) {     this.sku = sku; }  public String[] getData() {     String[] data = { this.descripcion, this.sku };     return data; } }   Am I missing something? Because when I set the property values using setters I can get the expected values:  Product p = new Product(); p.setSku("989-ST"); p.setDescription("Magazine Vogue"); System.out.println(p.getData().length); for(String e : p.getData()){ System.out.print(e + " "); } //--Output:: 2 //--989-ST     Magazine Vogue


I have been trying to figure out what these 3 fonts are named for quite a while now and I have been having no success. I did get some help from one of my friends that said the first one was ccr and the last one was cmss. But when I tried searching for them online and trying to use them myself I couldn't do that either. I am a beginner at LaTeX.  \usepackage{concmath} \usepackage[T1]{fontenc}   On a guide online it told me to use these, but that made the default text a different font, how would I change the font of a specific block of text?


Java: Sorting a Map by the value, when value is an arraylist

I'm trying to sort a map by value. The data structure is as follows:  Map<String, ArrayList<Object>>   The ArrayList contains a set of properties for a set of objects whose name corresponds to the string key value in the map.   The idea is that I want to sort these objects by property. So, let's say that transparency was a property of these objects, and transparency is stored in ArrayList.get(3) for all objects.   How would I be able to sort it in a way such that:  I'm able to output:  Transparency     Object Name    Value            Name 1    Value            Name 2    Value            Name 3     Value            Name 4   I've tried a few different sorts, and nothing seems to be working.  Any ideas?   Edit: More information.  The objects inside the arrayList are all either Double type or String type, and I am defining the comparison between the two values through their default comparison. Essentially, I've organized the data like this:  The name of the object whose properties are contained in a list is the key for the map. The value given by the key is the list of properties for that object. I want to compare property(i), where i is user input, of Object A with property(i) of Object B, and then output them using System.out.print() or printf()


How can I pad a string with spaces on the left when using printf?  For example, I want to print "Hello" with 40 spaces preceding it.  Also, the string I want to print consists of multiple lines.  Do I need to print each line separately?  EDIT: Just to be clear, I want exactly 40 spaces printed before every line.


Null pointer exception when iterating over existing array - writing constructor wrong

Main idea of class is implement Integer subarray. For example, I would like to put numbers between 10 and 20 in array. If number is in array, there will be true inits place in array. Number 10 has index 0 in array, etc.  I get problem with my second constructor:  public FixedRangeIntegerSet(int lowerBound, int upperBound, Iterable<Integer> elements) {     int sizeCopy = upperBound - lowerBound + 1;     for (Integer element : elements) {         if (element >= lowerBound && element <= upperBound)             add(element);     } }   Here is rest of my code:  public class FixedRangeIntegerSet implements Iterable<Integer> {      private boolean[] elementFlags;     private int size;     private int lowerBound;     private int upperBound;      public FixedRangeIntegerSet(int lowerBound, int upperBound) {         this.lowerBound = lowerBound;         this.upperBound = upperBound;         int size = upperBound - lowerBound + 1;         elementFlags = new boolean[size];         this.size = size;     }      public FixedRangeIntegerSet(int lowerBound, int upperBound, Iterable<Integer> elements) {         int sizeCopy = upperBound - lowerBound + 1;         for (Integer element : elements) {             if (element >= lowerBound && element <= upperBound)                 add(element);         }     }      public FixedRangeIntegerSet(int lowerBound, int upperBound, Integer... elements) {         for (int i = 0; i < elements.length; i++) {             add(elements[i]);         }     }      public boolean add(Integer element) {         if (elementFlags[element - lowerBound] == true) {             return false;         }         elementFlags[element - lowerBound] = true;         return true;     }      public boolean containsElement(Integer element) {         if (element < lowerBound || element > upperBound) {             return false;         }         if (elementFlags[element - lowerBound] == true) {             return true;         } else             return false;     }      public int getSize() {         int size = 0;         for (Boolean i : elementFlags) {             if (i == true) {                 size++;             }         }         return size;     }      public int getLowerBound() {         return lowerBound;     }      public int getUpperBound() {         return upperBound;     }      public boolean remove(Integer element) {         if (elementFlags[element - lowerBound] == false) {             return false;         } else {             elementFlags[element - lowerBound] = false;             return true;         }     }      @Override     public Iterator<Integer> iterator() {         return new RangeIter();     }      private class RangeIter implements Iterator<Integer> {          private int currentIndex;          public RangeIter() {             this.currentIndex = 0;         }          @Override         public boolean hasNext() {             for (int i = currentIndex; i < elementFlags.length; i++) {                 if (elementFlags[i] == true)                     return true;             }             return false;         }          @Override         public Integer next() {              if (!hasNext()) {                 throw new NoSuchElementException("No elements");             }             while (currentIndex < size - 1 && !elementFlags[currentIndex]) {                 currentIndex++;             }             return currentIndex++ + lowerBound;         }     } }   This is pseudocode for main (test) method:   FixedRangeIntegerSet s1 = new FixedRangeIntegerSet(10, 20);             s1.add(14);             s1.add(16);             s1.add(18);             System.out.println("Elements:");     foreach loop; FixedRangeIntegerSet s2 = new FixedRangeIntegerSet(10, 20, s1);         s2.remove(16); // here is where I get error   After all, my question is: Why I get null pointer exception, or where I am wrong in writing second constructor in my code? Thanks!


Evaluate the infinite continued fraction $$\xi = [1,2,3,4,5\cdots] = 1+\dfrac{1}{2+\dfrac{1}{3+\dfrac{1}{4+\vdots}}}$$   There is no periodic behavior of this continued fraction, I am not even sure that $\displaystyle\lim_{n \to \infty} [1,2,3,\cdots,n]$ exists or not. Any hints on how to solve this problem?


"What are the most important qualities of a Software Tester?"

I have worked as a software tester in small corporation for about three years now. I still have a long way to go, but I've understood that it takes something special to be a great tester in today's Agile environments. Be it bug finding or understanding the application structure, it requires creativity to go ahead smoothly. I feel it's the ability to generate multiple, unique and out of the box test ideas to test an application successfully.  What are the more important traits required to excel and provide business value to the stakeholders in today's fast changing software industry?


Let $a>0$, show that for $x>0$, $1<f(x)<2$, where $$f(x)=\frac{1}{\sqrt{1+x}}+\frac{1}{\sqrt{1+a}}+\sqrt{\frac{ax}{ax+8}}$$  I could take the derivative, find the maximum of the function and conclude. But that involves heady algebra and you have to solve a high degree polynomial. Is there an easier way simply using inequalities? Thanks, much appreciated


New group member here, and potential Ubuntu user :) I have an older notebook that can only run WinXP. Is there a version of Ubuntu I can DL to a bootable flash drive to meet these sys reqs? Can't get the OS to boot, and haven't tried in 5 or so years, so I don't have any sys details to give, but I will unearth it this next week and research the model #. I do remember it was a Dell hehe Thanks In Advance- :-)  -Scotty


Unexpected list.append() behavior when using 'sub-lists' in Python

I've got a problem with a project I'm working on. I've managed to discover that the problem is actually with how I thought list appending works in Python. I've recreated the problem I'm having in my project as this much smaller snippet:  Let's say you have the following code:  # A list of two lists (one for even one for odd)  oddOrEven = [[]] * 2  for i in range(5):     if i % 2 == 0:         oddOrEven[0].append("even")     else:         oddOrEven[1].append("odd")  print(oddOrEven)   Now what I would expect to happen:    When i is even, the 'even' list within the oddOrEven list has the word 'even' appended to it When i is odd, the 'odd' list within the oddOrEven list has the word 'odd' appended to it   So I expect the output to look like this:  [['even', 'even', 'even'], ['odd', 'odd']]   However, what is actually output is this:  [['even', 'odd', 'even', 'odd', 'even'], ['even', 'odd', 'even', 'odd', 'even']]   I just can't get my head around how this works. When something is appended to one sub-list, it's also appended to the other? The loop only runs 5 times, and yet 10 append operations are occurring.  Can someone explain why this happens, but also how I can achieve what I expected the result to be using the same list structure?


If   two points $P$ and $Q$ on the hyperbola $\frac{x^2}{a^2}-\frac{y^2}{b^2}=1$ whose center is $C$ be such that $CP$ is perpendicular to $CQ$ and $a<b$,then prove that $\frac{1}{CP^2}+\frac{1}{CQ^2}=\frac{1}{a^2}-\frac{1}{b^2}$.    I let $P(a\sec\alpha,b\tan\alpha)$ and $Q(a\sec\beta,b\tan\beta)$,Center $C$ is $(0,0)$. $CP^2=a^2\sec^2\alpha+b^2\tan^2\alpha$ and $CQ^2=a^2\sec^2\beta+b^2\tan^2\beta$ We need to prove that $\frac{1}{a^2\sec^2\alpha+b^2\tan^2\alpha}+\frac{1}{a^2\sec^2\beta+b^2\tan^2\beta}=\frac{1}{a^2}-\frac{1}{b^2}..........(1)$ We are given that slope of $CQ\times$ slope of $CP=-1$ $\frac{b\tan\beta}{a\sec\beta}\times\frac{b\tan\alpha}{a\sec\alpha}=-1..........(2)$ I am not able to prove equation $(1)$ from the given equation $(2.)$


Aliased edge around light source in cycles

Often when a mesh light is visible in the camera, the edges are not anti-aliased.  No matter how many samples I do, the lamp border always looks jagged and pixelated.  Is this a rendering error? How can I get around this issue?    And zoomed in 4x:


Kernel panic and unable to boot Ubuntu 16.04 after updating

I have tried to update my Ubuntu version and after updating, my boot screen  is displaying a kernel panic message and I'm unable to access my login screen.


Why isn't Bruce Willis's character in the Sixth Sense self-aware?

Why doesn't Bruce Willis's character realize he is dead?   If I remember correctly, the plot takes place several months after he is killed. Shouldn't there have been some clues during that time? They do imply that he thinks his wife isn't speaking to him because she's angry, but is it really possible that she was the only person he expected to interact with?   Additionally, it seems that all the other ghosts in the movie know they're dead. So perhaps another question would be do all ghosts in The Sixth Sense go through a "transition period" where they don't realize they're dead? At what point to they become aware of it?


How can I configure the terminal to display the current git branch?  I'd like to see the second line rather than the first:  andy@bob:~/my_projects/project_x$  (master)~/my_projects/project_x$   I don't want to have to run git status to see which branch I am currently on anymore!


I have a directory with log files and I'm putting logs from script launched by users into them. Logging with syslog doesn't seem possible in this case. (non-daemon rsync)  I want the users to have only write permissions on log files. The problem is, that write permissions must be further restricted, so that  users (script) can only append to that files. The underlying filesystem is XFS.  The following doesn't work:  # chattr +a test.log chattr: Inappropriate ioctl for device while reading flags on test.log   Is there any other solution for this? Thank you for your hints.


I tried to define x' as x' = x/2, but the character ' is not possible as it seems, What character can I use?

Please tell me how denote x_prime as in x'


I was interested in the following sentence which appeared in a   in The Washington Post, Politics, (WHO RUNS GOV).     She, along with Mark Childress, were set to be Daschle's deputies at   the White House before he stepped down.   Can someone clarify if the fragment "She, along with Mark Childress, were set to" is ungrammatical, as I think it is?  I would reword were with was because I think that the subject of the sentence - obviously, in grammatical terms - is "She", not "She" and "Mark Childress", but I'm not sure on this correction.  More precisely, I'm not so sure that "She, along with Mark Childress" is equivalent to She and Mark Childress with regard to the effects on the grammatical numbers.


How to open compressed file in less mode

How do I open a compressed file in less mode. I am able to grep using zgrep and using zcatI can open, but the file is big I want to open in less mode.


image style (imagecache) images are not being created

Currently i am unable to create images that get resized automaticaly according to the different image styles.  This includes the default styles such as thumbnail as well as the custom created styles.  I have checked the "Public file system path" as well as the "Temporary directory" (under Configuration > File system).  Both of the directories exist.  The file permissions are good on the directories (777).  The original file that's uploaded gets created. It's just the scaled images that aren't getting created.  Any help with this problem would be very welcome. If there is already a solution somewhere (which means i searched for the wrong terms), a link to that would be very appreciated.  edit:   I can't find anything in the logfile either, except for messages like :  type : page not found  message: sites/default/files/styles/thumbnail/public/fotoslider/slider_images/testbeeld20130103005.jpg


I need to know the equipment and the step by step process, cause i already try do it, but it didn't work  I already watch several videos, but its not the same to talk to someone that really loves , and know how to do it. I don't know anybody that knows how to brew anything


How can phone companies detect tethering (incl. Wifi hotspot)

Mobile network operators (also: telephone companies, telcos, providers) sometimes offer low cost data packages that are usable only on the phone. Or so, they say.  How can they distinguish between a user browsing the web with a browser on his Android phone and a user using a browser on a laptop tethered to an Android phone?  In early 2012 I was in Paris and I was using an Orange mobile data package with a Nokia E51 (Symbian S60). Indeed, I could only access the Internet using the phone's browser, not from my laptop tethered to the phone. Now, I a have an Android 2.3 phone, and I am thinking about subscribing to a similar data package in Spain (operator Más Móvil).


vim running in tmux permanently freezes when I accidentally type C-x s

I use emacs a lot, and type C-x s to save there. When I am in vim running inside tmux on a remote machine, if I accidentally type C-x s, the vim instance completely freezes up, and the only way out is to send tmux the kill-pane command.  How can I configure vim/tmux to block this from happening?


Can't create Windows 7 install bootable USB

I'm trying to create a bootable windows 7 installation USB drive through Ubuntu. I was recommended to use PowerISO to do this, however the software isn't recognizing any of my USB flashdrives. I've tried using Unetbootin, WinUSB, Startup disk creator, and Universal USB Installer, but have had several problems with those too. I don't have a disk drive or another computer with windows otherwise I wouldn't have this problem in the first place. Thanks in advance.


I've learned a little about . According to words on Internet, it says that the position and the velocity of an object cannot both be measured exactly at the same time. And there are some examples like:     Any attempt to measure precisely the velocity of a subatomic particle, such as an electron, will knock it about in an unpredictable way, so that a simultaneous measurement of its position has no validity.   This has been bothering me for a long time: If the uncertainty is cauesed by measuring instruments, then we can't say that particles (or everything) themselves are uncertain. So can I say the world is actually certain, and the reason why it looks uncertain is we can't predict exactly?


I was 0.5km off hatching a 10k egg so I left the game on whilst driving to sneak the odd 0.1 of a km when I pick my phone up once stopped the egg had disappeared and the incubator was empty and no new or extra Pokemon were to be seen ..... Why is this


Remove bloatware from a Samsung Galaxy S4

I just bought a Samsung Galaxy S4 and I'd like to get rid of a lot of applications I found installed but I'm not going to use.  What options do I have?  Surfing the web it seems that I cannot do it without rooting and the only option I have is to . Is that the only option?  Alternatively I saw that a lot of web site links to  but it seems to be discontinued. Is there any alternative script I should look for?  I see that there is the possibility to install other ROMs (). Would that help me getting rid of all the bloatware?  These were the options I found searching the web, would you recommend me to go down for any of these three paths or is there any better option? I'd like to know which are the pros and cons of each of them so that I can come up with the best decision for my needs.


How do I name images by barcode as I am photographing?

I need to create a system whereby I can scan a barcode and every picture taken after that code is scanned is sequentially named with that barcode and then when the next barcode is scanned, the images are named with that code etc...  As an example SCAN: CODE12345 PIC 1 CODE12345_001 PIC 2 CODE12345_002  SCAN: CODE56789 PIC 3 CODE56789_001 PIC 4 CODE56789_002  ... .. .  Any help would be totally appreciated.  Thanks


How to change the decimal separator in exsheets to comma

In the exsheets package the default decimal separator is dot. How can I change it to a comma?


If $f,g$ are continuous at $a$, show that $h(x)=\max\{f(x),g(x)\}$ and $k(x)=\min\{f(x),g(x)\}$ are also continuous at $a$. Here is my attempt at a proof. It feels very elaborate and I am not sure if it is correct. Can someone please point out any mistakes or places where I may improve. Thanks!  By the definition of continuity at $a$ of $f,g$ we have that $\lim\limits_{x\to a}f(x)=f(a)$ and $\lim\limits_{x\to a}g(x)=g(a)$. Suppose that $f(a)>g(a)$. Then there exists a $\delta>0$ such that $f>g$ for all $x$ satisfying $|x-a|<\delta$. Then for $x$ satisfying $|x-a|<\delta$ we have $h(x)=f(x)$ and $k(x)=g(x)$ and thus $h$ and $k$ are continuous at $a$ because $f$ and $g$ are continuous at $a$. Now if $f(a)<g(a)$ we simply relabel $f=\tilde{g}$ and $g=\tilde{f}$, so that $\tilde{f}(a)>\tilde{g}(a)$ and we apply the previous result to show that again $h$ and $k$ are continuous at $a$.\  Now if $f(a)=g(a)$ then we can distinguish three cases. $f\geq g$ in a small neighborhood about $a$, $f\leq g$  in a small neighborhood about $a$ or $f\geq g$ on one side of $a$ and $f\leq g$ on the other side. In the first case we assume that $f\geq g$ in some small neighborhood about $a$. Then, since $f(a)=g(a)$ we have $h(x) = f(x)$ in this neighborhood and $k(x) = g(x)$ and again we see that $h$ and $k$ are continuous at $a$ due to the continuity of $f$ and $g$ at $a$. Similarly if $f\leq g$ in a neighborhood around $a$ then $h(x)=g(x)$ and $k(x)=f(x)$ in this neighborhood and $h$ and $k$ are continuous at $a$.   Suppose that just to the left of $a$ we have $f\geq g$ and just to the right of $a$ we have $f\leq g$. Then $\lim\limits_{x\to a^-}h(x)=\lim\limits_{x\to a^-}f(x)=f(a)=h(a)=g(a)=\lim\limits_{x\to a^+}g(x)=\lim\limits_{x\to a^+}h(x)$. Similarly $\lim\limits_{x\to a^-}k(x)=\lim\limits_{x\to a^-}g(x)=g(a)=k(a)=f(a)=\lim\limits_{x\to a^+}f(x)=\lim\limits_{x\to a^+}k(x)$. So $\lim\limits_{x\to a}h(x)=h(a)$ and $\lim\limits_{x\to a}k(x)=k(a)$ which means that $h$ and $k$ are continuous at $a$. Lastly if $f\leq g$ just to the left of $a$ and $f\geq g$ just to the right of $a$ we can relabel $f=\tilde{g}$ and $g=\tilde{f}$ and apply the last result to show $h$ and $k$ are continuous at $a$.   Again, please point out any mistakes I may have made. Thanks!!


How to delete synced photos from iPhone without connecting to mac?

I have synced a folder which contains some pictures to my iPhone. The synced photos are successfully copied to my iPhone. But I can not see any "delete" option in my iPhone to remove the synced photos.  The "Camera Roll" which has the pictures that I took via the iPhone's camera have an option "delete" in the bottom of the picture. But synced photos does not have that delete button.  Should I use iTunes/Mac to delete synced photos? Can't I delete the synced photos with a single touch?


Where can I see the  file format of my SD card on Android?  I use a Samsung Galaxy s9 with Android 9.    Note a dupe because here we're talking about SD cards.


Making zsh default shell without root access

I am using my school's computers and would like to use zsh instead of bash. I'd like to make it the default shell, but I cannot run a command such as $ chsh -s $(which zsh) because I don't have admin privileges.   Is there a way I can put something in my .bashrc or something that automatically calls zsh when it opens as a workaround?   To clarify, zsh is already installed.


There're some videos doing this however its older versions and some nodes don't even exist anymore. Blur is gone and so subtract.   I have no idea how to blur my hdri.  Even tried photoshop but when i put it to blender theres a black line between the 0 and 360 angle


I want to draw a small rectangle within a tikz picture, then zoom it out somewhere. I skim through the PGF manual but I couldn't find a way to put the logic together. So far I've just drawn the automaton diagram, I had to hack the blue rectangle with "paint" though :(. Anyone could help me out with this? Thank you.    Minimal Working Example  \documentclass[10pt,letterpaper]{article} \usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}  \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsthm}  \usepackage[version=0.96]{pgf} \usepackage{tikz} \usetikzlibrary{arrows,shapes,automata,backgrounds,petri,positioning} \usetikzlibrary{decorations.pathmorphing} \usetikzlibrary{decorations.shapes} \usetikzlibrary{decorations.text} \usetikzlibrary{decorations.fractals} \usetikzlibrary{decorations.footprints} \usetikzlibrary{shadows}  \begin{document}     \begin{center}         \begin{tikzpicture}[shorten >=1pt, node distance=3cm, auto, on grid, initial text=,font=\small,>=stealth',             every state/.style={minimum size=7mm,draw=black!50,very thick,fill=red!50}]         \node[state,initial]        (S)                 {S};         \node[state]                (A) [right=of S]    {A};         \node[state]                (B) [below=of S]    {B};         \node[state,accepting]      (C) [right=of B]    {C};         \path[->]         (S) edge[bend right]    node{a} (A)         (S) edge[bend right]    node[xshift=-4mm]{$\lambda$} (B)         (A) edge[bend right]    node[yshift=5mm]{a,b} (S)         (A) edge[]              node{$\lambda$} (C)         (A) edge[]              node[yshift=7mm]{b} (B)         (B) edge[bend left]     node{b, $\lambda$} (C)         (B) edge[bend right]    node[xshift=4mm]{a} (S)         (C) edge[bend left]     node{a,b} (B)          ;          \end{tikzpicture}     \end{center} \end{document}


Scale and Z factor have no effect on hillshade analysis in QGIS

I used an SRTM DEM to create a hillshade in QGIS 2.2.0. However, the resultant hillshade seems to be vertically exaggerated. Also, changing the settings for scale and z-factor does not have any effect on the resultant hillshade. I have tried both options in QGIS, Analysis-> DEM (Terrain models) and Terrain analysis -> Hillshade. Both methods gave the same results.  Is this an isolated incident, a bug, or am I missing something?


My "network reputation" graph does not accurately reflect my accounts

Today I noticed that when I look at the reputation graph on my profile, I don't even belong to most of the sites it is showing. My highest reputation sites are not shown at all. This is me:  This is not me:


Drawing an open circuit using circuitikz

Is it possible to draw open circuits using circuitikz like these below?    Thank you.


Differences between Bhattacharyya distance and KL divergence

I'm looking for an intuitive explanation for the following questions:  In statistics and information theory, what's the difference between Bhattacharyya distance and KL divergence, as measures of the difference between two discrete probability distributions?  Do they have absolutely no relationships and measure the distance between two probability distribution in totally different way?


What do you call it when you come up with a phrase to fit an acronym?

You see this in marketing sometimes, where a product or company with an acronym name later comes up with a phrase that fits the acronym for an ad campaign or a related product.  For example, if your company name is QP, after the founder Quincy Peterson, your marketing department might make a "Quality Products" campaign. Or they might name the new adhesive product "Quick Plastic."  Is there a word or phrase that describes this?


Is Poly1305 enough for cascading ciphers?

ChaCha20 along with Poly1305 provides confidentiality and integrity. Now suppose I cascade AES on top of ChaCha20. Is it safe to assume that the Poly1305 MAC is still secure, even if I cascade multiple ciphers? In other words, is one MAC enough to secure both ChaCha20 and AES? Problem solved:


How do you remove a "duplicate" label from a question?

I found this question for Python programming:    It was marked as a duplicate of this question:    My issue is that I feel the second question does not have any answers to the one marked as a duplicate, even if they are very closely related.  Now that I've explained the situation, I want to know if there is a way to change the duplicate status of questions like this.


How do I participate in a question when I have a low reputation?

I have a question similar to an existing one. I would comment, but my reputation is too low. How do I participate to that question? Should I answer, edit or start a new question that may be marked as duplicate?


How can I disable only being able to extrude along the blue axis of a face?

Regarding the extrude tool in edit mode, when I want to extrude it does so only along the blue axis of the face by default. How do I disable this?    .


Dipping a Dyson Ring below the event horizon

The basic assumption about inescapability beyond the Event Horizon is that the necessary escape speed (orbital speed) would exceed speed of light, therefore no object can achieve it. Now, would it be possible to escape it by other means, say, by mechanical push against the gravity, through application of force without increase of speed?    First, short introduction: What is a ? (feel free to skip or skim this section if you know it):  Dyson Ring is a hypothetical, artificial, ring-shaped structure surrounding a massive body (e.g. a star), rotating - essentially orbiting it - rotating at speed slightly higher or lower than orbital speed necessary to maintain orbital equilibrium - state of freefall near its surface. This way, its rotation creates centripetal force simulating gravity for inhabitants. It would create a habitat much larger than any planet, given some "rim" it could hold atmosphere, and essentially is a neat sci-fi alternative for a planet - similar conditions, vastly more surface.  The one property of it is that tensile strength of its construction allows it to exist at distance from the central body (star) that is off from normal orbit matter moving at this speed would take.  Most theoretized Dyson Rings move slightly faster than needed, stretched out, with the inner side inhabited, and the Sun in zenith for all of their surface. It is possible though (if not recommended due to buckling risks) to make one that moves slower, the star's gravity not fully overcome by rotation, compressive force applied to the construction.    Now - technological problems aside - of building a Dyson Ring (not habitable and much smaller; a scientific device of ~30km radius.) and bringing it close enough to a Black Hole.  Let's imagine a Dyson Ring that can change its circumference (say, built of segments connected with expanding/contracting actuators) - and, as effect, radius within certain range - specifically between outside and inside of Schwarzschild radius of a selected Black Hole. It is also supplied with power sources that allow to vastly increase its rotary speed.  Now, with the actuators expanded the ring is placed around the black hole, outside the even horizon, rotating so fast that its segment orbit the black hole. Its angular velocity so high the linear velocity of its surface is near to speed of light. Normally the centrifugal force would tear it apart, but it remains in equilibrium with centripetal force of gravity of the black hole.  Now, actuators contract. The angular velocity rises a little, with accordance of law of conservation of momentum, but since we're at relativistic speeds, the increase of angular speed is minimal; it's mostly the ring gaining some mass.  Now, the ring is below the Event Horizon. Since at this altitude orbital speed would exceed the speed of light, any object there would quickly spiral into the black hole. Still, the ring does not, due to its own tensile strength preventing further decrease of its own radius. It moves slower than the orbital speed, but the mechanical strain overcomes the gravity. (note, while below the Event Horizon, we're still pretty far from the singularity, so the forces exerted are not yet extreme enough to cause collapse of matter, and the rapid rotation overcomes great most of the compressing gravitational force)  Expand the actuators, increase the radius of the ring - and it is forced back outside the Event Horizon, able to broadcast its findings.  Possible physically, or am I missing something?


I would like to get the old 'in' (\in) symbol in LaTeX. You know, the symbol which is (very similar or equal to) the upright varepsilon. So I think to use in fact the upright greek letter epsilon. For that I need such a character. It is provided for example in the package upgreek, but, if ti was possible, I would like to import only the upvarepsilon glyph intead of using all the package. Whast would be the code for that?  And, there is a better way to get the old in symbol?  I know , but I don't know how to use it to import the upright epsilon. I have also read the package documentationfrom CTAN, but upgreek has only 4 pages, so it doesn't explain too much about fonts and options. Finally, I have tried to copy the definition line of the \upvarepsilon in my preamble, but it doesn't work, logically.  Anyway, here is the symbol I wan:    Thanks  PD: There are many questions about importing dingle elements from other packages and their hasn't been marked as duplicate.


RAW to NTFS (Data already recovered so not important)

Recently something went wrong with my external WD passport. It is not accesible anymore in Win 7 and the type is now currently RAW. I recovered all the data so formatting it is no issue.  I tried formatting it with windows but it seems to be unable to do so. Does anyone have any suggestions how I am able to get this RAW drive back to NTFS or FAT or whatever.. as long as it works.  Thank you in advance


Can I play Minecraft pocket edition with someone else on a computer?

Can you play Minecraft pocket edition co-op with pc? My brother plays Minecraft on his computer and I was wondering if I could play with him while on my iPad.


How To Remount Raid 1 Array After OS Disk Failed

Have a workstation that has an SSD for the boot drive (Linux Mint) and (software) Raid 1 array  for data storage. The SSD died, and I've replaced it and reinstalled Mint.   How do I get the OS to recognize and mount the Raid 1 Array at boot? I'm comfortable at the CLI, just don't know how to get this done.


what's the meaning of this sentence? why is the butler on all fours

I was watching Growing pains TV shows, one scene is that Carol is watching a show called "the sturgeons of Pitt Street", and her mom was watching too and asked Carol "why is the butler on all fours? " then Carol answered the family dog died, and they didn't have the heart to tell their grandma.   I don't understand why Carol's mother ask "why is the butler on all fours? " and the meaning of it. Anyone could help? Thanks.   Ref: it is from Growing pains TV shows, first season，5th episode."super dad".


Can't find anything relevant about Entity Framework/MySQL on Google so I'm hoping someone knows about it.


Driving a LED in the most energy efficient possible way

I got into a bit of a challenge with myself, just for the sake of learning something about low power stuff.    I want to build a device that has basically two requirements:    blink an LED every 5-10 seconds with a microcontroller last the longest time possible on a lithium button cell (something like a CR2032 or smaller)    The input voltage to the system will be ranging from 3 to 1.8 volts, so probably i want to pick a red LED so that the power is above it's Vf until the end. My microcontroller will consume around 10uA when active and 1uA when sleeping. So the LED will probably be the most power hungry component.   Now it comes the question: what's the most energy efficient way to drive it, to get the shortest visible pulse? Putting a resistor in series with the led would mean wasting a lot of power, even half of the power that goes into the LED. A constant current driver would waste as much power as the resistor plus some power to stay on itself.   The only solution that came to my mind until now is to connect the LED directly to the microcontroller and adjust the pulse duration until I can see it blinking. But will this be the most efficient way?   I don't care about simplicity or bom cost, it's a 1-off thing. Even an overkill circuit if it's more energy efficient than the resistor is better for me


Why did Community approve a suggested edit while there is no proof of it?

From my understanding, the Community user will approve or reject a suggested edit if there was a concurrent edit, or someone in the review queue clicked Improve & Edit or Reject & Edit.  I found  just now, where the Community user apparently approved a suggested edit, while the suggested edit review log shows two users. There isn't an additional revision that could explain the concurrent editing.  The Community user approved, right?    ... or didn't it?    As you can see, .  What happened?


List permissions all parent directories of a single file

Say I have a file located at /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/bin/java.  I want to list all its parent directories in order to view their permissions in order to get something like below, so I can track down permission issues.  drwxr-xr-x  7 root     root  4096 Dec 16 17:50 java dr-xr-xr-x  2 root     root  4096 Dec 16 17:50 bin dr-xr-xr-x  3 root     root  4096 Dec 16 17:50 jre drwxr-xr-x 14 root     root  2920 Dec 16 17:50 java-1.6.0-openjdk-1.6.0.0.x86_64 ...   Is this possible?


Disabling Microsoft Word's Formatting Pop-Up

When one selects text in Microsoft Word, a small box pops up containing a font drop-down, bold/italic/underline buttons, and a small number of other formatting tools from the Home tab. The box only disappears when the cursor is moved away from it. How do I stop this box from appearing? I personally never use the box; it just gets in the way whenever I want to reread the text I've just selected.    An example of this dialog box impeding the text. Come to think of it, I would find it useful to get rid of the "paste/(Ctrl)" drop-down as well.


Are development tools redundant in Lightroom?

For example, I can change whites and blacks in the “Basic” box. But I can also do that in the “Tone Curve” box.  Thus I’m wondering if I should use both boxes(meaning they are complementary) or if using  only one of them is sufficient because they actually do the same thing at different level of precision.


Why is the quasi-Poisson in GLM not treated as a special case of negative binomial?

I'm trying to fit generalized linear models to some sets of count data that might or might not be overdispersed. The two canonical distributions that apply here are the Poisson and Negative Binomial (Negbin), with E.V. $\mu$ and variance   $Var_P = \mu $  $Var_{NB} = \mu + \frac{\mu^2}{\theta} $  which can be fitted in R using glm(..,family=poisson) and glm.nb(...), respectively. There is also the quasipoisson family, which in my understanding is an adjusted Poisson with the same E.V. and variance  $Var_{QP} = \phi\mu$,  i.e. falling somewhere in between Poisson and Negbin. The main problem with the quasipoisson family is that there is no corresponding likelihood for it, and hence a lot of extremely useful statistical tests and fit measures (AIC, LR etcetera) are unavailable.   If you compare the QP and Negbin variances, you might notice that you could equate them by putting $\phi = 1 + \frac{\mu}{\theta}$. Continuing on this logic, you could try to express the quasipoisson distribution as a special case of the Negbin:  $QP\,(\mu,\phi) = NB\,(\mu,\theta = \frac{\mu}{\phi-1})$,  i.e. a Negbin with $\theta$ linearly dependent on $\mu$. I tried to verify this idea by generating a random sequence of numbers according to the above formula and fitting it with glm:  #fix parameters  phi = 3 a = 1/50 b = 3 x = 1:100  #generating points according to an exp-linear curve #this way the default log-link recovers the same parameters for comparison  mu = exp(a*x+b)  y = rnbinom(n = length(mu), mu = mu, size = mu/(phi-1)) #random negbin generator  #fit a generalized linear model y = f(x)   glmQP = glm(y~x, family=quasipoisson) #quasipoisson glmNB = glm.nb(y~x) #negative binomial  > glmQP  Call:  glm(formula = y ~ x, family = quasipoisson)  Coefficients: (Intercept)            x       3.11257      0.01854   (Dispersion parameter for quasipoisson family taken to be 3.613573)  Degrees of Freedom: 99 Total (i.e. Null);  98 Residual Null Deviance:      2097  Residual Deviance: 356.8    AIC: NA  > glmNB  Call:  glm.nb(formula = y ~ x, init.theta = 23.36389741, link = log)  Coefficients: (Intercept)            x       3.10182      0.01873    Degrees of Freedom: 99 Total (i.e. Null);  98 Residual Null Deviance:      578.1  Residual Deviance: 107.8    AIC: 824.7   Both fits reproduce the parameters, and the quasipoisson gives a 'reasonable' estimate for $\phi$. We can now also define an AIC value for the quasipoisson:  df = 3 # three model parameters: a,b, and phi phi.fit = 3.613573 #fitted phi value copied from summary(glmQP) mu.fit = glmQP$fitted.values   #dnbinom = negbin density, log=T returns log probabilities AIC = 2*df - 2*sum(dnbinom(y, mu=mu.fit, size = mu.fit/(phi.fit - 1), log=T)) > AIC [1] 819.329   (I had to manually copy the fitted $\phi$ value from summary(glmQP), as I couldn't find it in the glmQP object)  Since $AIC_{QP} < AIC_{NB}$, this would indicate that the quasipoisson is, unsurprisingly, the better fit; so at least $AIC_{QP}$ does what it should do, and hence it might be a reasonable definition for the AIC (and by extension, likelihood) of a quasipoisson. The big questions I am left with are then   Does this idea make sense? Is my verification based on circular reasoning? The main question for anyone that 'invents' something that seems to be missing from a well established topic: if this idea makes sense, why isn't it already implemented in glm ?   Edit: figure added


grep : Count the number of elements in json response

I am using grep command to get the number of elements present in the json API response (retrieved by curl). Below is an example response:  [{"k1":"v1"},{"k2:"v2"}]   The above response contains 2 elements so I want the command to return 2. Below is what I have tried:  echo '[{"k1":"v1"},{"k2:"v2"}]' | grep -oP '\[{.+}\]' | wc -l echo '[{"k1":"v1"},{"k2:"v2"}]' | grep -oP '{.+}' | wc -l echo '[{"k1":"v1"},{"k2:"v2"}]' | grep -oP '\{.+\}' | wc -l   All these match the whole string and I just get 1 as an output for each of the above commands. What changes do I need to make in order for grep to return the correct count? It needs to be key/value agnostic.


I remember in previous generations that finding a Master Ball would typically come after a major Boss fight. You could have also gotten through some form of lottery (I think this was in Pearl).  If anything, where and when will I be able to find Master Balls in Pokemon X&Y?


How to get only the unique results without having to sort data?

$ cat data.txt  aaaaaa aaaaaa cccccc aaaaaa aaaaaa bbbbbb $ cat data.txt | uniq aaaaaa cccccc aaaaaa bbbbbb $ cat data.txt | sort | uniq aaaaaa bbbbbb cccccc $   The result that I need is to display all the lines from the original file removing all the duplicates (not just the consecutive ones), while maintaining the original order of statements in the file.  Here, in this example, the result that I actually was looking for was  aaaaaa cccccc bbbbbb   How can I perform this generalized uniq operation in general?


How can I convert a git hash to a byte array with length 20 in C#? At the moment I represent the git hash as a string:  string gitHash = "0x29932f3915935d773dc8d52c292cadd81c81071d";   I have tried this:  byte[] gitHashBytes = System.Text.Encoding.ASCII.GetBytes(gitHash); Array.Resize(ref gitHashBytes, 20);   But I actually want to convert the hex number to the byte array and not the string representation of it.  I need this to save the git hash in a smart contract where I am using bytes20 as data structure.  Why does the way I tried it above not work and just cut off the the hash after 20 digits? And what's the difference to the conversion in the proposed answer here:


How to frame any environment like minipage and others?

How to frame an environment like \minipage and others in a frame box.     Note: I tried \fbox and never worked, I always get errors   This is my code   \fbox{ \begin{minipage}{\linewidth} \small \begin{verbatim}  [2018-05-25 19:21:48 EDT] iverilog '-Wall' design.sv testbench.sv  && unbuffer vvp a.out   a=  2, b=  5, outsum=  7, true_sum=  7, cout=0 a=  2, b= 34, outsum= 36, true_sum= 36, cout=0 a=  2, b= 63, outsum= 65, true_sum= 65, cout=0 a=  2, b= 92, outsum= 94, true_sum= 94, cout=0 a=  2, b=121, outsum=123, true_sum=123, cout=0 a=  2, b=150, outsum=152, true_sum=152, cout=0 a=  9, b=  5, outsum= 14, true_sum= 14, cout=0 a=  9, b= 34, outsum= 43, true_sum= 43, cout=0 a=  9, b= 63, outsum= 72, true_sum= 72, cout=0 a=  9, b= 92, outsum=101, true_sum=101, cout=0     a=  9, b=121, outsum=130, true_sum=130, cout=0 a=  9, b=150, outsum=159, true_sum=159, cout=0 a= 16, b=  5, outsum= 21, true_sum= 21, cout=0 a= 16, b= 34, outsum= 50, true_sum= 50, cout=0 a= 16, b= 63, outsum= 79, true_sum= 79, cout=0 a= 16, b= 92, outsum=108, true_sum=108, cout=0 a= 16, b=121, outsum=137, true_sum=137, cout=0 a= 16, b=150, outsum=166, true_sum=166, cout=0 Done \end{verbatim}  \end{minipage}}   and this the errors I got     Paragraph ended before \@xverbatim was complete. \end{minipage}}      Extra }, or forgotten \endgroup. \end{minipage}}      Improper \prevdepth. \chapter      Missing \endgroup inserted. \chapter      Missing } inserted. \chapter


Could Dumbledore have cut off his hand to save his life?

"Why," said Snape, without preamble, "why did you put on that ring? It carries a curse, surely you realised that. Why even touch it? [...] That ring carried a curse of extraordinary power, to contain it is all we can hope for; I have trapped the curse in one hand for the time being —" -- Snape, HP and the Deathly Hallows  Since it is cursed, he might not have been able to regrow it, but at least he would not die, so why didn't they try it? This question is not if he could regrow a new hand. It is about whether he could have shed the curse by cutting off his hand.


Given that his x-ray vision allows him to see though skin, can he use this ability with his eyes closed? Or do they prevent it somehow?


How to submit images with form in jquery in which image tag is inside jquery code?

I am trying to submit form which have images field . problem is when i submit form with data image couldn't submit with form which is in jquery code  I tried to submit images by putting input images field in form .is working  <form action="/product" method ="post" enctype="multipart/form-data">
 Upload Pictures (Max 5)

 </form>      I want to submit this image data


My website was working till a few days ago. It suddenly stopped working and showing white screen on every page only when some users including administrator are logging in to it. I added the following line at the top of the index.php  error_reporting(E_ALL); ini_set('display_errors', TRUE); ini_set('display_startup_errors', TRUE);    The following error is displaying     Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /home/******/public_html/includes/database/database.inc:2204 Stack trace: #0 /home/******/public_html/includes/database/database.inc(2204): PDOStatement->execute(Array) #1 /home/******/public_html/includes/database/database.inc(683): DatabaseStatementBase->execute(Array, Array) #2 /home/******/public_html/includes/database/database.inc(2383): DatabaseConnection->query('SELECT expire, ...', Array, Array) #3 /home/******/public_html/includes/lock.inc(167): db_query('SELECT expire, ...', Array) #4 /home/******/public_html/includes/lock.inc(146): lock_may_be_available('theme_registry:...') #5 /home/******/public_html/includes/theme.inc(449): lock_acquire('theme_registry:...') #6 /home/******/public_html/includes/bootstrap.inc(455): ThemeRegistry->set(Array) #7 [internal function]: DrupalCacheArray->__destruct() #8 {main} thrown in /home/******/public_html/includes/database/database.inc on line 2204   I really have no idea what to do. thanks in advance


How to merge multiple csv with solving problem when file does not exist

from functools import reduce     for j in gpw_ticker:     try:         zadl = pd.read_csv(r'C:\Users\AdamPer\Desktop\Python\Valueinvesting\zadluzenie\zadluzenie_{}.csv'.format(j))         war_ryn = pd.read_csv(r'C:\Users\AdamPer\Desktop\Python\Valueinvesting\wart_rynkowa\wart_rynkowa_{}.csv'.format(j))         rento = pd.read_csv(r'C:\Users\AdamPer\Desktop\Python\Valueinvesting\rentownosc\rentownosc_{}.csv'.format(j))         plynn = pd.read_csv(r'C:\Users\AdamPer\Desktop\Python\Valueinvesting\plynnosc\plynnosc_{}.csv'.format(j))         dfs = [zadl, war_ryn, rento, plynn]         df = reduce(lambda left, right: pd.merge(left, right, on = 'rows', how = 'outer'), dfs)         df.to_csv(r'C:\Users\AdamPer\Desktop\Python\Valueinvesting\baza\{}.csv'.format(j), index = False)     except Exception as e:         print(j, str(e))   It works quite well but the problem occurs when file does not exist:    I want to skip non-existing files and merge the other. So for ALR I want to merge zadl, war_ryn and rento and skip plynn because it doesn't exist.  Should I first check if each file exists and then merge?


Iterate over comma separated values and optional argument

I would like to adapt this  for one optional argument but my MWE is just a M(not)WE. \documentclass{article} \usepackage{xparse}   \newcommand\test[2]{#1+#2\par}  \ExplSyntaxOn     \NewDocumentCommand\testcomas{O{x}m}{         \clist_map_inline:nn { #2 } { \test{#1}{##2} }     } \ExplSyntaxOff   \begin{document}  \testcomas{a, b ,c d, ,e }  \testcomas[T]{a, b ,c d, ,e }  \end{document}


Running command on server, but have the server read/write local files

Is it possible to have a remote machine run a command, but redirect all reads and writes to a local machine.  Example: I have a bunch of scripts in folder 'project'. When 'make simulate' is run in 'project' a heavy simulation is run according to some input files and when done, output files are saved in the same folder. All this happens on my laptop, which is limited by battery and isn't as high-end as my desktop. Is there a way to have the simulation run on the desktop (for example via ssh) without going through the hassle of first copying the folder to the desktop, run the simulation there and then copy it all back? All relevant programs must of course be installed on the desktop.


I'm working on a bash script tied to /etc/profile but instead of appending, I accidentally wrote over it, losing all its contents. How can I restore the file?


Recently I have installed Ubuntu 16.04 LTS on my HP 630 and when I try to turn on wifi, it does not work. I have read somewhere that it may be the wifi button  but it doesn't turn on and the fn works with the volume or scrn brightness. I use a Qualcomm Atheros ar9285 card and the driver is installed. The only problem is that I cannot connect to the wifi. On Windows 7 it worked, so the button itself is working.


Drawing vectors on 3-D coordinate system?

I'm new to tikz and LaTeX in general, so sorry if this is a silly question. I'm looking to replicate this:    So far, I have the following.  \begin{tikzpicture}[x=1cm, y=1cm, z=-0.6cm]     % Axes     \draw [->] (0,0,0) -- (4,0,0) node [at end, right] {$x$};     \draw [->] (0,0,0) -- (0,4,0) node [at end, left] {$y$};     \draw [->] (0,0,0) -- (0,0,4) node [at end, left] {$z$};      % Vectors     \draw [->, thick] (0,0,0) -- (0,2,1);     \draw [->, thick] (0,0,0) -- (2,2,0);      \draw [loosely dashed] (0,0,1) -- (0,2,1);     \draw [loosely dashed] (0,2,0) -- (0,2,1);     \draw [loosely dashed] (2,0,0) -- (2,2,0);     \draw [loosely dashed] (0,2,0) -- (2,2,0);      % Labels     \node [left] at (0,2,1) {$\begin{bmatrix}                                0\\2\\1                               \end{bmatrix}$};     \node [right] at (2,2,0) {$\begin{bmatrix}                                 2\\2\\0                                \end{bmatrix}$};  \end{tikzpicture}     It is missing the axis ticks and the orientation of the axes is different from the picture (although I guess mathematically it doesn't make too big of a difference). I've been reading the pgf manual and been looking through the forum, but I'm still stumped!


Is ending a sentence with a preposition acceptable?

When I learned English at school, I was taught that I should not end a sentence with a preposition.  Is it correct to end a sentence with a preposition?     To avoid starting a sentence with a conjunction, I don't write sentences similar to "I miss you. And your kisses." Is there a similar way to avoid ending a sentence with a preposition?


Environment align undefined line 11, all I can see to do is to retype the line and it still isn't working

\documentclass [12pt]{article} \oddsidemargin=0pt \topmargin=0pt \textwidth=6.5in \textheight=8.5in \begin{document} \begin{center} {\large\bf\LaTeX\ Example 8} \end{center} Sometimes we have to typeset a sequence of calculations: \begin{align} \sum_{r=1}^k\left( l(r)-l(r-1)\right)  &= \sum_{r=1}^k\left(N-2r+1\right) \\  &= k(N+1)-2\sum_{r=1}^kr \\  &= k(N+1)-k(k+1) \\  &= k(N-k)  \end{align} \begin{quote} \begin{verbatim} \begin{align} \sum_{r=1}^k\left( l(r)-l(r-1)\right)  &= \sum_{r=1}^k\left(N-2r+1\right) \\  &= k(N+1)-2\sum_{r=1}^kr \\  &= k(N+1)-k(k+1) \\  &= k(N-k)  \end{align} \end{verbatim} \end{quote} Here is another way: \begin{eqnarray*}  \sum_{r=1}^k\left(l(r)-l(r-1)\right)  &=& \sum_{r=1}^k\left(N-2r+1\right) \\  &=& k(N+1)-2\sum_{r=1}^kr \\  &=& k(N+1)-k(k+1) \\ &=& k(N-k)  \end{eqnarray*} \begin{quote} \begin{verbatim} \begin{eqnarray*}  \sum_{r=1}^k\left(l(r)-l(r-1)\right)  &=& \sum_{r=1}^k\left(N-2r+1\right) \\  &=& k(N+1)-2\sum_{r=1}^kr \\  &=& k(N+1)-k(k+1) \\ &=& k(N-k)  \end{eqnarray*} Observations: \begin{itemize} \item The eqnarray environment is a displayed array with three columns.  It is aligned on the center column. \item The \verb+*+ supresses the generation of equation numbers. \end {itemize} ---Britney Wiggins \end{document}


Number of elements in the quotient ring $\mathbb{Z}[X]/(X^2-3, 2X+4)$

I had to calculate the number of elements of this quotient ring:   $$R = \mathbb{Z}[X]/(X^2-3, 2X+4).$$   This is what I've got by myself and by using an internet source:  Writing the ring $R = \mathbb{Z}[X]/(X^2−3, 2X+4)$ as $\mathbb{Z}[X]/I$, we note that $I $ contains $2(X^2−3)−(X−2)(2X+4) = 2$. We then note that the generator $2X + 4$ is actually superfluous since $2X + 4 = 2(X + 2)$.   Now we can write $R = \mathbb{Z}[X]/(X^2 − 3, 2) = \mathbb{Z}[x]/((X+1)^2, 2)$, because $(X+1)^2=X^2+2X+1=X^2-3+2X+4$. The internet source states now the following:  $$ R \cong (\mathbb{Z}/2\mathbb{Z})[\alpha] \quad \text{with} \quad \alpha = X+1$$ I guess that $\mathbb{Z}/2\mathbb{Z}[\alpha]$ represents the set of dual numbers of the field $\mathbb{Z}/2\mathbb{Z}$. I see that $\alpha^2=0$, but what exactly implies the isomorphism? And does this mean that the quotient ring $R$ contains four elements?  If necessary, you can take at the site I used. (It's about page 5, exercise 4.3a.)    I thank you in advance for your answers.


I am attempting to add validation for my ArrayList if it is null, below is my current implementation:  List<Person> personList = new ArrayList<>():  if(personList!=null){  //do something  }   However, this still throws an exception If the list is deemed to be null, how can I fix this?


Do all massive bodies emit Hawking or Unruh radiation?

It is known that any accelerated observer is subject to a heat bath due to Unruh radiation. The principle of equivalence suggests that any stationary observer on the surface of a massive body should also experience heat bath. Indeed by substituting surface gravity g into the formula for Unruh radiation one can find the black body temperature for a hypothetical hyper-cool planet:  $$T = \frac{\hbar g}{2\pi c k}$$  which is $3.9766×10^{-20}\,\rm{K}$ for Earth  one even can find the time which it will take for Earth to evaporate: $5.69×10^{50}$ years.  Since the heat in the super-cold Earth cannot come out of nothing one should assume that it will come from decay of particles due to a certain mechanism.  Sometimes I heared an argument that an event horizon is needed for Hawking radiation to exist. But this can be countered by assumption of possibility of decay due to quantum virtual black holes (which inevitably should appear due to uncertainty principle, and the more massive and dense body is the greather concentration of virtual black holes inside it will be, eventually becoming similar to the concentration of bobbles inside a body of boiling water). Or just suggest that any massive body due to uncertainty principle can quantum tunnel into a black hole state so to emit Hawking radiation.  So what is the conclusion here?    Can we say that all massive bodies are surrounded by the atmosphere of heated vacuum?   This is a weaker preposition: thermal state of surrounding vacuum does not mean energy transfer if the system is in thermodynamic equilibrium.    Any body gradually evaporates, i.e. transfers its energy to the surrounding vacuum until completely vanishes?   This is a stronger preposition and suggests emission of radiation al loss of mass.


What did Buster Moon say to the dancing foxes to offend them?

In the movie Sing, there is a scene where Dapper Koala tries to invite the dancing foxes to join his show. He picks up a dictionary and says something, after reading from the dictionary the foxes are offended and leave  What did he say?


I have newly installed ParrotOS on my computer. Previously it was Windows 10. The hard drive had 3 pratitions. One partion now has Linux the other two are data partitions(important files). The problem is that i am not able to write to those partitions as they open only as read only from Linux. I tried remounting the partitions but no effect i also searched on internet and saw that turning of fast boot was the solution but in my case it is not possible as windows is no more there. The data is huge (70 GB in each partition) thus backup and format is not very convinient. Can anyone help with this? I tried : sudo mount -t ntfs-3g -o remove_hiberfile /dev/sdb5 /mnt/windows  [sudo] password for jaysmito:  The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount. Failed to mount '/dev/sdb5': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.


Ubuntu installation problem with dynamic disks

I have Windows 7 installed in my PC. In a failed attempt to create a partition my disk has been converted to dynamic including system and boot volumes. How can I install Ubuntu in a partition without affecting the Windows system?


How can corium eating its way into water tanks cause a megaton scale explosion?

The 2019 miniseries "Chernobyl" appears to state that the "lava like" substance of melted radioactive matter from the core, the so-called "corium", could eat its way down into the water reservoirs below the reactor core. This could then possibly cause a second, much stronger explosion.  They indicated this could be on the orders of several megaton, I believe 2-4.  This seems to be on the order of a hydrogen bomb, and I'm curious if this is factually accurate. If it is factually accurate, how exactly is such explosive force possible? Was it assumed fusion would take place? How would the required pressure for fusion be achieved, and why would not fizzling (the explosion itself starting and immediately pushing away the material so no very significant explosion would take place) be an issue for such a large explosion?  I see this topic relating to the miniseries turns up on sites such as ArsTechnia and Reddit, but I'm curious what the community here has to say about it.  Any sources that can be cited would be great.


How find and install old firefox version

I have already installed firefox 52.0.1 (64), trying to install 50.1.0 (64)  sudo apt-get install firefox=50.1.0   answer  E: «firefox» version «50.1.0» is not found.     More information:  $ apt-cache show firefox | grep Version Version: 52.0.2+build1-0ubuntu0.16.04.1 Version: 52.0.1+build2-0ubuntu0.16.04.1 Version: 45.0.2+build1-0ubuntu1


I asked  a while ago on , but I've gotten absolutely no response, so I'm asking it here.  Is the Stack Exchange authorization process broken?   As I mentioned in the linked question, I've tried to run the implicit authentication flow in Chrome, ,  and my application; all of them just redirect to  without even asking the user for permission. This happens on two different machines (these are both Windows 10 machines, one on the latest Insider build and one on the public build, if that helps anything), so I'm 99% sure this has got to be a problem on the API's end, but no one will say anything about it. Is this a known issue? If so, is there an ETA for a fix? Or at least a workaround? I'm currently sitting dead in the water for the majority of features in my application, since I can't authorize.


Disable trackpad and trackpoint via command line

For my rotation script, I'd like to disable the trackpoint when I have the screen rotated. It is pretty annoying if the screen is folded onto the keyboard and then moves the mouse with the trackpoint.  Is there some way to disable (and enable) the trackpoint via the command line and keeping the touch and pen input active?


Why does SIGTERM work to terminate bash but not ash or dash?

Comparing bash, ash and dash, only bash can be terminated by SIGTERM  kill -TERM <pid>   For ash and bash, I need SIGHUP or SIGKILL  kill -HUP <pid> kill -KILL <pid>   What's the reasoning behind this? Furthermore, the behavior seems to be system-dependent:   bash is terminated by SIGTERM on Ubuntu 14.04 Trusty, Ubuntu 16.04 Xenial, Ubuntu 18.04 Bionic, Ubuntu 19.10 Eoan, Ubuntu 20.04 Focal, Debian 8 Jessie, Debian 9 Stretch, Debian 10 Buster, CentOS 8 bash is not terminated by SIGTERM on CentOS 6, CentOS 7


Someone gave me a bunch of envelopes of pizza crust yeast, "specially formulated for pizza crust". The packets also say that no rise time or proofing is needed, and that it's "NOT recommended for bread baking." The ingredients are yeast, enzymes, sorbitan monostearate, l-cysteine, and ascorbic acid. It does provide a recipe for pizza crust, with just mixing and a bit of kneading.   What has actually been done to this yeast to make it work like this? (What are those enzymes?) And is there any way I can use it for other things, or is it really only good for things like pizza crust?


I will be traveling to the USA and I have been issued a visa. I also have a visa issued by Iran which I visited three years ago on a pilgrimage with my son-in-law. Will there be any problems entering the USA because my passport has an Iran visa?


How can I loop over possible completions?

I'd like to be able to get my hands on an array of possible completions for a given partial command. For example, the partial command service um has the following possible completions:  $ service um<TAB><TAB> umountfs      umountnfs.sh  umountroot   I'd like to have a function completions with the following behavior:  $ for x in $(completions 'service um'); do > echo $x > done umountfs umountnfs.sh umountroot   Partial progress: what I've learned so far  Here is an approach which I think can be made into a full answer. I'd definitely like to see that full answer, but given that the relatively simple <TAB><TAB> gives the same functionality in a non-programmatic way, it feels like there could also be a slicker solution.  I can find out that the completion mechanism for the service command is the _service function:  $ complete -p service complete -F _service service   When this completion function _service is called, a bunch of environment variables are set (namely COMP_{LINE,POINT,KEY,TYPE,WORDS,CWORD}; see ), the function is given as arguments the command being completed, word being completed, and previous word, and it populates COMPREPLY with the possible completions. So my desired completions function could be defined something like this:  function completions() {     # Produce an array of tokens in the input.     read -a words <<< $1      # Use "complete -p ${words[0]}" to determine how the      # completions are computed. This could be complicated     # if complete is given flags other than -F.     completion_func=???      # Set all those COMP_* environment variables appropriately.      # Run the function to populate COMPREPLY. This version     # assumes words has length at least 2, but that can be     # fixed.     $completion_func ${words[0]} ${words[-1]} ${words[-2]}      echo ${COMPREPLY[@]} }   Aside from the complexity relative over <TAB><TAB>, a drawback of this approach is that it changes the environment.


I want to know if the words electric, electrical, and electronic can be used interchangeably. They all seem to mean about the same thing... Any suggestions?


Somebody Is Reporting Me as Hacking Stack Exchange

At  over an "on-hold" question, some users are reporting my current account as being hacking the site, claiming that "I answered a question already closed".   Why the app let me do that, is actually unknown, and honestly not relevant, to me.  Besides the obvious honoring title as "SE hackers", and the hilarious fact of hacking SE for "answering questions on hold of elementary level school students", what should I do to protect my account against this kind of actions?  If somebody is interested in the details:   I am using SE from iPhone 5, My carrier is experiencing interruptions, due to snow storm, I am using Math Stack Exchange, I am answering a question within the app, during the "on hold" period.


How to find *all* startup programs on Windows 10?

I've checked the "Start-up" tab under Task Manager, the "Services" tab in msconfig, and the startup folder (C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup) but there's an app that keeps coming up whenever I boot (Patriot Dashboard) that's not listed in any of those places.  Where can I find the rest of the startup apps?


I am a High-School Student and I wanted to study logic.Now , as a background , I have read Set theory, some Geometry and Induction and I thought it would be sufficient enough to begin self studing an elementary subject like Logic. I started from reading some lecture notes , but they were kind of confusing. The Definitions are easy to read but sometimes they explain concepts in a hand wavy way and expects me to automatically understand the concept without any second thoughts (In a way , they are not formal and concise enough for me).I guess I have been reading the wrong logic lecture notes. Sometimes , they have simple definitions but end with hard exercises witch you need a lot of experience to solve. But How Am I expected to solve those problems if I am just studying logic from ground zero. For example ,you are told to do exercise 1.0 for which you need knowledge of chapter 2.0.This makes me frustrated. At this point , I have 3 options, $1$.Download multiple pdf from multiple sources :This is time consuming , but I am definitely willing to do the hard work to read from all of them and gain some insight about this subject. The problem is from reading multiple books(good or bad) ,The things I learn from from them might conflict with each other in my head and I might end up learning nothing good. $2$.Reading One good textbook and going downwards:This might be a good option , but the problem is that ,again , I have 0 experience about this topic. If this is a good option , then It will definitely help me to give some advise about witch textbooks I should start with if I want to learn logic in a Concise , Rigorous and formal way. $3$.Just Give up : Assuming I am a high school student , I might be asking for too much and it might ruin my future student carrier somewhat. So I can just give up and learn this stuff when I grow up .Maybe I should give up because I am not hard working and smart enough to study mathematics like this. It is true That I have 0 experience about this topic and only started to read things like proposition-logic and truth tables.Thats why I am asking this question.Which option I should choose? Edit:Here is a short summary of my background.I am at hi-school studying things like set theory,function,algebra .But still , often I like to go out of my safezone and study things like abstract algebra,linear algebra,calculus,tensor calculus etc.But first I wanted to establish a firm grasp on the foundations of mathmatics (things like proposition logic and axiomatic set theory).I want to also study it rigorously and formally, so that it becomes my second nature.According to my second option , I should definitely choose a good book(like mendelson) and not start with something totally unworthy because that will be a waste of my time.Why do like to   study it rigorously and formally?Because that way I can resolve apparent paradoxes and build up my mathematical foundation without any "structural issues".I also like to research about something if I find any doubt,but I definitely don't like the moments when I find out that what I have learned so far was just a lie and start over again. (that happened to me many time because of bad textbooks and teaching methods)