Recyclerview on click null object reference

My adaptor:  public class Adaptor extends RecyclerView.Adapter<Adaptor.Holder>{  private ArrayList<Winkel> winkels; private LayoutInflater inflater; private ImageView icon; private ItemCLickCallback itemCLickCallback;  public interface ItemCLickCallback {     void onItemClick(int p);     void onSecItemClick(int p);  }  public void setItemCLickCallback(final ItemCLickCallback itemCLickCallback1){     this.itemCLickCallback = itemCLickCallback; }  public Adaptor (ArrayList<Winkel> winkels,Context c){     this.inflater = LayoutInflater.from(c);     this.winkels = winkels; }   @Override public Holder onCreateViewHolder(ViewGroup parent, int viewType) {     View view = inflater.inflate(R.layout.card_item, parent, false);     return new Holder(view); }  @Override public void onBindViewHolder(Holder holder, int position) {     Winkel winkel = winkels.get(position);     holder.title.setText(winkel.getNaam());     if (winkel.isFavourtite()){         holder.icon.setImageResource(R.drawable.ic_star_black_18dp);     }     else{         holder.icon.setImageResource(R.drawable.ic_star_border_black_18dp);     }  }  @Override public int getItemCount() {      return winkels.size(); }  class Holder extends RecyclerView.ViewHolder implements View.OnClickListener{      private TextView title;     private View container;     private ImageView icon;      public Holder(View itemView) {         super(itemView);          title = (TextView)itemView.findViewById(R.id.lbl_item_text);         container = itemView.findViewById(R.id.cont_item_root);         icon = (ImageView) itemView.findViewById(R.id.im_item_icon_secondary);         icon.setOnClickListener(this);         container.setOnClickListener(this);     }      @Override     public void onClick(View v) {         if(v.getId()==R.id.cont_item_root){             Log.d("lol",Integer.toString(getAdapterPosition()));             itemCLickCallback.onItemClick(getAdapterPosition());          }         else{             itemCLickCallback.onSecItemClick(getAdapterPosition());         }     } } }   My overview fragment:  @Override public void onItemClick(int p) {     Log.d("lol",(Integer.toString(p)));     Winkel winkel = (Winkel) mijnwinkels.get(p);      Bundle detailsBundle = new Bundle();     detailsBundle.putString(DETAILS_NAAM,winkel.getNaam());     detailsBundle.putString(DETAILS_ADRES,winkel.getAdres());     detailsBundle.putString(DETAILS_DEELGEMEENTE,winkel.getDeelGemeente());     detailsBundle.putString(DETAILS_GEMEENTE,winkel.getGemeente());     detailsBundle.putString(DETAILS_POSTCODE,winkel.getPostcode());      Details detail= new Details();     detail.setArguments(detailsBundle);     this.getFragmentManager().beginTransaction()             .replace(R.id.details,detail,null)             .addToBackStack(null)             .commit(); }   Error message:  java.lang.NullPointerException: Attempt to invoke interface method 'void com.example.hoofdgebruiker.winkelskortrijk.Utill.Adaptor$ItemCLickCallback.onItemClick(int)' on a null object reference.   My code is working up to the point where I get me recyclerview, the items are in it, but I can't click any of them without getting this error and I don't understand why. What am I doing wrong that it is a null object reference? Neither of my logs are showing up.  Edit: my method onItemCLickCallback is used here:  @Override public void onSuccess(ArrayList<Winkel> winkels) {     mijnwinkels = winkels;     Adaptor adaptor = new Adaptor(mijnwinkels, this.getActivity());     mRecyclerView.setLayoutManager(new LinearLayoutManager(this.getActivity()));     mRecyclerView.addItemDecoration(new VerticalSpace(30));     mRecyclerView.setAdapter(adaptor);     adaptor.setItemCLickCallback(this); }


What PDF Editors are available on Ubuntu?

I was wondering if there is a pdf reader-writer-publisher-editor that can add text, highlight, shapes and general edit an existing pdf document.  Something like Nitro in windows.


What is the exact time of Ubuntu 14.04 release?

Please tell me what time on April 17 14.04 becomes available.  I want to postpone buying a new laptop to the day before I can install 14.04 (at 09:00 UTC) in the hope that my old one is found.  Rob


I have a Maxtor external hard drive which I store many photos on in the camera's raw format and also the converted jpegs.  I have the photos broken down into several folders on the drive.  Recently, one of the folders seems to be corrupted and many gibberish folders are added to the drive.  I have run a data recovery software that seems to have found the files and I restored them to my C drive but when I try to open any of them in PS or any other browser I get the message unable to open invalid jpeg marker, or the file is truncated or incomplete,  or if it does open it is just a black and grey image.  Most of the other folders seem to be fine, but I can't understand what has happened to this one.


Make LibGDX game responsive to different phone screen sizes?

I've been experimenting with small games to learn design concepts, LibGDX, and Box2D. I am wondering how you would implement "responsiveness," so to say. For example, this is the rendering part of my game and its just drawing to coordinates.   For example I'd like it to look good on Android phones of different resolutions or if the user resizes it on desktop. I am asking about design patterns or practices that would make this possible. Any solutions I can think of seem like they wouldn't scale or would over-complicate the game.  If you know of any articles or design practices that cover this topic, or have any of your own knowledge, or example LibGDX/Java games, I'd love to see them.


What are the actual effects of voting on questions? All the documentation I could find just says that voting "moves things up" and "gives people reputation". I get the second part, and I get how voting "moves things up" for answers, but how exactly does voting move things up for questions? Does it make them appear higher on the main page? On in-site search results? On Google search results?


'scolding' means 'speaking angrily to someone because of his or her unpleasant behavior, but that word from the sentence below, I guess, should be translated differently.   Here is the sentence, which is from 'Baker's blue-jay yarn' by Mark Twain:     And there's yet another thing; in the one little particular of scolding - just good, clean, out-and-out scolding - a blue-jay can lay over anything, human or divine. Yes, sir, a jay is everything that a man is.


Unable to access my desktop computer hard disk

I was working normally on my desktop computer with Windows 8.1, then my power supply stopped working, the PC shut down and it won't turn on again until I replace the power supply (which I can because it's December 31)  I used my converter to connect my FILES (D:) Hard disk via USB to my Ubuntu laptop (It has nothing to do with windows, windows is in another physical hard disk) and I get this error:    I've read this , but it requires you to start Windows (I can't do it) I need some solution I directly on Linux.  Thank you beforehand!


How to find and replace a "*" character in a cell without deleting the entire contents in Excel 2010

I have a large spreadsheet with a number of cells containing text that have a "*" character at the end. I would like to find and replace this character and delete it.  solution doesn't seem to work in Excel 2010.


Modify integer values throughout program

I am making battleship in java. I'm at the very end of the game but I cannot figure out how to reduce playersShips/computersShips when they are 'hit'. Is there a way to modify x and y so if they are reduced to 4, the int value does not reset at 5?  I've looked around and I know that int values cannot be modified this way, but I read something about using a wrapper class? Did not know if that could be applied here? I also considered changing the int value to a char array and using something like (a-e), then converting the letter to the ascII table and reducing it from there, but that does not seem very efficient.  At the current way I am trying to make the game I cannot return the int value because in my playersTurn method it has the possibility of returning either x or y, and you can only return 1 value (correct?).   If Tl:Dr, simply put I need a way to reduce x and y in a way that the values stays at the new integer. 5->4->3->2->1->Game over. Below is simplified code. Thank you!  public static void main(String[] args) {    int x = 5; //PlayersShips    int y = 5; //ComputersShips    play(field, x, y);  }  public static void play(char[][] field, int x, int y){    while(x != 0 || y != 0) {         playersTurn(field, x, y);         computersTurn(field, x, y);         } }  public static void computersTurn(char[][] field, x, y){     //Computer randomly chooses an x and y coordinate to 'attack'.     //The '&' symbol is the player's ships     if(field[x][y] == '&') {       x--; }


[SELENIUM]Webdriver driver = new FirefoxDriver() cn anyone say how the constructor name is different from class name here

I read in java basics while instantiating object we should use same class name as constructor with parameter firefox which means webdriver driver= new webdriver(FirefoxDriver) then how come we are using  Webdriver driver = new FirefoxDriver()  kindly explain


What is the best way to concatenate two Strings in java. likely best performance and less memory usage. Please help me..!


Finding the intersection of two .NET DataTables

Is there a relatively straightforward way to get the intersection of two DataTables in .NET?  I can think of the obvious ways (iterating over both tables myself in O(n^2)), but I'd like something a little more elegant if it's available.  I suspect there may be an intelligent way that I'm not seeing.  Readability and maintainability are important, of course, so I'm trying to stay away from anything too "slick".  Any good ideas?  EDIT: It looks like Bryan Watts has a pretty great solution for 3.5, but unfortunately I'm in .NET 2.0 (which I should have mentioned.)


Why do only two sexes exist for animals?

Why, from the natural selection point of view, do only two sexes exist for animals?


biblatex 3.0 apa undefined control sequence (\mkbibdateapalongextra?)

I am not sure why I cannot copy from the TeXShop console anymore, but here is my problem. This does not seem to be related to my bib file or how I cite things. How can I fix this?  I am calling LuaLaTeX here on after calling biber 2.0.    The example code would look like the following. From the error message, it does not look like any other specifics (of the content, for instance) is related to the error.  % !BIB TS-program = biber % !BIB program = biber \documentclass[11pt,english]{article} \usepackage[utf8]{inputenc} \usepackage{fontspec} \usepackage{polyglossia} \setmainlanguage{english} \usepackage[style=apa,backend=biber]{biblatex} \addbibresource{myfile.bib} \begin{document} \textcite{label} \printbibliography \end{document}


Better way to run a series of seven identical commands in sed?

In the post , a user suggests:  sed 's/old/new/;s/old/new/;s/old/new/;s/old/new/;s/old/new/' filename   as a method of replacing the first k instances of a word in a line. Seems like an inelegant solution to the problem of replacing the first k instances of old with new. There are other methods discussed, to do other things. But there are no other (or no other elegant) solutions to the problem of replacing the first k occurences of a word in a line using sed.  tl/dr:  I have a large group of items I call "slugs" that are really helpful for a variety of odd little things that I want to keep track of. They look like this:  #slug YYYY/MM/DD d hhmm field1 field2 field3 notes   And I keep them in a series of files that are dated. Then I put the files through a grep | sed | awk chain to generate reports from the data. So let's say my neighbor's dog is barking and it's keeping me up at night. Every time I hear the dog bark I will write down the time, and later I will note it in my logfile.  #bark 2016/04/06 W 0214 0232 Police showed up!   And after a while, I will have a database stored up, and hopefully, I will notice some trend, like... who knows what... the dogs bark at the full moon or something. The chain of little programs would look like:  grep "^#[Bb][Aa]" 2014* 2015* 2016* |\ sed 's/ /|/;s/ /|/;s/ /|/;s/ /|/;s/ /|/' |\ awk {something or other} >\ barking-dog-report   So, my problem is the sed portion:  sed 's/ /|/;s/ /|/;s/ /|/;s/ /|/;s/ /|/'   Which translates here into "replace the first five spaces into pipes." I use the pipe as the field separator in awk. A command like s/ /|/5 doesn't work, that just changes the fifth space on every line into a pipe. I just think that series of sed commands looks ridiculous. It's not a global replace s/ /|/g, because I want to retain the spaces as spaces (and not use them as field separators) for the notes section.


extdash package and invalid hyperref PDF tokens

How can I silence the hyperref warnings:  Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref)                removing `\<let>-command' on input line 7.   Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref)                removing `\EXD@break' on input line 7.   Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref)                removing `\@ifnextchar' on input line 7.   when using the extdash package? I have tried to use pdfstringdefDisableCommands but couldn't find out what to put in there. What I would like to prevent is having to remember to use \texorpdfstring every time I use the extdash commands in sections.  MWE  \documentclass{article}  \usepackage[shortcuts]{extdash} \usepackage{hyperref}  \begin{document}     \section{This is a test\-/Thing} \end{document}


Let $A,B$ be two symmetric positive-definite matrices, and let  $$A=U\Lambda U^T,\qquad B=V\Gamma V^T$$  be their eigenvalue decompositions, where $U,V$ are orthogonal matrices and $\Lambda,\Gamma$ are diagonal, containing the (positive) eigenvalues of $A,B$.  By generating random matrices $A,B$ with these properties, I have numerical evidence that the following inequality seems to hold in general:  $$\mathrm{Tr}(AB) \le \mathrm{Tr}(\Lambda\Gamma)$$  Is it true? If so how can I prove it? (If not, please provide a counter-example).


Does java.util.List.isEmpty() check if the list itself is null?

Does java.util.List.isEmpty() check if the list itself is null, or do I have to do this check myself?  For example:  List<String> test = null;  if (!test.isEmpty()) {     for (String o : test) {         // do stuff here                 } }   Will this throw a NullPointerException because test is null?


Allow "suggested edits" to be less than 10 characters

Right now, a user making a suggested edit to a Q or A, must make at least 10 chars change, as there is a filter to that effect which seems to be active on all subsites.  The problem is that quite often a useful edit is less than this size. I hit 3 examples in the last 24 hours alone:   A typo where the user typed "peace" but meant "piece"; the result made the final sentence meaningless and perhaps even misleading (to others who might think this was correct); An answer where an incorrect word was used (FreeBSD doesn't have "bind" mounts, the answer meant a "nullfs" mount on that OS); An answer which used an incorrect symbol that would prevent the answer working if tried as-stated.   In all these, the issue is the same - there may be useful edits/corrections that are under 10 chars.   If one is suggesting an edit to someone else's edit, there usually isn't any justification to add unnecessary extra text purely to get >=10 chars changed. It would be best practice to make the least possible change, even just 1-2 chars, out of respect for the user who made the post. I'm also having difficulty seeing how this limitation connects to a risk of misuse, such as spam or other problems.  Can we review whether this limitation is helping or hindering the site, and whether there is really any risk of issues or spam if those users who can suggest edits, could suggest edits < 10 chars?  If the conclusion is that it would help, could this change be made?


I just watched Planet Hulk. At the end the Hulk ends up with someone seemingly almost as powerful as he is. Are the Hulks (Green, Red, and She-Hulk) able to have children?


Is Banner missing the tooth that Hulk lost?

Stark's Hulkbuster armor manages to knock a tooth out of Hulk's mouth in Age of Ultron. Did this tooth simply regenerate, or is Banner missing it as well? It's clearly not a front tooth, because we see Banner apparently none the worse for wear in that regard afterwards.  Is there anything in the comics supporting this, or anything else that mentions it? If the question were broadly "what happens to banner when Hulk loses a tooth", the answer is clearly 'nothing', but the cinematic representation of Hulk's abilities is significantly different than what is portrayed in the comics and elsewhere. This question refers specifically to the Hulk in Age of Ultron and not elsewhere.


How to use Metadata API to search which field is used in validation rules

I want a solution to understand how we use metadata API to get a list of validation rules in which a particular field api is present


How are zero-length arrays in a structure useful?

Quoting from ,     Zero-length arrays are allowed in GNU C. They are very useful as the last element of a structure that is really a header for a variable-length object.   Code:   struct line {    int length;    char contents[0];  };   struct line *thisline = (struct line *)malloc(sizeof (struct line) + this_length);  thisline->length = this_length;   I really did not understand what they have meant by this: "last element of a structure that is really a header for a variable-length object". Can someone elaborate on that sentence?


UK visit visa refusal - Not sure how to proceed

I am wondering if someone can help with this visit visa refusal my Indonesian girlfriend received today This is a second refusal letter. The first one was refused because we didn't include any proof of relationship and hadn't included the bank where her payroll is paid. Fair enough. But this one, we included both accounts with 6 months bank statements. The payroll account only contains wages that match her payslips. The savings account (apart from a few payments from me) contains payments from her payroll account. Everything is accounted for and we even clearly listed all the evidence and my payments in a letter to make it easy for them with a note explaining that the savings account contains payments from the payroll account. I tried contacting UKIV to tell them and find out what happened but they said they can't help. Should I apply again? Do I need to explain every transaction? How can I make it clearer? Even though she has plenty of money in her savings account, I still put my myself down as sponsor and that I would pay for flights, accommodation and other expenses. So what's with the last paragraph about working / public funds?


Should owner of Question/Answer be able to see the up-vote/down-vote

I think it can be helpful to the OP to be able to click on the vote and it shows the up-vote/down-vote.     It would be better if the owner of the question/answer should also see them.


Is casting a function pointer always undefined, or is it sometimes implementation defined?

I hope this is not a duplicate, if it is I apologize.  Edit: this is a duplicate, in the sense that a similar question has been asked before.  The answers to that question don't quite fit.  To get a better sense of the subtlety I am trying to get at, read my comment about uninitialized memory.  End of edit.  My question is about whether the C code below is in some sense legal.  Even if it were, I wouldn't use it, since it generates a warning and warnings annoy me.  Still, I'm curious.  But enough of the rambling introduction, the question itself is rambling enough as it is.  The setup is as follows.  Suppose you want to sort an array of integers.  Instead of implementing your own sort, you decide to use qsort, which wants a comparison function which takes two void*.  Inside the function, you cast the void* into int*, and then compare them.  In an ideal world, I'd like to pass a function that takes two int* instead.  The compiler warns if you try this, for obvious reasons: for all it knows, qsort will try to call your function with a short* and a double*, and havoc will ensue.  If the C type system were more expressive, then the declaration of qsort could give the compiler enough information to deduce that this will never happen.  But even with the type system we have, a Sufficiently Smart Compiler (tm) knows exactly how qsort works, and thus it knows that your comparison function will always get pointers to integers.  Unfortunately, even then, the compiler must warn, because if the compiler is truly portable, it may have to support platforms where the size of a void* is not the same as the size of an int*.  But such platforms are very rare, bordering on non-existent.  Far more common are platforms where an int is only 2 bytes, and on those platforms the expression 123*456 is undefined behavior.  But most platforms today have a larger int, and on those the expression is well defined.  If a compiler with 4 byte integers were to assume that 123*456 is unreachable, then that compiler is not standard compliant.  In other words, once the implementation makes some promise (large int), the standard forbids it from doing things that are in general allowed (treating some expressions as if they overflowed).  Let's take another example.  In most operating systems, dereferencing a null pointer will crash your program.  But even if you don't mind crashing, you must still check the return value of malloc, because dereferencing null is undefined behavior according to the standard, and very few compilers make stronger guarantees in this case.  My question is thus:  where does the function pointer cast fall on this continuum?  I'm pretty sure that most platforms in common use today do in fact guarantee that all pointers have the same representation, are passed using the same calling convention, etc.  If I only care about those platforms, can I then pass a comparison function that takes int* instead of void*, just like I can fearlessly multiply 3-digit numbers, or is it more like the situation with dereferencing null, where this particular behavior is undefined unless the documentation explicitly says otherwise?


we know that $(X_k)$ i.i.d, $N(0,1)$, then what is the distribution of the vector $(\frac{X_1}{\sqrt{X_1^2+X_2^2+\cdots+X_n^2}},\frac{X_2}{\sqrt{X_1^2+X_2^2+\cdots+X_n^2}},\cdots,\frac{X_n}{\sqrt{X_1^2+X_2^2+\cdots+X_n^2}})$  I Know that the vector sums up to 1, but it seems not helpful. I have no idea what to do next.


Conditions permitting rotation to imaginary time

I often see that action is written with a Euclidean metric instead of the original Minkowski metric. My question is basically this : Under what conditions is okay to make a wick rotation?  I am thinking of the Wick-rotation in a manner analagous to a change of contour in a contour integral. In the case of contour integral, before making a similar change in contour, I would consider issues like location of poles of the integrand, behavior of the integrand at infinity of the complex plane etc. But in case of Wick rotation, I don't see such things discussed.  I would appreciate if some of you could answer or give some inputs to answer the following questions I have:  Is the rotation just as trivial as a change of variable : $\tau=\imath t$ ?  How do I know that the rotation should be $\tau=\imath t$ and not $\tau=-\imath t$  Can I always make a wick rotation for any Lagrangian?  Thanks.  EDIT/PARTIAL-ANSWER/GENERAL-UPDATE:   sheds some light on the issue. The short section on lack of an analytic continuation tells me that in a general case wick rotation needs to be justified.


how to get orignal gnome on Ubuntu 18.04, with all the other software as in Ubuntu Gnome flavour?

I am a great fan of Ubuntu as well as gnome. Although i do not like the customized gnome shell in Ubuntu 18.04. Further more since the Ubuntu GNOME has been discontinued i would like to have an original gnome with gnome software and all the other software as if in Ubuntu GNOME. Kindly hep me get it back in Ubuntu 18.04 LTS.


Are there non-squib wizards/witches who work 100% in muggle world?

This Q/A (  ) made me realize that I can't seem to remember a single HP wizard/witch who had a Muggle job with a Muggle company, aside from Kingsley's bodyguard cover as the Prime Minister's secretary.  Everyone whom I recall being mentioned as having a job is either employed in some magical company or the Ministry of Magic (which seems to employ more magical people than every other employer combined) or be self-employed - again economically interacting with wizards.  Am I merely forgetting someone, or was Kingsley really the only magically capable person with a paycheck from the Muggle world (which doesn't count since the job was a cover)?  UPDATE: Just to clarify - I didn't necessarily mean "working a Muggle job while using magic to help you" - it could also mean simply doing a Muggle job. So there's not necessarily a concern about Statute of Secrecy (plus, you can use the magic, say, to learn - e.g. Hermione could magick herself to learn how to do dentistry in 1 month or something). So no need to answer how having some wizard doing a Muggle job would be contrary to HP universe rules. I merely want to know if there's an example, NOT why there should't be one.


I haven't been writing C for very long, and so I'm not sure about how I should go about doing these sorts of recursive things... I would like each cell to contain another cell, but I get an error along the lines of "field 'child' has incomplete type". What's up?  typedef struct Cell {   int isParent;   Cell child; } Cell;


Can two super capacitors connected in series back to back be used as DC blockers when in series with an AC supply and load, regular polarized capacitors can be used in this mode, but is there something different in the construction of super capacitors which precludes this.If yes are diodes required to prevent reverse charging.


Will Deoxys Re-appear if you didn't catch him when fighting him in space?

I accidentally killed Deoxys when he fought me because he ran out of PP and killed himself.   Does he respawn?


I started to get confused on how the hard disk operates, particularly in writing and reading data into its platters.  According to this article:    hard disks write data in a linear path (as what I presume). If so, what are sectors for?


I have decided to install fedora 21 and Ubuntu 14.04 along side. Here I have two question:  1) how should I partition my disk so I can reinstall or change each distro without affecting other one?  2)can I access one ditros package from another distro?  Thakns


Java varargs - why are these unacceptable syntax?

I had this practice test question for my OCAJP8 exam preparation. Can someone please explain why the 'Wrong' ones are wrong? Thanks.  Which of the following compile?  Response  Wrong    public void moreD(String... values, int... nums) {}  Wrong    public void moreF(String... values, int[] nums) {}  Correct  public void moreB(String values, int... nums) {}  Correct  public void moreG(String[] values, int[] nums) {}  Correct  public void moreA(int... nums) {}  Wrong    public void moreC(int... nums, String values) {}


In Win10 can a Storage Space 2-way Mirror be the System disk?

I promised to set up SW RAID Mirroring for my client.  The computer came with a 500GB HDD as the only disk (with Win10 Pro installed on it).  I just plugged in 2 additional new 500GB SSDs (not yet formatted).  Can I create a Storage Pool from the 2 SSDs and make it into a 2-way mirror.  Then reinstall (or preferably move) the OS to that Storage Space Mirror and do away with the existing HDD and have it work?


How does the drift velocity of electrons in a conductor depend on the temperature?  I have two contradicting views for this.    First, we can say that increasing the temperature of the conductor will increase the kinetic energy of the electrons. Hence, their drift velocity should increase with increase in temperature.  Or, from the relation $v_d = \frac{eE}{m}T$ ($T$ is the relaxation time) we can say that the drift velocity is directly proportional to the relaxation time. Increasing the temperature will obviously decrease the relaxation time - as collisions will become more frequent - and thus decrease the drift velocity. Hence, an increase in the temperature will cause a decrease in the drift velocity.   So which view is correct?


Getting two different answers for $\int \frac{1}{2x} \, dx $

I am getting 2 different answers for $\int \frac{1}{2x} \, dx $ and I do not know which is wrong. This is the first answer with steps: $$\int \frac{1}{2x} \, dx $$ $$\frac{1}{2}\int \frac{1}{x} \, dx $$ $$\frac{1}{2}\ln{|x|} +C $$ This is the second answer with steps: $$\int \frac{1}{2x} \, dx $$ $$\int1 (2x)^{-1} \, dx $$ $$u=2x $$  $$\frac{du}{dx}=2 $$ $$\frac{du}{2}=dx $$ $$\int1 (u)^{-1} \, \frac{du}{2} $$ $$\frac{1}{2}\int(u)^{-1} \, du $$ $$\frac{1}{2}\ln{|u|} +C $$ $$\frac{1}{2}\ln{|2x|} +C $$


I am writing a leader's guide for a preschool curriculum. When I put instructions inside of parentheses, should I end a full sentence with a period?  Examples:  (Give children time to respond)  (Show slide of hermit crab) (Allow them to choose from tray of gadgets)  Do these need a period, or does it even matter? :)


Name of a fantasy book where male character finds a magic absorbing artifact

The basic beginning premise is that a young man, who I think was trained in swordsmanship, finds a magical artifact capable of absorbing energy/magic at the cost of his life/vitality. He's able to extend this ability to his weapons. The setting is high fantasy, and the big bad is someone trying to collect all the artifacts,  which I believe were all based after the main elements. I think the cover had a medallion on it.


It has come to the point in my computing program now where I have 5 swinging pendulums that are all modified at once by slider values. These values are drawn onto the from and passed through the class pendulum. To change the values the update button is run, and their is a default option to use a setup that works. The values are also shown on screen through some simple labels. The zero button sets all values (except length) to zero.  The values for each pendulum drawn is:   String length angle Acceleration (angular) Angluar velocity Damping or friction Gravity   My calcuations for these values: (Bob = the weight at the end of the string, and there are X and Y Co-ordiantes for it.  bobX = originX + (Math.Sin(angle) * length);         bobY = originY +(Math.Cos(angle) * length);   Caclulate Acceleration:  Angular Acceleration = (-1 * gravity / length) * Math.Sin(angle);    Increment Velocity:          Angular Velocity += Angluar Acceleration;   Increment Angle          angle += AngularVelocity;   Friction action, pendulum eventually 0's          AngularVelocity*= damping;   Now my next task is to make the pendulums collide "realistically" and recreate a newtons cradle type effect. I've looked into elastic collision solutions on particle e.g. here is an excellent example:    I've also looked at the raw physics behind it  but my brain couldn't get to grips with the raw physics side of things.  So I'm wondering if anybody could help me figuring out the theory for the collisions.  My current idea is when the co-ordinates meet the velocity will simply change polarity e.g. +10 to -10 in the opposing pendulum. Am I correct here?  If you are into code I've posted the code on stack overflow


I am trying to reproduce the attached picture: But I can't in any way figure out what the correct way to write text next to an equation is.  Is there a package for this?


Allow users to see deleted comments on their own posts

I know that moderator access tool (10k) is required in order to view deleted posts. I am talking about showing deleted comments on users' own posts.   For example,   has  comment which seems for another user (not for me) but I think there should be some comment by another user (which is deleted) and this is the comment for that as a reply. (This is only my guess, there may be no deleted comments as I can't judge).   So, how about letting me see the deleted comments on my own posts?  Hence I am requesting to allow users to show deleted comments on their own post. (Or introduce a new privileges near about 3k etc for being able to see deleted comments on own posts)


I am iterating over a list and I want to print out the index of the item if it meets a certain condition. How would I do this?  Example:    testlist = [1,2,3,5,3,1,2,1,6] for item in testlist:     if item == 1:         print position


How to get images to planes objects to receive shadow?

I'm following this tutorial where you create a popular illusion using images as planes. Tutorial:  However, I can't seem to get the object to receive shadow unlike other objects I've worked with before. It could be that the nodes I've used to get this result is a mix shader that uses the images of the back and front of the illusion with backfacing but I don't know how to get around this.


R: how to export my Kriging result to raster?

I want to export results of my Kriging calculation to raster or some other format. My aim is to take this converted file and intersect it with another SpatialPointDataFrame (location of the point doesn't have to be the same, so that is the reason of conversion). The goal is equivalent of "Extract values To Points" in ArcGIS - thus, merge information from kriging and another SPDF for one locations.   For second part, I imagine just to use raster::intersect(krig, SPDF). But how to get raster data for my Kriging? I tried to raster::rasterize  r <- raster(ncols = length(ux), nrows = length(uy))  # length(ux), length(uy) krig.rst<-rasterize(krig.est, r, "var1.pred")   and   krig.rst<-rasterize(krig.est, r, "var1.pred", fun = function(x, ...) c(min(x))   The raster seems to be calculated, but I can't display it.  Please, is the problem in my raster dimension (nrow, ncol, ncell)? How can I assigned it? My first thought was that 1 cell of matrix (from Kriging) will correspond to 1 pixel of raster with assigned value, but I am obviously wrong.    Long reproductible exemple adapted from here:   library(sp) library(gstat) library(RColorBrewer)  # https://rpubs.com/nabilabd/118172 # packages for manipulation & visualization suppressPackageStartupMessages({   library(dplyr) # for "glimpse"   library(ggplot2)   library(scales) # for "comma"   library(magrittr) })  data(meuse)  # create spdf meuse.spdf<-meuse  # convert to spdf coordinates(meuse.spdf) <- ~ x + y    # calculate voronoi tesselation - will be needed to create underlying point data voronoipolygons = function(layer) {   require(deldir)   crds = layer@coords   z = deldir(crds[,1], crds[,2])   w = tile.list(z)   polys = vector(mode='list', length=length(w))   require(sp)   for (i in seq(along=polys)) {     pcrds = cbind(w[[i]]$x, w[[i]]$y)     pcrds = rbind(pcrds, pcrds[1,])     polys[[i]] = Polygons(list(Polygon(pcrds)), ID=as.character(i))   }   SP = SpatialPolygons(polys)   voronoi = SpatialPolygonsDataFrame(SP, data=data.frame(dummy = seq(length(SP)), row.names=sapply(slot(SP, 'polygons'),                                                                                function(x) slot(x, 'ID')))) } meuse.voro <- voronoipolygons(meuse.spdf)     # create underlying grid s.grid <- spsample(meuse.voro, type = "regular", n = 6000)  # calculate kriging  # create variogram lzn.vgm <- variogram(log(zinc)~1, meuse.spdf) # calculates sample variogram values  lzn.fit <- fit.variogram(lzn.vgm, model=vgm(1, "Sph", 900, 1)) # fit model  plot(lzn.vgm, lzn.fit) # plot the sample values, along with the fit model  # calculate kriging lzn.kriged <- krige(log(zinc) ~ 1, meuse.spdf, s.grid, model=lzn.fit)   # extract the unique x and y locations in the grid ux<-unique(coordinates(lzn.kriged)[,1]) uy<-unique(coordinates(lzn.kriged)[,2])  # extract the predicted values and format var1.pred into a matrix of gridded values predmat3 <- matrix(lzn.kriged$var1.pred, length(ux), length(uy))  # display the data  filled.contour(x = seq(0,1, length.out = nrow(predmat3)),                y = seq(0,1, length.out = ncol(predmat3)),                z = predmat3,                col = brewer.pal(6,"Purples"), nlevels = 5)


I'm using typescript and I'm receiving a value with object format, but it's a string. Lets call it as: myVar. MyVar have this value (image below) as string. const string myVar = '{"value":"1"}'  How can I transform this string to object for access your value?


Is "For" loop just an easy way to use "While loop" with one count variable?

You may have confused with the topic. So let me explain it.  In most of the computing languages , we have for and while loop. But in my example , I will declare the loop in c#.  When you decalre a for loop and while loop like this.  1.For loop   for(i=0;i<10;i++)    {      //do something    }   2.While loop   int i=0;  while(i<10)    {      //do something      i++;    }   From the 2 loops. When it comes to the complier , do they complie the same things?(except the int i that was declared outside the while loop.) If they don't , which one is better or more efficient?  Thanks in advance


I have got a problem with two crontabs that execute some operations on my website: the first one run a command every 3 minutes and the second one at 5am in this way:   m    h  dom mon dow command 0    5  *   *   *   command1 */3  *  *   *   *   command2   I suppose that works correctly and my website confirms it.  The problem is when this crontab is executed, in fact the first crontab runs at 3am and not a 5am (there aren't problem of local time).  I can't undestand where is the problem.  Thank you


Why is there a maximum focus distance when using an extension tube?

I am using the Nikon D850 together with the Sigma 50mm/1.4 Art and the  MEIKE MK-N-AF1-A extension tube(s).  During first shots I found out that the combination not only has a minimum focus distance (which is good), but also a maximum focus distance (which is confusing).  I haven't measured it, but with the 20mil extension tube I can only focus at objects that are only 1.5 to 2.5cm away from the lens (using both, manual and autofocus).  I tried several aperture settings from f/1.4 to f/8, but there are no changes  in the maximum focus distance.    Why is focusing on farther away objects a problem?  OR:  Why does using an extension tube introduce a Maximum Focus Distance?


When will you compete? Or When will you going to compete? Which one is correct, and more appropriate to use?


Opening Esri Personal Geodatabase (*.mdb) using QGIS?

Is it possible to open an Esri Personal Geodatabase (*.mdb; ArcGIS 10.2) in QGIS 2.6? Previous versions were right.


Using repeated-measures ANOVA to test Rater disagreement

I am looking to determine if two or more raters have statistically different observations of the same data, which is continuous in nature.  I am thinking a reasonable approach to this problem is to do a paired t-test if there are two raters and a one-way repeated measures ANOVA if there are more than two raters.    I've never seen a t-test or F-test used to look at rater disagreement in this way.  We're also using an ICC and Bland-Altman plotting to explore this agreement/disagreement between raters of continuous data, but would like to be able to say that the raters 'were' or 'were not' statistically different from each other.  Does our approach seem reasonable or do others have suggestions?


Reputation on editing same answer twice?

I got 2 reputation twice, for editing the same answer twice. Is this a feature or a bug?


Will a paper published in an unrelated/other sub-discipline matter for graduate admission?

My question is similar in spirit, though different in context (I think) to the question posted .  My professor and I recently submitted a paper on arXiv (submitting for publication soon) that falls in the domain of quantum physics. Here's the . I really liked enjoying working on the project, and I found it to be a valuable learning experience.   I, however, don't wish to apply to graduate school in physics and specialize in quantum mechanics -- and the study of open quantum systems etc. Ideally, I'd like to join a mathematical physics research group, working of such topics as quantum gravity etc. with a mathematical focus or working on the mathematical aspects of various sub disciplines (quantum mechanics, topological insulators etc.).  I'm aware that being able to demonstrated the ability to do research prior to the graduate level is highly valued at US universities. My question is how will the graduate admissions committee(s) view this (potential) paper? It's already hard to get a spot in various mathematical physics research programs. Will they consider this publication as having no value to them, since the paper doesn't directly coincide with their sub-discipline? Or (if I spin it right), is it possible/expected that they'll view this as an indication of the student's ability to work outside of classroom, work on a project etc.  Edit -- How I intend to spin it. I'd like to use this paper to convince the graduate admissions committee follows: I come from a non-physics background ( major), and I have been studying physics/mathematics (in class, out of class etc.) for the last 2-3 years, and I wish to apply in 1-2 years. I started working on this paper after 1 year of studying physics in class. My first year was quantum mechanics (QM) heavy (three courses). The professor suggested the problem, which mostly used ideas from QM and some basic ideas from quantum information. I worked on the project with him and given my experience of having made the transition, making the first year of transition QM intensive and then working on a QM related problem and producing something with/with the help of a professor (regardless of its impact), I'm thinking of selling it as an indication that I can work outside of class, even when I (had to) make the transition; more importantly, given a problem related to the material I had covered after making the transition, I could produce something.  I know I'm more of "selling it" rather than "linking it with my future research interests." How does this sound in terms of having an impact on the committee and how they'll evaluate me (and my unusual situation).


How can I chat in the terminal on a local LAN?

I've heard that if there are computers interconnected via LAN (as we have in our college labs), I can chat with other friend of mine, who is probably 2-3 rows ahead of me.   I did some Google on this & came to know that all this could be done via terminal, using commands-- wall, talk, write etc . I tried all , but none worked. So can anyone tell me detailed way of doing so. I doubt that I'm missing the "order" in which the steps are to be followed, or may be some packages to be installed? Please give as much details as possible.   Our college labs are currently running Ubuntu 10.04


What is an example of a subgroup $H\le S_3$ that is not normal?

Give an example(s) of a group $G$ and $H\leq G$ (i.e., $H$ is a subgroup of $G$) where $H$ is not normal in $G$.   What about $S_3$ and $\langle(1\;2)\rangle=\{(1),(1\;2)\}$? [Since $(1\;2\;3)(1\;2)(1\;3\;2)=(2\;3)\not\in\langle(1\;2)\rangle$] Does this work? Any other ideas?


How can I enable Q.E.D. mark at the end of proof using "svmono.cls"?

Tomb stone (Q.E.D. mark) is not displayed at the end of a proof when I use "svmono.cls" for my dissertation. How can I enable it?  Here is the code example:  <\documentclass[12pt,sectrefs]{svmono}   \usepackage{makeidx}         \usepackage{graphicx}                               \usepackage{multicol}         \usepackage[bottom]{footmisc} \usepackage{amsmath} \usepackage{lipsum} \makeindex               \begin{document} \frontmatter \mainmatter  \chapter{Chapter Heading} \section{Section Heading} \subsection{Subsection Heading} \begin{theorem} \lipsum[1-2] \end{theorem} \begin{theorem}   nonses\\   nonsesnse\\   nonsesnse\\   nonsesnse\\   nonsesnse\\ %nonsesnse\\ \end{theorem}   \begin{proof}    here is the proof.  \end{proof}   \end{document}


I have repeatedly tried to use a LAN world with my sister. we are both on the same WiFi. whenever i start a lan world minecraft tells me it has been hosted on ***** port. my sister then checks on her computer and cannot see my world.  I know this has been asked before, here and elsewhere but i cant find a good answer anywhere.


How can I copy all pdfs from folders and sub folders?

I need to move all my pdf files from one folder to another folder. How can I do this in terminal?


How can I change iTunes country of region when having some credit in my account?

I moved to Canada and I want to change my country of region from USA to Canada, but when I try to change it ( by click on my account in the iTunes Store and going to my Account Page) it showed me this error: "You have a store credit balance; you must spend your balance before you can change stores"    I must mention I have redeem 100$ to my account but I don't have any intention to spent it now, what is my option?


I really in depth help ( UK tourist Visal refused Twice ),and makes so uneasy

I was denied UK visa based on the followings:   You have stated that you will visit the UK for 6 days. I note that you were refused a visa for this purpose on 23 March,2019. At that time the Entry clearance officer had not been satisfied that you had sufficiently demonstrated your studies in resident country(Asia). You have not addressed this , nor have provided any evidence that you are currently pursuing a course of study there. I note that you have you have temporary residence in the (Country in Asia). The documents you submit do not demonstrate your long term intention on completion of any studies.   Note : I have been to UK on 6 months tourist visa,even Schengen country and Singapore( didnt over stayed nor abuse the visa stipulations ). I applied for 2 years tourist visa,and submitted back documents from my University ,showing am a bona fide full time PhD Student,with  8 months resident visa of my current resident country to show.   You have submitted a bank statement  in your name for the (Bank Name). I note that there are several cash deposit over the reporting period. The source of these fund is not clear and they dont reflect your stated annual income of 12,200GPS.   Note: I provided the name of sponsor(mom) with her payment payments slips,and other back others documents from my local bank to support the source of it.   I consider that you have not shown sufficiently strong family ,social or economics ties outside the UK or reason to return to your home country at the end of the trip.   Note: I secured my first UK tourist visa(6 months) with two landed properties in my city, resubmit additional landed property with stock shares (3 landed properties of mine ) ,and a letter from my parents stating am the sole heir of their  3 residential properties in the heart of my city. I dont have kids nor married


Exercise 3.30 from Rotman's group theory book: applying Cayley's theorem

This is an exercise from Rotman's An Introduction to the Theory of Groups:     Exercise 3.30. Let $G$ be a group of order $2^mk$, where $k$ is odd. Prove that if $G$ contains an element of order $2^m$, then the set of all elements of odd order in $G$ is a (normal) subgroup of $G$. (Hint: Consider $G$ as permutations via Cayley's theorem, and show that it contains an odd permutation.)   My attempt: Let $a\in G$ with $|a|=2^m$. Following the hint, we imbed $G\hookrightarrow S_G$ and identify $G$ with its image. The element $a$ is the product of $k$ disjoint $2^m$-cycles (since $a$ is a regular permutation) and thus $a$ is an odd permutation. Then $G$ has exactly $2^{m-1}k$ odd permutations. Any element in $G$ of odd order is an even permutation. However, the converse is false. I am unable to proceed. I think I must be missing something. Any hints will be appreciated!


Stop the Ubuntu updater from nagging about Firefox English Language pack even after uninstalling Firefox

I have run sudo apt purge firefox, and I have gone through all of the /.config files, etc., and Software Updater is still asking me daily if I want to install the "English Language Pack for Firefox". I don't have Firefox installed. How can I stop the updater from asking to update something on a program that doesn't exist? Output of dpkg -l | grep firefox: ii  firefox-locale-en                          88.0+build2-0ubuntu0.18.04.2        amd64        English language pack for Firefox


Hi there im quite new to Linux  I have problem with my grub  Windows entry show twice in the grub and probably in wrong partition    As you can see there is 2 entry for Windows 7  I can only boot to windows using loader on /dev/sda2  I think loader for windows should be on /dev/sda1, but the loader on it render black screen to me  I think i did something wrong with my windows and endup with this grub..  Is there a way to fix this? (remove duplicate entry and change it to /dev/sda1)  And here is my partition


What's the associated matrix of this linear operator?

Let $V$ be a complex vector space of dimension $n$ with a scalar product, and let $u$ be an unitary vector in $V$. Let $H_u: V \to V$ be defined as  $$H_u(v) = v - 2 \langle v,u \rangle u$$  for all $v \in V$. I need to find the characteristic polynomial of this linear operator, but the only way to find it that I know of is using the associated matrix of the operator.  I don't know how to find this matrix because I don't know how to deal with the scalar product. Is there some other way to find the characteristic polynomial? If not, how can I find the associated matrix of this linear operator?  Thanks in advance.


Why does matter gather as discs around massive objects?

Why do discs, like rings of Saturn and the spiral shape of our galaxy form around massive objects, instead of just a (spherical?) cloud of matter?


Inside the verbatim environment, is it possible to use a different color, please? For example, I want a to be normal, i.e., black. But I want b to be red.  \documentclass[]{article}  \begin{document}  \begin{verbatim} a (black) b (I want this letter to be red) \end{verbatim}  \end{document}   Follow-up Question:  The solution provided by Ignasi was neat. However, there is a problem. If I need to write the entire verbatim in a non-black color, then it will not work.  \documentclass[]{article} \usepackage{fancyvrb} \usepackage{xcolor}  \begin{document}  I want the following to look exactly like the way I put, i.e., like an align. But it displays in one line. How to fix?  \begin{Verbatim}[commandchars=\\\{\}] \textcolor{red}{ a = b + 1   = x + y   = s + t   = c - d   = o * p } \end{Verbatim}  \end{document}


Why is the map content not displayed when I reopen Print Composer?

I just updated from QGIS 1.7 to 2.0 on Mac. When I now open a project and create a map in the print composer the content of the map is lost when I open the project again later. The settings of the stored print are still ok, but the map content is not displayed. Instead it just says "Karte wird hier gedruckt" which means "map to be printed here" in English.   Does anybody have an idea what the problem could be? It always worked fine with 1.7.


Setting running process affinity with taskset fails

I'm attempting to limit a process to a given number of CPU cores. According to the taskset man page and , the following should work:  [fedora@dfarrell-opendaylight-cbench-devel ~]$ taskset -pc 0 <PID> pid 24395's current affinity list: 0-3 pid 24395's new affinity list: 0   To put it simply - this doesn't work. Putting the process under load and watching top, it sits around 350% CPU usage (same as without taskset). It should max out at 100%.  I can properly set affinity via taskset -c 0 <cmd to start process> at process spawn time. Using cpulimit -p <PID> -l 99 also . In both cases, putting the process under the same load results in it maxing out at 100% CPU usage.  What's going wrong here?


Should I convert US dollars to euros while in USA or in Europe?

I will eventually end up with so few US dollars when in San Francisco airport, that I won't have to declare them to customs when I arrive at Greece.  Should I convert them to Euros in SF, or in El. Venizelos airport at Athens? Or it's pretty much the same fees in both cases?


I'm creating a game in Unity3D and I'm using blender as my main modeling software, The problem here is that I don't know how to make a low poly water cube, I've seen that a lot of people makes this using a plane, but I need to make a cube, and I can´t find how to make this in blender render or in Unity without A package from Asset Store. It should look like this:


Currently, I go to  and then click on + to create and open a new Google Sheet. Is there a direct link to create and open a new Google Sheet?


I opened my Frank DeLoupe.app application and it asked for permissions. A window popup that I almost always click allow. This time I clicked deny, and now the color picker is not working.  How can I give this app permission?  I've tried adding the app to the accessibility whitelist (preferences > Security and privacy). That made no difference.   (The problem is that when I open this color picker, it doesn't "see" the screen I am on)


Which negative modifiers should I apply when transforming myself?

I'm running a witcheling, a changeling witch who, because of a GM's homebrew magic ring, can transform into a .  What effects does this pixie transformation have? Specifically...   Since I'm now Small, do I apply +1 to AC, +1 to attack rolls, –1 to CMB and CMD and +4 to Stealth? Am I able to cast spells while transformed? Do I lose my racial benefits while transformed? Am I still able to use weapons such as staff, longsword, or greatsword?


Convert a text file from ansi to UTF-8 in windows batch scripting

We have a text file which is in default ANSI format and that needs to be converted into UTF-8 format. Is there any way we can use the general windows DOS commands to convert the file? We can use the PowerShell but only this command line has to be run from a different batch process.


Why is my jQuery code not working on dynamically created elements?

The code below works if the #client-result-0 id is set to a static element. But when I point it to a dynamically created element, it doesn't work. I am using jQuery 1.7.1.  $j('#client-result-0') .on('click','.myLi',function(){     console.log('haha');     $j('#client-search-0').val($(this).text()); });   Thanks


Can I tap in to a interior wall outlet for outside

I want to tap in into a wall outlet that I don’t use and add a outside outside. I’m using it for a electric grill that requires 110 volt, 60hz, 275w, 5 amp service but I don’t know if I will overload it. What should I do before?


Currently PureOS is installed on my computer. How do I replace it by Ubuntu? I tried with a bootable USB stick. The stick is not seen by the system. I can't even choose how it is being booted.


Another domain name pointing to my server IP?

I was checking out my reverse-DNS entry of my domain the other day which is run from a dedicated server.   I noticed that another person/company had their domain pointing to my server? I have no idea who this company is or why they are pointing their domain at my server IP?  How can I go about stopping this or forcing them to change?


How do you get a ViewResult as a string? For example, when a user makes a webrequest, i can return a page like this:  return View("/helloworld");   But i want to get it as a string and do something with it, for example:  string webpage = View("/helloworld").ToString(); //Get the ViewResult as a string. // {...} do something with the webpage string. return Content(webpage); //Now return it as you normally would   Is it possible?


Find the radius of the inscribed circle of a right triangle. The triangle's height is $\sqrt{6} + \sqrt{2}$ while the bisector of the right angle is 4.  This seemed like a generic similar triangles problem but it isn't that simple when I tried to solve it. Any help?  EDIT: Here is a picture of the problem


I recently installed Ubuntu 20.04 on a new dell laptop. For some reason, ads/notifications keep popping up at the top of my screen saying things like "you need to renew norton" or "click here for toe fungus cream." I have no idea what is causing this, I ran clamAV to see if there was something installed on my computer doing this, to no avail. These popups are not part of any application I know of since they appear even when I have nothing open but my terminal. Does anyone know what could be the cause of this? thank you.


How to recover performance_schema after restoring from partial innobackupex backup?

I am taking a partial backup from a Master server, which needs to be restored on a to-be slave server. I only need one of the databases, and the mysql database.   I am following instructions on   The command I'm using looks like this:  innobackupex --user=<the_user> --password --databases="<database_name> mysql" --slave-info /path/backup   The prepare command looks like this:  innobackupex --apply-log --export /path/backup   And then I      Copy back the prepared backup to a “clean” datadir (in that case, make sure to include the mysql database).   MySQL starts fine, but without a performance_schema and with a lot of      588 [ERROR] Native table 'performance_schema'.'' has the wrong structure    on its error log.   Any idea why this might happen, and how to get the performance_schema back?


I want to get acquainted with forcing, along with a few friends, and I'm looking for a text to introduce the basic notions (pardon the pun :) ).  The point is to study a text (or texts, if they can be reasonably seamed together) together for about one week, several hours a day, each of us (three) preparing a part on his own so as to explain it to the others (and so understand it better himself).  Again, I'm not looking for something necessarily in-depth, just enough to understand the basics at a decent, but not overly exerting pace (after all, it's still summer vacation for us :) ).  It is important to mention that all of us are somewhat familiar with the basics of descriptive set theory and model theory (but not axiomatic set theory per se), so ideally I would like a source that would somehow capitalize on that familiarity.  Any suggestions?


I have forgotten what sites I have used my gmail account to login in to

Is their any way to find out what websites I joined w/google login?


I have a div which I want to align at the bottom of the page. For that I have used the following --

   This code is aligning the div at the bottom but it is not wrapping the words inside the div.


How to get bibtex to work after El Capitan update

After the El Capitan update I had to go through my preferences and change the path files for LaTeX to compile but my references are still not working. Trying to compile gives the following warning:  Process started  This is BibTeX, Version 0.99d (TeX Live 2015) The top-level auxiliary file: Plan.aux I found no \citation commands---while reading file Plan.aux I found no \bibdata command---while reading file Plan.aux I found no \bibstyle command---while reading file Plan.aux (There were 3 error messages)  Process exited with error(s)   Does anyone have any advice for how to deal with this? I am using TexMaker with MacTex. Everything worked perfectly before the upgrade and nothing has changed in the file since the upgrade.  A MWE of a file that does not compile is:  %_________________Preamble Start___________________________________________ \documentclass[a4paper, 12pt, twopage]{scrreprt} %_________________Encoding_________________________________________________ \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} %_________________Referencing__________________________________________  \usepackage[style=authoryear-comp,natbib]{biblatex} \addbibresource{References.bib}  %this means you dont have to stipulate if you are referencing a figure etc \usepackage{cleveref} %_________________graphics_____________________________________________ \usepackage{graphicx} \begin{document}  \citep{fulton2014integrated}  \printbibliography   \end{document}   And the bib file is References.bib with one reference:  @article{fulton2014integrated,   title={An integrated approach is needed for Ecosystem Based Fisheries Management: insights from ecosystem-level management strategy evaluation},   author={Fulton, Elizabeth A and Smith, Anthony DM and Smith, David C and Johnson, Penelope},   journal={PloS one},   volume={9},   number={1},   year={2014},   publisher={Public Library of Science} }   And Here are my preferences:    Just to summarise my discussion with moewe I needed to change the Bib(la)tex field to "/Library/TeX/texbin/biber" % (i.e. remove the aux and change to biber rather than bibtex).


How do i unlock mii outfit B on mario kart wii?

I really want to find out, please answer! I have mii outfit a, too. But i want to earn mii outfit b. By the way, is mii outfit C real or fake or perhaps a mistake in the game?


Is there a way to export the style, along with a shapefile, to a kml in QGIS?

I see there were plugins in the past that may have done this such as qgis2kml and qgis2google, but they no longer exist.


Where can I get a Stack Overflow-like site to use as my company's knowledge base?


Is there a way to tell if an enum has exactly one, multiple or no flags set?

I have an enum defined like that:  [Flags] public enum Orientation {     North = 1,     North_East = 2,     East = 4,     South_East = 8,     South = 16,     South_West = 32,     West = 64,     North_West = 128 }   Is there a generic way to tell if exactly one flag is set, multiple or none? I don't care for what the value of the enum is, I just want to know how many flags are set.  This is not a duplicate for counting the number of bits. If I initialize the enum like this and count the number of bits I get 10. But the number of set flags would be 8.  GeographicOrientation go = (GeographicOrientation) 1023;


Given $a,b,c,d\ge 0$ and $a^2+b^2+c^2+d^2=4$ show the following holds : $$\displaystyle\frac{a}{b+3}+\frac{b}{c+3}+\frac{c}{d+3}+\frac{d}{a+3}\le 1$$ Now I tried to fully expand but that becomes too ugly. I want a non-expand proof of this fact. For some motivation I solved a three variable version which I assumed to be true and it came out to be true! That one is : $a,b,c\ge 0$ and $a^2+b^2+c^2=3$ show that : $\displaystyle \frac{a}{b+2}+\frac{b}{c+2}+\frac{c}{a+2}\le 1$. The second one is easier and I DO NOT NEED a solution of the second one. Please help me out on the first one because it is similar but not solvable by a similar method.


How/Can I write a for each loop with a Hashmap in java?

I need to iterate each value of a HashMap in my method but it gives me a syntax error at the for each loop      Library.java:12: error: for-each not applicable to expression type         for(String book : library){                           ^   required: array or java.lang.Iterable   found:    HashMap   This is the relevant code   public void getFinishedBooks(HashMap<String, Boolean> library) {   if(library.size()<1)    {     System.out.println("Library is empty!");   }   else    {     for(String book : library)     {       if(library.get(book) ==true)       {         System.out.println(book);       }     }   } }


So I tried to install virtual box on my 18.04. It told me to reinstall virtualbox dkms. After looking around the forums I determined I needed to run sudo apt-get --reinstall virtualbox-dkms. When I do, Ubuntu says dpkg was interrupted. you must manually run sudo dpkg --configure -a to correct the problem. I do this and it just hangs forever. Am I missing something I need to fix this?  Edit: The line it gets stuck on is:  building initial module for 4.15.0-23 generic


Does Darth Vader still have an implanted explosive from when he was a slave?

In Episode I: The Phantom Menace, young Anakin Skywalker and his mother explain how the Tatooine slave owners prevent the slaves from escaping:  SHMI: All slaves have a transmitter placed inside their bodies somewhere. ANAKIN: I've been working on a scanner to try and locate mine. Any attempt to escape, and they blow you up!  Anakin is eventually freed by Qui-Gon - and Watto respects the terms of the bet because he's afraid of potential retribution from the Hutts if he didn't. But there's no scene that shows or explains what happens to Anakin's implant. Does the adult Darth Vader still have an explosive implanted somewhere in his body? If so, and the Rebellion happened to discover the exact frequency or signal needed to detonate the explosive, could they remotely assassinate Darth Vader?


Linux network stops when transferring files

Running Debian, when transferring files from the server to my pc, the transfer is suddenly interrupted. Some smaller files (couple of MB) seem to work most of the time, but bigger files mostly fail at random points. After the transfer fails, the entire TCP/IP stack seems to be out on the server, even ping doesn't work anymore (every host is unreachable).   I tried the follwing: - Connecting my PC directly to the server, ruling out errors with switches etc in between. - Trying different client pc's, ruling out a problem with the client pc - Trying different files from different hard drives on the server, ruling out hard disk issues - Trying different protocols (ftp, scp, smb), ruling out a problem with a specific protocol or server  The problem appeared in any of the above configurations. So I'm leaning towards either a software issue are a hardware issue with the NIC. However, syslog and dmesg doesn't indicate any problems. Ethtool results also seem normal...  I'm really out of ideas on what's broken and how to proceed...


I was wondering how we could think about the following variant of the classic Monty hall theorem,  Suppose now that the host actually does not remember what is behind any of the doors, once you choose one of the three doors, he will open at random one of the other two doors. If he reveals the prize the show ends, if he does not reveal the prize, should you still switch doors?  I was trying to formulate it but I am just not sure if I am making correct assumptions.  For example,  say we choose door $A$, then the probability that he opens door $B$ is equal to the probability he chooses door $C$ is equal to $0.5$.  The probability that the prize is behind door A, B and C is 1/3  the probability that Monty ends up opening any given door is also $1/3$  So should one just condition on something else now?  Looking forward to hearing any opinions on this,  Thanks


Looked and looked, can't find the answer anywhere (maybe I'm blind):  How long does Alchemist's Fire burn for?  In the item description within , it says:     On a hit, the target takes 1d4 fire damage at the start of each of its turns. A creature can end this damage by using its action to make a DC 10 Dexterity check to extinguish the flames.   Yet no mention of the burn rate.  One round after a hit?  2?  A minute?  Continuous until extinguished?


At first I tried running Firefox normally on Ubuntu 14.04 after a power cut that occurred while the computer was on suspend mode, and Firefox didn't start. I followed  by renaming Firefox, but still no result. I tried updating, removing, re installing and nothing works. The error from running it from the terminal is as follows:  (process:12919): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed (firefox:12919): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::sm-connect after class was initialised (firefox:12919): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::show-crash-dialog after class was initialised (firefox:12919): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::display after class was initialised (firefox:12919): GLib-GObject-WARNING **: Attempt to add property GnomeProgram::default-icon after class was initialised Could not create gnome accelerators directory `/home/nautilus/.gnome2/accels': Permission denied


Unable to access BIOS from Sony Vaio SVE series laptop

I had Ubuntu and Windows 7 dual boot in my Sony Vaio SVE15115ENW. I thought of factory resetting my laptop and started the VAIO recovery system. During the resetting process, it did format the disk and some other copying of files and the system had to reboot for completing the recovery.  During the reboot, it got stuck in grub rescue mode as boot loader has not changed. Also, I can't choose any Linux partition as all the disk were formatted. To add salt to the wound, I am not able to enter the BIOS as well. This model has ASSIST button and whenever I try to turn on the laptop using ASSIST button instead of the power button, it gets stuck in a black screen instead of the Vaio Care Rescue Mode.   I guess as the recovery was not completed properly, the Vaio Care Rescue Mode is not available. And because of that, I am unable to enter the BIOS to change the boot device.   1. Is there any way to continue my recovery bypassing grub rescue?   2. How can I access my BIOS now?


Find four groups of order 20 not isomorphic to each other.

Find four groups of order 20 not isomorphic to each other and prove why they aren't isomorphic.   So far I thought of $\mathbb Z_{20}$, $\mathbb Z_2 \oplus\mathbb Z_{10}$, and $D_{10}$ (dihedral group), but I can't find another one. Would $U(50)$ work? I know it has order 20 and is cyclic but I'm not exactly sure how to move from there. Can someone to point me on the right direction?


What's the difference between CSS id selector and CSS class selector?

For example, I can get the same results by the following two ways.
red color

greencolor
      They both can give me a colored text. But where is the difference between them? Thanks for your answer.


How are recent tags on homepage queried?

Hi, I'd like to know what algorithm is used to display recent tags on homepage? How many recent questions tags is taken under consideration when displaying that tag cloud? Any details?


Is there a way to straighten all the edges of the selected area of a UV map automatically? This means aligning every edge (set of consecutive vertices selectable by AltRMB). Currently I have to do this manually, as illustrated below, by selecting an edge (AltRMB over the edge), hitting S to scale, and X or Y to constrain it to the X or Y axis and then 0 to set the scale to zero, averaging the distance between all points on that axis.    This is the final result that I'm trying to achieve:    As illustrated above, this is extremely slow to do manually. I have tried Follow Active Quads, but in most cases that doesn't result in a straight grid where all the vertices are lined up along the X and Y axes. Is there an automatic way to straighten the edges of a UV map by lining them up along the X and Y axes?


When Americans say someone has ''no accent'', what do they mean exactly?

As in my title question. Do they mean a specific region of the US, something else?


I have been trying to update this computer for months. Every time it states:     System update KB2791765 failed. Windows_Update Code 8024200D.   Please help me to get this update taken care of. It tells me that there is an updated needed every day for months.


How to pass a folder as argument to the executing script?

I would like to execute a script(h.ksh) with the passing argument kim (which is a folder),  so when I run the command   h.ksh kim   the folder "kim" will be used as a variable in the h.ksh  Do I need to use the option function?


Time Machine says disk is full, but it was fine before!

I have a 4TB external Time Machine disk. There are three internal volumes totaling 3.3TB that have been actively backed up to that external drive for a few weeks.   I was troubleshooting something and moving a bunch of files around, so I briefly turned off Time Machine. When I turned it back on, it started backing up... but then it stopped later, saying "there is only 707MB available on the drive, but 3.3GB is required."   It's almost as if it refuses to overwrite the old backups. It wants to start an entirely new backup or something. How can I make it pick up where it left off without having to delete that entire backup and start anew? I don't like deleting backups!


When I want to watch a question the content disappear.          App Version: 1.0.85 Device Manufacturer: samsung Device Model: SM-G920F OS Version: 6.0.1 (G920FXXU3DPCM)


Is there a better alternative than this to 'switch on type'?

Seeing as C# can't switch on a Type (which I gather wasn't added as a special case because is relationships mean that more than one distinct case might apply), is there a better way to simulate switching on type other than this?  void Foo(object o) {     if (o is A)     {         ((A)o).Hop();     }     else if (o is B)     {         ((B)o).Skip();     }     else     {         throw new ArgumentException("Unexpected type: " + o.GetType());     } }


Edit rejected by users without knowledge on linked tag?

I haven't had an edit rejected before. Today i made a change to fix an  on which people were commenting that it did not work for them. I tried out the answer, it was indeed broken, then fixed the answer, and it works.  In  I made a code change, to fix an answer.  What's stange is that the change was rejected by users who seem to have little experience with python or pip which is what the edit is about. I hope i'm not going too far with this, but is it really the case that questions are being Accepted and Rejected based on other's Rejects, or at random?


I don't understand what  is saying:      We use come to describe movement between the speaker and listener, and movement from another place to the place where the speaker or listener is. We usually use go to talk about movement from where the speaker or listener is to another place.      When we talk about another person (someone who is neither the speaker nor the listener), we can use either come or go, depending on whether the speaker sees things from the receiver’s viewpoint (come) or the doer’s viewpoint (go).      [doer]Yolanda came to [receiver]her mother for help.      We use come when we see things from the receiver’s viewpoint (in this   case the mother).      [doer]Melissa went to [receiver]her mother for help.      We use go when we see things from the doer’s viewpoint (in this case Melissa).   Could you explain it clearly?


I was recently suspended from this website for a seven day period. During this time I continued to log onto the site each day and earned the Enthusiast Badge for logging on for 30 consecutive days.  Is this a bug or can you earn badges whilst suspended?


90s or earlier TV series, man and woman with a time machine, liquid crystal

I'd like to know what this TV series was, if anyone recognises it.  I remember watching it when I was quite small, so it was on in the 1990s, in England.  Of course, that doesn't prove that it was made in the 1990s in England.  There was a man and a woman and they had a time machine.    I remember one episode where the "liquid crystal" in the time machine failed and the man said, "Well, that's the end of that".  The woman said, "Can't we get a new liquid crystal?" and he said, "Not unless you know where we can get twenty thousand pounds".  (I think he said pounds, not dollars, but I could be wrong.)  So then they go off to win the lottery (presumably the liquid crystal still had at least one more trip left in it), but naturally things don't go according to plan.  There were (what seemed to me at the time) amazing graphics when they travelled through time, of them hurtling along a tunnel with scenes from different times hurtling past.


I know that you can insert multiple rows at once, is there a way to update multiple rows at once (as in, in one query) in MySQL?  Edit: For example I have the following  Name   id  Col1  Col2 Row1   1    6     1 Row2   2    2     3 Row3   3    9     5 Row4   4    16    8   I want to combine all the following Updates into one query  UPDATE table SET Col1 = 1 WHERE id = 1; UPDATE table SET Col1 = 2 WHERE id = 2; UPDATE table SET Col2 = 3 WHERE id = 3; UPDATE table SET Col1 = 10 WHERE id = 4; UPDATE table SET Col2 = 12 WHERE id = 4;


I have the following problem when I want use minimum  among some numbers.   $\min_{1}$ works well but   $$\min_{1} $$ or    \begin{eqnarray*} \min_{1}  \end{eqnarray*}   are looking very odd.


Latex references and bibliography not working

I need to deliver a report using Latex. Since the beginning I have had a lot of difficulties with it, that thankfully were resolved when I started using the Texmaker tool. Unfortunately the references still do not work and I have already wasted too many hours trying to figure it out.  I have a file where I define all my references which is called refbase.bib . As an example, this is one of my entries in it:   @Article{belkin:1990,  title                    = {The cognitive viewpoint in information science},  author                   = {Nicholas J. Belkin},  journal                  = JIS,  year                     = {1990},  pages                    = {11--15},  volume                   = {16} }   For me to call these references to my the reference section of my report, I have the file references.tex and have just the following command:  \bibliography{./refbase}   My sources told me that this should call the bibliography list and make my reference page, however nothing is happening. The file is completely ignored.  Also, whenever I call a citation during the report, I will get this in it's place "(??)". The way I make the citation is as follows (also according to what the source websites tell me to do:  bla blabla blabla bla \cite{belkin:1990}.   Anyone have a clue as to what is going on and how to fix it?  Thank you very much.


The tail distribution of a binomial distribution can be expressed in terms of an appropriate beta distribution function - Explanation

I was reading the paper: "Estimating Probabilities of Default for Low Default Portfolios" by Katja Pluto and Dirk Tasche and they mention the following:  The tail distribution of a binomial distribution can be expressed in terms of an appropriate beta distribution function.  I have not so much knowledge of statistics, is it possible someone could explain to me why is this the case? Thank you very much!


Why does Dr. McCoy have difficulty with Vulcan biology?

I've been watching The Original Series and on any occasion when Mr Spock has some health issues McCoy seems either baffled or unable to help him without taking risks or being completely unable to predict Spock's reactions to whatever treatment he can provide.  I wonder why the Enterprise  would have a chief medical officer who doesn't understand the biology of a member of the crew. Shouldn't all doctors aboard be perfectly capable of treating all of their patients regardless of their biology?  Is that mentioned at any point in the series later? Is this common with other medical officers in other series?


Series Convergence / Divergence: $\sum \frac{3^{1/\sqrt{n}}-1}{n}$

Does the following series converge or diverge:  $$\sum_{n=1}^\infty \frac{3^{1/\sqrt{n}}-1}{n}$$  Many thanks!


.exe files being opened in Microsoft Word instead of launched

All .exe files on my computer are suddenly linked with Microsoft Word.  When I open an .exe file, Word launches and opens it instead of it being launched.  How do I restore the proper association for .exe files?


What job should I have or What job I should have?

I want to ask myself what kind of job I'm gonna do. I want to know which one should be ok:   What job should I have? What job I should have?   Thanks,


How can I download a .deb file in USB device and from that USB device install that package to other devices??


Ideas for outputting a prediction equation for Random Forests

I've read through the following posts that answered the question I was going to ask:      Here's what I've done so far: I compared Logistic Regression to Random Forests and RF outperformed Logistic. Now the medical researchers I work with want to turn my RF results into a medical diagnostic tool. For example:  If you are an Asian Male between 25 and 35, have Vitamin D below xx and Blood Pressure above xx, you have a 76% chance of developing disease xxx.   However, RF doesn't lend itself to simple mathematical equations (see above links). So here's my question: what ideas do you all have for using RF to develop a diagnostic tool (without having to export hundreds of trees).   Here's a few of my ideas:   Use RF for variable selection, then use Logistic (using all possible interactions) to make the diagnostic equation. Somehow aggregate the RF forest into one "mega-tree," that somehow averages the node splits across trees.  Similar to #2 and #1, use RF to select variables (say m variables total), then build hundreds of classification trees, all of which uses every m variable, then pick the best single tree.    Any other ideas? Also, doing #1 is easy, but any ideas on how to implement #2 and #3?


It seems like sed is not replacing the string on my code. What I intend for it to do is to change the property called "notification.enable" from false to true from server2 to activate, and, true to false in server1 to deactivate. It works when I do it individually using below but when doesn't when being called from a function. sed -i 's/notification.enable=false/notification.enable=true/g' /usr/config/activate.properties function prompt_activate_server2_config { activate="notification.enable=true" deactivate="notification.enable=false" dir=/usr/config filename=$dir/activate.properties output=$(grep "notification" $filename) if [ -e $filename ];             then sed -i 's/$deactivate/$activate/g' "$filename" echo "Activated in Server 2" echo $output;date fi         }  function prompt_deactivate_server1_config {     activate="notification.enable=true"     deactivate="notification.enable=false"     dir=/usr/config     filename=$dir/activate.properties     output=$(grep "notification" $filename)     if [ -e $filename ];                 then     sed -i 's/$activate/$deactivate/g' "$filename"     echo "Deactivated in Server 1"     echo $output;date     fi             }  I'm using function because I need to remotely execute the scripts from another server So I call them using below. All the 'execute' stuff is on the above function. What am I missing?  if [ "$selection" == 'Activate Config' ]; then  #Activate server1/deactivate server2# ssh user@server2 "$(typeset -f prompt_activate_server2_config); prompt_activate_server2_config" sleep 2 ssh user@server1 "$(typeset -f prompt_deactivate_server1_config); prompt_deactivate_server1_config"       fi


I know that there exist some attack when using same modulus.      But with a little modification, $m$ is the plain-text $N$ is the RSA modulus $r_1, r_2$ is the random padding $e, s$ is the public exponent $C_e, C_s$ is the cipher-text  encrypt as follow $$С_e = (m + r_1)^e   \bmod N$$ $$С_s = (m + r_2)^s   \bmod N$$  If attacker only knows $C_e, C_s, r_1, r_2, e, s, N$. Is it possible to know $m$?  It seems the  does not work?


Modify commit message of past commit in git

All I need to do is modify the commit message of some past commits in my branch locally, then push those modifications up to the server. I don't need to actually change any files in the past commits, and the past commits are not the most recent, they're from 2-3 commits ago.  Most answers I've seen deal with either modifying the files of past commits, or else just modifying the most recent commit message. Neither is quite what I'm looking for.  I'm hoping this is a quick and easy one for all you git experts :-)


A group $G$ of order $pq$ (for $p < q$), $p$ and $q$ are prime numbers. Prove: $G$ cannot have two different subgroups of order $q$.   I know that the proof is obvious using Sylow theorem. But I haven't learned it and this question is in the exercise before Sylow theorem. Can anyone give me a solution without using Sylow theorem?


$ P = \frac {V^2}{R} $ derivation confusion

I have always had a confusion of why we use $ P = V I $ or $ P = I^2 R $ and not $ P = \frac {V^2}{R} $  for relating to power loss due to heat in high tension lines. I know there are a lot of questions here but it still doesnt seem clear. I realize that the supply voltage and voltage drop are different things. But then, how did the equation come up in the first place? Lets say Supply voltage is $ V_s$ and the voltage drop is a $ V_d $  So this would give, $ P = V_s I $ (Joule's Law) and $ V_d = I R$ (Ohm's Law)  Wikipedia says we get $P = \frac {V^2}{R} $ by combining these both. How can you do that when $ V_s$ and $ V_d $ are two different parameters? Can we just combine them both in this case too- the high voltage power lines case? I we do, what is the $ V $ that is to be used to calculate the power loss using the $P = \frac {V^2}{R} $ formula?  Could anyone explain with hypothetical values?


How do I check if my nexus 7 is from 2012 or 2013?

I just received one as a gift and want to know if it is 2012 or 2013. How do I check?


Q: How to open a web site automatically when inserting a USB.  I currently have 2 files on it:  autorun.inf start.url   autorun.inf contains 3 lines:  [autorun]   ShellExecute=start.url open=start.url   start.url contains 2 lines:  [InternetShortcut] URL=http://cnn.com   Loads ok on a Vista machine, but does not load on other XP or Windows7 machines.  Any clue what to change?


I ALWAYS WANTED mods but i don't have the mine craft folder i don't know why and how so please help                                                                                for mine craft 1.7.4


The mean and variance of the inverse of a normal distribution

I would want to ask if I have a random variable $A \sim N(b,c)$ then what is the distribution of the inverse of $A$?


Logistic regression in R returning NA values

First off, I'll say I am a biologist and new to the statistics side of things so excuse my ignorance  I have a data set that consists of a binary outcome and then a bunch of trinary explanatory variables that looks something like this:  head()  Category block21_hap1 block21_hap2 block21_hap3 block21_check 1        1            1            1            0             2 2        1            2            0            0             2 3        1            1            0            1             2 4        1            1            0            1             2 5        1            1            1            0             2 6        1            1            1            0             2   A quick summary of the data  summary() Category block21_hap1 block21_hap2 block21_hap3 block21_check  1:718    0:293        0:777        0:1026       2:1467         0:749    1:709        1:577        1: 390                               2:465        2:113        2:  51     and another summary grouped by outcome levels  by(hap.ped.final, hap.ped.final$Category, summary) hap.ped.final$Category: 1  block21_hap1 block21_hap2 block21_hap3 block21_check  0:146        0:374        0:518        2:718          1:336        1:286        1:174                       2:236        2: 58        2: 26                      ----------------------------------------------------------------------------  hap.ped.final$Category: 0  block21_hap1 block21_hap2 block21_hap3 block21_check  0:147        0:403        0:508        2:749          1:373        1:291        1:216                       2:229        2: 55        2: 25             So I am trying to run logistic regression on this data. When I do this:  fit = glm(Category~ block21_hap1 + block21_hap2 + block21_hap3, data = hap.ped.final ,family = "binomial") summary(fit)  Deviance Residuals:     Min      1Q  Median      3Q     Max   -1.301  -1.177   1.059   1.177   1.200    Coefficients: (1 not defined because of singularities)                              Estimate Std. Error z value Pr(>|z|) (Intercept)                 -0.039221   0.280110  -0.140    0.889 hap.ped.final$block21_hap11  0.123555   0.183087   0.675    0.500 hap.ped.final$block21_hap12  0.009111   0.295069   0.031    0.975 hap.ped.final$block21_hap21 -0.084334   0.183087  -0.461    0.645 hap.ped.final$block21_hap22 -0.013889   0.337468  -0.041    0.967 hap.ped.final$block21_hap31  0.201113   0.183087   1.098    0.272 hap.ped.final$block21_hap32        NA         NA      NA       NA  (Dispersion parameter for binomial family taken to be 1)      Null deviance: 2033  on 1466  degrees of freedom Residual deviance: 2028  on 1461  degrees of freedom AIC: 2040  Number of Fisher Scoring iterations: 3   So I don't really know what a singularity is or what's going wrong here that is throwing up NA's as a result of my analysis. Is it my data, or what I'm doing to it. I tried googling the warning (or whatever you might call it) and I got some pages talking about collinearity and multilinearity, which I do not understand at all.  Again, sorry for lack of knowledge here. I wish I had done more maths in undergrad.


Short story about an artifical intelligence that is implied to actually become God

I heard this short story read to me many years back. I don't remember many details, but I was hoping I could maybe find it again. The details I do remember:  There are people (I don't remember if they're described as human or not) that create an artificial super-intelligence. This new AI actually brings on a sort of technological singularity and continues to regularly improve and upgrade itself. Eventually, the entirety of the species that created it is gone (I do not remember if this was by the AI's doing or the result of the natural progression of time and/or technology). Long after the extinction of its creators, the AI not only still lives but has improved and upgraded itself to the point that it now exists in a sort of metaphysical state. The story ends with the AI saying the line "Let there be light," implying that the AI has actually become "God."  Like I said, it was a long long time ago, and I didn't even actually read it myself, so these details are very fuzzy and I might be remembering some of them incorrectly. The last detail is the one I remember clearly and I would say is most important.


I have two arrays by array_merge() that look like this:   Array(             [1] => Array(                   [date] => 2018-09-25                   [size_one] => 'XL'                   [name_one] => 'Shoes'                 )             [2] => Array(                     [date] => 2018-09-25                     [size_two] => 'L'                     [name_two] => 'Shirt'                 )             [3] => Array(                     [date] => 2018-09-26                     [size_two] => 'L'                     [name_two] => 'Shirt'                 )             )   If same date value, I need as a result something like the following:  Array(                 [1] => Array(                       [date] => 2018-09-25                       [size_one] => 'XL'                       [name_one] => 'Shoes'                       [size_two] => 'L'                       [name_two] => 'Shirt'                     )                 [2] => Array(                         [date] => 2018-09-26                         [size_two] => 'L'                         [name_two] => 'Shirt'                     )                 )   want to be able to put these into an array for laravel,  Can someone show me the proper way to merge these arrays?


Using python3 and connected to sqlite3 I want to display tables that are in my database, "." in ".tables" keeps giving error and "\" is not helpful

import sqlite3 connection = sqlite3.connect("vsearchlogDB.db") print("Opened database successfully")   cursor = connection.cursor() _SQL = """.tables""" cursor.execute(_SQL) print(cursor.fetchall())  Output >>>python3 dbconnect.py  Opened database successfully Traceback (most recent call last): File "/home/amrit/Documents/webapp/dbconnect.py", line 6, in <module> cursor.execute(_SQL) sqlite3.OperationalError: near ".": syntax error


For writing my master thesis I have an image in landscape that needs to be oriented correctly when it is eventually printed in a book.  If the page with the image is on the left side (even page number) the image needs to be rotated 90 degrees, if it is on the right side (odd page number) it needs to be rotated -90 degrees. In both cases the bottom of the image needs to be near the spine of the book.  Is there any way to do this automatically without me having to check each time if the image is oriented correctly? I'm using the report documentclass, if that helps.


I am continuously facing a problem where the icons in sidebar start to get distorted. When I restart my computer - this seems to go away. But it has a tendency to return if I log out and into my user.   Below is a screenshot:     Here are my specs:     *-display                         description: VGA compatible controller           product: GT216M [GeForce GT 330M]           vendor: NVIDIA Corporation           physical id: 0           bus info: pci@0000:01:00.0           version: a2           width: 64 bits           clock: 33MHz           capabilities: pm msi pciexpress vga_controller bus_master cap_list rom           configuration: driver=nouveau latency=0           resources: irq:32 memory:d2000000-d2ffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff    ioport:2000(size=128) memory:d3000000-d307ffff   *-display            description: VGA compatible controller           product: Core Processor Integrated Graphics Controller           vendor: Intel Corporation           physical id: 2           bus info: pci@0000:00:02.0           version: 12           width: 64 bits           clock: 33MHz           capabilities: msi pm vga_controller bus_master cap_list           configuration: driver=i915 latency=0           resources: irq:31 memory:d3400000-d37fffff memory:b0000000-bfffffff ioport:3130(size=8)   What would be the most effective way to remedy this issue?


and  both appear to be based around  and its syntax. Is there a difference? What makes one better than the other?


Why is the front brake always on the left?

You often signal on a bike like you signal a car, with your left hand. This lets most people keep their good hand on the handle for steering. Some of my friends, though, signal with their right hand so they can quickly pull the front brake if they need to. Why aren't bikes made with the front brake on the right side, so you get both good steering and emergency braking?


displaying number of search results on google results page

How can I make google display the number of search results from my website on google search results page.  The highlight yellow shows the number of search results. How can I make it happen for my website as-well?


Combine multiple results in a subquery into a single comma-separated value

I've got two tables:  TableA ------ ID, Name  TableB ------ ID, SomeColumn, TableA_ID (FK for TableA)   The relationship is one row of TableA - many of TableB.  Now, I want to see a result like this:  ID     Name      SomeColumn  1.     ABC       X, Y, Z (these are three different rows) 2.     MNO       R, S   This won't work (multiple results in a subquery):  SELECT ID,        Name,         (SELECT SomeColumn FROM TableB WHERE F_ID=TableA.ID) FROM TableA   This is a trivial problem if I do the processing on the client side. But this will mean I will have to run X queries on every page, where X is the number of results of TableA.   Note that I can't simply do a GROUP BY or something similar, as it will return multiple results for rows of TableA.   I'm not sure if a UDF, utilizing COALESCE or something similar might work?


Scikit Learn's  mentions the use of nested cross-validation:     >>> clf = GridSearchCV(estimator=svc, param_grid=dict(gamma=gammas),   ...                    n_jobs=-1)   >>> cross_validation.cross_val_score(clf, X_digits, y_digits)       Two cross-validation loops are performed in parallel: one by the GridSearchCV estimator to set gamma and the other one by cross_val_score to measure the prediction performance of the estimator. The resulting scores are unbiased estimates of the prediction score on new data.   From what I understand, clf.fit will use cross-validation natively to determine the best gamma. In that case, why would we need to use nested cv as given above? The note mentions that nested cv produces "unbiased estimates" of the prediction score. Isn't that also the case with clf.fit?  Also, I was unable to get the clf best estimates from the cross_validation.cross_val_score(clf, X_digits, y_digits) procedure. Could you please advise how that can be done?


Getting currentfeature's color in Expression Builder of QGIS?

In QGIS Expression builder. I want to obtain the color code of the current feature.   I mean:  My layer contains lines, each one is painted with a different color. Now I want to assign that color to its label. In label definition, in the color property's expressions builder, how could I obtain that attribute?  I tried:  attribute( $currentfeature, 'color')  But it is not working...


Today Achievements only showing in Stack Exchange Android app

In the Stack Exchange Android app, Achievements section I can see only Today's achievements. No Yesterday, Last 7 days, Last 30 days, ... details.  Previously in the 1.0.85 version itself I saw all the achievements.   I  refreshed the page many time, but still seeing Today's achievement only.  Screenshot for reference:     App Version: 1.0.85 Device Manufacturer: Motorola Device Model: XT1033 OS Version: 5.1 (2)


System Monitor Says 4 CPUs but Specs say 2 CPUs

I am running Linux Mint 17 on my Laptop. Through the System Info GUI program, I found that the processor is Inter Core i3-2328M. When checking the System Monitor GUI program, it shows four CPUs numbered from 1 to 4. The  say there are only two cores. What is the reason for the mismatch between the specs and the System Monitor?


I'm trying to implement optional parameters in a stored procedure that I have but I am running into a problem. Here's a simplified query to illustrate the issue:  SET ANSI_NULLS OFF  DECLARE @MiddleName VARCHAR(20); SET @MiddleName = NULL;  SELECT * FROM [Customer] WHERE [LastName] = 'Torres' AND [MiddleName] = COALESCE(@MiddleName, [MiddleName])   When I run this query I need to get one row back because one Torres has NULL in the [MiddleName] column. But the query returns zero rows. Using IFNULL() produces the same result. From researching COALESCE, I was under the impression that NULL would be returned if all expressions are NULL. As I am not a SQL expert I assume that I am missing something, but what is it.....  Thanks in advance for any help.