By way of an example I have a txt file that contains a list of dogs, one on each line of the file and then "**" on the last line.  I then have the following code to load this into an ArrayList to use in a JComboBox.  This way I can simply add another line in the text box to add another dog.  My example code is as follows  public class test{ static String temp;  public static void main(String[] args) { List<String> picklistDogs = new ArrayList<String>(); File picklistFile = new File (filePath); try {     BufferedReader loadPickList = new BufferedReader (new FileReader(picklistFile));     while(true) {         temp = loadPickList.readLine();         if (temp != "**") {             picklistDogs.add(temp);         } else {             break;         }     }     loadPickList.close(); } catch(FileNotFoundException e){     System.out.println("file not found"); } catch(IOException e){     System.out.println("file io error"); } } // END of main } // END of class test   My problem seams to be that the if statement never triggers the break to exit the while loop.  Any solutions would be appreciated.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Can I only prove that they have the same cardinality, and, by definition, having the same cardinality implies that there is a bijection between the sets, or do I have to prove that there is an injection and a surjection between the sets?

I got this question in homework:     Let $\{0,1\}^A$ the set of all functions from A (not necessarily a finite set)       to $\{0,1\}$. Find a correspondence (function) between $\{0,1\}^A$ and       $\mathcal P(A)$ (The power set of $A$).       Prove that this correspondence is one-to-one and onto.   I don't know where to start, so I need a hint. What does it mean to find a correspondence? I'm not really supposed to define a function, right?  I guess once I have the correspondence defined somehow, the proof will be easier.  Any ideas? Thanks!


Find all $x \in \mathbb{R}$ for which $$10^x+11^x+12^x = 13^x+14^x$$  Testing couple of values one can quickly see that $x=2$ satisfies the equation. Also dividing by $13^x$ the $LHS$ becomes a decreasing function of $x$ and the $RHS$ becomes an increasing function of $x$, hence $x=2$ is the only solution. I tried the same problem using calculus, but couldn't get it to work. I tried subtracting the $RHS$ from both sides and then differentiating, but this didn't lead anywhere. Could this be solved with calculus?

Find all real numbers $x$ for which $$10^x+11^x+12^x = 13^x+14^x.$$   I thought about taking the logarithm of both sides, but didn't see how that would help. How can we make the equation simpler?


Every once in awhile, I'll see something like this:    Now, none of the questions are bad per se, but some of them aren't great either. A couple had unformatted code, and after years of using the site, are questions that I just wouldn't expect to be upvoted. It looks like someone just rolled a die and upvoted an arbitrary series of questions.   Is this something I should be at all concerned about? Should I flag any of them? My main concern is that if someone's sock-puppeting, mass up voting posts around their own could take the attention off of their post.

See this question    The entire content of the question, copied verbatim, is      Java code to read the end page of PDF file and add a Digital signature at the end line of PDF using i Text.   Within less than 1 minute of being posted it already had one upvote.  I see this quite often, really horrible questions with no redeeming content getting one or two upvotes. Usually, the questions are from very-low-rep users (i.e. <1000) but this happens for higher rep as well.  Is there a random new-user upvote "feature" to encourage new users?  Or, is there some other mechanism or unintended incentive that encourages this?


I have a table that contains a column with categorial data (let's call it 'category') and another column that contains arbitrary strings (let's call it 'text').  Now i would like to see few examples of text for every category, in other words: For each category show first 5 values of text. The text values don't need to be sorted by any criteria (i don't want the top 5 longest strings or anything like that), just the first encountered (random) ones.  The result should look something like this:  +----------+------------------+ | category | text             | +----------+------------------+ | cat A    | random string 1  | | cat A    | random string 2  | | cat A    | random string 3  | | cat A    | random string 4  | | cat A    | random string 5  | | cat B    | random string 6  | | cat B    | random string 7  | | cat B    | random string 8  | | cat B    | random string 9  | | cat B    | random string 10 | | cat C    | random string 11 | | ...      | ...              |   I cannot afford quadratic complexity, since the table is really huge, tens of milions of rows.  I also would like to avoid unioning subqueries for each category manually  select ... where category = catA union  select ... where category = catB union select ... where category = catC union ...   because there is like 50 different categories.  And to the top of it, i cannot use any database-specific featues, because my database isn't any of the traditional relational databases, but an Apache Hive, that only supports basic SQL syntax.  A lot of strict requirements, i know. But if someone knew how to solve this in plain SQL, that would help me a lot. Thanks.

I want to return top 10 records from each section in one query. Can anyone help with how to do it?  Section is one of the columns in the table.  Database is SQL Server 2005. I want to return the top 10 by date entered.  Sections are business, local, and feature.  For one particular date I want only the top (10) business rows (most recent entry), the top (10) local rows, and the top (10) features.


How can I disable the ability to shut down an iPhone while the lock screen is shown?

If my iPhone is stolen and the thief shut the phone down, I wouldn't be able to locate it anymore.  Is it possible to disable the possibility to shut down the phone when a passcode lock is set up?


public void play () {     int anInteger;     //guess return code     int code;      while (true) {         String input=null;         input = JOptionPane.showInputDialog("Please enter an integer");          if (input == "-1") {             //JOptionPane.showMessageDialog(null, input);             System.exit(0);             break;         } else {             if (input==null) {                  System.exit(0);             } else if (input.isEmpty()) {                  continue;             } else {                 anInteger = Integer.parseInt(input);                 code = this.oneGuess (anInteger);                 //JOptionPane.showMessageDialog(null, anInteger);             }         }      } }   I want, if the user enter -1, show the program will not prompt the message box any more. Above is the code I have come up with, so far. Why it doesn't work?


I am trying to produce the following result:    I've never placed tikz objects on images. Any help would be appreciated.

Recently I have learned how to draw simple stuff with TikZ. I really like it. Now I wonder if it is possible to draw with TikZ on a image. Instead of pasting a image in Illustrator and adding some vectors to point something in the picture I would like to do it using TikZ. Is it possible?   For example, on a picture of a computer (PNG,etc) I would like to draw some arrows and labels saying "Keyboard", "Monitor", etc.


I have a text document containing three columns.  One column is "sex", and each value is either "M" or "F".  The other two columns contain numerical data (my explanatory variable and response variable).  I want to create a Scatterplot in R where the point will look different for males than for females.  I don't know how to do this.

I'm very new with R and stats in general, but I need to make a scatterplot that I think might be beyond its native capacities.  I have a couple of vectors of observations and I want to make a scatterplot with them, and each pair falls into one out of three categories. I would like to make a scatterplot that separates each category, either by colour or by symbol. I think this would be better than generating three different scatterplots.  I have another problem with the fact that in each of the categories, there are large clusters at one point, but the clusters are larger in one group than in the other two.  Does anyone know a good way to do this? Packages I should install and learn how to use? Anyone done something similar?  Thanks


How can I prove that for $s \in \mathbb{C}$, with real part of $s$ being equal to 1,  \begin{equation} \sum_{n=1}^{\infty}\frac{1}{n^{s}} \end{equation} diverges?  Thanks a lot!

Does $\sum_{k=1}^\infty\frac1{k^n}$ converge for $\Re(n)=1,\Im(n)\ne0$?  The ratio test is inconclusive.  It passes the term test for $\Re(n)=1$, but this is not sufficient to prove convergence.  Since we are dealing with so many complex numbers, I do not know of any convergence tests for this.  I know that if it is convergent, it is conditionally convergent.


I am a South African citizen and have a multiple entry visa obtained from the Italian Embassy. I am currently in Rome, can I travel from here to Amsterdam with my Schengen visa or do I need extra papers/documents/applications?

I am a non-EU national, permanent UK Resident. Recently, my work issued me with a multiple Schengen visa with Norway as the first (main) point of entry. Now I want to go on holidays to Greece - do I need to apply to Schengen visa again, as Greece is not Norway and I am not going there for work?


I've done the usual undergraduate coursework and am interested in learning about ZF set theory. What are some texts that would be accessible to me, and what are the most popular texts in this subfield?

Which is the best book on axiomatic set theory? I am interested in a book that is suitable for graduate studies and it is very mathematically rigorous.


I've tried to organize my project so I thought that I will include all of my global variables, #includes and struct definition in a global.h header. However I can't fully understand this concept and the errors during build seem to prove that. When i try to access my global.h in logic.h this is what happens.  global.h:  #ifndef GLOBAL_H #define GLOBAL_H #include "logic.h" #include <SDL.h> #include <iostream> #include <string> #include "graphics.h"  //Global variables and structs enum directions {     D_UP,     D_LEFT,     D_DOWN,     D_RIGHT,     D_TOTAL };  struct Character {     float health;     float x;     float y;     float velocity;     bool collision[D_TOTAL];     directions direction;     SDL_Rect animation;     SDL_Rect sprite; };  const int windowWidth = 800; const int windowHeight = 600; const int frameWidth = 64; const int frameHeight = 64; #endif // GLOBAL_H   logic.h:  #include "global.h" //Header for gamelogic functions  //Initialization of all variables for a new character void initCharacter(Character &newCharacter, float x, float y, directions startingDirection);   When i try to build it this is the error I'm getting:  ||=== Build: Debug in GameProject0.2 (compiler: GNU GCC Compiler) ===| C:\Users\Rafał\Documents\GameProject0.2\GameProject0.2\logic.h|5|error: variable or field 'initCharacter' declared void| C:\Users\Rafał\Documents\GameProject0.2\GameProject0.2\logic.h|5|error: 'Character' was not declared in this scope| C:\Users\Rafał\Documents\GameProject0.2\GameProject0.2\logic.h|5|error: 'newCharacter' was not declared in this scope| C:\Users\Rafał\Documents\GameProject0.2\GameProject0.2\logic.h|5|error: expected primary-expression before 'float'| C:\Users\Rafał\Documents\GameProject0.2\GameProject0.2\logic.h|5|error: expected primary-expression before 'float'| C:\Users\Rafał\Documents\GameProject0.2\GameProject0.2\logic.h|5|error: 'directions' was not declared in this scope| ||=== Build failed: 6 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|   I am not sure what I'm missing. Thanks for any advice!

I'm a C++ newbie, but I wasn't able to find the answer to this (most likely trivial) question online.  I am having some trouble compiling some code where two classes include each other.  To begin, should my #include statements go inside or outside of my macros?  In practice, this hasn't seemed to matter.  However, in this particular case, I am having trouble.  Putting the #include statements outside of the macros causes the compiler to recurse and gives me "#include nested too deeply" errors.  This seems to makes sense to me since neither class has been fully defined before #include has been invoked.  However, strangely, when I try to put them inside, I am unable to declare a type of one of the classes, for it is not recognized.  Here is, in essence, what I'm trying to compile:  A.h  #ifndef A_H_ #define A_H_  #include "B.h"  class A {     private:         B b;      public:         A() : b(*this) {} };  #endif /*A_H_*/   B.h  #ifndef B_H_ #define B_H_  #include "A.h"  class B {     private:             A& a;      public:         B(A& a) : a(a) {}  };  #endif /*B_H_*/   main.cpp  #include "A.h"  int main() {     A a; }   If it makes a difference, I am using g++ 4.3.2.  And just to be clear, in general, where should #include statements go?  I have always seen them go outside of the macros, but the scenario I described clearly seems to break this principle.  Thanks to any helpers in advance!  Please allow me to clarify my intent if I have made any silly mistakes!


I tried telnet towel.blinkenlights.nl and it said telnet: command not found. Is it deprecated? It is a bit trivial, but I thought it was worth asking about at least.

There are  with not having ftp and telnet present in 10.13 now as per Apple's dictate.  Has anyone found a solid way to bring BSD ftp and telnet back to macOS vs using inetutils?


I have a Linux PC tower, two monitors (one HDMI the other DisplayPort), and a keyboard/mouse. I also have a 2020 Macbook Pro 13". I'd like to be able to use my two monitors + keyboard and mouse with my Macbook without having to unplug them from my Linux PC. I'm aware I should get a docking station for the MacBook. However, I'm not sure how to share the monitors, keyboard, and mouse between the two computers. Is there a simple KVM switch that will work? Thanks.

I have two MacBook Pros (one for work; one personal) that I want to connect to one monitor, one keyboard, and one mouse, and be able to switch between the two easily. Typically I'd opt to purchase a KVM switch, but it's been a while since I've needed that type of setup. My questions are:   Are KVM switches even needed anymore for MacBook Pros? Is there some sort of magic Wi-Fi / Bluetooth / Airplay device that can perform the same function? If KVM switches (or something similar) are still used, what's a good make / model that works well with Macbooks? Is a hardware solution even needed anymore? Is there software that can perform the same functions? (For example: Logitech Flow )   Thank you!


What I got figured out is that I should pair up $\frac{(-1)^{n}}{3^{n}}$ giving me $\sum_{n=1}^{\infty} (\frac{1}{3})^{n}(-2n-1)$. I know that the first part converges to $\frac{3}{4}$, but the other part is divergent. How should I proceed?

I have been trying to find the sum $\sum_{n=1}^{\infty}(-1)^{(n+1)}\frac{2n+1}{3^n} $. After some calculation, I got here: $\frac{-6}{8}+\frac{1}{4}+8\sum\frac{k}{9^k}$. I know the result is $\frac{5}{8}$ , and I verified it with Wolfram Alpha.I saw that $\sum_{k=1}^{\infty}\frac{k}{9^k}=\frac{9}{64}$. But I don't know how to prove the last equation: $\sum_{k=1}^{\infty}\frac{k}{9^k}=\frac{9}{64}$. I hope someone could help me or show me another method to find the sum for my initial series.


When I run this code:  String.format('Dear {0}, Don\'t forget .... {1} .... {2}', args);   Token 0 is replaced, but token 1 and 2 appear as {1} and {2}  This is caused by the backslash escaping the single quote by the t character.   My work around it to do this:  String.format('Dear {0}, Don`t forget .... {1} .... {2}', args);   But I would like to know how I could escape the ' character without breaking the merging of the arguments?

I'm struggling to use String.format to replace a token with a value when the token is within single quotes:  Example:  String query = String.format('SELECT Id FROM Availability WHERE Person__c = \'{0}\'', personId);   String query is equal to:  SELECT Id FROM Availability WHERE Person__c = {0}   Rather than:  SELECT Id FROM Availability WHERE Person__c = '234567890'


What is the origin of the Jacobian determinant for changing variables in multiple integrals?  I mean, how to derive the formula for the Jacobian determinant?  I have seen the use of Jacobian in some books but could not find how it arises.

What is an intuitive proof of multivariable changing of variables formula (jacobian) without using mapping and/or measure theory?  I was thinking that textbooks over-complicate the proof.  If possible, using linear algebra and calculus to solve it, that way would be simplest for me?


I tried using $\liminf_{n\to\infty} \frac{a_{n+1}}{a_n} \leq \liminf_{n\to\infty} \sqrt[n]{a_n} \leq \limsup_{n\to\infty} \sqrt[n]{a_n} \leq \limsup_{n\to\infty} \frac{a_{n+1}}{a_n}$ for $a_n\geq 0$.  So i started like this:  $$\frac{\frac{n+1}{\sqrt[n+1]{(n+1)!}}}{\frac{n}{\sqrt[n]{n!}}}=\frac{(n+1)\cdot \sqrt[n]{n!}}{\sqrt[n+1]{(n+1)!}\cdot n}=\frac{(n+1)\cdot \sqrt[n]{n!}}{\sqrt[n]{n!(n+1)}\cdot \sqrt{n!(n+1)}\cdot n}=\frac{(n+1)\cdot \sqrt[n]{n!}}{\sqrt[n]{n!}\cdot \sqrt[n]{n+1}\cdot \sqrt{n!}\cdot \sqrt{n+1}\cdot n}=\frac{n+1}{\sqrt[n]{n+1}\cdot \sqrt{n!}\cdot \sqrt{n+1}\cdot n}$$ I don't see how this would help me - any ideas?

I'm trying to find  $$\lim_{n\to\infty}\frac{n}{\sqrt[n]{n!}} .$$   I tried couple of methods: Stolz, Squeeze, D'Alambert  Thanks!  Edit: I can't use Stirling.


Why is "women pronounced as wimin?  What is the reason for the first syllable having /ɪ/?  What is the reason for the second syllable having /ɪ/?

As far as I know, it is the only word where wo is pronounced as wee. What is the reason for this? Does it have to do with the origin of the word?


Can you move a piece from start with a backwards 4 card?

In Sorry, can I move a pawn that is right outside my start, then pick a move backward 4 spaces card to right outside my safety zone?


I know, my question is similar to some old ones on this site.  I've a lot of CSV files (geo coordinates) to import to qgis (and then to convert them), and the usual way is not the best way to do it (too long).  I have almost 500 CSV files (wgs84 coordinates) and this is what I want to do:   Import all CSV files at once into QGIS Project them Export them into CSV files (again) but with different coordinates (convertion to UTM33N)   I'm trying to understand how to use the python console but I'm not moving on :(  Can anyone explain to me how to achieve it step by step?

How can I convert an excel file with x, y columns to a point shapefile?  There are some somewhat optional requirements in addition to the correct creation of a shapefile:   Column types (as per Excel's format specifiers) should be retained (especially date types) Column names should be taken from the header I would like to do this from the command-line If I can include heterogeneous spatial references for the points in a third column I would be very happy :)


I want to implement pagination on lightning componet. Is there any standard functionality present in salesforce? The pagination should be as displayed in image.    Basically, need an ability to jump to any page, end, beginning, next, previous, and knowing approximately how many pages.

I have to implement pagination by using SLDS. I didn't able find any example of pagination. Please provide example?


i got a problem with this exercise.  I need to prove the derivative of this function: $f(x)=\left(  \left| x \right|  \right) ^{3}$ exist.  Well, i make via definition:$\lim _{h\rightarrow 0}{\frac { \left(  \left| x+h \right|  \right) ^{3 }- \left(  \left| x \right|  \right) ^{3}}{h}}$  I know this: $|x|^3=|x|^2|x|=x^2|x|$ Now, $\lim _{h\rightarrow 0}{\frac { \left(  \left| x+h \right|  \right) ^{3 }- \left(  \left| x \right|  \right) ^{3}}{h}}$ = $1/2\,{\frac { \left| x \right| x \left( 5\,\overline{x}+x \right) }{ \overline{x}}}$  But i think my answer is too bad, please help ):

Can $f(x)=|x|^3$ be differentiated? If yes, how? If no, why?    What I've tried:  lim as $h$ tends to $0$ of $$\frac{f(x+h)-f(x)}{h} = \lim_{h \to 0} (3(x+h)^2|x=h|-3x^2|x|)/h$$  However, I have no idea how to proceed from here. Please help :(  Thanks!


I'm getting a NullPointerException in java (at this line :FileReader fstream = new FileReader(fileName)) when I try to read a text file line by line and store them in an arraylist with this code :   public ArrayList<String> StoreLineByLine(String fileName) throws IOException {     String str;      ArrayList<String> Line = new ArrayList<String>();     FileReader fstream = new FileReader(fileName);     BufferedReader myFileReader = new BufferedReader(fstream);      while ((str = myFileReader.readLine()) != null) {         Line.add(str);     }     myFileReader.close();     return Line; }   Could anyone help me understand the problem ? Thanks a lot !

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 $(X_n)_{n \geq 1}$ be a sequence of random variables, and $X_n \sim$ geo$ (\frac{1}{n+1})$. Find a limit in distribution of $(\frac{X_n}{n})_{n \geq 1}$.  Is there any general rule one can use to find whether a series converges in distribution or not? I know that convergence in probability implies convergence in distribution but I guess it might not always be the appropriate way to tackle this kind of exercise.

How to prove that geometric distributions converge to an exponential distribution?   To solve this, I am trying to define an indexing $n$/$m$ and to send $m$ to infinity, but I get zero, not some relevant distribution. What is the technique or approach one must use here?


I recently purchased a server to mess around with. I want to be able to host a few of my own sites, but my home internet is about 5Mbps up and down. I was looking into colo at my local DC and they are asking $50/mo for 1Mbps up/down. They are saying they are giving me a commercial dedicated connection, dual providers, and so on.   My first question is that a fair price for a 1Mbps connection? Both my home internet and their internet have unlimited data transfer (or at least limits I would never go over), so I am wondering if there is anything wrong with using my home connection? Would it be fast enough to handle about 10 websites with 100 visiters a day each? Why would their seemingly slower connection be any better?

So, it's not terribly difficult to host a website from home. It doesn't seem to make sense to pay a 3rd party to host some low traffic websites, so in some cases hosting from your home computer makes sense .But maybe I'm not seeing the whole picture.  Here are some of the pitfalls I can think of:   Dynamic IP address can bring the website down temporarily Power can go out for extended periods of time Internet provider can go down easier Limited bandwidth and bandwidth caps by ISP Potential contract issues with ISP not allowing website hosting   Are there others?


Is there an easy way to rename a Lightning component or at least change the label so that in Community Builder / Lightning Builder the desired component name shows up?

Is it possible to set a custom label for the name of a Lightning Component in the App Builder? In the example below, my component is named "DashboardPage" - can I change the label to something else, or do I have to rename the entire component?


What is a Front Porch used for?  What is a Back Porch used for?  What does it mean by active video?

I've been looking around on the internet and I can't find anything in depth on how the cable/connection functions. I've only been able to find simple pin out descriptions.  If someone can link me or point me in the right direction, I would be very grateful.


I have Audio CD that I want to convert to mp3 on my laptop with Windows 7.  I am ultimately trying to load onto my android phone. What is the process?  I am a computer neophyte so not able to find instructions on my laptop.

I've ripped music files from my CD but they were in .wma format and cannot play on my Android phone. So that I need to re-rip them into .mp3 files.  But the ripped button is disabled in Windows Media Player and the status of the file reads Ripped tolibrary  How can I force a re-rip/rip again?


for seq in {046725..046899} do    #body done   Above segment of code runs beautifully keeping preceding zeroes in seq variable but why following code segment doesn't run? Is there any way? I need  seq variable in for loops to have preceding zeroes if there is any preceding zeroes.  lowest=046725 highest=046899 for seq in {$lowest..$highest} do   #body done

I want to use $var in a shell brace expansion with a range, in bash. Simply putting {$var1..$var2} doesn't work, so I went "lateral"...   The following works, but it's a bit kludgey.    # remove the split files echo rm foo.{$ext0..$extN} rm-segments > rm-segments source rm-segments   Is there a more "normal" way?


It may sound strange, but why is Merry not used with Easter? Is there a reason why its usage  has been so firmly fixed with Christmas?

Is there any rhyme or reason to how we wish people sentiments for various holidays.  For example:     "Merry Christmas", "Happy New Year", "Happy Birthday"   are all acceptable sentiments but if we were to interchange them:     "Happy Christmas", "Merry New Year", "Merry Birthday"   people would agree that, though the sentiment is preserved, the delivery seems a bit off (at least in American English). I ask because I went to wish a friend a "Happy Yom Kippur" today but thought I should check first on what the standard well-wishing is (luckily I checked first... as it is not a "festive" day at all, but rather a somber occasion to reflect and pray).   Do we just use "Happy" unless it is Christmas?    Are there any other "classy" variants that can be substituted seamlessly (for example something like "Jolly New Year" or "Stellar Retirement")?


I'm designing a new site and I take ideas from sites but mix them around a little bit. All companies have the copyright on their footer, what does the copyright include?  For example, can you copyright the flow and structure of a site? Or, just the concept and logo?

After the recent "Look and Feel" Apple vs Samsung lawsuits, I've been wondering to what extent this might affect websites/webapps that offer functionality similar to other existing sites.  So what exactly would one have to be wary of to make sure they don't step on the toes of a big corporation?  I could see carbon copying a companies website/app (especially if it's a very distinctive product) being a bad practice that could get you some backlash, especially blatantly ripping off iconic terminology, but how similar is too similar?  Does the ten-foot rule apply to the web?     “If a reasonable person could not, at ten feet, tell the difference between two competitive products, then there was cause to believe an infringement was occurring.”   Or is there a separate legal precedent associated with the web?  And then where does feel, which is essentially the common term for UX, come in.  Can you patent the way a website "feels", as in the flow, organization and functionality associated.  I understand that you can't patent basic elements like radio buttons, but what about the layout and look of a large number of those elements used in combination to complete a certain action/s?    I know that is still a bit of a Sword of Damocles for online retailers.  Where is the line drawn for website/webapp copyright infringement?  Or is there even a line drawn yet?


How can I have reputation change greater than my reputation?  What is the "change" field even for?

When I went to the  to see my ranking in the reputation league, I saw this. Is this an error? My total reputation is less than my monthly reputation.


Some parts of my mesh just gets hidden or cut out of my view. I don't know why this is happening is this is the first time this has happened to me.

I'm having an odd issue - When I try to zoom in on a detail using my MMB, the "camera" in the 3D view seems to be cutting off the exterior surface of my object and showing me the inside instead. I'd expect this behavior, but only when I was much more zoomed in.  If I zoom out a bit (one click on the scroll wheel) then I can see the exterior as I intend.  Is there any way to adjust this behavior?  Thanks!


I can't remember many details about the story. I think I read it in a collection. It had something to do with two people who were of a race of people with a lifespan of 6 (?) days (don't remember precise number of days, but I remember they aged very, very quickly). They ran and somehow were able to drastically outlive their lifespan? They got to some abandoned ship at the very end.

Looking for a short story where time is accelerated on a planet.  The characters are actually born at the beginning of the story and then grow up quickly and inadvertently learn that their forebears came from a rocket ship nearby.  After having aged to "teenagers" they try to reach the ship?  At some point there is a war between confused aging survivors.  I think it was in a compilation which included a story called "Cousins".


I want to create a Facebook group using graph API.  i have more search on Google and also Facebook developers section for this but no luck. Advice me if this is possible and how i do this. Thanks

I am new to Facebook application development and I am looking for a way to create and manage a group using the the Facebook API. There is a get and get list call but I have not found a way to manage groups.


I've a text in a table. When you click on this text a focus box should be displayed as close as possible around this text. With my code the displayed focus box is as wide as the table width. How can I limit the width of the focus box to the length of the text? Note: The text must be in that table. I already tried:  float: left;, but then the text is no longer centered. position: absolute; left: 50%; transform: translate(-50%, 0);, but then the text isn't exactly at the same position as it was before (the text jumps around when it gets the focus) and this doesn't work in Safari.  And here's my code:

Click this text. The focus box should be as close as possible around this text.

I have a layout similar to:  <div>     <table>     </table> </div>   I would like for the div to only expand to as wide as my table becomes.


I have a string like &#70;&#101;&#101;&#108 and I want to decode it to its ascii representation - feel. Is there any library in C# that does it, or I have to do it manually?

I have email addresses encoded with HTML character entities. Is there anything in .NET that can convert them to plain strings?


This is definitely being called  function studiga_theme_theme($existing, $type, $theme, $path) {         $items['add_property_form'] = array(         'render element' => 'form',         'template' => 'node--14',         'path' => drupal_get_path('theme', 'studiga_theme') . '/templates/node',     );      return $items; }   But which should set up the form fields isn't and I have no idea why  function studiga_theme_preprocess_add_property_form(&$variables) {     // Shorten the form variable name for easier access.   $form = $variables['form'];    $form['first_name'] = array(         '#type' => 'textfield',         '#attributes' => array('placeholder' => t('First name')),     );     $form['last_name'] = array(         '#type' => 'textfield',         '#attributes' => array('placeholder' => t('Last name')),     );     $form['address'] = array(         '#type' => 'textfield',         '#attributes' => array('placeholder' => t('Address')),     );     $form['city'] = array(         '#type' => 'textfield',         '#attributes' => array('placeholder' => t('City')),     );     $form['state'] = array(         '#type' => 'select',         '#options' => array(             'default' => 'State',             '...' => '...',         ),     );     $form['zip'] = array(         '#type' => 'textfield',         '#attributes' => array('placeholder' => t('Zip')),     );     $form['email'] = array(         '#type' => 'textfield',         '#attributes' => array('placeholder' => t('Email')),     );     $form['phone'] = array(         '#type' => 'textfield',         '#attributes' => array('placeholder' => t('Phone')),     );     $form['submit'] = array(         '#type' => 'submit',         '#value' => 'Submit',     );    }   Thanks

This is the code in my template.php file.  function studiga_theme_theme($existing, $type, $theme, $path) {         $items['add_property_form'] = array(         'render element' => 'form',         'template' => 'node--14',         'path' => drupal_get_path('theme', 'studiga_theme') . '/templates/node',     );      return $items; }    function custom_add_property_form($form, &$form_state) {     $form['first_name'] = array(         '#type' => 'textfield',         '#attributes' => array('placeholder' => t('First name')),     );     $form['last_name'] = array(         '#type' => 'textfield',         '#attributes' => array('placeholder' => t('Last name')),     );     $form['address'] = array(         '#type' => 'textfield',         '#attributes' => array('placeholder' => t('Address')),     );     $form['city'] = array(         '#type' => 'textfield',         '#attributes' => array('placeholder' => t('City')),     );     $form['state'] = array(         '#type' => 'select',         '#options' => array(             'default' => 'State',             '...' => '...',         ),     );     $form['zip'] = array(         '#type' => 'textfield',         '#attributes' => array('placeholder' => t('Zip')),     );     $form['email'] = array(         '#type' => 'textfield',         '#attributes' => array('placeholder' => t('Email')),     );     $form['phone'] = array(         '#type' => 'textfield',         '#attributes' => array('placeholder' => t('Phone')),     );     $form['submit'] = array(         '#type' => 'submit',         '#value' => 'Submit',     );      return $form; }   This is the code in node--14.tpl.php.                                          Contact Information

         <?php print render($form['submit']); ?>

     But no fields are appearing - what am I doing wrong? You can't have a straight forward  in a tpl.php file can you?


I'm developing a module based on commerce that keeps track of certain user product selections by writing them to a database table. To keep track of who selected what I use the user id for registered users and the session id for unregistered ones. Or at least I would if it weren't for the fact that Drupal keeps changing the session id for every request.  Why is it doing that and how do I make it stop? Or is there a Drupal way of tracking anonymous users that does not involve session_id()?

I am writing a chat module where anonymous users are able to chat with a logged in user via an external websockets connection.  I need an ID to uniquely distinguish the anonymous users and assign them to different connections and keep track of the status of the connection.  How do I (securely) get a unique user id or session id for an anonymous user ?


Prove that for a sequence $\displaystyle\sum\limits_{n=0}^\infty a_n$ that if $\displaystyle\sum\limits_{n=0}^\infty a_n < \infty$ then $a_n \rightarrow 0$.

Following the guidelines suggested in , I am going to post a proposed proof as an answer to the theorem below. I believe the proof works, but would appreciate any needed corrections.  Theorem If a series $\sum_{n=1}^{\infty}a_n$ of real numbers converges then $\lim_{n \to \infty}a_n = 0$


I imported an obj file that is inside a folder with all the materials including the mtl file. In the import box I unmarked the "split by object". the transform box is on 0. I cant see nothing in the scene. I switched throwout the viewports.

I try to import .obj files from this project:  - the files contain Polygon Mesh Data.  When I import the obj file into blender, the outliner shows a new mesh added, but nothing is visible in the 3D viewport:      Any help will be appreciated.


Does anyone know how to fix this wierd line?(I'm new to blender btw)

I was practicing with modeling a leaf using a image reference. Everything went fine and I finished modeling my leaf, but I wanted to make it more realistic (I'll add textures later), I saw lots of people using the Subdivision Surface modifier but it doesn't work for me.  My model:   My model when I add the Subdivision Surface modifier


I asked this question yesterday on English Language & Usage and thought that this would be actually something for this site and maybe a contribution to all who might have the same confusion.  This question is about something I always get confuse with (native language German). As far as I know "did + verb" is something done and finished in the past. But isn't it the same with "verb + ed"?  The answers can be seen here . Anything you would like to improve?

This is something I always get confuse with (native language German). As far as I know "did + verb" is something done and finished in the past. But isn't it the same with "verb + ed"?


I'm having a slow brain day. If anyone can point me in the right direction that would be great thanks.  I need to create the below crest as a single color graphic so that it can be printed onto a pint glass glass. I need it either black or white, no greys.    I can't seem to figure it out. The crest below is also the highest res available.

I created this logo for a client, and I now need to convert it into one color versions (all black/all white).   Because there are so many overlays of text and graphics, I am having issues changing it into one color without it becoming one big blob of unreadable text and graphics.   I am working in Illustrator CC 2018 and have tried all I can think of with compound paths and pathfinder options. I'm sure there's a way to accomplish what I need to, I just haven't found a way to get there. I would greatly appreciate any suggestions on how to make this work!  Logo:   Example of issues I'm running into: (The black lines are actually cut through to the background, they're not just black strokes.)      UPDATE  I have come along this far in the conversion. The last thing I'm stuck on is how to get the stroke around the text (what you see in black) to punch through to the background. I've been able to do this for the other graphics but am having trouble with the text itself. Any option I try in the pathfinder panel gives me unwanted results. What's the best way to achieve this?      UPDATE 1/8/18  I had left this project over the holidays, and when I came back to work on it today I finally figured out a way to "punch" the text through the various background items.  First, I selected the letter and added an offset path around it. I then copied and pasted [Cmd + F] that offset path a particular number of times (equal to however many background items that letter touched).   I selected one copy of that letter's offset path, added one background piece to the selection [by holding the Shift key and using the Direct Selection tool], then clicked the Minus Front option in the Pathfinder window. I repeated this process for each of that letter's offset paths and the items it touched, and then for all of the letters that needed to have the "punched through" stroke effect.   This achieved what I needed!


Suppose I have a function that do some operation for me. Let's call it operation(). I run this operation() function in a loop for ever in another thread  My question is how can I precisely (as much as possible) compute the throughput of executing operation function. In other word, I want to know how many times this function executes in say a millisecond?   This is my implementation:   MainClass.java  import java.util.ArrayList; import java.util.concurrent.atomic.AtomicInteger;  public class MainClass {      static int numOfIterations = 100;      static AtomicInteger numOfOperationsDone = new AtomicInteger(0);     static ArrayList<Long> clientOperationTimes = new ArrayList<>();     static ClientThread[] clientThreads;      static int numOfClients = 1;      static long timeBeforeExp = 1000;     static long expDuration = 3000;      static boolean record = false;      static boolean stop = false;      public static void main(String[] args) throws InterruptedException {         clientThreads = new ClientThread[numOfClients];         Thread[] threads = new Thread[numOfClients];         for (int i=0; i< numOfClients; i++){             clientThreads[i] = new ClientThread();             Thread t = new Thread(clientThreads[i]);             threads[i] = t;          }         for (int i=0; i< numOfClients; i++){             threads[i].start();         }          Thread.sleep(timeBeforeExp);          record = true;           long start = System.nanoTime();         Thread.sleep(expDuration);         stop = true;         record = false;          long elapsed = System.nanoTime() - start;           System.out.println("Actual elapsed time= " + Math.pow(10, -6) * elapsed);          double throughput = Math.pow(10, 6)*numOfOperationsDone.longValue() / (double)elapsed;           System.out.println("Throughput= " + throughput);      }  }   ClientThread.java    public class ClientThread implements Runnable{      public void run(){         while (!MainClass.stop)             operation();     }      void operation(){         Utils.waistTimeHaha(MainClass.numOfIterations);         if (MainClass.record) MainClass.numOfOperationsDone.incrementAndGet();     } }   Is it the way you would do it?   Thanks

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


I had problems with the zoom, maybe because the scale of the object. I zoomed in and disapear, then out and i lost it, I tried to press the Numpad, but nothing

In Maya if we have an object selected and we press F then the object is brought into focus and if no object is selected then all the objects in the scene are brought into focus.  How can this be done in Blender?


I am receiving a NPE in my main classe although I have referenced all the values.  My code starts with:  public class MainActivity extends AppCompatActivity     implements NavigationView.OnNavigationItemSelectedListener, AbsListView.OnScrollListener {   ExpandableListAdapter listAdapter; ExpandableListView expListView; List<String> listDataHeader; HashMap<String, List<String>> listDataChild;  ListView listview;   final ArrayList<String> finalbuilder = new ArrayList<String>();   String[] Supermarkets = {"a", "b", "c", "d", "e"};   @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);     Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);     setSupportActionBar(toolbar);      RelativeLayout layout = (RelativeLayout) findViewById(R.id.secondlayout);     RelativeLayout layout2 = (RelativeLayout) findViewById(R.id.thirdlayout);      expListView = (ExpandableListView) findViewById(R.id.lvExp);     listAdapter = new ExpandableListAdapter(this, listDataHeader, listDataChild);  listview = (ListView) findViewById(R.id.listView);      ArrayAdapter<String> adapterlistview = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, android.R.id.text1, Supermarkets);     listview.setAdapter(adapterlistview);   and, by reading the stack trace, I see it all goes down to   expListView = (ExpandableListView) findViewById(R.id.lvExp);   RelativeLayout layout = (RelativeLayout) findViewById(R.id.secondlayout);   RelativeLayout layout2 = (RelativeLayout) findViewById(R.id.thirdlayout);   listAdapter = new ExpandableListAdapter(this, listDataHeader, listDataChild);   Now, all these Views are contained in a different layout which is "first_fragment" or "second_fragment" rather than the "activity_main" declared in the OnCreate method. This is because I created a Navigation Drawer and the ExpandableListView is contained in the first Fragment, both ListView and secondlayout lie in the second fragment and thirdlayout is placed in the third Fragment's layout. Moreover, I set no null in the codes.  So my guess is that I cannot initialise something that is placed in a different layout from the one initiated with the OnCreate method. Hence I am wondering: does the use of Fragments pose any threats when working from the MainActivity on Views embedded in further layouts?  If so:  Should I simply add @Nullable to the OnCreate?  Should I Implement the FirstFragment while defining the class at the beginning?  Should I add "new" when declaring the ExpandableListView and the other Views at the beginning?

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


I have a table in a SQL-Server database (SQL-Server 2016) with 2 fields: ConcateCode   ID int, Random nchar(5)  ID  Random  1   A2dd4 2   2f4mR 3   dhu9q 4   0lpms  Now I need a query where I get all the Random-fields concatenated in one field from Start-ID to End-ID, e.g. something like SELECT ConcateCode FROM Table WHERE ID >= 1 AND ID < 5  and returns A2dd42f4mRdhu9q0lpms. The problem is that I can't use a StoredProcedure, because my Programming-Language doesn't support Stored-Procedures, but only direct table access or queries. The question sounds stupid easy, but I try to solve the problem now for a week and get no solution. Hope someone is more intelligent than me.

Consider a database table holding names, with three rows:  Peter Paul Mary   Is there an easy way to turn this into a single string of Peter, Paul, Mary?


Is the order of members in a) in a struct b) in a bitfield guaruanteed? In other words, given a certain member of a struct or a bitfield, am I guaranteed that its offset from the beginning of the struct/bitfield will be no less than the sum of the sizes of the members that preceded it?  To give an example:  struct S{    char a[N];    unsigned b : M;    char c : O;   };   Will the offset of c be at least sizeof(a)+sizeof(b)?

This is a question that was sparked by 's answer . Suppose I declare a class/struct like so: struct {      char A;     int B;     char C;     int D; };  Is it safe to assume that these members will be declared in exactly that order in memory, or is this a compiler dependent thing?  I'm asking because I had always assumed that the compiler can do whatever it wants with them. This leads into my next question.  If the above example causes memory alignment issues, why can the compiler not just turn that into something like this implicitly: struct {      char A;     char C;     int B;     int D; };  (I'm primarily asking about C++, but I'd be interested to hear the C answer as well) Related topics


I have an HTC Desire running Froyo. It is not rooted, nor have I installed any custom ROM.  I get an "Insufficient Storage" error when I'm trying to install an app via adb/eclipse. The .apk is only 300KB, and the phone reports 14MB free of internal storage, and 2.2GB free on the SD card. (I have just uninstalled a few large apps to make sure there's plenty of room.)  It is obviously completely wrong. There's easily plenty of room in the 14MB of internal storage for my 300KB app.  What can I do to fix it?

After one of the latest updates (not sure if it was the last one or a previous one) of the Google Play app, I am having an error trying to update a large app (42MB). It says:     Error Downloading . There is insufficient space on the device.   My device is a Samsung P1000 running Froyo. It's rooted, but the error was there before rooting it.  A quick Google search showed several Samsung users having the same problem (the app in question that was giving me the headache is Smurf's village). Some said that removing the updates to the Android Market (Google Play) app would fix it, but to me it was of no avail.  I also tried the procedure in  to no avail.  Now I am stuck with a prehistoric version of the Market (that works on small apps) and still cannot update Smurf's Village or install big apps. How can I fix this?  EDIT: device has over 2GB of internal SD storage, 27GB of external SD card, so space is not an issue.


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

It is known that given $X=(X_1, X_2, \ldots, X_n)$ iid $\sim N(0,1)$, then $X/\sqrt{X_1^2+\cdots+X_n^2}$ is uniformly distributed on the surface of unit sphere.  Intuitively, I know that that's because the probability of $X/\sqrt{X_1^2+\cdots+X_n^2}$ belonging to any region with the same area on the surface should be the same. But how can I prove it mathematically?


I am Python amateur and was trying to write a code to generate a Fibonacci Series when I came across a weird behaviour.  >>> def F(num):                    #line1     a,b = 1,2                      #line2                           yield a                        #line3     yield b                        #line4     while num>2:                   #line5         a,b = b,a+b                #line6         yield b                    #line7   >>> gen = F(10)                    #line8 >>>                                #line9   The while loop in the code is an infinite loop. My question is if the loop does not end then how did #line8 complete execution?  Thanks!!

What is the use of the yield keyword in Python? What does it do? For example, I'm trying to understand this code1: def _get_child_candidates(self, distance, min_dist, max_dist):     if self._leftchild and distance - max_dist < self._median:         yield self._leftchild     if self._rightchild and distance + max_dist >= self._median:         yield self._rightchild    And this is the caller: result, candidates = [], [self] while candidates:     node = candidates.pop()     distance = node._get_dist(obj)     if distance <= max_dist and distance >= min_dist:         result.extend(node._values)     candidates.extend(node._get_child_candidates(distance, min_dist, max_dist)) return result  What happens when the method _get_child_candidates is called? Is a list returned? A single element? Is it called again? When will subsequent calls stop?   1. This piece of code was written by Jochen Schulz (jrschulz), who made a great Python library for metric spaces. This is the link to the complete source: [Module mspace][1].


I'm unit testing a method that uses a Date and everyway I initialize it seems to cause a NPE when I pass it.  The HashMap is initialized and I can see the value when I debug to know there is a date but at my put statement the Date just seems to through the exception.  EDIT  Map<Double, Date> actualTimes = new HashMap<>(); Date date = new Date();  testMethod() {       clearProductMaps();     calendar.set(Calendar.MONTH, Calendar.JULY);     calendar.set(Calendar.DAY_OF_MONTH, 21);     calendar.set(Calendar.YEAR, 2016);     date = calendar.getTime();      try {         date = sdf.parse("2016-10-15");     } catch(ParseException ex) {         System.out.println("ParseException " + ex);     }      System.out.println("Debug:" + " " + sdf.format(date).toString());     if(date != null) {        actualTimes.put(1.50, date);     }     //assertTest call }   I don't need the date formatted to be apart of the map and I have gotten strange responses with my null conditional check so I'm not what I'm doing wrong.


I've seen examples of functions that are continuous only at the irrationals, and discontinuous at the rationals, and I wanted to go a bit further, but I couldn't come up with a function like the one in the title.  Does anyone know such an $f$?

Recently I saw Thomae's Function, also called the Popcorn Function, which is continuous at the irrationals and discontinuous at the rationals.  This made me wonder: is there a function which is continuous at every transcendental number and discontinuous at every algebraic number?


systemd still maintains the general idea of runlevels with its "Targets", but how do I change the system runlevel through systemd?  I want to do something equivalent to the old init-script method of:  init 3 # Multi-user init 5 # Graphical

Does systemd still have the concept of runlevels? For example is it pointless to use telinit <number>?


If I have three whole positive numbers $a, b$ and $c.$  If I form the product $a \cdot b$ and that product is divisible by $c.$  How can you prove the following assertion:  If the greatest common divisor of $b$ and $c$ is one, then $a$ must be divisible by $c.$

Suppose that $a,b,m,n$ are natural numbers, prove the following statement:  If $a({m \over n})=b$ and $(a,n)=1$, then ${m \over n} \in \mathbb{N}$


When charges are not accelerating Lorenz transformations suffice but dealing with accelerations goes formally beyond the scope of special revativity

I am currently studying the motion of relativistic charged particles in electromagnetic fields. More exactly, we first derived the equation of motion in the 4-vector formalism.  I was a bit confused when my teacher talked about acceleration in special relativity. In which cases are we allowed to talk about it specifically in special relativity? (I mean that I have not studied general relativity yet) What stay constant ? Or are we making an approximation?  It may of course have a sense, though I have the feeling that in my courses, we only talked about constant speeds in special relativity.  I hope my question has a sense,  Isaac


I am executing a .sh script today. It is executed with prefix "./.sh,I am a bit confuse because it is also executed without ./.but why this is required to use ./  Could you please explain me that why ./ is used to run .sh scripts?

While executing a C program, a.out, using the Ubuntu terminal, why do I always need to type ./ before a.out, instead of just writing a.out? Is there solution for this?


I can't find a way to disable Wi-Fi roaming on my Mac so I can connect to a specific AP and stay associated to it without roaming to the strongest AP. Is there any way I can do that?  My MacOS version is High Sierra 10.13.2.  I have already tried all airport JoinMode settings ( /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport prefs JoinMode) and the "airport-bssid" tool that is available on GitHub, and both solutions didn't work.

Is there any way to get Mac OS X to connect to a specific access point by BSSID? I have a network with the same SSID for multiple access points, and I would sometimes like to specify which specific access point to connect to. Is this something Mac OS X can do natively, or is there a third party tool that can do this?


Let's say I have the ff regex:  var str = 'hi there I am';  function testing(input, int){    var par = input.match(`/.{1, ${int}}/g`);   console.log(par); }  console.log(testing(str, 5));   How can I passed in the argument/variable nto make it work on the regex?  Is there a way to do that?

I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it.  However, I can't figure out how to pass a variable in to a regex.  I can do this already which will replace all the instances of "B" with "A".  "ABABAB".replace(/B/g, "A");   But I want to do something like this:  String.prototype.replaceAll = function(replaceThis, withThis) {     this.replace(/replaceThis/g, withThis); };   But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?


How do I check if the return variable is a function?     var testController = function() {   alert('123'); }  $(function() {   $('[mfour]').each(function(e, t) {     var a = $(t).attr('mfour');     console.log($.isFunction(testController));     console.log($.isFunction(a));   }) });
asd
     Notice that on first console.log returns TRUE when the function name is hard-coded while on the second console.log if the variable is being evaluated returns FALSE.  It is kind of weird because var a returns testController.  Here's the .  My goal here is to run certain functions base on the mfour attribute. So in the example above, testController will run testController function.

I have the name of a function in JavaScript as a string. How do I convert that into a function pointer so I can call it later?  Depending on the circumstances, I may need to pass various arguments into the method too.  Some of the functions may take the form of namespace.namespace.function(args[...]).


I want to compute the derivative of the distribution of $X|(X+Y=u)$.

The classic example... $X \sim Po\left (\lambda\right ), Y \sim Po\left (\mu\right)$, X and Y are independent.  Show that the conditional distribution of X is binomially distributed. Or in other words, $P(X=k\mid X+Y = n) = P (\tilde{X} = k), \tilde{X} \sim B\left (n ,\frac{\lambda}{\lambda + \mu}\right )$.   I've so far managed to reach to this step, and have been stuck since. Just somehow gotta get a $\frac{1}{n!}$ in the denominator, that would then complete the proof..or at least I think..  $$P(X=k\mid X+Y=n) = \frac{\frac{\lambda^{k}\mu^{n-k}}{k!(n-k)!}}{P(X+Y = n)}=  \frac{\frac{\lambda^{k}\mu^{n-k}}{k!(n-k)!}}{\sum_{i=1}^{n} \frac{\lambda^{i}\mu^{n-i}}{i!(n-i)!}}$$  Thanks for the help!


I've a very simple rectangular shape that has been filled with a hexagon texture. I'm looking to create a sense of depth by keeping the lowermost row of the hexagons largest while transforming the top row to be smaller so they are appear to be in the distance.  This would be similar to creating a chessboard like 3-D feel. Any recommendations or proper ways to use the tool without relocating the actual placement of the rectangle – just be inner dimensions?

I created a curving arrow shape that starts wide at the bottom and thins out near the top where the point is. I also created a brick pattern swatch but when I apply it to the shape it appears like the pattern is overlaid instead of like a real road where the bricks follow the shape and narrows near the most distant point. How can I apply a perspective to the brick pattern without looking like I used a clipping mask?  Here is a link to what I achieved with a clipping mask - not what I want though. I need the bricks to look like they are inlaid just like in real life.


The documentation for glmnet in R  states that it solves the following minimization problem:    Why did the authors choose to parametrize $\alpha$ in such a way that $\alpha=\frac{1}{3}$ corresponds to the elastic-net parameter that will lend equal weight to the $L_1$ and $L_2$ parameter, rather than the seemingly natural choice of $\alpha=\frac{1}{2}$? Is there a reason that they added the extra factor of $\frac{1}{2}$ to the $L_2$ penalty?

I have a question about the elastic net penalty as implemented in glmnet in R compared to the original paper by Zou and Hastie (2005). In glmnet the penalty is listed as   $$ (1-\alpha)/2||\beta||_2^2+α||\beta||_1. $$  but in the paper it is  $$(1-\alpha)||\beta||_1 + \alpha||\beta||_2^2.  $$  Does anyone know where the factor $\frac12$ some from? (Never mind the fact that the $\alpha$'s were swapped between the two parameterisations.) In both cases the penalties are multiplied by $\lambda$, but what are the mathematical/technical arguments for not using a simple convex combination of the lasso and ridge penalties?


I am a Jamaican who lives and works for the government as an educator in Japan. I would like to travel to the UK for several reasons.   Even though I have a 10 year U.S. visa, as a black woman, I do not feel safe staying in the U.S. at this time. I have a friend I haven't seen for years who lives in London I need to buy a wedding dress and some clothing items, unfortunately Japan doesn't cater to curvy women   I am nervous about the application process because it is rumored that Jamaicans have a hard time. So here are my questions   Should the amount shown in my bank account reflect the cost of my stay in London, as well as the airfare and hotel costs? I'd like to pass through the UK to go to Jamaica for 5 days, and then an additional  4 days in London, should my bank account reflect the amount for my trip to Jamaica as well?

The UK Visas and Immigration Directorate publishes  that provides helpful tips that can result in successful visa applications. Section 2 of this guidance opens is entitled "other documents you may want to provide" (emphasis mine).  Section 2: other documents you may want to provide – all visitors This section provides guidance on the types of documents that you may want to provide to help us consider your application against the Immigration Rules. Previous travel documents/passports, which show previous travel. Financial documents showing that you have sufficient funds available.  These must clearly show that you have access to the funds, such as:  bank statements building society book proof of earnings such as a letter from employer confirming employment details (start date of employment, salary, role, company contact details) where a third party (who is either in the UK or will be legally in the UK at the time of your visit) is providing financial support to you e.g. a business, a friend or a relative, documents to show that they have sufficient resources to support you in addition to themselves and any dependant family should be provided   The first item is "bank statements" and this ties in with the , which says...  evidence that you can support yourself during your trip, eg bank statements or payslips from the last 6 months  (Note 'eg' is a Latin abbreviation meaning "for example"; this appears to be optional rather than a fixed requirement.) Question: How should someone interpret this such that the chances of success are maximized? How many statements should I submit? What are they looking for and what do my bank statements tell about me?


As we know, when the pronoun someone is used, the succeeding verb will be conjugated in the 3rd-person singular. Thus, the following sentence demonstrates legal usage:     I cannot enter the room; someone is cooking.   However, note the following sentence:     I cannot enter the room; someone is cooking, are they not?   As can be seen in the second sentence, when a question tag is used, it doesn't use the corresponding conjugation of the 3rd-person singular previously used, but rather, it takes on the 3rd-person plural. Why is this the case? What is more, why is the following sentence illegal?     I cannot enter the room; someone are cooking, are they not?   I thank you, in advance, for your responses.

Is there a pronoun I can use as a gender-neutral pronoun when referring back to a singular noun phrase?  Each student should save his questions until the end. Each student should save her questions until the end.


I am new to MySQL. I know that ROW_NUMBER() OVER (PARTITION) will not work in MySQL. I want to convert the code from SQL Server to MySQL:  SELECT  *,      ROW_NUMBER() OVER (         Partition By X.TPID,originTLA, destinationTLA           ORDER BY packageStartDate,totalPackageSavingsPct desc     ) AS ttl_perct_rnk  FROM TABLE   I want to convert this code to MySQL.  In Most of the cases the requirement to find rank is based on a single column. But here we have to find rank based on three columns. It is easy to find rank based on single column. But I am not sure how can we implement the rank based on three column or multiple columns.

I am able to sort a table using the following code:SELECT * FROM Persons ORDER BY LastName  But I wanted to get the ranking/position of a person using that order.  For example when I sort Person table by age, I want to get the rank/position of a person named Antinio Trias.  How will I do it?


Wouldn't it be faster if there were multiple data lines (say 8) to transmit/receive data (say sequential bytes) instead of using a single line to transmit sequential bits?

While looking at SATA, PCIe, USB, SD UHS-II it struck me that they are all the same: digital serial bitstream, transmitted using differential pairs (usually 8b/10b coded), with some differences in link/protocol layers. Why so? Why did this become the standard? Why are there no widespread system communication protocols that heavily employ some advanced modulation methods for a better symbol rate? Am I missing something? This is not a question of "serial vs parallel" but a question of "digital signaling vs modulated analog"


I've used my Logitech Wingman Formula Force wheel for more years than I can remember (I definitely had it back when I was playing Viper Racing, though).  Sadly, Logitech does not appear to support the wheel in any capacity, even as an analog input device.  At this point, I'm looking for any sort of driver that will take input from the device.  I don't care at all about the force feedback but, if it were available, I'd be happy to take it.  The target operating system is Windows 7 64-bit.  EDIT: Just in case I'm not clear above: I know where the standard driver download sites are and have tried them out.  The problem is that Logitech has officially end-of-lifed this wheel so their latest software specifically does not support it.  Sadly, their older software that does support it is 32-bit only so I'm out of luck on that front.

How can I make the Logitech Wingman Formula Force steering wheel work in Vista and 64 bit Windows 7?


Consider the integrable functions $f, g: [a,b] \rightarrow > \mathbb{R}$. Prove that if $$\hspace{5cm} g(x) \ge 0 \hspace{3cm}  \forall x \in [a, b]$$      and $$m = \inf(f)$$ $$M = \sup(f)$$      there exists a $c \in [m, M]$ such that:      $$\int_a^b f(t)g(t) dt = c \cdot \int_a^b g(t)dt$$   When I think about it, it doesn't seem so far fetched. If we have two functions on the interval $[a, b]$, then it obviously seems reasonable that there exists a $c_1 \in [m, M]$ such that $$f(x) = c_1$$ , with $x \in [a,b]$. So we would have:  $$f(x)g(x) = c_1 g(x)$$  We could find a $c_k$ for every point $x \in [a, b]$, so that means that we can integrate the above relation and get:  $$\int_a^b f(t) g(t)dt = c \cdot \int_a^b g(t)dt$$  where $c$ is a some sort of linear combination (I think, I'm not sure) of all of the $c_k$'s that I used for every point in the interval $[a, b]$.  What's a better, more concise proof to this identity than the weird and incomplete one that I came up with?

I am asked to prove the second mean value theorem:  Let $f$ and $g$ be defined on $[a,b]$ with $g$ continuous, $f\ge 0$, and $f$ integrable. Then there is a point $x_0 \in (a,b)$ such that $$ \int_{a}^{b}f(x)g(x)dx = g(x_0) \int_{a}^{b}f(x)dx. $$  My (incomplete) proof goes as follows:  Since $ [a,b] $ is compact and $ g $ is continuous, we know there exist $ x_1, x_2 \in [a,b] $ such that $ g(x_1) \le g(x) \le g(x_2) $ for any $ x \in [a,b] $. Thus, we have the following string of inequalities $$ f(x)g(x_1) \le f(x)g(x) \le f(x)g(x_2), \, \, \forall x \in [a,b], $$ $$ \Rightarrow g(x_1)\int_{a}^{b} f(x)dx \,\le \, \int_{a}^{b} f(x)g(x) dx \, \le  \, g(x_2)\int_{a}^{b}f(x)dx. $$  My problem now is to show the final equality. It seems to me the intermediate value theorem is somehow involved, but I cannot see how to use it. Furthermore, how do I make use of the $f\ge 0$ condition in the hypothesis?


Generally when we flag a post (using normal or 'other' option) it is finally handled by moderator as helpful or declined (or disputed by 10K users). But there are few case where a flag is actually handled by OP and it always results as helpful flag.   Let me explain, I flag this  (visible to 10K user). It was non programming question and after 2 downvotes OP deleted that question. Once OP deleted the question it results to me as 1 increment in my helpful flag.  So my question is, Here which flag rule apply that always results as helpful flag and never as declined flag ?

I don't see "Helpful" in the list of things I can do when I press the flag link.   In my profile page I saw "6 helpful flags."  How do I earn these flags?  May I make them on other peoples' posts or comments?   This is what I am talking about:


If there is a file and the filename starts with a dot, does that mean you created the file and you are hiding stuff in it, or can the files get created on their own without you creating the filename?

On my reelbox (running Ubuntu) I have found a file in /etc/init that contains the following  # frontpanel-pre - check for frontpanel CAPs and adjust time #  description     "check frontpanel caps"  #start on starting mountall #start on tty-device-added DEVNAME=/dev/ttyS0  task  script         (         /sbin/dev_frontpanel.sh         /sbin/reelfpctl -capability         ) > /dev/.frontpanel.caps         initctl emit --no-wait frontpanel-linked end script   I wonder if the dot in /dev/.frontpanel has some special meaning in linux  I thought the output of the commands in the brackets will be written to a file called ".frontpanel.caps" in /dev/ but there is no such file. In /dev/ there is a frontpanel which is a link to /dev/ttyS0  Could it be, that e.g. echo something > /dev/.frontpanel.caps actually sends data (something in this case) to /dev/frontpanel ?  What does .caps do then?


There are two ways to make your text  BOLD.   One of them (which I personally think is an easier way):   </b> This is a Bold Text!</b>    The other one is:  <strong> This is also a Bold text! </strong>  So, What's the difference?  They both do the same job, so what's the point of using two tags that do the same thing? Do you think the  < strong > tag should be depreciated?   There is also two tags that can be used for Italicised text   The first one:  <i> This is Italicised </i>   The 2nd one:   <em> This is also Italicised <em>    These Italicised text tags are like the bold tags, why not just keep the most efficient one?   I think we should keep the < b >  tag and the  < i > tag for our HTML documents. They are less time to consume and take up less space.

What's the difference between <b> and <strong>, <i> and <em> in HTML/XHTML? When should you use each?


My old folder has this output when I ls -lh  drwxr-xr-x 2 ahmet   sistem  4,0K Eyl 17 22:33 ahmet drwxr-xr-x 2 ali     sistem  4,0K Eyl 20 16:08 ali drwxrwxr-x 2 hexcake hexcake 4,0K Eyl 13 18:57 Deneme drwxr-xr-x 2 eda     maliye  4,0K Eyl 17 11:19 eda drwxr-xr-x 2 mehmet  yonetim 4,0K Eyl 20 16:10 mehmet drwxr-xr-x 2 selami  sistem  4,0K Eyl 20 16:08 selami -rw-rw-r-- 1 hexcake hexcake 2,0K Eyl 14 11:48 words -rw-rw-r-- 1 hexcake hexcake   16 Eyl 14 11:48 words2   I want this output to be in my new blank file. Is it possible to copy ls output and write it to new file?  hexcake hexcake hexcake hexcake hexcake hexcake maliye eda sistem ahmet sistem ali sistem selami yonetim mehmet   I got this output using this command btw  ls -lh | awk '{print $4,$3}' | sort   Thank you for your help.

How do I save the output of a command to a file?  Is there a way without using any software? I would like to know how.


Is it possible for an action to lack a verb?  For example - to answer my own question - there is a verb for smell bad ("stink"), but there is no counterpart for to smell good.  Is there?

When one hears that something smells, one would generally assume that it smells bad.   Isn't there a word which wouldn't bring to mind the idea of a bad odor? For example, how would you describe pot-pourri (assuming you like the smell of pot-pourri)? If possible, I would like an adjective, or a word that could takes the place of an adjective.


Looking at the favorites Stack Exchange lists for my global account, I noticed the following questions.        For the first two questions, the number of users who added them to their favorites is 0. I wondered how that question should be one of my favorites, so I clicked on the question title to check this. The question page doesn't show I have clicked on the star, for the first two questions.                The same happens for this question.        Even though I removed some of the favorite questions, there are still questions favorite from 0 users, after 5 (or more) hours I removed them. (I posted this question after I noticed what was happening.) As far I recall, I didn't remove from the favorite questions the "0 users" ones.        I removed some favorites from the same sites of those shown with a 0. If I effectively removed those favorites without remembering it, there should be more questions showing a 0 in the first column. I removed the questions from the favorite list by clicking on the question link and opening it in a new browser tab, clicked the star on the question page, closed the tab showing the question, and returned to the tab showing my favorites.

I've noticed that  on Math SE is listed , but not for Math SE account.  I don't recall ever favoriting it, except when I tried favoriting it and unfavoriting it to get rid of it (this did nothing), so I believe it should not be listed as a favorite under any of my accounts (the question also says 0 users have marked it as a favorite). Is this a bug?  If not, what is going on? Note:  (now deleted) since I originally thought is appeared as a favorite on my Math SE account, but I didn't get any answers.


I tried to download the iso file for Ubuntu 14.04 desktop. But when I tried to install I got invalid parameter error. So a friend loaned me his Ubuntu 8.0 disk and I got the following error on that:  /bin/sh: can't access tty; job control turned off.    I am running an HP h8-1214 computer with an AMDfx 6160 six core 3300mhz processor and windows 7 home. Can anyone tell me how I can get Ubuntu onto my computer please?

I would like to see a full how-to guide on how to install Ubuntu.


I have multiple databases with multiple millions of rows. I am trying to delete millions of those rows but am about to run into a problem.  My log files are getting huge and I am about to run out of disk space.   Database A has an .mdf file that is 10gb, and so far it's log file has grown to be over 100gb. It has been running the query for over 3 hours and I have no idea how much longer it will continue to run or how much larger that log file will grow.   What can I do about this? What happens to my query (that is still running!) if the log file consumes the entire disk?  I have a backup (shy the last 4 hours) of all the databases I am working with.  Any suggestions?

We are a team of mathematicians (i.e., no DBA experience).  We have a large database in SQL Server 2012.  It has more than 2 TB of data (hundreds of tables, each with millions of rows and hundreds of columns wide).  Each month, we receive a bundle of additions and revisions to the data, requiring us to perform extensive updates to our database by deleting, replacing, or updating most or all of the tables.  Our work is mostly focused on crafting the SQL logic to calculate the results that we need.  We're not running a real-time call center.  We apply a few indexes as needed, and we're pretty happy with the performance.  The problem is the log file.  Naturally, the log file grows and grows with so much data manipulation.  Our log file currently stands at about 1 TB.  We have a good amount of disk space, but it is not infinite.  From what we read on the Internet, we understand that the log file is necessary for transaction integrity, rollbacks, and recovery.  But for our specific purposes, we don't care about any of that.  We will probably never perform a rollback, nor would we ever attempt a recovery.  Worse comes to worse, we would simply download the data files again and create a new database from scratch.  We really just want the log file to go away and never come back.  We set the database recovery mode to Simple, naively thinking that this meant "no recovery mode", but we were quickly cured of those illusions.  We also understand that there are many wrong things not to do (detaching, shrinking, etc.).  We just don't know the right thing to do.  Maybe someone is going to suggest that we set a limit to log file growth.  However, that leaves two issues: (1)  How do we get rid of the 1 TB which is already there? (2)  We previously tried that, and as we approached the specified limit we started getting Error 9002 (log file full) here, there, and everywhere.  So now we are afraid of applying a size limit.  How do we tell the database "No log file, please" without any hurt feelings?


Okay, I have a prefab with a script. It has the public field gameobject, and I see that in the inspector. When I try to drag an object from the scene into that slot, I'm simply unable to. No error or anything, just acts like it's any other part of the screen.  Is there a type mismatch here? How do I drag something from the hierarchy?

Currently, I have an object on the scene, and one in prefab. I want the prefab's script to reference to the object on the scene through the   public GameObject obj;   code. However, when I tried to add the object in the editor, I cant seem to be able to select any objects from the scene, only ones in prefabs.  I am quite new at unity, so am I missing something really basic here?   Thanks for any help!


I have custom attachment.php, I want to give link for images in single.php so if user click that images, will redirect to attachment.php is that possible?  Here is the example of code.     Thank you before

I am trying to make the inserted images from a post (single.php) to point to (single-attachement.php) an attachment page. So far I checked a post here on stackexchange and added this code on the top, before the header of single.php, just that it's showing me a link to the last image on the page, instead of modifying the structure of the image link.  if ( $attachments = get_children( array( 'post_type' => 'attachment', 'post_mime_type'=>'image', 'numberposts' => 1, 'post_status' => null, 'post_parent' => $post->ID ))); foreach ($attachments as $attachment) { echo wp_get_attachment_link( $attachment->ID, '' , true, false, 'Link to image attachment' ); }


sM is an instance of the class, When running the method staffCanWork it is supposed to return a List of staff objects that can work on the given date and time, however when running the method it null pointer errors.  Testing the method within static void main;    Date date = Date.valueOf(LocalDate.now());         List<Staff> staff = sM.staffCanWork(date, Time.valueOf(LocalTime.now()));         for(int i = 0; i < staff.size(); i++){             System.out.println(staff.get(i).getId());         }   Method getStaff() using hibernate populates the List with staff objects using hibernate.       public List<Staff> getStaff(){         List staff =null;         Session session = factory.openSession();         Transaction tx = null;         try {             tx = session.beginTransaction();             TypedQuery query = session.getNamedQuery("getStaff");;             staff = query.getResultList();         }catch (HibernateException e){             e.printStackTrace();         }return staff;     }    staffCanWork method, Checks through the list to see if staff can work the given date and time.      public List<Staff> staffCanWork(Date date, Time time){         List<Staff> staff = getStaff();         List<Staff> staff1 = null;         for(int i = 0; i < staff.size(); i++){             if(staff.get(i).getDoctor() == null){                 if(staff.get(i).getNurse().canWork(date, time)) staff1.add(staff.get(i));             }             else {                 if(staff.get(i).getDoctor().canWork(date, time)) staff1.add(staff.get(i));             }         }         System.out.println(staff1.get(0).getId() + "test");         return staff1;     }   Method CanWork  public boolean canWork(Date date, Time time){         Boolean canWork =false;         Boolean aM = false;          if(time.getTime() < 12){ aM = true;}         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("E");         simpleDateFormat.format(date);         if(aM = true) {             switch (simpleDateFormat.format(date)) {                 case "Mon": if (getMondayAM() == true) canWork = true;                     break;                 case "Tue" :if (getTuesdayAM() == true) canWork = true;                     break;                 case "Wed" :if (getWednesdayAM() == true) canWork = true;                     break;                 case "Thu" :if (getThursdayAM() == true) canWork = true;                     break;                 case "Fri" :if (getFridayAM() == true) canWork = true;                     break;                 case "Sat" :if (getSaturdayAM() == true) canWork = true;                     break;                 case "Sun" :if (getSundayAM() == true) canWork = true;                 default: return false;             }         }         switch (simpleDateFormat.format(date)) {             case "Mon": if (getMondayPM() == true) canWork = true;                 break;             case "Tue" :if (getTuesdayPM() == true) canWork = true;                 break;             case "Wed" :if (getWednesdayPM() == true) canWork = true;                 break;             case "Thu" :if (getThursdayPM() == true) canWork = true;                 break;             case "Fri" :if (getFridayPM() == true) canWork = true;                 break;             case "Sat" :if (getSaturdayPM() == true) canWork = true;                 break;             case "Sun" :if (getSundayPM() == true) canWork = true;             default: return false;         }         return canWork;     }

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


I am trying to build a JavaScript initcap function which correctly converts the first letter in each word to upper case as the other letters to lower case.  All examples I have found converts the first character which is incorrect, eg: joe smith (c e o) should convert to Joe Smith (C E O), not to Joe Smith (c E O)  CSS transform is not an option as the value is returned to a server.  Probably using regular expressions is the way to go but I am no expert at these. Any help ?

Is there a simple way to convert a string to Title Case? E.g. john smith becomes John Smith. I'm not looking for something complicated like , just (hopefully) some kind of one- or two-liner.


I read this story I think in an Isaac Asimov short story collection - not necessarily his.   It’s about a world where reproductive organs where converted to produce all kinds of materials.   The protagonist is pregnant and kept the option to give birth and nurse.   She studies something.  In the end she gives birth to a starship main computer and receive a letter that gives her the happy news that she finished school and found fit to be a mother.

I'm looking for the title and author of a short story or novelette that I read quite some time ago.   The main characters are two young women. One is taking correspondence courses, and is constantly being berated by the other one for hoping to rise above her station. They go out to pick up young men, to sleep with them, to get pregnant.  It's not a normal sort of pregnancy, though. The men have some sort of 'coded semen' which grow something other than a child in the woman's womb. It ends up being a product of some kind, which earns the woman money when it is 'born'. The one woman is very careful about who she chooses, as she can only do this so many times. The other... isn't so careful.   At the end, the careful, studious woman achieves what she has been working for - a letter from a government organisation that permits her to become the mother to a human being.  Thank you for reading my question. I've been looking for this story for years, now.


This may be a duplicate, but I have not found a yes/no answer. So, does a random string of infinite length contain all finite strings?

If we have a finite alphabet, with each letter having a non-zero probability of being selected, will an infinite sequence of letters selected from that alphabet contain all finite sequences of letters in the alphabet?  What is the dis/proof for this?


This is from the controversial GCSE question in the UKs recent exams. The orginal question is thus:     There are $n$ sweets in a bag. $6$ of the sweets are orange, the rest are yellow.      Hannah takes at random a sweet from the bag and eats it. She then takes another sweet at random from the bag and eats it.      The probability that hannah eats two orange sweets is 1/3      a) show that $n^2 - n - 90 = 0$   This in itself isn't too difficult:  $$ \frac{6}{n}\frac{5}{n-1} = \frac{30}{n^2 - n} = \frac{1}{3} \Rightarrow \frac{90}{n^2 -n} = 1 $$ so that $$ n^2 - n -90 = 0 $$ But, what I'm trying to figure out is the value of n, the only way to do this I have thought of is trial and error, quickly finding the answer to be 10. Is there a different option here?

This is my reconstruction of the EdExcel GCSE question that has caused such a  in the UK in the last 24 hours, along with its solution.    Hannah has a bag containing $n$ sweets, 6 of which are orange. She eats two sweets at random from the bag.  The probability that the two sweets Hannah eats are both orange is $\frac{1}{3}$. Show that $n^2 - n = 90$.    Possible follow-up (I don't know if this was part of the original): how many sweets were there in total in the bag?


I have been asked to calculate a general formula for $1 + b + 2b^2 + 3b^3 + ... + Nb^N$  I think that a part of this is a geometric sequence, and I have rewritten this as   $f(x) = 1 + \sum_{i=1}^n i\cdot x^i$  (I couldn't figure out a way to make the first term be 1 with the progression so I just removed it from the series instead)  When I look on Wolfram Alpha it says that the partial sum formula for $ \sum_{i=1}^n i\cdot x^i$ is:  $$\sum_{i=1}^n i\cdot x^i = \frac{(nx-n-1)x^{n+1}+x}{(1-x)^2}$$  On , an answer said that the general formula for the sum of a finite geometric series is:  $$\sum_{k=0}^{n-1}x^k = \frac{1-x^n}{1-x}$$  But if I substitute my ($i\cdot x^i$) into the formula mentioned above I don't get the same value as the one Wolfram gives me.  Two questions:   Is it correct to pull the first term out of the series so it becomes a geometric series, or is there another way? How did Wolfram Alpha calculate that expression?

I want to know the general formula for $\sum_{n=0}^{m}nr^n$ for some constant r and how it is derived.  For example, when r = 2, the formula is given by: $\sum_{n=0}^{m}n2^n = 2(m2^m - 2^m +1)$ according to   Thanks!


There are $4$ people that they going to split $50$ gold between them. They got one extra gold that they can pay for punishment. All person makes a proposal that how can share the gold. Of the remaining players in the game, including the bidder If more than half (half is not enough) accepts the bid, the gold will be distributed accordingly and the game will end. If the offer is not accepted, the player who made the offer will be removed from the game and the extra gold that the players have the beginning of to game going to be taken away to be given to the player who has the most gold at the end of the game. the bid will move to the next player and the game will continue with the remaining players. All players trying to get as much gold as possible at the end of the game and considering all the possibilities Since the players perform without any mistakes, who is the player who gets the most gold at the end of the game and how much gold does the player get?

A band of 9 pirates have just finished their latest conquest - looting, killing and sinking a ship. The loot amounts to 1000 gold coins.  Arriving on a deserted island, they now have to split up the loot. You, as the captain of the band, have to propose a distribution plan (who gets what). What's your proposal?  Consider that this bunch is a democratic lot. If your proposal is accepted by half of the group, then everybody adheres to it. However, if folks feel you are getting greedy, and less than half of the band agrees to your proposal, then they kill you, and then your First Mate gets to make a proposal. And so it goes in decreasing order of hierarchy/seniority.


I know that given a differential equation, one that is separable, it is not fully correct to handle the $\frac{dy}{dx}$ as a ratio. Meaning that it is not simply a small difference in $y$ over a small difference in $x$, as the difference is infinitesimal. It is simply a notation created by Leibnitz that is equivalent to $f'(x)$.  My question is if this is the case then why is this method for ODE still used and taught? Is the answer always correct when dealing with ODE using this method or is does it lead to wrong results in some cases?

In the book Thomas's Calculus (11th edition) it is mentioned (Section 3.8 pg 225) that the derivative $dy/dx$ is not a ratio. Couldn't it be interpreted as a ratio, because according to the formula $dy = f'(x)dx$ we are able to plug in values for $dx$ and calculate a $dy$ (differential). Then if we rearrange we get $dy/dx$ which could be seen as a ratio.   I wonder if the author says this because $dx$ is an independent variable, and $dy$ is a dependent variable, for $dy/dx$ to be a ratio both variables need to be independent.. maybe?


I want to know what the difference is between defining an iteration variable before (outside) the for statement that uses it, as below...      int i;     for(i=1;...)   ...Against defining the variable within the for statement, as below:      for(int i=1;...)

I have always wondered if, in general, declaring a throw-away variable before a loop, as opposed to repeatedly inside the loop, makes any (performance) difference?  A (quite pointless) example in Java:  a) declaration before loop:  double intermediateResult; for(int i=0; i < 1000; i++){     intermediateResult = i;     System.out.println(intermediateResult); }   b) declaration (repeatedly) inside loop:  for(int i=0; i < 1000; i++){     double intermediateResult = i;     System.out.println(intermediateResult); }   Which one is better, a or b?   I suspect that repeated variable declaration (example b) creates more overhead in theory, but that compilers are smart enough so that it doesn't matter. Example b has the advantage of being more compact and limiting the scope of the variable to where it is used. Still, I tend to code according example a.  Edit: I am especially interested in the Java case.


Is there a way to make a custom hotkey for specific functions? Like to solve my problem here: I’m working on a piece, its a replica and I have many references setup in some collections and I need to hide/unhide the collections all the time. I do it by hitting the relevant checkbox in the object browser list. Can I somehow hotkey that specific checkbox? If coding, IK how to code, but I do not know how to get console or script in blender, or at-least I need a ‘pointer’ to get started.

How can I create a keyboard shortcut for a specific operator with using the python API?


I am trying to use this when invoking a constructor function. I am passing an object literal into the constructor as an argument.  var testView = new View({   element: '.testEl',   model: player,   initialize: function() {     var self = this;     setTimeout(function() {       self.model.set({         name: 'Billy'       });     }, 5000);   } }); // view instance   But when I log this inside the object it just gives me View {} but none of the methods inside.  I want to access the model, obviously I am lacking some knowledge here and I am asking why does this not work as expected in the example above?  The view looks like  // View var View = function(object) {   object.initialize.call(this);   this.element = document.querySelector(object.element);   this.element.innerHTML = object.model.get('name');    setTimeout(function() {     this.element.innerHTML = object.model.get('name');   }, 6000); };

I just came across an interesting situation in JavaScript.  I have a class with a method that defines several objects using object-literal notation.  Inside those objects, the this pointer is being used.  From the behavior of the program, I have deduced that the this pointer is referring to the class on which the method was invoked, and not the object being created by the literal.    This seems arbitrary, though it is the way I would expect it to work.  Is this defined behavior?  Is it cross-browser safe?  Is there any reasoning underlying why it is the way it is beyond "the spec says so" (for instance, is it a consequence of some broader design decision/philosophy)?  Pared-down code example:  // inside class definition, itself an object literal, we have this function: onRender: function() {      this.menuItems = this.menuItems.concat([         {             text: 'Group by Module',             rptletdiv: this         },         {             text: 'Group by Status',             rptletdiv: this         }]);     // etc }


The cantrip's description states you can make a sound that can be "your voice or someone else voice."  could a spellcasting Kenku use it to speak regularly without mimickry?

Such as generating a spoken sentence or series of sentences in a particular person's voice?


I am trying to get current time of a particular timeZone but when I write this:  Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("America/Boise")); System.out.println(calendar.getTime());   it always prints UTC time followed by "UTC" word maybe because on the server timeZone is set to UTC but still it shouldn't happen as I explicitly specified the timezone here.

I have a Timestamp value that comes from my application. The user can be in any given local TimeZone.  Since this date is used for a WebService that assumes the time given is always in GMT, I have a need to convert the user's parameter from say (EST) to (GMT). Here's the kicker: The user is oblivious to his TZ. He enters the creation date that he wants to send to the WS, so what I need is:  User enters: 5/1/2008 6:12 PM (EST)  The parameter to the WS needs to be: 5/1/2008 6:12 PM (GMT)  I know TimeStamps are always supposed to be in GMT by default, but when sending the parameter, even though I created my Calendar from the TS (which is supposed to be in GMT), the hours are always off unless the user is in GMT. What am I missing?  Timestamp issuedDate = (Timestamp) getACPValue(inputs_, "issuedDate"); Calendar issueDate = convertTimestampToJavaCalendar(issuedDate); ... private static java.util.Calendar convertTimestampToJavaCalendar(Timestamp ts_) {   java.util.Calendar cal = java.util.Calendar.getInstance(       GMT_TIMEZONE, EN_US_LOCALE);   cal.setTimeInMillis(ts_.getTime());   return cal; }   With the previous Code, this is what I get as a result (Short Format for easy reading):  [May 1, 2008 11:12 PM]


I want to calculate new value upon keypress in a textbox inside a datatable. However, the textbox inside the datatable is not triggering upon keypress.  $(document).on('mouseover', '#table1 tr', function() {   rndex = this;   jindex = this.rowIndex; });  var dtable = $('#table1').DataTable(); var origval = $('#table1 tr:eq(' + parseInt(rndex) + ') >td:eq(' + 1 + ')').html(); var $textvalue = $(jindex).find(".txtBox"); var newval;   $textvalue.on('keypress', function(e) {   if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57)) {     e.stopImmediatePropagation();     return false;   } }).on('keyup change', function(e) {   newval = parseFloat(origval) + this.value;   alert(origval); });     Thank you in advance!

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


Every time I try to animate my rig, the amount I can move the arrow transformation is fixed so I can't make any small adjustments.     How can I fix this?

My cursor is moving by every selection by large increments!  Normally when I use Blender, I am able to select and move objects to any coordinate. Now, all of the sudden, when I select an object or mesh the selection moves by an inch or so in each direction.  How do I reset it to normal?