Python3: print dictionary key, if substring matches at a certain position in value

I am successfully checking, if a string matches any value  in a dictionary. The string is a substring of the value (if matching). Upon matching, I append the key of the value, where the substring was found, to a list.  Is there any way in python to introduce something like an if condition, to do the following:  "only append to the list, if the substring matches at position 60+ (of 100) in the value"  My code so far:  #!/usr/bin/python3 # imports import re,sys import itertools # handling stdin faFile=sys.argv[1] pat=sys.argv[2] pat2=sys.argv[3] # opening .fa-File and building dictionary with open (faFile) as f:     # reading file-content line by line     content=f.readlines()     # stripping linebreaks and >     content=[x.strip()for x in content]     content=[x.strip('>') for x in content] # building dictionary from content # IDs are keys, sequences are values d=dict(itertools.zip_longest(*[iter(content)]*2, fillvalue=""))  # motif- search function def search (myDict, search1, search2):     # initialize empty list to store found keys     search.a=[]     # iterating through dictionary     for key, value in myDict.items():         if search1 in value:             if search2 in value:                 search.a.append(key)  search(d,pat,pat2) print(search.a)   Command-line call:  ./search.py file.fa pat pat2   I thought of something like introducing a counter, but couldn't figure it out yet


Remove trash icon from GNOME desktop and add to Ubuntu dock

I just installed Ubuntu 18.04 and don't like having the trash icon on the desktop rather that in the launcher (Ubuntu dock).   How can I move it back to the launcher? Can other icons be moved from the desktop to the launcher?


Interpretations and models in propositional logic

I am trying to understand model vs. interpretation of sentences vs. theories, with respect to a propositional calculus.  Is a model of a wff just a sentence that is true under some interpretation?   Or a set of wffs that are all true under some interpretation?   Or when an interpretation satisfies a wff (or set of wffs)?   Does it make sense to say that an interpretation is a model if all valid propositions are true? Or an interpretation being a model iff all theorems from the theory are still valid under the interpretation?


In Game of Thrones, Can white walkers speak? I haven't read the books but don't see evidence to the affirmative in the TV series.  If not, I'm interested in any communication theories.


Cross product: matrix transformation identity

How can one prove the following identity of the cross product?  $$(M a)\times (M b)=\det(M) (M^{\rm T})^{-1}(a\times b)$$  $a$ and $b$ are 3-vectors, and $M$ is an invertible real $3 \times 3$ matrix.


Same coordinate system - shapefiles don't overlap

I have two shapefiles and two rasters (dem), and while I put them in the same coordinate system (Greek grid), it seems that they don't overlap.  But one is the boundaries of a county, and another the polygon layer with the drought statistics of the same area.. So they should overlap but don't.


Okay, whenever I want to tile a window on the right I hit Win+→, and I tile my window.  And I'm fine with that, that's what I want.   However Windows always wants me to tile another window on the left, and minimizes the rest of the windows that are open for me to choose one.  I'd like help to disable this second part of the process of tiling. That is, I'd like to tile my window and have it tiled and continue with my workflow.  Instead of always having to cancel the choosing of the second window to tile.  This is a minor issue that I can go around every time.  The reason I'm asking for help is that I do this so many times in the day, that it somehow became a little annoying.


Is there any news about Hunter x Hunter since June 2016?

I know that it's been put on hold for a bit, but does anyone have any recent information on updates or progress?    The last post I read was from Dec.21 '14 so it's been a bit.


Can we able to Edit/Create a file using 'File Permission'?

Is there any Way to Edit/Create a file in the method of File Permission ?  Suppose it is '7' means can we able to change it to '4' ?  i.e -rwx to -r ?  Is there any code or___ to do?


Annihilator for a tensor $T\in\wedge V^{\ast}$

For $T\in\wedge^{k} V^{\ast}$ the annihilator is set $$an(T)= \{\phi\in V^{\ast}\mid \phi\wedge T=0\}$$  Then I need to prove that $dim(an(T))\leq k$ and is equal iff $T$ is decomposable ($i.e.$, $T=\phi_1\wedge\cdots \wedge \phi_k$ for $\phi_j \in V^{\ast}$).  I do not know how to attack this problem, suppose that has dimension greater that $k$ but I get no contradiction or at least do not know how to find it.


What is the minimum $ \sigma$-algebra that contains open intervals with rational endpoints

What are the minimum $\sigma$-ring and $\sigma$-algebra on $\mathbb R$ which contain the open intervals with rational endpoints?  Is there a relation between this $\sigma$-algebra and Borels?


Why is the Yang-Mills gauge group assumed compact and semi-simple?

What is the motivation for including the compactness and semi-simplicity assumptions on the groups that one gauges to obtain Yang-Mills theories?  I'd think that these hypotheses lead to physically "nice" theories in some way, but I've never, even from a computational perspective. really given these assumptions much thought.


Warlock spellslots conversion to sorcery points?

Warlock-sorcerer, can you convert your warlock slots (that you regain with short rests) into sorcery points?  Is there a cap to your current sorcery points?


What resistor is needed to regulate the current through 2 3V LEDs in series with a 9V battery?

So I'm trying to power 2 of these  together in series. I know that I have to add the voltage of the two lights together and get a resistor that restricts the power to that level. I have a 9V battery and the lights are 3V each. I brand new to all of this, and understand almost nothing, so any help would be appreciated. Can someone help me choose the correct resistor (And how to identify that resistor with the color branding thing) so two of those lights listed above can be wired in series? Thanks!


Whenever I get the "there are no more items to review in this queue" (or "you've performed your limit for this queue") and click on Review at the top left to go back to the main Review page, I seem to need to click it again to actually see updated results.  That is, it most often still displays non-zero numbers for the queue I've just cleared (and if I do click on them again they immediately show "no more items"), but they're zeroed on a refresh.  I'm guessing this is actually some sort of caching bug.


I have somehow managed to replace the default movie player, with my FTP client. I'm not sure how that happened, but now every time I double click a movie file in Finder, my FTP client launches.  Can someone tell me how I can go about changing the default application that launches for certain file extensions?


DNS resolution of static IPs at Router level

I currently have a few static IPs set in my router and I'm wondering if there is any way that i can access/ping/refer to them via a DNS request (i.e. instead of 192.168.0.8 use something like "RapberryPi") that way I don't have to always remember the IP address. I know that this can be done if i setup a server within the NAT but I will like to implemented at the router level. Do routers usually have a "host" file or something of that sort?


How can I remove trailing certain blocks of whitespaces from a string in javascript?

I need to adjust a string like so:  Cases where things should be adjusted:  Case a: "        ", becomes "" Case b: "z       ", becomes "z" Case c: "        z", becomes "z"   Cases where things shouldn't be adjusted:      Case d: "   z   ", stays the same  Case e: "zzz zz          zzz", stays the same   How can I achieve this in javascript?


Select query takes more time than it should

I have a MySQL database table with nearly 23 million records. This table has no primary key, because nothing is unique. It has 2 columns, both are indexed. Below is its structure:    Below is some of its data:    Now, I ran a simple query:  SELECT `indexVal` FROM `key_word` WHERE `hashed_word`='001'   Unfortunately, this took more than 5 seconds to retrieve the data and show them to me. My future table will have 150 billion records, so this time is very very high.  I ran the Explain command to see what's going on. Result is below.    Then I ran the Profile using below command.  SET profiling=1; SELECT `indexVal` FROM `key_word` WHERE `hashed_word` = '001'; SHOW profile;   Below is the result of the profiling:    Below is some more information about my table:    So, why this is taking so long? They are indexed too! In future, I have to run lot of LIKE commands, so this is taking too much time. What has gone wrong?


What does a person gain ultimately by being and participating on a site like Stack Exchange?

Is it just the regular give and take knowledge site or is there much more to it? I have personally started liking this site a little too much!..I mean I downloaded the app to stay updated(never really did this before). What is that ultimate point which makes this site so special? Isn't it too social,friendly and yet we find competition all around?? What is it that drives people so close to this site? And what do I as a person gain?Is it just materialistic or is there something deep within?


How much bigger is $\mathfrak{c}$ than $\aleph_0$?

In "Professor Stewart's Incredible Numbers," by Prof. Ian Stewart, it is claimed that $\mathfrak{c}$, the number of real numbers, is bigger than $\aleph_0$, the number of natural numbers, but     "[h]ow much bigger is moot: it depends on which axiom system you use to formalise mathematics".   Would someone explain this to me, please? I couldn't find anything on it.


Extracting a regex matched with 'sed' without printing the surrounding characters

To all the 'sed' doctors out there:  How can you get 'sed' to extract a regular expression it has matched in a  line?   In other words words, I want just the string corresponding to the regular  expression with all the non-matching characters from the containing line stripped away.  I tried using the back-reference feature like below  regular expression to be isolated           gets `inserted`                here                     |                v    sed -n 's/.*\( \).*/\1/p    this works for some expressions like   sed -n 's/.*\(CONFIG_[a-zA-Z0-9_]*\).*/\1/p    which neatly extracts all macro names starting with 'CONFIG_ ....' ( found in some '*.h' file ) and prints them all out line by line             CONFIG_AT91_GPIO           CONFIG_DRIVER_AT91EMAC                    .                    .              CONFIG_USB_ATMEL           CONFIG_USB_OHCI_NEW                    .                  e.t.c.    BUT the above breaks down for something like    sed -n 's/.*\([0-9][0-9]*\).*/\1/p    this always returns single digits like                    7                  9                  .                  .                    6   rather than extracting a contiguous number field such as.                 8908078               89670890                    .                  .                    .                23019                     .                e.t.c.     P.S.: I would be grateful to feedback on how this is achieved in 'sed'.        I know how to do this with 'grep' and 'awk'       I would like to find out if my - albeit limited - understanding of        'sed' has holes in it and if there is way to do this in 'sed' which I       have simply overlooked.


Logistic regression always predicting 1 for my small data set

I have a data set of 8 rows out of which seven rows are predicted and I need to predict the 8th-row data input. I am not getting where my logic is getting wrong, please let me know where I am getting wrong.{what ever predicted label present before i am getting wrong labels for that too)  flag=0 while flag==0:     cost=0     for i in range(rows):         if lDict.get(i)!=None:             dp=dotproduct(w,x[i])             #print("dotproduct",dp)             sig=sigmoid(dp)             #print("sigmoid",sig)             deviation[i]=lDict.get(i)-sig             #print("deviation",deviation)             step1=lDict.get(i)*sig             #print("step1",step1)             step2=(1-lDict.get(i))*(1-sig)             #print("step2",step2)             cost=cost+(-step1-step2)             print("cost",cost)     for i in range(cols):         for j in range(rows):             if lDict.get(j)!=None:                 delf[i]=delf[i]+(deviation[j]*x[j][i])                 #w[i]=w[i]-(eta*delf[i])                 #print("new_w",w)                 print("delf[i]",delf[i])                 #delw[i]=delw[i]+eta*delf[i]                 #print("delw",delw)     for i in range(cols):         w[i]=w[i]-(eta*delf[i])     print("updated w is ",w)   newcost=0 #print("newcost",newcost) for i in range(rows):     if lDict.get(i)!=None:         #print("w",w)         dp=dotproduct(w,x[i])         #print("newdot",dp)         sig=sigmoid(dp)         #print("newsig",sig)         step1=lDict.get(i)*sig         #print("newstep",step1)         step2=(1-lDict.get(i))*(1-sig)         #print("newstep2",step2)         cost=newcost         newcost=newcost+(-step1-step2)      print("new cost is",newcost)     print("old cost",cost)     if newcost-cost<stop:         flag=1         print("flag",flag)   for i in range(rows):     if lDict.get(i)!=None:         dp=sigmoid(dotproduct(w,x[i]))         print("dp",dp)         print("weights",w)         #sig=sigmoid(dp)         #print("sig",sig)         if sig<0.5:             print(0,"",i)         else:             print(1,"",i)`


`\index{...}` in footnode different from `\index{...}` in main text

Dear all I think I have a problem with the collation of makeidx.  following some suggestions found here I have got in the text something like this  \index[p]{Plutarco!demalignitate@\textit{De Malignitate Herodoti}!00855 @855A|qt}  \index[p]{Plutarco!demalignitate@\textit{De Malignitate Herodoti}!00868 @868f-869b|nn{\thefootnote}}   the first is an \index entry in the text, the second in a footnote. My problem is that even if I put the sort also on the second level of indexing it keeps keeping them separated.  I use this package information  \usepackage[splitindex]{imakeidx} \makeindex[name=n, title=Nomi di persone e luoghi]  \makeindex[name=p, title=Passi citati nel testo] \makeindex[name=t, title=Altri testi citati] \makeindex[name=pap, title=Papiri e manoscritti citati nel testo]  \newcommand{\nn}[2]{#2 \textit{n}#1} \newcommand{\qt}[1]{\textbf{#1}}   in the .idx file I get this  \indexentry{Plutarco!demalignitate@\textit{De Malignitate Herodoti}!00855 @855A|hyperindexformat{\qt}}{8}  \indexentry{Plutarco!demalignitate@\textit  {De Malignitate Herodoti}!00868 @868 b-c|hyperindexformat{\nn{33}}}{10}   can somebody advise me on what I am doing wrong here, please? I have tried to use \string after the first sort with no effect.    sure, sorry: this is the file I'm using  \documentclass[12pt,a4paper]{book} \usepackage[utf8x]{inputenx}  \usepackage{palatino}        \usepackage[LGR,T1]{fontenc} \usepackage[english,german,polutonikogreek,italian]{babel}  \usepackage[splitindex]{imakeidx} \makeindex[name=p, title=Passi citati nel testo,columns=1] \newcommand{\nn}[2]{#2 \textit{n}#1} \newcommand{\qt}[1]{\textbf{#1}} \usepackage[hidelinks]{hyperref} \begin{document}  (855A\index[p]{Plutarco!demalignitate@\textit{De Malignitate Herodoti}!00855 @855A|qt})% \footnote{DHM 868 B-C\index[p]{Plutarco!demalignitate@\textit{De Malignitate Herodoti}!00868 @868 b-c|nn{\thefootnote}}} \printindex[p] \end{document}


What happens to objects that enter a Stargate from the destination side?

We know that matter can only travel one way through a Stargate, ie. from the dialing gate to the destination. What happens to things that enter the wormhole from the destination side?   For example, if someone dials a gate that has tipped on its side (as in the SG-1 episode Hundred Days) and walks through, what happens when he reaches the other side and gravity causes him to immediately fall back into the gate?  Does the matter disappear, or does it pass through to the other side of the destination gate, as if the wormhole were not there?  Related:


Is there a numerical base that is in any way "better" for simple mathematical calculations than others?

I want to know if there are any numerical bases that are notably well-suited for humans to learn and use at an elementary or grade-school level.  I know that different numerical bases (i.e. decimal/base-ten, senary/base-six, ternary/base-three, dozenal/base-twelve) have different patterns and quirks and tricks. Many historic cultures used bases other than decimal (some have even hung around to modern times, like how we divide days into 24 hours and hours into 60 minutes), and most of them did quite well for their time.  There is a similar question on this site, , but the question and its answers do not address my main question: ease of use for humans just starting to learn basic mathematics, while still remaining reasonably efficient for advanced mathematics.  Note: I'm not trying to suggest the world change to something other than the decimal system, or start teaching different bases to elementary schoolers. I'm just curious as to how other systems compare if we imagine parallel universes where each base has the same global presence, inertia, and educational/social infrastructure that is currently enjoyed by base-ten in our own universe.  Primary Considerations   Ease of mental arithmetic (addition, subtraction, multiplication, division)   In particular, prevalence of shortcuts/patterns that can be used to simplify mental calculation Multiplication tables are easy to learn, either because they're small or because they have intuitive patterns  Compactness, in two contradicting categories that need a compromise:   Numbers don't get long too quickly, to save time and space when writing Doesn't use too many symbols, to simplify learning Examples of poor compromising: Numbers stay really short in base-one-hundred-and-twenty, but it uses a ton of symbols. Base-two only uses two symbols, but numbers get really long really fast.    Bonus Points   The most common/basic fractions terminate (1/2, 1/3, 1/4) Interesting mathematical properties beyond simple arithmetic Many factors, like how dozenal divides evenly into halves, thirds, quarters, and sixths Simple conversion to/from binary, for binary computers Simple conversion to/from balanced ternary, for balance-scale math (or balanced ternary computers)   Note: Cross-posted to  as suggested by @JohnOmielan.   There are now answers on both sites. (So cross posting wasn't such a good idea after all.) (However, no answers on either site have fully answered the question as of yet.)


How can Searle's Chinese Room argument refute to this argument?

I'm a relatively new student studying philosophy and became interested in the computer models of mind.  I've read John Searle's CR experiment and had a quick thought. How can CR experiment refute to the below?   If a computer is fed with bunch of data that it actually learns or correctly answers untaught problem, is it not being intelligent?   Say for instance, a system is given a multiplication table from 1 to 100.  It is taught formally and knows how to read the table and give correct outputs of multiplication. Let's say the computer "learns" how to multiply (say the data above is enough for the computer to actually learn multiplication).  If a user asks "101 x 101?" and the computer correctly answers it, this displays learning and thus capability to think?


How can I get the footer to appear on the bottom after positioning images with HTML/CSS?

When I try to set a footer, it appears above the 3 images that I positioned side by side in CSS. Does anyone know how I can solve the problem unique to my code?    .service{     top: 550px;     background-color: rgba(51,51,51,0.7);     font-size: 18px;     color: white;     width: 250px;     margin: 1%;     padding: 1%;     height: 150px;     position: absolute;     clear: both; } .service:nth-child(1){   left: 15%;       } .service:nth-child(2){     left: 39%; } .service:nth-child(3){     left: 63%; } .raining{     top: 724px;     width: 270px;     position: absolute;     clear: both; } .raining:nth-child(1){   left: 16%;       } .raining:nth-child(2){     left: 40%; } .raining:nth-child(3){     left: 64%; }

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,


Dividing versus multiplying by inverse in modular arithmetic

I was working on a problem that resulted in the calculation: $20 \equiv 10x \pmod{11}$.  I got the answer $x \equiv 2 \pmod{11}$ with the thought process: Since $10$ is a factor of $20$ I can rewrite $20 \pmod{11}$ as $10x \pmod{11}$ with $x=2$. But isn't this basically the same as using division, which we aren't supposed to do in modular spaces?  If I solve by multiplying $20$ by the multiplicative inverse of $10 \pmod{11}$ which is $10$, I get $200 \pmod{11}$ which simplifies to $2 \pmod{11}$ anyway. Did these numbers just happen to be the same or is my original method valid?


I am new to PWM control. Is it advisable to operate a motor at higher than rated voltage with the "PWM average voltage" more than the nominal voltage specified in the datasheets? After some researching, the majority of the information that I kept seeing is that it should be OK (with a recommendation to operate at high PWM frequency). Secondly, if the "average PWM voltage" is kept less than the nominal voltage (with the supply voltage much higher) is it correct to refer to it as over-voltage operation? Or is it only when the average voltage is higher than nominal voltage?


How can I replay Apache access logs back at my servers to do real world load testing?

I looked at  but I couldn't see how to replay my own existing logs in any of those tools. I have a bug that only occurs under certain load operations which my existing JMeter and AB testing stuff can't reproduce.  I want to simply give the tool access_logs and have it play them back, either faster or at the same speed.


When will lasso and regression tree perform differently?

If I want to use lasso and regression tree respectively to generate the important variable lists. I'm wondering when will they generate lists with a huge difference? Under what signal structure?


Distribution of maximum of normally distributed random variables

I'm trying to find the closed-form CDF and PDF of $Y = \max(X_1, ..., X_n)$ where $X_i \sim \mathcal{N}(\mu_i, \sigma^2)$.  My thought process so far: $$ \begin{align*} F_Y(y) &= \mathbb{P}(\max(X_1, ..., X_n) \leq y) \\ &= \prod_{i=1}^n F_{X_i}(y) \\ \implies f_Y(y) &= \frac{\partial}{\partial y} \prod_{i=1}^n F_{X_i}(y) \end{align*} $$ I'm not sure how to proceed from here, or whether this is even the correct approach. Any help is much appreciated.  Edit: The linked question pertains to IID random variables, whereas I am more interested in INID random variables.


If $f$ is continuous and with a limit at infinity then $f$ is uniformly continuous

Let $f : [a, +\infty) \rightarrow \mathbb{R}$ be continuous, such that   $\lim_{x \rightarrow +\infty} f(x) = l \in \mathbb{R}$. Show that f is   uniformly continuous.   I want to split the domain - one in which we have continuity, and the other in which the values of f are approaching $l$. This means there are theree possibilities for our $x$ and $y$ using the uniformly continuous definition: x and y are in the first part, x and y are in the second, x is in the first and y in the second.   How would I do this proof?


why are both ipad and opad required for HMAC?

I was reading about HMAC and why it is crucial to avoid security issues with normal prepending / appending the secret k to a message (issues due to merkel damagard construction). I am not familiar with the math and the detailed proof presented in the paper, but i was wondering why both ipad and opad are required. what if we use only one ? how will an attacker exploit that ?


Adjust local space scale to fit object size

I have an I-carrier that I want to have in a certain dimension. I thought about scaling the thing in object mode and then applying the scale. However when I do that, the size of the object in the x-direction seems to be off as it doesn't match what I'm typing in the transform window. My best bet is that this is because the local space of the object doesn't match the object size, at least in the x-direction. So how can I adjust my local space so that the adjustments I make in the transform window correctly translate to the objects dimension?  Note: Even after applying the scale, the objects dimensions are way off. However, the dimensions in the edit mode are right.


Finding if something is in an array or not in javascript

I'm using Javascript to find if something is in an array or not, but when I'm using this code it doesn't alert anything at all, which means it's not working correctly. What am I doing wrong?  var theArray = new Array("one","two","three");  if (theArray.indexOf("one")) { alert("Found it!"); } if (!theArray.indexOf("four")) { alert("Did not find it!"); }


I need to create a thematic map for time intervals  (ex. 1/1/1920-31/12/1929). To every polygon corresponds a date (from a date field) and I need them to be coloured depending in which interval they are situated. I can't find anywhere in the symbology tab a place to type the time ranges. In the quantities section I can't even select any field.      I would like to use Field calculator to convert my date into a number, which would represent the first year of a decade. For example 20/9/1954 ->> 1950. I think that would help me a lot. But I don't know how to do it in python or VB.   I have access to the Excel table that has been attached to the shapefile and I could easily do this transformation in Excel. And then add the data again to ArcMap. But I prefer doing it all this in ArcMap.  Another problem is that I have dates prior 1900, and if I sort them ascending, the ones before 1900 would appear even before the null values. So I guess ArcMap doesn't recognize them because of Excel. I've already read another topics about this problem, but I still couldn't find a solution.  I also read this answer to a similar question:     If you are looking for Quantities -> Graduated Colors/Symbols, they   won't directly work with Date fields. You could however convert the   date fields to numbers and use that instead. I'd convert each date to   an Epoch timestamp (number of seconds since a particular date,   01/01/1970 being used most frequently), then use the Epoch timestamp   to symbolize your features.   That would be very helpful too, but again, my lack of programming skills blocks me.    I solved this by extracting  the year from the date field into a new field (integer) using field calculator and the formula: DatePart ("yyyy", [field.name]  ). And then I created the map by quantities and used the intervals I wanted.


Protected questions and overall SO network reputation

I recently wanted to give an answer on an SO platform, but instead had to write a comment.  The weird thing is, that I think the comment would have been a decent answer, which in turn could bump me well above the threshold to answer protected questions.  I also have the 100 rep bonus, and 1900 reputation or more overall on the SO network.  I think it would be cool if a user with enough reputation say 1000 or 1500 overall on the SO network (real reputation not with the bonus counted), could still answer protected questions.  The reason is that I think it's unlikely that someone with a lot of reputation would write a bad answer on another SO platform.  I don't know if it can be implemented though and what each SO platform has access to.  I mean you can still give the information in a comment, or ask someone in chat to post it for you, but you will forfeit the potential gain of reputation, which then would allow you to answer future protected questions (which are the ones you are most likely to see, because you're likely not actively search on that particular network, but instead only see the hot networks)  Ofcourse you could argue that this is design, but somehow I think that this could prevent a few people which could post gem answers for specific situation/contexts they are familiar with, but are simply not active on that network.


Make Query Layer - field not available as unique identifier when using NVL

I need to create a spatial view with Make Query Layer. My query includes outer joins, so I must combine every table's ID field to create a unique identifier. Since there might not always be a child for every parent record, I use NVL to replace null occurences in the ID fields with a constant value (say 9999).   My problem is that these fields using NVL are not visible in the Unique Identifier Field(s) (optional) list parameter.  Any idea why?   Or is there any other method I can use to get unique IDs for my query layer?   I am not allowed to create my view directly in the database.  I use ArcGIS 10.3.1.  and the underlying database is Oracle 12c. All ID fields are integers (NUMBER(10, 0)).


Do static nested classes behave differently for being 'static'?

I now have this question because of a code review iteration, in which I created an POJO to be used as a request object, like this one:  class Request {        private List<Item> items;        static class Item{            // ... some other stuff        } }   and then someone requested to extract the inner class because it was static, meaning that its instances would be treated as if they were automatically static, which would mean that we would only have an instance of type Item while the system was up and stuff, or at least there was that risk though.  I tried to respond by saying that that happens with static values, but this is a static class, which according to what I understand it only affects the way it is instantiated and the access it has to the enclosing classes' fields, but I couldn't find anything in the JLS (or anywhere to be honest) to explicitly support my claim.  Does anyone know whether the guy was right about requesting that change? If not, does anybody know where can I find information to support/prove my argument? Any pointer will do :) Thanks in advance!


Are all forces explained in terms of curved spacetime?

Gravity is explained in general relativity as curved spacetime. Can the other forces (electromagnetic and weak/strong nuclear) also be explained by this?


redefine shorthand for single line listings

I would like to redefine a short command (without \begin ... \end) for single line code examples using the listings package.  Here is what I tried:  \documentclass{article} \usepackage{listings}  \newcommand{\my}[1]{ \begin{lstlisting} #1 \end{lstlisting} }  \begin{document} \my{code} \end{document}   However, it gives the following error:  ! Emergency stop. <*> example.tex *** (job aborted, no legal \end found)   Using lstlisting directly works, though:  \documentclass{article} \usepackage{listings}  \begin{document} \begin{lstlisting} code \end{lstlisting} \end{document}


Recover accidentally deleted overwritten data

I have a Kingston 64 GB microSD card that I've accidentally chosen for a the Windows 7 USB DVD Download Tool to format and write the Windows installation disk data on it instead of another USB flash. Unfortunately, I've realized that when the process was finished. My microSD card had around 7 GB free, so I believe that some data have been overwritten by the written Windows installation disk data. I'm looking for a way to recover all the lost data including the overwritten ones.  However, it's not possible to recover data on an HDD. I've read  that there's a possibility to recover overwritten data (even the securely deleted overwritten ones with complicated passes) on SSD. So I think the answer for this question should have different bases as it may be possible for SD also to restore the overwritten data. We just need a specialized way that could do this specifically, which should take a different process from an HDD.


Puzzle : There are two lengths of rope ...

You have two lengths of rope.  If you set fire to the end of either of them, the rope will burn in exactly one hour. They are not the same length or width as each other.  They also are not of uniform width (they might, for example, be wider in the middle than at the end), thus burning half of the rope is not necessarily going to take $30$ minutes.  By burning the ropes, how do you measure exactly $45$ minutes worth of time?  Note : I don't know whether a solution even exists at all.


How to install a single new ubuntu os removing a dual boot os system?

I currently own a system with Windows 7 and Ubuntu dual boot. I want to remove the entire dual boot system and install a single Ubuntu OS.  Can I directly install Ubuntu via the flash drive without bothering about the dual boot partitions (I don't want the previous OS Windows 7 and Ubuntu partions)?


Is this question correct? What is the chronological order of John as the president of our country?


Can anyone help me fix this exception? The Results coming up but still getting the error. There are four other classes connected to it.    public class CreateLoans {     public static void main(String[] args) {          Scanner s = new Scanner(System.in);         int num;         int term;         int choice;         String name;         double amount;         Loan[] w = new Loan[5];         for (int i = 0; i < 1; i++) {             System.out.println("Choose Loan Type: 1 Business Loan 2 Personal Loan");             choice = s.nextInt();             if (choice == 1) {                 System.out.print("Enter Loan Number: ");                 num = s.nextInt();                 System.out.print("Enter Last Name: ");                 s.nextLine();                 name = s.nextLine();                 System.out.print("Enter Loan Amount: ");                 amount = s.nextDouble();                 System.out.print("Enter Number of Terms: ");                 term = s.nextInt();                 w[i] = new BusinessLoan(num, name, amount, term);             } else if (choice == 2) {                 System.out.print("Enter Loan Number: ");                 num = s.nextInt();                 System.out.print("Enter Last Name: ");                 s.nextLine();                 name = s.nextLine();                 System.out.print("Enter Loan Amount: ");                 amount = s.nextDouble();                 System.out.print("Enter Number of Terms: ");                 term = s.nextInt();                  w[i] = new PersonalLoan(num, name, amount, term);             } else {                 System.out.println("Error, Please Enter 1 Or 2");             }         }         for (int i = 0; i < w.length; i++) {             System.out.println(w[i].toString());         }     }  }


The "switch case" witch I have write for sin,cos,tan,cot doesn't work when I enter them in operator and it goes to entering second number. Where is my fault? Here is my code:  import java.util.Scanner;  public class MainClass {      public static void main(String args[]){         Scanner NumInput = new Scanner(System.in);         double firstNum = 0;         double secondNum = 0;         double result = 0;         System.out.println("Enter first number: ");         firstNum = NumInput.nextDouble() ;         System.out.println("Enter operator: ");         String amalgar = NumInput.next();             if (amalgar == "sin" || amalgar == "cos" || amalgar == "tan" || amalgar == "cot"){             switch(amalgar){         case "sin":             result = Math.toRadians(Math.sin(firstNum));             break;         case "cos":             result = Math.toRadians(Math.cos(firstNum));             break;         case "tan":             result = Math.toRadians(Math.tan(firstNum));             break;         case "cot":             result = (Math.toRadians(Math.cos(firstNum))/Math.toRadians(Math.sin(firstNum)));             break;          default :              break;                }             System.out.println(Math.toRadians(result));             }             else                  System.out.println("Enter second number: ");                 secondNum = NumInput.nextDouble();               switch (amalgar){         case "+":             result = firstNum + secondNum;             break;         case "-":             result = firstNum - secondNum;             break;         case "*":             result = firstNum * secondNum;             break;         case "/":             result = firstNum / secondNum;             break;          default:             System.out.println("nemifahmam chi neveeshti");         }              System.out.println(result);      } }


how to stop table from going out of the page under LyX?

Here is the table source code:  \begin{table}[H]  \begin{tabular}{|c||c||c||c||c||c|}  \hline & \textbf{Inspiration for new clothes}  & \textbf{Purchase clothes/year}  & \textbf{Period of year girls spend more on clothing}  & \textbf{Priority for clothing}  & \textbf{Girls prefer to shop with}\tabularnewline \hline \hline \textbf{Maximum}  & Style in stores & 50 times & Summer & Quality & Family \tabularnewline \hline \hline \textbf{Minimum}  & Celebrities & 3 times & Winter & Price & Alone\tabularnewline \hline \end{tabular}\protect \caption{Statistical Summaries}  \end{table}   Kindly tell me what is the problem in this code?


The differential equation $y''-q(x)y=0.$

Let   $$y''-q(x)y=0$$be a differential equation with initial conditions  on $0\leq x<\infty,$ as $y(0)=1,y'(0)=1$ where $q(x)$ is a positive monotonically increasing continuous function. Then which of the following are true?   $y(x)\rightarrow\infty$ as $x\rightarrow\infty$. $y'(x)\rightarrow\infty$ as $x\rightarrow\infty$. $y(x)$ has finitely many zeros in $[0,\infty)$. $y(x)$ has infinitely many zeros in $[0,\infty)$.   Please don't mind, actually I am new in differential equation. I only know that by Picard's theorem the above differential equation has the unique solution, but I don't know what is the solution as I tried by direct hit and trial method. According to me the solution of above differential equation will be some thing in exponential form, so according to me its answer will be $a$, $b$, $c$. But I don't know the exact method. Please help me to solve the above problem. Thanks in advance.


display users that logged in since a date using last

I am trying to display the user name of the accounts that have logged in during the past month using the last command.  At the moment I have this  last | awk '{print $1, $4 ,$5 ,$6}' | grep -B 10 Jul | sort -u -t' ' -k1,1   As the users who have logged in most recently are displayed higher in the list, I am trying to grep for the month, then display that line and the lines above it and delete duplicate usernames. But it doesn't seem to be working. Any ideas?


Bash  GNU Readline. Readline provides a collection of keyboard shortcuts. However, there are some shortcuts that work on bash and that are not documented in Readline . Some examples are:   C-h - Same as Backspace C-m - Same as Enter (CR I guess)   So why do these shortcuts work? I guess that these may have something to do with  but I am not sure which component provides interpretation of these control sequences as the behavior I have indicated.  Is it the Readline library? Or is it bash itself? Is it my terminal emulator? Is it the kernel? Etc...  What component makes these control sequences behave this way?  Edit: My .inputrc file:  # To the extent possible under law, the author(s) have dedicated all  # copyright and related and neighboring rights to this software to the  # public domain worldwide. This software is distributed without any warranty.  # You should have received a copy of the CC0 Public Domain Dedication along  # with this software.  # If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.   # base-files version 4.2-4  # ~/.inputrc: readline initialization file.  # The latest version as installed by the Cygwin Setup program can # always be found at /etc/defaults/etc/skel/.inputrc  # Modifying /etc/skel/.inputrc directly will prevent # setup from updating it.  # The copy in your home directory (~/.inputrc) is yours, please # feel free to customise it to create a shell # environment to your liking.  If you feel a change # would be benifitial to all, please feel free to send # a patch to the cygwin mailing list.  # the following line is actually # equivalent to "\C-?": delete-char "\e[3~": delete-char  # VT "\e[1~": beginning-of-line "\e[4~": end-of-line  # kvt "\e[H": beginning-of-line "\e[F": end-of-line  # rxvt and konsole (i.e. the KDE-app...) "\e[7~": beginning-of-line "\e[8~": end-of-line  # VT220 "\eOH": beginning-of-line "\eOF": end-of-line  # Allow 8-bit input/output #set meta-flag on #set convert-meta off #set input-meta on #set output-meta on #$if Bash   # Don't ring bell on completion   #set bell-style none    # or, don't beep at me - show me   #set bell-style visible    # Filename completion/expansion   #set completion-ignore-case on   #set show-all-if-ambiguous on    # Expand homedir name   #set expand-tilde on    # Append "/" to all dirnames   #set mark-directories on   #set mark-symlinked-directories on    # Match all files   #set match-hidden-files on    # 'Magic Space'   # Insert a space character then performs   # a history expansion in the line   #Space: magic-space #$endif


PHP Class Database Connection Scope Issue

For a new project that I'm doing in PHP I've created an SQLMethods class to connect to the database and perform queries. Tonight was the first night that I actually got to test it (I wrote it a week or so ago and forgot about it) and an unexpected error occured: When it was calling my ExecuteQuery() function, it wouldn't use the database I selected in the constructor.  The constructor:      public function SQLMethods() {         $SQLConnection = mysql_connect($SQLDBAddress, $SQLUserName, $SQLPassword);          if (!$SQLConnection) {             die('Could not connect: ' . mysql_error());         }          mysql_select_db($SQLDB, $SQLConnection);     }   The function in question:      public function ExecuteQuery($Query) {         mysql_query($Query, $SQLConnection) or die('Could not perform query: ' . mysql_error());     }   Does anyone see what the issue might be? Does the connection close after the constructor completes?


Geometrical Interpretation of function $\phi(n)$

We know that the $\phi(n)$ function denotes the total numbers which are co-prime to n , but like most of the mathematical concepts , can it be geometrically interpreted  ? Like in terms of graph?  If  yes , would it be like a normal graph of a function? Could we use more geometrical tools like finding it's slope , maximum and minimum etc. ??  Edit : This question doesn't merely imply the possibility of the graph of the function , but to relate to the geometric interpretation and if possible , to use geometric means to find some characteristic properties of the function.


Is it still safe to use sha1 as an hmac hash function in 2018

I'm curious if it's safe to use sha1 for an HMAC in 2018 in a platform product.  A popular vendor (Twilio) uses an HMAC with sha1 with a shared secret to validate that messages they send are indeed sent by them (see the )..  In a recent audit, the use of sha1 was flagged as a potential problem.  As part of the explanation and justification for why it is OK to use hmac-with-sha1, Twilio pointed to  about hmac with sha1, though I note that article is from 2009.  So, what say you crypto.stackexchange? Is it still safe in 2018 for an organization like Twilio to use sha1 in an HMAC?


Consider this beamer file:  \documentclass{beamer}  \begin{document}  \begin{frame}   \begin{tabular}{p{1cm}p{1cm}p{1cm}}     aaaaaa & \only<2>{aaaaaa} & \onslide+<2>{aaaaaa}   \end{tabular} \end{frame}  \end{document}   This input causes slide 2 to look like this:   Why are the cells not aligned, and what can I do to fix this?


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


Easiest/affordable way to monitor what's using power in your home?

My electric bill seems to be unusually high.   I'm trying to figure out if there is an issue somewhere (faulty wiring, someone stealing power etc) or if one of my devices is a power hog.   Does anyone know of an easier way to monitor the use of their electric?


How to see this improper integral diverges?

$$\int^\infty_1\frac{1}{x^{1+1/x}}dx$$  I'm preparing for exams. I would also like to know what are some commonly used methods to show an improper integral diverges?


I used sculpting on a plane, and things looks great. However, when I press P to play, the whole ground become a mess. I can see through it in various places, and there are also nasty looking black edges everywhere.  another problem, I made a UV Sphere to display the sky, but when I press , P to play it disappears!


Why won't my computer go to sleep automatically?

Windows 8 is set to sleep after 30 mins, and it used to work, but recently it's started refusing to sleep. (I can still manually ask it to go to sleep without any issue.)    I was having issues a while ago, but it was with my network adapter. That's since been disabled, so it's definitely not that:    I've checked to see what devices are able to wake up my machine, but it only appears to be my mouse:    Which is odd, because I haven't recently changed my mouse, and more confusing still: The monitor does go to sleep just fine. If it was actually the mouse keeping my system awake, I'm pretty sure the monitor wouldn't go to sleep.  I've checked my Wake Timers, and nothing:    I've also checked my existing requests...  UPDATE: I found something. What to do with it, I don't know...    Note: Even when /requests says that there's "NONE" under every category, my machine still won't sleep(!).    In short: How can I tell what's preventing my computer from Sleeping?    UPDATE: Ok, so I now have a few more pieces of the puzzle. I came back to my computer and it was ASLEEP! Lawks! It seems that the only times it doesn't sleep is if VLC Player is open, even if a video isn't actually playing.  UPDATE UPDATE: Ok, so it won't sleep sometimes when VLC Player ISN'T running, either. Bah!


Missing [?] notifications on edits of other users performed on own posts

's my original post on Meta Italian.SE, which I'm now transposing here since I'm now positive that this is happening network-wide.  I've noticed that edits of other users performed on my own posts are not notified on some sites across the network (they are notified e.g. on Ask Ubuntu but they're not notified e.g. on Italian.SE and on Meta.SE), despite this happening on other sites across the network.  The last time this happened was just a few minutes ago:    As you can see the latest notification hails from 29 minutes before the screenshot was taken, and there's no notification of the more recent edit whatsoever.


Sorry if this has been talked about before and please point me to those references. I am now running my own Ubuntu web server however I have been hitting problems with authorities and FTPing up files. Right now I have all of my web stuff under /var/www. But every time I do something there, I then have to do a chown www-data:www-data to make sure everything keeps working properly. In reality, I want to be able to FTP into my server upload what I want and just have it work without having to worry about authorities every time.  Should I have put everything under /home/user/public_html/mydomain1.com and home/user/public_html/mydomain2.com? What authorities should that then have? user:www-data? user:user?  Do I need to make any changes to the Apache config?  Update: How do I setup proFTP to make sure that I can access /var/www if that is the route I continue one?


I wish to hide the grub menu, but with the right settings in /etc/default/grub, the grub menu is still displayed at boot. I run sudo update-grub after each edited. Bellow my grub file:  cat /etc/default/grub GRUB_DEFAULT=0 GRUB_HIDDEN_TIMEOUT=2 GRUB_HIDDEN_TIMEOUT_QUIET=false GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`" GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""   With the following settings, I still have the menu display while it should not:  GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=0   Same issue with:  GRUB_HIDDEN_TIMEOUT=5 GRUB_HIDDEN_TIMEOUT_QUIET=false GRUB_TIMEOUT=0   In fact, I have the same effect that the following:  #GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10   Using Ubuntu 18.04 LTS with dual-boot windows. Ubuntu is the default entry in grub. I edit the file with sudo nano /etc/default/grub then I run sudo update-grub with success. Could you help me to really hide the grub menu please?  Edit: Following the answer from abu_bua, the issue was solved with add GRUB_DISABLE_OS_PROBER=true here my new grub file:  GRUB_DEFAULT=0 GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=false GRUB_TIMEOUT=0 GRUB_DISABLE_OS_PROBER=true GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`" GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""


What integrated blog comments/forums solutions exist beyond Vanilla Forums?

For the past year and a half, I've been running Vanilla Forums on my WordPress-based site  My favourite feature of Vanilla is that it integrates comments from the blog's front page into the forums, giving users the continuity of a single sign-on.  The downsides are that Vanilla loads slowly, performs rather poorly on iPads (a source of irony given my site's subject matter), randomly logs users out with some frequency, and generally annoys the forum regulars.  I would like to replace Vanilla with different forums software. Ideally, this new solution would:   Integrate with blog comments and Import our 1.5 years' worth of data from Vanilla.   Is there anything out there that would fit my needs?


Why sometimes it is correct not to put a comma after an if-clause?

There is a recommendation to put a comma after an if-clause which is placed at the beginning of a sentence. For example:     If there was the time when songs like this were not needed, I would not live to see it.   But here is the sentence:     If you had married this girl you would have been wretched.   Why does it go with no comma?


How can I use \SI from siunitx inside \replaced from changes?

I'm trying to record some changes using the changes package - I've already done a lot of the text, and had to work around display maths but I've got a simple value typeset using siunitx, and changing that value doesn't appear to work:  \documentclass{article} \usepackage{siunitx} \usepackage{changes} \begin{document}     \replaced{\SI{1}{\volt}}{\SI{2}{\volt}} \end{document}   gives:  ! Extra }, or forgotten \endgroup. \UL@stop ...z@ \else \UL@putbox \fi \else \egroup                                                    \egroup \UL@putbox \fi \if... l.5 ...\SI{1}{\volt}}{\SI{2}{\volt}}   If I continue to compile (getting the same error again and 2 missing } inserteds, the output is actually exactly as expected:    adding \protect before the \SI gives exactly the same error, and of course trying \SI{\replaced{1}{2}}{\volt} was never going to work:  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! siunitx error: "invalid-token-in-number" !  ! Invalid token '\let ' in numerical input. !  ! See the siunitx documentation for further information. !  ! For immediate help type H <return>. !...............................................     Is there some workaround that will get this to run without errors?  I don't really want to run in nonstopmode in case of "real" errors, and besides, I used a build script that's designed to stop on errors.


Am I required to amend my tax return if I overpaid my taxes?

Long story short: I got a corrected 1099-DIV after filing my taxes. After going through the calculation, it appears that correcting the return would net me an extra $13 refund, i.e. I overpaid my Federal taxes by $13.  Apparently you can't efile an amended return, and frankly the hassle of printing new forms and mailing them isn't worth the $13 to me.  Is there any reason I shouldn't consider the extra $13 a gift to the government, ignore the corrected 1099-DIV, and not file an amended return?


String equality in \ifx conditional using output from concatenating macros

Please consider the following MWE - where I try to test for string equality between an parameter, and a test string prepared by a macro:  \documentclass{article}  \def\testStr#1{IOIO#1}  \newcommand{\doTest}[1]{% \edef\tmphwp{\testStr{XX}} % \typeout{=\tmphwp=#1=} % \ifx\tmphwp#1{% \typeout{~equal}% }\else{% \typeout{!not equal}% }\fi % \typeout{ ^^J } % newline in terminal stdout }  \begin{document}  \doTest{12}  \doTest{hello}  \doTest{IOIOXX}  \end{document}   Strangely, this seems to always determine strings are unequal - even if I enter specifically the right string - terminal log (from pdflatex) reports:   =IOIOXX=12= !not equal   =IOIOXX=hello= !not equal   =IOIOXX=IOIOXX= !not equal   Hmm ... I would have expected IOIOXX = IOIOXX ?!   Can anyone explain why am I not getting the expected results - and how to get the right comparison? Does this have maybe to do anything with catcodes?  Many thanks in advance for any answers, Cheers!


How do I compare the value of string array?

I have declared a string array and I want to compare with name given by user,  string[] MasterList = new string[] {   "Askay", "Puram", "Raman", "Srinivasa",   "Gopal", "Rajesh", "Anju", "Nagara", };  string YourName; Console.WriteLine("Enter your name: "); YourName = Console.ReadLine();  for(i=0; i<5; i++) {     a = String.Compare(MasterList[i], YourName);     Console.WriteLine("Your name is not among the list") }   The resulting output is not what I am expecting, any ideas how I can go about it?


Running Lucid (10.04) in virtualbox in 2020 - dependencies

Working from home during lockdown, I seem to need to use the Linux version of some proprietary software (Bruker OPUS). It's the only software that will read the proprietary file format. I don't have a Windows machine or an off-site licence, but the Linux binaries are a free download. The software was last updated nearly 10 years ago and  apparently doesn't run under 12.04 or later.  I've installed Lucid in a virtual machine.  While I can't get the guest extensions to install I can make ISOs to transfer stuff onto it. However OPUS needs libboost and probably other things (this seems to be one of several reasons it won't install on a newer OS) and the repository for Lucid no longer exists on archive.ubuntu.com/ubuntu/dists/.  So how can I satisfy dependencies for an OS so old the repositories aren't there any more?


Alternative way to split a list into groups of n

Let's say I have a list of arbitrary length, L:  L = list(range(1000))   What is the best way to split that list into groups of n?  This is the best structure that I have been able to come up with, and for some reason it does not feel like it is the best way of accomplishing the task:  n = 25 for i in range(0, len(L), n):     chunk = L[i:i+25]   Is there a built-in to do this I'm missing?  Edit: Early answers are reworking my for loop into a listcomp, which is not the idea; you're basically giving me my exact answer back in a different form.  I'm seeing if there's an alternate means to accomplish this, like a hypothetical .split on lists or something.  I also do use this as a generator in some code that I wrote last night:  def split_list(L, n):     assert type(L) is list, "L is not a list"     for i in range(0, len(L), n):         yield L[i:i+n]


For $f$ Riemann integrable prove $\lim_{n\to\infty} \int_0^1x^nf(x)dx=0.$

Suppose $f$ is a Riemann integrable function on $[0,1]$. Prove that $\lim_{n\to\infty} \int_0^1x^nf(x)dx=0.$   This is what I am thinking: Fix $n$. Then by Jensen's Inequality we have $$0\leq\left(\int_0^1x^nf(x)dx\right)^2 \leq \left(\int_0^1x^{2n}dx\right)\left(\int_0^1f^2(x)dx\right)=\left(\frac{1}{2n+1}\right)\left(\int_0^1f^2(x)dx\right).$$Thus, if $n\to\infty$ then $$0\leq \lim_{n\to \infty}\left(\int_0^1x^nf(x)dx\right)^2 \leq 0$$ and hence we get what we want. How correct (or incorrect) is this?


During execution the problem is giving stack overflow problem, but what is this! Runtime Error (NZEC)  Exception in thread main java.lang.StackOverflowError at sun.nio.cs.US_ASCII$Encoder.encodeArrayLoop(US_ASCII.java:198) at sun.nio.cs.US_ASCII$Encoder.encodeLoop(US_ASCII.java:231) at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:579) at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:271) at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125) at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207) at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:129) at java.io.PrintStream.write(PrintStream.java:526) at java.io.PrintStream.print(PrintStream.java:669) at Solution.solve(Solution.java:22) at Solution.solve(Solution.java:23) at Solution.solve(Solution.java:23) at Solution.solve(Solution.java:23) at Solution.solve(Solution.java:23) at Solution.solve(Solution.java:23) at Solution.solve(Solution.java:27) at Solution.solve(Solution.java:23) at Solution.solve(Solution.java:27) at Solution.solve(Solution.java:23)  import java.util.*; public class Solution {          public static void printIncreasingNumber(int n) {         /* Your class should be named Solution.          * Don't write main() function.         * Don't read input, it is passed as function argument.         * Print output as specified in the question         */         int k = 10;         int N = (int)Math.pow(10,n);//limit         solve((int)Math.pow(10,n-1),N);     }               static void solve(int j,int n){         if(j==n){             return;         }                  if(check(j)){             System.out.print(j+" ");             solve(j+1,n);         }         else{             j = increase(j,n);             solve(j,n);         }     }          static boolean check(int k){         ArrayList<Integer> arr = new ArrayList<>();         int temp = k;         while(temp>0){             arr.add(temp%10);             temp = temp/10;         }         boolean ans = true;         for(int i=0;i<arr.size()-1;i++){             if(arr.get(i)<=arr.get(i+1)){                 ans = false;                 return ans;             }         }         return ans;     }          static int increase(int j,int n){         int ans = 0;         for(int i = j;i<n;i++){             ArrayList<Integer> arr1 = new ArrayList<>();             int temp = i;             while(temp>0){                 arr1.add(temp%10);                 temp = temp/10;             }             int count = 0;             for(int i1=0;i1<arr1.size()-1;i1++){                 if(arr1.get(i1)<=arr1.get(i1+1)){                     count++;                 }             }             if(count==0){                 ans = i;                 break;             }         }         return ans;     } }  My main function is, import java.util.Scanner;   public class Main {      public static void main(String[] args) {         int a;         Scanner s = new Scanner(System.in);         a = s.nextInt();         Solution.printIncreasingNumber(a);     }  }


A Noetherian integral domain is a UFD iff $(f):(g)$ is principal

Let $R$ be a Noetherian integral domain. For $f, g \in R$, define $(f):(g)=\{h \in R \mid hg \in (f) \}$. Sow that $R$ is a UFD if and only if $(f):(g)$ is principal for all $f,g \in R$.   It is easy to show that $(f):(g)$ is an ideal. For the forward direction, I suspect that I need to use the fact that $R$ is Noetherian to show that $(f):(g)$ is principal. For the reverse direction, I know that if every $(f):(g)$ is principal then the ring $R$ is a PID. But I don't know how to proceed. Any ideas?


I am trying to find a formula which will search one cell for specific words.   I would like the outcome of the formula to be words I have selected.  The example of this I have is if one cell shows the list of ingredients, and the other cell shows a list of allergens. I need the formula to search the list of ingredients and choose the allergens.    I know that I could use the find function so that it came back with one result and then concatenate the results but there must be a more simple way!  Thanks


How to unlink a secondary non-system drive's "Users" folder shortcut?

I have a Windows 10 system SSD (C:) and a non-system HD (D:) in two partitions of the disk (total of 3). D used to be the old system drive before installing Windows 10 on the SSD, which may explain why it has this folder in the first place.   While trying to merge the two D: partitions using AOMEI partition assistant, I have encountered a problem with the Users folder. On closer inspection I can see a little shortcut icon for All Users folder on D: linking it to C:      How can I unlink the two? If I delete something from D:\users\All Users\Microsoft for example, which is the problematic folder that AOEMI cannot process, it will be deleted from the same location in C: since they are one and the same.  Any help will be appreciated!


I'm looking for information on my Uncle, Rudolf Neumann who served with the Waffen SS. He was killed on March 06 1942 in Russia


Let E = $\{x\in \mathbb{Q}: x>0$ and $x^2 <2\}$. Prove E does not have a largest element.

I'm pretty sure the way to go is with a contradiction, letting $x = \sup E$. Then I think I need to either show that $x < x^2\in E$ (contradicting $x = \sup E$ in that an element of E is greater than x) or show that $({x^2})^2 > 2$ (contradicting the terms of E). As I wrote this I realized showing $({x^2})^2 > 2$ would be redundant since that would only mean something if $x^2\in E$ in the first place... anyway, I'm not sure how to go about this proof.


Is there any relationship between 'invertible' and 'diagonalizable'?

I'am a linear algebra beginner and I am confusing with invertible and diagonalizable.  From my understanding, invertible means non-singular and any of eigenvalue must not be 0. Diagonalizable means there must be N linearly independent eigenvectors.(Eventhough eigenvalue has 0, it seems possible to have N linearly independent eigenvectors. Right?)  Above are just single fraction of their property, and I cannot imagine bigger picture than this.  Is there any intuitive relation or theorem between 'invertible' and 'diagonalizable'?


How to pass argument to script which is input to bash

Right now I have one-liner like this:  curl -fsSL http://git.io/vvZMn | bash   It is downloading script and passing it to bash as stdin file. I would like to run this script with additional argument print.  Maybe something like this?  curl -fsSL http://git.io/vvZMn | bash -- print   But this doesn't work.


How to send email from SQL Server to gmail

I am a beginner in SQL and ASP.NET, basically i'm creating a website in that there is a contact us page. In that there are four textbox (Name, Email Address,Subject & Your Message). What ever i type in the text box it stored in the table's database in SQL. So now how to send the data (which is present in table) to gmail account.


Adding Windows to GRUB list after resizing partitions

I had a dual boot on my PC with both Ubuntu and Windows 10. I had to extend my root partition since I was running out of space.   Here are the partitions before extending /root/    After expanding /root    I faced a GRUB failure and installed boot-repair through liveUSB by following , but GRUB is still not listing Windows.  The answers to these questions didn't help either:        Here is the result for sudo update-grub:  $ sudo update-grub Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.13.0-92-generic Found initrd image: /boot/initrd.img-3.13.0-92-generic Found linux image: /boot/vmlinuz-3.13.0-91-generic Found initrd image: /boot/initrd.img-3.13.0-91-generic Found linux image: /boot/vmlinuz-3.13.0-88-generic Found initrd image: /boot/initrd.img-3.13.0-88-generic Found linux image: /boot/vmlinuz-3.13.0-87-generic Found initrd image: /boot/initrd.img-3.13.0-87-generic Found linux image: /boot/vmlinuz-3.13.0-86-generic Found initrd image: /boot/initrd.img-3.13.0-86-generic Found linux image: /boot/vmlinuz-3.13.0-85-generic Found initrd image: /boot/initrd.img-3.13.0-85-generic Found linux image: /boot/vmlinuz-3.13.0-83-generic Found initrd image: /boot/initrd.img-3.13.0-83-generic Found linux image: /boot/vmlinuz-3.13.0-79-generic Found initrd image: /boot/initrd.img-3.13.0-79-generic Found linux image: /boot/vmlinuz-3.13.0-77-generic Found initrd image: /boot/initrd.img-3.13.0-77-generic Found linux image: /boot/vmlinuz-3.13.0-74-generic Found initrd image: /boot/initrd.img-3.13.0-74-generic Found linux image: /boot/vmlinuz-3.13.0-71-generic Found initrd image: /boot/initrd.img-3.13.0-71-generic Found linux image: /boot/vmlinuz-3.13.0-68-generic Found initrd image: /boot/initrd.img-3.13.0-68-generic Found linux image: /boot/vmlinuz-3.13.0-67-generic Found initrd image: /boot/initrd.img-3.13.0-67-generic Found linux image: /boot/vmlinuz-3.13.0-65-generic Found initrd image: /boot/initrd.img-3.13.0-65-generic Found linux image: /boot/vmlinuz-3.13.0-57-generic Found initrd image: /boot/initrd.img-3.13.0-57-generic Found linux image: /boot/vmlinuz-3.13.0-53-generic Found initrd image: /boot/initrd.img-3.13.0-53-generic Found linux image: /boot/vmlinuz-3.13.0-49-generic Found initrd image: /boot/initrd.img-3.13.0-49-generic Found linux image: /boot/vmlinuz-3.13.0-45-generic Found initrd image: /boot/initrd.img-3.13.0-45-generic Found linux image: /boot/vmlinuz-3.13.0-44-generic Found initrd image: /boot/initrd.img-3.13.0-44-generic Found linux image: /boot/vmlinuz-3.13.0-41-generic Found initrd image: /boot/initrd.img-3.13.0-41-generic Found linux image: /boot/vmlinuz-3.13.0-40-generic Found initrd image: /boot/initrd.img-3.13.0-40-generic Found linux image: /boot/vmlinuz-3.13.0-36-generic Found initrd image: /boot/initrd.img-3.13.0-36-generic Found linux image: /boot/vmlinuz-3.13.0-29-generic Found initrd image: /boot/initrd.img-3.13.0-29-generic Found linux image: /boot/vmlinuz-3.11.0-19-generic Found initrd image: /boot/initrd.img-3.11.0-19-generic Found linux image: /boot/vmlinuz-3.8.0-29-generic Found initrd image: /boot/initrd.img-3.8.0-29-generic Found linux image: /boot/vmlinuz-3.8.0-26-generic Found initrd image: /boot/initrd.img-3.8.0-26-generic Found linux image: /boot/vmlinuz-3.8.0-22-generic Found initrd image: /boot/initrd.img-3.8.0-22-generic Found linux image: /boot/vmlinuz-3.8.0-19-generic Found initrd image: /boot/initrd.img-3.8.0-19-generic Found linux image: /boot/vmlinuz-3.5.0-28-generic Found initrd image: /boot/initrd.img-3.5.0-28-generic Found memtest86+ image: /boot/memtest86+.elf Found memtest86+ image: /boot/memtest86+.bin done   What might be the way to add Windows to my GRUB?


I am using an image from a users’ manual of a piece of software, and I was wondering if I can put a citation in the caption of the image. For example:     Figure 1.3 Illustration of WonderSoft’s interface. Image taken from WonderSoft’s users’ manual (Bitsmith et al., 1821).


If $n$ is a positive integer such that the sum of all positive integers $a$ satisfying $1\leq a\leq n$ and $\gcd(a,n)=1$ is equal to $240n$ then the number of summands namely $\phi(n)$ is    120 124 240 480   My attempt:   If $n $= $p_1^{q_1}p_2^{q_2}...p_k^{q_k}$ where $p_1, p_2,...p_k$ are primes.  $240 n = \frac{n(n+1)}{2} - \frac{p_1^{q_1+1}-1}{p_1 -1}\frac{p_2^{q_2+1}-1}{p_2 -1}... \frac{p_k^{q_k+1}-1}{p_k -1}  +1 $  From here, I was not able to proceed. Guesswork tells me that the number has to be 480 because the sum is $240n$.


Automatically check "Allow comments" for custom post type

For a custom post type I have enabled support for comments via php and CPT.       'supports' => array(         'title',         'editor',         'revisions',         'comments',      )   But each post still has its "Allow comments" box in the discussion-field unchecked. I am now looking for a way to automatically check this box, as I have quite a big number posts of this custom post type and do not think, this can only be done manually.     However, I have other custom post types where I still want comments to be disabled. So I am looking for a way, to check all "enable comments" for one specific post type.


Disappointed to see that the 18.04 installer no longer offers the option to encrypt the home directory. According to  bug report referenced in the installer, the recommended method for encryption these days is full-disk with LUKS, or fscrypt for directories. Full-disk encryption seems a bit overkill for my needs, and all the bugs and caveats mentioned on the  don't make it a very attractive option. All I really want is to protect my home directory from someone accessing my documents, photos, etc. if my laptop were to get stolen, making fscrypt the option for me.  The  has some examples on how to set it up, but I can't find any documentation aimed at encrypting the home directory on Ubuntu. The old ecryptfs tool is still available, but after setting it up Ubuntu would sometimes freeze at the login screen.  So my question is: How do I setup fscrypt to encrypt my /home directory and decrypt when I log in? I also liked how ecryptfs allowed decrypting the folder manually (eg. from disk images).  (A similar question was posted  and was unfortunately closed for being an "off-topic" bug report. To clarify, this is not a bug report. The fact that the encrypt home directory option was removed from the installer was intentional. All I'm asking here is how to setup fscrypt.)


jquery event is not firing on appended elements even using .on()

I'm trying to replace the image when it encounters error on the initial src by using this... $(".thumbnails").on("error", function () {     if ($(this).attr("src") != "/assets/img/img-error.jpg") {         $(this).attr("src", "/assets/img/img-error.jpg");     } });  It's working fine on images that has been loaded during page load..however when I got images appended in a modal or popover it didn't trigger the function even though I'm using .on() delegation I also tried using this but it didn't do the function even on images during page load.. $(document).on("error", ".thumbnails", function () {     if ($(this).attr("src") != "/assets/img/img-error.jpg") {         $(this).attr("src", "/assets/img/img-error.jpg");     } });


How can the Hamilton-Jacobi equation represent the motion of a particle as a wave?

While it’s often said that the Schrödinger Equation cannot be derived and “came from the mind of Schrödinger”, a quick google search led me to Schrödinger’s original paper where he introduced the equation. In it, he appears to be describing having “derived” it from the Hamilton-Jacobi Equation. Wikipedia also tells me: “The HJE is also the only formulation of mechanics in which the motion of a particle can be represented as a wave.”  Reading through the paper, much of Schrödinger’s thought process is lost on me, so if anybody could explain it in perhaps a more easily digestible way that would be much appreciated. Looking at the equation as is, It’s not immediately obvious to me that it is a wave equation, especially one that could be reduced to the form of Schrödingers.


Story ID: centered around a (board) game

I originally read this story well over 20 years ago, in a collection that I can no longer recall any details of. The story in question centered in some way on a board game that I somehow recall having the impression is something like Go, except that it's played with bicolored pieces like Reversi. There was a passage about a game being played by a master, and the move that the master made was to play the piece as the opponent's color, thus showing his status as a grand master because he gave as his reason for doing so something to the effect of "I could not spoil that perfect pattern".  I do also recall that it was a galactic society, not strictly based on Earth. It was classed as SF rather than fantasy, and was by an author whose name I'd recognize, but can't recall at the moment.  What story am I thinking of, and is it available in an in-print form?


Rendering: Excluding a layer while keeping it's influence (Masking?)

I am making this Christmas Tree but the problem is that I can't render the whole scene in one go because of too many particles. So I have rendered my tree and now I want to render only tinsels wrapped around the tree but I want it as png with alpha so that I can add them together as layers. So how can I do this? Thanks.  Tree   Tinsel


boost regex_search - matching up to the first occurrence of a character

I'm looking for a solution that matches the first occurrence of a specific character, say a "<" sign:  This is my code:  std::string sRegex("a-color-price'.*\\$(.*?)<"); boost::regex regex(sRegex, boost::regex::icase); std::string sStr("$8.36
 $7.99 per month\" \"cartContent\":{\"html\":\"<div id='nav-cart-flyout' </sdd>"); boost::cmatch result; if (boost::regex_search(sStr.c_str(), result, regex)) {     std::string sResult(result[1].first, result[1].second); }   I expect sResult to be "8.36" and instead it contains this string: "7.99 per month" "cartContent":{"html":""   Appreciate your help.


how can I make my particle affects not glow?

I am making a scene with a particle effect system in it, and I am wondering how I can take away the glow from the object. It is really bright, and it is not intended to look like that. Thanks


How to improve edit for Suggested Edit of tag wiki?

When there is a  for tag wiki, I can only either Accept it or Reject it.  But what if there is only slight thing to improve which I want to suggest, so I don't want to either Accept it or Reject it or Skip it?  I can't see Improve Edit option which normally appear for regular posts.  Is this something to be implemented in the future? Or this works deliberately like that?


java.lang.NullPointerException when using .get("key") to check if a key exists in a JSON object

I want to check if the key (variable uuid) exists in a json object (variable response), as far as I know, JsonObject.get("key") should return the value if it exists, or null if it does not. Here is my code: URL url = new URL("The URL to send a request to"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET");                      StringBuilder response = new StringBuilder(); BufferedReader rd = new BufferedReader(new InputStreamReader(connection.getInputStream())); String line;  while ((line = rd.readLine()) != null) {      response.append(line); }                      JsonObject responseJson = new Gson().fromJson(response.toString(), JsonObject.class); JsonObject info = responseJson.get(uuid).getAsJsonObject();  // The code fails here  if (info != null) {  // If the key exists      // long code } else {      // Eclipse is giving me a warning that this here is dead code, I don't know why }  My IDE warns me about everything undes else {} being dead code, too. I don't know why I'm fairly new to Java (about a month). What am I doing wrong here? Edit: full list of my imports import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.util.Collections; import java.util.List;  import com.google.gson.Gson; import com.google.gson.JsonObject;```


I have multiple objects in my blender project, but the origin is faulty for all of them.  I would like the origin for each object to be at the center (geometry, or mass), but even if I select that for each of them, one by one, it does not appear to work.  It appears that my XYZ axis are at the cursor, rather than at the origin of the object. How do I change that?  (Feel free to edit question if unclear, incorrectly worded, or addressing something other than the origin point. I'd like my XYZ axis to be at the center of mess/geometry for each object automatically. This was originally so, but I did something to mess it up.)  Blend file:    UPDATE: It appears that, in addition to the "origin point" issue, my 3D cursor was set to "Bounding Box" rather than "Median Point". Thank you all!


Why does Excel not auto-update my equations anymore?

For some reason all of a sudden when I update cells in Excel, my equations are not being updated.  For example, I have a simple equation =SUM(C4:C16).  If I change any of the cells in C4-C16, the answer doesn't get updated...  I don't know what happened I've never seen this fail before.  Any ideas?


I need to make a dvd converted to a mp4 for my TV

I bought a DVD for my son but our DVD player is not reading it ; I think it is broken somehow. While my notebook can read DVD I want to make this animation DVD convert it mp4 or something else that can be played on TV so I can copy to my USB and play I don't want to share my notebook with my son :D  thanks


Can I cast Magic Initiate spells from another class using the Pact Magic feature?

If I have a Warlock who takes magic initiate in cleric and chooses cure wounds as the first level spell, could I use my Warlock spell slots to cast that spell as well as the 1/day casting of cure wounds? I know that Pact Magic can be used to cast spells using the Spellcasting class feature (PHB 164), so shouldn't you be able to use your Warlock slots to cast the magic initiate spell?


Why is it that high voltage is lethally dangerous compared to low voltage with the same amount of current? How does current behave with low voltage and with high voltage? I have read many similar Q & As on this site but none of them had accurate and to the point answers to my question.


Prove that the preimage of a prime ideal is also prime.

Let $f: R \rightarrow S$ be a ring homomorphism, with $R$ and $S$ commutative. If $P$ is a prime ideal of $S$, show that the preimage $f^{-1}(P)$ is a prime ideal of $R$.    Define $g: S \rightarrow S/P$ with kernel $s$. Let $h = g \circ f: R \rightarrow S/P$. Since $h$ is a ring homomorphism, the kernel is an ideal of $R$. Also, from the first isomorphism theorem, we know that $R/\ker(h) \cong S/P$. Since $P$ is a prime ideal of $S$, we know that $S/P$ is an integral domain. Since $R/\ker(h)$ is isomorphic to $S/P$, it must also be an integral domain, which implies that the kernel of $h$ (which is the preimage of $P$) is a prime ideal of $R$.  Do you think my answer is correct? The reason why I was a bit skeptical of my answer is because I did not use the fact that $R$ and $S$ are commutative. So I'm wondering if I missed something $\dots$  Thank you in advance.


How to hide a Tampermonkey code from script?

It is possible to share a tampermonkey script to someone but to hide the code from it and somehow to secure it. I just don't want not to be possible for anyone to copy/paste the script from there.


jQuery can't bind event to AJAX loaded element using .on()

Using .load, I'm loading the following content into #step_2 div: <div id="step_2">     Select a subcategory:     <select id="subcategory_id" name="subcategory_id">         <option value="0">All subcategories</option>         <option value="68">Cool</option>         <option value="15">Cooler</option>         <option value="74">Excellent</option>     </select> </div>  I'm then trying to detect when user selects something: $("#subcategory_id").on("change", function(){     alert( 'Success!' ); });  but with no success. Does anyone see what I'm doing wrong? Help greatly appreciated. NOTES: Here's the full CSS path as seen by FireBug: html.js body div#container div#main form div#step_2 select#subcategory_id  Here's the full Javascript file, if context matters: $(document).ready(function() {      $("#category_id").change(function() {         $("#spinner").show();         $("#step_2").load("process.php?selected=category", { value: $(this).val() }, function() {             // Do something to say the data has loaded sucessfully             $("#spinner").hide();         });     });                  $("#subcategory_id").on("change", function(){         alert( 'Success!' );     });      });


Can quantum entanglement provide a faster way of transfer of information than the speed of light?

Can quantum entanglement provide a faster way of transfer of information than the speed of light as it travells at a speed which is 10000 times faster than the speed of light


Renting a car in Ireland & Great Britain: 1 rental or 2?

My wife, two kids and I will be traveling in Ireland and the UK Nov. 1st through 21st. We're flying into and out of Dublin. Our plan is to do a clockwise tour: Fly into Dublin -> Belfast -> Scotland -> England/London -> Back to Dublin to fly home.  We've been planning to rent a car when we land in Dublin (doing just things outside Dublin at the start of the trip) and have a car all the way until London, then turn in the car and take a train/ferry to get back to Dublin before flying home.  However, reading through the car rental section of Rick Steve's 2012 Ireland book is causing us to question if this is the right plan.  He says (p. 480):     If your trip covers both Ireland and Great Britain, you're better off   with two separate car rentals, rather than paying for your car to ride   the ferry between the two islands. On an all-Ireland trip, you can   drive your rental car from the Republic of Ireland into Northern   Ireland, but be aware of drop-off charges ($75-150) if you return it   in the North.   So it seems like he recommends against doing one car rental for both islands, but he also recommends against renting in the Republic of Ireland and returning it in Northern Ireland (our other option for our current itinerary).  So we're not sure which is best here.  A few questions about this:   If we do one car rental all the way from Dublin to London, will there be a similar $75-$150 fee? Is there an easy place to return a car on the Northern Ireland side of one of the Northern Ireland -> Scotland ferries, and an easy place on the Scotland side to rent a car?  We'd like to minimize the number of buses/whatever we need to take between car rentals since we'll be lugging around car seats for both of our children (on top of carrying them and our luggage). Will one way be significantly cheaper than the other?  Besides the basic cost of taking the car on the ferry and the drop-off charges, our credit card will cover insurance in Scotland/England but not in Ireland, so we could potentially get a better rental rate by renting a second vehicle once we're on Great Britain. Although, I know you often get a better rate when keeping a car rental for longer, so that may negate any benefit from the credit card covering the insurance.


How to find out why electric usage has more than doubled?

Our home is 2700sqft 1 story. We have a swimming pool with a variable speed pump which barely runs and is on the lowest setting.  I also have a 40x60 workshop that has 100 amps coming off the house. I am only in the shop once or twice a week for probably no more than an hour each. We have radiant barrier in the attic. This month since it's been cooler we have barely used the electric heat and only turned the AC on maybe 3 times.   Our Kwh usage for the past year has been 5400kwhs up to 7898kwhs.   Our neighbor has almost the same size house and shop but he works in his shop daily for 6-10 hours each day. He doesn't use over 2000kwh per month.   My wife just told me about our $700 and up to $1300 electric bills.  This is ridiculous.  Thanks in advance for any info.


Is the total energy of the universe constant?

If total energy is conserved just transformed and never newly created, is there a sum of all energies that is constant? Why is it probably not that easy?


What punctuation should follow after a list introduced by a colon?

The whole department: John, Jeff, Jean, and the accountant [?] were thrown into jail.


In the video sequence editor, how do you incorporate a scene from another .blend file with a different aspect ratio than the current project?

I'm experimenting with the idea of making a "portfolio" animation that shows some simple scenes and adds text and screenshots of blender's UI so people can see how the animation was made.  The problem I'm having is I tried to incorporate the video from one of my animations by linking the scene into the blend file.  When I add the scene to the VSE, it shows up rendered using the aspect ratio of the VSE scene (16:9), not the aspect ratio of the original animation (1:1).    When I browse the properties of the linked scene I can see it is a 384x384 render.    I tried fiddling with "cropping" the strip, but you can't crop by a negative amount.  Size effects just resize the incorrect image.  I know I can work around this by rendering the second scene to files and adding those files as an image sequence, but I'd like to build this portfolio scene to render without needing those temporary files.


Given Windows 7 I want to tunnel all its network traffic through SSH, without manually tunnelling each port.  It's easy on Linux, but I couldn't find any hint on how to do this on Windows ): So, any hint on how this can be done on Windows 7?


Upgraded Windows 7 to Windows 10, Window Search service no longer starts

I recently upgraded Windows 7 to Windows 10. The biggest issue I have now is that the Windows Search service no longer works, making the Start menu mostly unusable.  If I go to Indexing Options in the control panel I see that Indexing is not running and the list of paths to index is empty.  Going to advanced options, the current index path is empty, and the new path is empty too. This is true even if I try to use the "New Index" button.  Using the troubleshooter won't help since the service doesn't start. If I try to manually start the "Windows Search" service, I get the error  "Error 3: Unable to find specified path" (this is the rough translation, the original message is in my language).  What can I do to find out which path/file is missing ? I tried to check with Process Monitor, but the only file (beside system libraries) the SearchIndexer.exe try to access seem to be c:\ProgramData\Microsoft\Search\Data\Application (everytime the service is started the whole folder c:\ProgramData\Microsoft\Search is deleted and recreated) and C:\Windows\System32\config\systemprofile (which exists).  Edit: all available updates are installed, and issuing      SFC /scannow   Doesn't reveal any issue


At what age or developmental milestones is it safe to leave children unattended?

I'm curious what kind of criteria others are using to decide when a child can be left at home unattended for a period of time.  I realize that the answer is going to depend on a few factors: The child's safety awareness and knowledge of what to do in a particular situation; their age; their maturity level; how long you intend to be gone; how far you're going; etc.  For a more concrete example: My daughter is 7-1/2, knows right from wrong, how to use a phone, our phone numbers, 911 (US emergency services number), not to answer the door unless we ask her to, not to mess with the stove, etc.  Is it conceivable that she's old enough to stay home alone for relatively short intervals?  We'd have to start with very short (5-10 minutes) intervals until both our and her confidence were built up, but I think she should be able to gain the confidence to be left home for longer than that.  I don't think she's old (or mature) enough to be left in charge of her younger siblings yet, but she could entertain herself and stay out of trouble.  Edit:  This is about children taking early steps towards independence at home.  I know that when I was a teenager, my parents left me at home alone while they went shopping (which can be an all-day event with my mother :-) ) or even spent a weekend away.  They trusted that both the house and I would be in one piece when they came home.  But those weren't my first times being left at home alone -- this question is about the first steps one takes towards that level of independence.  When is the right time to start?  What are you looking for in your children that makes you think: "They're ready to begin this particular journey?"


Is there a grayscale mode for the Samsung Galaxy S5 (and other Samsung phones) on Marshmallow?

The Marshmallow update for Samsung phones (mine is a Galaxy S5, but the Note series has the same problem) seems to have removed the ability to turn on grayscale mode when activating power saver mode.  Is there a way to re-enable this feature?


Why is cross product defined in the way that it is?

$\mathbf{a}\times \mathbf{b}$ follows the right hand rule? Why not left hand rule? Why is it $a b \sin (x)$ times the perpendicular vector?  Why is $\sin (x)$ used with the vectors but $\cos(x)$ is a scalar product?   So why is cross product defined in the way that it is? I am mainly interested in the right hand rule defintion too as it is out of reach?


Find exact confidence interval for uniform distribution

In my homework I have $X_1,...,X_n$ which are all uniformly distributed on $(0,\theta)$  I have concluded that the $MLE=\hat{\theta}=max(X_1,...,X_n)$ because:  $L_x(\theta)= \frac{1}{\theta^n}$ so the likelihood is a decreasing function. However we also know that $\theta > max(X_1,...,X_n)$, hence $\hat{\theta}=max(X_1,...,X_n)$   But I need to find an exact 95% confidence interval for $\theta$. I think the book wants me to find a pivot   I have tried to set $P(X \in (0,X_n))=(\frac{X_n}{\theta})^n$ for some $\theta>X_n$  Therefore $P(X \in (X_n,\theta))=1-(\frac{X_n}{\theta})^n=0.95$ which gives me  $\theta=\frac{X_n}{0.05^{1/n}}$  However I am pretty sure this is not the way to go and it is not a standard method. There should be some more standard method but using $L,\ell_X, \ell_X'=0$ just gives me MLE=0 which is of no use  Any help/hint would be appreciated


In a group $G$ where $\exists!$ nontrivial, proper subgroup, show that $G$ is cyclic and $\lvert G\rvert=p^2$, for $p$ prime.

Suppose that $G$ is a group that has exactly one nontrivial proper subgroup. Then we have to show that $G$ is cyclic and order of $G$ is $p^2$ where $p$ is prime.   I tried as, if $a$ and $b$ two element of $G$ of order $p$ and $q$ then $\langle a \rangle$ and $\langle b \rangle$ are two proper subgroups – a contradiction. Thus every element of $G$ have order some power of $p$. After this I am stuck. Thanks for help.


Does all visible light pass through the atmosphere?

Does absolutely all visible light pass through the atmosphere? Why or why not?  What lets some electromagnetic waves pass through and not others?


Why $(1-\zeta)$ unit where $\zeta$ is a primitive nth and n divisible by two primes

From Chapter VII of Lang's Algebra.  The question asks if $n\geq 6$ and $n$ is divisible by at least two primes, show that $1-\zeta$ is a unit in the ring $\mathbb{Z}[\zeta]$  I am having a hard time understanding why this is true. This is in the integral dependence chapter, but that has not given me any inspiration. I have also tried using cyclotonic polynomial to no avail  Thanks for any direction.


I've json response from server looks like that  {     "117":{        "09:00":5,      "10:00":5,      "11:00":5,      "12:00":5,      "13:00":5,      "14:00":5,      "15:00":5,      "16:00":5,      "17:00":5,      "18:00":5,      "19:00":5   } }   How I can bind this to normal select to looks like that  <select name="time" id="time">    <option value="5">09:00</option>    <option value="5">10:00</option>   <option value="5">11:00</option> </select>   Hours are not always the same, could be from 11:00 to 21:00.  Any idea how to display this in php or bind by jquery. Thank you for response


Is molecular oxygen (O₂) consumed in any process (in humans) other than acting as an electron acceptor for the ETC?

I know that molecular oxygen (O2) serves as the electron acceptor in Complex IV of the electron transport chain, which maintains the proton gradient that produces ATP for, as far as I know, every cell in the human body.  Is this the only reason we need molecular oxygen for life, or are there other vital functions (i.e. necessary for life) that molecular oxygen serves within the human body?  Edit  For clarification, there are probably well over a million oxygen-containing compounds, from water all the way up to the largest proteins, which perform repeatable roles in basically every system of the body. But in cases where oxygen is exhausted, specifically consumed requiring a continuous supply of new oxygen, what roles does oxygen serve with the exception of serving as electron acceptor in Complex IV of the electron transport chain?


Is a vial of Poison consumed by the first attack of such a weapon or I get the +1d4 Poison damage for each attack I do in one minute?  Poison, Basic. You can use the poison in this vial to coat one slashing or piercing weapon or up to three pieces of Ammunition. Applying the poison takes an action. A creature hit by the Poisoned weapon or Ammunition must make a DC 10 Constitution saving throw or take 1d4 poison damage. Once applied, the poison retains potency for 1 minute before drying. (PHB, p. 153)  Rule as written I would say it would last for the full minute, unless there is another part i missed where it states otherwise? Similarly, for Injury Poisons (DMG, p. 257), how long does the effect on the weapon last? (For example for Serpent Venom (Injury)).


Windows 7 to make all explorer views Detailed

Although I opened explorer, set it to detailed and from options clicked Apply to All Folders, some folders still show up in Large Icon mode. To my understanding those are folders with media files? How to prevent this behavior?


Please update the readme.txt in the Data Dump

In the  of the SE Data Dump found on  the contents of each site's 7-Zip file is documented.  The fact that the tags.xml is available isn't reflected in the readme.txt.  Please add the following before - **votes**.xml:      - **tags**.xml        - Id        - TagName        - Count        - ExcerptPostId - if an Excerpt is created        - WikiPostId - if an Wiki is created   I've also noticed that at least the PostHistoryTypeId field contain values that more closely match with what is described in  but I only verified that for the posthistory.xml of one site so I'm not 100% sure if I'm correct on that one.   Can the readme.txt be refreshed to depict the current expected content?


How to insert a variable in a js file from a html file using javascript?

I'm using the  templating engine for my website. I now have a variable ($username) which I can use in my regular html file with {$username}. This works fine.   I now want to use this same variable in a separate .js file which I load into the thml file using <script src="/js/MySeparateJsFile.js"></script>. I tried using {$username} in it, but that doesn't seem to work. So I thought of setting it from within the html file using Javascript, but I have no clue how I would be able to do that.  Does anybody know how I can insert a javascript variable from within an html file into the .js file methods? All tips are welcome!


I think my whetstone has smoothed over by constant use at work, is there a way to repair it or should I just go buy another?


Best output file format for 3D model to Unreal engine 4

I am creating models in Blender for a game in Unreal Engine 4.  What output file format is the best and I can use for this for commercial purposes?


Ring Homomorphism from $\mathbb{Z}$ to a Field $F$

I have so far shown that $\phi: \mathbb{Z} \to F$ is a unique ring homomorphism if $\phi(n)=n$ and that $ker(\phi) = (n) = \{nm|m \in \mathbb{Z}\}$ with $n = 0$ or $n=p$ with $p$ a prime number. ($n$ is called the characteristic of $F$).   Now, I have to show the following two points.    If $F$ has characteristic $p \gt 0$, $\phi$ induces an injective homomorphism $\mathbb{F}_{p} \hookrightarrow F$. ($\mathbb{F}_{p}$ is a subfield of $F$).  Let $F$ be a finite field with $q$ elements. Show that $q$ is a positive power of the characteristic $p$ of $F$.    I just really have no clue how to approach these problems and would appreciate a lot if help is given. I am also not even sure what $\hookrightarrow$ means. Can anybody help? Thanks.


Why `lower, upper = 0, N;` will make lower = 1 and upper = 0?

Today I'm reading 《C-Programming》, when I'm copying the code from the book of a fahr-celsius converting function. I saw codes like int lower, upper; lower = 0; upper = 300;  And I'm wondering If I can do int lower, upper; lower, upper = 0, 300  in C, just like in python and golang. So I did some experiment, I find if I did it, the file is compilable, but the result will be out of my expectation. Here is my code and output: # code  #include <stdio.h>  main() {     int lower, upper;     lower, upper = 0, 300;      printf("lower:%d\n", lower);     printf("upper:%d\n", upper); }   # output lower:1 upper:0  I found no matter what number I tried assign to upper(like 1, -5, 20), the output will be the same. What happened here?


iPhone 6s Authentication Required error will not go away

I recently updated my phone to version 10.1.1, and ever since I have gotten the attached error.  i enter my iTunes username and password and I still get the error.  I have tried restarting the phone as well.  How do i make this go away?  My carrier is Verizon


Locally(-)injective mapping--hyphenate or not?

Do I need to to hyphenate: "It is a locally-injective mapping." where I use locally injective as a term--a concept: "This mapping is locally injective." For example, it is defined in: [Weber14 "Locally Injective Parametrization with Arbitrary Fixed Boundaries"]   Adding some links regarding hyphenating the adverb 'well', which may be relevant: A Well-Known Problem: Hyphens With “Well” Words  Well-Hyphenated Compound Adjectives   "The elements of style" by Strunk and White says: "When two or more words are combined to form a compound adjective, a hyphen is usually required."  The wiki page is quite comprehensive and sounds convincing: