Show that $$\det \begin{bmatrix} -x & 1 & \dots & 1 \\ 1 & -x & \dots & 1 \\ \vdots & \vdots & \ddots & \vdots \\ 1 & 1 & \dots & -x \end{bmatrix}  = (-1)^n(1+x-n)(1+x)^{n-1}$$ for all $n \in \mathbb{N}$.  I tried using induction but I didn't manage (using row/column swaps). Does anyone have any idea?

This question aims to create an ""  of numerous questions that ask about determinants of specific matrices (I may have missed a few):              The general question of this type is  Let $A$ be a square matrix of rank$~1$, let $I$ the identity matrix of the same size, and $\lambda$ a scalar. What is the determinant of $A+\lambda I$?  A clearly very closely related question is  What is the characteristic polynomial of a matrix $A$ of rank$~1$?


I am trying to find closest pair from a few different datasets. So far it works with the SmallerSet which has 12 points but when I change dataset which has 100 points . It's giving NullPointer Excepiton at the line that I add "--->" before the loop .I dont't figure it out to solve.  public static PointPair closestPair(Point2D.Double Px[], Point2D.Double Py[],int n) {     PointPair closestpairLeft;     PointPair closestpairRight;      if (n <= 3) {         if(n==2)             return new PointPair(Px[0],Px[1]);         else{         PointPair p1=new PointPair(Px[0],Px[1]);         PointPair p2=new PointPair(Px[0],Px[2]);         PointPair p3=new PointPair(Px[1],Px[2]);          if(p1.closerThan(p2)<0){             if(p1.closerThan(p3)<0)                 return p1;             else                 return p3;         }         else{             if(p2.closerThan(p3)<0)                 return p2;             else                 return p3;         }         }     } else {         int mid = n / 2;           Point2D.Double Xl[] = Arrays.copyOfRange(Px, 0, mid);         Point2D.Double Xr[] = Arrays.copyOfRange(Px, mid, n);          Point2D.Double Yl[] = new Point2D.Double[Xl.length];         Point2D.Double Yr[] = new Point2D.Double[Xr.length];          ---> for (int i = 0, k = 0, j = 0; i < n; i++) {             if (Py[i].getX() <= Xl[mid-1].getX()&& j<mid) {                 Yl[j++] = Py[i];             } else if (k<mid){                 Yr[k++] = Py[i];              }          }          closestpairLeft=closestPair(Xl,Yl,mid);         closestpairRight=closestPair(Xr,Yr,n-mid);     }

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?


How to configure the Akka application to generate the heap dump on crash (out of memeory). Tried searching but could not find the information. Can some one help me on this?

I was told I can add the -XX:+HeapDumpOnOutOfMemoryError parameter to my JVM start up options to my JBoss start up script to get a heap dump when we get an out of memory error in our application.  I was wondering where this data gets dumped?  Is it just to the console, or to some log file?  If it's just to the console, what if I'm not logged into the Unix server through the console?


I have a French permanent residence card valid for 10 years.  Can I go to the UK for a few days to visit without a visa?

I live in Germany since May 2013 as a spouse of German citizen. In Nov 2015 we divorced and I have German residence permit till Jan 2018. We have a son in this marriage and legally I have the right to live in Germany indefinitely. I would like to visit my brother and sister who are British citizens living in UK. What is the visa procedure for me to travel to UK for a week.  Do I need a visa to enter UK ?


What would be the best way to identify all the set bit positions in a 64 bit bitmask. Suppose my bit mask is 0xDeadBeefDeadBeef, then what is the best way, to identify all the bit positions of the set bits in it.  long long bit_mask = 0xdeadbeefdeadbeef; unsigned int bit_pos=0; while(mask) {   if((mask&1)==1) {      printf("Set bit position is:%d \n",bit_pos};   }   bit_pos++;   mask>>=1;  }   One way is to loop through it, and check if a bit is set or not, if it is set, Return the count position and continue looping until the MSB, so for 64 bits, I would iterate until I have all the set bits traversed or all 64 bits traversed, if MSB is set, but there must be a better way of doing it?

8 bits representing the number 7 look like this:  00000111   Three bits are set.     What are algorithms to determine the number of set bits in a 32-bit integer?


I have a date string which is in the form of 2016-03-15 14:41:48.901013+05:30. I want to change it to a datetime object in the same format i.e 2016-03-17 14:41:48.901013+05:30. Please help me in doing this.  I am using django 1.8.

I've got a huge list of date-times like this as strings:  Jun 1 2005  1:33PM Aug 28 1999 12:00AM   I'm going to be shoving these back into proper datetime fields in a database so I need to magic them into real datetime objects.   This is going through Django's ORM so I can't use SQL to do the conversion on insert.


Having trouble using bindParam with PDO/mysql in PHP.  Here is my simplified code, which does still produce the error:  $tableID = "bmb_job"; $columnName = "job_id"; $recordID = 1; $stmt = $dbh->prepare('SELECT * FROM ? WHERE ? = ? LIMIT 1');  $stmt->bindParam(1, $tableID); $stmt->bindParam(2, $columnName); $stmt->bindParam(3, $recordID, PDO::PARAM_INT); $stmt->execute();  $jobArray = $stmt->fetch();   And the error:     Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''bmb_job' WHERE 'job_id' = 1 LIMIT 1' at line 1' in /home/danny/public_html/bmbbooking/ajax/getuser.php:21 Stack trace: #0 /home/danny/public_html/bmbbooking/ajax/getuser.php(21): PDOStatement->execute() #1 {main} thrown in /home/danny/public_html/bmbbooking/ajax/getuser.php on line 21   Initially I thought it was related to it thinking $recordID was a string, but as far as I can tell MySQL doesn't like ' in its query, only backticks... I tested this out by running the query in phpMyAdmin, the query fails with 'bmb_job' WHERE 'job_id' = 1 LIMIT 1 but works with backticks  It did work before when I did $stmt = $dbh->prepare('SELECT * FROM $tableID WHERE $columnName = $recordID LIMIT 1');, but I want to use bindParam if I can.

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


I think this is very awkward thing that there is no blog site for Stack Overflow, whereas many of the Stack Exchange sites have their . Why isn't there any blog site for Stack Overflow? Is there any specific reason? N.B: I'm intentionally forgetting the fact that Stack Overflow hasn't a Twitter account!!!

The blog at  is distinctly different from its cousins at  or . In particular, it has little to do with programming. It really ought to be blog.stackexchange.com as it has naturally morphed into a blog about the larger network. Could this be remedied? Could we have a SO blog about programming?


Now before you all call me a retard Let me just state that I know nothing about the electrical world at all.  But I need someone help me answer my question   So I have a TV that says on the back 'Input; DC 12v 3000aH' and I have a power supply that says 'Output; DC 12v 2A'  Will that work? Or burn down my house? (I assume 'aH' and 'A' means the same thing) My common sense tells me that the power supply should say 'Output; DC 12v 3A' (Fyi i lost the original power supply for the TV)  So I need to buy a new one  Much appreciate anyone who answers this

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


I am using Ubuntu budgie and it was working file till today morning. I don't usually shut down my laptop at all but yesterday as my battery drained completely so after I charged it, I tried booting it up. After start grub my Ubuntu logo appeared and later a black screen with some nerdy texts was visible and every time I boot it is stuck to that process.

I've just installed Ubuntu GNOME 14.04 LTS and everything was working fine.  But suddenly it freezes and then goes blackscreen, and displays this:  * Stopping System V runlevel compatibility * Stopping save kernel messages * Starting crash report submission daemon [  797.944847] nouveau E[Xorg[1052]] failed to idle channel 0xcccc0000 [Xorg[1052]] [  812.930255] nouveau E[Xorg[1052]] failed to idle channel 0xcccc0000 [Xorg[1052]] [  827.971609] nouveau E[gnome-shell[1911]] failed to idle channel 0xcccc0000 E[gnome-shell[1911]] [  842.957016] nouveau E[gnome-shell[1911]] failed to idle channel 0xcccc0000 E[gnome-shell[1911]] [ 1304.084012] nouveau E[Xorg[3342]] failed to idle channel 0xcccc0000 [Xorg[3342]] [ 1319.069420] nouveau E[Xorg[3342]] failed to idle channel 0xcccc0000 [Xorg[3342]] [ 1334.110775] nouveau E[gnome-shell[3923]] failed to idle channel 0xcccc0000 E[gnome-shell[3923]] [ 1349.096181] nouveau E[gnome-shell[3923]] failed to idle channel 0xcccc0000 E[gnome-shell[3923]] [ 1349.096294] nouveau E[   PFIFO][0000:01:00.0] read fault at 0x0000013000 [PTE] from PBDMA0/HOST_CPU on channel 0x021f894000 [unknown]   And then, after some time, i'm asked to login, or it just displays weird patterns and does nothing.  This is happening more and more often.  Do you have and ideas how can i fix this?


I am creating a Chess program on NetBeans using jButtons as squares, and my java knowledge is limited to what I have learnt at school.  So this line  int verticalValue = Integer.parseInt(newButton.substring(1,1));   returns a nullPointerException and I can't figure it out whatsoever. Here is the relevant code:  static void pawnMovement(JButton but){     String buttonName = but.getName();     String newButton = buttonName;     int verticalValue = Integer.parseInt(newButton.substring(1,1));   The names of all buttons are in the format letterNumber, so I don't see why this shouldn't work.  Thanks!

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?


For example, I type sudo apt-get update and then a long list of stuff will come up for minutes..  if I want to escape from seeing this tiresome updating and take control of bash command line again(without quitting the original command),  is there a hotkey or something like that to do it?

How can I pause an rsync that's running?   First time I did Ctrl+C to kill it and used the -P flag to run again. Is this prone to corrupt the current file transfer?  Second time I simply put MacOS to sleep (by closing the lid). Looking at the running process I can see 2 (not sure why) with a status of 'S'.  Tried using   kill -SIGCONT   to resume the process, but it has no effect.


So I'm trying to build a simple mechanic where the player see's 3 sides of a cube at a time: top, left and front(I called the front-side "Right" in my code, due to the orthographic view). The player can click on the front side or left side of the cube to rotate the cube so that the side that was pressed moves and becomes the top face. I want to smooth/animate the rotation.  The red faces are the faces that the user can click on.  My Logic seems to work quite well when I click on the left face (Rotating along the x axis), but doesn't seem to work well for the front/right face(It usually works once and then does weird stuff on the next click, this is on the z-axis)  public class CubeRotator : MonoBehaviour {     private const float STOP_THRESHHOLD = 0.1f;     private const float ROTATE_AMOUNT = 90f;      [SerializeField, Header("Touch Quads Colliders")]     private Collider touchQuadLeft;     [SerializeField]     private Collider touchQuadRight;      [SerializeField, Space(10)]     private float timeToRotate;      private bool mustRotateLeft = false;     private bool mustRotateRight = false;      private float targetX = 0.0f;     private float targetZ = 0.0f;      private float xVelocity = 0.0F;     private float zVelocity = 0.0F;      int layerMask;      private void Start()     {         layerMask = LayerMask.GetMask("Touch Quad");     }      void Update()     {         ListenForTouch();         RotateCube();     }      private void ListenForTouch()     {         if (Input.GetMouseButtonDown(0))         {             Vector2 touchPoint = Input.mousePosition;             RaycastHit rayCastHit;             Ray ray = Camera.main.ScreenPointToRay(touchPoint);              if (Physics.Raycast(ray, out rayCastHit, 150f, layerMask))             {                 if (rayCastHit.collider == touchQuadLeft)                 {                     mustRotateLeft = true;                     targetZ = targetZ - ROTATE_AMOUNT;                     zVelocity = 0f;                 }                  else if (rayCastHit.collider == touchQuadRight)                 {                     mustRotateRight = true;                     targetX = targetX + 90f;                     xVelocity = 0f;                 }             }         }     }      private void RotateCube()     {         float zAngle = transform.rotation.eulerAngles.z;         float xAngle = transform.rotation.eulerAngles.x;          if (mustRotateLeft)         {             zAngle = Mathf.SmoothDampAngle(zAngle, targetZ, ref zVelocity, timeToRotate);              if (Mathf.Abs(zVelocity) <= STOP_THRESHHOLD)             {                 mustRotateLeft = false;             }         }          if (mustRotateRight)         {             xAngle = Mathf.SmoothDampAngle(xAngle, targetX, ref xVelocity, timeToRotate);              if (Mathf.Abs(xVelocity) <= STOP_THRESHHOLD)             {                 mustRotateRight = false;             }         }          transform.rotation = Quaternion.Euler(xAngle, 0f, zAngle);     } }   Inspector Values:    I've tried several things, the only problem I can think of is, gimbal lock. Thanks in advance.

I am trying to write code with rotates an object.  I implemented it as:  Rotation about X-axis is given by the amount of change in y coordinates of a mouse and  Rotation about Y-axis is given by the amount of change in x coordinates of a mouse.  This method is simple and work fine until on the the axis coincides with Z-axis, in short a gimble lock occurs.  How can I utilize the rotation arount Z-axis to avoid gimbal lock.


I am using this class with--all except for one--template member functions, which will be used in a project with multiple source files which get linked on compilation. The template type is unknown and can take just about any type to it. In this case I have two source files which use the class, therefore the header file with the class declaration and definition is #include:ed in both source files. I then get the error "multiple definition" at the non-template member function declaration of the class. I presume that is because it is being defined twice during the linking process since both source files have a definition of the non-template member function. Imagine the non-sense scenario below:  Note: Assume all files are include guarded and iostream is #include:ed wherever required.  foo.hpp  class foo { public:     template <typename X>     void f(X);      void ff (); };  #include "foo.tpp"   foo.tpp  template <typename X> void foo::f(X val) {     cout << val; }  void foo::ff() // multiple definitions {     cout << sizeof(*this); }   main2.cpp  #include "foo.hpp"   main.cpp  #include "foo.hpp"  int main() {     return 0; }   Adding the inline keyword to the function definition seems to solve this error, though I don't want to use it because I've got other non-template member functions suffering the same issue which are way larger and are referenced in multiple parts of the code. Is there any work-around or valid way to do what I'm trying to do? Thanks in advance!

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


In my index.php file, I have a php function "InsertTheRecord" which gets a parameter and insert it into the database. It return 1 if that parameter is inserted successfully otherwise 0.  I have following JavaScript function "InsertRecord" in same index.php from where I want to call php InsertTheRecord function. How can I call php function from JavaScript function?  My JavaScript function:  function InsertRecord() {     var myParameter = 40;     var result = ////call InsertTheRecord(myParameter) //I don't know how to do this?     if result == 1 { //do something}         else { //show error message} }

Is it possible to call a function from PHP using onsubmit from JavaScript? If so could someone give me an example of how it would be done?  function addOrder(){     $con = mysql_connect("localhost", "146687", "password");     if(!$con){         die('Could not connect: ' . mysql_error())     }      $sql = "INSERT INTO orders ((user, 1st row, 2nd row, 3rd row, 4th row)     VALUES ($session->username,1st variable, 2nd variable, 3rd variable, 4th variable))";      mysql_query($sql,$con)     if(mysql_query($sql,$con)){         echo "Your order has been added";     }else{         echo "There was an error adding your order to the databse: " . mysql_error();     } }   That's the function I am wanting to call. Its an ordering system, you type in how much of each item you want, hit submit and it should add the order to the table.


In Kepler's first law, the earth moves around the sun in a elliptical path. The sun is at one of the focuses. Now, would this suggest that sun is always at the focus? i.e: it's position is fixed?

In every derivation of Kepler's Laws that I have seen, we assume that the sun is stationary. However, in other places I have read that celestial bodies move about their barycentre (center of mass). So are planets actually moving in elliptical orbits around the Sun or do they move in circular orbits around their center of mass?


Right now, I can use [tag:tagname] almost anywhere on Stack Overflow to link to a tag. On Meta Stack Overflow, I can use the same markup, but it still links to tags on Stack Overflow, and not Meta Stack Overflow.  Can we have something like [tag:meta:tagname] and [tag:main:tagname], where plain [tag:tagname] goes to the site which the question/comment is being posted?

I am wondering because I was editing my profile and I though it would be nice to put the languages I know and stuff like tags.  Is it possible to post a tag? If it's not, do you think it's possible to implement on the profile?  For example:  [c#]   Would generate    With tag formatting and link...


If you watch the HBO series and get curious about something, you can quickly get pulled into a super deep rabbit hole of Westeros lore by following random links on for instance  - detailed explanations of just briefly mentioned characters such as  or dudes not mentioned at all such as Daemon Blackfyre. I kind of assumed this was all covered in the books (which I haven't read), but by reading the summaries, it doesn't seem possible for them to cover all this really deep, intricate lore that is covered on the wiki.  But this is just my impression - am I mistaken in this assumption? How much more is covered by the books as compared to the show?

As I can read, the author of the series created several books in the series starting with the book A Game of Thrones. I'm watching the series on TV (I haven't read the books).  When I watched something in the show that I do not fully understand or want to brush up on, I go search the web and usually find the information in Wikipedia. Often I also find a full timeline from before the first book, and I wonder where does this information come from? Whoever wrote this must have this information from somewhere - I just don't seem to understand where, since the first book starts around the same time the first episode of the first series in the TV show?


I do a lot of photo editing on a 13" Macbook Pro. When making photo adjustments I spend a lot of time waiting for the image to re-render. I'm wondering which hardware upgrades will have the greatest impact on adjustment performance and why. (Preferably ranked.)  I use Aperture, but the question should apply just the same to all photo editing software.  Note that I'm taking specifically about performance when making adjustments. I don't care about the time to first load images into the app or the time to export because I can walk away while that is happening. Also, at of the time of this question, all Macs come with flash storage, so recommending an SSD isn't helpful in this situation.

I've got a 27" 2.8 i7 iMac. I recently moved from iPhoto to Aperture for managing my photos, and am not all that happy with the performance.  With a bit of diagnosis, I've seen that 4GB RAM doesn't really seem to be enough - I'm getting lot of virtual memory page outs. I'm going to go ahead and upgrade to 8GB.  Would moving my Aperture library onto an external firewire hard disk improve performance? It seems like FW800 is fast enough to cope with modern hard drives.     I'd love to hear experiences from anyone who has tried this, and anyone else who has some good advice for improving Aperture performance in general.


So I'm working on an application that pastes things into RTF boxes or any text box really utilizing the clipboard.   I need to be able to tell what window users have selected so that my application can determine if it should paste the data there or not.  Is there a way to read the name of the currently selected window, so that I can determine if they should be able to past in it?  Thanks

I'd like to know how to grab the Window title of the current active window (i.e. the one that has focus) using C#.


Which of these two sentences is grammatically correct and why?  nice blue cotton Korean blouse nice blue Korean cotton blouse  I picked number 1 but it seems number 2 is correct, I would like to know the reason, I think number 1 sounds better, is there a rule I don't know about?

I remember being taught that the correct order of adjectives in English was something along the lines of "Opinion-Size-Age-Color-Material-Purpose."  However, it's been a long time and I'm pretty sure I've forgotten a few categories (I think there were eight or nine). Can anyone fill them in?


I tried to type in 'exit' and tried cntrl+d too but they both just close the terminal. Why is this? Is there another way to move away from root user?

I installed the WSL Bash on Windows 10 and set my user to e.g. 'abc' but now I want to change it to something else.  How can I change the user name of the user I'm logged in as?  When I open bash it automatically logs me in with my current user.


There were $107$ people at the wedding and $11$ tables, which could accommodate $10$ people each. This means there were about $11^{107}$ possible seating plans.  I read that in a book but didn't really understand the solution. I mean the solution doesn't consider the fact that each table can have a max of $10$ people and it actually doesn't care about the capacity of the table. Can anyone explain it to me?

I am reading a book and there was a topic regarding number of sitting arrangements in a wedding. The information provided is:  107 people. 11 tables. Each table can accommodate up to 10 people. The order in each table does matter but the order of tables does not.  The author finally said that "there are about $11^{107}$ possible seating plans." Isn't this incorrect since it allows for repetition? My answer would be that the number of seating plans is $110 \choose x_1,...,x_{11}$ such that $x_i = 10$ with $i \in$ {1,...,11}. Can anyone suggest a correct solution to this problem? P.S. The book is called "Algorithms to Live By" by Brian Christian and Tom Griffiths.


What is better to use for performance in JavaScript?  document.children[0].children[1]   vs  document.querySelector('body')   Which is more faster in performance?

CPU Cycles, Memory Usage, Execution Time, etc.?  Added: Is there a quantitative way of testing performance in JavaScript besides just perception of how fast the code runs?


I've been reading some sites on train travel and it's very overwhelming. I'm still not sure what I need to do. I understand that within a country in Europe, its best to purchase from respective sites, but I've no clue what to do between countries. I also don't know if it's advisable, or even possible, that I use the same train pass (the one for getting from country to country) for train passes within the country.  Over the course of 2.5 months, I need to go from Italy to Austria to the Czech Republic, to Germany, to Sweden, then Belgium, and finally France.  What do I do for the train rides between countries?

Is there a website to search for European train tickets? I mean something like kayak.com, expedia.com, airfare.com, etc for trains? I know there are specific countries' website like bahn.de, sbb.ch, voyages-sncf.com, etc. But is there a website to search and see the prices easily without having to go through many steps?


This one is really hard for me because I feel like it has at least two pronunciations. Examples:  bad /bæd/ where it sounds more like /ee/  practice /præktəs/ where it sounds more like /aa/   Can someone help me with the correct pronunciation? Is there a rule for it? I couldn't find anything.

There is a Cambridge American English Dictionary web-site. I was checking pronunciation on some words that have a common sound "æ". Although the sound supposed to be the same, its pronunciation differs in my opinion. I splitted two groups based on how the words sound.  The web-site I used is .  The first is group:  , , ,   The second one is:  , , ,   First question, does the sound really differ or it is me hearing it differently for some reason?  If it is different in the recordings, should that sound sound the same in all the words?  If it should sound the same, may it possibly differ in the recordings because they were taken from people living in different parts of America?  UPDATE:    Here is my recording in which I read the words from the list by two ways:  1) the one I heard in an American English phonetics video and from a girl living in Minnesota.  2) the one I taught in school and heard from one guy living in Michigan that said that the first option is more Canadian or something.  Are they both possible ways of saying it and I can choose any? If not, what is most correct way of saying it? And please tell me what sounds I make in the terms of transcription. Thanks!


Main question: will oversupplying current to a raspberry pi damage it? For example, will providing 5a at 5v be damaging when the pi requires only (up to) 2.5a at 5v?  Here is my backstory, assumptions, and sub-questions:  I am trying to power a raspberry pi in parallel with a 12v led lamp on the same circuit. My power supply for the lamp is a 1.5a, 12v wall wart. (The LEDs require 12v). The raspberry pi 3 power requirements are 5v and up to 2.5a.  I would prefer to use a buck converter to step down voltage to 5v for the pi rather than a linear regulator, such as the LM7805, so that I don't have to deal with a lot of heat output (and hopefully don't have to end up needing a high current power supply).  Therefore, my design has the LEDs on one branch and a buck converter + pi on the opposite branch of the parallel circuit.  I am considering using the 12v to 5v, 5a buck converter here:   I think power is conserved over the buck converter, and power = voltage * current.  Based on my ammeter, the LEDs of the lamp only require 0.5a of the 1.5a. I'm not sure how the remaining 1a will be divided on the two branches circuit.   Could I just stick a high resistance resistor on the LED side to push the remaining current over to the buck converter and pi?  If so, the power to the buck converter will be:  Power1 = voltage1 * current1  Power1 = 12v * 1a = 12w  The graph Pololu provides appears to indicate that the converter efficiency will be about 92% at Vin=12v and 2  0.92(Power2) = voltage2 * current2  0.92(12w) = 5v * current2  current2 = 2.2a  However, I'm guessing I should supply more current to the pi to be safe. If I got a 2a, 12v power supply I end up "pushing" 3.3 amps at the pi using the above assumptions.  Will this damage the pi or is it completely safe to oversupply current?  I am only a beginner, so let my know if my assumption are off. Thanks!

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


I want To do something like this: have a string "5+5" and when I convert it to integer, expected output want to be 10, but I get runtime error. Would appreciate your opinion.

Is there a function the .NET framework that can evaluate a numeric expression contained in a string and return the result? F.e.:  string mystring = "3*(2+4)"; int result = EvaluateExpression(mystring); Console.Writeln(result); // Outputs 18   Is there a standard framework function that you can replace my EvaluateExpression method with?


Not sure how to explain this, since English is not my native language, but Sketchup automatically tiles everything and you just have to set a length and width of the texture in the material section, you set it in inches, centimeters or whatever and it will be that size no matter what face you apply it to.  In Blender I can't seem to find that, I know that you can down and upscale textures in the uv editor and make them tile, but what if I want the same texture (to remain the same size, for example 5x5 centimeters) on 2 different size faces? I can try by downscalling it, but that's not precise, so can I adjust the texture size automatically and not in relation to the size of a face I'm working on?  For example I have a grass lawn on one part of the map in Blender and another one on the other part of the map, how do I make the texture to be the exact same size here and there, no matter what the size of those lawns are?

I have a large mesh with > 1.5 million faces. I would like to uniformly add a texture to the object without UV mapping (as blender freezes every time). The texture is quite simple and can be applied evenly throughout the object.


I just learned of Newton's law of gravitation and that distance between two bodies is a factor in the gravitational force. My question is if that's true why is the Earth's gravitational acceleration a constant $9.8\mathrm{ms^{-2}}$ as change in force mathematically should mean change in acceleration if you refer to the equation $F=ma$.

I was taught in school that acceleration due to gravity is constant. But recently, when I checked Physics textbook, I noted that  $$F = \dfrac{G  m_1   m_2}{r^2}. $$  So, as the body falls down, $r$ must be changing, so should acceleration due to gravity.


Any restriction site given in any fragment of DNA or vector molecule is a palindrome. eg restriction site for the endonuclease EcoRI is   5'...GAATTC...3' 3'...CTTAAG...5'   Clearly, this is a palindromic sequence. Why is that?

Type II Restriction enzymes usually cut only at palindromic sequences. Is there any specific reason for that? Is there any advantage for bacteria if they cleave phage DNA at this type of sequence?


[Use-case: portable Lo-Dash code]  I've been looking for an elegant Lo-Dash empty-string validator in our nodeJS projects for some time now, because  only handles Arrays and Objects. So I always ended up doing it with the ugly old-fashioned likes of:   if (typeof(myString) !== "undefined" && myString.trim() !== "") {   // handle the string }   ... Until I stumbled upon , which returns '' for null and undefined. So I created a mixin in our extendedLodash.js helper that uses only Lo-Dash methods. However I'm uncertain of caveats; any comment on what I might be overseeing is welcome:   'use strict';  const _ = require('lodash');  /**  * Extension of _.isEmpty(), which will return `true` for   *   "", 0, [], {}, false, undefined and null  * @param stringOrObjectOrNull  * @returns {boolean}  */ function empty(stringOrObjectOrNull) {   return _(stringOrObjectOrNull).toString().trim() === ""       || _.isEmpty(stringOrObjectOrNull); }  _.mixin({   empty });  module.exports = _;   Now we can use this:   const _ = require('../lib/helpers/extendedLodash');  if (!_.empty(myStringOrObject)) {   // handle the string ( ...or object ;-| ) }   And test:     console.log('is empty `[]`: ' + _.empty([]) + " -> " + "`" + _.toString([]) + "`");   console.log('is empty `{}`: ' + _.empty({}) + " -> " + "`" + _.toString({}) + "`");   console.log('is empty `""`: ' + _.empty("") + " -> " + "`" + _.toString("") + "`");   console.log('is empty `"    "`: ' + _.empty("    ") + " -> " + "`" + _.toString("    ") + "`");   console.log('is empty `0`: ' + _.empty(0) + " -> " + "`" + _.toString(0) + "`");   console.log('is empty `false`: ' + _.empty(false) + " -> " + "`" + _.toString(false) + "`");   console.log('is empty `null`: ' + _.empty(null) + " -> " + "`" + _.toString(null) + "`");   console.log('is empty `undefined`: ' + _.empty(undefined) + " -> " + "`" + _.toString(undefined) + "`");   Note: Going over this code again, I realize this behaves just as fuzzy as PHP's  method ... I'm not sure that is appropriate; I just want to avoid necessity of catching undefined where variables might not be declared (...)

I saw , but I didn't see a JavaScript specific example. Is there a simple string.Empty available in JavaScript, or is it just a case of checking for ""?


I would like to ask regarding the below code lines why i get null pointer Exception. Is this something Git related which i don't understand ?  refsideMerge=existingRepo.exactRef("refs/heads/sideMerge"); tmpMerge = git.merge(); tmpMerge.include(refsideMerge); tmpMerge.setCommit(false);//dry run to get conflicting files tmpMergeRes = tmpMerge.call();  Map allConflicts = tmpMergeRes.getConflicts();            for (Map.Entry<String,int[][]> entry : tmpMergeRes.getConflicts().entrySet()) {  System.out.println("Key: " + entry.getKey());   for(int[] arr : entry.getValue()) {    System.out.println("value: " + Arrays.toString(arr));   } }   Description:  After Repeatedly running this code snippet i bump into Nullpointer exception. I want to test my xml Parsing for Merge Conflicts that's why i need repeated Merge Conflicts to handle. Currently only the Merge part is used to generate conflicts.  As far as i realized it stops at the below line  Map allConflicts = tmpMergeRes.getConflicts();

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?


Let $w \in \mathbb C^M$ be a unit norm complex vector. Also, let $s \in \mathbb C^M$ be a unit norm complex vector independent of $w$. We assume that $s$ and $w$ are i.i.d. isotropic vectors.     I am looking for the distribution of $s^* w$, where $s^*$ denotes the conjugate transpose of $s$. I also want to deduce the distribution of $|s^* w|$ and $|s^* w|^2$.  I saw the claim that $|s^* w|^2\sim\mathsf{Beta}(1,M-1)$ but without a proof.  There is a similar thread  that shows that for real vectors scalar product $t =s^\top w$ is distributed such that $$(t+1)/2 \sim \mathsf{Beta}\big((D−1)/2,(D−1)/2\big),$$ but I am not sure how to generalize that to complex vectors.

If $\mathbf{x}$ and $\mathbf{y}$ are two independent random unit vectors in $\mathbb{R}^D$ (uniformly distributed on a unit sphere), what is the distribution of their scalar product (dot product) $\mathbf x \cdot \mathbf y$? I guess as $D$ grows the distribution quickly (?) becomes normal with zero mean and variance decreasing in higher dimensions $$\lim_{D\to\infty}\sigma^2(D) \to 0,$$ but is there an explicit formula for $\sigma^2(D)$? Update I ran some quick simulations. First, generating 10000 pairs of random unit vectors for $D=1000$ it is easy to see that the distribution of their dot products is perfectly Gaussian (in fact it is quite Gaussian already for $D=100$), see the subplot on the left. Second, for each $D$ ranging from 1 to 10000 (with increasing steps) I generated 1000 pairs and computed the variance. Log-log plot is shown on the right, and it is clear that the formula is very well approximated by $1/D$. Note that for $D=1$ and $D=2$ this formula even gives exact results (but I am not sure what happens later).


The method takes 1 array and using random to shuffle the array the value of rndm1-4 didn't change. and after the loop, it acts normal. I think the problem is in the while loop. public static string[] Shuffle(string[] array) {     string str1, str2, str3, str4;     Random rnd1 = new Random();     Random rnd2 = new Random();     Random rnd3 = new Random();     Random rnd4 = new Random();     int rndm1 = rnd1.Next(3);     int rndm2 = rnd2.Next(3);     int rndm3 = rnd3.Next(3);     int rndm4 = rnd4.Next(3);          while ((rndm1 != rndm2) && (rndm1 != rndm3) && (rndm1 != rndm4)          && (rndm2 != rndm3) && (rndm2 != rndm4) && (rndm3 != rndm4))     {         rndm1 = rnd1.Next(3);         rndm2 = rnd2.Next(3);         rndm3 = rnd3.Next(3);         rndm4 = rnd4.Next(3);     }          str1 = array[0];     str2 = array[1];     str3 = array[2];     str4 = array[3];     array[rndm1] = str1;     array[rndm2] = str2;     array[rndm3] = str3;     array[rndm4] = str4;     return array; }

What is the best way to randomize an array of strings with .NET? My array contains about 500 strings and I'd like to create a new Array with the same strings but in a random order.  Please include a C# example in your answer.


Now, what I have done so far is the following:  Let $p$ be a prime such that $p | n^2+n-1$, then $n^2+n-1 \equiv 0 \pmod p$  This congruence has a solution if and only if $x^2 \equiv \Delta \pmod p$ has a solution, where $\Delta = b^2 - 4ac = 1^2 - 4\cdot1\cdot(-1) = 5$.  Since $\Delta = 5$, this has a solution iff $(\frac{5}{p}) = 1$ (the Legendre symbol).  And this Legendre symbol is $1$ iff $p \equiv 1, 4 \pmod 5$   Which, in turn, means $p \equiv 1, 4, 6, 9 \pmod {10}$. But $p$ cannot be congruent to $4$ or $6$ modulo $10$, for otherwise it would not be a prime.  Therefore, $p \equiv 1, 9 \pmod {10}$.  How do I get rid of the $p \equiv 1 \pmod {10}$ solution and prove that it can only be congruent to $9$, i.e. be of the form $10k + 9$, for some k?  Is this proof valid for all choices of $p\neq 5$? If so, mayhap my teacher forgot about the $p$ of the form $10k+1$?

What made me have a question is the following problem.     The prime divisors $p\not=5$ of the integer $n^2+n-1$ are of the form   $10k+1$ or $10k+9$.   I thought $\left(\frac 5 p\right) = 1$, because $5 \equiv 1 \pmod 4$.  So $\left(\frac 5 p\right) = (-1)^{p-1}\left(\frac p 5\right)=1$ by qudratic reciprocity.  Then $p$ should be of the form $2k+1$  But I think there is something wrong, and I have lost.  Is there someone to help me?


I am a holder of vested shares in an USA company. I've bought my shares in 2013 for the FMV (thus I should pay no income on them for 2013) and filed my 83b election with the IRS (and they confirmed) for the 2013 TY. However because I was a non-resident alien in 2013 I did not file my 2013 tax return (and attach my 83b with it). In this case is my 83b election valid? If I submit my 2013 tax return now is my 83b election going to become valid with a back date of 2013?  I've received 25% of my shares in Dec 2014. If my 83b is not valid would I need to pay taxes on them? I have NOT sold any of them. I will be filing a tax return for 2014 as I have other income.   And lastly is submitting the 2013 tax return going to affect the 2014 tax return I am about to submit?

I filed an 83(b) election for stock I purchased in 2011 with the IRS with the 30 days window, but later did not include a copy of it in that year’s tax return.   The the purchase price and the fair market value was the same, so no capital gains tax was applicable that year.   Does this matter? And if so how would I remedy this?  Thanks


<aura:component >     Test </aura:component>     ({     createRecord : function (component, event, helper) {     var navEvt = $A.get("e.force:navigateToSObject");     navEvt.setParams({       "recordId": "0017F00000VA26WQAT",       "slideDevName": "detail"     });     navEvt.fire(); } })

We have below code being called from Cancel button on a Lightning component. We have used this lightning component on VF page.  navHome : function (component, event, helper) {      var urlEvent = $A.get("e.force:navigateToURL");     urlEvent.setParams({       "url": "/home/home.jsp"     });      urlEvent.fire();  }   Above is throwing JS error,     This page has an error. You might just need to refresh it. Action   failed: CsApp:ConfigSettings$controller$navHome [urlEvent is   undefined] Failing descriptor:   {CsApp:ConfigSettings$controller$navHome}   What should be the correct way to navigate Home page?


Although my computer received 29 megabits per second, 29 millions bits per second, why did it take me a long time to download a 9 gigabyte game? For example, the 'Tell Me Why' game.

I want to know about the method with which we can calculate data transfer speed.   If I am sending a 1 GB file through a 1 Gb/s LAN connection, from one computer to another, how much time will it take to transfer that file?


$ sudo apt-get update E: Type ' < !DOCTYPE' is not known on line 1 in source list /etc/apt/sources.list.d/medibuntu.list E: The list of sources could not be read.

I want to update Ubuntu, but I see this message:  E:Malformed line 1 in source list /etc/apt/sources.list.d/medibuntu.list (type), E:The list of sources could not be read., E:The package lists or status file could not be parsed or opened.   How can I solve this?


In particular, the very nice  for gedit. I have a suspicion that it all started when I installed Python3.7 and switched to it by default. Somehow, other things stopped working also, like . Is there a kind of a Python version clash or something? I can't find anything related. I am on Ubuntu 18.04 LTS. Output of ls -l /usr/bin/python*: lrwxrwxrwx 1 root root      24 Jul  2 11:36 /usr/bin/python -> /etc/alternatives/python lrwxrwxrwx 1 root root       9 Apr 16  2018 /usr/bin/python2 -> python2.7 -rwxr-xr-x 1 root root 3637096 Apr 15 20:20 /usr/bin/python2.7 lrwxrwxrwx 1 root root      33 Apr 15 20:20 /usr/bin/python2.7-config -> x86_64-linux-gnu-python2.7-config lrwxrwxrwx 1 root root      16 Apr 16  2018 /usr/bin/python2-config -> python2.7-config lrwxrwxrwx 1 root root       9 Oct 25  2018 /usr/bin/python3 -> python3.6 -rwxr-xr-x 2 root root 4526456 Apr 18 04:56 /usr/bin/python3.6 lrwxrwxrwx 1 root root      33 Apr 18 04:56 /usr/bin/python3.6-config -> x86_64-linux-gnu-python3.6-config -rwxr-xr-x 2 root root 4526456 Apr 18 04:56 /usr/bin/python3.6m lrwxrwxrwx 1 root root      34 Apr 18 04:56 /usr/bin/python3.6m-config -> x86_64-linux-gnu-python3.6m-config -rwxr-xr-x 2 root root 4873376 Nov  7  2019 /usr/bin/python3.7 -rwxr-xr-x 2 root root 4873376 Nov  7  2019 /usr/bin/python3.7m lrwxrwxrwx 1 root root      16 Oct 25  2018 /usr/bin/python3-config -> python3.6-config lrwxrwxrwx 1 root root      10 Oct 25  2018 /usr/bin/python3m -> python3.6m lrwxrwxrwx 1 root root      17 Oct 25  2018 /usr/bin/python3m-config -> python3.6m-config lrwxrwxrwx 1 root root      16 Apr 16  2018 /usr/bin/python-config -> python2.7-config

I just tried to install python 3.6 on my Ubuntu 16.04 system, and now I can't run the terminal from the launcher or from Ctrl + Alt + T. I tried to run gnome-terminal from XTerm and got the following message:  Traceback (most recent call last):   File "/usr/bin/gnome-terminal", line 9, in <module>     from gi.repository import GLib, Gio   File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in <module>     from . import _gi ImportError: cannot import name '_gi' Error in sys.excepthook: Traceback (most recent call last):   File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook     from apport.fileutils import likely_packaged, get_recent_crashes   File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>     from apport.report import Report   File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>     import apport.fileutils   File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>     from apport.packaging_impl import impl as packaging   File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>     import apt   File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>     import apt_pkg ModuleNotFoundError: No module named 'apt_pkg'  Original exception was: Traceback (most recent call last):   File "/usr/bin/gnome-terminal", line 9, in <module>     from gi.repository import GLib, Gio   File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in <module>     from . import _gi ImportError: cannot import name '_gi'   How can I fix this error?  It should also be noted that:   My gnome-terminal file is now a python script. The gnome-terminal.real file will open the terminal as expected. python3.5 gnome-terminal will open the terminal as expected.


wget -N -t 5 -T 10 https://github.com/UbuntuForums/wireless-info/raw/master/wireless-info \     && chmod +x wireless-info \     && ./wireless-info   above command output:

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


This is my first post! I have been around this Forum for some time, but I never needed to ask a question. Unfortunately I can't find a answer suitable for me Problem this time.  I am trying to re-create in Latex the word template shown below.     I managed to design the outer Frame and the margins as in the original template, however, I got no clue how to make the Header an Footer table. Especially I want the Latex template to fill out the "Spec No.", "Revision", "Title" and "Date" fields automaticly, i.e. these values need to be changed for every new text written with the template.  Can someone help me? My current code is  \documentclass {scrartcl}  \usepackage[ngerman]{babel} \usepackage[T1]{fontenc} \usepackage[ansinew]{inputenc} \usepackage{lmodern}  \usepackage{graphicx} \usepackage{tikz} \usetikzlibrary{calc} \usepackage[all]{background} \usepackage{showframe} \usepackage{layout}  \newcommand{\myborderedpage}{%     \begin{tikzpicture}[remember picture, overlay]         \draw [black, line width=0.5mm]             ($ (current page.south west) + (2.2cm,1.2cm) $)             rectangle             ($ (current page.north east) + (-1.4cm, -0.9cm)$);     \end{tikzpicture}         \sffamily         }  \SetBgContents{\myborderedpage}  \SetBgPosition{current page.north west}% Select location \SetBgOpacity{1.0}% Select opacity \SetBgAngle{0.0}% Select roation of logo \SetBgScale{1.0}% Select scale factor of logo  \voffset=0mm \topmargin = -16.4mm \headheight=16.4mm \headsep = 2.6mm \textheight=240mm \footskip=22.5mm   \hoffset=-0.5mm \oddsidemargin=0mm \textwidth=170mm  \begin{document}  \pagestyle{empty} %\layout  %\begin{titlepage} %\end{titlepage}  \section{lorem Ipsum}   \end{document}   regards Splam

I'm a LaTeX newbie. I want to create a page layout like in the picture below on every page.  Can someone help please? Thanks.


I have a table with several date fields. I need to get a derived field that is the oldest date of 3 particular fields. I have to do this for 4 different date sets.

How do you return 1 value per row of the max of several columns:  TableName  [Number, Date1, Date2, Date3, Cost]   I need to return something like this:  [Number, Most_Recent_Date, Cost]   Query?


My brother is sending me a check from Germany. Can I cash that foreign check at any United State Bank?  I have tried to research all the possibilities.

Is it possible to deposit a check issued by a foreign bank in a US bank?  To be specific, I would like to know if I can deposit a check issued by a bank in India in INR in my bank in US. I was able to do the reverse, that is, cash a USD check from BofA in my bank in India.


My assignment requires me to create a noughts and crosses program.  I have managed to get all features working but I wish to add the ability to write to a text file, and call upon said file within a switch case (the switch case is used for the main menu).  Writing the file is not a problem however when it comes to reading it I get 'E0546 transfer of control bypasses initialization of:'.    I have tried containing the switch case {} which allows the program to run but the input is not recognised as being correct.  do    //Do at least once (do loop) - contains the 'game loop' {      mainMenu();      switch (menuChoice)     {     case 1:         cout << "\t\t\t\t\t" << "Please enter your name" << endl;         cout << "\t\t\t\t\t" << ">>" << endl;         cin >> playerNames[1];         init();                                                //Clear the grid and set to player one         do {             playerNames[2] = "Computer";             system("color 03");                                //Change text colour to blue             system("cls");                                     //Clear the screen             DisplayGrid();                                     //Display grid to screen             DisplayInput();                                    //Display input options relevant to single player             CheckInput();                                      //Check player input                                                 CheckStatus();                                     //Checks game status             easyAI();                                          //Computer turn that randomly fills a square             CheckStatus();             system("cls");          } while (toupper(input) != 'F' && toupper(input) != 'M');                              //Checks the player hasn't quit or returned to menu        case 2:         cout << "\t\t\t\t\t" << "Player one please enter your name" << endl;         cout << "\t\t\t\t\t" << " >>";         cin >> playerNames[1];         cout << "\t\t\t\t\t" << "Player two please enter your name" << endl;         cout << "\t\t\t\t\t" << " >>";         cin >> playerNames[2];         init();                                                //Clear the grid and set to player one         do {             system("color 03");                                //Change text colour to blue             system("cls");                                     //Clear the screen             DisplayGrid();                                     //Display grid to screen             DisplayInput();                                    //Display input options relevant to multiplayer             CheckInput();                                      //Check player input             CheckStatus();                                     //Checks game status             system("cls");          } while (toupper(input) != 'F' && toupper(input) != 'M');                              //Checks the player hasn't quit or returned to menu         break;       case 3:         howToplay();         break;      case 4:         runProg = false;         return 0;         break;      case 5:           ifstream reader("score.txt");                                if (!reader)         {             cout << "Error opening file" << endl;         }         default:         cout << "Please use the correct input from the available choices" << endl;         system("pause");     } } while (toupper(input) != 'F');  return 0;  system("pause");  }

I've always wondered this - why can't you declare variables after a case label in a switch statement?  In C++ you can declare variables pretty much anywhere (and declaring them close to first use is obviously a good thing) but the following still won't work:  switch (val)   {   case VAL:     // This won't work   int newVal = 42;     break; case ANOTHER_VAL:     ...   break; }     The above gives me the following error (MSC):     initialization of 'newVal' is skipped by 'case' label   This seems to be a limitation in other languages too.  Why is this such a problem?


A friend of mine asked me to help with his MacBook as Safari didn't load any site.  I connected to his computer using TeamViewer (so internet is basically working), and then did a ping on Google.com, which worked. His Mac runs on OSX 10.6.x (Snow Leopard) with Safari 5.x.  I've tried a few things including:   PRAM reset Delete cookies and browser cache DNS flush Delete cookies/cache/plist in Library Delete and reinstall Safari.app   Non working. I tried downloading Firefox using curl but that seems also not to work.  Any idea what could be wrong?  edit: No proxys active

I can't browse to any website using Safari; yet, Google Chrome and Firefox are working fine. The Mac App Store also reports that it cannot connect.  I am running OSX 10.7.2 on a 2011 MacBook Pro.


AES-ECB encrypts the message by breaking it into blocks and encrypting them one by one. Provided the knowledge of the ciphertext, a portion of the plaintext that corresponds to a block in the message, is it possible to crack the key without brute-forcing?

I have a file, which was encrypted with AES-128 in ECB mode. I know the format of the original file and know that all files in this format have the same headers. So, I have an encrypted block and the original block.  Can I get the encryption key, using this information?


I am fetching the data from JSON file and I have to group those data based on the dates. For example, all the activities occurred during June 6 is listed below them. i.e. June 6 is header and all the event occurred them is listed as Even.  My problem is while I am trying to convert those dates into some format I am getting null pointer exception.   There are two layouts one for a header which has a date and other for events. I am trying to set the date into the header layout in onBindViewHolder method of the adapter. There I am getting null pointer exception  Thank you  @Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, int i) {     switch (viewHolder.getItemViewType()) {         case ListItem.TYPE_HEADER:              HeaderItem dateItem = (HeaderItem) consolidatedList.get(i);             HeaderViewHolder dateViewHolder = (HeaderViewHolder) viewHolder;             String pattern = "yyyy-MM-dd";             DateFormat df4 = new SimpleDateFormat("MM dd, yyyy");              Date date = null;             String str4 = null;             SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);             try {                  date = simpleDateFormat.parse(dateItem.getDate());                  str4 = df4.format(date);              } catch (ParseException e) {                 e.printStackTrace();             }              dateViewHolder.mDate.setText(str4);              break;          case ListItem.TYPE_EVENT:              EventItem event = (EventItem) consolidatedList.get(i);             EventViewHolder holder = (EventViewHolder) viewHolder;             holder.mDate.setText(event.getStreamItem().getDate());             holder.mDesc.setText(event.getStreamItem().getDesc());             holder.mTitle.setText(event.getStreamItem().getTitle());              String image = event.getStreamItem().getImage();              if (image.contains("education_icon.png")) {                  holder.mImageView.setImageResource(R.drawable.boardofeducation);             } else if (image.contains("legislature_icon.png")) {                 holder.mImageView.setImageResource(R.drawable.legislature);             }             break;     } }   //HeaderView Holder  private static class HeaderViewHolder extends RecyclerView.ViewHolder {          protected TextView mDate;          public HeaderViewHolder(@NonNull View itemView) {              super(itemView);              TextView mDate = itemView.findViewById(R.id.date);         }     }   Here's the error.  java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference         at com.example.dipalbhandari.nebraskacapitollive.StreamArrayAdapter.onBindViewHolder(StreamArrayAdapter.java:97)

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?


let $p$ be a prime and let $a$ be an integer not divisible by $p$, that is $(a,p)=1$. Then $\{a,2a,3a,...,pa\}$ is a complete residue system modulo $p$.  Since $p\nmid a$, $p\nmid\{a,2a,3a,...,(p-1)a\}$ Since $p|p$, $p|\{pa\}$ which is exactly one element in the set and is therefore a complete residue system.   Wondering if this is an acceptable proof to this theorem.

I was given a proof of this in class, but it does not make sense to me, can someone provide a better proof, or explain the one I have provided, thanks.  Suppose $\gcd(a,n) = 1$, where $a$ and $n$ are natural numbers. Prove that $0$, $a$, $2a$, $3a,\ldots, (n-1)a$, is complete residue system modulo $n$.  Proof given in class:  \begin{align*} ka &\equiv ra \pmod{n}\\ &\Rightarrow  k \equiv r \pmod{n}\\ &\Rightarrow  \text{$k-r$ divides $n$}\\ &\Rightarrow \text{$k=r$ because $0\leq k\lt n$, $0\leq r\lt n$} \end{align*}


I'm currently doing a design course and have been tasked with recreating a typographic piece including the fonts.  What is the best method for identifying fonts? I have tried the online 'questionnaire' style identifiers as well as image upload ones, but they are inaccurate at best.  I have specifically tried WhatTheFont and Identifont with this sample:

How is it possible to determine the fonts used by text in PDF and TIFF files?


I'm having trouble running Linux, I reserved 200 gb's for linux, and put my ubuntu iso into unetbootin. When I restarted my pc to boot Ubuntu it gave me a missing/corrupted file error which I scanned with windows and windows showed I had no corrupted files. I tried using this youtube video () to fix my problem, but my bios version found here () does not include the settings shown in the video. I haven't been able to work for about a week because I've been also having troubles downloading windows 10 which i need for my new intel hd 4600 drivers so I decided to go for Ubuntu. I'd really appreciate anyone who could help me, thank you.

Since 2days onwards iam unable to install ubuntu on my windows 10  i am trying to install 20.04 version of ubuntu its appearing like this SQUASHFS ERROR:UNABLE TO READ DATA AND PAGE


I have a synchronization running in the background. I thought I'll find the answer within seconds, but somehow I am not able to do so.  I would like to get a notification when that program closes or is terminated, i.e. is not running for whatever reason.  I thought it should be possible to use the task scheduler for that with a trigger "when a specific event is logged", here the exe is closed. But is there an event logged when a process is terminated? If yes where do I find it?

I'm looking for a program/utility to monitor a process running in Windows 7 (actually it's a Java process ran from .jnlp). and that can send an e-mail alert or trigger any kind of script so I can be aware that it has crashed ?   From what i've seen there's nothing like that.  Any ideas ?


hi I have pip installed on my python but I need to install some packages that require pip3, I couldnt change pip to pip3.  an ideas? Kay

I have 14.04. I read on the pip readthedocs that pip is included by default with Python 3. When I installed Python 3 on Windows it was there, but I'm getting pip command not found on Ubuntu. I checked dpkg and it is not there. I also looked at the Ubuntu Python 3 port page and did not see anything. If pip is here, where do I find it and get it working? If it is not here, why and what else is missing from the default Python 3 that I should know about so I don't waste time looking for it?


the inverse set of $\ \left(A,<\right) $  is $\ \left(A,<^{-1}\right) $ with $\ a<^{-1}b\iff b<a$  the set and its inverse are not well ordered

While grading some papers and thinking about a question related to well-orders (in particular, pointing a mistake in a solution), I came to think of a reasonable characterization for well-orders. I can immediately see it's true for countable orders, but not for uncountable orders.  Definition. Let $\cal L$ be a first-order language, and $\cal M$ an $\cal L$-structure. We say that $\cal M$ is rigid if $\text{Aut}(\cal M)=\{\rm id\}$.     Conjecture. Let $\cal L=\{<\}$. Then $\mathcal M=\langle M,<\rangle$ is rigid if and only if it is a well-order or its reverse order is a well-order.   One direction is trivial. Well-orders are rigid (and therefore their reversed orders are rigid as well). In the other direction, if $\cal M$ is countable, then it is easy. Suppose it's not a well-order.   If $\cal M$ contains a convex copy of $\Bbb Z$ then fix everything else and shift that copy by $1$. Otherwise $\cal M$ contains a convex copy of $\Bbb Q$ and then we can shift that copy by $1$ (or multiply it by $\frac12$, whatever floats your boat).   The problem is that for uncountable order types the plot thickens and they might be $\kappa$-dense, so neither of the arguments would work (and there is no additive structure - that I know of - that we can exploit like in the countable case).     Question: Does the conjecture hold, or is there some intricate counterexample?


I'm making a trigger that runs when contacts are updated. Part of that trigger is to get a list of accounts (the whole object, not just the ID) associated with the contacts that are being updated.   Initially I was doing a SOQL query in a loop, but this eventually ran into limits when doing imports from the data loader.   List<Account> Accounts = new List<Account>(); for(Contact c: Trigger.new){     Accounts.add([SELECT ID, Other_Fields FROM Account WHERE ID = c.Account]); }   Is there a way to get a list of master records when from the detail/child records in trigger.new that is bulk friendly.

A general question asked from time to time on stack exchange is question of trigger bulkification.  Therefore I have 2 questions:   Which best practices are you using? What is the best way to handle updates of more than 200 records? (In case of more than 200 records the trigger is executed more than once.)


why does browser throw Error for var null; ?  I am reading  and I know undefined is a global variable different from null.    But I am just curious about that why it throws Error when dovar null; in contrast, when var Number=123,var Boolean=123,var Object=123,var undefined=123(although useless), etc.,it's ok.  As far as I know, null is not a reserved word and keyword in JavaScript. It should be a primitive type.  How does var work exactly in relation to null?

What JavaScript keywords (function names, variables, etc) are reserved?


I have four physical displays and like using applications in full-screen mode. While working, I typically have around 10 apps running in full-screen. I frequently to rearrange the full-screen windows, moving them from one display to another by switching to mission control mode and then dragging and dropping the windows. Is there a way to do this using a keyboard shortcut or an Apple script? To clarify: I would like the app windows to remain in full screen mode at all times. Tools like Better Touch Tool, , only work with apps that are not in full screen.

Is there a free app that I can use to move a window from one monitor to the other monitor (assuming only two monitors) via the keyboard? I shouldn't have to use the mouse at all (e.g., for selecting the window or the monitor, or for dragging).  I know this can be done in Linux using compiz; I'm surprised there isn't a (free) option for OS X.


In the following C program,'s' is declared as character pointer and assigned with a string "Fine", now I am trying to replace the first character to 'N' that should result in "Nine". But this program results in runtime error.   #include<stdio.h>  main() {    char *s = "Fine";    *s = 'N';     printf("%s", s); }   whereas, if the above program is changed as following, declaring 's' as a character array, the program runs without any error and output will be "Nine"  #include<stdio.h>  main() {    char s[] = "Fine";    *s = 'N';     printf("%s", s); }   I do not know the reason behind this issue. It would be great if someone explains me. Thanks in advance.

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


Lately I've noticed lots of search results coming up on the domain .  They appear to be [solved] questions from   The questions and answers are identical, and even the user pictures seem to be copied over.  Is this a legitimate affiliate of Stack Exchange that is intended to provide additional value?

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


I've been trying to install Ubuntu for awhile now, and have been pretty much 100% unsuccessful, aside from the LiveCD portion of it.  So my issue is this: I successfully reach the GRUB menu, but choosing anything related to Ubuntu at that point simply causes a purple screen.  I tried to launch it in Recovery mode, and it ended up with the same screen.  I edited the startup commands for the main boot option and replaced "quiet splash" with nomodeset, changed the $linuxgfxmode to nomodeset, and pretty much tried everything, but I cannot in any way get Ubuntu to boot.  I have an AMD A8-4500M APU with Radeon(tm) HD Graphics x 4.  The Boot-Repair program said something about the EFI settings, and that I was in Legacy mode. What does this mean? Is it a problem with the installation?  I have no real idea of what to do. Any and all help would be appreciated.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I want to run this MySql query in MSSQL.  Is there any possibility to achieve that, by modifying this query?  Select   sku,  (select group_concat(sku separator ",")  from catalog_product_entity as _e  where _e.entity_id in (select product_id from catalog_product_super_link as  superlink where e.entity_id = superlink.parent_id))  from catalog_product_entity  as e where type_id = "configurable"  group by sku

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


Why do we use an before old lady and a before a one  eyed giant?

In the following example, is it appropriate to use a or an as the indefinite article, and why?     He ate __ green apple.   I know that in the case of just "apple", it would be "an apple," but I've heard conflicting answers for "green apple," where the noun is separated from the article by an adjective.  Also, which is more appropriate in this case:     He ate  __ enormous Pop-Tart.


How can i make this texutre look less repetitive?

I added an Image Texture to a plane using a seamless image.  In the Texture context of Properties window, I set Scale to be X:10, Y:10.  Unsurprisingly, a pattern forms when you zoom out from plane:    How can I get rid of this pattern?  (this is supposed to be grass, so it should look very random)    EDIT: For example, is there any way to add distortion to how the image is tiled onto the plane?  So if I were to represent the surface of the plane with a grid, the pattern on it would become distorted, like this


I'm reading Casella and Berger's . In chapter 5, they show that we can recover the distribution of the sample mean by using the following relationship between the MGF of the underlying random variable and the MGF of the sample mean distribution: $$M_{\overline{X}}(t)=[M_{X}(t/n)]^{n}$$ However, this will not work when the random variable $X$ don't have a MGF. Reading the book, and other contents in the internet, I found out that Cauchy distribution has no MGF and, therefore, this procedure will fail in this case. Why Cauchy distribution has no MGF? Are there others distributions with this property? P.S: I read this  in my previous research. It's a very good question and now I understand why Cauchy distribution has no mean. I believe my question is not duplicate since the MGF is a more general concept than the mean.

Can a distribution with finite mean and infinite variance have a moment generating function? What about a distribution with finite mean and finite variance but infinite higher moments?


Can anyone give me a tip how to achieve homogenous color of the wooden floor? What am i doing wrong? Parts of the wooden floor are brown, then other parts (behind the bed on the right side)are green... It's like too much of the wall is reflecting of the wooden floor which is nonsense!!

In a blender cycles project I am working on, I made a scene that includes grass, and it all renders fine, but there is a rather serious green tint in the shadows under the deck. The lighting is a flattened sphere with the normals turned inward and a sky texture node applied to it. The grass has a simple dark-green hair texture node. Farther out, I have a flat plane that is also green, with a noise texture and color ramp to generate a sort of clumpy grass look.   I definitely don't think I would see a green tint in real life, but I don't think a camera would have it either. I thought it was kind of interesting that it had such a sunrise/early morning feel to it when the sky texture has the sun straight overhead.    Light Sphere nodes:    Sky Texture - Preetham, Turbidity 2.2, Vector from Texture Coordinate: Object Vector Emission texture - Strength: 1, Color from Sky texture   Grass nodes:   Hair BSDF - Color: Dark green, both roughness set to 1.0.   Grass plane nodes:   Diffuse BSDF - Color: varied dark green, roughness: .358


Why this sort function in js is not giving a sorted response? The result is the same as the input. When I extract just the name, sorting without a function works just fine. Thanks. let array =  [{name: "12-text-04.jpg", alternativeText: Text abc"}, {name: "12-text-02.jpg", alternativeText: Text abc"}, {name: "12-text-03.jpg", alternativeText: Text abc"}, {name: "12-text-01.jpg", alternativeText: Text abc"}, {name: "12-text-06.jpg", alternativeText: Text abc"}, {name: "12-text-05.jpg", alternativeText: Text abc"}, {name: "12-text-share.jpg", alternativeText: Text abc"}]  array.sort((a, b) => {     return a.name > b.name; });

I have a list of objects I wish to sort based on a field attr of type string. I tried using -  list.sort(function (a, b) {     return a.attr - b.attr })   but found that - doesn't appear to work with strings in JavaScript. How can I sort a list of objects based on an attribute with type string?


I see this template just uses  {{ rows }}   Is it possible to get values from the views fields in this file?

How to print fields value in views-view.html.twig I have created a views-view.html.twig file for my view slider_3. The template name is 'views-view--slider_3.html.twig' The view formatting is done by this template, but I need a field is come at begging position of the view:  <div class="slider-3-main">{{ rows.required_field }} <div{{ attributes.addClass(classes) }}>   {{ title_prefix }}   {% if title %}     {{ title }}   {% endif %}   {{ title_suffix }}    How can be the field will written to display at {{ rows.required_field }}


Much in the way that Dumbledore told Harry that it was unhealthy to stare at the reflection of his parents in "The Socerer's/Philosopher's Stone," I get the feeling that it would be easy to want to form a relationship with a portrait of a dead loved one.  For example, were I Harry, I might want to go back and speak with the Dumbledore portrait on a regular basis, to tell him about my kids and my career, and hear what "he would have said" on subjects he otherwise will never have the opportunity to comment on.  But are Hogwarts portraits - which have been described in other answers here to mainly repeat "catchphrases" and mimic general behavior - able to respond to novel stimuli and learn new information?  The case of Phineas Nigellus seems to indicate that they can, to some degree.  My impression (based upon previous answers to questions relating to the portraits) is that it would be like talking to an advanced A.I. bot, in that it might respond in appropriate, if occasionally bland or repetitive ways.  Although the examples we have in the actual books make their responses seem reasonably sophisticated and sentient.    So what kind of response would Harry would get if he returned to Dumbldore's portrait to tell him, "I married Ginny Weasely!" or "I named one of my sons after you!" or "Do you think I should be an Auror?"

Does J.K. Rowling address how the interactive portraits work? Would a portrait painted after a Wizard/Witch died become interactive, or does the painting of the portrait have to take place during the Wizard/Witches lifetime?


All we can be certain of is consciousness in the present. What can we conclude about consciousness in the past? Can we even conclude that it existed? Whenever someone presents "evidence" of having consciousness in the past, what they really mean is they have a memory in the present of some past experiences. If one totally forgets some past experience, what can we say ontologically about the consciousness of that experience?

People seem to believe that one's consciousness is a "different" consciousness than that of others, but the "same" consciousness as the one that has been in one's body in the past and the one that will be in one's body in the future. How likely is this to be true and why?   Also, I have almost no knowledge about neuroscience, so please refrain from using neuroscience jargon if feasible.


My dentist is Dr. Wang and my physician is Dr. O'Connor but I also refer to my professor as Dr.   Are these the same titles? Did they all achieve what it took to get a Dr. title?

Reading the question posted  left me with a more general question:  Given the professional title and name: Dr. (First Name)(Last Name), is there some way to differentiate between the holder of a philosophical doctorate and a medical doctor? Wouldn't it be more appropriate for a PhD holder to have the title (First Name)(Last Name), PhD?


I am facing Mixed DML error in the following case:  static testmethod void method1() {     User u1 = DataFactory.createUser('testUser','test@user.com','permissionSetAPIname');        Obj1 rec1 = DataFactory.createrec1('Record1');     insert rec1;      Obj2 rec2 = DataFactory.createrec2('Rec2',rec1,system.today()-10, system.today()+10 );     insert rec2;       Obj3 rec3 = DataFactory.createrec3(rec2,'Tester',u1,'US');     insert Role;      test.starttest();         //testing code      test.stoptest();  }   However the following is working fine  static testmethod void method1() {      User u1 = new User(Alias = 'testRole',                   Email             = 'role@test.com',                   EmailEncodingKey  = 'UTF-8',                   LastName          = 'user',                   FirstName         = 'test',                   LanguageLocaleKey = 'en_US',                   LocaleSidKey      = 'en_US',                   ProfileId         = [select Id from Profile where Name = 'Basic User' limit 1].Id,                   TimeZoneSidKey    = 'America/Chicago',                   Username          = 'stakeholder@test' + Math.round(Math.random() * 10000) + '.com',                   UserRoleId        = null,                   Country           = 'Great Britain');     insert u1;         Obj1 rec1 = DataFactory.createrec1('Record1');     insert rec1;      Obj2 rec2 = DataFactory.createrec2('Rec2',rec1,system.today()-10, system.today()+10 );     insert rec2;       Obj3 rec3 = DataFactory.createrec3(rec2,'Tester',u1,'US');     insert Role;      test.starttest();         //testing code      test.stoptest();  }   Please explain the difference. As my understanding is that transaction remains the same in both the cases.

Within my community there are customer users with Customer Community Plus licenses who are considered to be "company admins" for their respective companies. A company admin needs to be able to add other users from their company, which effectively involves creation of a Contact record and a User record for the new user.  The problem I'm experiencing is this:   If I try inserting the Contact record and the User record in the same code context, I get a MIXED_DML_OPERATION exception. If I try using , I get this error: "You are already logged in."   Other than breaking out the Contact record creation and User record creation into two operations that execute in two separate code contexts (e.g., actions on a Visualforce page), is there any way to efficiently enable a logged in customer user to add another user?


Im making a katana, and modelling the wrap that goes around it. I finally got the shape down but i cant use shrinkwrap to shrinkwrap it to a cylinder because it comes out weird like this    Extruding wont help, heres what it looks like before:   one half of the mesh is supposed to be on top of the other, and when i shrinkwrap it, it turns the shape into a cylinder type and takes away the overlap. I can't use the curve modifier because it messes it up too.   As shown from top view:

I have a default sphere and created ornamental design. I want to coil or wrap on the sphere. I tried shrinkwrap modifier but it did not work. Is there any other i can coil or wrap the design on the sphere.      Similar to like this    Below Aladdin lamp is my model and i want to wrap on that lamp.   Any suggestion or help. Thanks


I am using ubuntu 18.04. When I try to run sudo apt-get update I am getting the following error. Can anybody try to help me solve this problem?  E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi  E: Sub-process returned an error code   Following this when I try to run sudo apt-get update It completed successfully .

The terminal gave me these errors when updating the software with sudo apt update.    Hit:1 http://it.archive.ubuntu.com/ubuntu bionic InRelease Hit:2 http://it.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                                                Hit:3 http://it.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                                Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease                                      Hit:5 http://archive.canonical.com/ubuntu bionic InRelease                 Traceback (most recent call last):                       File "/usr/lib/cnf-update-db", line 8, in <module>     from CommandNotFound.db.creator import DbCreator ModuleNotFoundError: No module named 'CommandNotFound' Reading packages list... Done E: Problem executing scripts APT::Update::Post-Invoke-Success     'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db;       then /usr/lib/cnf-update-db > /dev/null; fi'   E: Sub-process returned an error code     These are the results of sudo apt install --reinstall command-not-found  Reading package lists... Done  Building dependency tree         Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. Need to get 0 B/5.188 B of archives After this operation, 0 B of additional disk space will be used. (Reading the database ... 225797 files and directories currently installed.) Preparations for extracting ... / command-not-found_18.04.4_all.deb ... Extracting command-not-found (18.04.4) on (18.04.4) ... Configuring command-not-found (18.04.4) ... libdvd-pkg: Package libdvdcss2-1.4.2-1 was removed, stop processing...   When I tried the command sudo apt update again after reinstalling command-not-found, the results were the same as described in the first text block.


Today I visited the sign up page of Interpersonal Skills from a browser which I didn't signed in to Stack Exchange and saw a message,     Warning: this site is currently in **private beta** for at least 1 more day.   I assume the double ** is used to indicate the private beta in bold text.  But it actually renders as    The same also happens in the Login message.

Private beta  shows **private beta** instead of making the text bold. Based on this question the  on the login page (however 4 years ago it was shown in italics).


First of all, this question also relates to physics but goes beyond it, into the phylosophical field.  After dealing with physics engines in computer engineering, an idea of something similar crossed my mind.  When thinking about every physical process in nature where events trigger new scenarios of matter and energy in different states, one might think that an "engine" of some kind must have had to calculate all aspects of the initial states to actually produce results in the universe.  An example of this would be throwing a glass against a wall. Given all kinds of variables (speed, air-related variables, materials variables, wall variables, etc), something or someone must tell the glass into how many pieces it should be broken and at which speed and angle each piece has to rebound. This way, something in the universe must be constantly calculating all data (seen as "inputs" of the system) to produce the inmediate future state of the universe. The rules are somehow written and this engine would apply them fore every aspect and in every corner of the universe.  I know that the concept of formulas and variables are a human post-construction that comes after observing the universe, but it can be said that some these rules where there before and independently of human thought (this might be another topic).  Having said this, is there a school of thought that deals with this concern? is it even a surrealistic topic?

I often think about problems that require an understanding of the very essence of computation and its inherent limitations. So, my questions are as followed:   Is the universe isomorphic to a universal turing machine? Is the universe isomorphic to a universal quantum computer? What evidence do we have within our universe to support an answer to such a question? What corollaries follow from a universe that is or is not isomorphic to a universal turing machine (or universal quantum turing machine)? Is this question really answerable, and what is the current literature on this subject?   I'm mostly interested in the implications and corollaries that follow from a universe that is or is not isomorphic to a turing machine (or universal quantum computer) and the insights that it would provide us with, about the nature of computation.


I have a bash script that I want to run when I double click it, so I've renamed my script.sh file to script.command. The script now gets executed when I double click it, but its working directory is my user's home, so I have to ad a cd to my script's path before I can get things working. Since I want to commit this script to my git repo and share it with my team, I'm looking for a way to automate this "cd to the .command file's directory before doing anything else". Is there a way to achieve this? For now each person on the team has to edit the script and add their path at the top of the script.

I wrote a bash script in order to directly start eclipse from different workplace locations. Each workplace contains the script, after running it, eclipse is started with the respective workspace set.  #!/bin/bash  # relative path #ECLIPSE_DIR='../../' ECLIPSE_DIR='/Users/mike/Development/java/' ECLIPSE="${ECLIPSE_DIR}eclipse/eclipse.app"  AUTHOR='mike'  # current directory is workspace WORKSPACE=`pwd` echo "WORKSPACE = $WORKSPACE"  # start eclipse from current directory #open -n $ECLIPSE --args -data $WORKSPACE -vmargs -Duser.name='$AUTHOR'   The script is working, when I run it from the terminal. But when I double-click it, it uses the home directory as working directory and thus starts eclipse not from the directory that contains the script.  Apparently scripts are executed from ~/., which is the cause for my trouble. What can I do to fix this? Or how can I change my script to get the desired behavior?


I created a blend file which is sun lens flare created in Cycles render. I can access the lens flare in node editor but not in the 3D view's rendered mode. Can anyone tell me how to view it on 3D view mode? Or if it's just created in node editor so it can only be viewed in node editor? Thanks!

I have made an object glow using nodes and cycles render. when I hit the render button in the properties panel it glows fine but when I go into the rendered view it won't glow. Is this even possible?  Rendered when render button is clicked:    Rendered in viewport:


The Matrix the movie regards the whole world as being binary and us living in a computer simulation. Could the world be represented as binary similar to a matrix or is that not practical give quantum mechanics?

Here is an idea: As human kind we discovered many laws, formulas, events, etc. in our surrounding environment.here is a way to discover the unknowns :   Now if we simulate a virtual world with our knowledge in computers we expect it to work, because we guess that we know all of it. If a bug occurs in the simulation or something acts differently from the expected in the real world, that may tell us that there is something new; a thing (law, formula, ...) that we didn't know, which causes that bug or that anomaly.  For examples imagine that we created a virtual simulation for motion dynamics and we didn't add the friction to our simulation. Everything in the simulation will work fine but in a different manner. So if we hadn't discovered friction yet, would it help us to think about if there is something we didn't add? Or if there is something we don't know?       But can we simulate the whole universe, everything we know, in one simulation? I know it will require a deadly high computational power. Something like what they did for DNA; two years of computation to analyse their pattern. can we simulate everything we know to create a virtual universe to compare it to our real universe?


When you gain something, it means that you will lose it some days. That is indeed. However, there is 2 kinds of losing. Lost something without aware of it and vice versa. And I believe that when we know we've lost something, it will cause a great discouragement for us.  No hard feeling about this, I've joined the Stack for quite few years (I lost my old one, this is my new account). I know how to ask questions, how to answer it, and how to accept the fact of losing rep. But it's not like everyone, such as newbie, could understand this.  What I am trying to say is to announce users that they have just lost reputation isn't a good idea. I understand that we should record it for transparent purpose. Imagine what happen when we're announced that we've lost rep because this or that, more or less, disappointed feeling is something hard to avoid. This especially true for newbie, who need a good support and encouragement to join the community.  Generally, Stack communities are built on the good purposes. But keep treating each other 'equally' as machine isn't a good idea. Not at all.

Occassionally, my posts get down-voted. However, most of the time they are up-voted.   When I get a positive reputation change, you get a notification at the top of the site that says +whatever reputation for things like up-votes, accepts and edits. However, when you lose reputation, you have to notice your reputation go down strangely and then actively look in your reputation history to see where the down-vote came from.   So my question is, bearing in mind that there are notifications for positive changes in green; surely it would be logical to notify negative reputation changes in red for example?


I was wondering if there is a word used to describe someone who starts arguments just because they get enjoyment/satisfaction out of it. And I don't mean a friendly debate I mean actual arguments, like a fight. I feel like there is a word for it but I can't think of it and if there is no word then I am going to make one for it :). P.S. "Devil's Advocate" is not the word I am looking for.

What's the word to describe someone who acts arrogantly and always disagrees with others unreasonably in order to upset people around him/her?  [I'm not looking for adjectives like unpleasant, annoying, unfriendly, rude, I'm looking for a more specific term like opinionated, didactic, loquacious, gregarious ]  I think I'd come across it before but I've forgotten what it is..


Can someone explain me what this System.Timer does with the ElapsedEventHandler? I don't understand this syntax:  private readonly System.Timers.Timer _timer7 = new System.Timers.Timer(); this._timer7.Elapsed += (ElapsedEventHandler) ((A_1, A_2) =>       {         this._logger.LoggingOfError("T7-Timeout");       });

I have quickly read over the  documentation.  This kind of example has helped me to understand better, though:   delegate int del(int i); del myDelegate = x => x * x; int j = myDelegate(5); //j = 25   Still, I don't understand why it's such an innovation. It's just a method that dies when the "method variable" ends, right? Why should I use this instead of a real method?


Here is the SSCCEE     java.lang.NullPointerException    at PotterMCSR.test(PotterMCSR.java:1786)    at PotterMCSR.jbInit(PotterMCSR.java:452) at PotterMCSR.<init>(PotterMCSR.java:448) at PotterMCSR$1.run(PotterMCSR.java:343) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)   I'm trying to parse a double from an object using getValue() in order to add a bunch of values from different text fields and send that total to a different text field. I think it is because when it tries to parse the getValue() it is null.      protected void do_ftfIncomeSalary_propertyChange(PropertyChangeEvent arg0) {      Double salary = ((double)((ftfIncomeSalary.getValue())));      Double CurrTotalIncome = ((double)((ftfTotalIncome.getValue())));      Double totalIncome= salary+CurrTotalIncome;      ftfIncomeSalary.setValue(totalIncome); }

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?


So I have this computer Hp pavilion dv5220 and I can't use it it's stuck with one user and I don't have that password all I can use is the guest account and I can basically do nothing as a guest it's on 14.04 software and I can't run and updates or anything without an actual account and I no wifi

I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution?


I don't know how to phrase this question better, so a quick snippet of my code should explain what I want:  $("tr").each(function(){     if($(this).find("img[src='https://example.com/img.png']")){         console.log($(this).find("a.myClass").text());     } });   I have a table with many rows in it (hundreds), and i'm trying to indentify the correct row by seeing if it has a certain image inside of it. After the row is indentified, it looks for a link using its class as the selector and then prints out its text content.  The problem is that the code above doesn't work, and I can't figure out why. It prints out text from table rows that don't have the correct image

How can I check the existence of an element in jQuery?  The current code that I have is this:  if ($(selector).length > 0) {     // Do something }   Is there a more elegant way to approach this? Perhaps a plugin or a function?


I have a .m file and call .m file with \lstinputlisting{****.m}.  but I want LaTeX to show lines 13 to 25. How is it possible?

I wanted to tidy up a TeX document and was curious if you can use \lstinputlisting or a similar function to include a certain part of a source-code file.  Example, I have a 500 or so line source file and I want to include just lines 300-400.  Is there a way to do this?


I don't know why I can't handle this exception that is caused by that code:      private void checkedListBox1_SelectedIndexChanged(object sender, EventArgs e)     {         try         {             for (int i = 0; i < checkedListBox1.Items.Count; i++)             {                     int id = int.Parse(((DataRowView)checkedListBox1.Items[i])[0].ToString());                     bool check = checkedListBox1.GetItemChecked(i);                     DataRow[] dr = dt.Select("id = " + id.ToString());                     dr[0][2] = check;             }         }         catch (StackOverflowException) { }     }

I would like to either prevent or handle a StackOverflowException that I am getting from a call to the XslCompiledTransform.Transform method within an Xsl Editor I am writing. The problem seems to be that the user can write an Xsl script that is infinitely recursive, and it just blows up on the call to the Transform method.  (That is, the problem is not just the typical programmatic error, which is usually the cause of such an exception.)  Is there a way to detect and/or limit how many recursions are allowed?  Or any other ideas to keep this code from just blowing up on me?