This is my code     package com.saverx.rushabh.saverx;  import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.os.Bundle; import android.support.design.widget.TabLayout; import android.view.ViewGroup;   public class MainActivity extends AppCompatActivity {       View view;     private static final String ARG_SECTION_NUMBER = "section_number";     ViewPager viewPager;     //TabLayout tabLayout;     TabLayout tabLayout;     LayoutInflater inflater;     ViewGroup container;     @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);          this.container=container;          this.inflater=inflater;         this.view= inflater.inflate(R.layout.activity_main, container, false);         viewPager=(ViewPager)view.findViewById(R.id.viewPager);         viewPager.setAdapter(new sliderAapter(getSupportFragmentManager()));         tabLayout=(TabLayout)view.findViewById(R.id.sliding_tab);         tabLayout.post(new Runnable() {             @Override             public void run() {                 tabLayout.setupWithViewPager(viewPager);             }         });                 //return view;     }      private class sliderAapter extends FragmentPagerAdapter {           public sliderAapter(FragmentManager supportFragmentManager) {             super(supportFragmentManager);         }          @Override         public Fragment getItem(int position) {             Log.e("adapter", ""+position);             //  return new CalendarFragment();             NewLeadsFragment obj= new NewLeadsFragment();           /*  Bundle bundle=new Bundle();             bundle.putInt("position",position);             obj.setArguments(bundle);             return obj;*/           return obj;          }          @Override         public int getCount() {             return 3;// 3 tabs         }           @Override         public CharSequence getPageTitle(int position) {             switch (position) {                 case 0:                     return "Leads";                 case 1:                     return "Meetings";                 case 2:                     return "Service";             }             return null;         }      }    }   Exception is     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean)' on a null object reference                                                        at com.saverx.rushabh.saverx.MainActivity.onCreate(MainActivity.java:33)   This code is working perfectly fine when I am using fragment instad of activity  I am using tablayout so that i can drag through signup and sign in using tablayout.  The runtime error is :  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.saverx.rushabh.saverx/com.saverx.rushabh.saverx.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean)' on a null object reference  I summarise that the error may be due to I havent inserted this.view=view but it is throwing same exception

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I need to know whether 'pivot' in SQL Server can be used for converting rows to columns if there is no aggregate function to be used. I saw lot of examples with aggregate function only. My columns are string data type and I need to convert this row data to column data. This is why I wrote this question. I just did it with case. Can anyone help me......Thanks in advance.  Sample format  empid    wagecode    amount   1      basic       1000   1      TA           500   1      DA           500   2      Basic       1500   2      TA           750   2      DA           750   Desired output:  empid   basic    TA    DA   1     1000     500   500   2     1500     750   750

My table is like this:  Sitecode    Month  Amount --------    -----  ------ XX          Jan     1000 XX          Jan     3000 XX          Apr     3000 XX          Apr     1000   What I want is, to show the result something like this:  Sitecode    MonthJAN   MonthAPR --------    --------   -------- XX          4000       4000


According to  about alien aggression, alien aggression can be lowered by:       they also become less hostile if an alien nest actually exists within   the borders of your city, eventually becoming friendly.   But that leaves me wondering if the aliens become friendly for that nest or city, or do the aliens become friendly globally.  Is alien aggression tracked globally in Beyond Earth?

From careful experimentation (i.e. randomly shooting bugs) I've discovered that the aliens become hostile if you attack them. However, I can't quite tell if this is per-unit (i.e. that unit becomes hostile), per-nest (all units from the nest) or global (all aliens) become hostile. They certainly don't all attack at once the same as if I declared war on another civilization. I've also seen them attack first if I stray too near their nest.  I also noticed an upgrade (can't find it now) that claims to cause their hostility to go back to normal twice as fast, which suggests they have some internal aggression counter that gets increased when I attack and decreases naturally at some rate?  So, does anyone have a good summary of how alien hostility works and what I should watch out for?


So it's a different take on proving there are infinite primes  Given a sequence where any two terms in the sequence are pairwise coprime with each other, how can you prove there are an infinite number of primes combined with the fundamental theorem of arithmetic?  Obviously it follows that if any two of the terms are coprime then their gcd is 1 but I don't see how I can combine this with the fundamental theorem of arithmetic.   Cheers for any help guys

Everyone knows that there is an infinitude of primes. I know the Euclide, the Euler and the Erdos proofs. But are they the only known proofs ? I will try, here, to present a fourth one : Let the Fermat numbers $F_n=2^{2^n}+1$. They are not all primes, $F_5$ for example is not, Euler has proved it ! There are two possibilities, of course : if there is an infinitude of prime Fermat numbers, the primes are infinite. If there is an infinitude of compound Fermat numbers, the Goldbach theorem states that $\gcd(F_n,F_m)=1$ if $n\neq m$. So $F_n=p_1^{n_1}\cdots p_i^{n_i}$ and $F_m=q_1^{m_1}\cdots q_j^{m_j}$ and $p_k\neq{q_j},\forall{j,k}$. Thus $p_1=F_n^{1/n_1}p_2^{-n_2/n_1}\cdots p_i^{-n_i/n_1}$ are infinite and there is always an infinitude of primes! Do you know another proof mentioned in the literature, please? Thank you.


I really really don't like the look of Yosemite.   How do I downgrade back from Yosemite to another OS?

I want to downgrade from Yosemite 10.10 to previous operating system (i think its name was Mavericks).  I am not experienced in Computers so please explain to me in simple, step by step way.   Why i want to go back to Mavericks?   After installing Yosemite: - My Mac is always very hot; - The Fan is working as soon as it starts; - Battery is getting half its normal time. - Most important, the computer hangs a lot and became very slow.  With all this probe, I feel i am not using an apple computer any more..  Thanks to anyone who can assist.


$$\frac{x}{\sqrt{x+y}} + \frac{y}{\sqrt{y+z}} + \frac{z}{\sqrt{z+x}}$$   Over all non-negative $x,y,z$ satisfying $x+y+z=4$, let the maximum value of the above expression be $M$. What is the value of $\lfloor 10000M \rfloor$?   This is a question from , and I decided to give it a go, bit got stuck. Here is my approach: Let $x+y=u^2, y+z=v^2, z+x=w^2$. Hence, $u^2 + v^2 + w^2 =8$. Also, $x=4-v^2, y=4-w^2, z=4-u^2$ and the expression becomes  $$\frac{4}{u} + \frac{4}{v} + \frac{4}{w} - \frac{v^2}{u} - \frac{w^2}{v} - \frac{u^2}{w} $$ I was itching to use Titu's Lemma/Cauchy-Schwarz in Engel form but then I realized that it will help provide a lower bound. With that ruled out, I am thinking of Rearrangement Inequality but my mind is pulling off a perfect blank. Any guidance will be welcome.  Note: The answer to the question is $25000$.

if $x$, $y$ and $z$ are positive real numbers such that $x+y+z=4$  Find the maximum value of $$S=\frac{x}{\sqrt{x+y}}+\frac{y}{\sqrt{y+z}}+\frac{z}{\sqrt{z+x}}$$  I tried as follows.  The given expression can be rewritten as  $$S=\sqrt{4-x}+\sqrt{4-y}+\sqrt{4-z}-\left(\frac{y}{\sqrt{x+y}}+\frac{z}{\sqrt{y+z}}+\frac{x}{\sqrt{z+x}}\right)$$  But by symmetry $$S=\left(\frac{y}{\sqrt{x+y}}+\frac{z}{\sqrt{y+z}}+\frac{x}{\sqrt{z+x}}\right)$$  so  $$2S=\sqrt{4-x}+\sqrt{4-y}+\sqrt{4-z}$$  and by Cauchy Scwartz inequality  $$2S \le \sqrt{4-x+4-y+4-z}\times \sqrt{3}$$ so  $$2S \le \sqrt{24}$$  so   $$S \le \sqrt{6}$$  Is this approach correct?


My question is how may I specify that the parts to a question be typeset horizontally with the option to specify the amount of rows as well as shown below. It is also essential that the level of enumeration inside the exercises start with lowercase letters (not numbers).

--Revised-- I am looking at a math workbook for teenagers. This one has the following structure:  1.Main Chapter 1.1 Subchapter 1.11 Task 1 a) problem 1   b) problem 2   c) problem 3 d) problem 4   e) problem 5 1.12 Task 2 etc. ...  Many of the math problems are very small and the natural thing would be to have them on line, horizontally. However an expression is often broken and aligned at the equal sign. Not unlike an equation (but not). Secondly, when the line that contain the structure breaks, the item indicators also align, presuming the use of an enumerated list. How can I reasonably assume this is done? Does it have to be a forced method, as a table, or can it be a flexible one, like inline?


I received a notification that the space on the drive my tempdb sits on was running low, when checking the running process it pointed to a server agent task. I checked the scheduled tasks and we had one that had been running for over a day, usually it runs for less than a minute, and it was showing a status of "Executing: 0(Unknown)" in the job activity monitor. When I tried to stop the Job in Activity Monitor nothing happened, it just kept on running and filling up tempdb to almost the full size of the disc.  Knowing that the job itself could just be stopped and re-run without affecting the business, I, perhaps too hastily, killed the SPID, thinking this would "release" space back to tempdb and I would then restart the services out of hours to shrink the files. Unfortunately this didn't work and the SPID has been in a Killed/rollback state for nearly a day now whilst the tempdb files grow (I arranged for the disk they sit on to be increased whilst I looked into it). When I check the process for the SPID it appears to be running xp_LogInfo with the last batch relating to insert #nt select distinct domain+N'\'+name, sid, sidtype from OpenRowset(TABLE NETUSERGETGROUPS, @acctnam. I believe that the owner of the SQL Job may have reset their password when the job kicked in to cause this (this is just me guessing) which has caused it to get stuck in a loop. The CPU and MemUsage in sysprocesses hasn't changed for over a day now and the LastWaitType is showing as PREEMPTIVE_OS_AUTHORIZATIONOPS. When running DBCC INPUTBUFFER for the SPID I previously killed I am receiving this: EventType - Language Event Parameters - 0 EventInfo - (@P1 nvarchar(128),@P2 uniqueidentifier)EXECUTE msdb.dbo.sp_sqlagent_has_server_access @login_name = @P1, @job_id = @P2  I have now restarted the SQL Server Agent Service which stopped the job running but the tempdb log continues to grow. What can I do to resolve this? When running DBCC OPENTRAN(TEMPDB) I get the below, the spid it relates to is the one I killed: Transaction information for database 'tempdb'. Oldest active transaction: SPID (server process ID): 205 UID (user ID) : -1 Name : INSERT EXEC LSN : (5293:26478:20) Start time : Oct 19 2020 3:30:02:193PM SID : 0x0105000000000005150000005f9b10c13b99fcfc4ad890fd8e220200  DBCC execution completed. If DBCC printed error messages, contact your system administrator.  kill {spid} with statusonly returned "SPID 205: transaction rollback in progress. Estimated rollback completion: 0%. Estimated time remaining: 0 seconds."

I would like to know how to identify the exact query or stored proc which is actually filling up the transactional log of TEMPDB database.


Unlike the shuttles of "Star Trek", which are warp-capable, the Puddle Jumpers of "Stargate: Atlantis" require a gate for interstellar travel. There are numerous episodes where someone - typically 4-6 people at a time - have to spend hours or days aboard a Puddle Jumper to reach their destination.  Given that a Puddle Jumper is only two small rooms (four seats in the front and two benches in the back), and that the entire craft is only a little larger than a , it leaves the question of where - or how - going to the bathroom works. I was wondering if this situation was ever addressed in the franchise or extended universe.  How does someone go the bathroom while in a Puddle Jumper for hours or days?  As far as I know, we never see bedpans or bags specified for that purpose, although granted there is a lot of stuff stored in the upper compartments of the rear area.

On several Stargate Atlantis and late Stargate SG-1 episodes they spend a very long time on a jumper.   For example, in Atlantis 4x17 "Midway", at the end, Bill Lee, Kavanagh, McKay and Shepard are on a gateship for more than a day      after Midway is destroyed until the Daedalus picks them up in intergalactic space   But there's no apparently place for a head (toilet).  I'm familiar with Nobody Poops (not putting TVTropes link as a public service), but this is a little different because usually you can imagine it is somewhere but not seen.   In a jumper, there is literally no place for it.    Because of this unique case, and Stargate's propensity to break the fourth wall, I'm wondering if there's anything out there.   Any discussion by show personnel or any canon information?   And I'll even just take a tongue-in-cheek "Man's I gotta take a leak real bad" when someone returns to Atlantis.


I have an laptop that I like to take to college, to friends to play games, etc. It's getting on a bit now and is starting to feel sluggish. The main limiting factor seems to be disk speed/use so I'm looking at replacing the HDD with an SSD.  What I want to know, will I be able to use my existing Windows copy on the new drive? It was originaly a OEM Windows 7 (no install disc) but I recently did an upgrade to Windows 10.   I've got a flash drive that i created using the MS Media Creation Tool with the right version of Windows (10 64bit Home) so will it just be a matter of installing from that? But what product key should I enter?  And how will Microsoft know that I'm not just installing it on a completly different system?

I've now clicked the "Get windows 10" button on the taskbar of my Windows 7 Home Premium installation, and gotten the email confirming I'm eligible for a free Windows 10 upgrade.  says I'll need the License Key if I'm doing a "first time installation":      If you will be installing the operating system for the first time, you will need your Windows product key (xxxxx-xxxxx-xxxxx-xxxxx-xxxxx). For more information about product keys and when they are required, visit the FAQ page.   Even though I proceeded to read the FAQ, it's not perfectly clear to me if the product key on a sticker of my old Windows 7 box can be used on a clean Windows 10 installation, or if I'll receive a new license key some time during the installation. Anyone know this?


Alice and Bess are playing a game in which Alice thinks of a number in the set A = {1, 2, 3, 4, 5, 6} and Bess has to guess what it is. If she guesses correctly, she wins; if she guesses incorrectly, Alice increases or decreases her number by 1 (keeping it in the set A) before Bess’ next guess. What is the smallest number k such that Bess can guarantee to win within k guesses?  I think I have solved it by trial and error of sort and concluded that the minimum value of k=8; however I'm wondering if there is a way to solve algebraically.

Your (honest) opponent choose a random number from 1 to 13 inclusive. You have to guess the number, and you win if the guess is correct. If not, your opponent either reduces the number chosen by one or increases it by 1, and you guess again.  The question is, what is the minimum # of attempts necessary to guarantee a win for you.  I am not able to get a handle on the problem.  Also, (a new variant just thought of), how many guesses should be allowed for a fair or "nearest to fair" game ?


I'm trying to find out what percentage of things I am.   I know that my great grandmother on my mothers side is from Italy and that my grandmother is part cherokee indian as well, and my grandfather's mother is from Russia.   My mom only claims to be cherokee and italian, my father is welsh, and from europe in other places.

My sister, cousins, and other relatives speculate that my mom's grandmother was Jewish (for various reasons). I've heard people say at times things like, for example, "I'm 50% German" or "I'm 25% Swedish." This has to do with their ancestry. But, how exactly is this calculated? Say for example that my mother's paternal grandmother was indeed 100% Jewish, what would that make me and my siblings, and how is it calculated?


I am using Ubuntu 12.04 and trying to install vlc via ubuntu software centre. When I press Install, the following prompt shows up  **Package dependencies cannot be resolved**  This error could be caused by required additional software packages which are missing or not installable. Furthermore there could be a conflict between software packages which are not allowed to be installed at the same time.   vlc: Depends: vlc-nox (= 2.0.8+git20140211+r49186+4+5~ubuntu12.04.1) but 2.0.8+git20140211+r49186+4+5~ubuntu12.04.1 is to be installed      Depends: libavcodec-extra-53 (>= 4:0.8-1~) but 4:0.8.10ubuntu0.12.04.1 is to be installed      Depends: libavutil-extra-51 (>= 4:0.8-1~) but 4:0.8.10ubuntu0.12.04.1 is to be installed      Depends: libc6 (>= 2.15) but 2.15-0ubuntu10.5 is to be installed      Depends: libfreetype6 (>= 2.2.1) but 2.4.8-1ubuntu2.1 is to be installed      Depends: libgcc1 (>= 1:4.1.1) but 1:4.6.3-1ubuntu5 is to be installed      Depends: libqtcore4 (>= 4:4.8.0) but 4:4.8.1-0ubuntu4.6 is to be installed      Depends: libqtgui4 (>= 4:4.7.0~beta1) but 4:4.8.1-0ubuntu4.6 is to be installed      Depends: libsdl-image1.2 (>= 1.2.10) but it is not going to be installed      Depends: libstdc++6 (>= 4.6) but 4.6.3-1ubuntu5 is to be installed      Depends: libtar0 but it is not going to be installed      Depends: libva-x11-1 (> 1.0.15~) but it is not going to be installed      Depends: libva1 (> 1.0.15~) but it is not going to be installed      Depends: libxcb-keysyms1 (>= 0.3.8) but it is not going to be installed      Depends: zlib1g (>= 1:1.2.3.3.dfsg) but 1:1.2.3.4.dfsg-3ubuntu4 is to be installed   Please someone help me....

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


How do I convert a .mov file to .mp4?  There are a lot of converter tools. But I fear there are a lot of virus infected ones. How would you convert a movie .mov file to .mp4?

I want to convert .mov to .mp4! I saved the video from iMovie but it is in .mov format! How do I convert it to .mp4?  I'm using a MacBook and I want to share it to my phone, but my phone can't open .mov format video.


I'm new to ubuntu, and was just curious of things that I can do with this OS (ex: changing folder icons, button icons, etc.). I know this isn't really a technical question, more of a fun one. What kind of stuff do you guys do to personalize your computers? I don't think there is a "correct" answer on this topic. lol. Thanks :)

This might already be answered, but I can't find it.   I am getting a bit bored of the traditional purple feel of unity and I would like something new. Where can I find more Unity themes?  I have already tried synaptic, but could not find anything. I would rather avoid people's personal PPA's.


Can we use "would" instead of "will" in the future perfect tense?   Please explain it and give some examples.

I hope someone, once and for all, can clarify (with examples) the difference in usage of will vs. would vs. would have vs. will have.


I'm putting old files to fresh Mac and on one external drive, there is bunch of video files I downloaded from Youtube and Tumblr at one point few months ago.  Would it be safe to put them to fresh Mac or could those files be harmful? There didn't seem to be anything bad with them before, but as this is fresh Mac I'm more careful now.  Should I keep them away from fresh Mac just in case?

I have downloaded quite some Tumblr videos, both cat videos, funny clips, porn. I downloaded them manually, you can save them with right click and save-as with right method - no download program used.  I have old external hard drive where I keep them, downloaded both in Mac and in Windows. After clean install (due to technical issues not malware), I was going to put my collection back to fresh Mac, but heard these videos could contain malicious code/trojans/malware?  Haven't done it for a month now - likely never will again just in case - but it would be pity to delete them all so... do I have to for security reasons?  My question is - how likely could videos downloaded from Tumblr be malicious? After all, it is one platform for many different blogs - cat videos, funny clips, porn - they are all uploaded to same server so how likely is they can be infected by a) uploader b) tumblr itself?


I left shortly after I realized that where I was, was the edge of the world.

This is a phrase I've heard many people use, and it sounds wrong to me; e.g.:     The thing about that is, is that she might take it the wrong way.   It seems to treat "The thing [...] is"—the entire phrase—as the subject of the sentence. Of course, even if that were allowed, the comma placement would still be questionable.  I'm curious to know:   Is there a name for this wording? Is it specific to a certain dialect? Is its etymology known?


I am trying to solve the following exercise. I have the feeling that it is a very simple one, but I am lost. I do not know where to start, because you do not have an specific function. The exercise says:     If   $$F(x, y, z)=0$$   prove that   $$\frac{\partial x}{\partial y}\frac{\partial y}{\partial z}\frac{\partial z}{\partial x}=-1$$   I would appreciate any help you could offer.

The task is as follows:     Given: $$F(x,y,z) = 0$$    Goal:  Show    $\frac{\partial  z}{\partial y}|_x \frac{\partial  y}{\partial x}|_z \frac{\partial x}{\partial z} |_y = -1$   Here is my work so far:  (1) Differentiate with respect to y, I get:  $0 + F_2 + F_3  \frac{\partial z}{\partial y} = 0$  So $ F_3  \frac{\partial z}{\partial y} = - F_2$  (2) Differentiate with respect to x, I get:  $F_1 + F_2 \frac{\partial y}{\partial x}  + 0 = 0$  So $ F_2  \frac{\partial y}{\partial x} = - F_1$  (3) Differentiate with respect to z, I get:  $F_1  \frac{\partial x}{\partial z}    + 0  + F_3 = 0$  So $ F_1  \frac{\partial x}{\partial z} = - F_3$  (4) After some manipulations with the $F_i$, I get to the conclusion that $\frac{\partial z}{\partial y}* \frac{\partial y}{\partial x} * \frac{\partial x}{\partial z}  = -1$, so when evaluated with x, z, y respectively, conclusion is still true  My questions are:  (1) Is my proof correct?  (2) For example, when I differentiate with respect to y, I "let" $F_1$ be 0 and find partials for other coordinates.    I had a hard time trying to explain to my friend on the reason(s) why I can do such "let be 0" thing.  Although I think if I can't do that, then there is no way that I can reach the conclusion, but I somehow feel confused about the fact too.  Since my book is doing it that way, my understanding is that I can do such "let be 0" thing based on the independece of x with respect to y, when I differentiate with respect to y.  But is my thought ok?  Would someone please help me on this question? Thank you very much ^_^


What are best ways/resources to deal with imposter syndrome or runaway thoughts? I recently published a paper (only my 2nd first author) and was excited about it for about 2 mins before I got very bad anxiety over it. I found some novel findings in my paper and so far it has been well received but I keep thinking "I'm proposing a a new thing that hasnt been seen in the field, what if it was a fluke and can't be repeated and I end up losing my career in science." I did my due diligence in the experiments but I have lost sleep over this thought, and have started to doubt myself as a scientist. I don't have insurance at the moment so can't see a therapist but I was wondering if there were online tools to help with this.

is a psychological phenomenon wherein an individual is convinced that they do not deserve the success that they have achieved despite (perhaps extensive) empirical evidence to the contrary.  Some people with imposter syndrome doubt their own ability level. For me, this usually manifests in the thought:  I've somehow convinced everyone into believing that I'm actually good at this.  followed by the horrifying notion that eventually I'll be found out and my world will collapse. I believe that the imposter syndrome is not uncommon in academia. I'm interested to know how other people here have experienced and dealt with it.  In particular, I'm looking for actual tactics that someone might use to combat imposter syndrome.   Why I asked this question: Beyond the obvious reason that this is something I have struggled with for many years and only recently gotten a handle on myself, there's also some evidence that merely realizing that other people experience imposter syndrome helps fellow imposters. As a grad student, I've managed to meet a fair number of people who are in their own struggles with imposter syndrome; however, the tactics and self-trickery that have helped me don't always speak to them and perhaps someone else's methods might.


I'm trying to use .focus () after adding more input fields with jQuery, but it only works with the input field already present in HTML and not with the ones added.  For example, if I click on the input field that is in the form, an alert will appear, but if I add more input fields and click on them, nothing will appear.  Is there a solution? Thanks! :)       $(document).ready(function(){          var cont = 1;         $( "#add-campo" ).click(function() {             cont++;             $( '
 Campo:  <input type="text" name="titulo[]" placeholder="Digite aqui"> <button id="'+cont+'" class="btn-apagar"> - </button>
' ).appendTo( "#formulario" );         });          $('form :input').focus(function() {             alert( "Handler for .focus() called." );         });          $( "form" ).on( "click", ".btn-apagar", function() {             var button_id = $( this ).attr("id");              $( '#campo' +button_id+'' ).remove();         });     });
ADICIONAR CAMPOS
 <form id="add-pub" method="POST">

             campo:              <input type="text" name="titulo[]" placeholder="Digite aqui">             <button type="button" id="add-campo"> + </button>

         <input type="button" name="PubRot" id="PubRot" value="PUBLICAR">
 </form>

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I need a way to find the underlying 3D coordinates for each pixel of the camera in Python.  I to create a function like:  GetCoordinatesForPixel(xPixel, yPixel)  which returns a (X, Y, Z) vector.   I found the following threads:   which is supposed to be a duplicate of this one:   The latter solution works in that it procudes a render. However, I do not see a way to access those values in Python.

A world position pass is a pass used for composting other elements into the scene after the initial render. In a world position pass the R, G, B values correspond to the X, Y, Z axis (or X, Z, Y). A world position pass could look something like this. (Image form another 3d app)    Is there a way to render out corresponding world space coordinates of each pixel?


I have a set of points (meteorological stations) with 5km buffers around them. Additionally, I have a set of polygons (municipalities) in which those stations are located.  I would like to have data on how much of the buffer is filled by each polygon but I was not able to find a function or a way to do it. So for example for point A I would have that in the buffer of 5km there is 80% of polygon B and 20% of polygon C as the output.  Edit:  The anwsers provided do anwser this question in a setting in which I know what polygons and buffers I need to have in the code or when I can do it manualy. Problem is that in my setting with 1 shapefile having 500 polygons and one vector layer having 13000 buffers I am unable to do this manually and I am asking if there is an easier way to do it. I tried implementing the approaches in the questions but I was unable to use them on my example in big scale. Moreover I had problems with coding that I also noted in comments down below.   Main difference to the other similar question provided is that I have 2 vector layers (Buffer with 500 buffers and Municipalities a shape file with 500 different polygons). Previous questions were analyzing this question in situations in which I know precisely the polygons and buffers analyzed, at least that is how I understood them, so after trying to use those approaches on my datasets I was not able to replicate them.  Another way of approaching this problem for me is to use join attributes by location -one-to-many and then getting averages of the duplicate results, only problem is that then I take average of polygons instead of their weights corresponding to % of intersection with the buffer. In my case I do not know what polygons of the shapefile are going to intersect what buffers, or even if the buffer is going to be intersected by 1,2 or more polygons

I am trying to compare two different vector layers on QGIS 3. They are species distribution maps. I would like to calculate the percentage of overlap of two vector layers. My goal is to determine how similar the two ranges are. Anyone know how I can do this in QGIS 3.8?


What are the railway reservation rules under the below noted circumstances?  I have purchased a waiting list ticket in 3rd class A/C and did not confirm it before the journey. Can I make a valid journey and board in the 3rd AC compartment with the waiting list ticket?  Also, can I travel in Sleeper Class in a reserved compartment if I only have a general ticket without reservation? I am ready to pay the reservation cost to the  () even if no seat could be allotted by him.

I booked an online ticket for traveling on Indian Railways for a Short Distance Journey, but my ticket was not confirmed at all and is on the waiting list.   Can I travel with the waiting list ticket in the General Compartment?


If I use a magic item, say an Immovable Rod for example, as an improvised weapon, will it deal damage that bypasses resistance to bludgeoning damage from nonmagical sources?

Let's suppose you're facing an enemy that has resistance against non-magical weapons. Alas, you have no magical weapon, but you do have your trusty Alchemy Jug that you routinely use to produce mayonnaise. You grab the Jug and use it as an improvised weapon. Does it count as magical for the purpose of overcoming damage resistance?  (How resistant a magical item is to physical damage is a bit of DM's fiat. For the sake of this question, assume the Jug is indestructible.)


I'm a beginner photographer — mostly interested in travel photography.  Recently I've seen some posters advertising a Tamron 18-400mm lens, so I checked the reviews and it does not seem to be a bad lens or to have so many disadvantages.  Is this better for a travel photographer to use such a super zoom lens (like 18-400mm) instead of couple of lenses?  I'm interested in advantages and disadvantages of having a setup with multiple lenses.< I currently own one 35mm, one 17-50mm and one 70-300mm and I wonder if there are other benefits (or drawbacks) of switching to one super zoom lens (beside of course this that only one lens is much lighter)

I am planning to migrate from my Sony DSC-HX1 bridge camera (28-560mm) to Canon EOS 800D.   Now I had learned that 'x' based zoom values are not applicable to DSLR's and I am lost with all the mathematical calculations, so my questions is:  What lens will provide me all capabilities of my earlier bridge camera like shooting Macro, landscape, portraits, zoom range etc. effectively?


When I setup my computer I named it "Scott's MacBook Pro". And so when I go to System preferences->Sharing, it says Scott's MacBook Pro there as my computer name. However, opening up a terminal gives me this prompt:  Last login: Sun Oct  7 11:02:49 on ttys003 new-host-4:~ scott$    When I login to Backblaze, they list my computer as "new‑host‑4_2012_10_07". Did I not fully set my computer name? Should I use the traditional hostname command?

My computer name in System Preferences > Sharing is set to "archos", but is showing as "iphone" on Terminal. It just started doing this after I loaded Xcode for doing iPhone development: Last login: Mon Nov  7 14:46:55 on ttys001 iphone:~ travis$   Any ideas what could be causing this?


Some programming languages have exception handling structures, namely try-catch blocks. One that I know to give an example it Matlab. Consider the following pseudocode masterpiece: try     command_that_will_throw_error catch the_error     disp('The command_that_will_throw_error has finished unexpectedly! D=') end  disp('But the show can never stop!')  The program tries to execute the command_that_will_throw_error, fails, stores information about the error in the_error, and then passes the execution to the catch part of the block, so the result of the code above will be:  The command_that_will_throw(error) has finished unexpectedly! D= But the show can never stop!  My curiosity induced question is: can (La)TeX do something like this? My guess is that the answer is no, but the last time I said this, @egreg proved me wrong, so...  Before someone asks, what I'm trying to do is to programatically include some pdf files in my document, some of which may not exist. I would like to make TeX just skip them or print something if said pdf file does not exist. I accept an answer to my actual problem with the pdf files, but I would to know about the error handling issue for general cases.

Is there a way to trap an error/warning in LaTeX during compile time? I'm thinking of something similar to the VB script On Error Goto <blah>, but this time for LaTeX in something like \OnErrorExecute{<command>} and \OnWarningExecute{<command>}.  Sadly enough there are no standard error/warning-codes provided (AFAIK), since packages report warnings/error via the commands  \PackageError{<message>} \PackageWarning{<message>}   By codes I mean, as an example,   Warning 1: Underfull \hbox...; Warning 2: Overfull \hbox...; ... Error 1: No \begin{document}; Error 2: Perhaps a missing \item...; Error 3: File ended while scanning..., etc.   since one would ideally want to condition on the type of error/warning that is produced. Understandably a new error/warning reporting mechanism would be required, since package authors are allowed to issue warnings/errors as they please. So, there warnings/errors could be made package-specific with some number prefix (say amsmath.warning.1 for warning 1 using the amsmath package).  If not in this version (probably), what about LaTeX3 (hopefully)?


I am writing the following in a proper thesis write up, and have a question of whether I should capitalize the first word in each bullet point (i.e. 'e') or not?  The database contains a variety of information. They include: 1.  each manager’s profile, 2.  each asset's returns, and 3.  each asset's profile.

Possible Duplicate:          Let's say I have a bullet point list e.g:   Point 1. Point 2.  Point 3.    Notice I have put a capital letter for the starting letter of every bullet point and a full stop at the end. Is this the correct way to do it?  If not, what is the correct way to do it?  Do I put a capital letter and no full stop, or, the other way around, a full stop and no capital letter? Alternatively, do I not put a capital letter or a full stop? Is it only necessary to put a capital letter on the first bullet point and full stop on the last bullet point?  For reference, I'm from the UK so British-English grammar would apply.


Let $\gcd(m,n)=d$ and $\gcd(m^2,n^2)=d'$.  It means $d|m$ and $d|n$ which implies $d^2|m^2$ and $d^2|n^2$  Thus $d^2|d'$. How to prove reverse $d'|d^2$

How to prove $\gcd(a^2, b^2) = (\gcd(a, b))^2$?  My attempt:  Let $\gcd(a, b) = d$.  Then $d|a$ and $d|b$ then $d^2|a^2$ and $d^2|b^2$. i.e $d^2$ divides $a^2 ~~\&~~ b^2$.


I keep trying to update with sudo apt-get update but run into errors after it runs and gets the update then spots and errors   Files not found Problem executing script   and so on      This is the output of the command sudo apt-get install --reinstall command-not-found    This is after redoing my sudo apt update    I tried to  do the repositories, based on the link all seems to have failed...

I have Ubuntu 12.04 LTS. I need the correct output because I edited it because it wasn't working but it has only made it worse.


I've been trying to solve the following problem.  Let $A$ be a commutative ring with identity and $a \in A$ a non-nilpotent element, i.e., $a^m \neq 0$ for all $m \in \mathbb{Z}^+$. Prove there exists a prime ideal that fails to contain $a$.  I've been trying to somehow define a partial order on the prime ideals of $A$ to apply Zorn's lemma and proves the existence of such a prime ideal, but I am not sure this approach would work. Any ideas?

Prove that the set of nilpotent elements of a ring is the intersection of its prime ideals.   I know these two useful facts:  {nilpotent elements}$=\sqrt{0}$  $\sqrt{I}= \bigcap$ of prime ideals containing I   First, I need to show that the nilpotent elements are in fact an ideal and then I need to show it's prime.   Any specific suggestions would be appreciated. I just don't know how to make this proof flow and exactly what leads to what.   I read through this question and comments as well:


I got a fan from a dead psu, it is rated at 12v 0.15amps, is there a problem if I use a 12v 1 amp notebook charger? Will it blow up?

I have two laptops (same manufacture), with the same type of power connector.  However, the power supplies/transformers are slightly different.    The output on the first laptop's power supply is 15.6 V at 8.0 A. The output on the second laptop's power supply is 15.6 V at 5 A.  Clearly the voltages are the same, but the currents are different. I assume the second laptop's power supply can not be used on the first, because it can't supply enough power to the laptop.   However, can the first laptop's power supply be safely used on the second laptop?


I'm working on a multiclass classifier with 6 classes on the target column and I was thinking about Hot Encoding the classes, thus having 6 target columns. Will this improve efficiency? I am using sklearn. L.E: improve efficiency compared to just label encode

In a classification problem when the response variable has multi-class, e.g., "sunny","rainy","cloudy", how should we encode it? I know that for predictors like this, usually we do , and if a predictors have too many classes, then we might just use the .   When this multi-class issue occurs in the response variable, I guess we can just use LabelEncode() rather use using One Hot encoding right? Because if we use One Hot encoding, then we will have 2 variables as the response variable, and the machine learning algorithm in sklearn usually expects the response variable not to be a vector right? (I mean it expects a long 1D vector with length equal to the number of observations but not a 2D matrix). But on the other hand, if we just map "sunny", "rainy","cloudy" to {1,2,3} or {0,1,2}, or whatever 3 numbers, that will create a less than or greater than relationship among "sunny", "rainy","cloudy", which is not inherited in the original problem.


I have an Indian passport and would be travelling from Japan to St. Petersberg (Russia) via Amsterdam. I have 20 hours stopover for KLM flight at Amsterdam. Though I have hotel bookings outside, but it seems I do not have time to get a Schengen visa to go out of Airport. So in this case can I stay inside the terminal for 20 hours without any need of VISA? I can manage only with cabin bag and all the flights are with KLM. I have exactly same situation during return trip.

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


I am trying to get MIME type of files in java. Using below code I am getting MIME Type: application/octet-stream  Code:   MimetypesFileTypeMap mimeTypesMap = new MimetypesFileTypeMap(); String mimeType = mimeTypesMap.getContentType(filePath);   for PDF but I am expecting application/PDF.  Is there any way to get exact MIME type of file?

How do you get a Media Type (MIME type) from a file using Java?  So far I've tried JMimeMagic & Mime-Util. The first gave me memory exceptions, the second doesn't close its streams properly. How would you probe the file to determine its actual type (not merely based on the extension)?


There was a novel I read back in the 90s (I’m pretty sure) about a guy who fought using a weighted cloak or cape. There’s very little I remember about it beyond that. He didn’t take the cloak off in the cloak-and-dagger style, but rather used it kind of like a whip from his back and shoulders. Anyone ever heard of it?

Pretty sure this book was fantasy, rather than sci-fi. Probably late 70s early 80s. I remember:  The world is made up of separate chunks, islands floating in space, each following a specific path that is charted and regular (there are timetables written about the movement and paths of each island). A thief cases a house to steal an artifact, a crystal crescent. The crescent is resting on a cushion on a mantel, in a room where the floor is specially made so that if you step in the wrong place, the floor shrieks like a riven vampire. The thief returns at night, navigates the floor, discovers that the crescent is protected by a glow (spell), figures out that the spell doesn't affect the silk cushion the crescent is sitting on, so makes a loop out of a piece of silk from his own clothes, and leaves (something) behind on the cushion, to give the spell something to protect.  To leave the building, he goes to a pantry/closet with a window, and has to dislocate his shoulder to fit. I want to say that he can shapeshift into a bear, but I can't remember how that fits in anywhere. Further on, he meets a sorceress, who wears a ring made out of crystal on a particular finger to show her rank.  And that's what I remember. I want to say the author is female, but I can't remember the name of the author or the book, and the copy I read was missing its front cover so I have no idea of the cover art. Please help!


I obtained the following sentences at this website .  The picnic was cancelled due to the rain. The picnic WAS CANCELLED BECAUSE OF THE rain.  The first sentence is wrong but the second is correct. Why can't we use 'due to' in the first sentence?  Another source (from Magoosh)  suggests that the first sentence is wrong. The reason provided by Magoosh is as follows:  "The picnic was canceled, because of rain" or "Cancellation of the picnic was due to rain" or "The cancellation, due to rain, was a problem for ...." The word "due" is an adjective, a noun modifier. It is allowed to modify a noun, as it does in the second and third structure here. It cannot modify the action of a verb, as the original has. For that, we need "because of," which opens a preposition phrase that can modify verbs.

Is it fine to use due to in place of because of ? How about the other way around? Are any of these sentences ungrammatical?   He was lost because of the storm. He was lost due to the storm. He lost his way due to the storm. He  lost his way because of the storm.


I use ARD to admin 6 computers, sometimes i can connect to 5 of the computers fine, but 1 of them will just not connect and i get an error like the below screenshot. I have got this computer to connect in the past but as of recently it never connects. Whats odd is that i can see all system info like current programme, OS, installed ram etc, but just cant get the control connection to establish.     All machines are connected to the same wired gigabit cat6 network, which consists of 3 switches linked back to a router. All the machines have mac to ip bindings so their IP address dosnt change.  Any ideas what could be done ?   My machines spec is as follows :    1) the dial out client machine : Macbook pro, 10.10.5, ARD latest  2) mac mini, 10.11.x (latest), ARD 3.9.3 3) mac mini, 10.10.x (latest), ARD 3.9.3 4) mac mini, 10.11.x (latest), ARD 3.9.3 5) mac mini, 10.12.x (latest), ARD 3.9.3 6) macbook pro, 10.12.x (latest), ARD 3.9.3   Not all of the machines are online at the moment so they wont be in the below screenshot. The machine im having issues with has the IP ending 103.   Please also see screenshot of sharing permissions for that computer.

I've got several computers that I manage using Apple Remote Desktop. Sometimes I have issues connecting with some of them. I've noticed this most often happens when their computer icon is light purple (greyed out) as opposed to dark purple.   Any ideas what this light purple means?


I have two groups (36 patients and 30 controls) and I want to check five or six normally distributed (as I checked using skewness and kurtosis values) variables (numeric) that discriminate between the two groups. Which is the best method to analyze my data? Should I perform a logistic regression or a discriminant analysis?

I found some pros of discriminant analysis and I've got questions about them. So:     When the classes are well-separated, the parameter estimates for   logistic regression are surprisingly unstable. Coefficients may go to   infinity. LDA doesn't suffer from this problem.      If number of features is small and the distribution of the predictors   $X$ is approximately normal in each of the classes, the linear   discriminant model is again more stable than the logistic regression   model.    What is stability and why is it important? (If logistic regression provides a good fit that does its job, then why should I care about stability?)      LDA is popular when we have more than two response classes, because it   also provides low-dimensional views of the data.    I just don't understand that. How does LDA provide low-dimensional views? If you can name more pros or cons, that would be nice.


My husband is in UK on a 3-month Business visa. Now I want to apply for a visa to visit him for 7-10 days.  What visa should I apply for?  I don't have a marriage certificate but do have an affidavit to prove we are married. Also the trip will be sponsored by myself. Stay will be at his accommodation currently.  Should I book tickets before the visa, will that make any difference to the decision?

I am resident of India and just got UK Business visa ( 6 months, multiple entry) .. I am going for a week on business trip. I want to take my wife along with me and at the end of trip.. I want to extend my trip for 3 days and we want to spend some time on leisure.   What visa I should apply for my wife.. visitor visa? should she mention in the visa form that she is going along with me and staying with me while I am on work and later we are spending time on leisure.   While filling my business visa form, there was a field asking if anyone else is going with me.. I selected no.. as there were no plans.  Also is it ok to spend time on leisure on UK Business visa


I have a whole disk mounted at /home.  I am upgrading the computer (and the OS drive, so fresh install), and I would like to retain the /home directory (disk) as it is.  How complex is this process?  Is it worth doing it this way, or should I just start fresh and restore all the user files from backup?  Nothing on the drive is encrypted.  Current and target OS are both Ubuntu Desktop 14.04 x64  Other answers I've found do not address /home being located on a separate disk.

Recently I installed Ubuntu 12.10 x64 Server Edition on my PC. Unfortunately, I attempted to install a lightweight desktop but due to the fact that I have an old graphics card, the PC does not perform so well. I am thinking of re-installing an Ubuntu version but I do not want to lose the contents in my home folder. Is there any way to do that with a Live CD?


I have a basic website in PHP that is a search engine and run's off a mysql database but I need to protect it from sql injections can someone explain to me how I can do this?  My PHP script:    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Search Engine - Search</title>
Search Engine
 <form action='./search.php' method='get'> <input type='text' name='k' size='50' value='<?php echo $_GET['k']; ?>' /> <input type='submit' value='Search'> </form>
 <?php $k = $_GET['k'];  $terms = explode (" ", $k); $query = "SELECT * FROM search WHERE ";  foreach ($terms as $each) { $i++;  if ($i == 1) $query .= "keywords LIKE '%$each%' "; else $query .= "OR keywords LIKE '%$each%' "; }  // connect mysql_connect("*******", "******", "*******"); mysql_select_db(*******);  $query = mysql_query("$query"); $numrows = mysql_num_rows($query); if ($numrows > 0) {  while ($row = mysql_fetch_assoc($query)) { $id = $row['id']; $title = $row['title']; $description = $row['description']; $keywords = $row['keywords']; $link = $row['link'];  echo "
$title
 $description

"; }  } else echo "No results found for \"$k\"";  // disconnect mysql_close();   ?>

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I got as far as distributing the summation across the Left Side so that I have:  $$ \sum_i y_i^2 - \sum_i 2 y_i \bar{y} + \sum_i \bar{y}^2 $$  Not sure where to go from there.

Consider the general linear regression model: $$y_i = \beta_0 + \beta_1x_{i1} + \beta_2x_{i2} + \cdots + \beta_px_{ip} + \epsilon_i = \mathbf{x}_i^t \beta + \epsilon_i$$  where $\textbf{x}_i = (1,x_{i1},x_{i2},\cdots,x_{ip})^T$, $\beta=(\beta_0,\beta_1,\cdots,\beta_p)^T$ and $\epsilon_i$ are iid N(0,$\sigma^2$).  I would like to see a complete proof of the following identity from first principles: $$\sum_{i=1}^n(y_i - \bar{y})^2 = \sum_{i=1}^n(\hat{y}_i - \bar{y})^2 + \sum_{i=1}^n(y_i - \hat{y}_i)^2$$ where $\hat{y}_i= \mathbf{x}_i^t \hat{\beta} $ ($\hat{\beta}$ is the least square estimator, $\bar{y}$ ia the sample mean of $y_i$).  I know that the two terms on the right can be obtained by subtracting and adding $\hat{y}_i$ on the left side. But this introduces a "cross term": $$\sum_{i=1}^n2(\hat{y}_i - \bar{y})(y_i - \hat{y}_i)$$  Many texts claim that this is zero, but I have not seen a general proof of this statement. How can this be shown?


You can find terminals where you can activate RobCo unit(s) with a selected personality mode.  Are there any useful or practical?  Because i ended up with another enemy when i protected myself from raiders and the bot with Law Enforcement saw that...

When activating a protectron in Fallout 4 you get the chance to choose its Personality Mode. The available modes are:     Default Subway Steward Law Enforcement Fire Brigadier Medical Responder Construction Worker   Do these modes serve any purpose ? Is there any actual difference in the protectron behavior ?


I have done the following to convert the byte array to string to store in the db  byte[] value; String stValue = BitConverter.ToString(value);   Now I just want do do the opposite  String stValue; byte[] value= (Convert) stValue ???   How to do this??

How can you convert a byte array to a hexadecimal string, and vice versa?


Since somewhere in april my info@ email address is being used to send SPAM emails. I first noticed it when I received a 'Mail Delivery System' email with the message that an email couldn't be sent because the mail had "550 High probability of spam".  So, I contacted my website hoster (Versio).   Seeing that the emails that were being sent out on the local host (127.0.0.1) had no authentication, they advised me to change the password I used with that email address. (I use apple mail to send my mails, so it had a different sender host) See the image below. The only ones I've sent myself are the 4th of May ones.   I changed all passwords I use for my website / the website hoster, just to be safe. Used Safari-recommended passwords.  This didn't stop the sending of the emails, so Versio thought that there was a script on my website that was sending those emails. They ran a few scans but couldn't find any infected files.  Since I'm not that happy with the support they've given me, I hope to find some tips here. Can I do anything myself to stop these emails?

I'm suffering from a spam hack where my site periodically starts to show Viagra spam to Google and other spiders. The method of the hack is basically that my .htaccess file gets modified to route all requests through a file called "common.php", which is a big chunk of base64 encoded evilness.  I've noticed it happening on a weekly basis: every time I remove the hacked files, it pops back up a few days later. These are the steps I've already taken to secure things:   Changed my FTP password Scanned my (shared hosting) directories for world-writable (777) files/folders and changed them to 755 or something more appropriate Removed old copies of Wordpress from unused directories (the site itself is a custom-written PHP CodeIgniter app) Downloaded the entire site to my local box and scanned the directories for occurences of strings like "base64" and ".ru" (spam domains?).   I'm a little uncertain what to do next as the problem still seems to be there. Is there some smart shell command I can run to figure out how these files are being uploaded? When I last checked, the .htaccess file was edited today by my own FTP user despite me changing the password a week ago and logging out any logged-in users. I don't leave it logged in on public machines, and a few other administrators of the site haven't been given the new password yet.  Any tips / ideas gratefully received. I'm happy to provide the output of any specific commands as needed.  Matt


I have come accross a multiple choice question in which I mixed up for what the answer might be. I am aware that we could use a gerund after help but not sure so much. Here I add the picture of the question  and please tell me why you would choose that.   The teacher helped us .................. Some of the questions. a. answering b. answer c. write d. to write

has an article discussing cases where an infinitive does not use the word "to."  One case is with many causative verbs like "make" and "let."     I want the water to run      *I want the water run      I make the water run.      *I make the water to run.   It is also the case with "perception" verbs.     I see the water run.      I hear the water run.   The site describes "help" as a special case that can be followed by an infinitive either with or without "to."     She helps me stand.      She helps me to stand.   My question, essentially, is why "help" is a special case that can either ellipse the "to" or not, and what the semantic implications of that choice are?  My hunch is that since one category of other verbs that do not require a "to" infinitive are causative, the choice of whether or not to include "to" has a semantic bearing on whether the subject in the sentence is perceived as a causal agent.    So in the example, "she helps me [to] stand," we would infer from the inclusion of "to" that the subject (she) is less of a causal agent than when "to" is excluded.  It seems possible that there are no broadly applicable implications from the inclusion or exclusion of "to" in an infinitive following "help," that perhaps it is an aberration by way of etymology or coincidence, but I've been unable to find sources that analyze the case beyond identifying it as an outlier.


This Program prints 1 but It should print 2. Can anyone explain this to me ?  public class Exp {  public static void main(String[] args) {    Integer abc = 1;    sum(abc);    System.out.println(abc);  }  private static void sum(Integer abc) {     abc = 2;  }   }

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


Files edited in Windows have M^ at end lines. How would I remove them ?

If I open files I created in Windows, the lines all end with ^M. How do I delete these characters all at once?


I like to work more on Photoshop, Illustrator, InDesign and so forth in my spare time.   I'm already under education to becoming a Graphic Designer.  I love working in the listed programs, and making all kind of stuff.   But when i come home i have a hard finding something i can do in these programs, i don't really have any projects.   Sometimes i make a logo for a fictive company or existing company, but i find it hard to stay motivated, when it's not going out in the real world.   I sometimes see tutorials on youtube, but i feel they are not always the best quality, and that can also be kinda boring, when i know how to do most of the stuff in the tutorial already.  So i would just like to hear what you guys do when you just want to get better in these programs.   I wanted to give Lynda a try, but i feel like it's way to expensive.

Meet . We are a group of serious developers. We are   also committed to creating the best training available. This mix of   training for developers, by developers is what rings true to our   customers.      We call it hardcore developer training. You'll know it as superior   training that is relevant and pushes all the latest technologies.   Is there any service like this but for design?


How can I prove following problem in abstract algebra?      Let $G$ is a finite non-abelian group. show that there exist elements $a,g,h\in G$ such that $g\neq h, h=aga^{-1}$ and $gh=hg$.   Please help me. Thanks in advance.

Let $G$ be a finite and non-abelian group.  How do I prove the following statement? $$\exists a,g,h\in G \colon\quad h=aga^{-1},\ g\neq h ,\ gh=hg.$$  Thanks in advance.


My girlfriend's laptop (an eee pc) just started malfunctioning, and it looks to me like  a virus - the keyboard is not working at all, yet sending keypresses anyway, resulting in crazy beeps any time the laptop is on. It also types characters repeatedly without a key being pressed.  Windows media player also appears intermittently.   Has anyone here any idea if this is a virus, or better still, know how to fix the issue?

The keyboard on my laptop seems to be typing by itself:   It sometimes types characters like 134, whether by itself or when I hit certain keys. Repeating characters may appear unexpectedly. The system volume may change by itself, or windows like the Print dialog or Web browser may appear.   This can happen without any input or as I type, and may occur more often when certain keys are pressed. Sometimes, the keyboard fails to respond altogether. This is happening regardless of the software involved.  Is there a ghost in my keyboard—is my keyboard broken?  A sample of text from the keyboard might look like this (normal QWERTY...ASDF...ZXC... sequence is expected):   QWERTYUIOPASDF)(G@*HKLZXCVBN QWERTYIOPASDFGL!#ZXCVB13 QWERTYUIOPASDFGHJKLZXCVB!#N qwertyu41iopasdf19g13h28j113k4113zxcvb4n qwerty4u1iopasdf0g7h1jklzxcvb13m qwert13uuuuuuuuuuuuuuuiopasdf87091134ghhhhhhhhhhhhhhhhhhhhhhh13jk13zxcvb14      This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.


A sufficiently long comment without spaces can break the page's layout:

On , the comments are overlapping the related questions sidebar. Is this something to do with the weird formatting of the first comment?    Browser: Mozilla/5.0 (Windows NT 6.0; rv:16.0) Gecko/20100101 Firefox/16.0


I have a Windows 7 (originally) Laptop that I deleted the Windows OS and opted for the full Ubuntu hard install.  Everything went fine, however Ubuntu will not boot from the HDD.  I went into Bios and set my boot order to boot the HDD first.  Still wont boot.  I can get into the Grub, however (dont tease me, haha) I am a Noob with Linux and computers in general so I have no idea how to use the grub or command prompt.  What are some tips or command line entry to get whatever I need (like a graphics driver or something) to start this sucker up?  I should mention that I can load the DVD that has the Ubuntu install and boot it up if I "try Ubuntu without installing" option.

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


I am fairly new to the machine learning, and I have been going over all the great posts about cross-validation today and I have a question regarding PCA and cross-validation, I don't have enough points to comment on the  so I thought maybe I should post a new question.  My understanding is the most correct procedure is the following which I saw in an earlier :  for each fold:     split data     conduct PCA on the 90% used for training     pick the number of components     fit linear regression     predict the 10% held out end   My main question is, if I want to do eigenfaces with PCA and SVM I would split up my set of images into my training and validation sets, and then apply the PCA to each new split in my cross-validation and optimization?  My confusion comes because I was following an example on  where they divide the data, and then proceed to caluclate the PCA for the split data. Next, they run  which I understand is doing a cross-validation to tune the parameters. Does this tuning introduce a bias because it preprocessed the data or is it okay for some reason? I have attached the relevant sections of the example below.  ############################################################################### # Split into a training set and a test set using a stratified k fold  # split into a training and testing set X_train, X_test, y_train, y_test = train_test_split(     X, y, test_size=0.25)   ############################################################################### # Compute a PCA (eigenfaces) on the face dataset (treated as unlabeled # dataset): unsupervised feature extraction / dimensionality reduction n_components = 150  print("Extracting the top %d eigenfaces from %d faces"       % (n_components, X_train.shape[0])) t0 = time() pca = RandomizedPCA(n_components=n_components, whiten=True).fit(X_train) print("done in %0.3fs" % (time() - t0))  eigenfaces = pca.components_.reshape((n_components, h, w))  print("Projecting the input data on the eigenfaces orthonormal basis") t0 = time() X_train_pca = pca.transform(X_train) X_test_pca = pca.transform(X_test) print("done in %0.3fs" % (time() - t0))   ############################################################################### # Train a SVM classification model  print("Fitting the classifier to the training set") t0 = time() param_grid = {'C': [1e3, 5e3, 1e4, 5e4, 1e5],               'gamma': [0.0001, 0.0005, 0.001, 0.005, 0.01, 0.1], } clf = GridSearchCV(SVC(kernel='rbf', class_weight='auto'), param_grid) clf = clf.fit(X_train_pca, y_train) print("done in %0.3fs" % (time() - t0)) print("Best estimator found by grid search:") print(clf.best_estimator_)

I have a dataset for which I have multiple sets of binary labels. For each set of labels, I train a classifier, evaluating it by cross-validation. I want to reduce dimensionality using principal component analysis (PCA). My question is:  Is it possible to do the PCA once for the whole dataset and then use the new dataset of lower dimensionality for cross-validation as described above? Or do I need to do a separate PCA for every training set (which would mean doing a separate PCA for every classifier and for every cross-validation fold)?  On one hand, the PCA does not make any use of the labels. On the other hand, it does use the test data to do the transformation, so I am afraid it could bias the results.  I should mention that in addition to saving me some work, doing the PCA once on the whole dataset would allow me to visualize the dataset for all label sets at once. If I have a different PCA for each label set, I would need to visualize each label set separately.


I did try the upgrade through Terminal using the below given command:  sudo do-release-upgrade   Then it started downloading the required files. In between I could see the below lines also (mostly):  Err http://archive.ubuntu.com raring-backports/multiverse Translation-en_US                                                            Err http://archive.ubuntu.com raring-backports/universe Translation-en_US                                                              Err http://archive.ubuntu.com saucy/main Translation-en_US                                                                             Err http://archive.ubuntu.com saucy/multiverse Translation-en_US                                                                       Err http://archive.ubuntu.com saucy/restricted Translation-en_US                                                                       Err http://archive.ubuntu.com saucy/universe Translation-en_US                                                                         Err http://archive.ubuntu.com saucy-updates/main Translation-en_US                                                                     Err http://archive.ubuntu.com saucy-updates/multiverse Translation-en_US                                                               Err http://archive.ubuntu.com saucy-updates/restricted Translation-en_US                                                               Err http://archive.ubuntu.com saucy-updates/universe Translation-en_US                                                                 Err http://archive.ubuntu.com saucy-backports/main Translation-en_US                                                                   Err http://archive.ubuntu.com saucy-backports/multiverse Translation-en_US                                                             Err http://archive.ubuntu.com saucy-backports/restricted Translation-en_US                                                             Err http://archive.ubuntu.com saucy-backports/universe Translation-en_US                                                               Err http://archive.ubuntu.com saucy-security/main Translation-en_US                                                                    Err http://archive.ubuntu.com saucy-security/multiverse Translation-en_US                                                              Err http://archive.ubuntu.com saucy-security/restricted Translation-en_US                                                              Err http://archive.ubuntu.com saucy-security/universe Translation-en_US   Can anyone tell me what could be the issue?

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


Can anyone give me a simple proof of this statement . I know how to prove it using principle of mathematical induction so please prove it in some other way.

In respect to a larger proof I need to prove that $(n-m) \mid (n^r - m^r) $ (where $\mid$ means divides, i.e., $a \mid b$ means that $b$ modulus $a$ = $0$). I have played around with this for a while now but to no avail and would be grateful if you could help me.


If MSE is     $$ \mathrm{MSE}(\hat Y) = \mathrm{Var}(\hat Y) + \mathrm{Bias}^2(\hat Y) $$   and the Bias-Variance decomposition is given by     $$ \mathrm{Err}(\hat Y\,|\,X=x_0) = \mathrm{Var}(\hat Y) + \mathrm{Bias}^2(\hat Y) + \sigma^2 $$   so it looks like they're related, the second one being for a single event, while the first one is a mean. But it's not clear how to get from one to the other. So what is the relation?  (I have copied the equations from different sources, and there are slight notational differences, e.g. $\mathrm{Bias}(\hat Y)$ vs $\mathrm{Bias}(\hat Y, Y)$, and it's not clear to me if these are equivalent or not, so please point out/correct any misuse of notation.)

I am looking for an intuitive explanation of the bias-variance tradeoff, both in general and specifically in the context of linear regression.


I would like to get a random value between 65 to 122.  How may I do that with the help of Math.random(); in Java?  Is there any way to bound the values that will be accepted?

How do I generate a random int value in a specific range? I have tried the following, but those do not work: Attempt 1: randomNum = minimum + (int)(Math.random() * maximum);  Bug: randomNum can be bigger than maximum. Attempt 2: Random rn = new Random(); int n = maximum - minimum + 1; int i = rn.nextInt() % n; randomNum =  minimum + i;  Bug: randomNum can be smaller than minimum.


In doSomething method I've created a new Map of User objects. Than I've added a new book in the list of books and set the new name for the user. When I call this method the original Map of users users is changed. Why?  Book.java  public class Book {      private String name;      public Book() {     }     //getters and setters }   User.java  public class User {      private String firstName;     private String lastName;     private List<Book> listOfBooks;      public User() {     }      public User(String firstName, String lastName, List<Book> listOfBooks) {         this.firstName = firstName;         this.lastName = lastName;         this.listOfBooks = listOfBooks;     }     //getters and setters }   ListOfBook.java  public class ListOfBook {  private final List<Book> books;  public ListOfBook() {     books = new ArrayList<>();     books.add(new Book("The Lord of the Rings"));     books.add(new Book("The Little Prince")); }  public List<Book> getBooks() {     return books;     } }   ListOfUser.java  public class ListOfUsers {      private static ListOfUsers instance;     private final Map<String, User> users;      ListOfBook books = new ListOfBook();      private ListOfUsers() {         users = new LinkedHashMap<>();         users.put("1", new User("X", "Y", books.getBooks()));         users.put("2", new User("Z", "N", books.getBooks()));     }      public static ListOfUsers getInstance() {         if (instance == null) {             instance = new ListOfUsers();         }         return instance;     }      public Map<String, User> getUsers() {         return users;     } }   Controller.java  public class Controller {      private final Map<String, User> users;      public Controller() {         users = ListOfUsers.getInstance().getUsers();     }      public void doSomething() {         Map<String, User> newUsers = new LinkedHashMap<>();         newUsers.putAll(users);         printUsers(users);         User user = newUsers.get("1");         List<Book> listOfBooks = user.getListOfBooks();         listOfBooks.add(new Book("The Da Vinci Code"));         user.setFirstName("N.N.");     }      public static void printUsers(Map<String, User> users) {         for (Map.Entry<String, User> user : users.entrySet()) {             System.out.print(user.getValue().getFirstName() + " ");         }         System.out.println();     } }   main.java  public class Example {      public static void main(String[] args) {         Controller controller = new Controller();         controller.doSomething();         controller.doSomething();         ListOfUsers listOfUsers = ListOfUsers.getInstance();         Map<String, User> users = listOfUsers.getUsers();         List<Book> listOfBooks = users.get("1").getListOfBooks();         for (int i = 0; i < listOfBooks.size(); i++) {             System.out.println(listOfBooks.get(i).getName());         }         Controller.printUsers(users);     } }

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I'm trying to send mail from my Java class but continuously getting MessangingException. I think its something related to authentication issue but i'm unable to figure out the problem.  Following is the stack trace  of the exception.  Sep 19, 2012 7:27:30 PM me.uni.sushilkumar.geodine.util.Mailer send SEVERE: null javax.mail.SendFailedException: Sending failed;   nested exception is:      javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS command first.     ko8sm1883776pbc.40      at javax.mail.Transport.send0(Transport.java:219) at javax.mail.Transport.send(Transport.java:81) at me.uni.sushilkumar.geodine.util.Mailer.send(Mailer.java:61) at me.uni.sushilkumar.geodine.util.Mailer.main(Mailer.java:73)   I am sending the message using following code  public class Mailer { private Session session; private final String username; private final String password; public Mailer(String username,String password) {     this.username=username;     this.password=password;     init(username,password); }  public final void init(String username,String password) {     Properties props=new Properties();     props.put("mail.smtp.auth", "true"); props.put("mail.smtp.starttls.enable", "true"); props.put("mail.smtp.host", "smtp.gmail.com"); props.put("mail.smtp.port", "587");     session=Session.getInstance(props, new Authenticator()     {         @Override         protected PasswordAuthentication getPasswordAuthentication() {             return new PasswordAuthentication(Mailer.this.username,Mailer.this. password);         }     });  }  public boolean send(String recipient,String subject,String body)  {     boolean status=false;     try {          Message message=new MimeMessage(session);         message.setFrom(new InternetAddress(username));         message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(recipient));         message.setSubject(subject);         message.setText(body);         Transport.send(message);         status=true;      } catch (MessagingException ex) {         Logger.getLogger(Mailer.class.getName()).log(Level.SEVERE, null, ex);     }     return status; }  public static void main(String[] args) {     Mailer mailer=new Mailer("example@example.com","password");     boolean status=mailer.send("0120sushil@gmail.com", "Demo Mail", "This is a demo message"); }  }   can anybody suggest me what's wrong with this code?

I found several other questions on SO regarding the JavaMail API and sending mail through an SMTP server, but none of them discussed using TLS security. I'm trying to use JavaMail to send status updates to myself through my work SMTP mail server, but it requires TLS, and I can't find any examples online of how to use JavaMail to access an SMTP server that requires TLS encryption. Can anyone help with this?


I am facing this issue when attempting an upgrade to ubuntu 19.04.  Checking for a new Ubuntu release Your Ubuntu release is not supported anymore. For upgrade information, please visit: http://www.ubuntu.com/releaseendoflife  Please install all available updates for your release before upgrading.   Apparently my release is not supported anymore... which doesn't allow me to upgrade. Seems like I am stuck.

On a Lenovo laptop, I want to upgrade from Ubuntu 18.04 to Ubuntu 18.10 (budgie).  When I select upgrade on the update manager, the dialog box disappears and nothing happens. The upgrade doesn't start.  Note- I went through the same procedure this morning on my other laptop and Ubuntu successfully upgraded.   do-release-upgrade fails to upgrade and throws this error:  Please install all available updates for your release before upgrading.   What can I do to upgrade the system successfully?


Chirrut was awesome. Both for his humor, and his action scenes. So what exactly is this guy? I know from the movie that he was part of some Jedi-affiliated religion which protected the Kyber crystals, but what exactly does that mean? Was he ever using the Force, even a little bit? If so, did his connection start to fail later on? Or was he just an old Daredevil?

Chirrut Îmwe is introduced in Rogue One as the last Guardian of the Whills.  The  taught Qui-Gon Jinn (and, thus indirectly taught Obi-Wan) the secret to remaining a Force Ghost after death.  Chirrut, the last Guardian, shows extreme skill and precognition consistent with Force sensitivity.  However, when      he dies his body does not disappear; indeed, despite him telling Baze that he would be with him, through the Force, it appears that the last Guardian of the Whills lacks the one ability his group was known for.   Is there any known explanation for this inconsistency?


I'm looking for a LaTeX symbol that has the letters 'NUL' in a single character width. It's a pretty representation for what's often entered as \0 in C-derived programming languages as the string termination character. In Unicode, this is represented as .   To be clear, I'm not looking for:   \varnothing \emptyset and definitely not \phi!   I should also be clear that I'm looking for a representation of a control character, to print or display it rather than have it perform its intended function as a control character.  As a strongly related side question, assume I know the code point of a Unicode glyph. Is there a way to determine what the glyph's equivalent is in LaTeX? I'm relatively new to LaTeX typesetting, so I haven't yet found such a reference.

Please how can I insert these unicode symbols in the range u2400 to u2421. They are names of control characters.  You can see them here:   I could find the package keystroke which has very nice keys, but that is not what I want.  Thanks!  -- Edited:  Quoting Marco: "The problem is to find a font that contains these characters."


How do I gain admin control? I can't change anything the admin account the admin account has a password I guess. It's the Windows administrative password but I'm just really stuck and confused because I've got two logins: one is Tony ones Tony admin. I can log in under Tony but I can't change anything I can't log under Tony admin because there's a password.

I got a brand new Windows 7 machine, installed the operating system, created one account and forgot its password. What can I do?  There is no external CD, the operating system is loaded from somewhere inside the machine.  I already tried to remember passwords and tried all candidates with all possible combinations of caps lock, num lock etc.


I'm not sure if I'm calling the thing (key collisions) correctly, and that's probably why I couldn't find any information about it on Google. Still, my question is as follows. Note that I don't work with encryption right now and I'm not going to implement anything based on this knowledge; this is a purely theoretical question which I found very interesting.  Suppose that you have a key K and a plain text P. Then you use some symmetric algorithm A like one of AES variants to obtain a ciphertext C = A_encrypt(P, K). Is it possible that some key K* != K exists which can be used to get back the plain text out of the same ciphertext, i.e. P = A_decrypt(C, K*)? How it depends, if it does, on the type of the cipher (block vs stream), on the exact algorithm and on the size of the key and the size of the plain text? My intuition suggests that impossibility or, at least, improbability of such thing is the reason of existence of symmetric ciphers, but still this is not stated explicitly anywhere I could find.  What surprises me that I couldn't find anything which answers such question directly; moreover, I couldn't find anyone asking such question. All I could find are questions  which seem to be related but not exactly the same as my question, and questions like "how to generate two keys to decipher the same data" which are somewhat opposite to my question.

For $PT\in \mathbb{M}$ and $CT\in \mathbb{C}$, let $\mathbb{F}=\{f|f:\mathbb{M}\rightarrow\mathbb{C}\}$ be the collection of all functions from $\mathbb{M}$ to $\mathbb{C}$. Then AES encryption under key $k$ is one of these functions, say $f_k$, such that $f_k(PT)=CT$. Then,   Is there any key $k'$ such that $k\neq k'$, but $f_k(PT)=f_{k'}(PT)$? If so then is there any fixed cardinality of such sets of keys?


I've just been reminded by a friend of a line in a film we saw mid/late '80s (on video, so may have been earlier but it definitely had an 80s feel to it). It was a humorous sci fi involving humans and aliens.  Towards the end, the humans (two boys?) are on the alien spaceship. The aliens are a father and daughter (green/ugly type aliens of the rubber suit variety). The human boy turns to the alien girl and says "we'll always have Paris".  At this point, the alien father shouts "Paris? Bye bye!", then opens the spaceship doors and throws them out. I think that was the end of the film, and the humans ended up back on Earth.

I have this vague memory from when I was a kid of a movie that involved a few kids and one of them, somehow, creates a force-field in the shape of a bubble.  My memory is faint but I seem to remember they controlled the bubble with an Apple IIc computer (lol) and they could fly in space, around the world, etc.  I cannot remember anyone who actually stared in the movie and none of my searches are finding anything.  Thanks.


After serving a one month suspension, I am now able to post questions and answers but little else.   As can be seen in the screenshot below, I only have 1 rep. My badges and the number of edits are visible, but rep is stuck at 1. I think this is a bug.... well, I hope so. It seems weird that everything else is in order except for that statistic.         Should I worry? Is this a problem of caching? I searched  but none of the four posts were relevant. I also searched  but none of the 19 results seem to share the same problem.  This is not a duplicate of  as I am not suspended now.

On Stack Overflow, I have a suspension period of 7 days which ends today. But my actual reputation has not been returned to me as one of the moderators said it would. I have a message like this by @Andrew Barber:     Once your suspension period is over, you will be returned to your   correct reputation level, minus the votes from the accounts which have   been deleted. At that time, you are more than welcome to return, and   continue contributing your knowledge, and gaining legitimate   reputation points. Just please keep our rules in mind when you do.      Regards      Andrew Barber, Stack Overflow moderator   Can any moderator here help me or tell me what the rules are of getting back my reputation?  How can I get the attention of a moderator so that they can resolve my problem?


Does there exist a non zero $2 \times 2$ matrix $A$ such that $A^2 \neq 0$ and $A^3=0$, where $0$ is the $2 \times 2$ zero matrix?

I'm sure I've done this before in abstract algebra. Regardless it's escaped me now.   I have proved that for $T:U\rightarrow V$, with $dim(U)=m$ and $dim(V)=n$ that $rank(T)\le m$ which is obvious, but I have proved it none the less.  I want to.... this is where I get stuck. I'm not quite sure how to say it.  Suppose we have a $T$ for example that takes $U\subset\mathbb{R}^3\rightarrow V\subset\mathbb{R}^3$, we could still have a $T$ that maps a plane to something (a plane, line or point) in this case rather than $rank(T)\le 3$ I can state $rank(T)\le 2$.  (Correct my notation here, I don't like writing subset, I mean number of dimensions of the space!)  To show this I can say $F:P\subset\mathbb{R}^2\rightarrow U\subset\mathbb{R}^3$.  Then let $G:P\rightarrow V$ and that $G=TF$, now $rank(G)\le dim(P) = 2$  Now, if $U,P,Q,R$ are spaces of dimension $\le 2$ and P,Q,R are subspaces of U  $A:U\rightarrow P$  $B=A:P\rightarrow Q$  $C=A:Q\rightarrow R$  We can now say $A^2=BA$ then $A^3=CBA$  We know that for $A$ rank(A)$\le 2$, this thus provides an upper-bound for rank($A^3$)  I want to show now that if I keep applying a linear transformation that the rank is a monotonically decreasing ($\le$) sequence. I am unsure on a proof that the rank of a transformation cannot be greater than the domain's dimensions. Although this is trivial.  (NOTE:  I have proven that if a set of n vectors, R, span a vector space V, and you take a set W of m linearly independent vectors in V that m$\le$n)  If rank(A)=2 then rank($A^2$)=2 and so rank($A^3$)=2  if rank(A)=1 then rank($A^2$)=0 and rank($A^3$)=0  if rank(A)=0 then rank($A^2$)=0 and rank($A^3$)=0  But again, I can't prove this, or at least I am unsure of how to write it.  something to clarify:  For a map $T:U\rightarrow V$ how do we distinguish (using notation) whether or not we actually use all dim(U)?  For example we might have a T that maps a plane in R^3 to a line in R^3, this can be expressed as a composition of maps, one that takes a 2 dimensional vector space (coordinates of the plane in 3 space) to a 3 dimensional point in T's domain, which T then maps to a line.  We have rank - the dimensions of the image - to make this distinction on the map's target (the rank of T is 1 if it maps something to a line, but the dimensions of the target is 3)  How do we write this? What do I say to describe this?   How do I distinguish between the number of vectors in a basis and the number of dimensions the space that basis is in has?  Sorry for the length of this! I tried to talk though my problem in the hope of seeing it myself, no such luck, thanks.


How should I reference images found in public domain in my thesis?   I mean, if it would be copyrighted, I would add a comment a la "reproduced with permission from X". If it would be under Creative Commons license, I would add a comment "licensed under XY license".   What about public domain? Should I add some sort of comment to make clear it is public domain? E.g. if I would like to use something from NREL website ().

I am writing my thesis and came across an image on Wikipedia that I would like to use. The licensing on this image is:     I, the copyright holder of this work, release this work into the public domain. This applies worldwide.   In some countries this may not be legally possible; if so:   I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.   Should I still include a reference to indicate this image is not my own work, if so, who should be given credit (the author is not known in this case)?


How is if else working fine in this code snippet without any syntactical errors.  def even_or_odd(number):     return 'Odd' if number % 2 else 'Even'   In Python3 if and else introduce code blocks and should be terminated by ":" (a colon), but in the code snippet above inside return statements there is no ":" after if and else.Why is python not showing syntax error

If Python does not have a ternary conditional operator, is it possible to simulate one using other language constructs?


I searched on SO and CV for a minimum sample size per group for a random effect in a mixed-effects model but failed to find relevant answers. Some say there should be the minimum of 6 groups to be included as a random effect variable, but what should be the minimum number of observations per group? I have 22 groups in total, but half of the groups (11) has only one observation. In my personal thought (without any reasoning..), too many groups with single observations is likely to reduce the reliability of a statistical result. For your reference, below shows the result of my model. If the variance between groups is not reliable, I would like to use a glm with gamma family (log-link) instead of a glmm. Can somebody help a noob, please? Generalized linear mixed model fit by maximum likelihood (Laplace   Approximation) [glmerMod]  Family: Gamma  ( log ) Formula:  FD ~ DRS + Fine * CloudX + TempX + WindX + HumX + (1 | ID)    Data: data       AIC      BIC   logLik deviance df.resid    1300.7   1330.0   -640.3   1280.7      129   Scaled residuals:      Min      1Q  Median      3Q     Max  -1.4398 -0.6472 -0.1104  0.3297  4.7963   Random effects:  Groups   Name        Variance Std.Dev.  ID    (Intercept) 0.09426  0.3070    Residual             0.41693  0.6457   Number of obs: 139, groups:  ID, 22  Fixed effects:                        Estimate Std. Error t value Pr(>|z|)     (Intercept)           3.0099171  0.7855672   3.832 0.000127 *** DRS                  -2.5087985  1.9044682  -1.317 0.187731     Fine                  0.0027865  0.0008587   3.245 0.001174 **  CloudXScattered       0.6813028  0.3419755   1.992 0.046343 *   TempX                 0.0366588  0.0219830   1.668 0.095396 .   WindX                -0.0120540  0.0309304  -0.390 0.696748     HumX                 -0.0010427  0.0086787  -0.120 0.904371     Fine:CloudXScattered -0.0283622  0.0113815  -2.492 0.012704 *   --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Correlation of Fixed Effects:             (Intr) DRS    Fine   CldXSc TempX  WindX  HumX   DRS         -0.544                                           Fine         0.062 -0.759                                    ClodXScttrd -0.529  0.231  0.150                             TempX       -0.846  0.178  0.256  0.582                      WindX        0.168 -0.030 -0.204 -0.541 -0.483               HumX        -0.801  0.565 -0.205  0.396  0.511 -0.005        Fn:CldXSctt  0.188  0.112 -0.282 -0.770 -0.386  0.411 -0.036 fit warnings: Some predictor variables are on very different scales: consider rescaling convergence code: 0 Model failed to converge with max|grad| = 0.00749811 (tol = 0.002, component 1) Model is nearly unidentifiable: very large eigenvalue  - Rescale variables? Model is nearly unidentifiable: large eigenvalue ratio  - Rescale variables?

Is there a rational for the number of observations per cluster in a random effect model? I have a sample size of 1,500 with 700 clusters modeled as exchangeable random effect. I have the option to merge clusters in order to build fewer, but larger clusters. I wonder how can I choose the minimum sample size per cluster as to have meaningful results in predicting the random effect for each cluster? Is there a good paper that explains this?


I'm not sure why I cannot perform such a action  my logic behind this:  if parsing of string to datetime failed then assign null, otherwise outed value  using System;  public class Program {        public class Test     {         public DateTime? Date { get; set; }     }      public static void Main()     {         var test = new Test         {             Date = DateTime.TryParse("string", out var dt) ? dt : null         };     } }      Type of conditional expression cannot be determined because there is no implicit conversion between null and DateTime   But my type is DateTime?, so what's wrong?

Could someone explain why this works in C#.NET 2.0:      Nullable<DateTime> foo;     if (true)         foo = null;     else         foo = new DateTime(0);   ...but this doesn't:      Nullable<DateTime> foo;     foo = true ? null : new DateTime(0);   The latter form gives me an compile error "Type of conditional expression cannot be determined because there is no implicit conversion between '<null>' and 'System.DateTime'."  Not that I can't use the former, but the second style is more consistent with the rest of my code.


On my development machine, I often create new web instances that all run as NT AUTHORITY\NETWORK SERVICE. I want to grant this account rights to access all new databases that I create in the future in my SQL Server 2008 R2 instance. I want to do this because it is too much of a hassle to grant rights to new databases every time I create a new web site.

I have a unique (well, I think it is unique) situation where databases (yes, entire databases) can be created more or less dynamically.  Ignoring the obvious issue with that, I need to be able to allow an AD account to read any of the data in any of the databases.  Acknowledging the security issue surrounding all of this, is there a way to grant this just once at the server level, rather than having to grant constantly when a new database pops up?  I would prefer to just keep it at a datareader level.  Specifically:  1. databases are created dynamically without advance knowledge of the DBA 2. Reporting jobs iterate through these databases and fail if they encounter a new one.  I am using SQL Server 2008R2 and SQL Server 2014.


I am developing an App which uses the following code. It is generating an unexpected error as "Attempt to invoke virtual method on a null object reference". I do not understand the reason why this is happening. The error is thrown as the line containing t[i].setTestname(getData(exams[i]));. Could someone please point out what I am doing wrong. Could use some help over here.  void processTestPerformance() {     String exams[],rawdata;     rawdata=data.toString();     int numberoftests=getNumbers("tabletitle03",rawdata);     Tests[] t= new Tests[numberoftests];     exams=new String[numberoftests];     rawdata=rawdata+"tabletitle03";     for(int i=0;i<numberoftests;i++)     {         int j=rawdata.indexOf("tabletitle03");         int k=(rawdata.substring(j+1)).indexOf("tabletitle03");         exams[i]=rawdata.substring(j,j+1+k);         t[i].setTestname(getData(exams[i]));         rawdata=rawdata.substring(k);     } }   The code for class Tests is as follows:  public class Tests {     public int numberofsubjects;     public String testname;     public Subject s[];     public void setS(Subject[] s)     {         this.s = s;     }     public void setNumberofsubjects(int numberofsubjects)     {         this.numberofsubjects = numberofsubjects;         s=new Subject[numberofsubjects];     }     public void setTestname(String testname)     {         this.testname = testname;     } }   Thanks in Advance.

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


My son is working on the BlenderGuru’s donut lesson. Everytime he tries to render the image, the donut and the coffee mug don’t show up in the render.  The icing and everything else does.  What are we doing wrong?

This is meant to solve this problem once and for all. What is every reason an object isn't showing up in a render or viewport in when using the cycles render engine?


Does the word "then" always take a comma after it? I have two sentences:      "Then, go ahead and do it."      "I'm waiting for the package to arrive at my house, and then, I'll go to the store."   Do those sentences require a comma after "then"? What about for the word "now"?      "Now, it's my turn."   I think that a comma isn't required after "then" but is always required after "now." Am I wrong?

I am trying to say sentences like:  Then by doing this thing, this happens Now after selecting this option, this happens By doing this, now we can do this  Should they get comma after "then" and "now":  Then, by doing this thing, this happens Now, after selecting this option, this happens By doing this, now, we can do this