Should who or whom be used in the following sentence?      All the swans seen by other people whom I know have been white.   My first thought was whom is correct because it's part of a prepositional phrase, but there's a lot going on in that phrase, and so now I'm not sure.

A friend needs help with his who and whom Right on the heels of my recent  regarding why 'who' and 'whom' present difficulties for so many native and non-native learners, comes another complex case of ‘who’ and ‘whom’. The language of a friend's report is bureaucratically complicated and his Supervising Teacher, is very pedantic that the English should be absolutely grammatically correct, which includes the prescriptive use of ‘who’ and ‘whom’. This means that the excellent generic advice  “use who in every case and always avoid whom”  cannot, unfortunately, be applied here. Many grammatically pedantic non-native teachers in my country insist on the proper use of 'whom', especially in official reports and dissertations. My friend therefore needs a reliable practical approach (that can be applied in any given case) to decide whether 'who' or 'whom' should be employed in a particular situation.  When does it get complicated? Problems arise when the sentence does not obviously require a subject pronoun, and the concerned verb is moreover not obviously transitive, making it difficult to decide whether it needs an object pronoun. Again, when the sentence has multiple verbs and clauses, where does one look for an indication as to whether it needs a subject pronoun or an object pronoun?  Appendix: Example sentences from my friend's report I have extracted one relevant passage to better illustrate the problem. N.B this is not a request for proofreading.  "A study of employee expectations regarding future confirmation in Government service, with special emphasis on the ethical aspects in the subjects' claim that long-term provisional employment is a virtual promise of future confirmation":   This special short project conducted a detailed case study of 5 typical auxiliary health care workers who(m) the Government has instructed Heads of Department to terminate from long-standing provisional employment.   The Department of Public Health had allotted special allowances for all subjects who(m) the Supervising Teacher considered deserving of compensatory remuneration for their time and effort spent participating in this project.   Mr.A, who(m) the academic committee had originally advised against, was however selected as the 5th subject due to a lack of other 'typical' cases.   The Supervising Teacher Mrs.B later raised an objection regarding payment of the special allowance to Mr.A, who(m) she had expressed reservations about in writing, leading to his initial disqualification by the academic committee, although he was subsequently selected and did actually participate as a subject of the study.   The Head of the Accounts Department delivered the official opinion that a person who(m) the Supervising Teacher had specifically shown a reluctance towards nominating as a subject of the study could not be considered for the award of any special allowance.


Let $$x=0.99999\ldots.$$  Clearly $x$ is a rational number.     I want to find $a,b$ such that    $$x=\frac{a}{b}.$$   Clearly $10x-x=9$ and thus $x=1$. So  $$1=0.99999\ldots$$  Where is my mistake?

I'm told by smart people that $$0.999999999\ldots=1$$ and I believe them, but is there a proof that explains why this is?


I have a freeNAS setup with iSCSI attached to my Windows machine. That servers me great cause I get all the ZFS features and easy reconnecting in Windows - Don't have to mess around with SMB mappings and reconnect issues constantly.  I have tried to search for setting up iSCSI to allow for multiple connections. Generally people say its a bad idea.. but maybe you it can be done with multipath or some other way?

Does anyone know how shared access (multiple Initiators) to a single iSCSI target is supposed to work.  I have got it semi-working with Linux (CentOS-7) target and Win 2012 server / Win Hyper-V 2012 R2 Initiators.  Problem is each instance seems to get it's own version of the NTFS partition.  The reason for doing this is so that I can have my virtual machine files hosted on the remote iSCSI target and migrate the actual running virtual machines between servers.  Without sharing the iSCSI target I cannot see any way of doing this.


I am using phpmyadmin to create a table for an assignment and I am trying to figure out how to prevent SQL injection but I'm getting some weird error and I am not sure why. I am trying to use the quote method to fix it but it's not working. Here is the code I have  try {   $conn = new PDO("mysql:dbname=*removed*;host=*removed*", "*removed*", "*removed*");   $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);    $firstName = $conn->quote($_POST["first_name"]);   $lastName = $conn->quote($_POST["last_name"]);   $house = $conn->quote($_POST["house"]);    $sql = "INSERT INTO my_table (last_name, first_name, house)   VALUES ('$lastName', '$firstName', '$house')";   $conn->exec($sql);   echo "
New entry successfully created.
"; } catch(PDOException $e) {   echo $sql . "
" . $e->getMessage(); }  $conn = null;   I looked at the textbook I am using and it says to use the $db->quote($_POST["var_name"]); to clean up the data, which is exactly what I do, but for some reason it's not working for me.   EDIT: The error message I am getting says this:  "INSERT INTO my_table (last_name, first_name, house) VALUES (''Allen'', ''Barry'', 'House1') SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Allen'', ''Barry'', 'House1')' at line 2   Any idea why?

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


Seems to be a reincarnation of this  issue from early last year: .  I'm on Android 5.1.1 and my Stack Exchange app is version 1.0.73.  If I open the application through a notification it opens with the inbox sidebar open, but there is no content inside. The loading graphic doesn't display, either, as if to suggest that loading never gets kicked off. To view the notification properly I then have to close the sidebar and reopen it:

When I receive a message on an SE post, I get a notification like this:    If I double tap this notification, the SE application opens, but my feed is empty approximately half the time. It looks like this:    If I refresh the feed (slide from the top), the feed does refresh and shows the new notification.   The notification, above, leads to  comment.  I haven't figured out the pattern yet, but this occurs roughly half the time I open a notification. It's occurred for chat messages, comments and answers - but not consistently. I have received notifications for the same post (for example, the two comments after the one linked above) that do not show an empty feed. But, a chat message barely 10 minutes later will show the empty feed again.  I am utilizing the beta app - version 1.0.72 on Android 5.0.1.


Is it possible to add a colon instead of a comma before quotations?  Like this:  Person A said: "Blah Blah Blah."  Not as in theatrical performance, but as used in an story.

Doing some editing and came across a sentence in which a colon is used to introduce a quote.  Is the colon justified in this case? SENTENCE ENDS:     ...wearing a T-shirt that says: "When the going gets tough, the tough get going."    The following question () is actually focused on a slightly different issue, since it is about using a colon to introduce a quotation after a complete sentence.  The answers to it seem to be geared toward that example; one of them cites a Purdue OWL post that says it is appropriate to use a colon to introduce a quotation after a complete sentence or independent clause. But that is not the case here, since "a T-shirt that says" is not a complete clause or statement.   One answer (by Roaring Fish) quotes a "" by Larry Trask that seems to say that it is "bad style," but not outright "wrong," to use a colon in the sentence "President Nixon declared: 'I am not a crook.' " This seems relevant, but it's a bit confusing. Why doesn't Trask just label this "wrong"? Is it a matter of opinion? I'd appreciate other references that describe the most common and influential viewpoints about how to punctuate phrases like this.


suppose one company has 1M share, 100K Sold out,900K left and the current price of each stock is $5. so if i buy another 100K what will be the stock price . assume that no one selling .

After a company has issued shares, why should it care if the value of the shares fluctuate? Since the shares are now publicly traded, if the value fluctuates, that is strictly a transaction between buyer and seller, none of whom are directly related to the company. E.g. if I sell X an iPhone for $100, why should I care if X is selling the iPhone to Y for 1 dollar or 1000 dollars? I have got my $100, so I need not bother. No?


how to make incremental backup using mysql ? somebody help me i'm struggle  mysqlbackup --apply-log --incremental [--use-memory=MB] [--uncompress]                 [--ibbackup=IBBACKUP-BINARY]                 INCREMENTAL-BACKUP-MY.CNF FULL-BACKUP-MY.CNF

We are using MySQL version 5.0 and most of the tables are InnoDB. We run replication to a slave server. We are thinking of backing up the MySQL log files on a daily basis. Questions  Is there any other way of doing an incremental backup without using the log files? What are the best practices when doing incremental backups?


Ali has few friends, does he?  Is using an affirmative question tag after that sentence a sound structure or not?

We always use a positive tag question after a negative sentence:  You shouldn't take this medicine, should you?  We use a negative tag question after a positive sentence:  She must leave early, mustn't she?  But when there is a negating prefix on the adjective (impatient vs. patient) after the verb "to be", then the sentence is negative in meaning. Does this mean the tag should be positive? Which is correct, A or B?  A: I am impatient, am I? B: I am impatient, aren't I? A: The class was dismissed, was it? B: The class was dismissed, wasn't it?


I have a very annoying problem.   I have developed a website with JSP and everything works perfectly on my local PC when I run it in Netbeans.  But if I put it on my Tomcat 7 server, one page gets an Null Pointer Exception at the line hsFilter.keySet():  ConcurrentHashMap<String, LinkedList<String>> hsFilter = (ConcurrentHashMap<String, LinkedList<String>>) session.getAttribute("hashMap_typ"); Set<String> set = hsFilter.keySet(); Iterator it = set.iterator();   The Tomcat log says the following:     java.lang.NullPointerException    at   org.apache.jsp.jsp.dynamisch_005fmitglieder_jsp._jspService(dynamisch_005fmitglieder_jsp.java:947)    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)     at   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)     at   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)     at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)     at   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     at   org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)     at   org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)     at   org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)     at   org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)     at Servlet.MainServlet.doPost(MainServlet.java:137)     at   javax.servlet.http.HttpServlet.service(HttpServlet.java:647)  at   javax.servlet.http.HttpServlet.service(HttpServlet.java:728)  at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)     at   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     at   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)     at   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)     at   org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)     at   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)     at   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)     at   org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)     at   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)     at   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)     at   org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)     at   org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)     at   org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)     at java.lang.Thread.run(Unknown Source)   The really crazy thing is that the page gets loaded half way through and breaks in the middle. If I log in as admin everything works but if I login as user it gets a NPE.  I hope someone can help me because I'm really new into JSP.  Greets

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


How many rolls of a $k$-sided dice should you expect to make before all numbers $1, 2,\dotsc, k$ have been seen at least once?

What is the average number of times it would it take to roll a fair 6-sided die and get all numbers on the die?  The order in which the numbers appear does not matter.  I had this questions explained to me by a professor (not math professor), but it was not clear in the explanation.  We were given the answer $(1-(\frac56)^n)^6 = .5$ or $n = 12.152$  Can someone please explain this to me, possibly with a link to a general topic?


I've been looking this up, but I couldn't find anything that helped. I'm having some trouble making an array of the size I want.   So far, I have created a list of lists with this code:   n=4 def matrixA(k):     A=[]     for m in range(0,k):         row=[]         #A.append([])         for n in range(0,k):             if (n==(m+1)) or (n==(m-1)):                 row.append(-deltaX/(deltaX)**2)             if (n==m):                 row.append(2*deltaX/(deltaX)**2)             else:                 row.append(0)         A.append(row)     return A pprint.pprint(matrixA(n)) print len(matrixA(n))   I get this output.   [[128.0, -64.0, 0, 0, 0],  [-64.0, 0, 128.0, -64.0, 0, 0],  [0, -64.0, 0, 128.0, -64.0, 0],  [0, 0, -64.0, 0, 128.0]] 4   Now, I want to make this an array of size (4,4). My problem is that when I do the following (converting the list to an array and trying to shape it):   A=numpy.array(matrixA(n)) print A print "This is its shape:",A.shape A.shape=(n,n)   I obtain:   [[128.0, -64.0, 0, 0, 0] [-64.0, 0, 128.0, -64.0, 0, 0]  [0, -64.0, 0, 128.0, -64.0, 0] [0, 0, -64.0, 0, 128.0]] This is its shape: (4,)   And then an error:   ValueError: total size of new array must be unchanged   How am I supposed to get an array of size (4,4) from here then?

Is there a simple way to flatten a list of iterables with a list comprehension, or failing that, what would you all consider to be the best way to flatten a shallow list like this, balancing performance and readability?  I tried to flatten such a list with a nested list comprehension, like this:  [image for image in menuitem for menuitem in list_of_menuitems]   But I get in trouble of the NameError variety there, because the name 'menuitem' is not defined.  After googling and looking around on Stack Overflow, I got the desired results with a reduce statement:  reduce(list.__add__, map(lambda x: list(x), list_of_menuitems))   But this method is fairly unreadable because I need that list(x) call there because x is a Django QuerySet object.  Conclusion:   Thanks to everyone who contributed to this question.  Here is a summary of what I learned.  I'm also making this a community wiki in case others want to add to or correct these observations.  My original reduce statement is redundant and is better written this way:  >>> reduce(list.__add__, (list(mi) for mi in list_of_menuitems))   This is the correct syntax for a nested list comprehension (Brilliant summary !):  >>> [image for mi in list_of_menuitems for image in mi]   But neither of these methods are as efficient as using itertools.chain:  >>> from itertools import chain >>> list(chain(*list_of_menuitems))   And as @cdleary notes, it's probably better style to avoid * operator magic by using chain.from_iterable like so:  >>> chain = itertools.chain.from_iterable([[1,2],[3],[5,89],[],[6]]) >>> print(list(chain)) >>> [1, 2, 3, 5, 89, 6]


It appears that there is not a single word that is the equivalent word for "synonym" in general usage. Is this the case?

I was discussing with some friends about synonyms when we found, that ironically nobody of us knew any synonyms to the word "synonym" itself. Are there any?


Assume I let netcat listen on some port on PC1 (IP:10.0.0.1) with:  PC1:~$ nc -l 9999   I connect from PC2 (IP:10.0.0.2) and send some strings:  PC2:~$ nc 10.0.0.1 9999     hello     touchit     test     what's up     touchit     bye   How do I have to modify the the first command on PC1 such that the command 'touch test.txt' is run on PC1 whenever I send 'touchit' from PC2?   It would be great to do that with a clever combinations of standard command and pipes. Of course, 'touch test.txt' could then be replaced by an arbitrary command. It would be extremely cool, if you could even launch different programs with different command strings sent from PC2.

I'd like to take a program P that reads from stdin & writes to stdout, but connect it to nc or whatever such that it reads from a certain port and outputs to another port.  # The reading is easy, here P reads from port 50505 nc -l 50505 | P   How do I get it to write back to say port 60606?


Suppose $\{\mathcal{F}_n\}_{n=1}^{\infty}$ is a sequence of $\sigma$-algebras of subsets of $X$ where they are properly nested: $\mathcal{F}_n \subset \mathcal{F}_{n+1}, \mathcal{F}_n \neq \mathcal{F}_{n+1}$. Prove that there is a sequence of disjoint sets $\{A_n\}_{n=1}^{\infty}$ and a subsequence $\{\mathcal{F}_{n_k}\}_{k=1}^{\infty}$ such that $A_k \in \mathcal{F}_{n_{k+1}}-\mathcal{F}_{n_{k}}$.  I found the proof in" A. Broughton and B. W. Huff: A comment on unions of sigma-fields. The American Mathematical Monthly, 84, no. 7 (1977), 553-554" but wondered to know if anyone knows any other proof than this one.

If $\mathcal{F}_1 \subset \mathcal{F}_2 \subset \dotsb$ are sigma algebras, what is wrong with claiming that $\cup_i\mathcal{F}_i$ is a sigma algebra?  It seems closed under complement since for all $x$ in the union, $x$ has to belong to some $\mathcal{F}_i$, and so must its complement.  It seems closed under countable union, since for any countable unions of $x_i$ within it, each of the $x_i$ must be in some $\mathcal{F}_j$, and so we can stop the sequence at any point and take the highest $j$ and we know that all the $x_i$'s up to that point are in $\mathcal{F}_j$, and thus so must be their union. There must be some counterexample, but I don't see it.


I've read that such is the case but I've thought up of a bijection which makes me think otherwise. My apologies if this has been asked before...  Let $\mathbb{W} = \mathbb{N} \cup \{0\}$. Let $P$ be the set of primes. Denote by $p_{k}$ the $k$th prime number.  Let $\{W_{p_{n}}\}_{n=1}^{\infty}$ be a sequence such that $W_{p_{i}} = \mathbb{W}$ for all $i \in \mathbb{N}$.  Then $S := W_{p_{1}} \times W_{p_{2}} \times \cdots = \mathbb{W} \times \mathbb{W} \times \cdots$ is a Cartesian product of countably infinite copies of $\mathbb{W}$, since the set of primes $P$ is countably infinite.  Now, consider $f : S \rightarrow \mathbb{N}$ such that $f(w_{1},w_{2},\dots) = p_{1}^{w_{1}}p_{2}^{w_{2}}\cdots = 2^{w_{1}}3^{w_{2}}\cdots$  We know that the every natural number has a unique prime factorization, so that $f$ is a bijection, from where it follows that $S$ is numerically equivalent to $\mathbb{N}$.  Where is the fault in this proof?

Let $\{E_n\}_{n\in\mathbb{N}}$ be a sequence of countable sets and let $S=E_1\times\cdots\times E_n\times\cdots $. Show $S$ is uncountable. Prove that the same statement holds if each $E_n=\{0,1\}$.  By the definition of Cartesian product of sets,   $$\displaystyle S=\Pi_{n\in\mathbb{N}} \{f\colon\mathbb{N}\rightarrow\cup_{n\in\mathbb{N}}E_n\mid\forall n, f(n)\in E_n\}$$  If $E_n=\{ 0,1\}$, then  $$\displaystyle S_{01}=\Pi_{n\in\mathbb{N}}\{0,1\}=E^{\mathbb{N}}$$, where $E=\{0,1\}$.  By a theorem, $\cup_{n\in\mathbb{N}} E_n$ is countable since the sequence is countable.  I'm not sure how to go on from here to show $S$ is uncountable. Can we say anything about the function $f$ that maps a countable $\mathbb{N}$ to another countable union of sequence of countable sets?


I keep getting an error when trying to populate a listview with an arraylist that was passed from another activity. I put in the adapter code the exact same as I have in another activity where it takes the user input, adds to array and populates the list which works fine but not here. I have two lists here just because I kept trying to test one or the other.  The Class:   package com.liftlover.mitchell.workoutapplication;  import android.content.Intent; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.View; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView;  import java.util.ArrayList; import java.util.List;  public class RoutineDetail extends AppCompatActivity { TextView routineTxt; ListView lv; List<String> excersiseList;    @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_routine_detail);     Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);     setSupportActionBar(toolbar);      Intent intentData = getIntent();     String getRoutine = intentData.getStringExtra("routine");     routineTxt = (TextView) findViewById(R.id.routineText);     routineTxt.setText(getRoutine);       lv = (ListView) findViewById(R.id.routineListView);       excersiseList = intentData.getStringArrayListExtra("excersiseList");     List<String> list = new ArrayList<String>();     list.add("wegewgW");     list.add("robnwgn");     list.add("q[3gng");      ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(RoutineDetail.this,android.R.layout.simple_list_item_1,list );     lv.setAdapter(arrayAdapter); }   }  The Error (Which I can't format correctly sorry):  Process: com.liftlover.mitchell.workoutapplication, PID: 2195 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.liftlover.mitchell.workoutapplication/com.liftlover.mitchell.workoutapplication.RoutineDetail}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)  at android.app.ActivityThread.-wrap11(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:148)  at android.app.ActivityThread.main(ActivityThread.java:5417)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference  at com.liftlover.mitchell.workoutapplication.RoutineDetail.onCreate(RoutineDetail.java:49)  at android.app.Activity.performCreate(Activity.java:6237)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)   at android.app.ActivityThread.-wrap11(ActivityThread.java)   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)   at android.os.Handler.dispatchMessage(Handler.java:102)   at android.os.Looper.loop(Looper.java:148)   at android.app.ActivityThread.main(ActivityThread.java:5417)   at java.lang.reflect.Method.invoke(Native Method)   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)


i am using netbeans IDE problem is how to set background image for JPanel without using JLabel. Can anyone tell me how to do this?

I have a  to which I'd like to add JPEG and PNG images that I generate on the fly.  All the examples I've seen so far in the , specially in the  use ImageIcons.  I'm generating these images as byte arrays, and they are usually larger than the common icon they use in the examples, at 640x480.   Is there any (performance or other) problem in using the ImageIcon class to display an image that size in a JPanel? What's the usual way of doing it? How to add an image to a JPanel without using the ImageIcon class?   Edit: A more careful examination of the tutorials and the API shows that you cannot add an ImageIcon directly to a JPanel. Instead, they achieve the same effect by setting the image as an icon of a JLabel. This just doesn't feel right...


I have been trying all the troubleshooting that was to find in here and on google. Can somebody please explain to me what settings that is wrong since my world map is showing up HUGE in the background and seemslike on the reflection of the can aswell. Please help!    best regards Anders

I'm having a problem rendering the environment map. I downloaded a sample project that has the same settings as my project but it renders without a problem. I tried using both a .hdr and .png image. Attached are screenshots with node settings. First is the incorrect render and 2nd image is the project the renders correctly. How do I go about fixing this?


I use below two commands to concatenate multiple files from different directories:   Method 1  type "C:\folder1\file1.txt" "C:\folder2\file2.txt" > output.txt Method 2  copy "C:\folder1\file1.txt"+"C:\folder2\file2.txt" output.txt   However, the output file in Method 1 contains EOF at the end of every single file. How to get rid of the EOF?

I have 50 text files in one directory.  Is there a Windows command-line method to concatenate those files into a single file?  I am using .  I don't want to type the name of all files.


Find $\lim_{n\to \infty}(\frac{n!}{(n+1)^n})^{1/n}$ $$(n!)^2=[1\cdot n][2\cdot (n-1)][3\cdot (n-2)] \cdots [(n-1)\cdot 2][n\cdot 1].$$ Each of the $n$  products $(k+1)\cdot (n-k)$, for $0\le k<n$, is $\ge n$. Thus $$(n!)^2 \ge n^{n} \quad\implies \left(\frac{n!}{(n+1)^n}\right)^{1/n}\ge \frac{\sqrt{n}}{n+1}.$$ Please help to solve it

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.


I am working in the field of neuroscience with a background in computer science. I try to find new ways of analyzing brain imaging data (mostly MRI, EEG, MEG, fMRI) with modern machine learning methods.  I would like to take a step up by adding genetics to the data arsenal. My work this far has found connections between some X and Y but not really shed insight to why things should be like that. I hope I could get a partial answer from biology.  To get started, I would need some good material to read. It does not matter if the content would be difficult in mathematical/statistical/technical aspects, but it should be approachable with limited knowledge in biology and/or chemistry and physics.  Suggestions?

I took an undergrad class in genetics. I felt it was not too intensive and I do not feel prepared for grad school (if I can manage to get in.)   Does anyone know of a preferably free resource for learning genetics?   I know the field is very large, but I would like to be competent in the field, considering I also want to learn more about genomics as well. And I figure one must first have a fundamental understanding of either computer science or biology to be successful in genomics, both of which I lack.


This semester I will be taking a masters degree course on combinatorics and I am looking for a book that covers the material of the lecture and some more advanced stuff so I can gain some deeper insights. More specifically the topics will be the theory of species, polya theory (i.e., enumeration of objects with symmetries), partially ordered sets and asymptotic enumeration. Additionally I am also interested in graph theory so if the book also has some chapters about that it would be nice too. There is also a  for the lecture with a more detailed list of contents if that helps. It would be awsome if it is written not too dense, i.e. not in a theorem-proof kind of fashion like hartshorne's algebraic geometry for example, but rather has a lot of examples and explanations in it and possibly also covers the prerequisites or at least refers to them in some way. Thanks in advance for any help!

What is your recommendation for an in-depth introductory combinatoric book? A book that doesn't just tell you about the multiplication principle, but rather shows the whole logic behind the questions with full proofs. The book should be for a first-year-student in college. Do you know a good book on the subject?  Thanks.


This has been driving me crazy for months! I hope someone remembers this.  It was probably but not definitely a YA book, though probably not called that at the time. It was Science Fiction. It was AT LEAST pre-1988, and read (and probably published) in the UK. It might have been from Penguin, not sure. It was not a very thick book, the paperback was maybe 1 centimeter thick.  The following details may have some mistakes - it's about 30 years since I read this.  It was set in a future Britain (not the UK, from what I recall).  The hero, a male, was either about to, or had just reached maturity, and was expected to start adulthood. He was part of the privileged elite who ran Britain an educated clique called the Ests or Ents (unless that name was for the revolutionaries), and his father was a significant member of that group/the government (perhaps even the leader), who expected great things from him (and obedience).  Instead he runs off and meets with the revolutionaries (who are losing), and perhaps falls in love with one, after overcoming their initial distrust. The revolutionaries were not part of the ruling group, though some may once have been. I think he tries to tell the revolutionaries that he can persuade his father to do something, perhaps go easy on them or make peace.  At some point the hero breaks into his parents' house (maybe through a skylight?), where I think he meets his father (unexpectedly sitting in a chair waiting for him?). I seem to recall he expects his mother to be there and wants to talk to her. I'm pretty sure the father tells him it's been a trick, they've been tracking him and he has betrayed the revolutionaries (and his mother is not in the house). His father expects him to rejoin the clique and forget all this nonsense. I think that at the end of that meeting guards move towards the house to catch him (and possibly any revolutionaries who came with him, I don't remember).  In the end the hero returns to some sort of camp or guard post, either under guard or to do something for the revolutionaries, and meets his father. I think the father pulls a pistol on the hero and threatens to shoot him, or maybe his revolutionary girlfriend, but somehow the hero ends up holding the pistol on his father, and I think he shoots him, to his father's surprise.  A few other details; I think the hero (and maybe the government) was based in Cambridge or Oxford. I think there was a wall or defensive perimeter around the city that the hero goes through, out into the wild countryside. I think the father's house was out in the countryside, though that seems unlikely, so maybe it's just in a wooded area within the perimeter.  Oh, and I think the cover had a futuristic car on it that looked a bit like the Lotus Esprit from James Bond (The Spy Who Loved Me).  I really hope someone can help identify that!

It was either a short story or a novel. I read it about 20 years ago, and some vague memory of it stuck.  It's set in a future where everyone's allotted role is decided by a series of tests once they reach a certain age. They are then classified into a group which decides what jobs they will do.  Our hero rather controversially gets a perfect score in the tests. Nobody had done that in a long time. and at first he worries about what this might mean. He is sent to work for the mysterious scientists who maintain the computer that runs society. Most people don't know they exist. He is disappointed to learn he has to be their tea boy, and learn a tea making ceremony perfectly.  In the process he learns how to fool the machine, and eventually to circumvent the controls society has placed on him. He makes several visits to an area outside the control of the machine - where people are living in poverty and lawlessness.  Can't remember the author, or the name, just that basic idea, and the fact that early in the book is a very grand "tea ceremony" where he must make the tea perfectly.


where can I find the good sources.list for 16.04.1? I messed it up and do not make a backup. Please let me know where I can find the good one?

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


I have a hard time understand  that      When you only look at the classical limit or classical physics, string   theory exactly agrees with general relativity   Because from what I know, String Theory assumes a fixed space time background (ie, all the strings and membranes interact in a fix background, and their interaction gives rise to fundamental particles that we observe), but General Relativity assumes that the space time background is influenced by what is in it and the interaction between them.   Given that both have very different assumptions, what do string theorists mean when they say string theory agrees with general relativity in a classical limit? Or more specifically, how does string theory--a fix spacetime background theory--  reconciles with the general relativity on dynamic spacetime background part? I can understand a fix, static spacetime in the context of changing, dynamic spacetime background, but I cannot understand a chanding, dynamic spacetime in the context of a fix, static spacetime background.

In quantum mechanical systems which have classical counterparts, we can typically recover classical mechanics by letting $\hbar \rightarrow 0$. Is recovering Einstein's field equations (conceptually) that simple in string theory?


May I ask are there any ways for users to categorize their favorites by self-written tags (not the official tags provided)? E.g. in Biology Stack Exchange, a user is asking a question with the tag 'respiratory system', but the answer given involves something related to biochemistry, which I really like, but the user didn't tag it in his/her question. If I want to create my own tag for my own categorization purpose of favorites, how can I do it?

Can someone please create the tag  on our site? We need to have it because        Foo is a recent/upcoming release / edition / model / episode of a popular, established OS / board game / bike brand / TV show   Foo is a hot new language / ingredient / game   we're currently using some other tag for questions about Foo, but it's causing ambiguity with a separate thing that's also named Foo      This is not a joke post. We get a lot of feature requests that ask for this or that tag to be created, and every time, a discussion ensues wherein people explain that there is no "tag creation department" and that community members create tags just by using them. I'm posting this "question" so that future requests of that type can be closed as a duplicate of this, saving time and eliminating redundant conversations for everyone involved.     See also:


My textbook has this problem as a kind of "concept check", where one is supposed to find a counterexample to the following statement:   A sequence of real numbers is cauchy iff.   $$ \forall \epsilon>0, \, \exists N \in \mathbb{N}, \, \forall n \geq N: |a_n-a_{n+1}|< \epsilon $$  I know that a sequence of real numbers is cauchy if   $$ \forall \epsilon>0, \, \exists N \in \mathbb{N}, \, \forall n,m \geq N: |a_n-a_m|< \epsilon $$   Finding such a counterexample is probably trivial, but I haven't been able to think of one.

I have never seen this terminology before, so I will provide the given definition.  A Pseudo-Cauchy sequence is : A sequence $(a_n)$ if for any $\epsilon > 0$ there exists $N \in \mathbb{N}$ such that $|a_{n+1} - a_n | \leq \epsilon \space \forall \space n \geq  N$  So then my question is that is a pseudo-cauchy sequence always converging?


I have to add row dynamically and i have to use Custom lookup comp in  first column.On the basis of lookup other fields values will be rendered in first row. But I am not able to add new row with blank values. I have followed blogs related to dynamically add/remove rows but nothing is helpfull in my case. Any help is appreciated.

I have a lightning iteration component that shows several information on accounts in a row. One of the columns allows the user to choose a lookup( I use a custom lookup component) value to edit the account. I have another row that has a checkbox. What I am trying to accomplish is if the user clicks the checkbox, the column with the lookup value gets greyed out and is not allowed for editing. I tried to do this with a boolean attribute that gets turned to false if the checkbox is checked and then use an aura if to display the custom lookup component in the column but this ends up disabling the entire column. I need the row to have that column be disabled in THAT specific row is the checkbox in that row is checked. Below is code.  <aura:iteration var="account" items="{!v.Accounts}" indexVar="idx">

{!account.Name}
         	                      <lightning:layoutItem size="4">                 <aura:if isTrue = "{!v.show}">                     <c:customLookupComp objectAPIName="Master_Customer__c"                         iconName="standard:account"                         selectedRecord="{!v.selectedLookUpRecord}"                         label="Search"                         fieldAPIName="Id"                         resultField1="Master_Customer__c"                         resultField2=""                         showlabel="false"                         />                     <force:inputField  value="{!v.selectedLookUpRecords}"/>                 </aura:if>             </lightning:layoutItem>
{!account.Parent.Name}
         	                                       <ui:inputCheckbox aura:id="button1" />
 </aura:iteration>   CONTROLLER  onLookupSelected : function(component, event) {     console.log('in lookupselected');     var selectedAccountGetFromEvent = event.getParam("selectedRecord");     console.log('in lookupselected2');     var recordsList = component.get("v.selectedLookUpRecords");     recordsList.push(selectedAccountGetFromEvent);     //component.set("v.selectedLookUpRecords" , selectedAccountGetFromEvent);      console.log('in lookupselected3');     var record = component.get("v.selectedLookUpRecords");   }, masterCustomerCheckbox : function(component, event, helper) {     console.log('in myfunc');     //var show = component.get("v.show");     //console.log('before show' + show);     //component.set("v.show", false);     //console.log('show ' + show);     var selectedItem = event.currentTarget; // Get the target object     var index = selectedItem.dataset.record; // Get its value i.e. the index This is because in the iterration i used index on it     var selectedacc = component.get("v.Accounts")[index]; // Use it retrieve the stored record     console.log('Acc Id ' + selectedacc.Id);      var masterCustomersToCreate = component.get("v.masterCustomerToCreate");     masterCustomersToCreate.push(selectedacc);      console.log('this is the master customer to create' + masterCustomersToCreate);      var action = component.get('c.createMasterCustomers');      action.setParams({         'accList': masterCustomersToCreate     })      action.setCallback(this, function(response) {         //store state of response         var state = response.getState();         if (state === "SUCCESS") {             //alert('Record Created');         }     });     $A.enqueueAction(action);    },


I have been trying to create a rough autocomplete input box and am almost there. However, getting stuck at a certain point. Do check the code before i identify the problem.  JS        Some CSS     HTML  <input type="text" name="" id="cit" onkeyup="getres()">
 Test 1 Test 2 Test 3
   PHP (results.php)   <?php if(isset($_GET['cit'])){$cit= $_GET['cit'];} include('connnew.php'); $getprops=$clientdb->query("SELECT * FROM cities WHERE city LIKE '%$cit%'")  or die ($clientdb->error); while($info=$getprops->fetch_assoc()){         echo "$info[city]
";      //echo "$info[city]
"; } ?>   My problem is, though everything works, when I click on the hrefs Tes1, Test2 and Test3, the input box #cit gets filled with the value, but not the values of href populated by the PHP into the same #resdiv !  Why is it so ? WIll the click function of jquery work only on hrefs written as text ? And not on the populated hrefs ?

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.


Consider a dynamical system characterized by these equations  $$\dot{x}=x-xy \\ \dot{y}=-y+xy$$  If we transform $\ln(y)=q$ and $\ln(x)=p$, the system can be changed into a Hamiltonian system with $q$ and $p$ which are defined as generalized coordinates and generalized momentum.  My question: Is it always possible to find a suitable transformation to change a dynamical system into a Hamiltonian system?

If I have an autonomous series of differential equations $$\tag{1} \frac{dx_i}{dt} ~=~ A_i(x_1,...,x_n)$$ with the condition that $$\tag{2} \sum_{i=1}^n\frac{\partial A_i}{\partial x_i}~=~0$$ in all regions of phase space, can this be written as a Hamiltonian system in terms of some generalized position and momentum coordinates?


System settings application is missing I was deleting some apps from Ubuntu. Afterwards, I realized that I don't have the settings application installed. What should I do to re-install it? I don't know whether I deleted the system settings app - I don't think that's possible. I tried installing KDE system settings but that's not the right application. Any help would be appreciated.

System settings is missing. I tried reinstall it as it mentioned , but it seems to be installed and deactivated. This problem occurred when I installed Elementary desktop environment and uninstalled it afterwards.


From the help file for autoruns: Note: before you send e-mail reporting what you believe to be an auto-start location that's overlooked by Autoruns, please make sure that Autoruns doesn't cover it and verify that the location actually works. I understand that Autoruns is essentially a list of known startup locations, and this is how it is able to find the startup programs that it finds. What I don't understand is this: if a program starts at startup then Windows has to be aware that the file needs to be run at startup and MUST also know where the location of the startup file is, otherwise it couldn't possibly be run at startup. So why isn't it possible for a tool like this to know the location of startup files in Windows without relying on "known possible" locations? Why aren't ALL of the locations known on a given device? My question is a "WHY does this work this way" not "HOW can I get around this" question. I have found plenty of the second kind, not the first.

I'm trying to delay the startup of a specific program that loads at login. As per an answer in , I should be able to do it using Task Scheduler. The problem is, I can't find the program listed anywhere. Is there a particular pane I should be looking in? The program is Razer Synapse so I don't think it would be in the Microsoft or Western Digital folders.    If it's not in Task Scheduler, is there another way I can delay it at startup?  Out of curiosity how many ways are there for a program to be run at Startup in Windows?


I have been using so many 3rd party libraries(jar files) that my CLASSPATH is completely messed up as i have to include the path for every single jar file that i use.  I've been wondering if there is a way to include all the jar files in a folder using wildcard(*) operator (like *.jar). But it seems to be not working. Is there any other way that can shorten the CLASSPATH that currently looks like an essay ;) on my PC?.

Is there a way to include all the jar files within a directory in the classpath?  I'm trying java -classpath lib/*.jar:. my.package.Program and it is not able to find class files that are certainly in those jars.  Do I need to add each jar file to the classpath separately?


fails on the first encounter with a folder it has no access rights to.  The method throws an UnauthorizedAccessException (which can be caught) but by the time this is done, the method has already failed/terminated.  The code I am using is listed below:  try {     // looks in stated directory and returns the path of all files found                     getFiles = Directory.GetFiles(         @directoryToSearch,          filetype,          SearchOption.AllDirectories);              } catch (UnauthorizedAccessException)  {  }   As far as I am aware, there is no way to check beforehand whether a certain folder has access rights defined.  In my example, I'm searching on a disk across a network and when I come across a root access only folder, my program fails.

I am trying to display a list of all files found in the selected directory (and optionally any subdirectories). The problem I am having is that when the GetFiles() method comes across a folder that it cannot access, it throws an exception and the process stops.  How do I ignore this exception (and ignore the protected folder/file) and continue adding accessible files to the list?  try {     if (cbSubFolders.Checked == false)     {         string[] files = Directory.GetFiles(folderBrowserDialog1.SelectedPath);         foreach (string fileName in files)             ProcessFile(fileName);     }     else     {         string[] files = Directory.GetFiles(folderBrowserDialog1.SelectedPath, "*.*", SearchOption.AllDirectories);         foreach (string fileName in files)             ProcessFile(fileName);     }     lblNumberOfFilesDisplay.Enabled = true; } catch (UnauthorizedAccessException) { } finally {}


I've got a problem. I need to write a csv file (whit append) but i can't write the item that are duplicate in the file. So:  I read all item in the csv file, I add the item to my list (that then I write to the file), and I want to remove duplicate from the list before writing in the file... I try to use "distinct" but it doesn't work.  My class:  class MyList_Base {   public string Cliente  {get; set; }   public double   TotaleProvvigione  { get; set; }   public double   TotalePunti        { get; set; }   public string   Descrizione        { get; set; }   public double   Pezzi              { get; set; }   public double   Provvigione        { get; set; }    public bool     DigitalPen         { get; set; }   public bool     ReferenzaPersonale { get; set; }   public DateTime Data               { get; set; }   public string   Mese               { get; set; }   public string   Gara               { get; set; }   public double   PuntiGara          { get; set; }   public string   Note               { get; set; }     public MyList_Base(string cliente, double totaleProvvigione, double totalePunti, string descrizione, double pezzi, double provvigione, bool digitalPen, bool referenzaPersonale, DateTime data, string mese, string gara, double puntiGara, string note)   {     Cliente            = cliente;     TotaleProvvigione  = totaleProvvigione;     TotalePunti        = totalePunti;     Descrizione        = descrizione;     Pezzi              = pezzi;     Provvigione        = provvigione;     DigitalPen         = digitalPen;     ReferenzaPersonale = referenzaPersonale;     Data               = data;     Mese               = mese;     Gara               = gara;     PuntiGara          = puntiGara;     Note               = Note;   }    public override string ToString()   {     return Cliente + ";" + TotaleProvvigione + ";" + TotalePunti + ";" + Descrizione + ";" + Pezzi + ";" + Provvigione + ";" + DigitalPen + ";" + ReferenzaPersonale + ";" + Data + ";" + Mese + ";" + Gara + ";" + PuntiGara+";" + Note;   }    public static MyList_Base Parse(string csv)   {     string[] tmp = csv.Split(';');     return new MyList_Base(tmp[0], Convert.ToDouble(tmp[1]), Convert.ToDouble(tmp[2]), tmp[3], Convert.ToDouble(tmp[4]), Convert.ToDouble(tmp[5]), Convert.ToBoolean(tmp[6]), Convert.ToBoolean(tmp[7]), Convert.ToDateTime(tmp[8]), tmp[9], tmp[10], Convert.ToDouble(tmp[11]), tmp[11]);   }  }   And this is what I need to do : "//TODO: REMOVE DUPLICATE"  public List<MyList_Base> LoadMyData(string nomeFile) {   if (!File.Exists(nomeFile)) return null;    List<MyList_Base> tmp = new List<MyList_Base>();   StreamReader sr = new StreamReader(nomeFile);    while(!sr.EndOfStream)   {     tmp.Add(MyList_Base.Parse(sr.ReadLine()));   }    sr.Close();   return tmp; }  public bool Save(string nomeFile) {   var tmp = LoadMyData(nomeFile);   StreamWriter sw = new StreamWriter(nomeFile);    //TODO: REMOVE DUPLICATE    foreach (var x in this)   {      sw.WriteLine(x.ToString());   }    sw.Close();   return true; }   Can someone help me?  PS: sorry for my bad english.. Fabio.

Anyone have a quick method for de-duplicating a generic List in C#?


I have 33h:38m:06s of music that I am trying to combine (for a project) into one large .midi file. So far, I have 632 .MP3 files in one folder, and I am trying to combine them into one file.  What is the best approach to achieving this? Obviously, cloud-based merging software is out of the question since I have too much data to merge. Is there a way to accomplish this through a terminal (I'm on mac) command?

How do you join multiple MP3 files into one?  "cat" and "mp3wrap" are no good as they produce non standard MP3 files.  I know I can use audacity, but when you have 1000's of MP3 files to join into one, it takes too long.  Any suggestions?


I have been trying to remember the title/find this book for over a decade. The main character is an orphan. I think she is slightly psychic? She becomes a thief but hates stealing; at one point she steals a button instead of an expensive coin when pick-pocketing. She also steals a peacock feather glove from a princess or something?

I'll apologize for this being a vague description up front. I read a book about 8 years ago about a girl who could grow her nails into essentially razorblades or long enough that they could be used as razors. She travels to a city and either becomes an assassin or a thief (pretty sure it was a thief). I vaguely remember the book opening with her being chased by a mob. At some point during her thief training she realizes that the layout of the city is the key to some important plot device. I think she was given some scroll or cryptic image and then during her training she realizes that the layout of the city correlates to it.  Although I did read this 8 years ago I'm pretty sure the book was at least 5-10 years older than that, maybe even more because it was my mom who gave it to me and she said had read it when she was younger. The dust cover was missing when I read it so I have no description for the cover. I do remember that the author was male. It was a fantasy setting and there may have been vampires involved at some point but that part of my recollection of the book is even fuzzier than what I've already described. I've tried googling for this book but obviously my description is fairly vague. I will gladly answer any follow up questions that I can to try and help figure this out because it has been bothering me for years.


$\sum_{k=0}^{n}{k\binom{n}{k}}=n2^{n-1}$  $n2^{n-1} = \frac{n}{2}2^{n} = \frac{n}{2}(1+1)^n =  \frac{n}{2}\sum_{k=0}^{n}{\binom{n}{k}}$  That's all I got so far, I don't know how to proceed

I'm trying to prove that  \begin{equation} \sum_{k= 0}^{n} k \binom{n}{k} = n \cdot 2^{n - 1} \end{equation}  with the Binomial Theorem.  I know that the B.T. states that  \begin{equation} (x + y)^n =  \sum_{k= 0}^{n} \binom{n}{k} x^{n-k}y^{k}  \end{equation}  The proof that I have tried starts with:  \begin{equation} n \cdot 2^{n-1} =  \end{equation}  Actually I am stucked with this step.


I am a bit confused by how Python handles variable scope. Below is a simple example that I created to explain the varialbe scope. When I execute the code below, the reference error surprisingly happens at the line print(x) instead of x = x + 1. def foo():     print(x)     x = x + 1  x = 0 foo()  I would assume at the line print(x), Python should have access to the x in the global scope, no? (In fact, if we comment out the line x = x + 1, the code actually runs) How exactly does the Python intepreter work here?

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


Reference:   We tried various different trigonometric identities. Still no luck.   Geometric interpretation would be also welcome.  EDIT: Very good answers, I'm clearly impressed. I followed all the answers and they work! I can only accept one answer, the others got my upvote.

Possible Duplicate:          Prove $$\cos(\alpha) + \cos(\alpha + \beta) + \cos(\alpha + 2\beta) + \dots + \cos[\alpha + (n-1)\beta] = \frac{\cos(\alpha + \frac{n-1}{2}\beta) \cdot \sin\frac{n\beta}{2}}{\sin\frac{\beta}{2}} $$


I'm trying to do a backup on my Dropbox folder but I get the following message:  Source Path Too Long The source file name(s) are larger than is supported by the file system. Try moving to a location which has a shorter path name, or try renaming to shorter name(s) before attempting this operation.  My Dropbox folder contains 115752 files, so I wonder if there's a way to automatically shorten the names that are too long? I'm running on Windows 7.

I was working with some computer vision source code I found and didn't realize that it creates a cache file that has a VERY LONG name and now I can't delete the 2 of them. I tried to rename it to a shorter name but I can't do anything to the file, I also tried to restart my computer and see if it would just go away. The error message says:  Destination Path Too Long. The file name(s) would be too long for the destination folder. You can shorten file name and try again, or try a location that has a shorter path.   How can I delete the files in this case?


Compare:    With    The Newest of the new questions at that point is from 2013:    How do the sort methods actually work? Is this what's intended or are they broken?

Select New questions, show Recommended and sort by Newest and the  in my list is from 2012:  EDIT The very old questions now appear to be gone (yay) but the ordering seems inconsistent (boo):


While updating my Zorin 15.3 using sudo apt-get update and sudo apt-get upgrade i am getting this issue Processing triggers for initramfs-tools (0.130ubuntu3.11) ... update-initramfs: Generating /boot/initrd.img-5.4.0-45-generic W: Possible missing firmware /lib/firmware/rtl_nic/rtl8125a-3.fw for module r8169 W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168fp-3.fw for module r8169 W: Possible missing firmware /lib/firmware/i915/tgl_dmc_ver2_04.bin for module i915 W: Possible missing firmware /lib/firmware/i915/skl_guc_33.0.0.bin for module i915 W: Possible missing firmware /lib/firmware/i915/bxt_guc_33.0.0.bin for module i915 W: Possible missing firmware /lib/firmware/i915/kbl_guc_33.0.0.bin for module i915 W: Possible missing firmware /lib/firmware/i915/glk_guc_33.0.0.bin for module i915 W: Possible missing firmware /lib/firmware/i915/kbl_guc_33.0.0.bin for module i915 W: Possible missing firmware /lib/firmware/i915/icl_guc_33.0.0.bin for module i915  can anyone help how to fix it?

Whenever I try to install any drivers or something I get this error. Because this error I guess I am not able to on the machine. I have booted normal from recovery mode after that I have rebooted system but no luck. w: possible missing firmware /lib/firmware/rtl_nic/rtl8125a-3.fw for module r8169  w: possible missing firmware /lib/firmware/rtl_nic/rtl8168fp-3.fw for module r8169  i: the initramfs will attempt to resume from /dev/nvme0n1p4  i: (uuid=827a4ecd-a3d9-4990-8a01-bb7aa2a57a22)  i: set the resume variable to override this.


I would like to buy a secondhand or refurbished iPhone 7 or newer. Since I am not watching anything regarding the hacker's scene, I am not up-to-date. Is any newer version of the iPhone hacked? Is it possible to manipulate iPhone firmware?

Will an    Work on any jailbroken-iPhone and Make a jailbroken-iPhone "unjailbroken"? Make a jailbroken-iPhone "supported by Apple"?   Similarly, does such an iOS reinstall reset the iPhone (jailbroken or not) back to a "clean, factory default" state?  My near-term purpose: I have an iPhone 4S running iOS 5.1 I'd like to jailbreak to at least install better Google Voice integration like .


Here's an example of my table:  Skill | SkillLevel 1 | 1 1 | 2 1 | 3 2 | 1 2 | 2 3 | 1 3 | 2 3 | 3 3 | 4  So, I want to write a query which returns me Skill 1 SkillLevel 3, Skill 2 SkillLevel 2 and Skill 3 SkillLevel 4 - Moreover, a select query to select one row of each Skill, but the one with the highest SkillLevel. All in one query, I'm clueless.  Thanks in advance  Edit: The table contains about 200 different Skills.

Table:   UserId, Value, Date.   I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date. Is there a way to do this simply in SQL? (Preferably Oracle)  Update: Apologies for any ambiguity: I need to get ALL the UserIds. But for each UserId, only that row where that user has the latest date.


I need a good word for the object a care-taker is taking care of. The term will be used in scientific environment, more specifically in IT: we have an application which is "monitoring" other applications's status and in case it senses some "deviation" from normal behaviour it takes specific actions (restart, allocate more resources, etc, not relevant).   But I just don't know how to call these "applications that some other application takes care of" ...

I want to write a book about the unfair expectations of a caregiver. A caregiver refers to somebody to looks after somebody else.  What is the term for that 'somebody else'.  'Patient' doesn't seem all encompassing.


In season 6 finale Cersei crowns herself queen of the Seven Kingdoms, but whom will she de facto rule over? Even if we put aside that her realm is about to be attacked by two great forces from the north and the east, there doesn’t seem to be much support for her Iron Throne in the Seven Kingdoms. The North has essentially seceded, as have the Iron Islands, while Highgarden and Dorne are plotting against her. The Vale seems to have aligned them selves with the Starks and while the situation in The Stormlands is currently unknown it is unlikely that they would support a Lannister queen. This leaves only The Westerlands (which were “hers” already), The Riverlands (which might be in disarray after Arya killed the key Freys) and The Crownlands.  I realize that this probably doesn’t even matter in the grand scheme of things with the eminent arrival of the Night’s King and Daenerys, but it just seems that she will not be ruling much, something that she is probably oblivious to in her blind quest for power.

Based on , my understanding is that there are 9 regions of Westeros subject to the rule of the Iron Throne, from Dorne joining up to Cersei killing Robert.  With whom does [insert region] align in what appears to be Daenerys vs Cersei?   Kingdom of the North -- Daenerys probably but currently busy with White Walkers Kingdom of the Mountain and the Vale -- Daenerys probably but currently busy with White Walkers (supposedly; depends on what Littlefinger has in mind) Kingdom of the Isles and Rivers (Iron Islands) -- Daenerys Kingdom of the Isles and Rivers (Riverlands) -- Cersei because the Freys are with the Lannisters? Kingdom of the Rock -- Cersei because she is a Lannister Kingdom of the Stormlands -- Cersei? Kingdom of the Reach -- Daenerys after invitation of Varys and Ellaria Principality of Dorne -- Daenerys after invitation of Varys presumably Crownlands -- Cersei since Cersei is currently occupying the Iron Throne   Am I understanding this right? Anything wrong?


I live in the USA and was wondering what server I should use for updates, archive.ubuntu.com or us.archive.ubuntu.com.  What is the difference betweeen them? TIA, A4Skyhawk

If you go into the "Software & Updates" in "System Settings", it gives you the option for the "Main Server" or "Server for your country" ("your country" replaced by the name of your country), what is the difference between those? What would be the pros and cons of using either?  I am using Ubuntu 14.10.


After I graduated university in an unrelated field, I decided I want to learn a couple of math subjects. So I've gathered the interned resources I could find and I studied them on my own. I've been doing this in order to increase my chances of being accepted to a masters program that would require these as prerequisites.   But how am I to prove in my application that I've been learning these subjects through self study? If it were coding, I could have provided some github projects, but regarding mathematics I find it hard to find some meaningful way to attest that you've covered some area unless you've taken a university degree in that field.

I posted a similar question at the following  yesterday; since, however, the focus of the question was different, I'm posting this question in a separate post.  It seems as if I'll be taking the next year off and studying a lot of mathematics on my own and apply to graduate schools in the next cycle. There's a lot of advice both on this website and Academia StackExchange for such students. However, I'd like to know how can students who have studied material outside of class better convince the admissions committee of the work they have done thus far. I know it's generally difficult to do this as an international student; the situation must be different for U.S citizens, I suppose.  Assuming I don't get to take courses which I'll be self studying over the next few months, how should I go about making sure the admissions committee take due notice of the work I have done, and more importantly, they can recognize it, if not verify it completely. Of course, I will keep in touch with my math adviser. In addition, what else can I do? Say, I am studying abstract algebra on my own in the summer, working out problems in, say, Dummit and Foote's book. Should I, perhaps, make a website (a Google site), periodically type the solutions to the work I have done and post it online, so when I apply to graduate schools, I can refer admissions committees to this portfolio of sorts.  In a nutshell, I'd like to know, especially for students who have gone through such a process/situation, of the list of best possible set of actions one can do to make sure the work one has done outside of class is duly considered, if someone who is interested in mathematics schools doesn't have a large number of math courses.  Edit:  I have an additional query: I'll be taking next year off, but I'll be able to visit my college. Even though I won't be enrolled in classes, preferably with the instructor(s) who already know me, sit in their classes, work on problem, and perhaps even take exams. even though I won't get a grade, I could ask the instructor to mention in the letter that I completed this task. She could also comment on how well I did relative to my peers. Thoughts?


Prisms can split while light into coloured components. As Blender is not really a full simulation system for light, I’m guessing that effects of light splitting by prisms or such like can only be faked. Has anyone tried?

I'm trying to achieve the effect where a beam of light sent through a prism or other refractive object, separates out into the light spectrum. (See image below)    This effect is especially useful to have when modeling gemstones, since the 'sparkle' of colors produced by this effect adds a lot of realism to the model.  It does not seem possible to get Cycles to produce this effect, since Cycles handles each ray of light as only a single, one-colored ray. Is there any way to coax Cycles (or any other render engine) into treating light as a full spectrum? Is this kind of treatment of light even possible in Blender?


My German visa validity is from 19-Feb-2019.  I have booked qatar airways flight from India which has departure at 19-Feb 3.45 AM IST. The time in Germany would be 18-Feb-2019 11:15 PM CET.  Would I be allowed to board the flight considering my visa would not be valid at that time with respect to CET.  I called qatar twice and got two different answers, probably I was not able communicate clearly via phone.   I might be overthinking it, But since this is my first time I am a bit anxious.

My Chinese in-laws intend to visit us in one month from now. Their visa is valid from Nov 23rd. Would it be possible for them to take the airplane on November 22nd in China and arrive in Schengen area on November 23rd?  Or does the visa already have to be valid upon departure?  In our particular case, they still need to transfer in Beijing first. The actual flight to Schengen zone effectively only departs on the 23rd so I guess that should be completely fine then?


I am writing a library in C++. The library has multiple headers and cpp files and needs to be cross platform (Windows Visual Studio and Linux gcc). When built the library and headers are installed in a system directory somewhere, where they can be found by other code on the same machine (e.g. /usr/local on a Linux system).  If one of my headers needs to #include one of my other headers then should I use angle brackets or quotes?  I feel like angle brackets is what should be used once the library is installed so that system directories are checked, but when building the library I need to use quotes so that local directories are checked and I don't pick up an out of date version from the system directories.  I am aware ow what the different versions of #include <filename> and #include “filename” mean. I am asking which is appropriate and why, for the situation of writing a library.

In the C and C++ programming languages, what is the difference between using angle brackets and using quotes in an include statement, as follows?   #include <filename>  #include "filename"


I've got a problem with prove about cardinality of sets. How can I prove that $\lbrace 0,1 \rbrace^\mathbb{N} \simeq \mathbb{N}^\mathbb{N}$?

By definition $\aleph_1 = 2 ^{\aleph_0}$. And since $2 < \aleph_0$, then $2^{\aleph_0} = {\aleph_1} \le \aleph_0 ^ {\aleph_0}$. However, I do not know what exactly $\aleph_0 ^ {\aleph_0}$ is or how I could compute it.


Say $R$ is a ring with unit element $1$ and $\phi:R\to R'$ is a ring homomorphism. Prove that $\phi(1)$ is unit element of $R'$.   So I have shown the following with regard to $\phi(1)$  $$\phi(1)\cdot\phi(a)=\phi(a)\cdot\phi(1)=\phi(a)$$ $$ \phi(-1)=-\phi(1)$$  Is this sufficient, or there is something more I need to prove?

If $ \phi: R \to R'$ is a homomorphism of $R$ onto $R'$ and $R$ has a unit element,  $1$, show that $\phi(1)$ is the unit element of $R'$.  I am having trouble proving this. I think I just need a hint on how to start and I will be able to solve. But basically I have tried a few things like $\phi(1) = \phi(a)\phi(b)$ but I cannot assume it is a division ring. Also is it okay to assume from the wording of the question that $R'$ has a unit element.  Thanks in advance.


I have a question, regarding authorship in a publication.  A colleague of mine who is a biologist (from a different group) received the second revision of her/his paper and in the revision it's been asked to do Anova in order to illustrate the significant change between 4 groups.  I'm saying a colleague not a friend! and also they may come more and more in the future.   I don't want to sound like a cheeky person, but have no idea whether if I do it I should be included in the paper or I should just do it as if I'm doing it for a so called friend!  Should I be at least included in the acknowledgement, or?  I have no access to my boss to consult this with him. I would appreciate your help to make this point clear to me.  Thanks!

I am a graduate student in a small department and have become the go-to person for statistics advice among the other students.  I enjoy this but am wondering at what point I should expect, or request, becoming a collaborator on the project.  Pointing someone towards a method, a paper or a book is definitely not worthy of any recognition, neither would a short one-off 15 minute conversation in the hallway.  But what if I help them understand a difficult statistical method or fix some computer code that otherwise might have taken them days or even weeks to achieve on their own?  What if our conversations helps clarify the questions they are asking either statistically and scientifically.  I assume that if I became a co-author, I'd continue to contribute to the project, help write the statistical methods, comment on the full paper, etc.    I'm wondering if I should set up ground rules that I tell people, like, "the 1st 20 minutes are free, but after that, we'll have to talk about long-term collaboration."  Or I could come up with a list of services I can provide and what the expectations are.     This  comments on these issues from the perspective of a full-time statistician.  This  question addresses more general issues about co-authorship.


In few of my answer to a question, my reputation is missing for upvote. See the screenshots below for that.     In first one im missing 20 reputation and in second one 10.  Please tell me why this??

When I visit the reputation tab of my profile, I see a lot of stuff. I can make out some of it, but not all.   What do all the event types mean? Why do some events show an odd reputation gain or not show any reputation change at all? Why are some events sometimes highlighted in yellow? My reputation suddenly dropped, but I don't see anything. What happened? Why do some events disappear from my reputation history?


If a person is Polymorphed into an outsider by the 4th level spell Polymorph, what affect does the 4th level spell Banishment have on them?   I mean, based on RAW, they're treated as a native, because they started that way, but I think it has interesting consequences to treat it the other way?

I can't find in the books the definition of “native”, only that a creature type can define its native plane:     Elementals are creatures native to the elemental planes (MM, p. 6)   Celestials ands fiends have a similar line.  By RAW its seems like your native plane isn't determined by what plane you were born on, since a succubus/incubus born on the material plane is native to the lower planes, just as a cambion is.  So I was wondering: If you banish a druid in fire elemental form, does he travel to the plane of fire? If a Slaad* is born from an humanoid body on the material plane, is it native to the material plane?  * Note that slaads are listed as aberrations.


I am refreshing the primary tab after clicking on the update button.i am using the oncomplete function. on the command button oncomplete action is not working.  i have tried in the following way:   <apex:commandButton action="{!calculateMilestone}" title="Submit" value="Update"       reRender="id1" status="loadStatus"  rendered="{!controls}"       oncomplete="testRefreshPrimaryTabById()"/>

I want to refresh the entire service console on clicking of the save button on the visual force page. The button is an inline visual force page. Any ideas?  <apex:includeScript value="/soap/ajax/26.0/connection.js"/> <apex:includeScript value="/support/console/26.0/integration.js"/> <script type="text/javascript"> function focusAndSave() {     document.getElementById('focusMe').click(); }     </script>     <apex:form >     <apex:pageBlock id="pb">         <apex:pageMessages id="errMsgsId"></apex:pageMessages>         <input type="text" id="focusMe" style="display:none" />         <apex:pageBlockTable id="table" value="{!candidateMap}" var="c">             <apex:column value="{!candidateMap[c].Contact__r.Name}"/>             <apex:column value="{!candidateMap[c].Submitted_at__c}"/>             <apex:column value="{!candidateMap[c].Interview_Availability__c}"/>             <apex:column value="{!candidateMap[c].Notice_Available__c}"/>             <apex:column headervalue="Stage">                 <apex:outputfield value="{!candidateMap[c].Stage__c}">                     <apex:inlineEditSupport event="ondblclick"/>                 </apex:outputfield>             </apex:column>             <apex:column headervalue="Ideally looking for">                 <apex:outputfield value="{!candidateMap[c].Ideally_looking_for__c}">                     <apex:inlineEditSupport event="ondblclick"/>                 </apex:outputfield>             </apex:column>             <apex:column headervalue="Action">                 <apex:commandLink value="Save" action="{!saveCandidate}" rerender="errMsgsId,table" onclick="focusAndSave()" oncomplete="testGetFocusedPrimaryTabId()">                     <apex:param name="candidateId" value="{!candidateMap[c].Id}" assignTo="{!candidateId}"/>                 </apex:commandLink>             </apex:column>         </apex:pageBlockTable>         <apex:panelGrid columns="7" style="margin: 0 auto;">             <apex:outputLabel value="{!noOfRecords} records found"></apex:outputLabel>             <apex:commandButton status="fetchStatus" reRender="pb" value="|<" action="{!first}" disabled="{!!hasPrevious}" title="First Page"/>             <apex:commandButton status="fetchStatus" reRender="pb" value="<" action="{!previous}" disabled="{!!hasPrevious}" title="Previous Page"/>             <apex:commandButton status="fetchStatus" reRender="pb" value=">" action="{!next}" disabled="{!!hasNext}" title="Next Page"/>             <apex:commandButton status="fetchStatus" reRender="pb" value=">|" action="{!last}" disabled="{!!hasNext}" title="Last Page"/>             <apex:outputLabel value="Page {!pageNumber} of {!pagecount}"></apex:outputLabel>         </apex:panelGrid>     </apex:pageBlock> </apex:form>


When I do sudo apt update I keep getting stuck in the line below:  0% [Connecting to security.ubuntu.com (2001:67c:1360:8001::21)]    Is there any problem with ipv6 resolution in Ubuntu? Is there a way to force ipv4 in case this is the problem ? (maybe my router is not so smart, I don't know).  Ping output:  ping6 2001:67c:1360:8001::21 PING 2001:67c:1360:8001::21(2001:67c:1360:8001::21) 56 data bytes ^C --- 2001:67c:1360:8001::21 ping statistics --- 12 packets transmitted, 0 received, 100% packet loss, time 11000ms   Traceroute output:   traceroute6  2001:67c:1360:8001::21traceroute to 2001:67c:1360:8001::21  , 30 hops max, 24 byte packets  1  * * *  2  * * *  3  * * *  4  * * *  5  * * *  6  * * *  7  * * *

When I do upgrade it gets stuck here:  user@plato:~# sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following packages will be upgraded:   bind9-host coreutils cpio curl dnsutils libbind9-90 libc-bin libc-dev-bin   libc6 libc6-dev libcgmanager0 libcurl3 libcurl3-gnutls libdns100   libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libisc95 libisccc90   libisccfg90 libjasper1 liblwres90 libplymouth2 libsepol1 libssl-dev   libssl-doc libssl1.0.0 linux-libc-dev mime-support multiarch-support ntp   ntpdate openssl plymouth plymouth-theme-ubuntu-text python3-distupgrade   ubuntu-release-upgrader-core unzip 39 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 16.0 MB of archives. After this operation, 12.3 kB of additional disk space will be used. Do you want to continue? [Y/n] y 0% [Connecting to us.archive.ubuntu.com (2001:67c:1562::15)] ░   When I do update it gets stuck here:  user@plato:~# apt-get update 0% [Connecting to us.archive.ubuntu.com (2001:67c:1562::14)] [Connecting to sec░   I'm able to ping us.archive.ubuntu.com just fine:  user@plato:~# ping us.archive.ubuntu.com PING us.archive.ubuntu.com (91.189.91.23) 56(84) bytes of data. 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=1 ttl=54 time=81.5 ms 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=2 ttl=54 time=81.5 ms 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=3 ttl=54 time=81.5 ms 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=4 ttl=54 time=81.4 ms ^C --- us.archive.ubuntu.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 81.425/81.528/81.582/0.355 ms   What can i do to fix this?    What I have tried so far.  I've tried following directions on this blog:   To force apt-get to use IPv4 exclusively   Create a file in /etc/apt/apt.conf.d/99force-ipv4 Add this line to newly created file Acquire::ForceIPv4 false; Apt-get will now use IPv4 exclusively


So I just got a brand new Dell XPS 13 which comes preinstalled with Windows 8 Pro. I decided to install Ubuntu 13.04 and dual-boot. I made a bootable USB, booted up the Ubuntu installer and found that it didn't recognise my Windows 8 OS to install "alongside", so I realised I would need to make my partitions manually. I went back into windows and used the disk manager to shrink my C drive by 100GB. There were about 5 other partitions like EFI and stuff that I ignored. Then, back to the ubuntu installer, made a primary partition of ext4 and a 20Gb Swap partition. I finished the installer, and Ubuntu works great!  Now my problem. I have no way of booting Windows. Every time I start the machine, it goes straight into Ubuntu. I have tried holding down Shift, but don''t see any GRUB screen. Ubuntu works great, but how do I boot to Windows???

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I wanna to know which RAID level is good to set for database usage, webservers and so on when I use MegaRAID SAS 9261-8i or 9263-8i..  I will glad if help me.

This is a  about RAID levels.    What are:   the RAID levels typically used (including the RAID-Z family)?  deployments are they commonly found in? benefits and pitfalls of each?


How to get correct number after calculation? For instance, I want 2.2 - 1 equal to 1.2 and not 1.2000000000002. Wanna get exactly correct answer without rounding the number itself and without just simply changing the way of printing the number via print('%1.1f' % number).

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I am trying to mount a USB harddrive with NTFS.  Ubuntu displays this eror message:   sudo fixntfs didn't resolve the problem.   linuxcomprrrr@rr-a-computer:/home/rrrr# sudo ntfsfix /dev/sdd1 Mounting volume... Failed to load runlist for $MFT/$DATA. highest_vcn = 0x1ba0a, last_vcn - 1 = 0x1a60a Failed to load $MFT: Input/output error FAILED Attempting to correct errors... Failed to load runlist for $MFT/$DATA. highest_vcn = 0x1ba0a, last_vcn - 1 = 0x1a60a Failed to load $MFT: Input/output error FAILED Failed to startup volume: Input/output error Checking for self-located MFT segment... OK Failed to load runlist for $MFT/$DATA. highest_vcn = 0x1ba0a, last_vcn - 1 = 0x1a60a Failed to load $MFT: Input/output error Volume is corrupt. You should run chkdsk. linuxcomprrrr@rr-a-computer:/home/rrrr#    How can I fix the volume from Ubuntu?

I've run across (personally or by proxy) a bunch of storage media that exhibited physical problems during their life. Hard disks, solid state drives and other flash storage media all fail after some time. The situation is worse with USB flash drives and flash cards because of the large amount of suppliers with inferior flash cell and flash controller quality.  How can I reliably detect if a storage drive suffers from physical damage?  Note that this question isn't about file system integrity (which can be checked with ).


If $a_j>0$ for every $j$ and if $\sum_{j=1}^\infty a_j$ converges then prove that $\sum_{j=1}^\infty \sqrt{a_j a_{j+1}}$ converges. I want to use arithmetic mean${}>{}$geometric mean, but I don't know how to show the series $\sum \frac{a_j +a_{j+1}}{2}$ converges.

Prove that if the positve term series $\sum^{\infty}_{n=1}a_n$ is convergent, also $\sum^{\infty}_{n=1}\sqrt{a_na_{n+1}}$ is convergent.  Prove that if the positive term series $\sum^{\infty}_{n=1}a_n$ and $\sum^{\infty}_{n=1}b_n$ are convergent, also $\sum^{\infty}_{n=1}a_nb_n$ is convergent.  I've tried to solve it using comparison test, but no results.


Years ago, I remember reading a novel (I think it was The Three Musketeers, maybe?) that had a few paragraphs inside parenthesis, and it followed the convention for a multiple paragraph quotation:  (Paragraph 1. (Paragraph 2. (Paragraph 3.)  So I'm curious, is this actually a convention? Google search seems to be failing me here.  I'm asking entirely out of curiosity, by the way.  I don't currently have any intention of using a multiple paragraph parenthetical in my own writing.

Does English allow one to put parentheses around more than one paragraph? Example:     Paragraph 1.      (Paragraph 2.      Paragraph 3.)      Paragraph 4.   (Of course, this is just a simple example. In reality, it looks more clean since the paragraphs are more than one line long, and are not separated by an empty line.)


From :     The statistic $s$ is said to be complete for the distribution of $X$ if for every measurable function $g$ (which must be independent of parameter $θ$) the following implication holds:    $$     \mathbb{E}_\theta[g(s(X))] = 0, \forallθ \text{ implies that }P_θ(g(s(X)) = 0) = 1, \forall θ. $$    The statistic $s$ is said to be boundedly complete if the implication holds for all bounded functions $g$.   I read and agree with  that a complete statistic means that "there can only be one unbiased estimator based on it".   But I don't understand what Wikipedia says at the beginning of the same article:     In essence, it (completeness is a property of a statistic) is a condition which ensures that the parameters of the probability distribution representing the model can all be estimated on the basis of the statistic: it ensures that the distributions corresponding to different values of the parameters are distinct.    In what sense (and why) does completeness "ensures that the distributions corresponding to different values of the parameters are distinct"? is "the distributions" the distributions of a complete statistic? In what sense (and why) does completeness "ensures that the parameters of the probability distribution representing the model can all be estimated on the basis of the statistic"?  [Optional: What does "bounded completeness" mean, compared to completeness?]

In classical statistics, there is a definition that a statistic $T$ of a set of data $y_1, \ldots, y_n$ is defined to be complete for a parameter $\theta$ it is impossible to form an unbiased estimator of $0$ from it nontrivially. That is, the only way to have $E h(T (y )) = 0$ for all $\theta$ is to have $h$ be $0$ almost surely.   Is there a intuition behind this? Is seems like a rather mechanical way of defining this, I am aware this has been asked before, but was wondering if there was a very easy to understand intuition that would make introductory students have an easier time digesting the material.


I am really confused about the usage of articles with proper nouns like sun. Which of the following is correct?   Sun rises in the east. The sun rises in the east.

In what cases do we have to put the definite article the before each of these words:   Sun Moon Earth   and in what cases do we not need to?


i'm having an paging problem including a two-column large image inside a three-column text page. I tried with the code:    \documentclass[]{book}     \usepackage[T1]{fontenc}     \usepackage{graphicx}     \graphicspath{{./Immagini/}}     \usepackage[utf8]{inputenc}     \usepackage[italian]{babel}     \usepackage{geometry}     \geometry{a4paper,top=2cm,bottom=2cm,left=1.5cm,right=1.5cm}     \usepackage{multicol}     \addtolength{\columnsep}{1.5mm}     \usepackage{blindtext}     \pagestyle{empty}     \begin{document}     \begin{multicols}{3}     \blindtext[2]     \makebox[2\columnwidth][c]{\includegraphics[width=2\columnwidth, keepaspectratio]{rect3050}}     \blindtext[2]     \end{multicols}     \end{document}   Of corse the result is not what I want:    Of course I could choose the text to put in the third column using a code like:  \documentclass[]{book} \usepackage[T1]{fontenc} \usepackage{graphicx} \graphicspath{{./Immagini/}} \usepackage[utf8]{inputenc} \usepackage[italian]{babel} \usepackage{geometry} \geometry{a4paper,top=2cm,bottom=2cm,left=1.5cm,right=1.5cm}%     margini \usepackage{multicol} \addtolength{\columnsep}{1.5mm}%     spazio tra le colonne \usepackage{blindtext} \pagestyle{empty} \begin{document} \begin{multicols}{3} \blindtext \end{multicols} \begin{multicols}{3} \makebox[2\columnwidth][c]{\includegraphics[width=2\columnwidth, keepaspectratio]{rect3050.png}} \phantom{a} \columnbreak \phantom{a}\\\phantom{a} \columnbreak  \blindtext \end{multicols} \begin{multicols}{3} \blindtext \end{multicols} \end{document}   But the result is still not what I want because the text is not continuous in the three sections that are created.    I also tried with the ambient 'floatfigure' but with no satisfying result because the package is thought for figures smaller than the width of the text in which they appear.    The result that i'd like to obtain is something like this:  Is unnecessary to specify that I want the text to be continuous 1,2,3,4,5...

Although in multicol environment (not the twocolumn option in document class) is problematic to place floats, there are some ways to put figures within a single column or occupying the entire width of the text. (That is not the problem)  But how manage figures that must be fitted in 2  columns  when there are 3 columns?  (ie, images fitted to about 0.65\textwidth after a \begin{multicols}{3}). There are some solution with or without multicol package?   This is a usual design in some books and journals and it is hard to believe that there are no document class, packages nor some clever trick to obtain this. For a single page I suppose that doing some ad hoc manual arrangements, with minipages for example, might be enough, but for a large document this approach would be a torture, so my question is about a general solution.


What is a field_base compared to a field_instance? Is field base what is created with field_create_field()?

When we go to the path /admin/structure/types/manage/article/fields and use the Add new field option or the Add existing field option, does that create a field, create a field instance or attach a field instance? How to differentiate between them? So, programmatically, when to use ,  and field_attach API?  In the field API documentation it only mentions the admin UI and never talks about the path where to create both fields and field instances. So it's confusing. I don't even know if I even make sense.


Incorrect rep sum when expanding score in reputation tab. E.g. on , I see -10:  but unfolding it shows 7*-1 = -14:

I have six upvotes for the one question with no intervening history. They have been summarised into two groups - one with 4 events and one with 2 events. However, when you expand either, both show all 6 events. Minor I know, just letting you know.


First, some teasers; then, at the end of 2), the question.  The above statement holds for polynomials which are normalised (the leading coefficient is one, or a unit) and defined in rings $R[X]$ where $R$ a commutative ring.  1) If your polynomial is not normalised then there can be an infinity of solutions, of course. Take, for instance, $P_\phi=\phi X$ over the ring $R=\mathbb F_2^E$ of functions on some infinite set $E$ into the ring $\mathbb F_2 = \mathbb Z/2\mathbb Z$ and let $\phi \in R$ be such that $\phi^{-1}(\{1\})$ is finite.  Note however, that even for those $\phi$ for which $P_\phi$ has only finitely many solutions, it can be more than $1 = \deg P_\phi$, even arbitrarily many, if $\phi$ is chosen in an appropriate way.  2) If $R$ is not commutative, $R[X]$ can still be naturally endowed with the structure of a ring. However, evaluation is not necessarily a homomorphism anymore. In this case, are there normalised polynomials with an infinity of solutions? Matrix rings, perhaps? I am looking for a simple and intuitive example. Someone here who knows one?  So long, K.

An $n$th-degree polynomial has at most $n$ distinct zeroes in the complex numbers.  But it may have an uncountable set of zeroes in the quaternions.  For example, $x^2+1$ has two zeroes in $\mathbb C$, but in $\mathbb H$, ${\bf i}\cos x + {\bf j}\sin x$ is a distinct zero of this polynomial for every $x$ in $[0, 2\pi)$, and obviously there are many other zeroes.  What is it about $\mathbb H$ that makes its behavior in this regard to be so different from the behavior of $\mathbb R$ and $\mathbb C$?  Is it simply because $\mathbb H$ is four-dimensional rather than two-dimensional? Are there any theorems that say when a ring will behave like $\mathbb H$ and when it will behave like $\mathbb C$?   Do all polynomials behave like this in $\mathbb H$? Or is this one unusual?


After upgrading a particular system from 13.10 to 14.04 there are a few items in the launcher portrayed with a question mark:    This is not the . The icon is always rendered this way, no shadow icon is created when the application is running and it gets the visual semantics and behaviour as any other functioning launcher item.  It is neither  or a wrong icon path. Following some shell output regarding one of the applications concerned:  $ cat /usr/share/applications/eclipse.desktop  [Desktop Entry] Type=Application Name=Eclipse Icon=/usr/local/eclipse.kepler/eclipse.png Exec=env UBUNTU_MENUPROXY= /usr/local/eclipse.kepler/eclipse Terminal=false Categories=Development;IDE;Java;  $ ls -la /usr/local/eclipse.kepler/eclipse.png -rw-r--r-- 1 lads lads 53556 Jun 11 19:00 /usr/local/eclipse.kepler/eclipse.png   What could then be the cause?

In the left side of the screen there are icons: Software Center, Ubuntu One, etc. System icons can be seen but icons of the programs that I have installed can not be seen. Rather there is a "?" for the icons. How can I solve this problem?


SE sites do not allow edits of less than 6 characters.  This is counterproductive, and results in the exact problem it is trying to solve: trivial edits.  Because of SE's 6 character minimum edit requirement, when one or two characters really DO need to be changed, the editor must make an additional  meaningless edit in order to satisfy SE's arbitrary restriction.  For example, in , there was an important mistake in the command that the answerer recommended entering.  I tried fix the error by removing a character, but SE would not allow it due to the 6 character requirement.  I then had to make another meaningless change (changing the original author's words) in order to satisfy the arbitrary 6 character requirement.  This type of edit is often necessary.  So how do we convince SE to remove the 6 character minimum edit requirement?  Update: This is different from the other questions posted on SE Meta.  In those questions, it is discussed at length if the limit should be removed, with most people agreeing.  But SE chose not to remove the limit, despite their users' pleas.  This question is about how to get SE to pay attention to their users and make a beneficial change.

On the beta sites, if I spot a typo I want to correct it. Sometimes that may only be one letter. But I can't because:  You do not have edit privileges. Your edit will be placed in a queue until it is peer reviewed.  This is a pain because I do have rights on other sites but, OK, I can live with it. So I make my correction and add the Edit Summary as "Typo". Then I see:  Comment must be at least 10 chars long  OK, so I change the Edit Summary to "typo this is a 10 character comment" which is not the best comment ever but by now I'm getting frustrated that fixing one letter is so hard whereas in other software (e.g. MediaWiki on Wikipedia) I would be done by now. Then I see:  Oops! Your edit couldn't be submitted because:  Edits must be at least 6 characters; is there something else to improve in this post?   Oops!?! I just want to make the post more readable and I've spent several minutes trying to jump through all the hoops and it still isn't changed! Aargh! So I looked on meta and found the question had been asked:  The highest voted answer starts with "I think this is an excellent question and I'm unsure about the answer myself." So to my question - actually a feature request. Please can we allow fixing trivial edits? In the case I was looking at, the word "no" was typed when it should have been "not" and it took me a few reads to figure it out. For people who find English difficult, it might confuse them further. (I think concerns about bumping posts or posts becoming "Community wiki" could be dealt with, e.g. by introducing a "this is a minor edit" button - again, like Wikipedia.)


I am Egyptian, age above 45. I have a Schengen visa. Can I enter Turkey after getting an eVisa, but coming to Istanbul from Budapest with Turkish Airlines and leaving Istanbul back to Cairo through Aegean Airlines?

I got the Turkey e-visa several times with my schengen visa. In the e-visa form there is a condition      I have a round-trip ticket with Turkish Airlines, Pegasus Airlines,   Onur Air or Egypt Air.   What if I am traveling from another country to Turkey or using another airlines like Nile Air form Egypt?