Weird NoClassDefFoundError of Java class

Environment: jdk1.7  javax.servlet-api-3.0.1.jar is needed for this test.  Reproduce steps:   javac Test1.java -cp javax.servlet-api-3.0.1.jar build Test1.java with javax.servlet-api-3.0.1.jar javac Test2.java -cp javax.servlet-api-3.0.1.jar build Test2.java with javax.servlet-api-3.0.1.jar javac Test3.java build Test3.java java -classpath .:javax.servlet-api-3.0.1.jar Test3 run Test3 with dependency. Following is the output. It's OK here.  hello world1 hello world2  But when this command java Test3 run, Exception is thrown. The result at the end of this post. The weird thing is that "hello world1" could be printed out, but instead of printing out "hello world2" an exception is thrown.   Test1.java  import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.OutputStream; public class Test1 {     public void getRequest(HttpServletResponse resp) throws IOException {          OutputStream os = resp.getOutputStream();         resp.getOutputStream().close();     }      public void hello(String world) {         System.out.println("hello " + world);     } }   Test2.java  import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.OutputStream; public class Test2 {      public void getRequest(HttpServletResponse resp) throws IOException {         OutputStream os = resp.getOutputStream();         try {             resp.getOutputStream().close();         } catch (Exception e) {         }     }      public void hello(String world) {         System.out.println("hello " + world);     } }   Test3.java  public class Test3 {     public static void main(String[] args) {         new Test1().hello("world1");         new Test2().hello("world2");     } }   output of the final step. Test2.hello("world2") throw an exception:  hello world1 Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/ServletOutputStream     at cn.test.abc1.Test3.main(Test3.java:9)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:497)     at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletOutputStream     at java.net.URLClassLoader.findClass(URLClassLoader.java:381)     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)     ... 6 more   I am very confused with the Exception. Because I didn't use any code in the Class ServletOutputStream. And the difference of the Test1 and Test2 is only a try blocked.  This Question is not a duplicated question as it marked. Because JVM should not throw an Exception when a try block get involved.


does logitech C922 Pro compatible with ubuntu 16.04?

I am going to buy a webcam to be installed in Ubuntu 16.04. I am going to use it for skype


Rendering Colored Texture, but the result is a gray texture

I am making an object and look like this  But when i rendered the image, it turns out like this  This is my render properties  This is the material properties  I just want to render the image like the 3d view, can anyone help me please? I am new at this, and only follow tutorial from youtube.


Can a function from $(0,1)$ to $(0,1]$ be one-to-one and onto?

Does there exist a function from $(0,1)$ to $(0,1]$ both one-to-one and onto, not necessarily continuous?   I couldn't think of any. Any help would be appreciated!  Thanks,


If $f$ and $g$ are continuous on $[a,b]$, $f(a) \le g(a)$, and $g(b) \le f(b)$, prove there is a $c$ in $[a,b]$ with $f(c)$ $=$ $g(c)$.

If $f$ and $g$ are continuous on $[a,b]$, $f(a)$ $\le$ $g(a)$, and $g(b)$ $\le$ $f(b)$, prove there is a point $c$ $\in [a,b]$ such that $f(c)$ $=$ $g(c)$.  Any ideas on how to solve?  I think I have to use the Intermediate Value Thm but I'm not sure.


How is Screen Time calculated? Why is the calculated time seemingly longer than time spent on iPhone?

Under , the report for the time spent on my phone is 1 hour 5 minutes. However, when looking at all the apps used, the time spent on the phone adds up to about 28 minutes and not 1 hour 5 minutes. Time spent on iPhone for the full day:  But looking at all apps, the time spent is about 28 minutes    How is Screen Time calculated?  Why is time spent on the iPhone calculated to  1 hour 5 minutes if time spent on all apps is really about 28 minutes?    Note:  I'm using ios v14. iPhone SE 1st Generation. The iPhone is supervised, (but I don't see why that would matter). Share Across Devices is enabled, however, I don't own or use any other apple devices besides this iPhone (seemingly this shouldn't either matter).


If I use my miles to buy an American Economy MileSAAver tickets, do I get to pick my seats when I book the flight?


So  are generally considered implausible for two main reasons. One, it would an incredible amount (and type) of resources to build one. And two, a Dyson sphere would be unstable because if it was moved even slightly off center it would collapse into the star. These reasons are spelled out more thoroughly in countless articles, an example being:   So I have no problem with the first reason, but I'm curious about the second. So a Dyson would theoretically have an "equal" distribution of mass and uniform thickness. So couldn't shell theory be applied here? Shell theory states in a uniform spherical shell gravity can be calculated as though the mass was clustered at a single point. And objects within that shell do not have gravitational acceleration toward the shell's edges. So would the Dyson sphere actually fall into the star even budged a little bit? I'm assuming that shell theory works for gravity in both ways (on the star due to the shell and on the shell due to the star), which it should.


How does one stop automatic line spacing increases when typesetting tall math symbols?

Often when typesetting mathematics, one wants to use math symbols in line. When these are certain symbols, or more often, decorated symbols, whose height is sufficiently large, the line spacing (that is, the space between the current line and the previous one) is increased in order to compensate for the height of the symbol. A usual example is $\widetilde{f}$, for instance. I would like to stop this from happening, even if it leads to possible overlap of symbols between the two lines. Is this possible?  Another one that will certainly induce a lineskip increase is \overset{\alpha}{\to}. I would also like this not to induce a lineskip increase.  If it is relevant, I am using XeLaTeX with unicode-math and the Lucida fonts, but I would very much prefer a general solution, as I encounter this problem with computer modern (and the $\widetilde{f}$) as well.


Error with Perl interpreter and glossaries package on Windows

I'm a relatively new user of Latex. I'm using TeXStudio on a Windows 8.1 system writing a long document (document class book). I'm trying to make glossaries package work properly and after ~2-3h of googling it kinda work. The same TeXStudio on a MacBook, with exact same *.tex files work flawlessly.  On windows, when I compile the glossary (F9), i get the following:  Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\\\@input{ <-- HERE (.+)\.aux/ at C:\Program Files\MiKTeX 2.9\scripts\glossaries\makeglossaries line 634.   I'm not familiar with Perl syntax, but the 634 line is the following:  634 if (m/\\\@input{(.+)\.aux/}) 635    { 636       &scan_aux($1);  .  .      # v2.04 added  .      # (Fix provided by Daniel Grund)   .      next; 641    }   Compiling on the Mac is working properly.  I want to make it work on the windows system, as it's the professional computer that I use more often (I don't carry my Mac at work or my Win at home).  \documentclass[12pt]{book} ... \usepackage[acronym, toc]{glossaries} \input{./Tex_files/glossary.tex} \makeglossaries   The glossary.tex is the following:  \newacronym{EBL}{EBL}{Electron Blocking Layer} \newacronym{TFB}{TFB}{name)}   And i cite in the text as follows in two occasions, in chapters 1 and 2.  \acrfull{EBL} \acrfull{TFB}   The main.tex file i use after the \begin{document} is as follows:  \begin{document} .... \printglossary[type=\acronymtype, title= List of Abbreviations] \mainmatter \include{./TeX_files/chapter01} % Chapter 1 \include{./TeX_files/chapter02} % Chapter 2   I installed the Strawberry Perl version 5.26 64bit from perl.org as before installing it I got the message : "Perl interpreter not found".   My google searching didn't show any relative answers and therefore the post.. Sorry if it's a duplicate!  Many thanks in advance...  Alex  PS. Edited the document to add preamble and the rest of the code.


how do I print an unsigned char as hex in c++ using ostream?

I want to work with unsigned 8-bit variables in C++.  Either unsigned char or uint8_t do the trick as far as the arithmetic is concerned (which is expected, since AFAIK uint8_t is just an alias for unsigned char, or so the debugger presents it.  The problem is that if I print out the variables using ostream in C++ it treats it as char.  If I have:  unsigned char a = 0; unsigned char b = 0xff; cout << "a is " << hex << a <<"; b is " << hex << b << endl;   then the output is:  a is ^@; b is 377   instead of   a is 0; b is ff   I tried using uint8_t, but as I mentioned before, that's typedef'ed to unsigned char, so it does the same.  How can I print my variables correctly?  Edit: I do this in many places throughout my code.  Is there any way I can do this without casting to int each time I want to print?


Remove the scientific notation which is unreasonable

From the original data, we know that they are nearly 0.087 rather that 0.087 x 10^-2. Why is there scientific notation (10^-2)? It looks ridiculous. Please help me figure it out. Thanks very much!   MWE:  \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \definecolor{mycolor1}{rgb}{1,0,1}  \pgfplotstableread{ X           Y1 1    0.0873514639102964  2    0.0873656441069913  3    0.0873509320240032  4    0.0873490368814644  5    0.0873430960617957  6    0.0873334626756388  7    0.0873430596012905  8    0.0873485872405474  9    0.0873519301953318  10  0.0873474824394306 11  0.08735183859007     12  0.0873408783047386 13  0.0873439016123011 14  0.0873424452271129 15  0.0873452848079798 16  0.0873467228778811 17  0.087348210873026    18  0.0873464310394191 19  0.0873469131127228 20  0.0873449430894595 }\datatable  \pgfplotsset{     width=9cm,     height=6cm,     scale only axis,     xmin=0.5, xmax=20.5,     tick align = outside,     yticklabel style={/pgf/number format/fixed},   } \begin{tikzpicture}  \begin{axis}[     xtick={1,...,20},     ymin=0.08715,     ymax=0.08740,     ytick={0.08715,0.08720,0.08725,0.08730,0.08735,0.08740},     yticklabels={0.08715,0.08720,0.08725,0.08730,0.08735,0.08740},     xlabel={$x$},     ylabel={$y$},     y axis line style={mycolor1},     ytick style={mycolor1},     yticklabel style=mycolor1,     yticklabel style={/pgf/number format/fixed},     axis x line*=bottom,     axis y line*=left] \addplot [     color=mycolor1,     solid,     line width=1.5pt,     mark size=2.7pt,     mark=square*,     mark options={solid,fill=mycolor1}]     table [x=X, y=Y1]{\datatable}; \label{plot1} % So we can recall the plot style later on \end{axis} \end{tikzpicture}% \end{document}


Manuscript status changed from "Reviews completed" to "Editor assigned"

I have been confused with the present status of my manuscript whose status follows the following timeline:   Manuscript initially submitted through Editorial Manager (Springer): 25 Jan 2017 Under Review: 27 Feb 2017 till 9 Jun 2017 Reviews completed: 10 Jun 2017 till 22 Jun 2017 Editor assigned: 22 Jun 2017   The journal is in the field of Computer Science and Computational Mechanics (Applied Computer Science).  My inferences from the above strange timeline:   The reviews have been completed and the system administrator or the journal manager assigned the editor (who is assumed to be associated with it earlier) to take care of the review reports and make a call. The number of review reports is not sufficient. It would be re-reviewed and handled by another editor. It is a software issue or a bug.   I have the following questions:   Whether is my inference correct? As one can see, it has been 6 months already. Is it too early to send a gentle reminder to the editor-in-chief to look after my manuscript? Is such a timeline of manuscript 'strange' at all? (Although it is difficult to answer this unless the editorial manager software is understood properly.)   Related posts and questions:     My question is different as the timeline does not follow the traditional journal workflow as discussed in the question


Apache mod_rewrite with content moved to different subdomain

I have a url xyz.example.com for which contents were moved to abc.example.com.  I know this can be redirected using mod_rewrite and had moved too, but when accessing xyz.example.com, in user's browser too, url changes to abc.example.com which is not acceptable.  I want that in user's browser, only xyz.example.com and not the abc.example.com to be visible. Please suggest appropriate configuration which I can use in my conf file,  Thanks in advance.


Why does putting a 1/2 in front of the squared error make the math easier?

Per wiki, the mean squared error (MSE)  like:  $$ \operatorname {MSE} ={\frac {1}{m}}\sum _{i=1}^{m}(y_{i}-{\hat y_{i}})^{2} $$  The  added a $1\over2$ in front of the formula and explained it a little bit. I am a little bit confused. How does putting a $1\over2$ in front of the squared error make the math easier?


Problem using template specialization in headers

I am implementing my templates in a header file "ival.h". My problem is that this is causing some problem with a template specialization. Are template specializations implemented in .cpp rather than in headers as templates are?  I have the following code:  //In ival.h #ifndef IVAL_H #define IVAL_H  #include<string> #include<sstream>  template <typename T> bool is_type(std::string);  template<> bool is_type<int>(std::string);  template<typename T> T get_type(std::string);  bool yesNo(std::string);  //------------  template <typename T> bool is_type(std::string Input) {     std::stringstream ss(Input);     T test;     if (ss >> test)     {         std::string remainder;         ss >> remainder;         return (remainder.size() == 0);     }     else return false; }  template <> bool is_type<int>(std::string Input) {     std::stringstream ss(Input);     int test;     if (ss >> test)     {         std::string remainder;         ss >> remainder;         if (is_type<double>(Input) && remainder[0] == '.')         {             while (remainder[remainder.size() - 1] == '0') remainder.pop_back();             remainder.pop_back();         }         return (remainder.size() == 0);     }     else return false; }  template<typename T> T get_type(std::string prompt) {     T output;     std::cout << prompt;     std::string Input;     while (std::getline(std::cin, Input) && !is_type<T>(Input))     {         std::cout << "Invalid input type. Please try again:\n"             << prompt;     }     std::stringstream(Input) >> output;     return output; }  #endif /*IVAL_H*/   And:  //In ival.cpp #include "ival.h" #include <iostream> #include<sstream>  bool yesNo(std::string prompt) {     while (true)     {         char output{ get_type<char>(prompt + " [y/n]: ") };         if (output == 'y' || output == 'Y' || output == 'n' || output == 'N') return (output == 'y' || output == 'Y');         std::cout << "Invalid input. Please try again:\n";     } }    The bool yesNo(std::string prompt) function in .cpp attempts to use the templates with char but it fails as:  error LNK2005: ya se definió "bool __cdecl is_type(class std::basic_string,class std::allocator >)" (??$is_type@H@@YA_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) en ival.obj  The problem disappears if I remove the definition of the template function specialization from the header file and paste it into the .cpp file. Why is this happening, and how can I keep all the definitions in my header.   The problem also disappears if I remove all template definitions from header and include them in .cpp with explicit instantiation to all types I want to use the templates with i.e int, char, double, float, std::string.  Is this second approach acceptable? Instantiation to all the types seems as not the thing to do.


Can someone suggest a way to compare the values of two dates greater than, less than, and not in the past using JavaScript? The values will be coming from text boxes.


How I can to prove the succession $x_n$ converge to 1?

Let $0<x_0<1$ if $x_{n+1} = sin(x_n)$ show that $\lim_{n\to\infty} \frac{x_n}{\sqrt{3}/n} = 1$


Getting error  java.lang.NullPointerException: null at net.sf.saxon.event.ReceivingContentHandler.startPrefixMapping(ReceivingContentHandler.java:291)   in Camel Java DSL project when im trying to transform xml with xslt. This xslt works perfectly in oxygen editor with saxon,, but when i use same xslt in apache camel with java project for transformation getting above exception. Is there any way i can solve this with java and camel project. I used saxon HE 9 as dependency also.  XML ::::   <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Lowdtl xmlns="http://domain/crd/bdr/services/get">     <PreDtl>         <LowestDtl>             <Otpxyz abc="000" xyz="NPS" yahoo="0" temp="" />             <Otpxyz abc="001" xyz="NPS" yahoo="0" temp="" />               </LowestDtl>         <HighDtl>             <linkDtl>                 <Otpxyz abc="000" xyz="NPS" yahoo="0" temp="" />                 <Otpxyz abc="001" xyz="NPS" yahoo="0" temp="" />               </linkDtl>             <HighDtl>                 <BinDtl>                     <RestLin abc="003" xyz="NPS" yahoo="0" temp=""  />                 </BinDtl>                 <DatDtl>                     <DatCd abc="003" xyz="NPS" yahoo="0" temp=""  />                 </DatDtl>             </HighDtl>         </HighDtl>     </PreDtl>     <RemoveDtl abc="003" xyz="NPS" yahoo="0" temp=""  >         <Ts SysTs="2019-10-29 07:54:43.520" />         <RemoveMsg>             <rmv abc="003" xyz="NPS" yahoo="0" temp="" />         </RemoveMsg>     </RemoveDtl> </Lowdtl>   XSLT ::  <xsl:stylesheet version="2.0"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xpath-default-namespace="http://domain/crd/bdr/services/get">     <xsl:output method="xml" indent="yes" />     <xsl:template match="@* | node()">         <xsl:copy>             <xsl:apply-templates select="@* | node()"/>         </xsl:copy>     </xsl:template>     <xsl:template match="RemoveDtl" /> </xsl:stylesheet>


I already known how to prove that $\lim_{x\rightarrow 0}x^{x^x}=0$ and $\lim_{x\rightarrow 0}x^x=1$. I also tried to use L'Hôpital's rule for this question but it didn't work. How to find the limit? (The limit should be $1$ from the graph sketching.)


Passing InputText to Controller Extension

I have read through all the posts really but still not able to figure this out. I want to pass the no. of hours that are input on the VF Page back to the controller. Basically, user should be able to update the no. of hours on his saved Timesheet. Below is my VF Page -  <apex:page standardController="Project_Timesheet__c" extensions="i3_ProjectTimesheet_Controller_Edit" sidebar="false"> <apex:inputText value="{!TSHours}" label="Hours" id="TSHours"/>    Below is my extension     public class i3_ProjectTimesheet_Controller_Edit {  public i3_ProjectTimesheet_Controller_Edit(ApexPages.StandardController stdController)  {         CurrentTS = (Project_Timesheet__c)stdController.getRecord();         CurrRecId = ApexPages.currentPage().getParameters().get('Id'); TSRecord = [Select Contract__c, Assigned_To__c, Account__c, Project__c, ProjectPhase__c, Hours__c, Comments__c, Date__c from Project_Timesheet__c where ID = :CurrRecId]; } public decimal TSHours  {   get {         return TSRecord[0].Hours__c;         }    set; } public PageReference Save() {   system.debug (TSHours); }   What am I missing?


What is the "topology induced by a metric"?

My book gives the following definition:     Let $(M,d)$ be a metric space, and let $\mathcal{T}$ be the collection of all subsets of $M$ that are open in the metric space sense...  $\mathcal{T}$ is called the topology generated by d   Then it later says to prove things about two different metrics generating the same topology. However I'm very confused about what all this means.   When I read "all subsets," I think of the theorem that says a set with $n$ elements will have $2^n$ subsets. (ex. all the subsets of $\{1,2,3\}$ are $\{\emptyset, \{1\},\{2\},\{3\},\{1,2\},\{1,3\},\{2,3\},\{1,2,3\} \}$). So I think "all subsets that are open" would be like, If M is the set (1,5), then an open subset would be any set $(a,b)$ where $1<a<b<5$, and then all subsets would be all possible union combinations of these "$(a,b)$" sets.     Its seems to me that metrics have nothing to do with subsets. Clearly there is something i'm not understanding. Please Help me.   It would be very enlightening, if someone could give me some simple examples of 1 set and 2 metrics generating two different typologies.


While trying to fix an obscure hardware bug, it was suggested that adding a couple of parameters to the kernel might resolve the issue.  I can of course do that, but I was wondering whether I can make these changes to a running kernel. In particular, I know that procfs and sysfs provide a way to make changes to the running kernel, but I am unsure how to map kernel parameter names to file paths. (I also presume that not all settings are changable at runtime, and these particular parameters might well not be configurable once the system is booted.)  The specific parameters I'm interested in are  i8042.nomux=1 i8042.reset   I'm particularly unsure as to whether it's possible to issue the reset command on a running system.  If these parameters are tweakable at runtime, where would I find them?


How do I display the binary representation of a float or double?

I'd like to display the binary (or hexadecimal) representation of a floating point number.  I know how to convert by hand (using the method ), but I'm interested in seeing code samples that do the same.  Although I'm particularly interested in the C++ and Java solutions, I wonder if any languages make it particularly easy so I'm making this language agnostic.  I'd love to see some solutions in other languages.  EDIT: I've gotten good coverage of C, C++, C#, and Java.  Are there any alternative-language gurus out there who want to add to the list?


Is there a way to flip the functionality of the green full screen / maximize button?

As we all know, clicking the green traffic light button on the windows in mac osx enter the app into fullscreen mode.  Doing an Option + Click makes the window usually resizes to the to the maximum possible size.  I rarely use fullscreen, only for iTunes I think, and sometimes mail.  I use Option + Click all of the time.  My question is - is there a way to flip the functionality of the green button, so Click does the Option+Click function, and vice versa.  I'm on the latest Sierra.  Thanks.


time.sleep not working per item in range or list

I was trying to make a code like this def no(t=.001):     print("N", end='')     for i in range(1000):         print('o', end='')         time.sleep(t)     print()  So that when I call no() I would print a long "Nooooo...", waiting some time between each 'o'. What happens instead is that the function halts, for the whole total time (1 second with the default argument), then prints the whole list. Is this intended? And if not how should I obtain my intended effect?


How can I efficiently convey different perceptions of the same thing to different players?

I'm building an encounter around illusions, but this works for other similar situations.     The party moves along the narrow corridor. As they turn the corner, they see just another regular corridor.   But in fact,     An illusion (like Major Image) was cast on the ground to hide a giant pit trap.   I can either ask the players to roll an Investigation check or use their passive scores. I tend toward the latter so as to not alert them something is wrong. Anyway, assume that some players indeed notice it's a trap. Others do not.   How do I describe the scene to players when they have different perspectives?  Should I assume that the players who realize it's an illusion just plainly tell the other party members? Should I use secret notes? Ideally, I'm looking for a system that fills my requirements.   I don't want players to know a passive skill check was just performed I don't want to alert players who failed to recognize the trap that something is amiss I don't want to slow down the game I want the players who did recognize the trap to have the option to reveal that to other party members (they might not remember that other PCs may have not seen it, or they might want to screw over the other PCs)


bind -x leaves terminal in a state resembling ^V

I define a shell keybinding in my ~/.bashrc like so:  bind -x '"\e\C-w":"/usr/bin/reset"'   This does make Ctrl-Alt-w launch the reset executable. However, it leaves the terminal in a state that resembles the one you get into by pressing Ctrl-v. So, for example, if immediately after resetting in this way I press Ctrl-p, instead of invoking the action of that shortcut (repeat previous command) I get ^P printed.  Any idea what's causing this problem and how to fix it?  EDIT: I am attaching a Python program that reproduces the messed-up terminal state I am trying to fix with the reset. I encounter this condition very often while debugging multi-threaded applications:  import pdb, thread, time  def interrupt():     time.sleep(2)     pdb.set_trace()  thread.start_new_thread(interrupt, ()) raw_input('? ')   To reproduce the messed-up state, just run the code above, and press Enter when you see the debugger invoked (it will print a bunch of text, ending with pdb.set_trace(), about two seconds after you run the program and the initial prompt appears).


Is there a single word for "should probably"?

I use the term "should probably" very, very frequently in order to say "to the best of my knowledge up to this point, this is the correct way to do X, but your input is still valuable"    I'm currently writing out some spec sheets, and it get's very tiresome using "should probably" over and over again.    Is there a single word which expresses the concept of "you should probably do this"?  If not, is there a word which is stronger than "could" and weaker than "should?"


Are there simple models of Euclid's postulates that violate Pasch's theorem or Pasch's axiom?

While reading a  () about the history of modern logic, I learned that some opinions (about deductive/axiomatic mathematics) typically attributed to David Hilbert can be traced back to Moritz Pasch. After googling for Moritz Pasch, I was surprised to learn that he had found important implicit assumptions in Euclid missing from the axioms/postulates. I read on wikipedia that both  and  cannot be derived from Euclid's postulates.  Are there simple models similar to elliptic and hyperbolic geometry for the  parallel postulate that allow to illustrate this fact in a simple way?


What are the main reasons for filler episodes?

This isn't a question about a specific anime. However, I wonder why filler episodes exist.  At first, I thought it was to allow the manga to advance a bit more when the anime was catching up. However, in Naruto (for example), the manga has finished and the anime still has fillers.  For other series like One Piece, the anime is relatively close to the manga and there are no fillers (Thanks God!)  What's the purpose of filler episodes?


Lightning design system - SVG disappears after rerender

I am building data table, here is html code from browser before rerendering table. I use actionFunction with rerender attribute. The problem is that svg disappears after rerendering.  Before rerender:                Sort         Account Name
             <svg aria-hidden="true" class="slds-icon slds-icon--x-small slds-icon-text-default slds-is-sortable__icon">                 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/resource/1454076265000/SLDS01201/assets/icons/utility-sprite/svg/symbols.svg#arrowdown"></use>             </svg>
               	   After rerender:                Sort         Account Name

      	   How to solve this? The response of request for rerender in Chrome dev tools looks like this:     Maybe the issue is that xmlns="http://www.w3.org/2000/svg" is missing?


Add '?' and '=' characters to query string

I'm trying to pass '?' and '=' symbols to a page using routing.yml  company.calc:   path: '/form?company={nid}'   defaults:     _controller: FrameworkBundle:Redirect:redirect     _title: 'Calc'  requirements:    _permission: 'access content'   but the symbols are transcoded to HTML-entities. It looks like form%3Fcompany%3D%3Fcompany%3D18141 and leads to page 404.  Any ideas how to pass the string like   /form?company=1234    ? This string is necessary to prepopulate the form's field.  Find the same question  but no reply, no solution :(.


Would it be possible for Stack Overflow to be accessible over IPv6?

According to my IPv6 tunnelbroker  the world will end in approximately 712 days when we finally run out of IPv4 addresses.  Would it be possible to enable IPv6 access to the Stack Exchange family of websites?


How to write a whole section in Chinese with lualatex?

I want to have one section of my work with whole Chinese with lualatex but the other sections are in English.  I found this question is very useful, .  However, when I use the first answer in that question (copy code from the answer). I get a lot of errors with this pattern  Font \JT3/mc/m/n/10=IPAExMincho:jfm=ujisv at 9.62219pt not loadable: metric da ta not found or bad.  The second answer is work but has the problem as Leo Liu mentioned. The line break is make no sense.  I also tried this solution from   \documentclass{article} \usepackage[UTF8]{ctex} ...   but I get font-not-fount, "SimHei" and "Kaiti"  Another solution I've tried is  \documentclass{article} \usepackage{CJK} \begin{document} \begin{CJK}{UTF8}{gbsn} 你好 \end{CJK} \end{document}   There is no problem with compilation but I get the empty pdf file. If I put some English characters, only English characters are shown.  How to solve this problem?  Thanks.  Edited: Many people suggested that this question might be the same as . As I mentioned in the context, I get some errors from the solution in that question and it didn't work for me. So, my question here is to find another solution for typing Chinese in latex with lualatex which leads to no errors. I hope that someone can give me new solutions or how to avoid those errors in the context.


How can one prove that $\lim_{n \to \infty}a^{1/n}=1$ for every $a>0$?

Prove that $\lim_{n \to \infty} a^{\frac{1}{n}} = 1$ if $a >0$.  In my textbook, we are given a suggestion to let $a^{\frac{1}{n}} = (1+h_n)$ and then show that the $h_n$ term goes to zero using a Theorem that states the following conditions:  $\lim_{n \to \infty} = \infty,$ if $a >1, 1,$ if $a = 1,$ and 0, if $\vert a \vert < 1$. I apologize for not formatting the above cases appropriately; I could not figure out how to use a giant left brace to group them altogether.  If I rewrite it as $a^{n^{-1}}$, then I thought that this might help, but I don't think the Binomial Theorem would then apply since the exponent is negative. Furthermore, the problem is only concerned with the positive, real $n$-th roots. I am quite stuck on this problem and any suggestions or advice would be greatly appreciated.   I am using the textbook Introduction to Analysis by Arthur Mattuck.


How to quick move+resize a window using ALT key+Mouse on Ubuntu Mate 15.04?

On earlier Linux GUI Desktops, it was quick and easy to  move around or resize any window just by holding the ALT Button + clicking and dragging the mouse on almost any position of the app window, so there was no need to "aim" for a specific "handle" or spot on the window.   With Ubuntu Mate 15.04, it seems it does not work anymore. Surprisingly, I haven't even managed to find a solution on the net yet.  Does anyone know how to re-enable this feature on the default Ubuntu Mate 15.04 Desktop ?


SObject row was retrieved via SOQL without querying the requested field:

I am getting this error with the code below. I've looked into the other cases on here. In my case I am referring to a relationship name (__r) which I am assuming is pulling correctly. It's a field which is a lookup to User :   Agreement_CSH_to_be_completed_by__r  Here is the code which is giving me problems :   public void doManagedClients() {         addMsg('Starting processing of Managed Clients.');         Integer startSize = CSH_Data.size();          String SOQL = 'Select Id, OwnerId, Owner.UserName, Account__c, RecordTypeId, Name, Agreement_Client_Status_History__c ' +             'From Contract_Terms__c Where ' +             '   ( recordtypeid = \''+ ((String)A_N_Rectype).substring(0,15) + '\' ) and ' +                '   Agreement_Client_Status_History__c = \'Monthly\' ' +             'order by createddate desc nulls first' ; system.debug('#####333#### ');               addMsg(DEBUG,'Managed Query is: ' + SOQL + '\n');         for (Contract_Terms__c a: Database.Query(SOQL)) {             if (!a.Agreement_CSH_to_be_completed_by__r.isActive) {                 totalInactiveOwners++;                  addMsg('Account: ' + a.Name +  ', has an inactive owner.  Username: ' + a.Agreement_CSH_to_be_completed_by__r.isActive + '.');             } else {                             totalManagedCSHs++;                 addMsg(DEBUG,'Creating a Managed CSH for Account: ' + a);                 CSH_Data.add(new CSH_and_Share_Pair(a, createClientStatusHistory(a)));                 needflush(false);                 if (error) break;             }         }         needflush(true);         addMsg('End of Managed Clients.');           }   Is it just because I don't have a.Agreement_CSH_to_be_completed_by__r included in the SOQL ? I thought I got different errors for that, so I'm a little confused.  Thank you for your help.


Steam fatal error steam needs to be online to update, but was set to offline movies

I tried to install steam but is impossible to run it  I get this when I try to run it  steam Running Steam on ubuntu 12.10 64-bit STEAM_RUNTIME is enabled automatically ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt". Installing breakpad exception handler for appid(steam)/version(0_client) Installing breakpad exception handler for appid(steam)/version(1.0_client) Installing breakpad exception handler for appid(steam)/version(1.0_client) Installing breakpad exception handler for appid(steam)/version(1.0_client) SteamUpdater: Error: Download failed: http error 0SteamUpdater: Error: Steam needs to be online to update.  Please confirm your network connection and try again. Installing bootstrap /home/elin3t/.local/share/Steam/bootstrap.tar.xz Running Steam on ubuntu 12.10 64-bit STEAM_RUNTIME has been set by the user to: /home/elin3t/.local/share/Steam/ubuntu12_32/steam-runtime ILocalize::AddFile() failed to load file "public/steambootstrapper_english.txt". Installing breakpad exception handler for appid(steam)/version(0_client) Installing breakpad exception handler for appid(steam)/version(1.0_client) Installing breakpad exception handler for appid(steam)/version(1.0_client) Installing breakpad exception handler for appid(steam)/version(1.0_client) SteamUpdater: Error: Download failed: http error 0 SteamUpdater: Error: Steam needs to be online to update.  Please confirm your network connection and try again.   and this is my hardware VGA   lspci | grep VGA 01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RV710 [Radeon HD 4350]   And this my distro version  lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 12.10 Release:    12.10 Codename:   quantal   thanks if some can help me!!  I tried the forum solution but I didnt found the registry.vdf file to change the lines


JavaScript function expression assigned to a variable (pass by reference or value?)

I have a doubt about the following codes. I thought that data-type primitives assigned to a variable in JS were passed by value, while objects were passed by reference. If functions are objects in JS, I thought they should be passed by reference, but the following two codes behave as passed by value:  CODE 1  var x = function hello(){ console.log("hello")};  console.log(x);  var y = x;  console.log(y);  x = function bye(){console.log("bye")};  console.log(x);  console.log(y);   OUTPUT  [Function: hello] [Function: hello] [Function: bye] [Function: hello]   CODE 2  In this case I assigned a method to a global variable and the behavior is the same:  var x = {name:"Max",         action: function one(){console.log("one")} }  var y = x.action;  console.log(y);  x.action = function two(){console.log("two")};  console.log(x.action);  console.log(y);   OUTPUT  [Function: one] [Function: two] [Function: one]   I truly appreciate any insight and explanation on this.


I want to understand the logic behind bootstrapping. I'm reading this  and on page 108, he started to discuss the bootstrapping technique:  So suppose, my population has $n=2000$ and $T_5$ is the $\text{median}(X_1,X_2,X_3,X_4,X_5)$, using the technique explained in the book I estimate this value. What I don't understand is why we care about $T_n$? shouldn't our concern be the population parameter? in another words, suppose we don't have the CLT and we want to estimate $\mu$, why do I care about $\bar X_n=\frac{X_1+\ldots+X_n}{n}$? If $T_n$ is an estimator for the population parameter, shouldn't he prove this?


Rational Coordinates with two intersecting lines

If there are two 2D lines with rational slopes that intersect, must the intersection point have rational co-ordinates?   I'm having a hard time wrapping my head around this and not sure how you prove it?


Libre Office Calc - small sheet toolbar?

is there any possible way to enlarge this toolbar where sheets are listed (Sheet 1, Sheet 2, Sheet 3, ...)? See the below screenshot:     In my case, these cards are so small that it's barely possible to click on it. Please help!


List of Algorithm: add "algorithm" label

I want to add label "Algorithm" to the numbering of list of algorithms, e.g.,    Algorithm 1. Search Algorithm 2. Sort   I tried different solutions found here but does not work.  The main .tex file is here:  \documentclass[PhD]{msu-thesis} \usepackage{algorithmic} \usepackage{algorithm}  \title{Contributions to Computer-Aided Diagnosis of Prostate Cancer in Histopathology} \author{Kien Nguyen} \date{2013}  \begin{document}  \frontmatter  \maketitlepage  \include{Chapter_UpdateJune/abstract}  \clearpage  \include{Chapter_UpdateJune/acknowledgement} \SingleSpacing \clearpage \listoftables \clearpage \listoffigures \clearpage \listofalgorithms %\addtocontents{loa}{\def\string\figurename{Algorithm}} %\renewcommand*{\thealgocf}{Algorithm~\arabic{algocf}} %\addcontentsline{toc}{chapter}{List of Algorithms} \mainmatter %\include{Chapter_UpdateJune/ch1_intro_v2} \include{Chapter_UpdateJune/ch2_glandseg_v7} %\include{Chapter_UpdateJune/ch3_imageclassify} %\include{Chapter_UpdateJune/ch3_nucleibased_v2} %\include{Chapter_UpdateJune/ch4_retrieval_v2} %\include{Chapter_UpdateJune/ch5_cytology_v3} %\include{Chapter_UpdateJune/ch6_summary} \backmatter \makebibliographycover \SingleSpacing \bibliography{FullBib} \bibliographystyle{IEEEbib}  \end{document}    Thanks


Can i develop a .net project without visual studio ,if yes is .net framework is cost or freeware

Everybody saying that java is freeware and .net is not freeware but i download and install .net framework to my lap and i can write asp.net code in freeware ide .can i able to  develop it without visual studio  and i want ti know which is not freeware .net or visualstudio


I'm making a basic array class in VS2015. It initially worked when the function code was in the header file, but now that I've moved that over to a .cpp file I get a C1004: unexpected end-of-file found for the header file.  Array.h:      #pragma once      template <class T> class Array     {     private:         T *m_data;         int m_length;      public:          Array() : m_length(0), m_data(nullptr) {}          Array(int length) : m_length(length);          Array(Array<T>& copyArray) : Array(copyArray.size());          ~Array();          void clear();          T& at(int index);          T& operator[](int index);          int size();     };   Array.cpp:  #include "Array.h"  template<typename T> Array::Array(int length) : m_length(length) {     m_data = new T[m_length]; }  template<typename T> Array::Array(Array<T>& copyArray) : Array(copyArray.size()) {     for (int index = 0; index < copyArray.size(); ++index)     {         at(index) = copyArray[index];     } }  template<typename T> Array::~Array() {     delete[] m_data;     m_data = nullptr; }  template<typename T> void Array::clear() {     delete[] m_data;     m_data = nullptr;     m_length = 0; }  template<typename T> T& Array::at(int index) {     if (m_data != nullptr)     {         if (index < m_length && index >= 0)         {             return m_data[index];         }         throw OutOfBoundsException;     }     throw NullArrayException; }  template<typename T> T& Array::operator[](int index) {     if (m_data != nullptr)     {         if (index < m_length)         {             return m_data[index];         }         else             throw "Out of array bounds";     }     else         throw "Array is null"; }  template<typename T> int Array::size() {     return m_length; }


How to write a matrix like this    I tryed this   $$ \begin{pmatrix} J_0 & O &\cdots\\ 0& J_{n+1} & 0\cdots \end{pmatrix} $$   I don't know how to do


how to trigger a button created on javascript using javascript?

I am currently working on a web application that needs to preview some report using a button inside a data table. each row on the data table has its own button created on the javascript and I want to trigger that button using the same javascript file.  Is there anyway to do this? Please see code below:        $('#AccountList').append('
'         + '' + row.ciCODe + '	'         + '' + row.FullName + '	'         + '' + row.LoanType + '	'         + '' + row.Bank + '	'         + '' + row.Amount + '	'         + '
' + xText + '
	'                     + '<button class="btn btn-primary btn-outline-primary" id="btnPreview" name="btnPreview"></button>'         + '<button class="btn btn-danger btn-outline-danger" id="btnReinvestigate" name="btnReinvestigate"></button>'         +'	'         + '
');     $("#btnReinvestigate").click(function(){         alert("Hello Worlds!");      });       $("#btnPreview").click(function(){         alert("Hello World!");      });   Thanks and Regards


Expected number of bins with more than one ball

Suppose that $n$ balls are randomly thrown into $N$ bins.  We can compute the expected number of bins that contain at least one ball as $E(X) = N(1 - (1 - 1/N)^n)$.  Now, suppose that instead we are asked for the expected number $E(Y)$ of bins that contain more than one ball.  Can we recover this from $n$ and $E(X)$?  My intuition is suggesting that this ought to be $E(Y) = n - E(X)$, but I'm not sure one way or the other.  My intuition is coming from the pigeon hole principle, I think.  If $E(X)$ bins are occupied, and there are $n$ balls, then $n - E(X)$ balls are in a bin with at least one more ball in it.  Granted, that doesn't tell me how the $n - E(X)$ balls are distributed in the  bins.  I am trying to compute the expected number of bins with exactly one ball directly.  Let $N_i$ be the number of balls in the $i$th bin, and let $Z_i = 1$ if $N_i = 1$, and $Z_i = 0$ otherwise.  Each $N_i$ is binomial with parameters $n$ and $p = 1/N$.  Then $E(Z_i) = P(Z_i = 1) = P(N_i = 1) = \frac{n}{N} \left(\frac{N-1}{N}\right)^{n-1}$.  So $E(Z) = n\left(\frac{N-1}{N}\right)^{n-1}$.


I myself am dyslexic and wondered about the fact that it is expected of users to have the spelling correct. I saw friends of mine (whose native language isn't English) make some really bad grammar mistakes, but it was still clear to everyone, and thus getting down votes. Although this might not be expected from users, this is a community driven page so what ever the majority thinks will probably be applied because of the auto ban.  So my question: what if you are dyslexic? Are you doomed to be banned after a "secret" number down-votes?  because of this I am also not encouraged to post answers.  P.s. My dyslexia isn't that bad (anymore) but still writing this took me some time ;-)  EDIT:  I think at its core, the question in hand is: how are we evaluating ourselves and those who are connected to us – by NoProblemBabe - This was exactly what i was trying to approach


How to improve image clarity in Unity 3d. If we use same images for game developing in Adobe Flash and in Unity , flash game have more clarity , but in unity image will blur . Text Mesh also blur  How to get good clarity in unity games   I made a 2d game using quad,cube , sprite and Text Mesh . Platforms Android ,iPhone , Mac ,PC . Every platform have poor clarity  Image size is 44X44 pixels to 1024x1024 pixels


A simple code like this:  \documentclass[12pt,a4paper]{article} \usepackage{hyperref} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  \begin{document} the first page \clearpage the second page  \label{key} \clearpage I want to returen to page \pageref{key}, but return to page 1 when clicking the typeset number "2". \end{document}   why does the \pageref workt wrong?


How long does fresh salmon last in the freezer?

I bought salmon 2 weeks ago, and left it in my freezer. Is it still safe to consume it? what about consuming it raw?


Why 9 mod -7 = -5? Quotient and remainder with negative integers.

Forgive me if this question does not belong on this site for it is simplistic and this is my first post, however I do not seem to understand the modulo function when it comes to negative numbers.  I'd assume the process for calculating modulo would be the same as with positive numbers:   9 % 7 = 2 because 9 - (7 * 9/7) = 9 - (7 * 1) = 2   So wouldn't 9 % (-7) = 9 - (-7 * -9/7) = 9 - (-7 * -1) = 2?


Let $X$ and $Y$ be two independent uniform on $(0,1)$ . Compute $E(X   \mid X < Y )$.   I was asked this question on an exam and here is how I solved it:  We have $f_X(x)=f_Y(y)=1$ and by independence $f_{X,Y}(x,y)=1$. Hence,   $$ f_{X \mid Y} (x \mid y) = \frac{ f_{X,Y}(x,y)}{f_{Y}(y) } = 1 $$  So,  $$ E(X \mid X < Y) = \int\limits_0^y x f_{X \mid Y} (x \mid y) d x = \int\limits_0^y x dx = \frac{y^2}{2} $$  I think my answer is reasonable. I only got 2 points out of 10 on this question which means the entire procedure is flawed? what is my mistake here?


Programmatically Create X509 Certificate using OpenSSL

I have a C/C++ application and I need to create a X509 pem certificate containing both a public and private key.  The certificate can be self signed, or unsigned, doesn't matter.  I want to do this inside an app, not from command line.  What OpenSSL functions will do this for me?  Any sample code is a bonus!


asks what constraints there are on the global topology of spacetime from the Einstein equations. It seems to me the quotient of any global solution can in turn be a global solution. In particular, there should be non-orientable solutions.  But does quantum physics place any constraint? Because it seems to me that if space by itself is non-orientable then what happens to, say, neutral kaon interactions along two different paths that come back to the same spot with opposite orientations?  So then, is there any reason why time cannot be non-orientable? For example my mental picture (two space dimensions suppressed) is of a disc. The big bang is the centre, time is the radial direction, space is the circumferential direction. A timelike geodesic that avoids black or white holes will start on the big bang, go out to the edge of the disc, continue on the opposite edge with time and orientation (and presumably matter/anti-matter) reversed, and return to the big bang (which is also therefore the same as the big crunch). The "reflection time" of the universe would be large enough that thermodynamic violations are not observed.


Given an infinite poset, show that it contains either a infinite chain or an infinite totally unordered set.

Been thinking about this one for awhile and I'm still stuck...  Thought about proving it by arriving at a contradiction but I haven't reached anything noteworthy.  If you do a proof by contradiction, you're assuming that you have an infinite poset that does not contain an infinite chain and infinite totally unordered set but I don't know how that helps me :(


Call code once when controller is first accessed

I have a C# MVC 5 web application which I have created a model that contains categories and then I used the automatically created controller and views via MVC 5 Controller with views, using Entity Framework.   I have several other controls that need a list of those categories.  The list of categories is needed at least once per page but sometimes multiple times.  Instead of doing multiple database calls, I just read the information into a list, like this:  var categoryQuery = from d in db.Categories                     orderby d.Name                     where d.Visible == true                     select d; List<Category> categoryList = new List<Category>(); categoryList.AddRange(categoryQuery);   Is there somewhere in my controller that I can put this code so that it is called only once but then I can use the list multiple times?  Edit:  Editing to provide a better example.  In my _Layout.cshtml page, I call an HTML action which returns a partial view to display the category list:  @Html.Action("Menu", "Categories", new { DropdownMenuTitle = "Categories" })   Then on my Index.cshtml page, in the same controller, I do another database call to get a list of the categories which I create a SelectList and then a DropDownList on the page.  How do I do this without the two database calls?


Duration of stay one day shorter than the validity period

I have a Schengen visa that is valid from 13 Nov 2016 through 20 Nov 2016 with a duration of stay: 7 days. I entered the Schengen zone on the 13th.    Can I exit the Schengen zone on 20th (8th day) or is it mandatory to exit on the 19th?


Is it worth repairing a broken kit lens?

I dropped my camera while on holiday last summer. Thankfully, my camera wasn't damaged but the kit lens has lost the ability to autofocus and the UV filter and 58mm to 52mm filter step-down (I use it to attach a fisheye filter to the lens) I had on its end are stuck and won't come off.  I've replaced the lens with an 18-200 zoom lens so I don't especially need it. I was wondering if it was worth getting the lens looked at and possibly repaired?  I've heard many places will charge you £50 or so just to look at the lens and given the cost of the kit lens I'm not sure it's worth it.


was a bit of a surprise. Why am I getting notified in Portuguese?


How to solve 5x5 grid with 16 diagonals?

I have  and I have to fill 16 little squares with a diagonal  Rules   You cannot place more than 1 diagonal in each square The diagonals cannot touch each other (example bellow)       But what I seek here is a mathematical solution for this puzzle, I don't even know where to start looking for information.  Can someone explain how do I solve this puzzle using equations?


Isometric Embedding of a separable Banach Space into $\ell^{\infty}$

The problem is:  Let $X$ be a separable Banach space then there is an isometric embedding from $X$ to $\ell^{\infty}$.  My efforts:  I showed that there is an isometry from $X^*$ (topological dual) to $\ell^\infty$ in the following way:  Let $(e_{i})_{i=1}^{\infty}$ be a dense sequence in $B_{X}$ then define $\Phi:X^*\rightarrow\ell^\infty$ by $\Phi(f)=(f(e_{i}))_{i=1}^\infty$.   It is clear that $\Phi$ is an isometry.  An initial idea and a secondary question  Is there any canonical isometry from $X$ to $X^*$ since $X$ is separable (or not)?


The problem is finding all possible solutions to $$x^y=y^x$$ where $x, y \in \mathbb{N}$ and $y>x$.  If it's transformed $x^y$ into $x^{y-x}x^x$ then you can say that $y^x=xy^x$. Then, if I was able to prove that $y=kx$ I got the solution (in fact, there`s a unique solution $x=2, y=4$). But I'm not sure of the implication $$y^x=qx^x \rightarrow y=kx$$ with $x, y, k, q \in \mathbb{N}$  If x is proportional to y, then, from the first equation we obtain $$x={k}^{\frac {1} {k-1}}$$ If we analize this function we see that there is a natural pair $(2,2)$ and for bigger $x$ the function tends asintotically to 1, then that´s the unique solution. But the problem is to see if k is natural or simply rational, and if there is a rational pair for k.  What can be the way to solve this?


Mysqli bind_param for column name in update query

Is it possible to use bind_param in update query where column's name can dynamically changes?  for example  sql='update table_1 set ? = ? where id=?'   In the query above, I want to set the column name also by bind_param, but it causes error.


How big can a MySQL database get before performance starts to degrade

At what point does a MySQL database start to lose performance?   Does physical database size matter? Do number of records matter? Is any performance degradation linear or exponential?   I have what I believe to be a large database, with roughly 15M records which take up almost 2GB. Based on these numbers, is there any incentive for me to clean the data out, or am I safe to allow it to continue scaling for a few more years?


I'm working on a request to start logging some additional data for PCI compliance.  I need to log who, when, and what changed on a set of tables.  I set up SQL auditing which would work fine except for the fact that the values of what is being changed is coming through as @1, @2 etc instead of the actual data.  What are my other options for logging the needed information?  CDC does not track who made the change.  This is currently running on SQL Server 2012 but a possible upgrade to 2014 is possible if that would provide a better solution.  Thanks, Tim


How can I force to print exactly at the end of the line?

I would like to force a linebreak, but at the same time I would like to force LaTeX to print at the and of the line, so I would like no space at the and of the line!


How do I calculate the run rate in cricket?

I know the run rate is calculated by dividing the number of runs scored by number of overs.  How do I calculate the run rate midway through an over? If say a team scores 223 runs in 43.5 overs, what would the run rate be?


expected primary-expression before ')' token (requires "template" disambiguator)

I have a piece of code resembling the following (other details omitted for brevity):  template <uint First, uint Second, typename T> struct Thing {   std::shared_ptr<T> asdf;   uint get() const { this->asdf->get_value<First,Second>(); } };   ... producing the following error in GCC 7:  error: expected primary-expression before ')' token   uint get() const { this->asdf->get_value<First,Second>(); }                                                          ^   Clang 4.0.1 reports no warnings with -Weverything (excepting very pedantic things like c++98 compatibility warnings); same thing with GCC 7 and -W{all,extra,effc++,pedantic}.    I was previously unaware of ; while the answer to my problem is certainly outlined there, the error message didn't make it plain that was the problem.  Supposing I deleted this question and its associated answer, other people searching for this error message will only run across the questions I found -- that is, the ones indicating the problem was caused by passing a type as a function argument instead of passing a value.


Polymorphism and overriding a method from a class template in C++

I would like to have a class template with basic implementations of my methods, and a set of subclasses that use the template class with particular types (double, int, char*) and override some subset of those base implementations, as needed. However, my overridden methods don't seem to get called unless I declare the object as an instance of the subclass. In exploring this problem I came up with the following code:  #include <iostream>  template <typename T> class BaseClass { public:     virtual void print1 (T thing) {         std::cout << "Base print1: " << thing << std::endl;     }      virtual void print2 (T thing) {         std::cout << "Base print2: " << thing << std::endl;     } };  class IntClass : public BaseClass<int> { public:     void print2 (int thing) {         std::cout << "Int print2: " << thing << std::endl;     } };  int main() {     BaseClass<int> thing = IntClass();     thing.print1(1);     thing.print2(1);      IntClass thing2 = IntClass();     thing2.print1(2);     thing2.print2(2);      return 0; }   My expected output would be:  Base print1: 1 Int print2: 1 Base print1: 2 Int print2: 2   But instead, I get:  Base print1: 1 Base print2: 1 Base print1: 2 Int print2: 2   Is it possible to achieve my goal here, or am I better off creating separate base classes for each type in this case?  Apologies if my terminology is a bit off - I am relatively new to C++.


In previous versions of OS X, you could remove the name from the menu bar. I can no longer find the option for this in the Users & Groups window in System Preferences.     Searching Google and even this site hasn't provided any answers, so how do you do it?


I want to prove that: $\ln(x+1)< x$.  My idea is to define:  $f(x) = \ln(x+1) - x$, so:  $f'(x) = \dfrac1{1+x} - 1  = \dfrac{-x}{1+x} < 0, \text{ for }x >0$.  Which leads to $f(x)<f(0)$, so $\ln (x+1)-x<0$.  Is that a valid proof? Any other ideas?  Thanks.


Double Slit experiment with just one photon or electron

I just recently watched  where they were explaining the double slit experiment.  I understand that the interference pattern would be observed if you send photons or electrons one after the other. The conclusion that the author seems to make is that it is as though the particle/packet of energy travels through both the slits after somehow splitting into two.  Has anyone done an experiment where they send just one particle? (And end the experiment) Do you observe two points on the screen in that case or just one?


I want something similar to "preview" in macs.  For example: I want an image editor that ONLY does simple adjustments like increase/decrease contrast, saturation, exposure, color tinting.... rotate, flip vertically, flip horizontally, make black and white, change size or format, crop.  THATS IT.  I know gimp can do all those things but its a bit overkill.  I just want to right click an image, open it with this magical program i just described, do a few quick adjustments, and then save and exit.  Nothing really fancy.  Anyone know of anything like this?  Btw I am using ubuntu 12.04 :) It rocks and I am glad I switched from mac, i just need to replace this one piece of software.


How do I call a button to perform an action in my code? I know to use action listeners, but what if the button doesn't have a variable name like below?  I'm new to Java, so please be patient with me.   public class Game {     public static void main (String[] args)     {         JFrame frame = new JFrame ("Game");          frame.setLayout(new GridLayout(7, 6));          for(int i = 0; i < 42; i++)         {             frame.add(new JButton()); // This is the part I'm talking about!!!         }          frame.getContentPane().add(new gameBoard());         frame.pack();         frame.setVisible(true);     }   Thanks.


Why is my keras resnet50 model overfitting?

I have applied Keras ResNet-50 on a small x-ray image dataset. I tried making layers both trainable and non-trainable, but my model validation accuracy doesn't improve above 50%.  I don't understand how to help my model by solving this overfitting problem. .


Save the result of find as a variable in a shell script

I want to find the path to a file, and save that output to a variable in a shell script. Specifically, in the bash shell, if I write   GCC_VERSION="find *-gcc"   Then   echo ${GCC_VERSION}   Prints   find some-gcc   How do I get the variable GCC_VERSION to just hold the output of find?  That is how do I save the output of the find *-gcc command into the variable GCC_VERSION so that   echo ${GCC_VERSION}   prints   some-gcc


Which hard link determines the file's actual location?

In my understanding a file, as I can see it in file explorer, is basically a hard link to the actual data. When I move this to another directory, the data is moved as well to that location. What happens with the actual data if I move a second hard link to a different directory? It is going to be saved in the location of which one of the two hard links?


Prior to Avengers: Infinity War, we are introduced to and acquainted with five of the six Infinity Stones, and their powers are demonstrated in action and observed by the audience.   However, the soul stone was hidden, and was introduced in this movie, but I don't remember it being used in the movie.  So, what does the Soul Stone actually do?


How do I assess the level of liability I will be resposible for when I buy shares of companies listed in the various stock exchanges?

As described in the title, how do I make sure there are no liability when I buy a share of a company listed in the NYC or London stock exchange? What is the process and the terms to look for that can help me assess the liability involved?


Using Not before and between To infinitives

I made excuses to not go to school.  I made excuses not to go to school.    Are both of them correct?


How many years does canned jelly stay safe to eat?

I have several jars of canned grape jelly that are at least 10 years old. Are they still safe to eat?


What's the difference between using instanceof and checking the constructor?

Why do the following two lines return different results?  ("test" instanceof String) // returns false ("test".constructor == String) // returns true   Tested in the console of chrome version 28.0.1500.95 m  Does it work slightly differently for native types?


LaTeX wants a $ where there shouldn't be one

I have a variable name that I need to include mid-paragraph.  The variable is called "oral_read_score".  LaTeX seems to think that I meant the "r" and "s" to be subscripts, and gives an error unless I change to $oral_read_score$, which is not what I want.  Is there some option I can use to turn this error off?


What was the true extent of Guinan's abilities? I noticed in several episodes that alterations to the time stream didn't affect her, i.e. her memory was unaffected. Even more strange, Q seemed to be unsettled by her...the first time he seemed startled, even afraid. And then there's the fact that apparently her species is so long-lived that in 500 years she didn't appear to have aged a day. Can someone enlighten me?


Echo'ing into a file only works with root and not sudo

I have a directory /sys/class/leds/ with the file bananapro\:green\:usr/trigger that controls an (green) onboard led. The contents of this file just contains the modes for the led. As root, I can run echo "default-on" > /sys/class/leds/bananapro\:green\:usr/trigger and have the led turn on. If I try to do this from a different user, I get the following responce from bash;  bash: /sys/class/leds/bananapro:green:usr/trigger: Permission denied   I have tried also running using  sudo bash -c echo "<command>"   from the non root user (with sudo access) Any recommendations on getting file permissions for users other than root


Need we add that it be usable in the woods?   1, albeit an old one, contains an example of this odd way of writing. Where I would expect  "..that it would/could/may/should/... be", there is nothing! I feel there is some lost information in here.   Is this an ordinary way to express oneself nowadays, or is it more archaic, or "upper class"? Is there only one meaning to "it be"?   A Personal Computer for Children of All Ages - Alan C. Kay, Proceedings of the ACM National Conference, Boston Aug. 1972


Laptop-friendly alternatives to Unity window-placement shortcuts

Unity (I'm using Ubuntu Trusty if it matters) has these very handy shortcuts where you can press ctrl+alt+numpad to place a window in one of 8 predetermined positions. For instance, ctrl+alt+7 will place the window in the top left quarter of the screen, resizing it appropriately. ctrl+alt+8 will place the window in the top half of the screen, maximizing horizontally; similarly, ctrl-alt-4 will place it in the left half, maximizing vertically.  This makes it very easy to "tile" windows in a non-overlapping fashion and is a huge time-saver for arranging windows.  Sadly, these shortcuts are almost unusable on compact laptops (i.e. without a numpad, so basically everything under 15" screen size), as they lack a dedicated numpad. Some have an "overlaid" numpad, accessible by some arcane key combination, which makes things very cumbersome as the sequence becomes "enable keypad - place window - disable keypad". Some others simply lack numpad functionality.  Is there a way or alternative shortcut for Unity to use on these systems?  I'm thinking something using the Super key which is already used extensively by Unity, but I couldn't find such feature.


Microsoft SQL group by to get multidimensional array

I'm using PHP and Microsoft SQL 2003.    I have this table:    Page | Group ------------    1 |    1    2 |    2    3 |    1    4 |    2   I need to get an array grouped by "Group":    Array(    1 => Array(1, 3),    2 => Array(2, 4) );   I am using PDO, I'd like to get the array directly from SQL instead of parse the entire result with a PHP loop.    How can I do?


How to make an install USB for Windows on Ubuntu?

That's basically it. I have a Windows 7 .iso but I don't actually have a DVD at the moment so I was wondering if it was possible to make a Live USB using something like "Startup Disk Creator" and put the .iso onto my 16GB USB. If not, what's the best way to burn it to a DVD and I'll buy some tomorrow. Thanks.


Why is there a need to find a variance and take the square root to get a standard deviation?

My question is why is the formula for finding the standard deviation of a given data (either grouped or non grouped) the way it is?  so let me start from the definition of a standard deviation with my own words, which i believe is "what is the average dispersion between the mean and each data."   Logically from what the definition says i believe the equation should have been sum of all the differences between the mean and each value divided by the total frequency. (am sorry i don't now how to right equations in this site so i would appreciate any editing).  Well there is a catch here since by definition mean is the data that is by average at equal distance from each data point, the standard deviation calculated using the above formual (idea) will be zero which doesn't describe what we are looking for, and when we analyse where this problem may have come we can see that the definition of the standard deviation shouldn't depend on the direction of the data points relative to the mean, by that i mean smaller or greater in quantity we just need to now by how much they vary so i believe to alleviate this problem mathematician has came with the idea of variance which is squaring the difference, and then latter taking the square root in order to find the standard deviation, which is were i depart, i don't really get why we square the deviation between the mean and each data, i believe what we should do is take the absolute value of each difference and then divide the sum by the total frequency. so in general what i am saying is Shouldn't the formula of a standard deviation be the what i said when we come at the problem from the definition.


Super key working only in one of keyboard layout

Ubuntu 20.04 fresh upgrade Super key doesn't work as used to. I use it to trigger Arc Menu, however, does nothing even outside of Arc Menu. Until I switched keyboard layout (CZ-EN) I discovered Super key is working. So, Super Key doesn't work in either US or UK layout. Should I report it as a bug or is there some hidden feature?


Basic Index Raising and Lowering Question

I am trying to understand the order of the indices when raising or lowering tensors.  For example, the : $$F^{\alpha \beta} =     \begin{bmatrix}     0 & -\frac{E_{x}}{c} & -\frac{E_{y}}{c} & -\frac{E_{z}}{c} \\     \frac{E_{x}}{c} & 0 & -B_{z} & B_{y} \\     \frac{E_{y}}{c} & B_{z} & 0 &  -B_{x} \\     \frac{E_{z}}{c} & -B_{y} & B_{x} & 0 \\     \end{bmatrix} $$ When lowering the indices I have seen $$F_{\alpha \beta} = \eta_{\alpha \mu} \eta_{\beta v} F^{\mu v}$$ and $$F_{\alpha \beta} = \eta_{\alpha \mu} \eta_{v \beta} F^{\mu v}$$  Which is the right order of the indices on the second $\eta$? Does the index you want always go first or does it go in the index spot where you want it to end up after contraction?


Let thing of a bird standing still in a box on top of a weighing machine that shows a mass $m_0$. Now, imagine that the bird is flying, still in the same box and the same weighing machine shows a mass $m_1$. As the bird when flying, is applying a force towards the weighing machine, could we deduce that $m_0 = m_1$? I'm asking this question because saying that these masses are equal makes me as uncomfortable as saying that they are not equal and can't figure the right answer. So does $m_0 = m_1$ and why?


Möbius transformation of nonconcentric circles

Is there any transformation that can match two circles with equal radii (say $r_0$) which are positioned at $(0,0)$ and $(X_0, Y_0)$  to two concentric circles? I know there is a transformation when  $Y_0$ is equal to zero, but I need both $X_0$ and $Y_0$ to be nonzero. The initial circles do not collide which means $X_0^2+Y_0^2>>4 r_0^2$. I should also note that I don't like to use rotation to make $Y_0$ equal to zero because my boundary condition is difficult. What is the transformation that can do the job?


A closed path is made up of 11 line segments. Can one line....

A closed path is made up of 11 line segment. Can one line, not containing a vertex of the path, intersect each of its segments? Can someone please explain the answer to this parity question to me with steps?  I found a similar question on stackexchange but could not understand the answers. Can someone help me?


Having a bit of an problem resetting my root password on a dedicated server with 1&1, running CentOS7.  Able to access GRUB through terminal and can bring up the below, however this looks different to many examples out there.  setparams 'CentOS Linux, with Linux 3.10.0-327.28.2.el7.x86_64'  load_video set gfxpayload=keep                                                     insmod gzio                                                             insmod part_msdos                                                       insmod diskfilter mdraid09                                              insmod ext2                                                             set root='hd0,msdos1'     linux16 /boot/vmlinuz-3.10.0-327.28.2.el7.x86_64 rd.driver.pre=raid1,ahci,dm_mod root=/dev/md1 domdadm dolvm rd.lvm.vg=vg00 rd.lvm.lv=vg00/usr ro console=ttyS0,57600 console=tty0 net.ifnames=0 biosdevname=0 initrd16 /boot/initramfs-3.10.0-327.28.2.el7.x86_64.img       I have tried to change the ro line to rw and add init=/sysroot/bin/sh but this hasn't helped.  When going through the loading process I get the error  [FAILED] Failed to start Switch Root. See 'systemctl status initrd-switch-root.service' for details.


Can I publish a game with a name similar to a videogame developer?

I'm currently developing a game and hoping to sell it in the future. Right now I'm about to make a facebook page and release a trailer, and I realised my game has a similar name to an already existing game developer, "lucid games", and in their website they call themselves just "lucid" which is what I was expecting to call my videogame (lucid). But also it's a British studio, and I'm from Ecuador. So I was wondering if this could be an issue?


Can I travel to Italy with an expired permesso di soggiorno?

Can I fly from Turkey to Italy (direct flight) with post office receipt of renewal of permesso di soggiorno; I am not a Turkish citizen? I would like to have a vacation for a week in Turkey, but I am not sure if I can do that.


I don't have any idea to solve this problem. Find the value of  $$\sum_{k=n}^{2n} \binom{k}{n} 2^{-k}$$  For every integers $n\geq1$  Could you give me a hint to solve it? Once I get a hint, I will try to solve it again. Thanks


Another point of view that $\mathbb{Z}/m\mathbb{Z} \times\mathbb{Z}/n\mathbb{Z}$ is cyclic.

I was thinking that the product of groups $\mathbb{Z}/2\mathbb{Z} \times\mathbb{Z}/2\mathbb{Z}$ is not cyclic, but $\mathbb{Z}/2\mathbb{Z} \times\mathbb{Z}/p\mathbb{Z}$ is cyclic if p is an odd prime. Then I found logic that $\mathbb{Z}/m\mathbb{Z} \times\mathbb{Z}/n\mathbb{Z}$ is certainly cyclic if $m$ and $n$ are coprimes.  I searched on google a proof of that, to compare with mine and the answer is that $\mathbb{Z}/m\mathbb{Z} \times\mathbb{Z}/n\mathbb{Z}$ is isomorphic to $\mathbb{Z}/mn\mathbb{Z}$ (which is clearly cyclic) $\iff$ $m$ and $n$ are coprimes.  But I got another proof and I want to know what you think about it :     I claim that $([1]_m,[1]_n)$ generates $\mathbb{Z}/m\mathbb{Z}$   $\times\mathbb{Z}/n\mathbb{Z}$, where $[a]_d$ is the canonical   projection of $a\in \mathbb{Z}$ into $\mathbb{Z}/d\mathbb{Z}$.       Let's take multiples of $([1]_m,[1]_n)$ until we get $m \cdot$   $([1]_m,[1]_n) = ([0]_m,[m]_n)$ (where I suppose $m=\min(m,n)$...   otherwise, consider $\mathbb{Z}/n\mathbb{Z}$   $\times\mathbb{Z}/m\mathbb{Z}$ and $\min(m,n)=n$).       The next step is $([1]_m,[m+1]_n)$. This pair is not equal to   $([1]_m,[1]_n)$, since $m+1 \not\equiv1$ mod $n$ ($m$ and $n$ are   supposed to be coprimes). We can now continue adding $([1]_m,[1]_n)$   to the results.      The last step is precisely reached when you got   $([mn]_m,[mn]_n)=([0]_m,[0]_n)$. At this point, the fact that $m$ and $n$ are coprimes is absolutely necessary because if they are not coprimes, $lcm(m,n)\ne m\cdot n$ and   $([lcm(m,n)]_m,[lcm(m,n)]_n)=([0]_m,[0]_n)$ but all the $m \cdot n$ possible pairs are not reached, only the $lcm(m,n)$ are !


Class Templates - How to fix undefined reference to 'class object' error?

Here's my code in my .h file (as seen below). //Scalar     Vector<T> operator*(const T &d) const { return Vector<T>(x_pos * d, y_pos * d, z_pos * d); };     //Multiplying Vectors     Vector<T> operator*(const Vector<T> &v) const { return Vector<T>(x_pos * v.x_pos, y_pos * v.y_pos, z_pos * v.z_pos); };     Vector<T> operator/(const T &d) const { return Vector<T>(x_pos / d, y_pos / d, z_pos / d); }     Vector<T> operator+(const Vector<T> &v) const { return Vector<T>(x_pos + v.x_pos, y_pos + v.y_pos, z_pos + v.z_pos); }     Vector<T> operator-(const Vector<T> &v) const { return Vector<T>(x_pos - v.x_pos, y_pos - v.y_pos, z_pos - v.z_pos); }     //Formula     T dot_product(Vector<T> a);     Vector<T> cross_product(Vector<T> a);     //2X2 Matrix     T constexpr magnitude();     Vector<T> &normalize();  And I'm calling it like so in my cc file below.   template <typename T> T raycast::Vector<T>::dot_product(Vector<T> a) {     return get_x() * a.get_x() + get_y * a.get_y + get_z * a.get_z; }  template <typename T> raycast::Vector<T> raycast::Vector<T>::cross_product(Vector<T> a) {     return Vector<T>((get_y() * a.get_z() - get_z() * a.get_y()), (get_z * a.get_x - get_x * a.get_z), (get_x * a.get_y - get_y * a.get_x)); }  template <typename T> T constexpr raycast::Vector<T>::magnitude() {     return sqrt(get_x * get_x + get_y * get_y + get_z * get_z); }  template <typename T>  raycast::Vector<T> &raycast::Vector<T>::normalize() {     T inverse = 1 / magnitude();     x_pos *= inverse;     y_pos *= inverse;     z_pos *= inverse;     return *this; }  For example, I'll get this error in my code: undefined reference to `raycast::Vector<double>::dot_product(raycast::Vector<double>)' collect2.exe: error: ld returned 1 exit status.  Is it because I'm not properly calling it in my cc file or is because I'm not calling my constructor in my cc file? There isn't an issue with the paths of my files or my makefile.


Difference between authentication and authentification?

Is there any difference between authentication and authentification? I was reading a question on SO where I saw somebody using 'authentication', was this a typo or dose these two words mean the same?


Does an Ukrainian need a transit visa in Dubai?

I am an Ukrainina citizen living in Poland. I will be traveling to Thailand but I need to wait at the Dubai airport 9 hours for my next flight back to Poland. I will not be leaving Dubai airport. So in this case do I need a transit visa?


efficient workaround to treat missing values in gridded data in `RasterBrick` object

I have dealt with E-OBS gridded dataset and how to cropped raster grid for a particular country (I used 0.25-degree regular grid daily mean temperature observation). However, I have read about E-OBS grid dataset' publication and they told about maximum 20 percent of missing values might be occurred. After I cropped the raster grid for my interested regions and want to render plain text data with its metadata (geo-coordinate pair and daily level temperature observation), original missing values become 0.   It is important to me because it is difficult for me to differentiate which one is temperature observation (it could be 0 Celsius degree) and which one is missing observation. I want to render missing value with -999 or ....  To avoid this problem, I want to preserve missing values in a cropped raster grid, and treat those missing values when I intend to calculate the yearly average temperature for each coordinate of grid.  How can I deal with missing values in raster grid? Any idea?  Update:  I tried @Rodrigo' solution down below:  > tg1980 <- raster::brick("data/tg_0.25deg_reg_1980-1994_v17.0.nc") > tg1980 <- reclassify(tg1980, cbind(NA, -999)) Error: cannot allocate vector of size 1.9 Gb   But now I got a memory problem in R.  Any quick solution for that?


It's clear, from reading pop-science articles about the Higgs boson, that particle physicists have something very specific in mind when they say "mass". In classical physics the mass of a particle is just a given value, but in the context of particle physics you hear things like "computing the mass" or "such and such interaction gives some mass".  What does "mass" mean to a particle physicist? How does it relate-to/explain the classical notion of mass, and how does it differ?  I'm not sure what level of explanation I'm looking for. I don't know particle physics, obviously, so any grad-level equations are likely to go way over my head. But explanations like "bouncing back and forth all the time"  are too simplified. I'm left wondering, for example, how coupling with the Higgs field makes electrons bounce back and forth? And why wouldn't it just scatter them? And how is this process Lorentz invariant? And why does the bouncing resist/react-to forces?


Is "A or B is C" or "A or B are C" correct? What about "(A and B,) or C _ D" or "A, or (B and C) _ D"?

If "A xor B _ C" I think "is" would be correct. Since they are otherwise technically uncountable, I would say that "A or B is C". As for the last one, I think I would say "A or B and C are D", but I'm not sure about "A and B or C _ D". By the way, I think English should have brackets or something to isolate otherwise interchangeable groups like you do in mathematics.


Say f(x)= x+1.   Now $\lim \limits_{x \to 1}$ f(x), we can see easily that there is no hole in it or it is continuous everywhere. Since it is a straight line.  But when we write the same f(x) as,   f(x) = x+1 = (x+1)(x-1)/(x-1) = $(x^2-1)/(x-1)$.  $$\text{Or say g(x) }= (x^2-1)/(x-1)$$  i.e  $\lim \limits_{x \to 1} g(x)=\lim \limits_{x \to 1}(x^2-1)/(x-1)$  In this site  it says g(x) has a hole at x=1. But isn't both f(x) and g(x) are same. Please explain. Thanks.


What word would be another word that means street-smart?


Yearling badge awarded multiple times within a year

Is this a bug? [Yearling] Awarded 9 mins ago     Awarded May 31 at 19:33     Awarded May 31 at 10:55   Awarded May 6 at 19:40


Say you have an unfair 3-sided die.  Side 1 will be rolled with probability $P_1.$ Side 2 will be rolled with probability $P_2.$ Side 3 will be rolled with probability $P_3.$  Find a formula for the probability that the 8th 3 will be rolled on the 10th roll.  Here is how I started:  $$ \sum_{i=8}^{10}P(T_8 = i) $$  Im just having trouble with that expansion?


Take the examples:   "One in ten children are dyslexic."  "One in ten children is dyslexic." "One in ten children has dyslexia." "One in ten children have dyslexia."   The "one" is singular so 2 and 3 should be correct. But the "one in ten" is a fraction" so 1 and 4 should be correct. And yet I think I usually say 1 and 3. Which is/are correct?!


Scheduled PHP file deletion in multiple sub-directories for files that are older than X days

So basically what I want to achieve is that a script automatically deletes files in the directory and its subdirectories if the files are older than 7 days. Basically the IP camera uploads the video files through FTP on a webserver and this would be used for IP camera backup video file automatic rotation. The directories would look something like this:  ipbkap/cam1/2020/08/ ipbkap/cam1/2020/09/ ipbkap/cam2/2020/08/ ipbkap/cam2/2020/09/ and etc.  As of now, I have achieved this by executing the script manually, but how could I make it to do it automatically? <?php  function RemoveFiles($path,$timeago) {   $files = array();   $index = array();   if ($handle = opendir($path)) {     #clearstatcache();   # not needed, unlink() clears the cache automatically     while (false !== ($file = readdir($handle))) {       if ($file != "." && $file != "..") {         if(is_dir($path.'/'.$file))           RemoveFiles($path.'/'.$file,$timeago);         elseif(filemtime( $path.'/'.$file ) < $timeago) {           unlink($path.'/'.$file);           echo 'Deleted '.$path.'/'.$file."\n";         }       }     }     closedir($handle);   } }  RemoveFiles('ipbkap',strtotime('-7 days'));   ?>


Adding a player to a team only when they are wearing specific armor set?

Looking to have 2 teams on the server,  What would I use to set this up?  Details/Desire  1 team default *shows nametag *all active players are this automatically  2 team Ghillie *hides nametag *all players wearing full GOLDEN ARMOR will be automatically added to this team. Removed when not wearing full gold armor  Edit* Thank you for answers! Still having trouble though  Not sure where the specific change areas are for team names *for copy-code answer below and if they should be split between the two? team names are default for no gold armor and ghillie for full gold armor –


When I run sudo apt install, I get waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 12863 (apt)


In the second paragraph it is mentioned that eigenvector of $H$ is rescaled by a factor of $\frac{\lambda_i} {\lambda_i +\alpha}$ What exactly meant by that ?


I am making a music player app and when opening any song from files it comes like this Uri /external/audio/media/1162591  and when I try to convert this Uri with this code private String getRealPathFromURI(Uri contentUri) {     Cursor cursor = null;     try {         String[] proj = {MediaStore.Images.Media.DATA};         cursor = getContentResolver().query(contentUri, proj, null, null, null);         int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);         cursor.moveToFirst();         return cursor.getString(column_index);     } finally {         if (cursor != null) {             cursor.close();         }     } }  It returns error and this is the logcat 2021-06-07 22:58:47.612 6898-6898/com.yapps.ymusic E/AndroidRuntime: FATAL EXCEPTION: main Process: com.yapps.ymusic, PID: 6898 java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=1, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {com.yapps.ymusic/com.yapps.ymusic.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'int android.database.Cursor.getColumnIndexOrThrow(java.lang.String)' on a null object reference     at android.app.ActivityThread.deliverResults(ActivityThread.java:5041)     at android.app.ActivityThread.handleSendResult(ActivityThread.java:5084)     at android.app.ActivityThread.-wrap20(Unknown Source:0)     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2053)     at android.os.Handler.dispatchMessage(Handler.java:108)     at android.os.Looper.loop(Looper.java:166)     at android.app.ActivityThread.main(ActivityThread.java:7529)     at java.lang.reflect.Method.invoke(Native Method)     at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)  Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'int android.database.Cursor.getColumnIndexOrThrow(java.lang.String)' on a null object reference     at com.yapps.ymusic.MainActivity.getRealPathFromURI(MainActivity.java:752)     at com.yapps.ymusic.MainActivity.StringSound(MainActivity.java:740)     at com.yapps.ymusic.MainActivity.onRequestPermissionsResult(MainActivity.java:677)     at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:7854)     at android.app.Activity.dispatchActivityResult(Activity.java:7705)


Is there a definition of $ 1 + \frac{1}{2+\frac{1}{3+\frac{1}{4+\frac{1}{\ddots}}}}$? I am somewhat familiar with continued fractions; that is, I am aware that their convergence depends on whether our input is rational or not. This is not a homework problem, I am just curious about this topic which has gotten little attention in my current studies. If this expression is defined, what is it and does it converge?


I'm connected to a bash shell on my ubuntu 16.04 server using Putty on Windows.  This is what it looks like in Putty when I do sudo fdisk -l:    But when I try to pipe the output into less, the colors are not shown:    I have tried sudo fdisk -l | less -R and sudo fdisk -l | less -r, but the output never looks the same as the raw output.  How can I get the output from less to look the same?


Valid alternative to Box Tidwell method for Linear Regression

I am building a Logistic Regression model (in sklearn) and want to verify that the assumption regarding the linearity between X and the logit function is correct. I am using Python so am looking for an alternative to Box Tidwell (because coding this up doesn't come as easy as in SPSS as far as I am aware). I have devised what I think is an appropriate alternative but I wanted to double check that I am correct in this way of thinking. What I have done is:  Built my model and fitted it to some training data Sampled 100 evenly spaced points in between the min and max of my independent variable X and calculated the probability of these points predicted by my model (using the predict_proba function) Plotting the sampled X points against the logit of the probability and observed that there is a linear relationship (note that predict_proba does return the probability of the samples belonging to each class so I just picked one of the classes)  Doing this makes me believe that I have not violated the assumption but am I unknowingly already assuming linearity in this method? Is this method valid? Thanks!


How to explain degrees of freedom term to a layman?

I just wanted to know how to explain "degrees of freedom" to a non-statistics person without mentioning any statistical terms. How to explain this?


I am using ubuntu 14.04. I want to install lampp but don't know how to install it. Can I get some help for installing lampp on my Ubuntu.


How to modify objects in a collection at the same time while iterating through the collection in java

I have this scenario: There is a huge text file around 500MB ,by whose contents I have to make reports.Each line have some values separated by a space.out of several values, two of which are URL and RESPONSETIME. If a url's response time is more that 8000ms I have to make a report of how many times overall that url was hit, and out of them how many times response time was greater than 8000ms, so final report will look something like this  URL total hits delayed response url1     100     5  url2     1000    18   I have done my part of search on google so don't suggest me that. Using a list will not be a solution because you can't modify the objects of a list while iterating through it. Anyone please suggest ideas.


CGI show with Rock Men, Ice Men, and Fire Men, and planets that moved?

Does anyone remember the name of a CGI show that had Rock Men, Ice Men, and Fire Men? It had planets that moved and were cannons as well. I used to watch it with my dad when I was younger, but now I can't remember the name.


Changing value in Copied Map reflecting in Original Map

I am copying a Map from another Map. After the copying is done, I am changing the values in the new Map. However the new changes done in the new Map are also reflecting in the original Map. Is there any way to prevent this from happening? Map<String,List<String>> map1 = new Map<String,List<String>>(); Map<String,List<String>> map2 = new Map<String,List<String>>();  map1.put('abc',new List<String> {'123'}); map1.put('xyz',new List<String> {'0987'});  map2 = map1; // Even tried putall method here  for(String str1  :map2.keyset() ){     map2.get(str1).add('extra value'); } system.debug('map2===>>'+ map2); //{abc=(123, extra value), xyz=(0987, extra value)} system.debug('map1===>>'+ map1); //{abc=(123, extra value), xyz=(0987, extra value)} -- extra value should not relect here


Extracting Elevation (DEM) from air photos using open source software?

I have a few pairs of stereo air photos and I want to extract a DEM from them.  I think that is possible using PCI (OrthoEngine), but I would like to do it using Open Source (or at least free) software.  I've looking in GRASS GIS and Orfeo Toolbox but I didn't find how to do it?  (It is possible that I have not looked correctly...).  Is it possible?


Can't login to Ubuntu 14.04 (once again)

I apologize in advance for my naive question but I'm new to Linux and eager to learn. I am experiencing the same problem already commented by others, and it is the impossibility to log-in Ubuntu 14.04 after upgrade. After entering the password, I am redirected to the log-in page again. I followed the instructions appeared in this thread but was unable to solve the issue:  It seems that I need to edit the system file /etc/fstab but once having accessed to the terminal from the log-in page and cd to the proper directory, I don't know how to edit this file.  Your valuable feedback is highly appreciated, thanks.


console.log of referenced object doesnt print what i expcected

I have two objects, a function, and some console.logs:    let obj1 = {   value: "a" }  let obj2 = {   value: "b" }  console.log(obj1.value) console.log(obj2.value)   function change(obj1, obj2) {   obj1 = obj2;   obj2.value = "c";   console.log(obj1.value)   console.log(obj2.value) }  change(obj1, obj2);  console.log(obj1.value) console.log(obj2.value)     RESULT:     a b c c a c   and I expected:     a b c c c c   Can someone explain why value is A and not C?


How to configure sharing on a small Windows 10 network since HomeGroup is gone?

This is apparently a   but I have not found a solution.  With the deprecation of HomeGroup after the release of Windows 10 version 1803, I cannot get two computers to maintain network sharing after reboot.   Based upon , I did the following:     Setup a WorkGroup and then right- clicked on folder to be shared. Select "Give Access To" ==> Specific People Specify the group to share with and privileges for same. I get the link and hit "Share."   The first time I open the other computer, the sharing works. Once I restart, the "guest" computer cannot access files on "host" computer.   I have checked firewall settings and have tried turning off and on network sharing (which seemed to work once but not a second time). I did notice that the "Give Access To" settings on the host computer seem to change upon reboot.   Is there a script I should be running as a *.bat file that executes upon startup? Any help appreciated.


So I have ubuntu 12.04 on my usb, it loads perfectly and works. When I boot up my laptop (Windows 7) a menu box appears to ask how I want to run ubuntu, the first selection is Default which I use, the next being somewhere along the lines of "Install ubuntu", then a load of other selections  What I ask is, is there a way for Ubuntu to boot up without bringing up the box? Like when I boot up with my normal operating system...  Sorry if I'm confusing ;_;


Is There Such a Thing as Two Consecutive Rational Numbers and, If So, is the Difference Between Them Zero?

The rational numbers form a countably infinite set, just as the integers do. For the integers, there is no integer between 4 and 5 (I.e., there is such a thing as two consecutive integers) So, I am thinking that there must be such a thing as two consecutive rational numbers, such that there is no other rational number that is between them. The difference between two consecutive integers is 1. If there is such a thing as two consecutive rational numbers, is the difference between them 0 (even though there are irrationals between them)?  Thanks!


What is the word for sensing something is strange

I want to describe my character waking up and sensing something is strange, however, can't put a finger on what. For example,      Alice woke up and felt __, something seemed different.    Different like something was wrong and off. I don't mind to have an idiom as well.


Find all python files in linux file system

How can I search my entire Linux filesystem for all python files (files with extension .py)? I know I can do find -name filename but how can I do it for file type?


How do i calculate the value of $\int_{0}^{1} \frac{\ln{(1+x)}}{1+x^2}$?

How do i calculate the value of the following integral--  $$I=\int_{0}^{1} \frac{\ln{(1+x)}}{1+x^2}$$  I tried doing substitutions like $1+x=t$ etc.   I also tried to use the property $\displaystyle\int_{a}^{b} f(x)=\displaystyle\int_{a}^{b} f(a+b-x)$, but didn't arrive at anything fruitful.


Prove that $n^2 + 2^n$ is composite if $n\not\equiv3\pmod{6}$.

If $n>1$ is an integer not of the form $6k+3$, Prove that $n^2 + 2^n$ is composite.  Any idea of how to think about this problem? I have been thinking about it a lot and yet I was not able to come up with anything.


Prove $Aut(G) \cong \mathbb{Z}_n^{\times}$ where $G=(\mathbb{Z}_n , +)$.  $Aut(G)$ denotes the set of all automorphisms with respect to composition. $\mathbb{Z}_n^{\times}$ denotes the set of all invertible elements of $\mathbb{Z}_n$ with respect to multiplication.  Please do not offer a full proof as an answer (where is the fun in that?). I am interested only in finding a specific map that works.  My thoughts: Define $\psi : Aut(G) \rightarrow \mathbb{Z}_n^{\times}$ as $\psi ([m])=\phi_m([x])=[mx]$ (a function which is defined in a previous exercise). I am not confident that this works. Should I continue looking for isomorphisms in this direction? Is the opposite direction more fruitful?


Problem with Process Builder Invocable Method and Webservice Call out

I am trying to execute a web service call to our backend system when the opportunity is closed/won. I am attempting to do a  POST to our endpoint. All the api call is really carrying the account name and a few structural detail back (All listed below). My problem is that when the trigger executes I get the following error in the debug logs "System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out".  The Process Builder Passing in the company name:   APEX Class  public class Play2 { @TestVisible static HttpResponse res;  @InvocableMethod public static void sendNotification(List<String> name) {        HttpRequest req = new HttpRequest();     Http http = new Http();     String payload = JSON.serialize(         new Map<String, String> {             'companyName' => name.get(0),             'salesforceAccountType' => 'Company',             'salesforceSynchStatus' => 'Enabled'         }     );      req.setEndpoint('https://TheEndPoint');     req.setMethod('POST');     req.setHeader('Authorization', 'The Mighty API KEY');     req.setHeader('Content-Type', 'application/json');      req.setBody( payload );     req.setCompressed(true);       try {         System.debug('Point 1');         res = http.send(req);         System.debug('Point 2');     } catch(System.CalloutException e) {         System.debug('Callout error: '+ e);         System.debug(res.toString());     } } }


I am getting Ubuntu base update almost every day. This seems strange to me. What am I missing?   (I am using Ubuntu 14.04 LTS)


How does the lack of a copy constructor relate to object slicing?

Warning: This is NOT a duplicate of  , I already read it and it doesn't clarify my issue    My question is: why is the lack of a copy constructor a problem in a base class regarding object slicing? If I do something like  Base base; Derived derived;  Base newbaseobj((Base)derived);   this is a classic slicing problem in the first place! I don't see why or how defining a user-defined copy constructor in Base would help  Edit: I'm asking this because these answers:  and  seemed implying that I need to define/default a copy constructor to deal with object slicing


Let $R$ be a ring with identity. Prove that if $1-ab$ is invertible for some $a,b \in R$, then $1-ba$ is also invertible.  Ok, si if $R$ is a ring with unity, then we have $R$ with $1 \ne 0$ We have to show that $\forall a,b \in R$, $(1-ab)$ is invertible, so then $(1-ba)$ is invertible as well.  My thought process if to maybe show that if $(1-ab)x=1, x(1-ab)=1$ for some $x \in R$. Then we would have to show that $(1-ba)y=1,$ so then $y(1-ba)=1$ for some $y \in R$????