Should you say hour or hours in this type of sentence?

Being a non native speaker of English, this type of sentence always bites me:     It was a pleasant four hours journey from Nashik to Pune.   Should it be hour or hours?


How to get a list of decimals in python 3

No, this is not a duplicate and the link above is specifically what I was referring to as not the correct answer.  That link, and my post here specifically ask about producing a Decimal list.  But the "answer" produces a float list.  The correct answer is to use Decimal parameters with np.arange as in  `x_values = np.arange(Decimal(-2.0), Decimal(2.0), Decimal(0.1))  Thanks   I believe this may be answered elsewhere, but the answers I've found seem wrong.  I want a list of decimals (precision = 1 decimal place) from -2 to 2. -2, -1.9, -1.8 ... 1.8, 1.9, 2.0  When I do:  import numpy as np x_values = np.arange(-2,2,0.1) x_values   I get:  array([ -2.00000000e+00,  -1.90000000e+00,  -1.80000000e+00, ...   I tried:  from decimal import getcontext, Decimal  getcontext().prec = 2 x_values = [x for x in np.around(np.arange(-2, 2, .1), 2)] x_values2 = [Decimal(x) for x in x_values] x_values2   I get:  [Decimal('-2'),  Decimal('-1.899999999999999911182158029987476766109466552734375'),  Decimal('-1.8000000000000000444089209850062616169452667236328125'), ...   I'm running 3.6.3 in jupyter notebook.  Update:  I changed the ranges from 2 to 2.0.  This improved the result, but I still get a rounding error:  import numpy as np x_values = np.arange(-2.0, 2.0, 0.1) x_values   Which produces:  -2.00000000e+00,  -1.90000000e+00,  -1.80000000e+00, ...  1.00000000e-01,   1.77635684e-15,   1.00000000e-01, ...  1.80000000e+00,   1.90000000e+00   Note 1.77635684e-15 may be an incredibly small number, but it's NOT zero.  A test for zero will fail.  Therefore the output is wrong.  My response to the duplicate assertion.  As you can see by my results the answer at  does not produce the same results I'm seeing with a different range. Specifically floats are still being returned and not rounded and 1.77635684e-15 is not equal to zero.


Regaining Lost Spell Levels from Multiclassing

So, I'm creating an optimized Rogue-Druid combination for an extremely in-depth homebrew campaign. Normally I wouldn't use this kind of build, but there are flavor reasons for doing so. This is the lay-out I have currently (+2 Racial LA from Fey'ri fully bought off):  Druid 2 (Dragon Compendium Urban Druid variant -- 1st level only) / Rogue 1 (Wilderness Variant) / Planar Shepherd 10 / Face in the Dark 2 [Campaign homebrewed PrC -- 9/10 divine progression, 1st level no casting progression]  I'm using these items to help with the prereqs for classes:  Wild Shape Amulet [40,000 GP, Throat] (Faerun, 167): You can wild shape as if you were a druid of four levels greater, to a maximum of 20. A pair of +2 Deadly Precision Daggers (Complete Adventurer, 127)  As it stands I've traded away 2 levels of my druid progression. With the Natural Bond feat and Wild Shape Amulet I can handle the animal companion/wild shape progression, since those compensate for it. Please also note: The feat from Complete Scoundrel that combines Rogue/Druid levels is not allowed by the DM. My problem, however, lies in that I'm not fond of losing 2 levels of spell-caster classes.  So, to the root of my question: Is there any way (Items, Feats, etc) I can regain these two levels? This really applies to all multiclassing losses of caster levels. In all my research and reading I do not recall coming across anything that boosts actual Spell Casting, not just CL. Note: It must come from one of these sources:  Core: DMG I-II, PHb I-II, MM I-IV and the EPH Deities & Demigods Races of: The Wild, Stone, Destiny, Ebberon, Faerun & Dragon Complete: Adventurer, Arcana, Scoundrel, Mage, Divine, Champion, Warrior & Psionic Tome of: Battles & Magic Stormwrack Sandstorm Dragon Magic Magic Items Compendium Spell Compendium Draconomicon Drow of the Underdark Campaign Setting: Ebberon and the Forgotten Realms Fiend Folio Unearthed Arcana Libris Mortis Heroes of: Horror & Battle Fiendish Codex I & II Lords of Madness Book of: Exalted Deeds & Vile Darkness Dragon Compendium Miniatures Handbook


How to estimate the time of Fibonacci recursive algorithm for nth element?

How to estimate the time of completion of following algorithm for Nth Fibonacci element?  private static double fib(double nth){          if (nth <= 2) return 1;         else return fib(nth - 1) + fib(nth - 2);     }


Different citation order in text and bibliography using biblatex and latexmk

This is a follow up question to these two (similar story, just for latexmk):      I have the following MWE  \documentclass{article} \usepackage[ backend=biber, sortcites=true,   sorting=ynt,bibstyle=authoryear -comp,   citestyle=authoryear -comp ]{biblatex}  \bibliography{mybib} \begin{document}   \parencite{Sample:01,Sample:02}  \begin{refcontext}[sorting=nyt] \printbibliography \end{refcontext} \end{document}   and a bib file that looks like this    @Article{Sample:01,   title                    = {Some Title},   author                   = {Zhu, Zhang z.},   year                     = {1900},   pages                    = {1-2},   journal                  = {Really Cool Journal},}    @Article{Sample:02,   title                    = {Different Title},   author                   = {Abe, Alp A.},   year                     = {2000},   pages                    = {3-4},   journal                  = {Other Cool Journal},}   I am using Miktex and latexmk to compile this. I want that citations are sorted withing the text using ynt in the bibliography I want nyt. I follow @Moewe in the related question. When watching pdf updates while latexmk runs, I observe the following:   First run: no citations picked up Second run: intext citation order correct, no bibliography Third run: citations correct and bibliography correct Fourth run: in text citations sorted like the bibliography.   So in the end I end up with this result:    Why does the fourth run happen? Why is the option of refcontext applied globally rather than locally?


The anime Bleach has to do with soul reapers and stuff, but not actually Bleach. So, I'm not getting why it's called Bleach. Mind explaining, anyone?


Is rebel advancement determined by the distance between two beacons?

If two beacons are farther away from each other than others, does this greater travel 'distance' give the rebel fleet more 'advancement' than shorter distances?


I would like my site to display additional site links when preforming a Google Search..  How can this be achieved?


Which technique is used to measure huge astronomical distances which are in terms of billions of light years?

I know what a "light year" means. However, I am very curious to know about the technique through which scientists are able to calculate the distance of various astronomical bodies from earth which are situated so far that it takes even light a huge amount to travel from there. I just want to know how they calculate distance ???


Prove that a finite Boolean ring is isomorphic to $\mathbb Z_2\times \mathbb Z_2\times\cdots\times \mathbb Z_2$

If $R$ is a finite Boolean ring with $1\neq 0$ then prove that $R\cong \mathbb Z_2\times \mathbb Z_2\times \cdots\times \mathbb Z_2$.  How should I proceed? Please give some hints only.


Here's a little bit of a strange question: In class, my math teacher decided to let us take a break from the usual class to solve a mathematical puzzle:  \begin{align} i & = i \\ i^2 &= i^2 \\ \sqrt{-1} &= \sqrt{-1} \\ \sqrt{\frac{-1}{1}} &= \sqrt{\frac{1}{-1}} \\ \frac{\sqrt{-1}}{\sqrt{1}} &= \frac{\sqrt{1}}{\sqrt{-1}} \\ i &= \frac{1}{i} \end{align}  I assume that the transition from line 4 to 5 is wrong, but I don't see how :p.  Does anyone care to explain?


The position of a ladder leaning against a wall and touching a box under it

I was reading a newspaper and there was a little math riddle, I thought "how funny, that's gonna be easy, let's do it" and here am I...  The problem goes as follow : in a barn, there is a 1 meter cubic box against a wall and a 4 meter ladder is leaning against the wall, touching the box at its corner. Here is a picture :   So, the big triangle has a hypotenuse $FE$ of $4$, the square $ABDC$ has sides of length 1 and is basically "insquared" at the right angle, i.e. $D\in \overline{FE}$. The question is "what is the length of the biggest cathetus", here $AF$.  So far, no problem.  Now here are my solutions:   By Thales' intercept theorem, $\frac{FB}{FA}=\frac{BD}{AE}$, by hypothesis, $FB=FA-1$ and $BD=1$. Now by Pythagoras, $FA^2+AE^2=FE^2$; by hypothesis, $FE=4$, so we end up with a system of equations, letting $h=FA, d=AE$: $$ \begin{align} &\frac{h-1}{h}=\frac{1}{d} \\ &h^2+d^2=4^2  \end{align} $$ Which solves (removing 3 non-relevant solutions) into $d \cong 1.3622$ and $h \cong 3.76091$. Now, if I consider the "function" of the line : $f(x)=\frac{-h}{d}x+h$, I know that $f(1)=1$ and I end up with Pythagoras with the system :$$ \begin{align} &\frac{-h}{d}+h=1 \\ &h^2+d^2=4^2  \end{align} $$ it solves again into the same, again removing 3 non-relevant solutions   Okay, this means that using Pythagoras is no good since it ends up giving a quartic equation (4 answers of which 3 are "non-relevant").    Now if I consider the length of the arc $f(x)$ between $0$ and $d$ it has to be $4$ and again $f(1)=1$ I end up with the system: $$ \begin{align} &\frac{-h}{d}+h=1 \\ &\int_0^d \sqrt{1+(f'(x))^2} dx =\int_0^d \sqrt{1+\left(\frac{-h}{d}\right)^2} dx = d \sqrt{1+\left(\frac{-h}{d}\right)^2}   \end{align} $$ Which solves again into the same answers, but this time removing only 2 non-relevant solutions (i.e. it gives a cubic equation instead of a quartic).   I tried also using the areas and the smaller trangles $FAD$ and $AED$ for example : $\frac{h \cdot d}{2} = \frac{h\cdot 1}{2}+\frac{d\cdot 1}{2}$  Yet I wasn't able to get to any "hand solvable" solution : if I were able to bring it down to some quadratic equation, that would be nice, since it is a common assumption, here, that everybody has seen the "general formula for solving quadratic equations" in school and so would be able to solve this, I may then see how it is seen as a funny riddle in the newspaper.   My best trial, with "just" a cubic equation, is way too complicated for the normal readers of this newspaper, so it's bugging me.  What am I missing? Some basic properties maybe? It's really bugging me, not being able to solve this without Wolfram.


How to make a footnote text similar to the one made by this author:     I tried using \footnotetext[]{text} but I get the number 0 before the text. Any ideas?   PS. I just want to write the AMS Subject Classification and the Keywords, not the note mentioned above that text.


How to duplicate a function which returns const reference by a function which returns non-const reference?

Here is my code snippet:  inline uint8_t &AT(uint16_t addr) { // non-const version     return (addr < 0x2000 ? Ram[addr & 0x7ff]:        \     addr < 0x4000 ? PPURegister[(addr - 0x2000) & 0x7]: \     addr < 0x4020 ? APUIORegister[(addr - 0x4000)]:     \     addr < 0x6000 ? ExpansionRom[addr - 0x4020]:        \     addr < 0x8000 ? SRam[addr - 0x6000]:                \     addr < 0xc000 ? LowerPRGRom[addr - 0x8000]:         \     UpperPRGRom[addr - 0xc000]); }  inline const uint8_t &AT(uint16_t addr) const { // const version     return AT(addr); // Function `AT` will recurses infinitely! But I don't want to copy the body of non-const function here. }   There are functions uses it:  uint8_t &operator[](uint16_t addr) { return AT(addr); } const uint8_t &operator[](uint16_t addr) const { return AT(addr); }   so, how to implement the function which returns const simply and clearly?


addEventListener to child node of a mutationsList

Using the MutationObserver API, I'm trying to attach events to specific elements when they are loaded into the DOM. Code snippet based on the sample on the :  var targetNode = document.getElementById("myDiv");  // Callback function to execute when mutations are observed var callback = function(mutationsList) {     for(var mutation of mutationsList) {         mutation.addedNodes.forEach(function(currentValue, currentIndex, listObj) {              if (currentValue.querySelectorAll(".questions").length > 0) {                 //we added the questions                 var elements = document.querySelectorAll(".myList, .ofElements");                 //elements is empty here. After the callback fires,                  //I can query again and find the elements                  elements.forEach(function() {                     this.addEventListener("click", function() {alert(this.name + "=" + this.value)});                 });             }         });                 } };  // Create an observer instance linked to the callback function var observer = new MutationObserver(callback);  // Start observing the target node for configured mutations observer.observe(targetNode, { attributes: false, childList: true });   It's matching .questions when it gets added as a child node to the DOM, but at this point it's not able to find the inputs.   Am I misunderstanding how this works? Or is it possible that the code which adds .myList, .ofElements (I cannot modify the source code) is doing something that interferes?


This post is in reference to the following blog post:   To start off, a quick introduction of myself; my name is Jascha Drel, Product Manager for Advertising at Stack Overflow. In this role, I am part of ’s organization.   Our team is continuously making improvements to the ads experience on our sites. One of the changes we’re excited about sharing is the new Report this Ad feature now available on some of our sites. We want to continue to give our communities more native control over their ad experience. We needed a quantifiable way to receive feedback and this feature will allow that.  We enforce strict  on the types of advertisers we work with but cannot fully control what is shown due to how advertising delivery works. However, being able to hear from our users about problematic ads will be a huge benefit as we can address those problems faster and with more accuracy. The Report this Ad feature will allow us to quickly see and investigate ads reported by you which matters to us because we want to hear your thoughts.  Furthermore, this new feature ensures that the members of our communities have a built-in way to report ads they consider problematic when we test any new ad formats/solutions.  We are launching this feature on 5 sites initially (, , , , and ) to get a good understanding of what we can expect in terms of numbers of reports whenever launching this to the entire network. Prior to launching it network-wide, we’ll share general results we’ve seen here.  What happens once an ad is reported?  All reports will be consolidated into a dashboard that the team will look at several times per week to spot irregularities in terms of the total number of reports, report categories, and on an advertising campaign basis. We will not be replying to individual reports, but we will reach out to our advertisers, to share feedback or notify them if the ad being reported does not fit our guidelines. We may also evaluate our policies in response to large numbers of reports not covered by them. Since we don’t have a baseline for the number of ads that are going to be reported using this new feature, we will consider reevaluating the process if the current process doesn’t scale.    We’d like to share an update on the progress of this feature:   We've launched this feature on 5 SE sites (Server Fault, Database Administrators, Arqade, Game Development, and Unix & Linux) initially for logged in users only, and for anonymous users afterward. The report this ad button was shown several million times (of which roughly 65% paid ads and 35% house ads). We showed several dozens of different ad campaigns. So far we have received 0 reports. We've tested the feature several ways, found some minor bugs (which have been/are being fixed), however, in the vast majority of the scenarios the feature works well (we’re happy to be ).   We’re currently graduating this feature and are releasing it network-wide this week. Feel free to comment below if you have any questions/comments.


Is an improvised weapon attack using a magic item considered a magical attack?

Stemming from , there seems to be ambiguity if a magic item being used for an improvised attack is a magical attack. The PHB describes an improvised weapon as:  Sometimes characters don’t have their Weapons and have to Attack with whatever is at hand. An Improvised Weapon includes any object you can wield in one or two hands, such as broken glass, a table leg, a frying pan, a wagon wheel, or a dead Goblin. Often, an Improvised Weapon is similar to an actual weapon and can be treated as such. For example, a table leg is akin to a club. At the GM’s option, a character proficient with a weapon can use a similar object as if it were that weapon and use his or her Proficiency Bonus.  Is the improvised weapon attack with a magic item considered a "magical improvised weapon" if it doesn't fall into the second descriptor of being "similar to an actual weapon"? Some similar, but not exactly the same, questions have been asked, such as .


How do I export multiple separate objects in an obj file?


RSA: Is possible get p and q from this d and n?


What is the grammar behind "Thanks be to God"?

What is the grammatical interpretation of the phrase?  I don't understand what verb tense or voice is used.


I changed my passcoad and I choosed off passcoad and then close my iph.


How to solve $\mathop{dX_{t}} = \alpha X_{t} \mathop{dt} + \beta \mathop{dW_{t}}$ holds, where $X_{0} = x?$

I'm learning about stochastic processes, and I want to solve   $$\mathop{dX_{t}} = \alpha X_{t} \mathop{dt} + \beta \mathop{dW_{t}}$$  where $X_{0} = x$.   I think that the solution uses Ito's Lemma; however, I am not too sure about how to get the answer. I also recognize this to be the Ornstein-Uhlenbeck process, and I think that the solution will be a diffusion process.   I would really appreciate some help.


Validation: Data splitting into training vs. test datasets

I was naively validating my binomial logit models by testing on a test dataset. I had randomly divided the available data (~2000 rows) into training (~1500) and validation (~500) datasets.   I now read a post in another thread ( Frank Harrell) that causes me to question my approach:     Data splitting is not very reliable unless you have more than 15,000   observations. In other words, if you split the data again, accuracy   indexes will vary too much from what you obtained with the first   split.   How serious is this worry and what are ways around it? The OP speaks of "resampling" but not sure how that works here for validation.   Edit: Adding context as per @Bernhard's comment below:


How to I re-activate "history" on firefox?T

The "history" dropdown has quit working, as have "File", "Edit", and the rest at the top of the firefox toolbar.  How do I get these restarted?


Object set on a visualforce page to repeat up to 5 times. Why doesn't my object appear?

I can't seem to call the objects out on the database and onto a visualforce page using this set up:   public with sharing class HarborEventController {  private final Event__c event; public HarborEventController(ApexPages.StandardController controller) {     this.eventlist = (Event__c)controller.getRecord(); }   public Integer eventcount{get;set;} public HarborEventController (){    eventcount = [SELECT COUNT() FROM Event__c];     }   public list<Event__c> mainlist {get;set;}   public list<Event__c> displayevents(){     mainlist = new list<Event__c>();     String mainsoql = 'SELECT Id, Name__C, Message__c, Display_Date__c, FROM Event__c';      mainsoql += 'ORDER BY Display_date__c LIMIT :5';     mainlist = Database.query(mainsoql);     return mainlist; }   and the visualforce page :           <apex:composition template="eh_base">           <apex:define name="heros-content">             </apex:define>       <apex:define name="content">

       <apex:outputPanel layout="block" rendered="{!AND(NOT(ISNULL(mainlist)),mainlist.size>0)}">         <apex:form id="blockofeventtorepeat">             <apex:repeat value="{!mainlist}" var="evententry" id="repeat">

<apex:outputLink styleClass="evententry-header block" value="{!$Page.eh_eventdetails}?id={!evententry.id}">{!evententry.Name__c}</apex:outputLink>
                     <apex:outputPanel >
                                                   {!evententry.Message__c}
                        <apex:outputLink styleclass="btn btn-sm btn-default" value="{!$Page.eh_eventdetails}?id={!evententry.id}">Read More</apex:outputLink>                      </apex:outputPanel>
                 </apex:repeat>                 </apex:form>                 </apex:outputPanel>

           </apex:define> </apex:composition>     Can anyone suggest how I can able to get the event data from the query and display it on a visualforce page in a repeat tag? I've tried everything and it doesn't work.  I've already tried passing the query from an anonymous user and the results were as expected


Can anyone help me with this do Carmo question?

(Geodesic frame). Let $M$ be a Riemannian manifold of dimension $n$ and let $p \in M$. Show that there exists a neighborhood  $U \subset M$ of $p$ and $n$ vector fields $E_1,...,E_n \in X(U)$, orthonormal at each point of $U$, such that, at $p$, $\nabla_{E_i}E_j(p) = 0$.  Such a family $E_i, i = 1,..., n,$ of vector fields is called a (local)  geodesic frame at p.   Question: I don't know how I can to prove the step: $\nabla_{E_i}E_j(p)=0$.   I am using $\exp(te_i)$ as a geodesic for this.


My servlet is supposed to redirect me to a welcome.jsp page if the authentification succeed and to a fail.jsp if not.  user = request.getParameter("name"); pass = request.getParameter("pass"); String q = "select * from users where user=" + user         + " and  password=" + pass + ""; Statement st = con.createStatement(); ResultSet rs = st.executeQuery(q); String username = null; String password = null;  while (rs.next()) {     username = rs.getString(2);     password = rs.getString(3);  } if (username.equals(user) && password.equals(pass)) { // <-- Here is line 56     response.sendRedirect("Welcome.jsp");  } else {     response.sendRedirect("Fail.jsp"); }   .      Avertissement:   StandardWrapperValve[LoginServlet]:Servlet.service() for servlet LoginServlet threw exception                java.lang.NullPointerException                at com.DemoLogin.LoginServlet.service(LoginServlet.java:56)         at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)         at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)         at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)         at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)         at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)         at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)         at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)         at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)         at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)         at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)         at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)         at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)         at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)         at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)         at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)         at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)         at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)         at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)         at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)         at  org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)         at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)         at java.lang.Thread.run(Thread.java:745)


Windows OS has fatal error and I need to install ubuntu instead

I am new in ubuntu so a step by step guide will be highly appreciated. My windows OS laptop crashed with fatal error, it won't even go past the boot. I need a way to install a new OS (hence ubuntu) and to restore whatever I have on my hard drive C:/


how to Redirect the list of all the users and their login date/time that are currently logged in into “data.txt” and display 1st and 10th line from data.txt


Why did Voldemort take the wand of one of his most loyal servants?

In Harry Potter and the Deathly Hallows, chapter one The Dark Lord Ascending, Voldemort believes he must use a wand other than his own in order to kill Harry, when Harry is moved from Privet Drive. He demands Lucius Malfoy's wand, and gets it.   My question is, why did Voldemort take the wand of one of his most loyal servants, rendering Lucius Malfoy useless if a battle was to occur?  If I remember correctly, he had Ollivander at his disposal, and he was the one who told him to use another wand in first place. Why not ask Ollivander to create another wand, or just use ones that he had ready to sell in his shop at Diagon Alley? He could even have taken Ollivander's own wand. If my memories are correct, a wand's importance was compared to that of a limb.


What do the fields in ls -al output mean?

The ls -al command shows the following output;  -rwxrw-r--    10    root   root 2048    Jan 13 07:11 afile.exe   What are all the fields in the preceding display?


Is there a program like Fedy but for Ubuntu?

is a program that has tweaks and programs that are otherwise proprietary, and you can install them with one click.


Prevent line-breaking inside acronym which contains a hyphen ("dash") character

How can I prevent line-breaking of an acronym which contains a hyphen? I have the acronym "AP-CMOS" all over my document, and it's been broken in several places into "AP-" and "CMOS". The same occurs with the compound "1\textsuperscript{st}-order". I tried using \hyphenation without any luck. Thanks, Jorge.


Articles a/the in the captions of photos or title of the books/movies

It is not really clear for me how should I translate captions for photos. For example, I made photo of bear and the caption should be "A Bear" or "The Bear" or just "Bear"? The same thing for "Autumn","Duck Family", "Regatta","Blossom", Spring Snow, Reflection, Old Lion, Morning Alley etc. I know the general rule how to choose a/the articles when they used in conversation or any other text. But in caption/title it is little bit different and confusing. The caption or title in most cases describes something new for a reader, and as consequence, you cannot use THE, so it must be the A article. But for example name of the movie "The Omen". Why it is THE there? I didn't see the movie, so as I reader, I don't know what about this movie. So logically it should be "An Omen". the same thing for "The Terminator" for example. Also when you look at the photo, you already see and understand what is about. So title of photo can have THE. THE BEAR - means THAT BEAR, on the photo, not any other bear. Am I right? Thank you in advance for your help.


How to reach local computer via machine name instead of IP?

Developer here prototyping a mobile app, somewhat new to mobile:   I have a simple HTTP service running (currently) on my main laptop with machine name latitude. Another laptop named vaio sharing the same WiFi network can access that service via http://latitude:8080 -- in other words, it can easily resolve the (current) IP 192.168.x.y (or whatever dynamic IP it has at that moment) of latitude somehow. Now my HTC Android phones, connected to the same WiFi network, can reach the IP address of latitude so opening in its browser http://192.168.x.y:8080 works. But I'd like to use the machine name here, too, like when I access the HTTP service from vaio, simply by typing http://latitude:8080 and have the phone resolve the current dynamic IP of latitude. This doesn't work, only get the standard browser error page: "Webpage not available".   Is there some DNS setting in Android I need to tweak? Haven't found anything from playing around with Settings, and a question like this is notoriously hard to google, too...  The One V has Android 4.0, and the One M7 has Android 4.2 in case that makes a difference.  (Note, this should work even when the Android is not USB-connected to my computers and is not acting as a WiFi Hotspot -- obviously, since it's consuming my main WiFi network anyway).


Recursive sequence of square roots of previous elements

Bruckner, Bruckner, Thompson - Elementary Real Analysis  $a_1 = 1$ and $a_{n+1} = \sqrt{a_1+ a_2 + .. + a_n}$   Show that $$\lim_{n \to \infty}\ \frac{a_n}{n} = \frac12$$  I cannot untangle the square root of the sum, to show that it 'converges' to $\frac{n}2$. Any help much appreciated.


A hard question on surjective group homomorphism

Say $G$ and $H$ are finite groups, and there exists a surjective group homomorphism from $G × G$ to $H × H$. Must there exist a surjective group homomorphism from $G$ to $H$? I have no idea how to do this. Help please


Download demo excel sheet form static resource

I have uploaded an excel sheet into static resource of my environment. I have it as a demo for my product how to create a excel sheet for import records into sf. Can any body guide me how can i provide link on the VF page so that user can download the record at single click.I want to into a managed package and want users to be able to click the link on the Vf page to download. Right now i have my demo excel sheet in static resource. I am open if you have any other ideas to get the process done.


Clean upgrade 16.04 (32 bit) to 64 bit Ubuntu

I would like to upgrade Ubuntu from the 32 bit version to the 64 bit version in the quickest and easiest way possible. Ideally I would like to do this from within Ubuntu if possible. I do not mind wiping the computer and losing all data. Any help appreciated.


How can i show that two $R$-modules of finite rank are isomorphic if and only if they have the same rank, i.e., $R^n \cong R^m$ iff $n=m$.


How to change the order of a custom function added in the dropdown menu in the header region in 2.81 with python

The duplicate post doesn't address the items in the dropdown. Only the bpy.types. The dropdown isn't part of that.  I'm have added a custom function to the face dropdown in the header region when in Edit mode. by appending to bpy.types.VIEW3D_MT_edit_mesh_faces  How do I change the order of my function in the dropdown list?    what it looks like now:   what I want to see happen (doctored image):   The script so far:  bl_info = {     "name": "Custom Algo",     "blender": (2, 80, 0),     "category": "Face", }  import bpy  class CustomAlgo(bpy.types.Operator):     """Custom Algo"""     bl_idname = "face.Custom_algo"     bl_label = "Custom Algo"      def execute(self, context):         print("Pretend that you have done something sticky with that face")         return {'FINISHED'}   def menu_func(self, context):     self.layout.operator(CustomAlgo.bl_idname)  def register():     bpy.utils.register_class(CustomAlgo)     bpy.types.VIEW3D_MT_edit_mesh_faces.append(menu_func)  def unregister():     bpy.utils.unregister_class(CustomAlgo)     bpy.types.VIEW3D_MT_edit_mesh_faces.remove(menu_func)  if __name__ == "__main__":     register()


I answered this question  and noticed the user has set a bounty once again. If no better answer is presented can I get a bounty twice? Is there a difference between the user awarding a bounty to an answer that already received one, and the auto-awarding of the bounty? oh and kittens


SharePoint People.aspx Page is Visible for All Users

The SharePoint People.aspx page is visible for all users by default. Is there any way to restrict this page from certain readers?


Multilingual and SEO URLs - best practice?

What would you recommend as a URL structure for setting up a multilingual site when optimizing for SEO?  I'm thinking:  www.yoursite.com/en/some-category/some-article/ www.yoursite.com/sv/en-kategori/en-artikel/ (Swedish)   Or would you prefer creating a subdomain (i.e. sv.yoursite.com) or similar instead?  From what I know it seems easier integrating a /language/ directory when in combination with .htaccess.


I have a tree structure such as:  def __init__(self, parent=None, key=None, nodes=[]):     self.parent = parent    # TrieNode value     self.key = key          # char/string value     self.nodes = nodes      # [TrieNode, TrieNode, ....]   Now, I want to get the specific node's children...  I want to yield them one by one in a recursive way...  my code is   def mychildren(self):     for node in self.nodes:         yield node         node.mychildren()   is that correct .... ?  when i write the unit test as   rootnode = TrieNode(None, '') anode = TrieNode(rootnode,'a') bnode = TrieNode(rootnode,'b') rootnode.setchildren([anode, bnode])  acnode = TrieNode(anode, 'c') anode.setchildren([acnode])  for i in rootnode.mychildren():     print i.key   I found I could only get A and B nodes. I could NOT get the acnode which is child node of A node


I recently switched to linux full time from windows and while I was trying to update my npm package using n, I got the new binaries in /usr/local/bin and previous version was in /usr/bin. So, it was always picking the previous version.  As per recommendation by a fellow user, I used hash-r command and it worked. But, I don't know what it did.   It would be very helpful if someone could explain its internals to me.


Lower Bound of Central Binomial Coefficients

I would like to prove by induction the following inequality:  $\frac{4^n}{n+1} < \binom{2n}{n}$, for all natural numbers n > 1.  Any hints?


Why is it that when I add 2 double values it adds some very small value?

So I am currently trying to finish my function plotter programm. However, when I add the Variable X + 0,01 which is the value i am using for the next point on the curve there is a problem . For some reason when i add X + 0.01 3 times there is also a very small value added. Its like this: X = -0.7000000000000001. This only happens when I am setting the window size to include negative numbers. I dont know why this is happening, but it causes problems with my parser, therefore i need a fix.  All the coordinates are stored in a dynamic list. Here is the Line of code: //This function should set all the coordinates public void setzteFunktion(){      double X = windowsize1;      while (X <= windowsize2) {        String term = function;       int i = 0;       while (i < term.length()) {          if (term.charAt(i) == variable) {           term = setVariable(term, X, i);         } // end of if              i += 1;       } // end of while         //the class termauswerter is a class which has a parser and evaluates the expression given       termauswerter.setzteTerm(term);       double Y = termauswerter.werteAus();         //Koordinate is a class which only stores x and y values       Koordinate hilf = new Koordinate(X, Y);       Kurve.append(hilf);         //schirtt is a constant which is equal to 0.1       X += schritt;        } // end of while     } //This sets the variable as a value at a given point public String setzteVariable(String term, double X, int stelle) {     String erg = "";      int i = 0;     int laenge = term.length();     while (i < laenge) {        if (i != stelle) {         erg = erg + String.valueOf(term.charAt(i));       } else {         erg = erg + String.valueOf(X);         } // end of if-else       i += 1;       } // end of while       return erg;   }  I should also say that i am relatively new to coding and would really appreciate any kind of help :). Thank you guys!(also sorry if my english is not the best)


WP auto-updates - no more email notification

I would love to block sending the notification email about new automatic update of wordpress (but I need to keep other emails working). Any ideas how to do that? I'm webmaster for more than 40 pages and that makes me crazy...  I've used following code in wp-config.php file, but it seems to be not working.  /** auto updates email **/ apply_filters( 'auto_core_update_send_email', false, $type, $core_update, $result );   Thanks a lot for your answer.


How can I find Dogmeat after I've made him stay in Fallout 4?

I told Dogmeat to stay outside this raider building because even though he has armor I don't want him to die. After I came out I searched the area and I couldn't find him. I think if he's told to stay somewhere he won't show up when you fast travel and I tried one post that said to hit ~ and then type prid0001d162 and then hit enter and then type moveto player and then hit ~ again to leave. But when I first typed in prid0001d162 and hit enter it said "Script command prid0001d162" not found." What do I do?


Method won't save variable. Instead just printing out as 'null'

I'm pretty new to Java, so forgive me if this seems like a dumb question.   I have 3 classes, one of the being the main class.  Class 1 - class accounts. Just contains empty variables/objects  String firstName; int age;     Class 2 - class random. Contains an array of many names, and contains methods to randomly pick a name and to randomly pick an age:  String Names[] = {"Sophia", .....,  "Sasha", "James"}; // About a 100 names  public void nameRandom(String name) {     name = Names[rand.nextInt(Names.length)]; } public void ageRandom(int age){         age = rand.nextInt(64)+19; }     Finally, Class 3, the main class ('howManyAccounts' is an integer that is obtained through scanner):  Account[] accounts = new Account[howManyAccounts];   for (int i = 0; i < accounts.length; i++){               accounts[i] = new Account();                 random.nameRandom(accounts[i].firstName);     random.ageRandom(accounts[i].age);           }  System.out.println("NAME" + "          " + "AGE"); System.out.println("");  for (int x = 0; x < accounts.length; x++){           System.out.println(accounts[x].firstName + "          " + accounts[x].age); }


\printglossary does not produce any content

I am having some trouble using glossaries in LateX (TeXnicCenter) and hope someone could give me some advice. I am using the package \usepackage[toc, acronym, section=section]{glossaries} to get a glossary for acronyms. I definded some acronyms e.g.   \newacronym{Bitkom}{Bitkom} {Bundesverband Informationswirtschaft, Telekommunikation und neue Medien e.V.}   and if I am using \gls{Bitkom} at first it displays the whole text, at second it only displays Bitkom.    So everything is alright except the   \printglossary[type=\acronymtype,title=Abkürzungsverzeichnis,style=long]   command, it doesn`t display anything, but I want it to print all used acronyms.   Could someone help me solving this problem please?  \usepackage[toc, acronym, section=section]{glossaries} ... \newacronym{Bitkom}{Bitkom} {Bundesverband Informationswirtschaft, Telekommunikation und neue Medien e.V.} ... \makeglossaries ... \printglossary[type=\acronymtype,title=Abkürzungsverzeichnis,style=long]


Find the distribution of sum and product of standard normal random variables

Let $X,Y$ and $Z$ be three independent real valued random variables. All with finite second moment and all with mean $0$ and variance $1$. Define $$     W= \frac{X+YZ}{\sqrt{1+Z^2}} $$  Find the distribution of $W$ under the additional assumption that $X,Y$ and $Z$ all have a marginal $\mathcal{N}(0,1)$-distribution  Hint: Compute $P(W \le w )$ by Tonellie, integrating out of the joint distribution of $(X,Y)$ first.   I believe that $P(W \le w )$ can be written as  \begin{align} P(W \le w )&=P\left(\frac{X+YZ}{\sqrt{1+Z^2}}\le w\right)\\ & =P(X+YZ \le w\sqrt{1+Z^2})\\ & =P(X \le w\sqrt{1+Z^2})+P(Y\le w\sqrt{1+Z^2})P(Z \le w\sqrt{1+Z^2}) \end{align} But I am not totally sure. Further I do not know how to proceed from here.


I have a list 'd8' which has 3 items  >>> d8[0] {u'lix_edu_dev_override': u'control', u'fmt__school_highlight': u'Indian Institute of Social Welfare &amp; Business Administration, Kolkata', u'degree': u'Master of Business Administration (MBA)', u'i18n__detailed_school_page': u'More details for this school', u'lix_treasury_upload': u'B', u'fosList': [{u'link__fos_pivot': u'/search?search=&keywords=Marketing&sortCriteria=R&keepFacets=true&trk=prof-edu-field_of_study', u'fmt__fos_highlight': u'Marketing', u'name': u'Marketing', u'i18n__find_others': u'Find users with this keyword'}], u'enddate_iso': u'1993', u'fieldOfStudy': u'Marketing', u'link__peer_tracker_pivot_with_name': u'/college/?eduSchool=Indian+Institute+of+Social+Welfare+%26+Business+Administration%2C+Kolkata&trk=prof-edu-school-name', u'educationId': 134727074, u'fmt__degree_highlight': u'Master of Business Administration (MBA)', u'i18n__other_alumni': u'Find other members who attended Indian Institute of Social Welfare &amp; Business Administration, Kolkata', u'startdate_iso': u'1991', u'schoolName': u'Indian Institute of Social Welfare & Business Administration, Kolkata', u'link__school_logo': u'/edu/school', u'lix_edu_profile_link': u'control', u'startdate_my': u'1991', u'enddate_my': u'1993', u'lix_edu_mvp_override': u'control'}  >>> d8[1] {u'lix_edu_dev_override': u'control', u'link__peer_tracker_pivot_with_id': u'/college/?eduSchool=20479&trk=prof-edu-school-name', u'degree': u'B.Sc.', u'i18n__detailed_school_page': u'More details for this school', u'lix_treasury_upload': u'B', u'fosList': [{u'link__fos_pivot': u'/search?search=&keywords=physics&sortCriteria=R&keepFacets=true&trk=prof-edu-field_of_study', u'fmt__fos_highlight': u'physics', u'name': u'physics', u'i18n__find_others': u'Find users with this keyword'}], u'enddate_iso': u'1991', u'fieldOfStudy': u'physics', u'lix_edu_profile_link': u'control', u'schoolId': 20479, u'educationId': 15866086, u'fmt__degree_highlight': u'B.Sc.', u'i18n__other_alumni': u"Find other members who attended St. Xavier's College", u'fmt__school_highlight': u"St. Xavier's College", u'startdate_iso': u'1988', u'schoolName': u"St. Xavier's College", u'link__school_logo': u'/edu/school?id=20479', u'startdate_my': u'1988', u'enddate_my': u'1991', u'lix_edu_mvp_override': u'control'}  >>> d8[2] {u'lix_edu_dev_override': u'control', u'fmt__school_highlight': u"St. Xavier's School Loyola Hall", u'degree': u'H.S.C.', u'i18n__detailed_school_page': u'More details for this school', u'lix_treasury_upload': u'B', u'fosList': [{u'link__fos_pivot': u'/search?search=&keywords=Science&sortCriteria=R&keepFacets=true&trk=prof-edu-field_of_study', u'fmt__fos_highlight': u'Science', u'name': u'Science', u'i18n__find_others': u'Find users with this keyword'}], u'enddate_iso': u'1988', u'fieldOfStudy': u'Science', u'link__peer_tracker_pivot_with_name': u'/college/?eduSchool=St%2E+Xavier%27s+School+Loyola+Hall&trk=prof-edu-school-name', u'educationId': 15978673, u'fmt__degree_highlight': u'H.S.C.', u'i18n__other_alumni': u"Find other members who attended St. Xavier's School Loyola Hall", u'startdate_iso': u'1976', u'schoolName': u"St. Xavier's School Loyola Hall", u'link__school_logo': u'/edu/school', u'lix_edu_profile_link': u'control', u'startdate_my': u'1976', u'enddate_my': u'1988', u'lix_edu_mvp_override': u'control'}   And I want to sort(ascending) the list on "enddate_iso" or "startdate_iso". Is it possible to do?


What is the limit of sequence $a(n)$= $\left(\frac{1.3.5....(2n-1)}{2.4.6....(2n)}\right)$.  I calculate $\lim \left(\frac{a(n+1)}{a(n)}\right)$ which comes 1.So I am confirm that limit of $a(n)$$\ne$$0$.But what is actual limit?


Why doesn't the atmosphere separate according to density?

Why don't dense gas elements sink to the ground and dense gas elements drift to the sky? Why don't we have layers of oxygen, nitrogen, carbon dioxide, etc.


Python subprocess gives wrong value (gives 8bit value instead of 64 bit)

I'm testing subprocess option in Python. I wrote simple code in C and I want run it by subprocess in Python. This is how it looks :  C code example.c (first I execute code and then in subprocess I'm using executable file) :   #include <stdio.h>  int main(int argc, char *argv[]) {     int number= 2110;      while (1==1)     {         printf("%d",number);         printf(" return number: ")         return number;      }     return 0; }   Python Code :  def subTest():     while True:         numberS = subprocess.call('./example')         print (numberS)   Output which I should have after run python code :   2110 return number: 2110   Output which I get :  2110 return number: 62   I test it on some 'numbers' and proper values I get up to 255 then 256 -> 0 etc why's that ? Why it gives 8bit values and how to do it to return proper values  ?


Do you always have to receive a ticket to get onto the Hogwarts Express

In Harry Potter and the Sorcerers stone, Hagrid hands Harry and envelope that contains his ticket to Hogwarts:     Hagrid helped Harry on to the train that would take him back to the Dursleys, then handed him an envelope.   "Yer ticket for Hogwarts" he said. "First of September-King's Cross-it's all on your ticket. Any problems with the Dursleys, send me a letter with yer owl, she'll know where to find me... See yeh soon, Harry"   In the rest of the books, there is only one further mention of the tickets to get onto the Hogwarts Express. Do they just send it in the letter with the list of school supplies? Is it just First Years that receive tickets to get onto the Hogwarts Express, and all of the other students can get onto the the train with no worry, or is it just one of the things that J.K. Rowling does not bother to tell us about in the later novels? Do they always receive the tickets, if not checked, do they have them?


Executing shell script from command line

I have a perl script that converts a file to json format and writes the output to a separate directory. It accepts 2 parameters, filename and output directory. The script needs to be run on multiple files that end with a particular extension such as .abc.  I want to locate every file in a particular directory with extension .abc and run my script against it.  I am trying to run from the command line  find "path to directory" -name '*.abc' -exec ./ConvertFile {} "output_directory"   The command returns find: missing argument to '-exec'  I am new to both perl and shell scripting. I could run the script on each individual file.  However, there can be tens of files in any given directory and they will need to be converted on the fly because the original files change often.  Can anyone tell me what is wrong with my command line entry? Thanks


Can not call non-static method from static - same class

I have a class and in it I have some static and some non-static methods so when I'm trying to access non-static methods from static ones I get that famous error. And whenever I am searching this forum I get solutions when there are two classes and from one you are trying to reach other one. My question is how to call non-static method from static one if they are in the same class?   I am trying with   new ClassName().methodName();    but my method contains sending of Intent and finish(), so if I'm creating other object than finish doesn't work.


mod Distributive Law, factoring $\!\!\bmod\!\!:$ $\ ab\bmod ac = a(b\bmod c)$

I stumbled across this problem  Find $\,10^{\large 5^{102}}$ modulo $35$, i.e. the remainder left after it is divided by $35$  Beginning, we try to find a simplification for $10$ to get: $$10 \equiv 3 \text{ mod } 7\\ 10^2 \equiv 2 \text{ mod } 7 \\ 10^3 \equiv 6 \text{ mod } 7$$ As these problems are meant to be done without a calculator, calculating this further is cumbersome. The solution, however, states that since $35 = 5 \cdot 7$, then we only need to find $10^{5^{102}} \text{ mod } 7$. I can see (not immediately) the logic behind this. Basically, since $10^k$ is always divisible by $5$ for any sensical $k$, then: $$10^k - r = 5(7)k$$ But then it's not immediately obvious how/why the fact that $5$ divides $10^k$ helps in this case. My question is, is in general, if we have some mod system with $a^k \equiv r \text{ mod } m$ where $m$ can be decomposed into a product of numbers $a \times b \times c \ \times ...$, we only need to find the mod of those numbers where $a, b, c.....$ doesn't divides $a$? (And if this is the case why?) If this is not the case, then why/how is the solution justified in this specific instance?


What is a negative word to describe people that love showing off their knowledge?

Similar to this question:  and   But the word I'm looking for is not limited to vocabulary.  These people often drop words and also random fact tidbits even when it's:   A) obvious to everyone in the room B) it's obvious that he/she just wants to show off the fact that they know it  C) not always founded on knowledge or fact   Also, I'm looking for a word that has a negative connotation.


Copy and move with Ultracopier without doing it through tray icon

So when you start Ultracopier this warning message shows up.      The replacement of default copy/move system is not supported and blocked by finder of Mac OS X. You need do the copy/move manually by right clicking on the system tray icon near the clock (not the dock icon).   Is there a way of unblocking the default copy/move system and let ultracopier use it?


Number of $3 \times 3$ matrices with integer entries such that $AA^t$ is the identity matrix

Let $S$ be the set of all $3 \times 3$ matrices $A$ with integer entries such that the product $AA^t$ is the identity matrix.  Then $|S|$ is :   23. 24 48 60   Answer is $48$ but I don't know how to solve it.


Number of integer isosceles or equilateral triangle none of whose   sides exceed $2c$ is?   I substituted $c =3$ checked, and got $27= 3 \times (3^2)$ i.e. $3c^2$ triplets. It gives the right answer($3c^2$) but how do I write a proper formal proof of this?  I tried it this way: We have three vacant places for three integers. First place can be filled in $2c$ ways, 2nd one in $2c$ ways, 3rd one in $2c$ way but it involves over-counting, is it possible to eliminate the extras?


Is there a way to mirror/symmetrize weight paint?

How can I apply one part of the weight paint on the other side of the mesh with symmetrized bones?


I was browsing through some StackOverflow posts, and I noticed that often, comments had small bug fixes indirectly unrelated to the question. However, in some of these cases, the small bug that the commenter thought had nothing to do with the question turns out to be the right answer. My question is: When you have a tiny bug fix that you are not sure will fix the problem, do you put it in a comment or do you answer the question.


Is there a LiveCD (not DVD) for Ubuntu 13.10?

I am working on a computer that does not have a DVD drive, and can read but not boot from USB. However, it does have internet access.  Is there any super minimalist version of Ubuntu 13.10 that can be burned to a CD instead of a DVD, and then fetch anything still missing from the internet at runtime?


Ubuntu 18.04 desktop hangs approximately 1x per day

My Ubuntu 18.04 desktop hangs on me ~1x per day. This happens when I am in the middle of web browsing or using a desktop application, not when booting. When it does, the mouse pointer will still move freely, but clicking or keystrokes have no effect on my system until I do a hard reboot.  How can I stop this from happening?  Here is some system info:  selah@selah-Precision-Tower-5810:~$ uname -a Linux selah-Precision-Tower-5810 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux  selah@selah-Precision-Tower-5810:~$ lspci | grep VGA 03:00.0 VGA compatible controller: NVIDIA Corporation GM107GL [Quadro K2200] (rev a2)  selah@selah-Precision-Tower-5810:~$ sudo lshw -c video   *-display                         description: VGA compatible controller        product: GM107GL [Quadro K2200]        vendor: NVIDIA Corporation        physical id: 0        bus info: pci@0000:03:00.0        version: a2        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress vga_controller bus_master cap_list rom        configuration: driver=nouveau latency=0        resources: irq:31 memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:f7000000-f707ffff   Note, I had a similar issue with my 16.04 install:


How does this "prescription assistance program" scam/business work?

I recently received, unsolicited, a set of "pharmacy discount cards" from the "Massachusetts Prescription Assistance Program". The cards offer to save me "up to 75%" on prescription medications at a list of participating pharmacies. A letter is attached encouraging me to use them, and pointing me to their .  Fine print clarifies that the organization is not associated with the government, and since it's not clear what they are getting out of this, I assume it's a scam, or at least that they're not being forthright. But what is the angle here? What would happen if I used one of the cards and what are they trying to get out of me?


Trying to convert a DXT5NM Normal Map for use in my scene

I have a handful of these strange normal maps I need to use in my scene that store X in the Alpha channel, Y in the green channel, and require you to calculate Z with the following formula:  Z = sqrt(1 - (X * X + Y * Y))  Red is always 100% and Blue is 0%, but these channels are not used.  Despite figuring this much out, I haven't been able to produce a node setup that can correctly convert this into the desired purpley tangent space normal map.  Any ideas?


Any way to retrieve the CreatedDate of a CustomField via Apex?

I'm trying to do some field level data analysis and it would be helpful to be able to pull out the CreatedDate and CreatedBy (Name) for each Custom Field (not individual records) on both Standard and Custom Objects.   I've experimented a bit with the Tooling API to retrieve this but wondering if there's an easier way.


Aura Mutation vs. indestructible enchantments

If the target is indestructible, does  still resolve and give you the tokens, or is an indestructible enchantment an illegal target?


$$\int_0^{\frac{\pi}{2}}\arctan\left(\sin x\right)dx$$   I try to solve it, but failed. Who can help me to find it?  I encountered this integral when trying to solve $\displaystyle{\int_0^\pi\frac{x\cos(x)}{1+\sin^2(x)}\,dx}$.


Is it possible for a device to request to be assigned a specific ip from the DHCP server (static or dynamic)

Networking beginner, but my experience is in web and mobile app development for 10+ years, so I'm not at all new to technology.  I recently started working on a new team with some dev-ops engineers and they are very familiar with networking, systems, services, automation, and provisioning. In an effort to inexpensively learn more I got 4 raspberry pis and an unmanaged switch.  I'm starting with basic networking and linux administration on my path to learn more about the peripheral and platform technologies that support the applications that I build.  I want my Raspberry Pis to be assigned static IPs from my modem/router/wifi-access-point device (Motorola Surfboard G6580), anytime any Raspberry Pi connects. Is it possible to have the Raspberry Pi (or any other device for that matter) request a specific static IP from the DHCP server?  The modem has a 192.168.0.1 web address that will allow me to manage the dhcp assignment of static ips based on mac addresses. However, I am curious to know if this is possible to automate with a request from the raspberry pi itself.


Set of all finite subsets of $\mathbb{Z}_+$ Countable?

Let $A$ be the set of all finite subsets of $\mathbb{Z}_+$, then is $A$ countable?   Defiene $I_j$ as the set consisting of all subsets of $\mathbb{Z}_+$ having $j$ elements, then i think $A=\bigcup I_j$ and since countable union of countable sets are countable thus $A$ is countable!


How do I echo one or more tab characters using a bash script? When I run this code  res='       'x # res = "\t\tx" echo '['$res']' # expect [\t\tx]   I get this  res=[ x] # that is [<space>x]


What's the difference between du and df?

I would like to know exactly what du and df mean.  The following is an example of the output of the df command.  Filesystem      Size  Used Avail Use% Mounted on ubi0:rootfs     435M  424M   12M  98% / devtmpfs         88M  4.0K   88M   1% /dev tmpfs           248M     0  248M   0% /dev/shm tmpfs           248M  8.4M  240M   4% /run tmpfs           248M     0  248M   0% /sys/fs/cgroup tmpfs           248M     0  248M   0% /tmp tmpfs           248M   72K  248M   1% /var/volatile   And here's the output of du (run in the / directory)   $ du -sh home     255M    home  $ du -sh usr     264M    usr   I thought that ubi0:rootfs included /home and /usr, but the sum of them, 519M,  is larger than the ubi0:rootfs size, 435M.  The result of the free command is as follows.                total        used        free      shared  buff/cache   available Mem:           495M         55M         50M        8.4M        389M        420M Swap:            0B          0B          0B   At first I thought the difference is due to ramdisk, but the free command shows RAM is not used so much.  What is the exact difference between du and df (or is the /usr dir special)?


How to define Set Theory and First Order Logic without circular reference?

Axiomatic set theory is basically a first order logic theory, so I believe we must certainly begin with a treatment of first order logic. However, to define a first order logic vocabulary we need to define a set of constants, a set of variables, a set of relation symbols, etc, whereby we are already using set theory.  Is this avoidable? What would be the cleanest way to define these two subjects?


When Blender is installed, it creates its own copy of Python 3.x. However, I prefer to code in Python 2.x. This makes it difficult for me to work with newer versions of Blender. I would like to know what to do so that Blender will instead use an external installation of Python 2.x, which I already have installed on my computer.  How do I make Blender recognize the other version of Python?


How do I autocomplete a user tag with a keypress, not a mouse click?

If I am typing a user tag, e.g. @Noble, and the autocomplete box appears, I want to complete the name with a keypress, not a mouse click. I've tried tab, up arrow, and right arrow, none of which have worked. Is this possible?


Missing Dock after updating to Ubuntu 19.04

Can't find my Dock after upgrade to Ubuntu 19.04 (available only when I open Activities) Dock settings are present:    Extension itself is installed:    Can anyone help and tell me what might cause the issue?  UPD: Reinstall didn't help:  sudo apt purge gnome-shell-extension-ubuntu-dock sudo apt install --reinstall ubuntu-desktop   UPD2: Tweak tool shows that there is an error loading extension for Dash to Dock:


How should I distinguish between "can" & "can't" in American English pronunciation?

As a non-native speaker, I feel that it is ridiculous that can and can't could sound so similar in American accent.  Just now, I was just listening to a video in which the speaker with an American accent says     Fat cells can't reproduce themselves.   The speaker dragged the word "can't" longer for emphasis, but perhaps as a result, what I heard at first was     Fat cells can reproduce themselves.   Of course from the context I later figured out what he was really saying, but I felt extremely surprised by how these two words which literally mean the opposite could sound so similar in American accent. How is that not affecting American people's daily conversations? As a non-native speaker, is there a way for me to further clarify them when my listeners are confused? (Like when you say "one-eight" to clarify that you were trying to say "eighteen" as opposed to "eighty".)


Vectors perpendicular to triangle sides sum to zero

I'm able to prove that, for a triangle $PQR$,  $$ PQ+ QR+ RP = 0. $$ I am not sure how to show that for  $A \perp PQ$, $B\perp QR$, and $C \perp RP$, where $A$ has the same length as $PQ$, $B$ has the same length as $QR$, and $C$ has the same length as $RP$, we have  $$A+B+C=0.$$  I've made a sketch of the triangle and perpendicular vectors, but I'm not sure how to proceed.


Supplements: When and how to take them to maximize absorption

I switched to a vegetarian diet a while back, and I am now taking a few supplements consisting of common minerals, vitamins and omega-3's as a compliment to my regular diet.  When should I take the supplements to ensure that they are absorbed most effectively?  Does it matter what time of day it is, and does it matter what else I have in my stomach at the time?  I have read that some vitamins are fat soluble – does that mean that they should be taken with a meal? If taken with a meal – does eating a lot of food reduce "digestion efficiency" of the supplements?    What I have done, which is based entirely on my own thoughts, which are not based on any particular research:  I have been taking my supplements during the afternoon a few hours before dinner. At around 5 pm, body metabolism is at a high, and I usually don't have a lot of food in my stomach. My thinking has therefore been that the body will be efficient at absorbing the contents of the supplements.  I have avoided taking supplements in the morning because I am a morning coffee-drinker, and caffeine is laxative.


How to calculate Camera "correct" position and distance to Frame all my Scene?

Consider I have N dynamic points on my Scene, I would like to "frame" all them, with my Camera.    How can i calculate (at runtime) Vector3 Position to correctly frame all my scene ?   This is my idea:    Calculate Avarage for all my points  Move my Camera "up" to correctly "frame" all my points  (i don't know how) Use Unity LookAt(myAvaragePoint)   Thanks


How can I suspend/hibernate from command line?

How can I suspend or hibernate my laptop using command line, without installing additional software?


About 10 years ago I read a then in-progress series of books about kids on an island (I think). I read 5 or 6 books and there were more to come.  There was a Dumbledore-like figure who was killed in, I think, the second book, and the moment that happened, a flying creature (statue?) lost its magic and fell into the ocean.  Meanwhile, two of the kids had been captured and the protagonist wasn't able to go back for them for some time, during which the prisoners invented a way to communicate with their hands because their jail was pitch-black.  I remember that I found the series by searching for "books like Harry Potter" but now that search brings much newer books.


Prove that $n<2^n$ for every positive integer $n$.  $P(1): 1 < 2^1$  $n+1<2^n+1$ for induction hypothesis  $n+1<2^n+2^n$ I can't undertstand this passage (this is from my teacher's slide)  $n+1<(2)2^n$  $n+1<2^{n+1}$


Is there a way to upgrade the Ubuntu 12.04 OS to only 14.04. I inherited a system and Veeam 10 will not backup version 12.04 Ubuntu?

The sites and webpages i have read are old and there is a question already but the final warning in the answer is to upgrade before 18.04 release? I am just trying to go up one version to first back up the entire server using Veeam before trying any other upgrades/updates. This is the company git server and losing anything would probably not be good for me.


I used the hello,world example of tikz-feynman, which should draw a horizontal Feynman diagram  \documentclass{standalone}  \usepackage{tikz} \usepackage{tikz-feynman}  \begin{document}  \feynmandiagram [horizontal=a to b] {   i1 -- [fermion] a -- [fermion] i2,   a -- [photon] b,  f1 -- [fermion] b -- [fermion] f2, };  \end{document}   But got a strange output like    Can you help me?


Regex - extract outer scope matched value

string input = "

         Text A

                     Text B

                     Text C

         Text D

"   I have a series of tables in the above string format.  I want to extract out the content in the first level of all
, where the expected extracted content is:  Text A

         Text B

         Text C

  Text D   I have the following Regex that describes what I am trying to do  var regexTableRow = new Regex("
(.*?)
");          var regexMatches = regexTableRow.Matches(htmlInput);          var tableRows = new List<string>();          foreach (Match match in regexMatches)         {             // Get a row of

 out             var value = match.Value;              tableRows.Add(value);         }   Where the Regex fails is it extracts the
 from the inner tables instead of outer tables. How do you make Regex focus only on outer tables during extraction?  Thanks.  [Edit] - Thank you, I will use HtmlAgilityPack instead. Similar issue is being faced with this code:  var htmlDocument = new HtmlDocument();             htmlDocument.LoadHtml(htmlInput);              var output = htmlDocument.DocumentNode                 .SelectNodes("table/tr");   Where the inner tables are being picked up instead of the outer tables.


How does the Extra Attack class feature impact Two-Weapon Fighting?

A level 11 Fighter makes 3 attacks per Attack action as per:  Extra Attack Beginning at 11th level, you can attack three times, instead of twice, whenever you take the Attack action on your turn.  According to Players' Handbook, any character can attack with both hands:  Two-Weapon Fighting When you take the Attack action and attack with a light melee weapon that you're holding in one hand, you can use a bonus action to attack with a different light melee weapon that you're holding in the other hand. You don't add your ability modifier to the damage of the bonus attack, unless that modifier is negative.  If a level 11 Fighter is brandishing a light weapon in each hand, how many attacks do they make per turn? 4: 3 from the Attack action + 1 from the bonus action? Or 6: 3 from the Attack action + 3 from the Bonus action?


I'd like to make a program that prints colors in the python terminal but I don't know how. I've heard that you can use certain escape sequences to print text in color, but I'm not sure of this. How can I print a string in a specific color using the python terminal?  Side note: I run a version of Linux.


Create object instance without invoking constructor?

In C#, is there a way to instantiate an instance of a class without invoking its constructor?  Assume the class is public and is defined in a 3rd party library and the constructor is internal.  The reasons I want to do this are complicated but it would be helpful to know if it's possible using some kind of C# hackery.  NOTE: I specifically do not want to call any constructor so using reflection to access the internal constructor is not an option.


The following two queries return different values for index size.  SELECT OBJECT_NAME(i.OBJECT_ID) AS TableName, i.name AS IndexName, i.index_id AS IndexID, 8 * SUM(a.used_pages) AS 'Indexsize(KB)' FROM sys.indexes AS i JOIN sys.partitions AS p ON p.OBJECT_ID = i.OBJECT_ID AND p.index_id = i.index_id JOIN sys.allocation_units AS a ON a.container_id = p.partition_id GROUP BY i.OBJECT_ID,i.index_id,i.name ORDER BY OBJECT_NAME(i.OBJECT_ID),i.index_id   And  sp_msforeachtable 'sp_spaceused ''?''''   Can anyone suggest exact query to find Index size for each tables from system views in sql server?


Let $x$ be a positive real number. Then show that for any $x$,  $$x^2+\pi^2+x^{2\pi} \geq x^\pi(\pi+x)+x\pi.$$   Any hint would be appreciated.


What should happen with popular 'accepted' answers that just aren't right?

4 Answers   Like this one for example...      the answer should just be removed.


If L is module-finite over K, and K ⊂ R ⊂ L, then R is a field

I am self studying, and this question is from Fulton's Algebraic Curves (question 1.50 (b))  1.50∗. Let K be a subfield of a field L. (a) Show that the set of elements of L that are algebraic over K is a subfield of L containing K. (Hint: If $v^n +a_1v^{n−1} +···+a_n = 0$, and $a_n \neq 0$, then $v(v_{n−1} +···) = −a_n$.) (b) Suppose L is module-finite over K, and K ⊂ R ⊂ L. Show that R is a field.  I could do (a) but I cannot do (b). I cannot think of any specific examples, and don't know how to begin the proof.  It seems like there needs to be at least some sort of condition on R (like that it is a subring of L), but that is not given.


I have a High poly mesh and I have decided to make the low poly by merging as it is easiest for me. Would it be possible to change the W Hotkey , so that it merges to the center automatically? It is time consuming pressing W > Merge > Center.


Is there a good software for browsing BibTeX databases? I have a .bib file with roughly 100 entries and it is becoming harder and harder to look up papers to cite. What I would like is something with a graphical interface that lists the entries in a more readable form. (I prefer open source software. :-)  Any suggestions?  User  pointed out there are similar questions  and . If people feel this question is redundant, feel free to delete it.


Parallelogram law valid in banach spaces?

It is known that the parallelogram law  $\|x-y\|^2+\|x+y\|^2 = 2(\|x\|^2 + \|y\|^2)$  holds in any space with an inner product (the norm being induced by this inner product). Is this formula valid in general Banach spaces? Or are there counterexamples?  Thank you! :)


Download and Update Ubuntu softwares after installation without internet connection?

I installed Ubuntu 14.04.3 LTS version. At installation procedure I turned off Wifi (Internet connection) because of my low speed Internet connection. On the other hand I know at installation procedure, some updates and changes get from Internet and consequently I don't have those parts. I want to know, how I can get those updates and softwares ? guide me with address and procedure to do that, please.  Thanks


C - Replacing the nth byte of a 64 bit integer

I'm trying to write a C function that takes a uint64_t and replace it's nth byte to a given one. void    setByte(uint64_t *bytes, uint8_t byte, pos)  I know I can easily get the nth byte like so uint8_t getByte(uint64_t bytes, int pos) {      return (bytes >> (8 * pos)) & 0xff; }  But I have no idea how to Set the nth byte


After cyberattack, a new Administrator account has popped up, what, how and for what?

After what seems a human-directed ransomware attack, I am analyzing the system. It is a Windows Server 2016 and I had created the usual Administrator account. Now I see that during the attack, a new "Administrador.WIN-RSDLE3HIAER" account has appeared under C:\Users folder. The old plain Administrator still exists but it seems like all files are now under the newly created account (Donwloads, favorites, Desktop, etc... are still in the original account, but empty). It is like the profile was moved to the new Account.   My question, in the search of learning is why is this done, why creating a new account? Is this some kind of self-protection from the attackers? Why is all my original content now under the newly created account? I could still enter "Administrator" under the login page and access my profile so this is why I cannot understand the nature of the new account/folder, how I got redirected... in a word... how does this thing work?  Cheers


Large text setting from Universal Access doesn't hold on after system reboot

I have Ubuntu 20.04. Since the latest update Large Text setting from Universal Access menu doesn't endure bigger GUI upon reboot. Although Universal Access shows that Large Text is turned on.  Large text setting works fine again after doubleclicking the switch, but I want the option to be constantly ON and (!) running.


Is there any way to retrieve Windows product key from backed up license or recovery partition?

My laptop's HDD has just gone bad. The OS and recovery partitions are corrupted so I can't recover Windows anymore. However I've backed up Windows' license according to  before, therefore I download a fresh Windows 8.1 ISO to reinstall and intended to restore the license later. But the Windows installer keeps asking for the product key which I don't know because it wasn't printed on the laptop anymore.  So can I get the key from the above license files (data.dat, cache.dat & tokens.dat) or from the recovery partition (where most files are still left intact)?


Why does the square root of a square involve the plus-minus sign?

If $\sqrt{x^2}$ can be simplified as follows:  $\sqrt{x^2} = (x^2)^\frac{1}{2} = x^{\frac{2}{1}\times\frac{1}{2}} =x^\frac{2}{2} = x^1 = x$  Then why would $\sqrt{x^2} = \pm x$?


this operator in C#.net , usage and benefits?

since many years i'm trying to figure out that what does 'this' do in c#.net  e.g.  private string personName;  public Person(string name) {   this.personName = name; }  public override string ToString() {   return this.personName; }   }


How can someone mathematically prove that a spherical wave equation solution cannot be a electromagnetic wave?

It's well documented that spherical electromagnetic waves doesn't actually exists. However, most textbooks just brings this concept without any formal demonstration. So, for a spherical wave equation solution $$\psi(r,t) = \frac{A}{r}e^{i(kr\mp\omega t)}$$ How would someone be able to make a proof that doesn't satisfy a EMW (or any transversal wave). I know that the hairy ball theorem can be used, but i don´t know how viable it would be to consolidate this qualitative approach.


Amazon RDS I/O requests - 1 query = 1 billable I/O?

I have an InnoDB database that I'd like to migrate onto Amazon RDS.  My current implementation, hosted on my own server, shows roughly 8M queries per month.   say that  I/O Rate    $0.10 per 1 million requests  Does 1 I/O = 1 query?  ie, will I be billed $80/mo for this amount of usage + the RDS fees?


Why is $SU(3)$ and not $U(3)$ the correct gauge symmetry?

If quarks come in three colours $r$, $g$ and $b$ than (neglecting all other quantum numbers and spacial freedom for now) a state of a quark would be a vector in $\mathbb{C}^3$.  If we are now looking for a global symmetry redefining the colours than I would be left with the unitary group $U(3)$. However the correct gauge group is $SU(3)$.


What are the most important criticisms of Popper's account of Falsification?

Karl Popper is mostly known for his falsification principle. I'm very familiar with his account and I understand it well. I've heard multiple times that there are some real issues with this account and that there are many problems with it. I've googled that and I've read something or two about the criticisms provided by later philosophers like Lakatos.   My question is, What are the real problems that face Popper's account?  both explanations and  resources to read about those difficulties are welcomed.


Aiming for graduate school in applied math with weak math grades

I am close to finishing a degree in a combined program in computer science and physics, and I am thinking of applying to graduate school in environmental modelling, ideally with a strong mathematical and computational focus.  My overall GPA seems to be respectable, 3.72 (if I'm doing the conversion correctly). However, I have done much better in computer science courses (3.96) and worse in math (3.51) and physics (3.58).  The problem is that many of the grad programs I'm interested in are in math departments, and I fear that the low math GPA will exclude me from top programs. I should note that part of the reason for the math marks is that I took mostly honours courses, but I worry that admissions committees will not be able to tell (the course names don't always indicate this). I have, however, taken several courses in mathematical methods (both under computer science and math departments) and done very well, and am also taking a math-heavy graduate course in machine learning.  I have extended my degree by a semester to do a math minor, but unfortunately most of my marks for this will not be out by the time I apply for grad programs. I plan to study quite a bit for the GRE Math Subject Exam.  I have research experience in mathematical biology as well as currently working on an undergraduate thesis in environmental modelling. I will hopefully have one or two publications related to this research by the time I apply for schools.  How can I tailor my applications to have a good chance of getting into applied math programs? Will they care about my strong computer science marks, or my marks in specific courses? Should I try instead for computer science programs and go from there?


Hi my question is how to upgrade to jelly bean? I have a Samsung Galaxy 2. I am use to Jelly bean that what my tablet is,so I am 1st time user of this phone I purchased. I was trying in google store to get my game on my phone and it said it was not compatible.So went in setting saw software update but when I tried to it said no firm ware. It is a second hand phone so I don't know what to do. I thought maybe if I could upgrade to jelly bean it all problems. Idk if I could find a site that has a free upgrade download. If you know a site I can do this please let me know. I don't have a USB cable just a home charger, do I need one? Ty in advance, Wendy


Command line length limit: built-in vs executable

So per  we have the following definition for *:     Expands to the positional parameters, starting from one, initially   producing one field for each positional parameter that is set. When   the expansion occurs in a context where field splitting will be   performed, any empty fields may be discarded and each of the non-empty   fields shall be further split as described in Field Splitting. When   the expansion occurs in a context where field splitting will not be   performed, the initial fields shall be joined to form a single field   with the value of each parameter separated by the first character of   the IFS variable if IFS contains at least one character, or separated   by a  if IFS is unset, or with no separation if IFS is set to a   null string.   For a vast majority of people we are aware of the famous ARG_MAX limitation:  $ getconf ARG_MAX 2621440   which may lead to:  $ cat * | sort -u > /tmp/bla.txt -bash: /bin/cat: Argument list too long   Thankfully the good people behind bash ([include all POSIX-like others]) provided us with printf as a built-in, so we can simply:  printf '%s\0' * | sort -u --files0-from=- > /tmp/bla.txt   And everything is transparent for the user.  Could someone please let me know why this is so trivial to bypass the ARG_MAX limitation using a built-in command and why it is so damn hard to provide a conforming POSIX shell interpreter which would handle gracefully * special parameter to a standalone executable:  $ cat *   Would that break something ? I am not asking bash people to provide cat as a built-in, I am solely interested in the order of operations and why is * expanded in different behavior depending whether the command is build-in or is a standalone executable.


Ajax call works for logged in users and returns "Bad Request" for guests

I have a WordPress site that uses ajax to submit a form on the Front-end.  When the form is submitted by a logged-in user, all works fine. When the form is submitted by not-logged-in user, I get a "Bad Request" error.  Here is my code:  JS:  $('form').on('submit', function (e) {     e.preventDefault();      // Submit the POST request     $.ajax({         url: jsobject.ajaxurl,         method: 'POST',         data: {             action: 'fe_submit_form'         }     }); });   PHP:  function fe_submit_form() {     ... } add_action( 'wp_ajax_fe_submit_form', 'fe_submit_form' );   When the user is logged in, all works fine. When the user is not logged it, I never go inside of the "fe_submit_form" php function.  Any ideas?


Passing default arguments to file in Windows

Is there any way in Windows explorer to specify arguments which will be added whenever opening a file? I didn't see anything that seemed relevant in Properties...


How is it possible that this coat-hanger lifts Thor's hammer?

How is it possible that this coat-hanger lifts Thor's hammer, when it is not worthy of it? I mean in Avengers: Age Of Ultron, Captain America says that an elevator can't lift the hammer because it's not worthy of it.


How to place all proofs automatically in appendix?

Can I place all proofs to theorems in appendix automatically? Usually proofs are written in the LaTeX codes immediately after the theorems. Without physically moving proofs to appendix, how can I place them in appendix automatically? Is there a package?


Need to expand a Volume but Windows10 won't let me

Since a few weeks back and probably some Windows Update I have a new partition on my System that is 450mb large. If I look at it it's empty. I wouldn't really mind, but every five minutes I get this popup that there's low storage on the HD.  So I tried to expand this volume, but on this one I don't have the options to expand/decrease the volume.   All other partitins have the options


When to use BJT in differential configuration instead of op-amp

Why would one use a BJT differential amplifier configuration  instead of an op-amp? Are there any pros and cons to both these circuits? I would maybe assume that a BJT amplifier might be cheaper and be used by companies to reduce costs, buy I'm not even sure if that is true.


Multiplying doubles in Java create "longer" values... ¿How to fix it?

I have created the next code, where I have an ArrayList of Doubles "solution". I want to multiply all the doubles inside this ArrayList. For example, if the solution is [0.9,0.5,0.2], the code returns "0.09000000000000001" and not the real result of 1*0.9*0.5*0.2 = 0.09      double actualCost = 1;     for(int j = 0; j < solution.size(); j++) {         actualCost *= solution.get(j);     }     return actualCost;   I don't know why I have this problem, if someone can help me to fix it I'll really appreciate it.  Thanks in advance.  (sorry for my english lvl)


When using the Gmail preview pane lab, fastest way to get a direct link to a conversation?

In vanilla Gmail, clicking on a conversation alters the fragment ID in the URL, allowing you to link back to that conversation.  (It opens in its own Gmail interface.)  I am using the preview pane, which is great, except that the URL no longer updates when viewing specific emails, so there appears to be no way to get the link to the currently-viewed conversation.  (The 'open in new window' button doesn't help, since it pulls its contents in on the client side; it isn't a standalone link.)  The only solution I've found is to turn off the preview pane, find the message again in the list, open it, grab the link, go back to the message list, and turn preview pane back on.  That's fairly onerous for something I do often though (to clip Gmail conversations to Evernote, where my GTD setup lives).


I have this simple java code:  import java.nio.file.*; import java.io.*;  public class Write {    public static final String PATH = "/home/user/Desktop/hello.txt";     public static void main(String[] argv) {       Path path = Paths.get(PATH);       OutputStream out;       try {          out = Files.newOutputStream(path, CREATE, APPEND);        } catch (IOException e) {          System.out.println("Caught IOException: "+e.getMessage());       }     } }   which wont compile due to this error:  Write.java:14: error: cannot find symbol         out = Files.newOutputStream(path, CREATE, APPEND);                                            ^ symbol:   variable CREATE location: class Write Write.java:14: error: cannot find symbol      out = Files.newOutputStream(path, CREATE, APPEND);                                                 ^ symbol:   variable APPEND location: class Write 2 errors   Usually this means that I've forgotten to import some stuff. I even tried to add:  import java.nio.file.StandardOpenOption    But I get the same error.  EDIT: Ok so, I've solved my problem by following @rmlan advice. I did miss those constants. Thanks.


Javascript method to find number of milliseconds from 1970-01-01?

Say, I have a date var dt = new Date('2012-01-01');  Is there a method in Javascript to return number of milliseconds since 1970-01-01? For this particulat date it would return 1325376000000 For this purpose, there is a method  "toUTC()" that runs in Chrome only. I know this because i can do that in Chrome's console. See screen attached below:  However, When I search about this method on the internet, I don't find it and it doesn't work in Firefox either which is very wierd and I am very confused. Anyhow, if you know any way to get this, will be really appreciated. Thank You


Convergence in distribution implies convergence in probability to 0

I am trying to show the following- If $X_n$ converges in distribution to $X$ and $Y_n$ converges in probability to 0, then show that $X_nY_n$ converges in probability to 0.  Attempt- $$P(|X_nY_n|>\epsilon) = P(|X_nY_n|>\epsilon,|Y_n|>\eta) + P(|X_nY_n|>\epsilon,|Y_n|\leq\eta) \leq P(|Y_n|>\eta) +P(|X_n|>\epsilon/\eta)$$  Now the term on the left goes to 0 but what do I o with the remaining part, can someone please provide the solution.


I need to group 400 points in 10 groups with 40 points each. The goal is to get the 40 points geographicly together like this:        Any idea how to do this with QGIS?


Is the description of the gravitational field as a vector field and a tensor field compatible?

By electric or magnetic fields we mean the vector fields $\vec{E}(\vec{r},t)$ and $\vec{B}(\vec{r},t)$ respectively. But a gravitational field in Newtonian theory is a vector field that $\vec{g}(\vec{r})$ that obeys $\nabla\times\vec{g}=0$ and  $\nabla\cdot\vec{g}=4\pi G\rho_{m}$. But in Einstein's theory we describe gravity as a tensor field $g_{\mu\nu}(x)$. How are these two descriptions of gravity, one in terms of the vector field $\vec{g}(\vec{r})$ and in other in terms of the tensor field $g_{\mu\nu}(x)$, compatible with each other in terms of the number of degrees of freedom? Thanks!


LINQ's Distinct() on a particular property

I am playing with LINQ to learn about it, but I can't figure out how to use Distinct when I do not have a simple list (a simple list of integers is pretty easy to do, this is not the question). What I if want to use  on a list of an Object on one or more properties of the object?  Example: If an object is Person, with Property Id. How can I get all Person and use Distinct on them with the property Id of the object?  Person1: Id=1, Name="Test1" Person2: Id=1, Name="Test1" Person3: Id=2, Name="Test2"   How can I get just Person1 and Person3? Is that possible?  If it's not possible with LINQ, what would be the best way to have a list of Person depending on some of its properties in .NET 3.5?


I use Ubuntu through a virtual machine (VM Workstation Player) and sometimes download packages through the terminal. Some of the packages I download are not the latest version. For example, I downloaded Eclipse IDE and Wireshark and some versions were downloaded. Even when I try to update those packages, it tells me that the packages are up to date.  Why can't I download the latest versions and how can I fix this?


I made this object in javascript.  let list = {    value: 1,    next: {       value: 2,       next: {          value: 3,          next: null,       },    }, };   And also a function to traverse it...  function traverse(list_) {    while (list_) {       console.log(list_.value);       list_ = list_.next; // (*)    } } traverse(list);   Inside of the function I am changing the reference to the passed argument at (*), so at the end of the function I was expecting the value of list object to be null as well, but when I log the value of list after the function, it still shows the same object...   Does this mean that list was passed by value, and not by reference?


Why aren't square CMOS sensors more popular by now?

For anyone who has ever delved into the world of , they will undoubtedly understand some of the benefits of using a square format over a rectangle format when creating photos.   Aesthetic considerations of the image aside, it's just mechanically obvious that a square fits inside of the image-circle produced by the camera's lens a lot better than a rectangle does. In other words, you get more bang for your buck in terms of information/light passing through the lens and onto the sensor/film. Capisci?  Another point to consider is that for some shorter lenses with more distorted properties, the symmetry of the image seems a lot more 'balanced' when going square. If you have ever had a go using a  on a Hasselblad V system you will know exactly what I'm talking about. When compared to 35mm / Full-Frame Sensor with a 15mm Fisheye it's far superior in creating a more pleasing image, especially of buildings or architecture. Anything where long parallel lines converge now becomes easier to frame up, appearing less squashed.   As sensor technology becomes cheaper wouldn't it make sense for all the leading camera manufacturers to begin moving towards reclaiming some of that wasted image-circle? (especially as lenses cost so much too). Imagine if you had the option to select what size sensor you wanted to use before you shot the photo?   This topic has been on my mind since about 2007 when I first bought a DSLR, back in the era of the crop sensor and DX Fisheye lenses. Around the same time I had begun to experiment with 120 film. I'm just asking questions a decade later as to why the CMOS & CCD technology didn't move in a larger, squarer direction?   If someone can provide a logical reason to cling to the 35mm format in the digital age I'm more than happy to listen. Thanks


I try to autowired session factory to dao layer.I have error:java.lang.NoClassDefFoundError: I locked more configures but no one work for me. This is my dao:     @Component         public class UserDaoImpl implements UserDao{     @Autowired     private SessionFactory sessionFactory;       @Override       public void saveUser(User user) {     sessionFactory.getCurrentSession().save(user);    }   I have hibernate config file:  <hibernate-configuration>    <session-factory>   <property    name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://localhost:3306 /vezba2?zeroDateTimeBehavior=convertToNull</property> <property name="hibernate.connection.username">root</property> <mapping class="com.entiti.User"/> <mapping class="com.entiti.Rezervacija"/>    </session-factory> </hibernate-configuration>   I create xml file with beans:               <context:annotation-config/>      <bean id="user" class="com.dao.UserDaoImpl">      <property name="sessionFactory" ref="sessionFactory"></property>       </bean>      <bean id="sessionFactory"     class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">        <property name="configLocation">       <value>classpath*:hibernate.cfg.xml</value>       </property>      </bean>     Please help if someone know where is my fault.


In a long document I am writing, I wrote  $$\left\{ \Gamma_Y: \mathcal{L}_\mathbb{K} (C_\hat{L}(Y)) \longrightarrow \mathcal{L}_\K (C_G(Y), e^{C_G(Y)})) \right\}_\{Y \in X\}$$   It does not compile, giving   Missing { inserted. < to be read again > \gdef  l.228 ...amma_Y: \mathcal{L}_\mathbb{K} (C_\hat{L}                                                   (Y)) \longrightarrow \math...   I do not understand why it doesn't work, especially because it does work on online compilers.


Center of the dihedral group with odd and even number of vertices

I have posted a proof below, and would appreciate it if someone could review it for accuracy. Thanks!   Problem:   Let n $\in$ $\mathbb{Z}$ with $n$ $\ge$ 3. Prove the following:   (a) Z(D$_{2n}$) = 1 if $n$ is odd.   (b) Z(D$_{2n}$) = {1, r$^k$} if $n$ = $2k$.   Note that $r$ and $s$ generate D$_{2n}$ with the group presentation { $r$,$s$ | $r$$^n$ = $s$$^2$ = 1, $rs$ = $sr$$^{-1}$ }   Proof:  part (a)   Let $n$ $\ge$ 3 where $n$ $\in$ $\mathbb{Z}$ and $n$ is odd.   For any x $\in$ Z(D$_{2n}$), x must commute with both $s$ and $r$, since both are in $D_{2n}$. Note that if $x$ commutes with both $s$ an $r$, then $x$ commutes with any element of $D_{2n}$ since $r$ and $s$ generate D$_{2n}$.    Then for any x$\in$ Z(D$_{2n}$), we have $xr$ = $rx$, where x is of the form $x$ = s$^j$r$^w$ (any such element can be arranged into this form via the relation $rs$ = $sr$$^{-1}$ and the fact that $r$ and $s$ generate D$_{2n}$). Note that since r and s have finite order, the exponents are modulo n and modulo 2 for $r$ and $s$ respectively.   Then we have  s$^j$r$^w$$r$ = $r$s$^j$r$^w$.   Which implies s$^j$r$^{w+1}$ = s$^j$r$^{w +- 1}$  In the case where the power of r on the RHS is $w$ - 1, it is clear we cannot have equality unless |r| = 1, which it is not. Note that if $j$ is even then we have only the $w$ + 1 case. Hence $x$ may be of the form $1$$r$$^w$ = $r$$^w$.   Also we have that x must commute with $s$, hence $s$$x$ = $x$$s$.   Then $s$$r$$^w$ = $r$$^w$$s$.  Which implies $s$$r$$^w$ = $s$$r$$^{-w}$.   Applying s$^{-1}$ to both sides we arrive at the task of finding when r$^w$ = r$^{-w}$ i.e when $w$ = $-w$. But since r has finite order we have:   $$ \bar{w} = (n-1)*w $$   where $\bar{w}$ is the residue class of w modulo n. Hence for some a $\in$ $\mathbb{Z}$$_+$   $$ w + an = wn - w $$  $$ 2w = wn - an $$ $$ 2w = n(w-a) $$   Now since 0 $\lt$ w $\le$ n we have that the LHS is greater than 0. Also since n $\ge$ w then (w-a) $\le$ 2, since otherwise the RHS would be greater than the LHS. So since n is odd we must have that (w-a) is even and hence (w-a) = 2, implying that 2w = 2n and hence n = w.   Hence x = $r$$^w$ = $r$$^n$ = 1. So Z(D$_{2n}$) = 1.   part (b)   From the argument above any x $\in$ Z(D$_{2n}$) must be of the form $s$$^j$$r$$^w$ for j even and j $\in$ $\mathbb{Z}$. Then x is of the form $r$$^w$ for $0$ $\lt$ w $\le$ $n$. Since $n$ is even we have the equation below is satisfied when $2w$ = $n$ or $w$ = $n$, since (w-a) $\le$ 2 but also (w-a) $\ge$ 0 for (w-a) $\in$ $\mathbb{Z}$$_+$.   $$ 2w = n(w - a) $$   Hence $r$$^w$ $\in$ Z(D$_{2n}$) when $2w$ = $n$, as desired.


Suppose a function $f$ is defined as follows:   $$f(x,y)=\begin{cases} \frac{x^3y^2}{x^4+y^4}&\text{ when }(x,y)\neq(0,0),\\0 & \text{ when }(x,y)=(0,0).\end{cases}$$  Is this function continuous at $(0,0)$? How is this shown? I've tried considering limits for different $y=g(x)$ functions and I am unable to find a counterexample. But I do not see how to prove continuity in general.


I've to detect if two time periods are overlapping. Every period has a start date and an end date. I need to detect if my first time period (A) is overlapping with another one(B/C).  In my case, if the start of B is equal to the end of A, they are not overlapping(the inverse too)  I found the following cases:    So actually I'm doing this like this:  tStartA < tStartB && tStartB < tEndA //For case 1 OR tStartA < tEndB && tEndB <= tEndA //For case 2 OR tStartB < tStartA  && tEndB > tEndA //For case 3   (The case 4 is taken in the account either in case 1 or in case 2)  It works, but it seems not very efficient.  So, first is there an existing class in c# that can modelize this(a time period), something like a timespan, but with a fixed start date.  Secondly: Is there already a c# code(like in the DateTime class) which can handle this?  Third: if no, what would be your approach to make this comparison the most fast?


How do I remove (or nullify) an object in an array list of generics in C#?

In my Data Structures class I've been tasked with creating an ArrayList of generic objects of a given type. This is essentially a class that behaves like an array with some extra functionality attached. It looks something like this.     public class GenericArray<T>     {         // The array         private T[] array;         private int size;          // Constructor         public GenericArray(int arrsize)         {             size = arrsize;             array = new T[size + 1];         }         // Array methods         public T getItem(int index)         {             return array[index];         }         public int getCount()         {             int count = 0;              for(int i = 0; i < array.Length; ++i)             {                 if(array[i] != null)                     count++;             }             size = count;             return count;         }     }  We're required to create the various methods by which you interact with the array. I'm having a particular problem when it comes to deleting items from the array. I have a deleteLast method which I assumed would simply set the last item to null, like so:         public void deleteLast()         {             int i = this.getCount()-1;             array[i] = null;         }  However I am getting the error that I cannot convert the parameter to null, as T may not be a nullable value type, which makes sense. However, I don't know how to remove them otherwise. I can't find any useful information on this through Google, so I've come to Stack Overflow. Any help is appreciated. Thanks :)


What are the criteria for making a function a member vs. a friend?

When I can decide whether a particular function/operator should be declared as a friend function/operator for a class or a member function/operator of a class.?


How to Bend profiled rectangle exactly to 45 degrees?

I have these profiled rectangle. I need to Bend it around Z-axis (Face #2 need to go to right) thus angle between faces #1 and #2 be exactly 45 degress.  File: