I'm applying standard 0-1 scaling of features before SVM classification for financial data but the results are worse. This is the results before scaling      NORMAL DATA AVERAGE RESULTS       Profit           PF         avMC         avPP         avRC        totTP        totFP         PF>1     algosnum           SS          SSl   4389060.90         6.85        -0.00        60.69         0.50        16086        10973            5            8            1            5   and this is after scaling  NORMAL DATA AVERAGE RESULTS       Profit           PF         avMC         avPP         avRC        totTP        totFP         PF>1     algosnum           SS          SSl   2256204.80      2044.51        -0.07        52.53         0.46        14577        12220            4            8            1            5   Scaling is performed in 0-1 range, test data is scaled according to scaling factor of train data. From the above results you can see that precision went down (avPP) from 60.69 to 52.53, average Mathew Correlation Index from 0 to -0.07 number of true positives went down from 16086 to 14577 and number of false positives grown from 10973 to 12220. The presented result is an outcome of 80 classifications on different financial instruments data for 80 data sets 20000x200 so i think result is quite significant.  So my question is: In such situation how I should proceed? Shall I stick to scaling? Or maybe I should generate different data set to check if this behavior is consistent? What sort of analysis of my features I can make? My data set is a mix of binary and continuous features in different scales.

I've been trying to perform a binary classification using an SVM classifier (scikit-learn's SVC with RBF kernel). I have a sample size of about 100, with about 70 features each. The features are of approximately the same order of magnitude in their raw form, and the values tend to be already distributed around the 0 (not always though). The distribution of two such features is shown in the histograms below.   I performed a Z-score transformation on all features, as I know this to be considered a good practice when working with multiple features in machine learning. The problem is that when I use the raw data, I always manage to get better accuracy than with the Z-scores (about 2-3%). Bear in mind that the parameters of the SVMs in each case are optimized using a grid-search, so I'm not using exactly identical classifiers.  Does this make sense, getting worse results with Z-scores? I would expect to get the same or better results. What could be the mathematical logic behind this?  Edit  To answer two frequent questions from comments and answers:   My classes are indeed distributed equally (exactly 50%/50%) I also use measures other than accuracy (AUC, F1, etc.), but having worked on this project for some time, accuracy correlates well with what I need.


I'm asked to prove that, if $T$ follows the $LN(\mu, \sigma^2)$, then  $$E(T^r) = \exp\left(r\mu+ \frac{r^2\sigma^2}{2}\right)$$  Can anyone help?

The computed moments of log normal distribution can be found . How to compute them?


I have to show for all x,y ∈ ℝ that ||x| - |y| ≤ |x-y| I know that |x| = |x - y + y| ≤ |x - y|+|y| Does it suffice to put in numbers now or how would I proof that?

I understand intuitively that this is true, but I'm embarrassed to say I'm having a hard time constructing a rigorous proof that $|a+b| \leq |a|+|b|$. Any help would be appreciated :)


I am trying to check what is the differnce between  modeling a time series with:    SARIMA Deseasonalizing it first and then using ARIMA   Is there a preferable method over the other? If yes, why ?

I am a self learner, and I am studying time series analysis.  I came through the fact that ARIMA  can be used  to model a time series which is not stationary (Integrated ARMA model). The non stationarity taken in to account in an ARIMA model is the nonstationarity that can be removed by differencing.   I am wondering whether a  seasonality is the type of nonstationarity that can be removed by differencing?    If yes, so for a non seasonal data, we may use ARIMA modeling, so why we have SARIMA modeling ?   If no, how seasonality can be  removed in order to make data stationary?


Why can't we use the word information in the plural form? "Give me all the informations you've got", even if it's wrong, sounds more beautiful to my non-native ear than "give me all the information you've got", and I don't know why.  Edit: This is not a duplicate question since I know that information is a mass noun; what I am asking is, why can't it be in plural like some other mass nouns can? Why is it like that when it seems more correct with s at the end?

Generally, one doesn't use the indefinite article with a noun because it's plural, but sometimes you get nouns where, for some reason, the indefinite article isn't used even though the noun is singular.  I would never say 'a software', though it seems to be a singular noun, and I've heard it said (though it sounds wrong).  Instead, we say 'some software' or 'a piece of software' (the latter implying that software is singular), so why does 'a software' sound wrong?  EDIT: I really meant to ask why we don't consider software singular.  Maybe I should have asked, 'why is software a mass noun?'


I am making a short animation of a sphere breaking a window with cell fracture.  Here is how it looks mid-break:    I thought it looked good so I decided to bake it into keyframes to upload it to the sheepit renderfarm. I selected them in the outliner with box select and then right clicked > select. Then I clicked bake to keyframes in the rigid body tools.    When I bake it, the sphere bakes fine, but the cell fracture pieces end up all squished looking like this:    Anyone know why this is happening? Is there a solution to this problem?  Additional info:   The cell fracture pieces all share the same animation data. I animated the 'Dynamic' property in order to delay the animation until needed.  To clarify, I selected all cell fractured objects at the same time.

I made a breakable object and the simulation is fine. But when I bake the simulation all the pieces of the breakable object just stack in the same place in space.  The pieces are driven by a cube the first 60 frames, then the simulation makes the rest.  .blend in a zip file:


I was reading SQL queries and got stuck with a doubt. Is there any SQL query to exclude a single column while using select statement?  For example, I have a table which contains data about student (s_name, address, email_id, ..... many more).  I want to select all the columns except email_id.

We all know that to select all columns from a table, we can use  SELECT * FROM tableA   Is there a way to exclude column(s) from a table without specifying all the columns?  SELECT * [except columnA] FROM tableA   The only way that I know is to manually specify all the columns and exclude the unwanted column. This is really time consuming so I'm looking for ways to save time and effort on this, as well as future maintenance should the table has more/less columns.


Mesages such as this are very common in all rooms:  We have the data available to determine if a user is new, so what if we had the option to set up room guidelines and so forth when they enter to be predominately shown? I know some rooms have the rules, but it's obviously being ignored in many cases, and others, might not be important to who's in the room most of the time. It could be a floating box showing some text, or whatever. What "new user" means in this case is, new to that room. For instance, that user is familiar enough with the site to have a respectable site-wide rep, but the individual rooms may have their own social protocols or otherwise. We have, in the database, information on how much participation this person has with a room. We can detect their interaction in any particular room, or rooms in general. That detection would then trigger a room's setting some where-- if they so choose to configure one-- that welcomes new users and gives them the overview of the room, an FAQ about questions, etc. I know this room has a lot of questions where people don't get explaining the right details of problems, using common tools that are very helpful, if it's okay to ask, don't come in and say "I know you're not PHP but here's a PHP question..." etc.

Lots of the bigger channels have some kind of rules, stuff people are supposed to read before posting or requesting access, etc.  In the topic it clutters valuable space that can be used for more useful things (regulars usually don't need a link about when to request access etc. there). When a bot pings newly joining user with the message it's even more annoying since it gets pretty spammy for everyone in there.  So my suggestion is to allow room owners to define a welcome message for their room. It could contain markdown (either true markdown or like normal chat messages) and would be shown to a user who has never talked in the room and hasn't been in the room ever or at least for some time (1 month maybe).  Possibly users should be required to click a "confirm" button to be able to talk - otherwise they'll most likely just ignore it without even bothering to read it (yes, I'm talking to you, help vampires)


I know comments are for getting details about question and so but some questions have little answer like "you forgot to put a ',' in here". When i wrote this and then it solves the problem should i write my comment as an answer to get reputation. I mean I  know Stackoverflow isn't just for getting reputation. I don't think i should do this, its just +15 eventually, and this site is not Facebook, people shouldn't be answering question for reputation. I just wanted to ask for future, since I'm new to this community.

According to , questions with a typo or syntax error should be closed. However we still have to address the issue where the OP has made a mistake. Where is the best place to respond to him, in the comments or in an answer?  This question, , is obviously about a syntax error. I left a comment saying where the problem is, and voted to close it as "too localized". However, a user with the close vote privilege chose to give an answer, repeating what was in my comments.  Should we answer the typo question, possibly gaining a few reps, or just leave a comment and close it?


I am stuck on trying to prove that $$\bigcap_{m \text{ maximal}}A_m = A$$  where $A$ is an integral domain (commutative, ring with unity). I would appreciate any hint! Thanks!

This result appears to be ubiquitous as an algebra exercise. How do you prove this result?     Let $A$ be an integral domain with field of fractions $K$, and let $A_{\mathfrak{m}}$ denote the localisation of $A$ at a maximal ideal $\mathfrak{m}$ considered as a subring of $K$. Prove that $$A = \bigcap_{\mathfrak{m}} A_{\mathfrak{m}}\,,$$ where the intersection is taken over all maximal ideals $\mathfrak{m}$ of $A$.


Which of the following is correct?  In the case of "their" being granted a bond the deal will go through.  or:  In the case of "them" being granted a bond the deal will go through.

I assume that the following sentences are grammatically correct:   He resents your being more popular than he is. Most of the members paid their dues without my asking them. They objected to the youngest girl's being given the command position. What do you think about his buying such an expensive car? We were all sorry about Jane's losing her parents like that.   I'm still getting used to this possessive gerund structure. It sounded so weird to me at first. Is the structure used in both formal and informal contexts? Are there any alternative structures that result in the same meaning and are more frequently used? (Examples taken from )


When I place an index reference in a line, e.g.  once upon a \index{time}midnight dreary,   the keyword ("time" in the example above) isn't typeset. However, when I place a glossary term in a line, e.g.  once upon a \gls{time}midnight dreary   the glossary replacement text typesets.  Can I make the glossary term behave like an index reference? I only want the glossary term to appear in the glossary listing in the end of the document, not when it is used in the document body.  MWE breaks with glossaries v4.34:  \documentclass{article} \usepackage[automake,sort=use]{glossaries}  \makeglossaries \newglossaryentry{potato}{name={potato},description={potato}} \newglossaryentry{cucumber}{name={cucumber},description={cucumber}} \newglossaryentry{onion}{name={onion},description={onion}} \begin{document} \glsadd{potato}tomato \glsadd{cucumber} \printglossaries \end{document}   Also with glossaries-extra v1.23 if you replace glossaries with glossaries-extra.

\documentclass{report} \usepackage[acronym]{glossaries} \makeglossary \newacronym{svm}{SVM}{Support Vector Machine} \newacronym{wasn}{WASN}{Wireless Sensor Networks} \begin{document} \printglossaries \newpage using \gls{svm} blah blah \gls{wasn}blah blah.....\gls{svm} \end{document}   I am testing with above MWE. The acronyms are correctly displayed in the document body when compiled, but nothing gets printed where I need the List of Acronyms.  I am using TexMakerX as my IDE on Windows 7.  Once I compile the above code a .glo file is created but it is empty. I think this is the problem but I don't know why it is happening.


I got a java.lang.NullPointerException  on this line pdao.majPost(c); when I try to grab my posts from my API and trying to insert post my SQLite database.  My JSON Parser Class:  private PostsDAO pdao;  public void data() {      AsyncHttpClient client = new AsyncHttpClient();     client.get("http://twitter.192.168.1.38.xip.io/api/v1/posts", new AsyncHttpResponseHandler() {         @Override         public void onSuccess(String response) {              JSONObject data;             JSONArray posts;             try {                 data = new JSONObject(response);                  // Traitement des posts                 posts = data.getJSONArray("posts");                 for (int i = 0; i < posts.length(); i++) {                     JSONObject c = posts.getJSONObject(i);                     pdao.majPost(c);                 }              } catch (JSONException e) {                 // TODO Auto-generated catch block                 e.printStackTrace();             }          }     });  }   My PostDAO file  public void majPost(JSONObject c) throws JSONException {     ContentValues values = new ContentValues();     values.put("id_post", c.getInt("id_post"));     values.put("id_user", c.getInt("id_user"));     values.put("content", c.getString("content"));     values.put("photo", c.getString("photo"));     values.put("masked", c.getInt("masked"));     values.put("deleted", c.getInt("deleted"));     values.put("created_at", c.getString("created_at"));     values.put("updated_at", c.getString("updated_at"));     db.insert("posts", null, values); }

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


I'm trying to implement Graph using adjacency list, but when I try to add new pair into the list it gaves me an NullPointerException. Is there anyone know why it would happen and how to fix it?  Thanks in advance.  My Graph.java is like:  import javafx.util.Pair; import java.util.*;  public class Graph{     private final HashMap<String, List<Pair<String, Integer>>> adj;      public Graph(String filePath) {         adj = new HashMap<>();         addEdge("a", "b", 30);     }      public void addEdge(String start, String end, int weight) {         adj.get(start).add(new Pair<>(end, weight));     } }   My Main.java is like:  public class Main {     public static void main(String[] args) {         Graph gr;          try {             gr = new Graph("test.txt");         } catch (Exception ex) {             ex.printStackTrace();         }     } }


Find all positive integers satisfying  $$\frac{2^n+1}{n^2} =k $$  where $k$ is a integer.   I can't just come up with a solution.

This was Problem 3 (first day) of the 1990 IMO. A full solution can be found      How many rationals of the form $\large \frac{2^n+1}{n^2},$ $(n \in \mathbb{N} )$ are integers?   The possible values of $n$ that i am able to  find is $n=1$ and $n=3$, so there are two solutions and this seems to be the answer to this problem.  But now we have to prove that no more of such $n$ exists, and thus the proof reduces to: Proving that $n^2$ does not divides $2^n+1$ for any $n \gt 3$.  Does anybody know how to prove this?


There are about three or four people regularly in the  every weekday but few others seem to even know it exists. Can Stack Overflow advertise the chat rooms on specific tags?   For example, when a new question is tagged with ASP.NET MVC, it could suggest the chat room for that as an option for finding answers. Of course, moderators/admins would have to create those relationships between tags and rooms.  A clarification based on comment from @Tinkeringbell: we still want questions to be posted as questions. But less prominently displayed, for items that are perhaps more discussion-related, it can be asked in chat. One downside: some folks will look for quicker answers/shortcuts through chat instead of formulating a proper MCVE (Minimal, Complete, and Verifiable example) question.  Thanks.  Update: This is different from , the OP would see the chat rooms while typing the title, similar to how similar questions display during that process.

It would be nice to create an association between tags and a chat, so that when you are viewing questions for a particular tag you get a recommendation for a relevant chat room. Similar to how the chat rooms are displayed in the right column on meta.  For example, with the WPF tag you might be shown the C# and WPF chat rooms


Keeps telling me that I'm referencing SubTotal and I'm not sure how to fix that. The error message I'm getting is "Column CHECK constraint for column 'Total' references another column, table 'Job'." Create Table Job(     JobNumber int not null         Identity (1,1)         Constraint PK_Job primary key clustered,     Date datetime not null,     Address varchar(100) not null,     City varchar(50) not null,     Province char(2) not null         Constraint CK_Province Check (Province like '[A-Z][A-Z]'),     PostalCode char(7) not null         Constraint CK_PostalCode Check (PostalCode like '[A-Z][0-9][A-Z][0-9][A-Z][0-9]'),     SubTotal money not null,     GST money not null,     Total money not null         Constraint CK_Total Check (Total>SubTotal),               /*COME BACK TO THIS */     ClientID int not null         Constraint FK_JobToClient references Client(ClientID),     StaffID int not null         Constraint FK_JobToStaff references Staff(StaffID), )

I have this table but check constraint is throwing me an error:     Column CHECK constraint for column 'MedicamentRegulated' references another column, table 'Medicaments'.   I've seen this as allowed in SQL Server but I don't know why it doesn't work :/  CREATE TABLE Medicaments ( MedicamentID INT NOT NULL IDENTITY(1,1) PRIMARY KEY, Name VARCHAR(50), DateValidity DATE, MedicamentRegulated BIT CHECK((MedicamentRegulated = 1 AND DateValidity IS NOT NULL)    OR MedicamentRegulated = 0) )


I have a feature class of about 12 points, a feature class of hundreds of roads, and need to find the nearest road to each point. So the obvious solution () takes about 20 seconds, and the results are fine.  When I try to put it in a script (see below), it takes 90 minutes. Also, even though it doesn't crash/error, the results aren't right (the NEAR_FID and NEAR_DIST for each point are both "-1"). I'm running it within ArcMap as a tool, and the run time is all from the Near analysis (it quickly gets through importing the parameters, and then just thinks for a very long time).  I didn't use any of the optional parameters (radius, record angle, record xy, etc.) when running Near either manually or in the script. The data are the same.  Any ideas what is causing the trouble?  import arcpy from arcpy import env  pointsFC = arcpy.GetParameterAsText(0) arcpy.AddMessage("Feature Class to be analyzed: " + pointsFC)  spatialRef = arcpy.Describe(pointsFC).spatialReference  outputWorkspace = arcpy.GetParameterAsText(1) env.workspace = outputWorkspace arcpy.AddMessage("Output Workspace " + outputWorkspace)  roadsFC = arcpy.GetParameterAsText(2) arcpy.AddMessage("Roads Layer: " + roadsFC)  # try to find the nearest road try:     in_feature = pointsFC     near_feature = roadsFC     arcpy.AddMessage("Finding nearest " + roadsFC + " to " + pointsFC)     arcpy.Near_analysis(in_feature, near_feature) except:     arcpy.AddMessage(">> NEAR didn't work")

We are running an ArcGIS 10.0 geoprocessing script written in Python that (as part of many steps above & below) runs the .    Both the input and output datasets (shapefiles & personal geodatabase, respectively) are on a network drive, in the same projection, and we are not using a search distance (which by default = infinity, I believe).  When we run the near command, sometime it successfully runs to completion and sometimes (usually) it only partially works.  When it partially works (but runs to completion), the results typically have anywhere from 1/4 to 1/2 of the features with a NEAR_DIST value = -1 (and it is always the top portion of the records, as sorted by the OID).  In these cases, it also takes forever to process the top records, sometimes going from full success runs in 20 seconds to partial success runs in 1.5 hours.  Has anyone else experienced this kind of issue?  Any suggestions on WHY the issue is occurring or HOW to fix the issue?


I'm having the following problem on the beamer: The resulting frame does not enumerate the figure, ie, I would like "Figure 1:" to appear instead of "Figure:". I am placing the commands I am using, but if it is placed as \documentclass{article} it enumerates normally. \documentclass{beamer} \usepackage{color} \usepackage[portuguese]{babel} \usepackage[utf8]{inputenc} \usepackage{amssymb,amsmath} %para usar simbolos matematicos \usepackage{amsfonts} \usepackage{amsthm} \usepackage{amscd} \usepackage{beamerthemesplit} \usepackage{graphicx} \usepackage{float} \usepackage{ragged2e} \usepackage{tikz}  \begin{document} \begin{frame} \begin{figure}[!htb] \includegraphics[scale=0.5]{fig0} \caption{Esquematização do problema.} \end{figure}  \end{frame} \end{document}  Thanks for your help.

I am giving a presentation and therefore I am using the  class. I have included some figures and it works, but there is no number after "Figure".  My code:  \documentclass{beamer}  \usepackage{graphicx} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{listings} \usepackage{xcolor} \usepackage{eso-pic} \usepackage{mathrsfs} \usepackage{url} \usepackage{amssymb} \usepackage{amsmath} \usepackage{multirow} \usepackage{hyperref} \usepackage{booktabs} \usepackage{wallpaper} \usepackage{bbm} \usepackage{cooltooltips} \usepackage{eso-pic} \usepackage{everyshi} \usepackage{calc} \usepackage{graphicx} \usepackage{ifthen} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{animate} \usepackage[singlespacing]{setspace} \usepackage[absolute,overlay]{textpos} \usepackage{enumerate} \usepackage{hyperref} \newenvironment{changemargin}[2]{%   \begin{list}{}{%     \setlength{\topsep}{0pt}%     \setlength{\leftmargin}{#1}%     \setlength{\rightmargin}{#2}%     \setlength{\listparindent}{\parindent}%     \setlength{\itemindent}{\parindent}%     \setlength{\parsep}{\parskip}%   }%   \item[]}{\end{list}}  \setbeamercolor{frametitle}{fg=red,bg=white}  \hypersetup{pdfpagemode=FullScreen} \renewcommand*{\UrlFont}{\normalfont}  \usetheme{Goettingen} \useinnertheme{circles} \beamertemplatenavigationsymbolsempty  \setbeamerfont{page number in head/foot}{size=\large} \setbeamertemplate{footline}[frame number]   %%% \begin{document}  \frame[plain]{ \titlepage }  \setbeamertemplate{background canvas}[default]  \frame{ \frametitle{}  \begin{figure} \begin{center} \includegraphics[scale=0.2]{varweakness} \caption{VaR as a quantile} \end{center} \end{figure}  }   \end{document}   Which gives the following frame with the figure:    (I am not sure what is causing the problem, therefore I did not delete any package.)  How can I get a number, e.g. Figure 1:?


To mention possessions,  how many possessive nouns and possessives are we allowed to have in a sentence. Is it right to say?:     Jack's father's mother's brother's house

When there are multiple places where possession is shown, how are the words structured?  A few examples:   Greg's son's laptop is on fire. Mary's friends' boat is sinking. Thomas's neighbor's cat ate a mouse. Apple's Stock App's stats are useful. Microsoft's Xbox 360's games are fun.   Are these the correct ways to express possession?


I have been exploring quantum computing, I have no idea of decomposing arbitrary gates in Qiskit. Can someone help me with an example?

If I have an arbitrary non-unitary matrix of say $$ U = \begin{pmatrix} 1.5 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1.6 \\ 0 & 0 & 1 & 0 \\ 0 & 1 & 0 &  0 \\ \end{pmatrix},  $$  is it possible to decompose it into gates implementable in qiskit?  If so, how? If not, why not?  Is is possible to have any arbitrary non-unitary matrix as an input and get the corresponding gates that implement this arbitrary matrix?


Ive been trying to attack this question from different point of view but i cant make it. Basicly I started thinking that Frattini was not normal, i was trying to get a counterexample but all the groups I try failed.   Now I am convinced that The Frattini subgroup is normal but i cant prove it.  I would appreciate any help

I am revising for my Group Theory exam and am stuck on the following question;  The Frattini subgroup $\Phi(G)$ of a group $G$ is defined to be the intersection of all maximal subgroups of $G$. Prove that $\Phi(G)$ is a characteristic subgroup of G.  Why is this the case?


I am considering obtaining a pair (2) 3.2V AA Lithium Phosphate batteries rated at 600mAh for a project that needs to operate at 3.7v/1.8ohm at peak times and next to nothing the rest. Obviously the mAh significantly impacts on the usage time but would running two 600mAh batteries give me a similar usage time as a single 1200mAh might?  In other words does twice as many cells give me twice the mAh?

When combining battery cells in series, the voltages of the cells are added to get the voltage of the final circuit.  Do the mAh add up, or stay the same?  For example, suppose you have two 3.7V cells, each with 200 mAh capacity.  When connected in series, will the resulting battery will be a 7.4V, 200mAh battery?


Let $R$ be a commutative ring. Show that for any $a,b \in R$ nilpotent that $a+b$ is also nilpotent in $R$.  We know $a^n = 0$ for some n and $b^m = 0 $ for some m, so consider $(a+b)^{m+n} = (a+b)(a+b)...(a+b)$  $n+m$ times.  I don't see how $R$ being commutative helps me here.

if $a,b$ are nilpotent elements of a commutative ring $R$, show $a+b$ is also nilpotent  So then $a^n=0, b^m = 0, n,m \in \mathbb{Z}^+$ I know this is solvable using the binomial theorem but I would much rather solve it another way if possible. The answer using the binomial theorem isn't making the most sense at the present moment.


I want to show that given $\gcd(m,n)=1$ with $m,n \gt2$ and $\gcd(a, mn)=1$, then $a^{\frac{\phi(mn)}2} \equiv 1\pmod {mn}$, where $\phi(mn)$ is the Euler Totient function. My approach started using Euler's theorem, given $\gcd(a, n)= 1$ then $ a^{\phi(n)} \equiv 1\pmod {n}$. And since $(m,n)=1$ then: $$a^{\phi(mn)} \equiv 1\pmod {mn}$$ I just cannot seem to get the $\frac12$ factor to appear. What I tried doing was just raising both sides to the $\frac 12$ $$a^{\phi(mn)} \equiv 1\pmod {mn} \Rightarrow a^{\frac{\phi(mn)}2} \equiv 1^{\frac12}\pmod {mn} \equiv 1\pmod{mn}$$ But I somehow feel this is wrong. So another way I tried was again with Euler's theorem: $$a^{\phi(n)} \equiv 1\pmod {n} \Rightarrow (a^{\phi(m)})^{\phi(n)} \equiv 1\pmod {n} \Rightarrow a^{\phi(m)\phi(n)} \equiv 1\pmod {n} $$ $$a^{\phi(m)} \equiv 1\pmod {m} \Rightarrow (a^{\phi(n)})^{\phi(m)} \equiv 1\pmod {m} \Rightarrow a^{\phi(n)\phi(m)} \equiv 1\pmod {m} $$ Multiplying one by the other yields: $$a^{2\phi(m)\phi(n)} \equiv 1\pmod {mn} \Rightarrow a^{2\phi(mn)} \equiv 1\pmod {mn}$$ Or using the CRT: $$a^{\phi(m)\phi(n)} \equiv 1\pmod {mn} $$ From here I have no idea on where to go or what to try, I was thinking perhaps something related to Wilson's Theorem to make the $\frac12$ factor appear, but since m and n may not be prime, they are just coprime, I don't know if I can use that. Am I going in the right direction?

I am looking at the following question from my undergraduate Number Theory textbook:  Show that if p,q are different odd primes, and if gcd(p,q)=1, then a$\Phi$(pq)/2 $\equiv$  $1$ mod $pq$.  So far, the approach I have taken is trying to split up a$\Phi$(pq)/2 = (a$\Phi$(p)/2)$\Phi$(q) and apply Euler's theorem but I don't think I am really getting anywhere.  Any help would be greatly appreciated, thank you!


The Situation  I am Co-GM'ing in a group of 7 players - 6 male, 1 female. One of the male players is constantly making sexist remarks, such as "I'm gonna f_ck some b_tches when we get back to town" or "Shut up or I'll rape you", which makes most if not all of the others feel pretty uncomfortable.  Further, he shows little general respect for other players and their characters. He refuses to give them potions when they need some, he refuses to let others use their skills (e.g. he bashes a door in instead of letting someone else pick the lock), etc.  What we tried so far  We tried talking to him in-character, but he cared very little about the opinions of the other characters, both PC's and NPC's.  We tried talking to him out-of-character and explained that what he is saying is rude and makes the whole group feel uncomfortable, especially our only female player. He reasoned that this is the way he concepted the whole character, as being intentionaly "rude" and "barbarian".  Since none of these things helped in any way, we are currently seeing only two options:   Kill off his character Remove him from the group altogether   We hope that killing his character (possibly assassinate him by the group members), would be a clear signal that such language and behaviour is not accepted by the group. If all else fails, we also consider removing him from the group, but it would really be the last straw.  Do you have any recommendations for how to deal with such a player?  Result  During the session today he made multiple bad impressions yet again, so we decided to make it final and remove him from the group. He threw a tantrum, called us various things and stated we didn't know how to roleplay anyways, then ran off. All in all, the group seems to be much happier now, so I am glad things worked out the way it did. Many thanks to everyone involved in this discussion.

There was quite a bit of discussion about this after I posted , so I thought I would do as advised and re-ask the question in a new topic.  I will be playing D&D 5th edition soon with a group of all male players. This will be my first time playing D&D (or anything even remotely similar) and as the only female player this group has ever had, I'm quite worried about how to deal with integrating into the group. I'm interested in playing with this group because I'm very close to the DM, and I don't really know any other groups in the area. (The ones that I do are a bit too eager for a female player. I would rather deal with hostility.)  My main concern are two of the players that I know are difficult to deal with, as a girl.  One, from all my experiences with him, is extremely sexist and loves to put girls 'back into their place' and to let them 'know where they belong'.  He makes a point of it by calling me 'it' in real life, as, according to him, my unusual name isn't really a name and as such it isn't worth addressing me by.  The other I don't know well, but from what I've heard from the DM, is a sadist and likely to target and attempt to kill or seriously injure my character.  I'm extremely shy and I don't tend to speak up for myself, but I don't want to be put of from trying more RP games because of a bad first experience.   What's the best way to deal with difficult players, as a female that's new to the game?


I use following way to get file version of Control Panel.  var searcher = new System.Management.ManagementObjectSearcher(   "SELECT * FROM Win32_Product where Name ='My Application'"); foreach (System.Management.ManagementObject obj in searcher.Get()) {     MessageBox.Show("Latest Verstion: " + obj["Version"].toString()); }   This takes around 10 seconds to find the version. Can anybody suggest me faster way to get file version of Control Panel file?  Note: If I change query SELECT Version FROM Win32_Product where Name ='My Application', it takes same time.

This is a follow up from this .  I'm using this slightly modified script to enumerate all installed MSI packages:  strComputer = "."  Set objWMIService = GetObject("winmgmts:" & _     "{impersonationLevel=impersonate}!\\" & _     strComputer & _     "\root\cimv2")  Set colSoftware = objWMIService.ExecQuery _     ("SELECT * FROM Win32_Product")     If colSoftware.Count > 0 Then     For Each objSoftware in colSoftware         WScript.Echo objSoftware.Caption & vbtab & _         objSoftware.Version     Next Else     WScript.Echo "Cannot retrieve software from this computer." End If   What is surprising however, is its abysmal performance. Enumerating the 34 installed MSI packages on my XP box takes between 3 and 5 minutes !  By comparison, the Linux box that sits besides is taking 7s to enumerate 1400+ RPMs... sigh  Any clues on this ?


What is the physical meaning of the transpose of a matrix? Geometrically, does it show only reflection or does it have other geometrical significance too?

I can follow the definition of the transpose algebraically, i.e. as a reflection of a matrix across its diagonal, or in terms of dual spaces, but I lack any sort of geometric understanding of the transpose, or even symmetric matrices.  For example, if I have a linear transformation, say on the plane, my intuition is to visualize it as some linear distortion of the plane via scaling and rotation. I do not know how this distortion compares to the distortion that results from applying the transpose, or what one can say if the linear transformation is symmetric. Geometrically, why might we expect orthogonal matrices to be combinations of rotations and reflections?


After searching question by tag and opening a result, tapping the back button is clearing the tag used to query and the results.  Reproduce: tags → [tag] → tap a question → tap on the back arrow.   App Version: 1.0.95 Device Manufacturer: HUAWEI Device Model: PRA-LX1   OS Version: 8.0.0 (402(C432))

This looks a little bit like a variation on  but specific to the tags view.  Reproduction (app version 1.0.71):   Select any site (say Meta) from the sidebar Switch to the tags view using the top bar Choose a tag, any tag ( is nice)   optionaly refine your search with more terms  Go to any question found, go back   you end on the unfiltered tags view  Go back again   lucky you, your search is here


I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I have installed the ubuntu 14.04.2 LTS recently. I have used the terminal to install some music packages. But i dont no how many music packages that i have installed.So can any one help me with the commands used to find the list of packages install in the machine and how to uninstall it using command line.

I'd like to output a list of all installed packages into a text file so that I can review it and bulk-install on another system.  How would I do this?


I thought of a scenario where: if $ \lim_{x-> \infty}f(x)$ exists, which I can only imagine is a constant or asymptotic function, then it also seems like the derivative f' must also exist, but I don't know how to prove this either way. I guess if there is just a counterexample that would be easier than proving it. Is there an asymptotic function that somehow has a divergent derivative?

I've been thinking about this problem: Let $f: (a, +\infty) \to \mathbb{R}$ be a differentiable function such that $\lim\limits_{x \to +\infty} f(x) = L < \infty$. Then must it be the case that $\lim\limits_{x\to +\infty}f'(x) = 0$?  It looks like it's true, but I haven't managed to work out a proof. I came up with this, but it's pretty sketchy:  $$ \begin{align} \lim_{x \to +\infty} f'(x) &= \lim_{x \to +\infty} \lim_{h \to 0} \frac{f(x+h)-f(x)}{h} \\ &= \lim_{h \to 0} \lim_{x \to +\infty} \frac{f(x+h)-f(x)}{h} \\ &= \lim_{h \to 0} \frac1{h} \lim_{x \to +\infty}[f(x+h)-f(x)] \\ &= \lim_{h \to 0} \frac1{h}(L-L) \\ &= \lim_{h \to 0} \frac{0}{h} \\ &= 0 \end{align} $$  In particular, I don't think I can swap the order of the limits just like that. Is this correct, and if it isn't, how can we prove the statement? I know there is  already, but I think this is different in two aspects. First, that question assumes that $\lim\limits_{x \to +\infty}f'(x)$ exists, which I don't. Second, I also wanted to know if interchanging limits is a valid operation in this case.


I have a dict containing lists and need a fast way to dedupe the lists.  I know how to dedupe a list in isolation using the set() function, but in this case I want a fast way of iterating through the dict, deduping each list on the way.  hello = {'test1':[2,3,4,2,2,5,6], 'test2':[5,5,8,4,3,3,8,9]}   I'd like it to appear like;  hello = {'test1':[2,3,4,5,6], 'test2':[5,8,4,3,9]}   Though I don't necessarily need to have the original order of the lists preserved.  I've tried using a set like this, but it's not quite correct (it's not iterating properly and I'm losing the first key)  for key, value in hello.items(): goodbye = {key: set(value)} >>> goodbye {'test2': set([8, 9, 3, 4, 5])}   EDIT: Following PM 2Ring's comment below, I'm now populating the dict differently to avoid duplicates in the first place. Previously I was using lists, but using sets prevents dupes to be appended by default;  >>> my_numbers = {} >>> my_numbers['first'] = [1,2,2,2,6,5] >>> from collections import defaultdict >>> final_list = defaultdict(set) >>> for n in my_numbers['first']: final_list['test_first'].add(n) ...  >>> final_list['test_first'] set([1, 2, 5, 6])   As you can see, the final output is a deduped set, as required.

Is there a built-in that removes duplicates from list in Python, whilst preserving order? I know that I can use a set to remove duplicates, but that destroys the original order. I also know that I can roll my own like this:  def uniq(input):   output = []   for x in input:     if x not in output:       output.append(x)   return output   (Thanks to  for that .)  But I'd like to avail myself of a built-in or a more Pythonic idiom if possible.  Related question:


How to prove that the sample variance $S^2=\frac{1}{n-1} \sum_{j=1}^n\left(Y_{j}-\bar{Y}\right)^{2}$ is equal to $$\frac{1}{2 n(n-1)} \sum_{j \neq k}\left(Y_{j}-Y_{k}\right)^{2}?$$ I tried to write $Y_{j}-Y_{k}$ as $Y_{j}-\bar{Y}-(Y_{k}-\bar{Y})$, but I don't have idea what to do then.

In a example about U-statistics, $h(x_1,x_2)=\frac 12(x_1-x_2)^2$, then $$U_n=\frac{2}{n(n-1)}\sum_{i<j}\frac{(X_i-X_j)^2}{2}=\frac{1}{n-1}\sum_{i=1}^{n}(X_i-\bar{X})^2$$ I don't know how to prove it completely.


Given the following:   I have an AWS EC2 t3.small instance. The instance uses the most recent Ubuntu LTS as its operating system. The instance has 2GB RAM and 2 CPU cores available. I have installed modern versions of Nginx, PHP, and PHP-FPM. All other services (MySQL, Redis, Supervisor, SMTP, and Cron) are installed on other instances. I have deployed a RESTful API codebase to that instance. The codebase uses a modern version of Symfony, Laravel, or CakePHP. The instance takes around 100ms to respond to a single request.   I have calculated that this instance can serve 20 requests per second. My logic is as follows:   Each request takes around 100ms to respond. Each core can respond to 10 requests per second. The instance has two cores.   Does this sound correct?

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


I have a computer, it is an ultrabook (fujitsu UH572). This computer doesn't have any problem when installing ubuntu into internal SSD. But when I install the ubuntu 14.04.2 on an external USB 3 HDD (it is a SATA3 to USB3 HDD adapter with ASMedia chipset), and then perform a system suspend, the system suspends successfully. But if I wake up the system, the system wakes up successfully, but dmesg has a lot of I/O errors, and I can't load or save anything into my root partition (/), for example, when I try to save the output of dmesg to my home directory (which resides in my root partition), the command hangs and displays a lot of I/O error.  How do I enable the system to suspend correctly when I boot from the external HDD? Thank you for the asistance in advance.

I have a laptop running Ubuntu 14.04 from a root file system on USB storage. This is not working well, because after wake up from suspend, ext4 will frequently try to write to the root file system before USB is ready.  Here is what I see in the kernel log when this happens, notice how I get a bunch of I/O errors on sda1, and then one second later the USB storage drive is finally detected by the kernel.  [ 2826.517419] wlan0: associated [ 2826.517452] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 2827.575371] EXT4-fs warning (device sda1): ext4_end_bio:317: I/O error -5 writing to inode 1733735 (offset 0 size 0 starting block 12629950) [ 2827.575380] Buffer I/O error on device sda1, logical block 12629694 [ 2827.575400] EXT4-fs warning (device sda1): ext4_end_bio:317: I/O error -5 writing to inode 3148603 (offset 0 size 8192 starting block 12844470) [ 2827.575404] Buffer I/O error on device sda1, logical block 12844212 [ 2827.575411] Buffer I/O error on device sda1, logical block 12844213 [ 2827.575448] EXT4-fs warning (device sda1): ext4_end_bio:317: I/O error -5 writing to inode 3015015 (offset 0 size 90112 starting block 6588832) [ 2827.575453] Buffer I/O error on device sda1, logical block 6588576 [ 2827.575461] Buffer I/O error on device sda1, logical block 6588577 [ 2827.575465] Buffer I/O error on device sda1, logical block 6588578 [ 2827.575469] Buffer I/O error on device sda1, logical block 6588579 [ 2827.575473] Buffer I/O error on device sda1, logical block 6588580 [ 2827.575477] Buffer I/O error on device sda1, logical block 6588581 [ 2827.575481] Buffer I/O error on device sda1, logical block 6588582 [ 2828.857284] sd 0:0:0:0: [sda] No Caching mode page found [ 2828.857293] sd 0:0:0:0: [sda] Assuming drive cache: write through   At first there is no visible indication outside of the kernel log, that the problem has triggered, but if I let Ubuntu stay running beyond this point, then the file system will get errors and eventually switch to read only mode. At that point I have to reboot into recovery mode and run fsck.ext4 manually from a root shell in order to repair the file system.  Is there some setting I can change such that access to the root device after waking from suspend can be delayed until the USB drive is ready?


sudo apt update Err:17 http://ppa.launchpad.net/leaeasy/dde/ubuntu focal Release        404  Not Found [IP: 2001:67c:1560:8008::15 80]      Err:18 http://ppa.launchpad.net/mc3man/trusty-media/ubuntu focal Release        404  Not Found [IP: 2001:67c:1560:8008::15 80]       Err:19 http://ppa.launchpad.net/mc3man/xerus-media/ubuntu focal Release        404  Not Found [IP: 2001:67c:1560:8008::15 80]      Err:20 http://ppa.launchpad.net/petrakis/wdt-main/ubuntu focal Release        404  Not Found [IP: 2001:67c:1560:8008::15 80]      Err:21 http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu focal Release        404  Not Found [IP: 2001:67c:1560:8008::15 80]      Err:22 http://ppa.launchpad.net/webupd8team/java/ubuntu focal Release        404  Not Found [IP: 2001:67c:1560:8008::15 80]      Err:23 http://ppa.launchpad.net/webupd8team/java/ubuntu eoan Release        404  Not Found [IP: 2001:67c:1560:8008::15 80]      Reading package lists... Done      E: The repository 'http://ppa.launchpad.net/leaeasy/dde/ubuntu focal Release' does not have a Release file.      E: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu focal Release' does not have a Release file.      E: The repository 'http://ppa.launchpad.net/mc3man/xerus-media/ubuntu focal Release' does not have a Release file.      E: The repository 'http://ppa.launchpad.net/petrakis/wdt-main/ubuntu focal Release' does not hav      E: The repository 'http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu focal Release' does not have a Release file.      E: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu focal Release' does not have       E: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu eoan Release' does not have   I upgraded Ubuntu version to 20.04. Now I can't use "sudo apt update" or "sudo apt-get update". It gave me those PPA errors. Can anyone help me to fix those errors. Thank you.**

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


Show that: $$cond_2(A^TA)={cond_2(A)}^2$$  The only thing that i know is that $||A||_2=max[\sqrt{\lambda} \in \Bbb R|\lambda \ is\ an\ eigenvalue\ of \ A^TA ]$ Can someone help me, please?

Let $A$ be a real $m\times n$ matrix. Why is the  $\kappa(A^T A)$ approximately the square of the $\kappa(A)$?


The question is to find out $2005^{2007^{2009}}\bmod 7$ or the remainder when $2005^{2007^{2009}}$ is divided by $7$. My steps $: \\ 2005\equiv3\pmod 7\\ 2005^3\equiv3^3\equiv-1\pmod7\\ 2005^{2007}\equiv-1^{669}\equiv-1\pmod7$  How do I proceed? Please help!!!

How do I efficiently compute $a^b\bmod c$:  When $b$ is huge, for instance $5^{844325}\bmod 21$? When $b$ is less than $c$ but it would still be a lot of work to multiply $a$ by itself $b$ times, for instance $5^{69}\bmod 101$? When $(a,c)\ne1$, for instance $6^{103}\bmod 14$?  Are there any other tricks for evaluating exponents in modular arithmetic?  This is being asked in an effort to cut down on duplicates, see  and .


I'm confused that which version should install, 12.04 LTS or 13.04? What i'm missing in 12.04?

What are the differences between an Ubuntu Long Term Support release (LTS) and a normal release?


Say I have two topological spaces given by $(X,\mathscr{T}_X)$ and $(Y,\mathscr{T}_Y)$ where $Y$ is Hausdorff. In addition say I have a function $f:X\rightarrow Y$, and let it be continuous. I want to show that $Gr(f):=\{(x,f(x))\mid x\in X\}$ is a closed subset of $(X\times Y)$.   In answering this question, could you also provide the "chain of thought" that brought you to the solution. I am aware of what the continuity of the function and the fact that $Y$ is Hausdorff provides me in terms of definition. I am however, finding it hard to find a -link- towards answering the question. Thank you all in advance for your help.

I'm thinking about Hausdorff spaces, and how mappings to Hausdorff spaces behave. Suppose I have an arbitrary (continuous) function $f:X \longrightarrow Y$, where $Y$ is a Hausdorff space (I think it is irrelevant for my question whether $X$ is Hausdorff or not, so I just consider it to be a topological space - if this is incorrect, please correct me!).  Can we say that the graph $$G_f=\{(x,f(x)) \in X \times Y\ : x \in X \}$$ is a closed subset of $X \times Y$? It seems quite obvious that it is the case, but I cannot see how to prove it. If anyone can offer a proof I'd be very interested. Regards.  EDIT 1  In response to Hennning Makholm:   I wasn't really aware of any variation in 'definition'; I guess I'm considering closed sets to be those with an open complement (though naturally this definition gives rise to other definitions, such as the subset equalling its closure etc.). For continuity of such a map, I would normally consider continuity to mean that $f^{-1}(V)$ is closed in $X$ whenever $V$ is closed in $Y$, though again definitions involving convergence of sequences and the notion that $f$ is continuous iff $f(\overline{A}) \subset \overline{f(A)}$ for every $A \subset X$ are also known to me.


I have class that implements interface as below  class Person : IHuman { }   I have created dictionary as below  Dictionary <IHuman, collection<int>> dic = new Dictionary <IHuman, collection<int>>();   Now I add one key value pair as belwow  dic.Add (person, myCollection);   Again when I use containsKey for "same person object and with same HashCode" as below  if (dic.ContainsKey(person)) {     dic[person] = mynewcollection; } else {     dic.Add (person, mynewcollection); }   Here ContainsKey() returns false and creates one more key value pair with same person object.  I wondered how it possible... Please help me to sort out this issue.

If I want to use objects as the keys for a Dictionary, what methods will I need to override to make them compare in a specific way?  Say I have a a class which has properties:  class Foo {     public string Name { get; set; }     public int FooID { get; set; }      // elided }    And I want to create a:  Dictionary<Foo, List<Stuff>>   I want Foo objects with the same FooID to be considered the same group.  Which methods will I need to override in the Foo class?  To summarize: I want to categorize Stuff objects into lists, grouped by Foo objects. Stuff objects will have a FooID to link them to their category.


Email's which we are sending to Salesforce in order to associate with records in Salesforce  is not getting associated with any records .In fact ,when I send an email to salesforce using outlook then salesforce is classifying it as spam and in the subject it puts   {SPAM: 40} :Undeliverable: and sends it back to us and the rest of the error is given below.  This message was created automatically by the mail system.  A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:                 emailtosalesforce@dmsi81qidzeggr6vknn7rr7oosgsgdyccyvb1ttzshtw64lg6.       8-dea8eae.c.le.salesforce.com (Undelivered): 551 Failed due to:        SenderAuthorization.           I do not understand how salesforce can classify it as spam.I have tried sending it from three different email addresses using outlook but it always sends it back as {spam 40}  and when I try to send it through Yahoomail it works perfectly fine.It works fine in Production as well as sandbox.We do have valid email addresses registered in the section email to salesforce so that is not the problem   What can we do to resolve this issue? or what do u guys suggests.I hope some salesforce technical employee can guide us.

While sending an attachment as an email to be attached to the salesforce record.Salesforce is giving the below given error.  Generating server: mx1.madison.gov  6-2j26dncatawfg1112dv2uwxupq9hzfgmjrrlrn2rx48cxm93nt.8-dea8eae.c.le.salesforce.com mx1-asg.mta.salesforce.com # #SMTP#  Is this salesforce problem or it is the Internal company server problem as I could see that error mentions company server name also.But to me doesn't look like company server error.


I have an established blog that has been putting out content for a year.  Today I noticed that somebody has cloned my entire website, word-for-word, and hosted it on a separate domain.  When I say cloned, I mean you could put them side-by-side and they would look identical, so everything has been copied, including content, layout, etc.  I looked at the source and the HTML has been copied verbatim.  The new domain has only been registered a few weeks ago.  Unfortunately the copied site is now outranking my real site on a few keywords in google search results!  On some keywords the fake site has taken my place on the first page of the search results, and my site is no longer even listed!  What can I do about this?  Update: I filed a DCMA complaint with Google.  Update: I just discovered that he is just using his site as a proxy to access mine. I can block his IP from accessing my site which would effectively solve the problem (maybe only temporarily?), but then what happens when Google investigates the DCMA and finds nothing?

One of our websites was copied word for word all 400 pages by someone who used a special program to clone the site. We saw the program in the code.   This was done in early April and soon after that we lost a lot of rank in Google. We just discovered the copied site today. It is mirrorred 100%.   We did change the front page of our site since then to make some differences but since the Penguin update, we still have not recovered. We have also corrected the problems in Webmaster Tools. Will the mirrored site affect our Google rank to a severe degree or are there other issues that are affecting us? What can be done about that mirrored site?


Is $(M^e \pmod n)^d \pmod n = M^{ed} \pmod n$ ?  If this is true, how can I prove that?

I am working on a problem I am pretty close to solving but I can't figure out the last part. I used some algebraic manipluation to break the problem down. The problem is:     Show that the following congruence is true      a^b = ((a mod n)^b) (mod n)      for any positive integers a, b, and n.      Hint: Number a can be written as a = q*n + r, where q = floor brackets a/n, and r = a mod n.   My attempt it:     (q*n +r)^b = ((a mod n)^b) * (mod n)      (q*n)^b + (a mod n)^b = ((a mod n) ^b) * (mod n)      (a)^b -(r)^b = ((a mod n) ^b) * (mod n)      (a)^b = modn  ----> divided by ((a mod n)^b)   Am I doing this correctly and if so how can I prove this is true? Is there a trick I am missing? I think that by simplifying it further I would just keep going in a loop.  Thanks!


Let $(x - 1)^3$ divide $(P(x) + 1)$ and $(x + 1)^3$ divide$ (P(x) - 1)$. Find the polynomial $P(x)$ of degree $5$. I tried utilising the divisibility laws but to no result. I then tried bujte force to find two polynomials of degree 2 that satisfy both the equations. But still got no result. Please help me.

I have to find $P(0)$ from the polynomial with minimum degree given that  $$(x-1)^3|(P(x)+1)$$  $$(x+1)^3|(P(x)-1)$$  Plugging in $x=\pm 1$ gets something nice, also division by a polynomial of third order gives successively:  $$P(1)+1 =0; \ P'(1)=0; \ P''(1)=0$$ $$P(-1)-1 =0; \ P'(-1)=0; \ P''(-1)=0$$  Furthermore since $P(1)=-1$ and $P(-1)=1$, also $P(1)=-P(-1)$  and $$P'(1)=P''(1)=P'(-1)=P''(-1)$$ I don't see how to use this stuff.


I have a file say Test.py, I am importing this Test.py into another main.py. now considering that all the lines in Test.py as string, how can I search for a substring in Test.py by writing the required code in main.py

Suppose I have a Python function as defined below:  def foo(arg1,arg2):     #do something with args     a = arg1 + arg2     return a   I can get the name of the function using foo.func_name. How can I programmatically get its source code, as I typed above?


I am using below code for auto share on facebook in my iPhone application, but my application get crashed with EXC_BAD_ACCESS message, when i tap share button.   NSMutableDictionary *variables = [NSMutableDictionary dictionaryWithCapacity:4]; [variables setObject:@"Yours content to be shared" forKey:@"message"]; // share prepared content to fb fb_graph_response = [fbGraph doGraphPost:@"me/feed" withPostVars:variables]; NSLog(@"postMeFeedButtonPressed:  %@", fb_graph_response.htmlResponse);   help me out thanks in advance.

When deploying the application to the device, the program will quit after a few cycles with the following error:  Program received signal: "EXC_BAD_ACCESS".   The program runs without any issue on the iPhone simulator, it will also debug and run as long as I step through the instructions one at a time. As soon as I let it run again, I will hit the EXC_BAD_ACCESS signal.  In this particular case, it happened to be an error in the accelerometer code. It would not execute within the simulator, which is why it did not throw any errors. However, it would execute once deployed to the device.  Most of the answers to this question deal with the general EXC_BAD_ACCESS error, so I will leave this open as a catch-all for the dreaded Bad Access error.  EXC_BAD_ACCESS is typically thrown as the result of an illegal memory access. You can find more information in the answers below.  Have you encountered the EXC_BAD_ACCESS signal before, and how did you deal with it?


In ruby:  "experience"[/.e/]  => "pe"    Just like expected. However...  "experience"[/.*e/]  => "experience"   Is there a way to write a regular expression that returns to first/shorter version it comes across?  "experience"[regexp] => "expe"

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


Let $R$ be a symmetric, transitive relation. If $(x, y) \in R$ then the symmetric property implies that $(y, x) \in R$. Using the the transitive property upon $(x, y)$ and $(y, x)$ we can conclude $(x, x) \in R$. Is this fair logic or is it flawed?

I've been wondering recently the following:  Let $\sim $ be a symmetric and transitive relation defined on $S $. Let $a \sim b $, which implies $b \sim a $ by symmetry, and by transitivity, $a \sim a $. Hence, $\sim $ is reflexive.  I can't think of any counterexamples, although any are welcome. Also, if there is some counterexample, where could be the flaw in my reasoning be?


On common UNIX-like computer operating systems there was extremely flexible/customizeable/lightweight tool for System Stats monitoring, called . I'd like to find alternative system monitoring tool for operating system stats in OS X, preferable with the same set of features or more, e.g.:   OS stats monitoring (CPU usage, mem usage, network monitoring, disk usage, "top" like process stats, uname, uptime, etc); support of compact representation in system tray (menu bar), or/end desktop-widget view; lightweight; highly customizable, support of user configuration (alike in conky-app: display information either as text, or using simple progress bars and graph widgets, with different fonts and colours);   What options for application/tools exist for OS X?  I searched for the other topics, and found, that answers/questions are not well organized, some of them are really specialized, lots of duplicates, etc. Let's be more specific.  Rules to structure the answer   One app per answer. Use this format for the first two lines of your answer:     ## [app name](link to website)      ### [App Store](link to AppStore) (price)  Check for duplicates before adding new answers. If you find a duplicate, vote it down and encourage its poster to up-vote the original entry instead (and remove the duplicate). Include short description (preferably not marketing text) about what this system monitor does:   which OS stats (uname, uptime, CPU usage, mem usage, disk usage, "top" like process stats, and network monitoring, just to name a few); what are configuration options, how flexible they are; can it be shown nicely/compact in system tray (menu bar); can it display information either as text, or using simple progress bars and graph widgets, with different fonts and colours; provide one-two screenshots, if possible (with permanent link) unique features; is it lightweight or monstrous; etc.

I would like to monitor CPU and memory usage in realtime with charts on a macOS system tray (menu bar). Is there a utility that provides such functionality?


I am blocking on this question :  Is every instance of Y able to call the method aMethod() of every other instance of Y. The answer I found is NO.       package a;      class X{      protected void aMethod()     { }      }       package b;  class Y extends X     { }   Can you explain to me why? thanks.

In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?


How to prove that when $m$ is not a full power of any natural number, then $m^{(1/2) }$ is irrational   I have tried this but got nothing;  $\sqrt{m}=\frac{p}{q}$ were $p,q$ are natural and $\gcd(p,q)=1$;

It is well known that $\sqrt{2}$ is irrational, and by modifying the proof (replacing 'even' with 'divisible by $3$'), one can prove that $\sqrt{3}$ is irrational, as well.  On the other hand, clearly $\sqrt{n^2} = n$ for any positive integer $n$.  It seems that any positive integer has a square root that is either an integer or irrational number.        How do we prove that if $a \in  \mathbb N$, then $\sqrt a$ is an integer or an irrational number?      I also notice that I can modify the proof that $\sqrt{2}$ is irrational to prove that $\sqrt[3]{2}, \sqrt[4]{2}, \cdots$ are all irrational.  This suggests we can extend the previous result to other radicals.        Can we extend 1? That is, can we show that for any $a, b \in \mathbb{N}$, $a^{1/b}$ is either an integer or irrational?


I am using a Micromax Canvas A116. It's not a rooted phone. I've done a factory-reset, but still malware app existing. How to remove monkey test, time service in mobile phone? And everytime phone gets reboot and unwanted apps like get touch, paytm etc., get installed. How to resolve this?    Screenshot (click to enlarge)  I tried all the possible ways

When I long-press the "home" button to close all apps, there is an app named "time service" with android symbol and another named "monkey test" that are always open.   How to stop this?


Please explain the output #define swap(a,b) temp=a; a=b; b=temp; int main( ) {      int i, j, temp;     i=5;     j=10;     temp=0;     if(i>j)     swap( i, j );     printf( "%d %d %d", i, j, temp);  }  output:10 0 0 #define swap(a,b) printf("%d %d %d\n",temp,a,b); temp=a; a=b; b=temp; int main( ) {      int i, j, temp;     i=5;     j=10;     temp=0;     if(i>j)     swap( i, j );     printf( "%d %d %d", i, j, temp);  }  output:10 5 5 //only difference between first and second code is printf statement in the directive part and second code doesn't print twice

In many C/C++ macros I'm seeing the code of the macro wrapped in what seems like a meaningless do while loop.  Here are examples.  #define FOO(X) do { f(X); g(X); } while (0) #define FOO(X) if (1) { f(X); g(X); } else   I can't see what the do while is doing.  Why not just write this without it?  #define FOO(X) f(X); g(X)


I am making an app to fetch some html from url, using JSOUP. Parsing from single url works correctly but whenever I used more than one urls it doesn't work.  This is my code:  public class Test extends AsyncTask<String, Void, Void> {     String desc;     String u;     String key;      String xy;      public Test(Activity contex, String key) {         this.mContex = contex;         this.key = key;     }      Activity mContex;      @Override     protected void onPreExecute() {         super.onPreExecute();         mProgressDialog = ProgressDialog                 .show(getActivity(), "", null, true);         mProgressDialog.setMessage("Loading...");         mProgressDialog.setIndeterminate(true);         mProgressDialog.show();         xy = key;      }      @Override     protected Void doInBackground(String... params) {         if (xy == "abcd") {             String url = "http://.....";             try {                  Document document = Jsoup.connect(url).get();                 Elements myin = document.select("div.content-wrap");                 desc = myin.text().toString();               } catch (IOException e) {                 e.printStackTrace();             }          }         return null;      }      @Override     protected void onPostExecute(Void result) {         respText.setText(desc);          mProgressDialog.dismiss();      }  }    the key is sent to asynctask using switch case.And I want to add 8 more if statements to doInbackground  What my problem is that whenever I run this project without ' if ' statement it works, but if I add 'if(xy=="abcd")' it doesn't work. No error is there, So I can't figure this.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


var myData = {   "value1": {       "ext": false   },   "value2": {       "ext": false   } };  myData.value1.ext = true;   How can I loop through myData to see if the ext for all the properties in my object are true?  Something like this:  if (value1.ext === true && value2.ext === true) {      //do something }

I have a JavaScript object like the following:  var p = {     "p1": "value1",     "p2": "value2",     "p3": "value3" };   Now I want to loop through all p elements (p1, p2, p3...) And get their keys and values. How can I do that?  I can modify the JavaScript object if necessary. My ultimate goal is to loop through some key value pairs and if possible I want to avoid using eval.


I have a script that requires the IP to be written correctly.  Examples:  192.168.0.1 -> echo ok 1.2.3.4 -> echo ok 4.3.a.3 -> echo Not ok 300.52.256.1 -> not ok 1.2.3.4.5 -> not ok   I've tried this:   if [[ $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]                then                             echo SUCCES!   But this is not good enough since 300.2.3.4 is a good IP for this expression.  The only accepted IPs should be something like (0-255).(0-255).(0-255).0-255)

echo "1.1.1.1" | awk '/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*/ {print $1}'   How can I filter IPv4 addresses in a script, and how can I filter IPv6 addresses.  I mean more precisely then this so the oneliner should only output VALID IPv4 addresses or another script to output only VALID IPv6 addr. In different languages? like: awk, perl?  ty!


I am working on the following exercise:     Let $(X_1,\ldots,X_n)$ be a random sample from a uniform distribution $U[0,\theta]$. Show that the estimator $$A_n = \frac{n+1}{n} \max\{X_1,\ldots,X_n\}$$ is unbiased, i.e. $E(A_n) = \theta$.   I first computed the CDF of $\max\{X_1,\ldots,X_n\}$ as   $$\prod_{i=1}^{n} P(X_i \le x) = x^n$$  and so the PDF is $nx^{n-1}$. But when I try to calculate the expected value I get:  $$E(A_n) = \frac{n+1}{n} \cdot E(\max\{X_1,\ldots,X_n\} = \frac{n+1}{n} \cdot \int_{0}^{\theta}nx^{n-1} \cdot x \ dx = \theta^{n+1}.$$  Could you tell me what I am doing wrong?

Let $ x_i $ be iid observations in a sample from a uniform distribution over $ \left[ 0, \theta \right] $.  Now I need to estimate $ \theta $ based on $N$ observations and I want the estimator to be unbiased.  I thought about simple estimator $ \hat{\theta} = \max \left( x_i \right) $.  Based on simulation it is not biased, yet I couldn't show it analytically.  Could anyone, please, show it is unbiased?  BTW, I could easily find another, easy to prove, unbiased estimator, $ \hat{\theta} = 2 \mathrm{mean} \left( {x}_{i} \right) $


Please kindly help with this problem on converging sequence.  Question Determine whether the sequence $\bigl(\sqrt{4n^2+n}-2n\bigr)_{n\in\mathbb N}$ converges and if it converges, guess its limits and prove your guess.  Now what I don't really understand is to proof the convergence of the sequence, because it has no limit point, so how do we prove it is convergent, and show me your guess.

$$\lim_{n\rightarrow \infty}\left[{\sqrt{4n^2+n}-2n}\right]=\frac{1}{4}$$ I am trying to use the definition of the limit but have no idea how to simplify the expression with radical!  ---edit---  so by the definition, $\forall n > N \rightarrow |a_n - a | < \epsilon, \text{where}\, \ a_n=\sqrt{4n^2+n}-2n\ \, \text{and}\,\  a = \frac{1}{4}$  so after multiply the conjugate and negate $\frac{1}{4}$, I get $\frac{2n-\sqrt{4n^2+n}}{4(\sqrt{4n^2+n}+2n)}$  Since there is still radical in the numerator, I think I have multiply the conjugate again...right?? And then find some formula that is greater!!??? confuse me this real analysis!!


When dragging/dropping files one by one from one GNOME Files (Nautilus) window to another they will be copied in parallel. This leads to a large and not needed workload without speeding up the transfer of any single file.  Does anyone know how to force GNOME Files to use the file copy queue in sequential mode (one file after another)?  To make my question more precise: I do not ask how to queue sequentially with the help of another program. I expect GNOME Files to be able to handle sequential mode, but simply don't know how to activate it.

When I pick and choose files to copy to or from a single device, Nautilus accumulates file operations in parallel:    I worry that in certain circumstances this could cause fragmentation of the destination device, or transfer slowdowns due to scattered reads on the source device and increased network connection overhead.  How can I queue these file operations instead, so that each operation starts only after the previous one has finished?


I installed Ubuntu server on my conputer. I want to study zotero server code. I have to install Zotero open source server code on Ubuntu server. What command should I use?

I download the tar.bz file from the home page of zotero, extract it and run the file 'run-zotero.sh', but it open zotero rather than install it. How to install it? Any help or suggestion will be appreciated!


Haven't read it since I was a child, but I recall a story involving a young man who's father built some kind of time portal that appeared as a circular rainbow. ("No end, therefore no pot of gold" was mentioned at one point.)    During the story, I believe they move thru it at least once or twice in it's early, dinosaur era incarnation, and at one point have it suffer major issues when a dinosaur steps on it, and a tube shaped volume of Dino comes thru it.  Later, it's pointed at a later (historically) time, where the protagonist befriends a young girl (and makes her some clothing, which she later takes off, points at him and puts back on, to his embarrassment, as she tries to explain where it came from) who, at the end of the story, inadvertently came back with them to the 'modern' age.  Any ideas?

I remember reading a time travel book when I was young, which means it would have been written no later than the '80s, but probably much before that.  It featured an adult and some kids back in time and them trying to get back to the present.  I recall that the time travel effect was a ring, as at one point the ring opened up and a "brontosaurus" hit it and burned it's leg sending chunks of it back through the ring.  I recall a section where they were with "cave people" who had just hunted and killed some animal, and they used their pocket knife to extract more meat from the carcass, and actually cooking the meat unlike their paleolithic 'friends'.  (I seem to recall that one of the paleolithic girls seemed to fancy the boy time traveler, much to his discomfort.)  I am pretty sure that at one point they were watching the time ring appear over water, knowing they could not reach it, and waiting for it to be reachable.  I think the close of the book was them freezing to death in the ice age, commenting on how in the future when their bodies are found how it would be hard to explain how they got there, and then finally being rescued before it was too late.  I hope that's enough to go on?  Any ideas?


Is the equation $$\nabla_a\sqrt{-g}=0$$ correct? Here $\nabla_a$ is the Levi-Civita connection, and $g$ is the determinant of metric $g_{ab}$. Apparently, we have $\nabla_ag_{bc}=0$, but I am not sure whether the up-mentioned equation is correct or not.

This question, , seems to indicate $$\nabla_a \sqrt{g}=0.$$ Why is this the case? I've always learned that $$\nabla_a f= \partial_a f,$$ hence surely $$\nabla_a \sqrt{g}=  \partial_a\sqrt{g} \neq 0. $$  Where's the hole in my logic?


Enable Wireless link is not seen in Ubuntu 17.04 post installation on rome machine, hence I am not able to connect via WiFi  Refer  for output from wireless-info  sudo modprobe wl modprobe: ERROR: could not insert 'wl': Required key not available

This issue happens only on UEFI systems with enabled Secure Boot.  When I try to install DKMS modules like VirtualBox, Nvidia, or Broadcom drivers, they do not install and I get Required key not available when I try to modprobe them.  VirtualBox complains that vboxdrv is not loaded.  Broadcom wl driver is shown in lspci -k as a kernel module but is not in use. sudo modprobe wl throws Required key not available.  Also this issue may happen when I install some kernel modules from git sources.  This issue may appear after a kernel update as disabled wireless adapter, black screen after a reboot, etc.   How can I fix it?


Let $a_n$ and $b_n$ be natural sequence such that  $$a_n+b_n\sqrt3=(1+\sqrt3)^n$$  How can I find explicit formula for $a_n$ and $b_n$

I'm having trouble solving this problem. I have relation for two sequences of natural numbers.   $$a(n)+\sqrt3\cdot b(n)=\left(1+\sqrt3\right)^n$$  and I have to prove that recursions:  $$\begin{align*} &a(n+1)=a(n)+3b(n)\\ &b(n+1)=a(n)+b(n) \end{align*}$$  will satisfy relation mentioned above. I tried solve it using induction but I failed. Can anybody help with some other ideas?


I'm trying to create a list of id's, where the numbers are made up of three different lists: the first part of the number should be from the list pers:  pers = list(range(1,12))   The second part should be a combination of the person id, and the number 1 or 2 (not necessarily a list, as it is just two numbers), like this:  ids = [11, 12, 21, 22, 31, 32, 41, 42, 51, 52, 61, 62, 71, 72, 81, 82, 91,        92, 101, 102, 111, 112]   The third part should be a combination of the above and the values in the list reps:   reps = list(range(1,13))   like this:  ids = [111, 112, 113, 114, 115, 116, 117, 118, 119, 1110, 1111, 1112,        121, 122, 123, 124, 125, 126, 127, 128, 129, 1210, 1211, 1212 ...]   and so on, all the way up to 11212 (person 11, condition 2,  repetition 12). In total around 2250 items in the list.  I've tried various itertools functions, or nested for loops, lists of lists and tips in , but none seem to yield what I need.

How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]


I wanna proof that if A is a derformation retract of $X$, then $(j)_*: \pi_1(A,x_0) \to \pi_1(X,x_0)$ which is induced by the inclusion $j:A \to X$ is an isomorphism for all $x_0 \in A$. I already proved that $(j)_*$ is injectiv but how to do it with the surjectivity? Thanks for your help

I'm new at algebraic topology and I'm working on proving the following theorem  Theorem. Let $(X, x_0)$ and $(Y, y_0)$ two pointed topological spaces such that there exist two continuous pointed maps $f : (X, x_0) \to (Y, y_0)$ and $g : (Y, y_0) \to (X, x_0)$ such that $g \circ f$ and the identity $id_X$ are homotopic, and $f \circ g$ and the identity $id_Y$ are homotopic. So, the maps $$     \begin{array}{ccccc}         f_{\ast} & : & \pi_1(X, x_0) & \longrightarrow & \pi_1(Y, y_0) \\         & & [\gamma] & \longmapsto & [f \circ \gamma]     \end{array} $$ and $$     \begin{array}{ccccc}         g_{\ast} & : & \pi_1(Y, y_0) & \longrightarrow & \pi_1(X, x_0) \\         & & [\sigma] & \longmapsto & [g \circ \sigma]     \end{array} $$ are isomorphisms.  To this end, we need the following proposition (which I managed to demonstrate)  Proposition. Let $X$ and $Y$ two topological spaces and $x_0 \in X$. Let $f_1 : X \to Y$ and $f_2 : X \to Y$ be two continuous homotopic maps via the map $h : X \times [0, 1] \to Y$. Let $\gamma : I \to Y$; $t \mapsto h(x_0, t)$. Then, for all loop $\delta : [0, 1] \to X$ based at $x_0$, we have $$     [\overline{\gamma} \ast (f_1 \circ \delta) \ast \gamma] = [f_2 \circ \delta] \in \pi_1(Y, f_2(x_0)) $$ where $\ast$ is the composition of paths, and $\overline{\gamma}$ is the inverse path of $\gamma$.  So here is the demonstration (and where I Will mention the step where I'm stuck)  Proof of the theorem. Let $h : X \times [0, 1] \to X$ the homotopy such that $h(x, 0) = x$ and $h(x, 1) = g \circ f (x)$, for all $x \in X$. Let $\gamma : [0, 1] \to X$, $t \mapsto h(x_0, t)$.  From the proposition above, we have  $$     [\overline{\gamma} \ast \delta \ast \gamma] = [g \circ f \circ \delta] \in \pi_1(X, x_0) $$ for all loop $\delta : [0,1] \to X$ based at $x_0$.  Note that $\gamma$ is a loop based on $x_0$: $\gamma(0) = h(x_0, 0) = x_0$ and $\gamma(1) = h(x_0, 1) = g(f(x_0)) = g(y_0) = x_0$. So we can write $$     [\overline{\gamma}] \ast [\delta] \ast [\gamma] = (g \circ f)_{\ast}([\delta]) \in \pi_1(X, x_0) $$ This proves that $(g \circ f)_{\ast} = id_{\pi_1(X, x_0)}$ but I don't know why since composition of homotopy classes is not commutative.  (The end of the proof is pretty obvious by using the fact that $(g \circ f)_{\ast} = g_{\ast} \circ f_{\ast}$.)  Remark. I'm not actually searching for another proof of the isomorphism of $f_*$ and $g_*$, I'm just wondering why we deduced that $(g \circ f)_* = id_{\pi_1(X, x_0)}$ and any help or hint would be great.  Thanks in advance.  Best regards.  K. Y.


If I have a process that spawns child processes, is there a good way to get a single number representing the combined CPU use of that process and its children?  i.e is there a simple shell command available, or perhaps some info in /proc?  Target OS is either Centos or Ubuntu.

Is there way to determine using standard Linux/Unix tools how much a process has spent in User mode and how much waiting for kernel?  In other words, exactly the "user" and "sys" values that you get when using time, but during process runtime?  NOTE: one way is to use WBEM and enumerate Linux_UnixProcess, but I need to use other tool than this; my aim is to verify what WBEM provider tells me, i.e. I need to use different tool.


i have my main.js file and code :  createPiece(row, column) {         const w = Math.round(this.dimensions.width/this.options.pieces.columns);         const h = Math.round(this.dimensions.height/this.options.pieces.rows);         const piece = document.createElement('div');         if (row==2 && column==0){         piece.style.backgroundImage = url(${this.imgsrc});          piece.className = 'piecehtml';`   In my html file :  const piecesObj = new Pieces(piecesEl, {             pieces: { rows: 4, columns: 4 },             delay: 10000,         });`   Everything works, divs are dynamically created. But how can i bind eventListener(onclick) to them ? I tried give divs IDs, classes..read about event delegation but nothings work..  Here is how the DOM looks
    Back

Explore

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I googled it but didn't get a result. Such as in one on one lesson. Thank you for your help.

How do I pronounce "ratio 1:1"?  Should I pronounce it "ratio 1 to 1"?


Is 'action this matter' a correct phrase? Is it correct to say "Pls check with Mr. X to ascertain whether his team or we should action this matter."

I've just, without much fore thought, used the word "actioned" in the following (example) context, and am now wondering if it's valid (upon a re-read I've decided I don't like the way it sounds, hence the question).     1000 emails needed some kind of action, 800 of which were actioned by the team while the remaining 200 were escalated.   I can think of (what I feel is) a better word to replace "actioned" in this case - either "processed" and "completed" should do it - and my spell checker doesn't like "actioned", so I'm wondering if the word is valid? If it is, is my above example a valid usage?


Boba Fett is a pure, unmodified clone of Jango Fett, the best bounty hunter in the galaxy of his time. This is a reputation that Boba Fett appears to have eventually attained as well. He also has a reputation as a Mandalorian warrior.  That said, we constantly observe in the Clone Wars TV series that although Boba Fett, growing up, is skilled enough to meet job requirements at the level bare essentials, he's always being played out at the end and pushed around.  During the Empire era, we can see him in Jabba's employ. The only time we see him in action, he 1) employed some ingenuity (we can't say if it's a moment of genius or a quality he always had) in tracking down the Millenium Falcon 2) took over the frozen Han Solo from Darth Vader, then successfully got it onto his ship, albeit with Imperial help to slow down his pursuers, and finally 3) when he finally got into a fight, he got thrown into a Sarlacc pit.  From what I know of him alone, I'm not sure it's that impressive a resume. He demonstrated some skills, but always fails at the end no matter how close he gets. Is there anything in Disney canon only I don't know/haven't mentioned that is proof of him deserving his reputation as the best bounty hunter in the galaxy?

In the Star Wars Holiday Special, Darth Vader says this to Boba Fett:     I see why they call you the best bounty hunter in the galaxy.   This seems to be the general attitude of most characters towards Fett. It's also common to hear fans describe him as the greatest bounty-hunter in the Star Wars galaxy.  However, in the actual films, he doesn't do all that much. He helps capture Luke and Han, which was impressive, but not really enough to justify being called the best bounty-hunter in the galaxy.  What exactly has he done in the expanded universes to deserve this title?  I'm not asking for arguments as to why he is or isn't deserving, what I want is a list of his greatest and most impressive canon bounty-hunting accomplishments.  I know he was a powerful fighter who did many impressive things. However, if it isn't bounty-hunting related, it doesn't answer the question.


i have class like this   if ( ! class_exists( 'My_class' ) ) {     class My_class {         public function __construct() {             add_action( 'woocommerce_shop_loop_item_title', array( $this, 'change_title' ), 10 );         }          public function change_title() {             echo 'The title';         }     } }  return new My_class();   I trying to remove_action change_title by using   remove_action( 'woocommerce_before_shop_loop_item_title', array( 'My_class', 'change_title' ), 10 ); // or remove_action( 'woocommerce_before_shop_loop_item_title', 10 );   But it does not work because I don't really understand PHP OOP. How can I do that, is it possible?  And can i remove it via a plugin?  Thanks

In a situation where a plugin has encapsulated its methods within a class and then registered a filter or action against one of those methods, how do you remove the action or the filter if you no longer have access to that class' instance?  For example, suppose you have a plugin that does this:  class MyClass {     function __construct() {        add_action( "plugins_loaded", array( $this, 'my_action' ) );     }      function my_action() {        // do stuff...     } }  new MyClass();   Noting that I now have no way of accessing the instance, how do I unregister the class? This: remove_action( "plugins_loaded", array( MyClass, 'my_action' ) ); doesn't seem to be the right approach - at least, didn't seem to work in my case.


I have not been able to figure out how, a step by-step process would probably be best.

I am creating a model of a glass and I would like to put a drawing on it (a png picture).  I know how to do it using Blender Render, but not with Cycles Render. Help :)


I'm trying to get the
 tag to update if a different button is pressed, but it doesn't change. I want the two functions to rerun every time I click a button.   function submit(clicked_id) {   var answer = document.getElementById(clicked_id).innerHTML;   answercheck() }  function answercheck() {   if (answer != "George Washington") {     document.getElementById("answer").innerHTML = "You are incorrect.";   } else {     document.getElementById("answer").innerHTML = "You are correct!";   } }
Quiz

Who is the first president of the United States?
 <button onclick="submit(this.id);" id="ans1">Benjamin Franklin</button> <button onclick="submit(this.id);" id="ans2">George Washington</button> <button onclick="submit(this.id);" id="ans3">Thomas Edison</button>

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


MAXSCALEDENOM 24000  For me this only seem to work when using UNITS dd and wgs84 and using qgis, as soon as i use leaflet and &mode=tile&tilemode=gmap&tile={x}+{y}+{z}.png i need to useUNITS meters and mercator. &mode=tile&tilemode=gmap&tile={x}+{y}+{z}.png doesn't work using MAXSCALEDENOM in combination with UNITS dd and wgs84 everything else works.   Debug message tells me scale is to small when using wgs84  Is this a bug or related to something else? Below example works until you switch everything to wgs84 then you need to comment out MAXSCALEDENOM 24000 or you get a empty png in leaflet at any zoom level.  MAP   NAME "TEST"   SHAPEPATH "/wms"   CONFIG  "MS_ERRORFILE" "stderr"   UNITS METERS   # UNITS dd   # EXTENT 6.024789 47.513195 15.008623 54.838047   STATUS ON   DEBUG 0    PROJECTION     # "init=epsg:4326"     "init=epsg:3857"   END    WEB     METADATA       "wms_enable_request" "*"       "wms_title" "TEST"       # "wms_onlineresource" "..."       # "wms_srs" "EPSG:4326"       "wms_srs" "EPSG:3857"       "wms_format" "image/png"       "tile_map_edge_buffer" "10"       "tile_metatile_level" "0"     END   END    OUTPUTFORMAT     NAME "AGGPNG"     DRIVER "AGG/PNG"     EXTENSION "png"     MIMETYPE "image/png"     IMAGEMODE RGBA   END    LAYER     NAME test     DATA test     TYPE line     MAXSCALEDENOM 24000      CLASS       STYLE         width 8         color "#000000"         offset 0 -99       END     END    END  END

My base layer: google map  My points on the map: from an airports.db file, set up as a WFS layer in the OpenLayers code.   As of now:  map loads, points in the correct places on the map.  My goal:  when the page loads in the browser, the points should not display on the initial zoom. When you zoom in to the second level, they should.  I've successfully done this before using just an OpenLayers map, but never a google map as a base layer.  For MAXSCALEDENOM I've tried all sorts of values, but the points are always displaying.  Here is the Airports LAYER in the mapfile.  LAYER             NAME Airports             DEBUG 5             METADATA                     "wfs_srs" "EPSG:3857"                     "wfs_title" "Airports"                     "gml_featureid" "Name"                     "gml_include_items" "all"                     "wfs_enable_request" "*"                     "wfs_encoding" "UTF-8"                     "wfs_extent" "-180 -90 180 90"             END             TYPE point             STATUS ON             MAXSCALEDENOM 20000             LABELITEM 'Name'             CONNECTIONTYPE OGR             CONNECTION '/tmp/navhome/navdata/airports.db'             DATA 'select "POINT(" || LONG || " " || LAT || ")" as WKT_GEOMETRY, * FROM airports WHERE name LIKE "S%"'             #DATA 'select "POINT(" || LONG || " " || LAT || ")" as WKT_GEOMETRY, * FROM airports WHERE ICAO != "ZZZZ"'             PROJECTION                     "proj=latlong"                     "ellps=WGS84"                     "datum=WGS84"             END # PROJECTION     END # LAYER   Here is the OpenLayers code for the WFS layer:  var wfs = new OpenLayers.Layer.Vector("Airports", {             styleMap: new OpenLayers.StyleMap({                     externalGraphic: "red_pin.png",                             graphicWidth: 18,                             graphicHeight: 18             }),             wrapDateLine: true,             strategies: [new OpenLayers.Strategy.Fixed()],             protocol: new OpenLayers.Protocol.WFS({                     srsName: "EPSG:3857",                     version: "1.0.0",                     url: "http://my_url/cgi-bin/mapserv.exe?map=/tmp/navhome/navcore/airports2/airports_viewer.map&SERVICE=WFS&VERSION=1.1.0&srsName=EPSG:3857",                     featureType: "Airports"             })     });     map.addLayer(wfs);   Any input on this matter is appreciated. I assume it has something to do with the extent, but I'm not totally sure.


we can simplify a square root $$\sqrt 8 = \sqrt {2^2 \cdot 2} = 2\sqrt 2$$ I need a good algorithm to simplify a big integer $n$ of thousands digits. $$\text{for constant } n \in \mathbb N \\x, y \in \mathbb N \\ \text{ } \\ \text{find positive integer solution }(x,y) \text{ in}\\ n = x^2 y$$

Suggest an algorithm for factorizing an integer such that each of its factor is .  Thanks,


When I'm doing this in erlang, I got following result.  19> re:replace("(9 and 10) or (11 and 12)","(9 and 10)","13",[{return,list}]).   "(13) or (11 and 12)".   Is this correct?, why my answer isn't "13 or (11 and 12)" ?

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


I added my username to the root group. Now when I try to log into the gui the screen flashes and goes back to the login. Any ideas?

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


I'm reading a novel and a character says this line:''you ARE to be back here before dark'' but I could not find this usage of the verb to be in my dictionary, so here I ask you if this is informal English for saying ''you MUST or HAVE TO be back before dark''.

It is to be discussed.   Is be + infinitive forming the future tense here?      You are to be dressed and ready by 8:00.   I was thinking it's almost commanding (or speaking of a command) but this doesn't seem to be the case, as sentences like this are commanding without this structure:     You will be dressed and ready by 8:00.   or      You are going to be dressed and ready by 8:00.   And there's sentences like this that don't imply commandment in any way:     I am to go home tomorrow!   or     I am to be home tomorrow!   (Slightly different meaning, same general sentiment)  So what's going on with the be + infinitive structure?


I currently have a tab delimited text file formatted like this:  David   Webb    Box 34 Rural Route 2    Nixa    MO  65714   (417)555-1478   555-66-7788 09-13-1970 Martha  Kent    1122 North Hwy 5    Smallville  KS  66789   (785)555-2322   343-55-8845 04-17-1965 Edward  Nygma   443 W. Broadway Gotham City NJ  12458   (212)743-3537   785-48-5524 08-08-1987   I'm trying to format the dates like September 13, 1970 instead of 09-13-1970  What I've been trying to do is cut -f 9 file > tmpfile and then using   date -f tmpfile "+%B %d, %Y" > date   but it keeps saying   date: invalid date ‘09-13-1970’ date: invalid date ‘04-17-1965’ date: invalid date ‘08-08-1987’   what am I doing wrong?

Currently my text file looks like this..  David   Webb    Box 34 Rural Route 2    Nixa    MO  65714   (417)555-1478   555-66-7788 09-13-1970 Martha  Kent    1122 North Hwy 5    Smallville  KS  66789   (785)555-2322   343-55-8845 04-17-1965 Edward  Nygma   443 W. Broadway Gotham City NJ  12458   (212)743-3537   785-48-5524 08-08-1987 O'Reilly    Baba    123 Torch Ln    Joplin  MO  64801   (417)222-1234   456-65-3211 12-13-1999 Martin Bob  44 Boss Rd  Joplin  MO  64801   (417)888-4565   456-98-1111 01-01-2007   the dates are in the 9th field and I want to display them as January 7, 2017 instead of 01-07-2017 for example.  How should I do that? If using options please explain what they do briefly. Doing this in bash. Needing to put it in a script and output to a new file to preserve original.


I'm pretty new to JavaScript and I'm not quite sure what I'm doing wrong, any help would be much appreciated.  var array = [3, 5, 6, 10, 20];  function array (arr, num) {     for (var i=0 ;  i < array.length; i++);     return true; } else {     return false; } }  arr(10);

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) {     for (var i = 0; i < a.length; i++) {         if (a[i] === obj) {             return true;         }     }     return false; }  Is there a better and more concise way to accomplish this?


When I’m watching American lectures I hear all the time the problems with the grammar rule “sequence of tenses”. Some professors say, for instance: “Kant says that people are not capable of thinking...” But it has to sound: “Kant said that people were not...”, isn’t it? (Because Kant is not alive.) Don’t Americans know sequence of tenses? Why do they speak so? Because of the convenience, or are there any other reasons?

I had a grammar quiz at the university today.    One of the questions was:     "Great Expectations" ____ by Charles Dickens.      a) is written   b) has been written   c) was written    Undoubtedly, the c option isn't correct since the time (the publication date) isn't stated or implied.  I crossed the a option out because it is neither a general truth nor a law. It is not a well-known fact to use present simple here.  Finally, I have chosen b. I still have doubts if a is the only right option.   It is unclear to me. Could you clarify it? Any help would be appreciated.


I cannot find option for sorting News Feed by most recent:   Screenshot (click image for larger variant)

My Samsung Galaxy S 3 just updated to Android Facebook Version 3.4.  I cannot figure out how to sort News Feed by most recent?


In the movie Looper at the start there is a looper from the future that is sent to the past to be killed but manages to escape. The mafia then captures the present form of the looper and start torturing him to lure the future looper to them so they could kill him.  Why didn't they just kill the present looper immediately? They ended up doing this anyways, and this would have caused the future looper to disappear like we saw at the end of the movie

In Looper, it is established that permanent physical harm to a young looper will instantaneously affect the old version of the same looper. For example, a looper can send a message to his older self by permanently carving it in his arm.  I assume Abe and his gang know about this. Why is it, then, that in Seth's case:      when the killers capture young Seth, they torture and mutilate him in order to force old Seth to come to them, then end shooting him up? Wouldn't simply killing young Seth get rid of both Seths? Is the torture simply sadism?   We know the above will happen, since something similar happens later in the movie. And if Joe, who is definitely not the sharpest tool in the shed, can figure it out, surely Abe must also know it?