JDBC pooling Oracle driver Socket read timed out

I run Java EE application on Glassfish server v3 together with Oracle 12 DB on the same machine under Windows Server 2012 64bit. I use latest ojdbc7 driver.  Connection pool config:  <jdbc-connection-pool validation-table-name="DUAL" steady-pool-size="20" statement-cache-size="100" associate-with-thread="true" statement-timeout-in-seconds="30" idle-timeout-in-seconds="60" max-wait-time-in-millis="2000" validate-atmost-once-period-in-seconds="20" datasource-classname="oracle.jdbc.pool.OracleDataSource" pool-resize-quantity="5" max-pool-size="60" res-type="javax.sql.DataSource" name="dbPool" is-connection-validation-required="true">   <property name="driverClass" value="oracle.jdbc.OracleDriver"></property>   <property name="user" value="xxx"></property>   <property name="url" value="jdbc:oracle:thin:@(DESCRIPTION=(ENABLE=BROKEN)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl)))"></property>   <property name="password" value="xxx"></property>   <property name="portNumber" value="1521"></property>   <property name="databaseName" value="orcl"></property>   <property name="serverName" value="127.0.0.1"></property>   <property name="oracle.jdbc.ReadTimeout" value="300000"></property>   <property name="oracle.net.CONNECT_TIMEOUT" value="10000"></property> </jdbc-connection-pool>   After 2 or 3 hours, when there is more than 1 user (3-5) using my application, it stops responding and I get this in glassfish logs  javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.allocator|_ThreadID=152;_ThreadName=Thread-2;|RAR5038:Unexpected exception while creating resource for pool dbPool. Exception : javax.resource.spi.ResourceAllocationException: Connection could not be allocated because: IO Error: Socket read timed out [...] Local Exception Stack:  Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: IO Error: Socket read timed out   From the database side it looks like this  Fatal NI connect error 12560, connecting to:  (LOCAL=NO)    VERSION INFORMATION:     TNS for 64-bit Windows: Version 12.1.0.1.0 - Production     Oracle Bequeath NT Protocol Adapter for 64-bit Windows: Version 12.1.0.1.0 - Production     Windows NT TCP/IP NT Protocol Adapter for 64-bit Windows: Version 12.1.0.1.0 - Production   Time: 13-JUN-2014 03:14:49   Tracing not turned on.   Tns error struct:     ns main err code: 12560  TNS-12560: TNS:protocol adapter error     ns secondary err code: 0     nt main err code: 0     nt secondary err code: 0     nt OS err code: 0 opiodr aborting process unknown ospid (3404) as a result of ORA-609   When I just reset db listener everything works ok for next 1-2 hours (depends on application load). So temporary solution is to run bat script from windows scheduler to reset the listener every 1h.  I tried everything I could find - applied these parameters:  - Sqlnet.ora: SQLNET.INBOUND_CONNECT_TIMEOUT=180 SQLNET.EXPIRE_TIME=5 - Listener.ora: INBOUND_CONNECT_TIMEOUT_LISTENER_IPC=120   But still without success


This will probably be considered very simple, but I am just a beginner:  I'm developing a software application where temperatures need to be added and subtracted. Some temperatures are in Celsius, some in Kelvin. I know how to convert to/from Kelvin (273.15), but how should one go about adding and subtracting these? Should everything be converted to Celsius first?  For example:  0°C + 0°C = 0°C 0°C + 500°C = 500°C   But:  0°C + 273.15K = ?   If we put everything in Kelvin, we get:  273.15K + 273.15K = 546.3K   If we put everything in Celsius, we get:  0°C + 0°C = 0°C   But obviously, 546.3K isn't equals to 0°C.  Now, you might say I can't add temperature to temperatures (but should be adding energy or something? not sure). But the reason I'm doing this is because we need to interpolate. I have a collection of key-value-pairs, like this:  973K  -> 0.0025 1073K -> 0.0042 1173K -> 0.03 1273K -> 0.03   Now I need to get the value for 828°C. So I need to interpolate, which means adding/subtracting values.  I hope I'm making sense.


Power series that diverges in specified number of points on the circle of convergence

I want to construct a complex power series with the radius of convergence $R=1$ that diverges in:  1) $k$ points on the circle $\{|z|=1\}$.  2) countable number of points on the circle  I have already crafted series that converges on the whole circle and diverges on the whole circle.  Can anybody help with the problem?  Update: I have googled a series $\sum{\frac{z^{kn}}{kn}}$ that is an answer for 1). Though I still need help for the countable case.


A word that describes "false sense of knowing"

Is there a word that describes someone having a false sense of knowing?    In other words, one believes he knows X, but X isn't true.  Here is an example sentence:      However, consent forms give people only a false sense of knowing.   The sentence means that people are not given full knowledge or information but they think they are.  This is close to being misinformed but not quite.


Is the current rating of the buck converter must match the dc load current?

I am designing solar system for 1.2kw, 12vdc load and I want to insert a 48vdc to 12vdc converter between charge controller and load.what are the main things that I have to look at when I select this converter beside looking their voltage rating?


Will tcpdump see packets that are being dropped by iptables?

I have a firewall with these simple rules:  iptables -A INPUT -p tcp -s 127.0.0.1/32 --dport 6000 -j ACCEPT iptables -A INPUT -p tcp -s 192.168.16.20/32 --dport 6000 -j ACCEPT iptables -A INPUT -p tcp --dport 6000 -j REJECT   Now, suppose I am using TCPDUMP like this:  tcpdump port 6000   And I have host 192.168.16.21 trying to connect to port 6000.  Will/should tcpdump output some packets coming from 192.168.16.21?


Input vector representation vs output vector representation in word2vec

In word2vec's CBOW and skip-gram models, how does choosing word vectors from $W$ (input word matrix) vs. choosing word vectors from $W'$ (output word matrix) impact the quality of the resulting word vectors?  CBOW:    Skip-gram:


Is momentum a source of Gravity in General Relativity?

The Stress-Energy-Momentum Tensor is the source of gravity in General Relativity. Momentum, as well as mass, pressure and shear stress are components of that tensor, which represents the flow of energy in every possible direction.   Thereby, is momentum a source of gravity? Meaning that a massive object, travelling close to the speed of light, would have a greater gravitational pull than another object of same mass but no momentum?  Would it be possible, for instance, to accelerate a massive object so close to the speed of light that it becomes a black hole?


What's wrong with my temperature conversion code in Java?

What I've been trying to do:  -Ask for the temperature  -Ask what to convert to ("C", "c", "F", "f")  It compiles fine, but when it comes for the second question to be asked, I can't input anything, which doesn't allow me to move on. Any help? Thanks!  import java.util.Scanner;  public class TemperatureConversionSelection { public static void main(String[] args) {     Scanner keyboard = new Scanner(System.in);     System.out.println("Enter a temperature in degrees (for example 29.6): ");     double temp;     temp = keyboard.nextInt();      System.out.println("Enter 'F' (or 'f') for Fahrenheit or 'C' (or 'c') for Celsius: ");     String letter;     letter = keyboard.nextLine();      if (letter == "F"){        double total = (9)*(temp)/(5) + (32);     System.out.println(temp + " degrees F = " + total + "degrees Celsius");}     if (letter == "f"){         double total = (9)*(temp)/(5) + (32);{     System.out.println(temp + " degrees F = " + total + "degrees Celsius");}     if (letter == "C"){         double total2 = (5)*(temp - 32)/(9);     System.out.println(temp + " degrees C = " + total + "degrees Fahrenheit");}     if (letter == "c"){         double total2 = (5)*(temp - 32)/(9);     System.out.println(temp + " degrees C = " + total + "degrees Fahrenheit");}     } } }


How to rename files with sequential names to an another sequence using Terminal?

I have a directory that has files in it that are named 'o1.ray' to 'o293.ray'. I want to move them to an another directory while renaming them 'o132.ray' to 'o424.ray'.  How can I do this in the terminal?  cd directory for i in {1...293}; do cp o$i.ray subdirectory/o$i+131.ray; done   I know this is wrong because I get:  error message 'cp: cannot stat 'o{1...293}.ray': No such file or directory


Identify science-fiction short story where superintelligent test subjects fight with sense-based mental programming

Some time ago, I recall reading a short sci-fi story, set in the modern or near-future day, the central premise of which was that the government/military had tested an experimental intelligence-enhancing drug. The results were initially fruitless so the test subjects all went on their ways (I presume they were paid/volunteers). However, it transpires that the drug simply has a very long onset, and the testees begin to develop extreme intelligence some time afterwards - I believe the growth in intelligence is portrayed as exponential, and possibly without limit.  The main character is one such test subject. I believe the early part of the story involves the main character seeking to evade the government/military after they realise that the drug was in fact effective (and dangerously so). He then proceeds to seek out other test subjects, but has no luck finding them or only finds them dead.  The story culminates in his encounter with another test subject, where they realise that each of them represents an unacceptable danger to the other, and they engage in a mental battle for survival. The protagonist loses, reflecting before his mind is destroyed that perhaps the other subject had their dose of the drug administered just slightly before he did, and therefore had the edge in intelligence over him. I think it is also revealed that this opponent was the one who killed the other test subjects the main character had tried to find.  I specifically remember that the super-intelligent subjects had such fine control over their bodies/mental processes and understanding of other minds that they were able to effectively mind control people by very precise visual/auditory cues to induce them to behave in the desired way (it's explicitly not telepathy). This is the method they employ in the final battle; the protagonist goes so far as to create a sort of virtual mind inside his own through which he filters all his sensory input, to protect his mind proper from the other's attacks. It's very reminiscent of the concept of Godelian Shock Input from David Langford's BLIT stories, but I don't think it's associated with Langford or his works.  I read this online a few years ago (unfortunately I cannot be more precise than that) so I'm not sure if it's originally from an anthology or similar or published online directly. I remember on the forum where I saw the link, the poster described it as an example of "somatic programmers" fighting, though I believe that terminology was not used anywhere in the story.


Prove that if $\chi(G-u-v)=\chi(G)-2$ for every vertices $u, v$ ($u \ne v$) then G is complete graph.

I'm trying to prove this by contradiction: if $G$ isn't complete graph, there must exist vertices $u,v \in V(G)$ for which edge $uv \notin E(G)$. Then $u$ and $v$ must have the same color in proper coloring $C$ and now I'd like to prove that by removing $u, v$ we have $\chi(G-u-v) = \chi(G) - 1$ (that would be the contradiction), but I'm not sure whether it's true.


I used the following piece of code to put a box around each page in my report  \documentclass[12pt,a4paper,oneside,final,times]{report}  \AtBeginDocument{\addtocontents{toc}{\protect\thispagestyle{empty}}}  \usepackage{graphicx} \usepackage[a4paper]{geometry} \usepackage[english]{babel} \usepackage{fancyheadings} \usepackage{fancybox} \usepackage{setspace} \usepackage{fixltx2e} \usepackage{amssymb,amsmath} \usepackage{pgf} \usepackage{pgfpages} %\usepackage{fncychap}  \usepackage{lipsum,titletoc} \usepackage{titlesec} \usepackage{simplemargins} \pgfpagesdeclarelayout{boxed} { \edef\pgfpageoptionborder{0pt} } { \pgfpagesphysicalpageoptions {% logical pages=1,% } \pgfpageslogicalpageoptions{1} { border code=\pgfsetlinewidth{2pt}\pgfstroke,% border shrink=\pgfpageoptionborder,% resized width=.90\pgfphysicalwidth,% resized height=.85\pgfphysicalheight,% center=\pgfpoint{.53\pgfphysicalwidth}{.5\pgfphysicalheight}% }% }  \pgfpagesuselayout{boxed} \pagestyle{fancy}   but this is causing my page numbers to be different from that of the toc. To be specific, page numbers in toc=page number on page +1.  Any solution for this, please? The code is borrowed from


I am a LaTeX beginner. I am writing my thesis and used a template from my university. My problem is the space between figures and the text that follows. Sometimes it’s good, sometimes too large. This is also true for the title and the text before and after (see attached image).


Looking forward to going {to go} on holiday?

I found this question in an online test.     We're really looking forward to going on holiday.  (Right answer)   or     We're really looking forward to go on holiday.    (Wrong answer)   I do not understand why the first one is the right answer.


Do you need a visa for layover in US if you’re a Canadian permanent resident?

I have a Philippine passport and permanent resident status in Canada. I’m worried because I don’t have a US visa for my layover.


Dconf is pretty young, yet my database is already a mess with lots of "schema-less" keys. Is there a way to do some cleaning up, or would I need to start from scratch (by removing ~/.config/dconf/user I guess)?


Im thinking in replace ExtJS 1.2 in a project that does not work in IE9 (only works in compatibility view and is so slowly  loading a tree). What JS frameworks are better (and trying to replacing as little posible the code?  I see ExtJS 4 but has changed a lot compared with ExtJS 1.2


Are relativistic effects physically real or just apparent due to limited speed of information? Does metal rod really contract in length or do we just "see" it that way due to limited speed of light?  Explain how do you reconcile the concept of physical reality with symmetry principle in special relativity?


Why is kinetic friction less than static friction?

Ex: A wooden block is lying on a table.  I am told that because the block is still, the microscopic surface irregularities form more complicated interlocking structures. Is it because the force of the block on the table deforms the molecular structure of the table and wood to eventually reach an equilibrium state? This state then is more connected and harder to change than a block simply gliding over the table? Also, how fast does this happen?


Show that $\sqrt b \in \mathbb Q(\sqrt{a^2-b})$

Let $L$ be the splitting field of $f=X^4-2aX^2+b\in\mathbb Q[X]$. Show that $\sqrt b \in \mathbb Q(\sqrt{a^2-b})=:K$ if $[L:\mathbb Q]=4$.  EDIT: $a,b$ are chosen so that $f$ is irreducible. Can I argue like this? If we have $\sqrt b\notin K$, then $K(\sqrt b)$ is an extension of at least $2$ of $K$. On the other hand, since $f$ is irreducible we have that $\sqrt{a^2-b}\notin \mathbb Q$ and therefor $K/\mathbb Q$ is an extension of degree $2$. So, if $[L:K]=4$ we obtain $L=K(\sqrt b)=\mathbb Q(\sqrt b,\sqrt{a^2-b})$ by degree comparison. But then $L$ is the splitting field of $g=(X^2-b)(X^2-a^2+b)\neq f$ which is in conflict with the uniqueness of splitting fields.


Does Stack Overflow have a policy about inbound links?

Has any specific policy about acceptability of links to Stack Overflow from third parties been adopted?  How does the StackOverflow community feel about this kind of thing?   I came across this question:    My first thought about that product licensing question up front was: Why would someone not ask a vendor licensing question... to the vendor?  Then I found the answer: The vendor's site directs users with technical issues (that won't fit in a tweet) to post on StackOverflow:   IMO, this particular site, while not really outlining the details of what kinds of questions will be accepted on Stack Overflow, does an adequate job of instructing users on how to post (e.g. "phrase it as a question"; give a "minimal example"; "tag your question".)


E: Failed to fetch http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu/dists/eoan/InRelease  403  Forbidden [IP: 2001:67c:1560:8008::15 80] E: The repository 'http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu eoan InRelease' is not signed. E: The repository 'http://ppa.launchpad.net/deadsnakes/ppa/ubuntu eoan Release' does not have a Release file. E: The repository 'http://ppa.launchpad.net/tista/adapta/ubuntu eoan Release' does not have a Release file.   I tried:   sudo apt-add-repository -r ppa:armagetronad-dev/ppa sudo apt update -q   It did no work. Im so lost. New to Linux. Main purpose is to install python. Thats When I discovered the issue.


If someone logs out of my iTunes can I still track my iPod?

My iPod 5 was recently stolen and I have downloaded the "Find My iPhone" app and I logged into my iTunes account to track all the devices using it. It says my iPod 5 is currently offline and will notify me once it connects to the internet. I've also set it on lost mode so when it connects it will change my passcode. If someone has logged out if my iTunes and into their own, will it still track it as mine? Or will it just not show the device on the app at all? Because I don't want to have this app for nothing if it isn't tracking my stolen iPod.


I am making a truck animation video so at one stage my (truck) model is taking turn on the road, i want to rig the hook between truck and trolley like shown on the right side.


Connect to my College's WPA from Ubuntu 14.04 LTS

I have Ubuntu 14.04 LTS, and am running it on a Sony Vaio VGN-CR12OE. It is the only operating system. I am trying to connect to my college's WPA WiFi. My settings for this WiFi connection are as follows:  Security: WPA & WPA2 Enterprise Authentication: Protected EAP (PEAP) Anonymous identity: <I've been leaving this field blank> CA certificate: AddTrust_External_Root.crt <see below fixes I have already tried> PEAP version: Automatic Inner authentication: MSCHAPv2 Username: <my username> Password: <my password>   Warns me that I haven't attached a CA certificate Keeps warning that I don't have one, regardless of whether I check "don't warn me again" and click "ignore". I give CA certificate from /usr/share/ca-certificates/mozilla/AddTrust_External_Root.crt Stops warning me that I don't have CA certificate  When I try to connect, it keeps prompting for password I tried checking the box found at WiFi menu > Edit Connections > "General" tab > "All users may connect to this network" Still keeps prompting for password


How to connect Brother MFC 255 CW wireless printer?

I just succesfully installed my printer driver. My printer is Brother MFC 255 CW. It works fine when I connected thorugh USB cable.  Then I tried to figure out how to connect using the wireless connection from the printer. Somehow ubuntu can't detect the printer signal.  This is so far the way what I did to try getting the printer connect to my laptop:   System setting Printer Add Printer Network Printer Appsocket/HP Jet Direct, then set the host with the IP address that the printer provided and port number: 9100 selecting the drive / installation after the additional installation finish I tried to print test page and nothing happen.   Is there any other way to figure out how to make the wireless working? Or maybe I did something wrong on the process...Please guys help me out......


How can I change the decimal separator for my locale?

I want to change the decimal separator of my system from "," to ".". I have edited the respective locale file /usr/share/i18n/locales/ and added these lines:  LC_NUMERIC decimal_point   "<U002E>" thousands_sep   "<U002C>" grouping        3;3 END LC_NUMERIC   Then, I ran :  sudo locale-gen   I have rebooted my computer and run:  locale -k LC_NUMERIC   and I get:  decimal_point="." thousands_sep="," grouping=3;3 numeric-decimal-point-wc=46 numeric-thousands-sep-wc=44 numeric-codeset="UTF-8"   However, if I go to LibreOffice Calc, I see the numbers are still formated with "," as the decimal separator. Why is this?   Also, I'm not satisfied with answers given in . I don't want to simply "Find & Replace" commas for dots because I got functions in my LibreOffice Calc documents that won't work if I replace commas for dots (because numbers are no more recognized as numbers). I also don't want to change all the language settings of my system, just the decimal separator.  I am using Ubuntu-MATE 16.04  uname -a:  Linux nesper94-E402MA 3.14.77-031477-generic #201608200632 SMP Sat Aug 20 10:34:34 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux


Dropbox has just force-halted syncing, probably because I am using standard 16.04 drive encryption. How might I address this?

The Dropbox client 2.10.0 () has just presented me with the following message:    (The "See requirements" button links  which is of no help).  I am running Ubuntu 16.04 LTS with standard drive encryption. My filesystem is like this:    What can I do to get this working again?  I hate to be one of those posters, but this is urgent for me and I need a solution quick and I am dealing with a lot of computers that need to be in sync for machine learning purposes. I would supremely appreciate guidance.  please note  My problem is different to the one discussed  because I need an immediate solution that can be applied across multiple computers. I can look into the move to LUKS later. A solution is needed now.


What are the instances of Star Wars ships/droids being inserted into Star Trek episodes and movies?

In  wikipedia entry it claims the following:     A few references to Star Wars have been inserted into Star Trek films;   for fleeting moments one can see ships and droids from Star Wars. Most   Star Trek films and some TV episodes used Industrial Light and Magic,   founded to provide effects for Star Wars, for their special effects.   Is there a listing or does anybody know of the specific Star Trek episodes and/or movies where these Star Wars ships/droids are inserted?  If you can supply not only the episode/movie names, but also the point in the episode/movie, a screenshot, or time stamp that would be helpful.


I have multiple network access in the same area.  How can I reorder the priority to which the connections are made ?


Ubuntu Live CD boots to black screen, R9 290x

I'm having problem to install the Ubuntu, I have a video card R9 290x MSI. When I boot from USB, it shows all the choices, "Try Ubuntu, Install Ubuntu, Check disk", but when I choose one of this, the screen got black, and don't show anything at the screen. I tried to install in a VM, and works very well. I really don't know what is happening when I try to install Ubuntu.


When I try to install something from Ubuntu Software Center I don't find anything.  For example, VLC. I tried to download it from the official website, and it takes me back to Ubuntu software. I tried from the terminal and it can't find the repository. It happens with any program except the programs that I already have, like Firefox.  I'm using Ubuntu 16.04.1 on an i5 2410m and 8GB of RAM.


Novelette where human race divided into those with skin symbiote and those without

I'm looking for the title of sci-fi novelette about where a symbiote has infected a lot of people on the planet, and the infected are persecuted. It turns out that the symbiote is beneficial.  The story's main character is initially against those with a symbiote, but he willingly takes it on at the end after a romance with an infected person.


Corrected multiple comparison: is the preceeding ANOVA necessary at all?

To compare multiple groups, one usually runs ANOVA. If ANOVA rejects the null hypothesis, one goes through the multiple comparisons.  The multiple comparisons are necessary to establish which group is different. Multiple comparisons are performed applying  Bonferroni correction (or more recent types of correction, such as Holm's or Hommel's).  Such corrections guarantee the family wise error rate (FWER)  to be at most  alpha. FWER is the probability to return at least one wrong significance statement when comparing populations whose mean is actually the same.  I wonder why is the preceeding ANOVA necessary at all. I think one should run directly the multiple comparison with adjusted p-values.  In fact: a) if all means are equal: the multiple comparison will have the same FWER of ANOVA, because of the correction.  b)Some means are different. Then multiple comparisons are anyway necessary.  The preceeding ANOVA is often done, but I do not see a compelling reason for it.  Thanks.


How to enable / disable root user account in ubuntu 16.04 LTS?

I'm new to Ubuntu OS, recently I'm installed Ubuntu 16.04 LTS on my system. I'm trying to enable my root user by terminal using following commands :  sudo passwd root   and then :  sudo passwd -u root   It gives me a message :  passwd: password expiry information changed   But when I'm restarted my system it did not shows ROOT account for login. Is I made any mistakes.   I referred following link : In this link they give the answer to enable root user, but it is not working in my case.   Please any kind of help is appreciated. Thanks in advance.  What if I want to install any software for all users, without using terminal and commands, how can I do that ?


Prove that real numbers and irrational numbers are numerically equivalent.

How do I prove that set A and set A/C are numerically equivalent,where A is uncountable set and C is countably finite subset of A. This can be further used to show that real numbers and irrational numbers are numerically equivalent. I am aware of the fact that,what are uncountable and countably infinite sets and also the meaning of numerically equivalent.I am not able to create the required bijection.


Separate string into different strings at space C++

I'm taking in string inputs and I need to read in multiple words from one line and push them into a vector. I can't for the life of me figure out how to split the string whenever there's a space character. I know I need to use the getline() function, but I feel like I've tried everything and I'm stuck. Here's my code so far. I'm aware that the if/else statement are both doing the same thing. int main(){     vector<string> vec;     string str = "";     string t = "";     int i = 0;      while(getline(cin, str){         if(str != "STOP"){             if(str[i] == ' '){                 vec.push_back(str);             }else{                 vec.push_back(str);             }         }else{             cout << vec.size() << endl;         }         i += 1;     } }  I can't really use any fancy code, just the basic functions


I would like to show, in my latex document, some in-text arrows similar to the ones in the attached figure. I know about the \leftrightarrow and \updownarrow commands, but I don't know how to combine them, nor how to rotate them. Is tikz necessary to achieve this?    Any help will be much appreciated.  EDIT: I clarify better, I'm sorry if my question was unclear. I would like to avoid math mode (but it's not important) and tikz as well (to avoid loading too many packages), but having a look around it seems that tikz is necessary to do it. In the end, I'd like to have something like A \to B but with the symbols I described.  For future reference, my question would be similar to .


How easily we can create rounded corner crossbrowser DIV using css

please help me how to create rounded corner crossbrowser DIV using css. thanks


remove pattern from string using sed and a variable

I want to remove a pattern from a string (using sed and pipes), but this pattern is not always the same and is defined previously on a variable.  this example mimics the desired behavior  toremove="Osiris"  mystring="Horus,Osiris,Apis"  mystring=$(echo $mystring | sed -e 's/$toremove//g')   no succcess so far. Output is the same as input,


Today I am upgrading to Ubuntu 16.04 LTS from Ubuntu 15.10(Wily WereWolf). Xenial is a Galacian word meaning Great. So, just curious, why it's named as Xenial Xerus? Is there some developer after which this name is given or what else the reason be?  I feel this is not a duplicate of  because @7-R3X's explanation of the history and details why exactly this name helped me. About the codenames, that is a plus information but that still did not help me understand why Xenial Xerus.  So that's why I feel this is not a duplicate.


how to open and see content of ext2 file in Ubuntu

I have a file root.ext2 in a iso file. How can I  open and see content of ext2 file in Ubuntu?


Who are the users that work for Stack Overflow?

I know Jeff Atwood and Joel Spolsky are the owners or creators because I came by the site from reading their blogs.  Who else works for Stack Overflow in here?  Does Jon Skeet? There's also a fair number of 100k+ users now.  The answers from them are quite informative. It seems that to get that many points in such a short amount of time (the site's only been online for 2-3 years?), you would need to be spending quite a lot of time, regularly on here, so either they   Have a ton of spare time either at work or outside of work Are unemployed (seems unlikely given their breadth of knowledge) Work for Stack Overflow and their job is partially to post answers.   These guys seem too knowledgeable so reason 1 or reason 2 seem unlikely, so I suspect reason 3.


I am currently working on a chess game in java. I want to create a method to check the format of the string input. A typical chess move in my game is:   e2 e4  a1 a3    In general, its:  [letter][number][space][letter][number]   How can I check this format with a regex? I am fairly new to regular expression and would appreciate any help  So far, I have:   [a-h]+[1-8]+\s+[a-h]+[1-8]


How to get private variables from prototyped methods in Javascript

I'm not being able to access private variables (or arguments) from a prototyped functions. Take this code:    function My_controller(url) {   this.list = [1, 2, 3]; }  My_controller.prototype.order_list = function() {   console.log("url: ", url);   this.list.push(this.list.splice(0, 1)[0]);   console.log(this.list); }  var ct = new My_controller("http://"); ct.order_list();     It works if the function is defined inside de object:    function My_controller(url) {   this.list = [1, 2, 3];    this.order_list = function() {     console.log("url: ", url);     this.list.push(this.list.splice(0, 1)[0]);     console.log(this.list);   } }  var ct = new My_controller("http://"); ct.order_list();     Meanwhile this is not the best choice for optimizing the code, is it? So I was wondering why is it not possible to get that variable and how to solve this?  I know one choice would be to save it inside this like:  function My_controller(url) {   this.list = [1, 2, 3];   this.url = url; }   And then accessing this.url, instead of url.  Can you think on a better way to do this?


How would you explain covariance to someone who understands only the mean?

...assuming that I'm able to augment their knowledge about variance in an intuitive fashion (  ) or by saying: It's the average distance of the data values from the 'mean' - and since variance is in square units, we take the square root to keep the units same and that is called standard deviation.  Let's assume this much is articulated and (hopefully) understood by the 'receiver'. Now what is covariance and how would one explain it in simple English without the use of any mathematical terms/formulae? (I.e., intuitive explanation. ;)  Please note: I do know the formulae and the math behind the concept. I want to be able to 'explain' the same in an easy to understand fashion, without including the math; i.e., what does 'covariance' even mean?


How to Create ArrayList of Neighbors to Coordinate Node in Undirected Graph?

Given a 2d array matrix, the goal is to locate all adjacent coordinates, instantiate them as objects and add them to an ArrayList for later use.  The issue I'm having is accounting for edge cases where the neighbors might be out of matrix bounds.  With that, what is the best method to state the bounds of a 2d array in Java so that it maybe caught by a conditional statement?  Tried the following below.  Unsure how to account for cases where one of the neighbors is outside of the matrix bounds (ex. a corner node with only two neighbors).     import java.util.ArrayList;  class Node{      private int nodeX;     private int nodeY;      public Node(int enterX, int enterY){         nodeX = enterX;         nodeY = enterY;     }        public ArrayList<Node> getNeighbors(int[][] enterGraph){          ArrayList<Node> adjacentNodes = new ArrayList<>();           if(this.nodeX + 1 > /*Farthest value right in row*/){              Node right = new Node(this.nodeX + 1, this.nodeY);              adjacentNodes.add(right);         }         if(this.nodeX - 1 < /*Farthest value left in row*/){              Node left = new Node(this.nodeX - 1, this.nodeY);              adjacentNodes.add(left);         }         if(this.nodeY + 1 < /*Farthest value up in row*/){              Node up = new Node(this.nodeX, this.nodeY + 1);              adjacentNodes.add(up);         }          if(this.nodeY - 1 < /*Farthest value down in row*/){              Node down = new Node(this.nodeX, this.nodeY - 1);              adjacentNodes.add(down);         }           return adjacentNodes;     }  }   Take for instance the following matrix:  0, 0, 0 7, 1, 0 0, 7, 0    The final ArrayList should output the following:  Current node = (1, 0), where value equals 7.  ArrayList of neighbors equals = {(0,0), (1,1), (2,0)}, where values equal 0, 1, 0 respectively.


I have a curious problem: In Google Webmaster Tools, it shows that from my sitemap 330 images submitted and only 6 are indexed.  I try to put alt tags, descriptive names, everything by the book, but still no results.  What can you suggest to improve image indexing by Google or any other search engine :).


The numeric indicators for tag badge progress have been removed; by design?

Within the Activity section of the (new) user profile pages is a Next tag badge: section. Within this one used to have both "progress bar" and numeric indicators.  Now only plain progress bars without xxx/200 numbers remain.  Is this change intentional or accidental, and if intentional how was this decision made?


How do I switch sound output to line out when headphones are plugged in?

How can I force sound output on line out when headphones are plugged in? When I try to switch the output device to line out, sound only comes from the headphones as long as they're plugged in.


Maybe I can't find the answer because I am not familiar yet with all the terminology. I know this is probably a simple answer but I cannot find it. How do I align the plane of a bisect along an axis?  I have an object that I want to bisect where 2 parts meet. The object is aligned to the platform and I want to make a cut through it the Z/Y axes.  Also... there is no tag for the bisect tool


Calculating collapse factor in the crater equation

In the Crater Equation  $$ D=0.07C_f\left(\frac{g_e}{g}\right)^{1/6}\left(E \frac{\rho_a}{\rho_t}\right)^{1/3.4} $$ where $\rho_a$ is the density of the impactor, $\rho_t$ that of the object, $g_e$ Earth's gravitational acceleration, $g$ the gravitational acceleration of the object, and $C_f$ the collapse factor.  In this equation, how is the $C_F$ calculated?


Apply a continue statement that will skip printing the first 10 numerical values of the involved variable for the program

I need to apply a continue statement that will skip printing the first  10  values.  I already have my code  public class numbers {      public static void main(String[] args) {           for (int number=1; number <= 99; number++){               if (number % 2 == 0)                  System.out.print(number + " " );                          System.out.println();              }          }     }


How To Prove That The Rijndael Polynomial Is Irreducible?

I am learning about the AES algorithm which uses the finite field ${\mathbb{Z}_2[x]}\over{(p(x))}$, where $p(x)=x^8+x^4+x^3+x+1$.  How do you prove that this polynomial is irreducible? I know that for polynomials of degree $2$ & $3$ you could just check that it has no roots, but how would you do it for this polynomial?


what is the difference between keeping result variable outside the for loop (Javascript)?

I am trying to understand the difference between these two ways of writing the loop. the resulting for both code snippets is different . Why?   for loop : output variable is inside the loop , gives different result.   for (var n = 1; n <= 100; n++) {   var output = "";   if ( n % 3 == 0)     output += "Fizz";   if (n % 5 == 0)     output += "Buzz";   console.log(output || n); }  for loop : output variable is outside the loop , gives different result.   var output = ""; for (var n = 1; n <= 100; n++) {   if ( n % 3 == 0)     output += "Fizz";   if (n % 5 == 0)     output += "Buzz";   console.log(output || n); }


$$ \lim_{n \rightarrow \infty} \sum_{k=1}^n \left( \sqrt{n^4+k}\ \sin\frac{2k\pi}{n} \right) = ? $$  I tried to transform it into a Riemann sum, to use Taylor-series of the sine function, to estimate, but nothing. Any help would be great.


Acceleration of a Free-Falling System with Center-of-Mass Change

A thought experiment has been bothering me. Assume an enclosed box free-falling in a constant gravity field. The box contains a person and a bowling ball at the top end. The person throws the bowling ball down (in the direction the system is falling/the direction gravity is pulling). Obviously, being a closed system, forces are all internal, so there's no net effect in that sense. But, the center of mass has shifted downward some amount more than what is due to gravity.  The question, then, is this: What does someone outside the box observe? Part of me says they don't see anything, the box appears to fall under the influence of gravity with no visible change. The other part says there's a period corresponding to the flight of the bowling ball where the box falls faster than can be accounted for by gravity.   A follow-up question that I believe is closely related is the following: Imagine jumping off a high-dive board in a cannonball position. Shortly before hitting the water, you extend your legs downward. Do you hit the water faster, slower, or with the same velocity as someone who kept their legs extended throughout the jump?


What is the fastest and easiest way to communicate between 2 processes in C#?

From my main c# app, I start many slave process with Process.Start method. (on the same PC)  Just before starting those slave process, I serialize some data (I have serialized class) in XML files which are passed in the arguments of Process class.   In each slave process, those data are deserialized and a computation is done. A new serialization is done to XML in order to send result to the main process.  My apps works but the performance are very bad. The time of serialization/deserialization operation is too long because the size of each XML file is about 1,5 Mo...  I really need a high-performance for this simple communication between main app and slave process.  How can I easily modify my code to improve this performance ? Nb : in the future my main process will be in 64 bits and the slaves process in 32 bits.  I have heard that some apps allows to virtualize hard disk in RAM ? Does it exist ? Is it free ?  I have heard of WCF, Named Pipe, Memory Mapped, etc but I seems to be heavy to use ....?


Create an adaptive description for an Operator that take an attribute?

Sometimes the attributes of an operator can change quite dratically the output for the end user.  is there a way to make the description of this operator adaptive to the attribute ?   exemple in the script below:  class SCATTER_OT_print(bpy.types.Operator):     bl_idname      = "scatter.print"     bl_label       = ""      pref : bpy.props.StringProperty()     bl_description = "print: " + pref #Adaptive desctiption ?       def execute(self, context):         print(self.pref)


Paper accepted in journal, should I remove style file for arXiv preprint?

I recently sent a paper to a journal (which I put on arXiv beforehand) which has now been accepted with some corrections. I want to put the corrected version on arXiv. The corrected version is written using the style file supplied by the journal.  Should I remove this style file? Does it matter if I don't? Will the journal get mad?


I am sending a http POST request to a php file (located in another host), using ajax, inside a JavaScript file hosted at 000webhost.com. Even though I can see that the php file at the other host gets my request and acts accordingly, my script believes that the request failed and moves to the fail(function() part of the code.  Could this be a problem with my host?  Here is the code:  $.ajax({     url: 'MyURL',     data: 'MyData',     type: 'POST',     dataType: 'json' }).done(function(jqxhr){     //Part which I want to be executed. }).fail(function(){     //Part which that is executed. }).always(function(){  });


Why is every continuous function on the reals determined by its value on rationals?

Why is every continuous function on the reals determined by its values on the rationals?


I am trying to retrieve the href attribute from a link. However, it keeps returning undefined.  This is the html, generated via ajax which I why the .on function does not work in jQuery  html += 'View offer	';   This is the jQuery function    $( ".viewOffer" ).click(function() {  alert($(this).attr('href')); });     Thanks!


SSH with authorized_keys to an Ubuntu system with encrypted homedir?

I recently set up a new server with Ubuntu karmic 9.10, and when I created my home directory I chose to make it encrypted. Now, after loading my authorized_keys file into ~/.ssh, it isn't recognized because my home directory isn't decrypted until after I log in. Is there a way to make SSH keys work with encrypted home directories under Ubuntu?


How to solve the integral $\int \sqrt {\sin x+1}$

How to solve the integral $ \int{\sqrt{\sin x+1} }\hspace{.1cm} dx$ with steps.


Fitting multilevel models to complex survey data in R

I'm looking for advice on how to analyze complex survey data with multilevel models in R. I've used the survey package to weight for unequal probabilities of selection in one-level models, but this package does not have functions for multilevel modeling. The lme4 package is great for multilevel modeling, but there is not a way that I know to include weights at different levels of clustering.  sets up the problem:  Multilevel models are frequently used to analyze data from cluster sampling designs. Such sampling designs however often use unequal probability of selection at the cluster level and at the individual level. Sampling weights are assigned at one or both levels to reflect these probabilities. If the sampling weights are ignored at either level the parameter estimates can be substantially biased.  One approach for two-level models is the multilevel pseudo maximum likelihood (MPML) estimator that is implemented in MPLUS ().  reviews major software packages and makes a few recommendations about how to proceed:  To properly conduct MLM with complex survey data and design weights, analysts need software that can include weights scaled outside of the program and include the "new" scaled weights without automatic program modification. Currently, three of the major MLM software programs allow this: Mplus (5.2), MLwiN (2.02), and GLLAMM. Unfortunately, neither HLM nor SAS can do this.   give a more updated review, and I'll quote the relevant passage at length:  Occasionally, analysts wish to fit LMMs to survey data sets collected from samples with complex designs (see Heeringa et al, 2010, Chapter 12). Complex sample designs are generally characterized by division of the population into strata, multi-stage selection of clusters of individuals from within the strata, and unequal probabilities of selection for both clusters and the ultimate individuals sampled. These unequal probabilities of selection generally lead to the construction of sampling weights for individuals, which ensure unbiased estimation of descriptive parameters when incorporated into an analysis. These weights might be further adjusted for survey nonresponse and calibrated to known population totals. Traditionally, analysts might consider a design-based approach to incorporating these complex sampling features when estimating regression models (Heeringa et al., 2010). More recently, statisticians have started to explore model-based approaches to analyzing these data, using LMMs to incorporate fixed effects of sampling strata and random effects of sampled clusters. The primary difficulty with the development of model-based approaches to analyzing these data has been choosing appropriate methods for incorporating the sampling weights (see Gelman, 2007 for a summary of the issues). Pfeffermann et al. (1998), Asparouhov and Muthen (2006), and Rabe-Hesketh and Skrondal (2006) have developed theory for estimating multilevel models in a way that incorporates the survey weights, and Rabe-Hesketh and Skrondal (2006), Carle (2009) and Heeringa et al. (2010, Chapter 12) have presented applications using current software procedures, but this continues to be an active area of statistical research. Software procedures capable of fitting LMMs are at various stages of implementing the approaches that have been proposed in the literature thus far for incorporating complex design features, and analysts need to consider this when fitting LMMs to complex sample survey data. Analysts interested in fitting LMMs to data collected from complex sample surveys will be attracted to procedures that are capable of correctly incorporating the survey weights into the estimation procedures (HLM, MLwiN, Mplus, xtmixed, and gllamm), consistent with the present literature in this area.  This brings me to my question: does anyone have best practice recommendations for fitting LMMs to complex survey data in R?


Why can't I sort questions by "votes" or "unanswered" without logging in?

On the "Questions" page of each Stack Exchange site, there are links at the top to sort the questions by "newest", "frequent", "votes", "active", and "unanswered".  At least that is what it looks like if I am logged in. If I am on a site that I don't have an account for, or if I am not logged in, the only one I see is "newest".  This seems to have been done recently. I could swear I saw the other links, even when I was not logged in, until a few weeks ago, or maybe later than that.  Why was this change made?


Why does my eye lose white balance and feel exhausted when I use my viewfinder?

My D80 has a greenish tint effect (shutter count at approx 46000) in it's viewfinder which goes away if i use it long enough constantly looking through the viewfinder. The weird thing is my other eye starts to see things in green tint when i use it for viewfinder instead. I don't keep my both eyes during shooting (neither when it comes to shooting certain devices) for easier manual focus but this was a interesting effect. The other thing i find weird is that my left eye feels exhausted if i keep both of my eyes open. So, is this normal? What are these called.


Is there a standard resource that lists all understood particle-particle relationships?

I am just starting to dig a little deeper into particle interactions, and just have an introductory college physics background (no quantum mechanics). But I am interested in the conditions of the early universe and am looking for a list of all the particles in the standard model, and the relationships between the particles, so you can see which particles turn into other particles under which conditions, and stuff like that.  Is there any such a thing? Or if not, it would be really cool to see a list of all the particles in the early universe and the different types of interactions they had with each other. Such as:   What happens when a quark + antiquark come close together? What if they collide? What happens when 2 gluons collide? Come close together? What happens when 1 quark and 1 gluon come together? What happens when 2 photons collide (can they collide?)? What particles radiate photons? Under what conditions? ...   Does such a resource exist? Or if not, where would you go about finding that?


Select data with max date order by another field

I have created this table in SQL database;  index  Reg_No   Payment  Payday 1      S001     100      2017/01/01 2      S001     500      2017/02/01 3      S002     400      2017/01/01 4      S002     1000     2017/11/01   I need to group this by reg_no and also show the latest payment only. So, final result should look like this.  index    Reg_No    Payment    Payday 2        S001      500        2017/02/01 4        S002      1000       2017/11/01   How can I write the SQL query for this.


Which character died at the end of "The Prestige"?

Probably goes without saying, but big spoiler alert!  The big plot twist of the movie "The Prestige" is that     "Borden" is actually two people, Borden, and his brother/assistant "Fallon."   At the end of the movie,     Angier frames Borden for murdering him, and Borden/Fallon is hung. Then Fallon/Borden comes back and shoots and kills Angier, burns his workshop down, and leaves with his daughter, Jess.   It just occurred to me, that I don't actually know which character dies at the end. Is it     Borden (The husband of Sarah, and the Father of Jess) dies, and Fallon avenges him and takes care of Jess   or      Fallon (Sarah's brother in law, Jess's uncle) dies, and Borden avenges him and takes care of Jess?   I had always assumed it was the first, but  states that it is the second. Is there any concrete evidence either way?


According to manufacturer, my phone has:   ROM-4 GB RAM-1 GB   But when I look in my phone, there is   PHONE STORAGE(.98 GB) INTERNAL MEMORY(1.77 GB)   Now is that .98+1.77 from those 4 GB (ROM memory) – or from where? And what is the difference between this phone storage (.98 gb) and internal memory (1.77gb)?


"Knocked out" Vs "Fought hard and returned"

So I recently managed to put a few Pokemon into several gyms the other night, and over the past few days, they have returned. However, some have returned with Pokecoins, and some haven't.   So far the only difference I have managed to figure out is the message that accompanies the Pokemon. The ones that return with Pokecoins say     Arcanine has fought hard and returned.    And the ones that don't say     Kingler was knocked out of the Gym.   What is the difference?


I have tried to figure out the difference between the two views of looking at the world: Bayesian and frequentist.  Can someone please let me know if I have it right? (Please do not refer me to some old thread or article that is pages long. Simply just confirm if the statement below is correct, and if not, what is wrong with it.)  I have got he impression that the frequentist conducts a measurement and believes the world to be exactly what his results state. Bayesian, on the other hand, has a prior/neutral view of the world, and he only uses the measurement data to update his views. I.e. he finds a balance between his prior view, and the view of the frequentist. Correct?


A .ISO is a digital copy of a cd or dvd. Almost 90% of all digital copys end on ".ISO". Why is this? Was there someone that called it .ISO and everyone just copied it?


I want to get a Top view, Front view, Left view, and Perspective view in blender just like GMAX. I have fiddled for a few minutes without the crisp line look. Also I would like to get the time line for animation on the bottom to if possible.


Like balpha once , a
 line break (newline) should be used in very few cases, and surely is not the same as a new
 paragraph. Still  only explains line breaks, not paragraphs:      Some sites  an additional "New paragraphs only occur when there is a blank line. A single carriage does not create a new paragraph.", but I feel that's not very clear*, and the emphasis is still on line breaks while it should be on paragraphs:      So: As a minimum, please add (rephrase) a note about the blank line, and maybe use "Only when really needed [...] force":  Paragraphs and line breaks Simply use a blank line between two paragraphs to start a new
 paragraph. Only when really needed, end a line with two spaces to force a
 line break: How do I love thee?__     Let me count the ways   I'd even prefer an explicit example, simply as I think
 should be favoured over
 in most situations:  Paragraphs and line breaks Simply use a blank line to start a new
 paragraph: First sentence in the first paragraph. Another sentence. And a third. Maybe making this multiple consecutive lines of text, but still one paragraph.  The second paragraph.  Only when really needed, end a line with two spaces to force a
 line break: How do I love thee?__     Let me count the ways   Alternatively, slightly change the existing "Linebreaks"† part, and above that add a standalone section, :  Paragraphs A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines: A blank line is any line that looks like a blank line. A line containing nothing but spaces or tabs is considered blank.  Normal paragraphs should not be indented with spaces or tabs.  Line breaks Only when really needed, end a line with two spaces to force a
 line break: How do I love thee?__     Let me count the ways   And: maybe even add a section "Paragraphs" to the inline post help on top of the editor? I'm not sure which help tab should then be shown  though.  * Also note how not all sites highlight the two spaces with a different background color. † Yes, I think "line break" likes a space too...


My aunt Diana is married to a man named Evens, he’s legally my uncle. They have two daughters named Daili and Diane whom are my cousins. Daili and Diane have a cousin named Daniela who is Evers niece. Is there a relation between me and Daniela? I’m assuming we’re not related but I’m just curious if there is a term.


Show that if matrix $X$ satisfies the relation $X \cdot Y = Y \cdot X$ it has a specific form

Show that: If $X \in \mathbb{R}^{2x2}$ is a matrix which satisfies the relation $X \cdot Y = Y \cdot X$ for all $Y \in \mathbb{R}^{2x2}$, then $X$ has the form $X = \begin{pmatrix} \lambda & 0\\  0 & \lambda \end{pmatrix}$ with $\lambda \in \mathbb{R}$.    I don't know how to solve this task? Maybe we are allowed to set specific matrix for $Y$? But I'm not sure because it's saying "for all" so we must stay general?  Else I would say we can satisfy this relation when we set $Y = \begin{pmatrix} 1 & 0\\  0 & 0 \end{pmatrix}$ I think.   But that's not enough to prove it right? : /


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


How to disable screen lock in Ubuntu 14.04 / Unity?

I disabled the lock in the "Brightness & Lock" but I still get the lock screen when is resumes/wake from suspend. Although the option "Require my password when waking from suspend" is unchecked


I'm trying to import a GDB folder, downloaded from  into QGIS 3.8 but I get an errormessage that data source is invalid. I have tested with QGIS on MacOS and also on OpenSuse. I have also tried to use ogr2ogr to get shape files. But also here I failed. Unfortunately, I cannot find out whether this file is corrupt or what are the problems to impede the working with these data.


multiplication of doubles in java gives a wrong result

Is this a bug in jvm the code bellow gives the result : 409.99999999999994 !  public class HelloWorld{      public static void main(String []args){           double d = 4.10d;           double d2 = d * 100d ;           System.out.println(d2);      }  }   changing double by float solves the problem, but why?


How do you DM differently when it's for only one person?

I've just finished running my first session with only one player, and it felt pretty different from running a session for a group.  Could someone with more experience in this talk about what one should do differently in that situation?  I'm not referring to mechanics like encounter-building, but just how to handle the change to the social dynamics.


How can I construct a sequence of injections $\langle f_\alpha\colon\alpha\to\omega\mid\alpha<\omega_1\rangle$ with a particular coherence property?

Assuming the axiom of choice, show that there exists a sequence of function $\langle f_\alpha\mid\alpha<\omega_1\rangle$ such that: (1) each $f_\alpha:\alpha\rightarrow\omega$ is injective and (2) for all $\alpha<\beta$, the set $\{\gamma<\alpha\mid f_\alpha(\gamma)\not=f_\beta(\gamma)\}$ is finite.   My knee-jerk reaction in trying to solve this problem is to define the sequence by recursion. But I don't see how to actually carry out the construction (in particular, I don't see how I could ensure that (2) remains to be the case once I pass $\omega$). Any help is appreciated.


Is it possible to get your loot from the Public Test Realm?

Blizzard allows  from one of your account (EU, US etc.) to the PTR in order to test the latest patch but is it possible the other way arround. My biggest concern is : if I loot an incredibly good item (or something I've been looking for month on the "real" server) in the PTR, will I be able to transfer it back on my main account ?


Can ubuntu be installed on a flash drive and booted from a flash drive, or does it have to be installed on a hard drive>


I want to upgrade my Ubuntu 11.10, because I cannot install WvDial on it. But In Ubuntu 13.10 WvDial is installed on Ubuntu 13.10 by default. How can I upgrade my Ubuntu 11.10 to Ubuntu 13.10 via live disc ?


nomencl doesn't renew nomname with russian language

I'm trying to renew \nomname in nomencl package with russian language, but it still default value.  \documentclass{article} \usepackage[utf8]{inputenc}  \usepackage[russian]{babel}   \usepackage{nomencl} \makenomenclature  \renewcommand{\nomname}{Список обозначений}  \begin{document}     \mbox{}      \nomenclature{$c$}{Скорость света в ваккууме}     \nomenclature{$h$}{Постоянная Планка}  \printnomenclature \end{document}


How to write (La)TeX (with parentheses) [or any other TeX-related logo]

I'm looking after a macro to write the (La)TeX logo (with parentheses), i.e. something similar to \TeX, \LaTeX, but where the output includes ()'s.


How do you move to the next or previous word in a Terminal in Mac OS?

I usually use Linux, no expert at all (very far from it) but I use it daily.  Sometimes I find myself using (someone else's) Mac and typing commands into a Terminal.  In Linux, I can use Ctrl+Left and Ctrl+Right to move backward or forward in the current line one word at a time (as in most text editors btw). If I try to do that in Mac OS, it switches workspaces, or brings to front another window, or some irritating thing like that. I think I tried both the Command and the Ctrl (proper) key.  Is there a different key combination for that in Mac OS? At the end I find myself holding down the arrow kay to move one character at a time, which in Mac OS for some reason is like 10 times slower than in Linux and Windows.


Are there ways to determine if a wall is load bearing?

Other than looking up blue prints, which many homeowners may not have, are there ways to determine if a wall is load bearing?  Methods I can think of might include:   Going up in the attic to check if ceiling trusses run perpendicular to the wall If the wall is an exterior wall   Any others?


The probability that an initial quantum state $|\psi_i\rangle$ becomes the final quantum state $|\psi_f\rangle$ is given by  \begin{eqnarray} P(i \rightarrow f) &=& |\langle\psi_f|\psi_i\rangle|^2 \tag{1}\\ &=& \langle\psi_f|\psi_i\rangle^*\langle\psi_f|\psi_i\rangle \\ &=& \langle\psi_i|\psi_f\rangle\langle\psi_f|\psi_i\rangle. \end{eqnarray}  Equation (1) seems to show that the probability for the transition ($i\rightarrow f$) can be interpreted as the system both moving forward in time ($i\rightarrow f$) with amplitude $\langle\psi_f|\psi_i\rangle$ and backward in time ($f\rightarrow i$) with amplitude $\langle\psi_i|\psi_f\rangle$ simultaneously.  Does this reasoning help to explain the Born rule? (Is it like the Transactional Interpretation of QM?)  I guess we must experience the macroscopic direction of time ($i\rightarrow f$) in accord with increasing entropy in an expanding universe whereas microscopically QM works both forwards and backwards in time.  Addition  This is an improved version of the argument including time-evolution operators.  The probability that an initial quantum state $|\psi_i\rangle$ evolves to become the final quantum state $|\psi_f\rangle$ is given by  \begin{eqnarray} P_{i \rightarrow f} &=& |\langle\psi_f|U_{i \rightarrow f}|\psi_i\rangle|^2 \tag{2}\\ &=& \langle\psi_f|U_{i \rightarrow f}|\psi_i\rangle^*\langle\psi_f|U_{i \rightarrow f}|\psi_i\rangle \\ &=& \langle\psi_i|U^\dagger_{i \rightarrow f}|\psi_f\rangle\langle\psi_f|U_{i \rightarrow f}|\psi_i\rangle \\ &=& \langle\psi_i|U_{f \rightarrow i}|\psi_f\rangle\langle\psi_f|U_{i \rightarrow f}|\psi_i\rangle \end{eqnarray} where $U_{i \rightarrow f}$ is the forward-time evolution operator and $U_{f \rightarrow i}=U^\dagger_{i \rightarrow f}$ is the corresponding backward-time evolution operator.  Equation (2) seems to show that the probability $P_{i\rightarrow j}$ can be interpreted as the system first evolving forwards in time and then evolving backwards in time.  Perhaps this is an example of Murray Gell-Mann's  that "Everything not forbidden is compulsory"? At the quantum level, below observable probabilities, there is nothing to stop time flowing both forwards and backwards.


I am new to htaccess. so when i want to do a url redirect using htacces, i always get a redirect loop, and don't know how to fix it. I have been searching on the web but coundn't find a solution for me. please help on this   what i want to do is to redirect all the subpages under root(/*) to index.html under root (/index.html)  i need to redirect  www.mydomain.com.au/* to  www.mydomain.com.au/index.html  here is my code   RewriteEngine On RewriteBase /  RewriteRule ^(.*)$ http://www.mydomain.com.au/index.html [R=301,L]   please help on how to fix this thanks very much !!


I wanted to style every second post inside of a query post and I found a solution which nearly works.   the thing is: it outputs just two posts (older ones will be igrnored) but i want to output ALL posts but with every second one with a sepcific class.  Here's what i did so far…  <?php $paged = (get_query_var('paged')) ?   get_query_var('paged') : 1; $wp_query = new WP_Query(); $wp_query->query('posts_per_page='.get_option('posts_per_page').'&paged=' . $paged);                  global $wp_query;                         query_posts(array_merge($wp_query->query, array(                             'paged'          => get_query_var('paged'),                             'posts_per_page' => 9999999                         )));                 ?> <?php if ($wp_query->have_posts()) : ?> <?php $count = 0; ?> <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?> <?php $count++; ?>  <?php if ($count == 1) : ?>

   <?php elseif ($count == 2) : ?>

   <?php endif; ?> <?php endwhile; ?> <?php endif; ?>


How to convert date to timestamp in PHP?

How do I get timestamp from e.g. 22-09-2008?


Why are enterprise SAS disk enclosures seemingly so expensive?

I will begin by stating that I do not believe this is a duplicate of .  My question is specifically about SAS drive enclosures, and justifying their expense.  Examples of the types of enclosures I'm referring to are:    HP D2700  Dell MD1220 IBM EXP3524   Each of the above is a 2U direct attached external SAS drive enclosure, with space for around 24 X 2.5" drives.  I'm talking about the bare enclosure, not the drives.  I am aware of the difference between enterprise class hard drives and consumer class.  As an example of "ball-park" prices, the HP D2700 (25 X 2.5" drives) is currently around $1750 without any drives (checked Dec 2012 on Amazon US).  A low end HP DL360 server is around $2000, and that contains CPU, RAM, motherboard, SAS RAID controller, networking, and slots for 8 X 2.5" drives.  When presenting clients or management with a breakdown of costs for a proposed server with storage, it seems odd that the enclosure is a significant item, given that it is essentially passive (unless I am mistaken).  My questions are:   Have I misunderstood the components of a SAS drive enclosure?  Isn't it just a passive enclosure with a power supply, SAS cabling, and space for lots of drives? Why is the cost seemingly so expensive, especially when compared to a server.  Given all the components that an enclosure does not have (motherboard, CPU, RAM, networking, video) I would expect an enclosure to be significantly less expensive.   Currently our strategy when making server recommendations to our clients is to avoid recommending an external drive enclosure because of the price of the enclosures.  However, assuming one cannot physically fit enough drives into the base server, and the client does not have a SAN or NAS available, then an enclosure is a sensible option.  It would be nice to be able to explain to the client why the enclosure costs as much as it does.


Let's say I have a variable and I want to print 5 significant digits after I multiplied it by 1000. zsh can do it:  zsh$ x=2.8026407e+00 zsh$ printf "%.5g\n" "$(( 1000*${x} ))" zsh> 2802.6   Can bash do it as well?  bash$ x=2.8026407e+00 bash$ printf "%.5g\n" "$(( 1000*${x} ))" bash> bash: 1000*2.8026407e+00 : syntax error: invalid arithmetic operator (error token is ".8026407e+00 ")   I think there is no way to make native bash understand floating point operations, is there? I know I can use e.g. awk, but I was wondering if bash could do this at all or not.  (I'm not surprised that bash cannot handle floats, but that zsh can!)


Calculating the actual width of an element

I have a  (position:fixed) on the upper right side of my window with controls. So to format the rest of my content around this, I have the following    $(window).resize(function() {     sizeBody();   });   and  function sizeBody() {     var sbw = document.getElementById('sidebar').offsetWidth;     var ww = document.documentElement.clientWidth || document.body.clientWidth;     $("body").css('width', Math.min(1100,(ww - sbw - 12))); }   This works, but I'd like to get rid of my magic "-12" number. The div has a border around it, defined in the css:    #sidebar {     position: fixed;     right: 0;     top: 22px;     border: 3px solid #73AD21;   }   The way I have it, there's about a 2px difference between where <BODY> stops and my sidebar starts. So I'm trying to find out (I think?) how I could programmatically get the border offset (10px)  Thanks!


QGIS2 to QGIS3 plugin migration issue AttributeError: type object 'QObject' has no attribute 'connect'

I am trying to migrate a plugin. I have these two lines:  QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Configuration.accept) QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Configuration.reject)   I thought after looking into some examples that in PyQt5 the lines should read:  self.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Configuration.accept) self.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Configuration.reject)   but it just throws the error  AttributeError: 'ConfigurationDialog' object has no attribute 'QObject'   This is confusing because ConfigurationDialog is not found in this py script. ConfigurationDialog is a class in another script but nowhere in it does it make reference to QObject. Can I get some clarification on what where I am going wrong?


Easiest way to check for file extension in bash?

I have a shell script where I need to do one command if a file is zipped (ends in .gz) and another if it is not. I'm not really sure how to approach this, here's an outline of what I'm looking for:  file=/path/name*  if [ CHECK FOR .gz ] then echo "this file is zipped" else echo "this file is not zipped" fi


I have this:    This is my latex code  \documentclass[tikz,border=10pt,12pt]{standalone}  \usetikzlibrary{arrows}  \usepackage{pstricks}  \usetikzlibrary{calc}  \newcommand*\circled[1]{\tikz[baseline=(char.base)]{     \node[shape=circle,fill=blue!20,draw,inner sep=2pt] (char) {#1};}}  \begin{document}  \begin{tikzpicture}[>=stealth']  % Locations \def\ClientToServer{++(9,0)} \def\ServerToClient{++(-9,0)} \def\Lifeline{++(0,-15)}%Longitud hacia abajo  % Lifelines \path (0,0)           node[draw] (Client) {\blue{\textbf{Client}}} \ClientToServer node[draw] (Server) {\blue{\textbf{Server}}}; \draw (Client) -- \Lifeline (Server) -- \Lifeline;  % Blocks \path (Server) ++(0,-1) node (BeginProcess) {} node[below right] {} ++(0,-1) node (EndProcess)   {};   % Calls \draw[->] (BeginProcess)\ServerToClient -- node[above] {\circled{1} one}  (BeginProcess);  \draw[->] (EndProcess) -- node[above] {\circled{2} two } \ServerToClient;  \node[left=0mm,yshift=-3cm] {\circled{3} yesss};  \node[left=0mm,yshift=-5cm] {\parbox{1.7in}{\circled{4} hello hello hello hello hello}};  draw[->] (9,-6) -- node[above] {uiiiiuuuuuuuuuuuuuuuuu} (-9,-6);%<---- ?  \node (B1) [fill,color=black,text width=1.2cm] at (9,-15) {}; \node (B2) [fill,color=black,text width=1.2cm] at (0,-15) {};   \end{tikzpicture}  \end{document}   I want to generate more arrows between client-server and server-client. But no more is generated. I use basic commands like:draw[->] (9,-6) -- node[above] {uiiiiuuuuuuuuuuuuuuuuu} (-9,-6); but not generate.  I want can create more arrow like:  Thank you!


How do I merge these three triangle faces, which are all on the same plane, into a single pentagonal face? Thanks!


For creating my simple mesh, I need to outline it first with vertices and edges, and then fill in the polygons.   I am struggling to do simple things that should be the basics and foundations of 3d modeling in blender.   I want to be able to    extrude a vertex to a given length or until it intersects with something or, create a vertex at the intersection of two freestanding edges or, snap/use the knife tool on freestanding vertices/edges   What in the world is blender's paradigm? I imagine professionals being very precise and efficient in their workflow, but these tools do not lend themselves to what I had in mind.  Why do I feel like I am being punished for trying to think logically? How is creating vertices an oversight in the design of this software?  EDIT: not a possible duplicate of the other question FYI, already explained above, not dealing with meshes or faces, dealing with vertices and edges, written in bold. Trying to gain a sense of the underlying principles of the software and not be dismissed.


SimpleHtmlDom load items that load on scroll down (Advice)

Is it possible to get data from items that are loaded on scroll with simplehtml parser?  My code is done and it works perfectly I don't need any help with that , I'm just asking for advice if this is even possible to acomplish, I know when the dom praser loads what ever it sees on the first load of the page but is it possible to load more?  Example:  The page that i am loading has 10 items on it. But when you scroll down it Loads 10 more. Or thats not possible?


I'm trying to ping local IPs on my Mac but it's not working as I would expect.  If I ping 127.0.0.1, there's no problem:  PING 127.0.0.1 (127.0.0.1): 56 data bytes 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.056 ms 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.083 ms 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.089 ms   However if I ping any other local IPs, it doesn't work:  PING 127.0.0.99 (127.0.0.99): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 Request timeout for icmp_seq 2 Request timeout for icmp_seq 3   If I try the same thing on Windows, it's working. Does anybody know why it is not working on Mac OS X?


Boolean If statement only returning outside

public static boolean stringToBoolean (String horv) {      if (horv == "H") {         return true;     } if (horv == "V") {         return false;     } else {         return true;     }   This is a small part of a program I am creating. The program is reading from a file and inputting the data into an array. For this part it is reading what will either be a "H" or "V" from the file and converting it to a boolean value. The problem is when I run the program I am only getting true for every value, even the ones that have a "V" as their variable.


Kill a blocker with an instant - is it still blocking?

We are in the combat phase:   I declared my attackers  My opponent declared his blockers, stating which attackers he was blocking I cast an instant, which automatically kills his blocker. There is nothing blocking my attacker now   Now we're in the damage phase. I said that my attacker now does damage and  reduces my opponent's hit points. My opponent said that because my attacker was blocked no damage could be done. I pointed out that the blocker was destroyed before the damage phase, so therefore he wasn't blocking, but he wasn't having it. (My attacker does not have trample)  Is this covered by a specific section in the rules?


Recently, I came across following code snippet, I couldn't know the reason. Any one has any idea, why negate two times (and not just return the value of doAction())? return !!doAction();


Remove "are you sure?" prompt when deleting comments from flag queue

Current State Deleting comments on a post, outside the flag queue, requires no prompt. Deleting comments on a flagged post (whether a comment or other flag) requires confirmation each time. This isn't a problem if someone flags all comments, but normally "too chatty" indicates other problem comments too. Issues with current state My workflow when moderating comment cleanup is to open the post in a new tab so I can more quickly delete and cleanup comments. This is annoyingly inefficient. Desired future state Remove confirmation in flag queue for deleting comments.


Say we have an $n\times m$ matrix $X$. What are the specific properties that $X$ must have so that $A=X^TX$ invertible?  I know that when the rows and columns are independent, then matrix $A$ (which is square) would be invertible and would have a non-zero determinant. However, what confuses me is, what sort of conditions must we have on each row of $X$ such that $A$ would be invertible.   It would be very nice to have a solution of the form:   when $n > m$ then $X$ must have... when $n < m$ then $X$ must have... when $n = m$ then $X$ must have...   I think in the 3rd case we just need $X$ to be invertible but I was unsure of the other two cases.


I've been reading some documentation about PCA and trying to use scikit-learn to implement it. But I struggle to understand what are the attributes returned by sklearn.decompositon.PCA From what I read  and the name of this attribute my first guess would be that the attribute .components_ is the matrix of principal components, meaning if we have data set X which can be decomposed using SVD as   X = USV^T  then I would expect the attribute .components_ to be equal to   XV = US.  To clarify this I took the first example of the wikipedia page of Singular Value Decomposition (), and try to implement it to see if I obtain what is expected. But I get something different. To be sure I didn't make a mistake I used scipy.linalg.svd to do the Singular Value Decomposition on my matrix X, and I obtained the result described on wikipedia:  X = np.array([[1, 0, 0, 0, 2],           [0, 0, 3, 0, 0],           [0, 0, 0, 0, 0],           [0, 2, 0, 0, 0]]) U, s, Vh = svd(X) print('U = %s'% U) print('Vh = %s'% Vh) print('s = %s'% s)   output:  U = [[ 0.  1.  0.  0.] [ 1.  0.  0.  0.] [ 0.  0.  0. -1.] [ 0.  0.  1.  0.]] Vh = [[-0.          0.          1.          0.          0.        ] [ 0.4472136   0.          0.          0.          0.89442719] [-0.          1.          0.          0.          0.        ] [ 0.          0.          0.          1.          0.        ] [-0.89442719  0.          0.          0.          0.4472136 ]] s = [ 3.          2.23606798  2.          0.        ]   But with sk-learn I obtain this:  pca = PCA(svd_solver='auto', whiten=True) pca.fit(X) print(pca.components_) print(pca.singular_values_)   and the output is  [[ -1.47295237e-01  -2.15005028e-01   9.19398392e-01  -0.00000000e+00 -2.94590475e-01] [  3.31294578e-01  -6.62589156e-01   1.10431526e-01   0.00000000e+00 6.62589156e-01] [ -2.61816759e-01  -7.17459719e-01  -3.77506920e-01   0.00000000e+00 -5.23633519e-01] [  8.94427191e-01  -2.92048264e-16  -7.93318415e-17   0.00000000e+00 -4.47213595e-01]] [  2.77516885e+00   2.12132034e+00   1.13949018e+00   1.69395499e-16]   which is not equal to SV^T (I spare you the matrix multiplication, since anyway you can see that the singular values are different from the one obtained above). I tried to see what happened if I set the parameter withened to False or the parameter svd_solver to 'full' but it doesn't change the result.  Do you see a mistake somewhere, or do you have an explanation?


Why are polynomials defined to be "formal" (vs. functions)?

Despite the fact that $\forall n, n^3 + 2n \equiv 0 \pmod 3$, I understand that $n^3 + 2n$ (considered as a polynomial with coefficients in $\mathbb Z/3\mathbb Z$) is not equal to the zero polynomial.  What is the value of defining polynomials in this (strange) way? What situations does it make things simpler?  I ask this because it seemed natural to me to define polynomials as a subset of functions, so I was surprised by this.


I am implementing a String matching algorithm for a username database. My method takes an existing Username database and a new username that the person wants and it checks to see if the username is taken. if it is taken the method is supposed to return the username with a number that isn't taken in the database.  Example:  "Justin","Justin1", "Justin2", "Justin3"  Enter "Justin"  return: "Justin4" since Justin and Justin with the numbers 1 thru 3 are already taken.  In my code sample below, newMember returns Justin1 even though it already exists--where is the mistake?  public class UserName {      static int j = 0;      static String newMember(String[] existingNames, String newName){         boolean match = false;          for(int i = 0; i < existingNames.length; i++){             if(existingNames[i] == (newName)){                 match = true;             }          }         if(match){             j++;             return newMember(existingNames, newName + j);         }         else{             return newName;          }     }      public static void main(String[] args){          String[] userNames = new String[9];         userNames[0] = "Justin1";         userNames[1] = "Justin2";         userNames[2] = "Justin3";         userNames[3] = "Justin";          System.out.println(newMember(userNames, "Justin"));          // I don't understand why it returns Justin1 when the name is already taken          // in the array.     } }


What is the story behind "a-" prefix / suffix?

For example,   If this van's a-rockin', don't come a-knockin'  (song title)   (song title)   I have a few related questions:   What is the "a-" or "-a" called? Is there a function beyond a rhythmic one? Why is "a-" attached to a word at all -- and why attach to a word at all?


Convert floating point raster array to integer raster using GDAL

I was searching a lot for everything related to this topic. Could someone give me an idea, a suggestion how could I convert the cell values of a float raster to integer in Python environment using GDAL?  I have tried this:  int(round(myarray))


What to do when crib dragging does not work in OTP (One-time pad) ciphers?

With a Cipher text of   7ECC555AB95BF6EC605E5F22B772D2B34FF4636340D32FABC29B  73CB4855BE44F6EC60594C2BB47997B60EEE303049CD3CABC29B  64C6401BAF45F6A930435F3DF875C4E102F8742A45C824AFCA9B  7AC24F5EAF17F0A0754D5834BC3CC3A90ABD7B2A52C222ABC89B  72C24A52B550B3B8624D4F22F86BD2B30ABD642C498122A1D29B  73CC5457BF17E7A4750C5423B178D0A44FFF756355C03CABC28A  74CC0155B443B3A8795F4224AA7E97B507F2632606CF3FA0D59B   It is assumed that each line is a different message encrypted with the same pad.  I have tried countless lengths of words that are supposed to lead me somewhere to the decryption of this cipher, however isn't it just downright impossible to "guess" your way to the answer?  Crib dragging does not seem to work since there seem to be too many possibilities…


A question that was merged should not get *HARD* deleted

As a follow up to  which was answered correctly --  Merged questions should get automatically forwarded to the new version of the question and I should not land on a 404 page like I do   It should follow the same rules as when we move a question to a different Stack Exchange site -- Have the option of seeing the orginal Question when you have the noredirect option, or it should just forward to the new question.    Explanation:  It is not a hard delete in the fact that the post is deleted from the SE database -- as you can see the title of the Question in you're browser's title bar -- but it is deleted in a way that there was no real indication of how or why the question was deleted (or even if the post was in fact a question) and no >10K users can see the Original Question.    Interesting --  I now get "Page Not Found - Stack Overflow" in the title bar. I was getting the post's title before, unless I was hallucinating (which is possible, but all I drank today was water).    If the above was not enough, here is what I think happens currently and what should happen in the future:  What happens currently (in steps):   Click on a link to a merged Stack Exchange Question Reach a page not found (aka 404) page Wonder what just happened... Go back to see if you read the link correctly Click on it again Reach the same 404 page Ask on meta.so why this is happening Drink some water while waiting for an explanation (and maybe do some actual work)   What should happen (in steps):   Click on a link to a merged Stack Exchange Question The page should get forwarded to the post that it got merged into There should be some indication on the page telling you what happened so you do not think that you clicked on the wrong thing accidentally.     Since @RobertHarvey wants me to tell you :  They won't, or it just will not affect them.  But people who have links to these questions and did not realize that they were being merged and have over 10K rep on the site can get confused and not now what happened to these questions and will assume them to be deleted... but with the caveat that they cannot see them for some reason -- There should be some indication that a merge happened in these cases.


Use Jsch with InputStream is throwing NullPointerException

I'm trying to send a file using JSCH over SFTP protocol. Here is the FileService file public class FileService {      public void send(){         String str = "this is a test";         InputStream is = new ByteArrayInputStream(str.getBytes(StandardCharsets.UTF_8));         try {             var channel = setupJsch();             channel.put(is, "test.txt");         } catch (JSchException | SftpException e) {             e.printStackTrace();         }     }          private ChannelSftp setupJsch() throws JSchException {         JSch jsch = new JSch();         Session jschSession = jsch.getSession("foo", "localhost", 2222);         jschSession.setPassword("pass");         jschSession.setConfig("StrictHostKeyChecking", "no");         jschSession.connect();         return (ChannelSftp) jschSession.openChannel("sftp");     } }  But the JSch is throwing a NullPointException with this message: java.lang.NullPointerException: Cannot invoke "com.jcraft.jsch.Channel$MyPipedInputStream.updateReadSide()" because "this.io_in" is null I already tried with OutputStream and the result is the same. Could you help me? [Update 1] After trying the @Ogod suggestion     public void send(){         String str = "this is a test";         InputStream is = new ByteArrayInputStream(str.getBytes(StandardCharsets.UTF_8));         try {             var channel = setupJsch();             channel.start();             channel.put(is, "test.txt");         } catch (JSchException | SftpException e) {             e.printStackTrace();         }     }  It has thrown the following message java.io.IOException: channel is broken


Window switcher (alt+tab) raises all windows

How can I raise all open windows of one application?  Raising one window of an application one at a time is very slow in intuitive. Any short cuts?


Where is the deep underground place where Galdalf and the Balrog ended up during their battle?

In "The Two Towers", in the chapter "The White Rider", Gandalf describes his battle with the Balrog. He mentions being underground, deeper than even where the dwarves went.     'We fought far under the living earth, where time is not counted. Ever he clutched me, and ever I hewed him, till at last he fled into dark tunnels. They were not made by Durin's folk, Gimli son of Glóin. Far, far below the deepest delvings of the Dwarves, the world is gnawed at by nameless things. Even Sauron knows them not. They are older than he. Now I have walked there, but I will bring no report to darken the light of day. In that despair my enemy was my only hope, and I pursued him, clutching at his heel. Thus he brought me at last to the secret ways of Khazad-dûm: too well he knew them all. Ever up now we went, until we came to the Endless Stair.'   Clearly Gandalf does not want to describe this place any further (he describes this place as a "despair", which implies it's not something he'd readily mention again), so I doubt he brings it up again later in the book, or in Return of the King (although I haven't read past "The White Rider" yet, and I certainly wouldn't remember something this obscure from the last time I read these books years ago).  Is this place mentioned anywhere else in any of Tolkien's other works, such as the Silmarillion? Any and all further information on this place would be appreciated, as well as the "nameless things" that Gandalf mentions.  The very similar question  identifies that it is some kind of lake, but doesn't add any further information on it besides what's in the text I've quoted. Specifically, I'm looking for any further information outside of this chapter.  I've just found  about the creatures, which I wanted to update this question with, since they are related.


Let's say there is a list with very large number of records. Now applying a particular filter on a list also retrieves very large number of items, more than threshold value. Retrieving list item is creating performance issue. Now, server side code is not permitted, only client side code is permitted. How to tackle this issue? What steps should be taken?


how many child records can an object have in a lookup relationship?

Does anyone knows how many records can an object have in a lookup relationship?   I've found in the documentation that as a best practice, don't exceed 10,000 child records for a master-detail relationship.But how about for a normal lookup relationship? If I have an object called "Warehouse" could it be referenced more than 10000 times on "Item" object?


I have this field:  HashMap<String, HashMap> selects = new HashMap<String, HashMap>();   For each Hash<String, HashMap> I need to create a ComboBox, whose items are the value (which happens to be a HashMap itself) of HashMap <String, **HashMap**>.  By way of (non-functioning) demonstration:  for (int i=0; i < selects.size(); i++) {     HashMap h = selects[i].getValue();     ComboBox cb = new ComboBox();      for (int y=0; y < h.size(); i++) {         cb.items.add(h[y].getValue);     } }


How to use Python library in android application code

I have Python script which has numpy and PIL Python packages installed in virtualenv. But the package which I have installed I want to use in android code. Also want to execute script using button activity.  I have used Jython but seems not working at my end.   Is anyone have an idea that how can I used Python packages within android code?


What is Dash(-) actually in unix or linux?

It's been While since i'm using dash(-) in unix command. But have never found out what exactly is this.  Have searched at some place it says . It mean stdin/stdout when used in end of command or like  echo hello > - .  For example When i write grep -i it checks with ignore case. (so i think it get argument here as -i)  While if sometime when filename or folder name begins with -folderName i need to run rm -f -- -folderName   What exactly this dash is can someone explain it in simple term.


Found a misspelling in the email from stackexchange.com

I received an email about some activity on a question, and noticed a small misspelling (chcecked instead of checked) in the email, screenshot below. The guys who I contacted via email said to post in meta, since here developers can track things related to main site (features, bugs, etc).


Why is the end-of-line $ anchor not working with the grep command, even though the front-of-line ^ anchor is?

Very new to UNIX but not new to programming. Using Terminal on MacBook. For the purposes of managing and searching word lists for crossword construction, I'm trying to get handy with the Grep command and its variations. Seems pretty straightforward but getting hung up early on with what I thought should be a simple case.  When I enter   grep "^COW" masternospaces.txt   I get what I want: a list of all the words starting with COW.  But when I enter   grep "COW$" masternospaces.txt   I expect to get a list of words ending with COW (there are many such words), and nothing is returned at all.   The file is a plain text file, with every line just a word (or a word phrase with no spaces) in all caps.  Any idea what could be happening here?


\documentclass{article}  \usepackage{tikz} \usepackage{tikz-qtree} \tikzset{edge from parent/.style= {draw, edge from parent path={(\tikzparentnode.east) -- +(8pt,0) |- (\tikzchildnode)}}} \begin{document}  \begin{tikzpicture} \tikzset{grow'=right,level distance=32pt} \tikzset{execute at begin node=\strut} \tikzset{every tree node/.style={anchor=base west}} \Tree [.S [.NP [.Det the ] [.N cat ] ] [.VP [.V sat ] [.PP [.P on ] [.NP [.Det the ] [.N mat ] ] ] ] ] \end{tikzpicture}  \end{document}


How to get the Full stack trace of all the methods executed while rendering?

In my Flex application i need to get the stack trace of the methods executed from the creation of my application and need to check how much time spend for rendering a particular component or container.


Book/series with winged elven hybrids and a group bringing a child to the north to defeat a great evil

So, I began reading this series years ago and put it down, and now I've been thinking about it and want to see how it ended.   It was a basic Epic. Group needed to destroy evil somewhere off in the world. Must have read it in the early 2000s. The most I remember is based off of the characters.   There was a species of elven hybrids; they were winged, the product of a forced union by an evil magical entity. The elves hated them. Another species (I think they were terromancers), created a mountain kingdom/realm to protect them.  One of the main characters was a wizard prodigy; he'd been babied his entire life and while magically advanced, had a lot of growing up to do.   There was a general who, in order to gain advantage on the battlefield, bonded to (I think) an earth god through a shamanistic pain ceremony.   Another was an unlanded (I think) elf (his kingdom had been destroyed) he was a mercenary.  They were all fighting to get the wizard/child to the north to kill/defeat this great evil who lived in a stronghold on the other side of the world.  Thanks all! And sorry it's so vague. I've been searching the internet for most of the day. Nothing's turned up.


Currently I am trying to prevent contacts with the matching first and last names from being assigned to the same Account. Currently on contact I have an custom Account Id field on contact that's updated via a workflow rule.   My active matching rule looks like the following:  (Contact: Account_Id EXACT MatchBlank = FALSE) AND (Contact: FirstName EXACT MatchBlank = FALSE) AND (Contact: LastName EXACT MatchBlank = FALSE)   My duplicate rule has the following settings:   Bypass sharing Block on update Block on edit  No conditions Active The matching rule mentioned earlier   I'm unsure of why it's not blocking the creation. At first I thought it was because () workflow rules trigger after Duplication rule checks are made but I ensured those fields were populated and tested it again.   For example:   We have John Smith assigned to Generic LLC. I should be able to add Alex Smith, John Brown, Alex Brown, etc. But I shouldn't be able to add another John Smith to Generic LLC. I should be able to add John Smith to Other Company Inc. but there can't be two contacts with the same first and last name assigned to one account.   Note: When using the Contact object for matching rules this is an example of what the options will look like.    Currently the only issue I'm experiencing is if I create an account that has the same first and last name as an inactive account and is associated with the same account the new contact is not blocked. New / updated Active Contact with existing duplicate Active contact does block.  As suggested I have created a trigger that looks like the following:   trigger ContactTrigger on Contact (after delete, after insert, after undelete,  after update, before delete, before insert, before update) {     if(Trigger.isBefore && !Trigger.isDelete){         for(Contact c : trigger.new){             if(c.RecordTypeId == RecordTypes__c.getValues('Inactive Contacts').Id__c){                 c.Account_Id__c= c.AccountMap__c;             }             else{c.Account_Id__c = c.AccountId;}         }     } }   AccountMap is the same thing as AccountId but it's done in a custom field so Inactive contacts don't show up on the account page.  Trouble shooting tip: Sometimes turning off and on duplicate rules fixes things.


How should we handle downvote retaliation?

I have a situation where I'm trying to figure out what the right thing to do is on SO.    I see a question.  I answer the question.  I see there are a couple other answers.  One answers the question well, though with less explanation than my answer.  The other answer seems both wrong and irrelevant to the question (doesn't answer the question at all).  I comment to that effect.  The "wrong" part is edited out, but the author of the answer doesn't respond to how their answer actually answers the question.  In fact, they seem offended that I don't "get" it.  After giving them several chances to explain how their answer is relevant to the question and seeing their attitude, I decide to downvote their answer as I don't see how it addresses the question at all and the author won't explain.  They retaliate and downvote my answer and admit in their comments that their downvote of my answer has nothing to do with the content of my answer and only because they don't like me disputing their answer.  Did I do the right thing by downvoting their answer?  Do I just have to live with their downvote retaliation?  Anything I should have done differently?  I also have no way of knowing this for sure, but the next question I answered was upvoted, then downvoted so perhaps this same person is stalking my answers and downvoting other answers of mine too with no comment.  As long as this doesn't continue, I'm not losing sleep over a couple downvotes, but I do wonder if I should have done anything differently.  Followup Later After I Posted This Question: After thinking about it for a little while, the person who disagreed with me decided to delete their post.  So, eventually the message did get through to them.  I don't know if they rescinded their downvote or not (or if they even could).


How do you turn off the "Try the new Safari" notification?

In OS X Yosemite and OS X El Capitan, when starting Google Chrome or Mozilla Firefox, there is an invasive, annoying, and persistent notification, titled "Try the new Safari."  There is only two options in the notification.  Clicking on "Later" will have the same notification come back next time, and "Try now"… well, I dislike being forced to do things on my own computer.  This notification reminds me of the annoying popups coming in another famous operating system, Microsoft Windows, and this is one of the many reasons why I am not using it anymore.      Is there any way to get the notification to not show up anymore without actually trying Apple's Safari?


Solve limit without L'Hopital: $\lim_{x \to 0} \frac{2 \sin x-\sin 2x}{x-\sin x}$

Taks: $$\lim_{x \to 0} \frac{2 \sin x-\sin 2x}{x-\sin x}$$ Is it possible to solve it without l'Hopital ?


How do you compute the earth's radius at a given geodetic latitude?

(I see there is an  that does exactly what I am asking but there is no references. I have no way of confirming the validity of this equation!)  I already understand the difference between Geocentric Latitude vs Geodetic Latitude.  Assuming known semi major, a, and semi minor, b, radiuses are given. How do you compute the radius at a given geodetic latitude?  I need some sort of expert confirmation (derivation, link to derivation, confirmation from expert, explanation, etc).