Weird behaviour of find() function (python2.7)
find() function in python2.7.5
Number of equivalence classes of matrices under switching rows and columns I have been thinking about this problem:  Suppose we have all $R$ by $C$ matrices, where the values are integers in $[1,n]$. Two matrices are equivalent under interchanging rows and columns. For example,   1 5     0 0       would be equal to itself and to  0 0 1 5   and would be equal to  0 0  5 1   and would be equal to   5 1 0 0   How many unique such matrices are there?  Any ideas how to go about it? Any help much appreciated! How can I install the Google Apps Package (Play Store, ...) on my Android device? I have recently installed a custom ROM and cannot find the Play Store. It seems like all apps that belong to Google are missing.  How can I install the Google Apps Package (Play Store, ...) on my Android device? CSS 100% height with padding/margin With HTML/CSS, how can I make an element that has a width and/or height that is 100% of it's parent element and still has proper padding or margins?  By "proper" I mean that if my parent element is 200px tall and I specify height = 100% with padding = 5px I would expect that I should get a 190px high element with border = 5px on all sides, nicely centered in the parent element.  Now, I know that that's not how the standard box model specifies it should work (although I'd like to know why, exactly...), so the obvious answer doesn't work:  #myDiv {     width: 100%     height: 100%;     padding: 5px; }   But it would seem to me that there must be SOME way of reliably producing this effect for a parent of arbitrary size. Does anyone know of a way of accomplishing this (seemingly simple) task?  Oh, and for the record I'm not terribly interested in IE compatibility so that should (hopefully) make things a bit easier.   EDIT: Since an example was asked for, here's the simplest one I can think of:  &lt;html style="height: 100%"&gt;     &lt;body style="height: 100%"&gt;         &lt;div style="background-color: black; height: 100%; padding: 25px"&gt;&lt;/div&gt;     &lt;/body&gt; &lt;/html&gt;   The challenge is then to get the black box to show up with a 25 pixel padding on all edges without the page growing big enough to require scrollbars. prevent user creating a duplicate node title how to prevent user creating a duplicate node title for a content type?  I already try uniqueness module () but it's only list out the duplicate content title but not return any error message when user save the new content. Any suggestion module or code? :) Do Fortnite V-Bucks Purchases Save on All Platforms? So I'm thinking of buying some V-Bucks on Fortnite, Battle Royale mobile. Do the purchases save cross platform? How do you performance test JavaScript code? CPU Cycles, Memory Usage, Execution Time, etc.?  Added: Is there a quantitative way of testing performance in JavaScript besides just perception of how fast the code runs? My final goal is to generate Impulse Response Functions in R.  I have variables that are non stationary when I set k = 5 in a Unit Root test, and they are cointegrated which to my understanding prompts the use of the VECM, from which the Vec2Var argument is used to then generate IRFs. However, my response functions from this methodology do not decay over time and mostly do not revert to the zero line.  Furthermore, I noticed that when I input first differenced variables into the VECM as opposed to level data above, response function do revert to the zero line. Therefore my first question is: 1) is it appropriate to use differenced variables in a VECM model?  Secondly, as an alternative I am considering restricting the number of lags used in the Unit Root tests so that the variables are not all non-stationary; in this case 2) would the use of VECM be void and the VAR with first differences be a more appropriate model? Again, using differenced data is giving me better response functions that revert to zero in the long run. However, 3) is it ok to use the VAR for stationary/non-stationary data in levels where these variables are still cointegrated?  Also, I am using growth rate variables, 4) should I still long transform all variables and use logs in all tests?  Thank you for the help! I want to include some Cyrillic with a TeX Gyre Pagella text and math font document. I'm using TeXLive 2019.  As indicated in , running pdflatex on the following source works just fine:  \documentclass{article}  \usepackage[T1,T2A]{fontenc} \usepackage[russian,main=english]{babel} \usepackage{paratype} \usepackage{tgpagella} \usepackage{substitutefont} \substitutefont{T2A}{\rmdefault}{PTSerif-TLF}  \usepackage{amsmath}  \usepackage[math]{blindtext}  \begin{document}  The topologist is {\Russian Алекс\'{а}ндров}.  \blindmathpaper  \end{document}   However, running xelatex on the following surce produces output from which the indicated Cyrillic just disappears:  \documentclass{article}  \usepackage[T2A,T1]{fontenc} \usepackage[russian,main=english]{babel} \usepackage{amsmath} % load here to avoid \dddot clash \usepackage{fontspec} \usepackage{paratype} \setmainfont[Ligatures=TeX]{TeX Gyre Pagella} \usepackage{substitutefont}% \substitutefont{T2A}{\rmdefault}{PTSerif-TLF}%  \usepackage{unicode-math} \setmathfont{TeX Gyre Pagella Math}  \usepackage[math]{blindtext}  \begin{document}  The topologist is {\Russian Алекс\'{а}ндров}.  \blindmathpaper  \end{document}   Question: How should this second source be fixed so as to allow the Cyrillic to appear, too?  (I did put Map paratype-truetype.map into my local updmap.cfg file and did run updmap-user.) I have noticed a couple of kinds of behavior that seem to crop up in the SO community, and it really seems to artificially boost reputation. There may not be a solution (or it may not be a problem!) but here are some thoughts.  The first is the fact that "celebrity" users, or users with lots of reputation, are treated significantly better than others. Take Joel Spolsky's most recent question:    It was closed, opened, closed, and re-opened. And the question has earned Joel - what - 1030 reputation 103 votes, and lots of reputation! Wow! I'm not saying that Joel's question is a bad one. But lets compare to other questions that one might consider to be in the same equivalence class - easily answerable, specific questions, short questions:   (5 votes)   (5 votes)  If you look at the , I can hardly find any which are specific technical questions. So that Joel's question was so upvoted could only mean that:   It was upvoted based on his celebrity People have been interpreting the questions as a sort of zen-like wakeup call, designed to get people talking and thinking about they way they vote.   I do not mean any disrespect toward Joel, and again, I think his question was a good one. This post isn't about Joel! But the boost in reputation did not (imho) mean "Joel is really good at programming, and he has earned my trust as someone knowledgeable about computers." It may be true that Joel is a proficient computer expert, but not based on the merit of that one question.  Which leads me to an example about myself. I recently gave  (130 reputation) to a question about PHP's image-creating libraries. I am very appreciative of the community's support for my answer - an answer which I believe was well-thought and that I put effort into.  At the same time I can't look someone and tell them, with a straight face, that my reputation is a great reflection of my computer-related knowledge. Billions of people on the net have created tutorials for PHP's GD image library - I just happened to be the person to post a few of them. Heck if I know why it got 13 votes! (oh, but please don't downvote it!!)  SO is built by the community - so the community absolutely gets to decide what questions are important, and how they choose to dispense reputation. But in practice, I feel like peoples' reputation would be much lower if the community were more discriminating about the way they voted.  So: am I totally off base here? Is this even something that can be corrected with a different reputation algorithm? Or am I the only one who sees this as a detriment to the SO community?  (And, to be completely clear, I do not intend for this to be an ad hominem, and I am not jealous about not having a higher reputation. But I do take reputation with a grain of salt, in part for these reasons, and I thought I'd bring it up! It is meta, after all!) Windows 7 Automatically Connecting To Unsecured Wireless Networks On Startup Most of the questions on this topic related to folks connecting to somebody else's wireless network when their own was available and could remedy the situation by going to their connections and unchecking the "connect automatically" box.  See this: "  " as an example.  In my situation, I've noticed that Win 7 will automatically connect to any unsecured wifi network - even if I have never connected to it in the past.  If I am traveling and boot Win 7, it will start and connect to what appears to be the best signaled unsecured network without prompting me for confirmation (note: in the above link, "Naveen" seems to have same problem).  Obviously, that is a security concern to me.  Further, when I open "Network and Sharing" and "Manage wireless networks"  the network is not displayed (probably because I labelled it a public network).  Again, these are new, never connected with before, wireless networks.  I always promptly disconnect from them but don't want to have to be on constant guard for an auto connection to a malicious network.  This began about a month ago, as I recall, Win 7 did not behave like this in the past, I didn't monkey with wifi settings, and don't use a 3rd party connection manager.  I did have to download some internet security certificates for army website access but I don't think that should mess with network settings.  Any ideas how I can tell Win7 cease automatically connecting to networks or, at least, to prompt me for a confirmation before connecting? In the  a line is delivered at around 1:41 where Han Solo says "a 190 years old!? You look great" and I was wondering if there is a defined concept of a year in the Star Wars universe or would Han Solo just be familiar with the duration of a  solar orbit. Add/Delete table rows dynamically using JavaScript ImportError: No module named dbus I was trying to update my Python and messed up my whole system.   I am currently now able to start my Software Centre. I tried Googling multiple fixes but nothing helped. My Software Centre can't start.   When I try starting it up, this error shows:  astephen@localhost:/usr/bin$ ./software-centerGtk-Message: Failed to load module "gtk-vector-screenshot" Traceback (most recent call last): File "./software-center", line 36, in &lt;module&gt; from softwarecenter.utils import ( File "/usr/share/software-center/softwarecenter/utils.py", line 19, in &lt;module&gt; import dbus ImportError: No module named dbus   I tried reinstalling dbus using:  apt-get install --reinstall dbus   But it did not help.  astephen@localhost:/usr/bin$ sudo apt-get install --reinstall dbusReading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not      upgraded. Need to get 0 B/231 kB of archives. After this operation, 0 B of additional disk space will be used. (Reading database ... 676272 files and directories currently installed.) Preparing to unpack .../dbus_1.6.18-0ubuntu4.3_amd64.deb ... Unpacking dbus (1.6.18-0ubuntu4.3) over (1.6.18-0ubuntu4.3) ... Processing triggers for ureadahead (0.100.0-16) ... Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Setting up dbus (1.6.18-0ubuntu4.3) ... Assign the results from a Solve to variable(s) Please provide a way to download SEDE data via an API I recently suggested on the Stack Apps site that , and it was suggested I reference the feature request here, for visibility.  My use case is a query that the API does not support, so I thought it would be interesting to get it programmatically from SEDE instead. I wonder if this feature might be of interest to others here?  outlines the current ways that SE data is available via various APIs and UIs.  I wonder if my use case (retrieving revisions filtered by user) might have been supported by OData,  since April of this year.  This question has sort-of , though that was not an explicit feature request, and is now rather out of date. It would be good to find out what the current views are on this topic, and indeed whether there is much demand.  My use-case does not urgently require this, since I can use public SE screen scraping or SEDE CSV downloading. From reading around the SE Meta network, both of these approaches seem to be tolerated, as long as it is done with careful regard to frequency and bandwidth. Autofilling fields based on another field The cardinality of a language over a set of variables $V$ with $\#V= κ$ In predicate logic, to define a language, we consider the following $3$ sets:  (1) $V$, the set of variables;  (2) $F$, the sets of function symbols;  (3) $P$, the set of predicate symbols with their arities.   Now I am concidering about determine the cardinality of a language over a set with arbitary cardinality, $κ$(Note that $κ$ can be either finite, countablely infinite or uncountablely infinite ).  May I please ask:  If the cardinality of $V$, $\#V = κ$, what conditions on $V$ , $F$ and $P$ will give us a language over $V$, $F$ and $P$ with cardinality $κ$?  And may I please ask if it is the fact that if $\kappa$ is finite, then to get a language with cardinality $\kappa$ we need $(V+F+P)^{&lt;\omega}=(\kappa+F+P)^{&lt;\omega}=\kappa$, so we can never have a language of cardinality $\kappa$. I think it is something weird here. Am I wrong with something?  I had googled it but I have get nothing from websites, now I am confused. Could someone please help? Thanks so much!  EDIT: Latter I am told that in my course, the cardinality of a language refers to the set of expression instead of this of the set of strings. So now I need to consider further about when a string makes sense.  EDIT':Now I am considering that if we can find out a general way to determine the cardinality of expression, which may related to combinatorics. See this question:  Any help would be appreciate. How can I implement a download rate limited in Java? I have understood how ridge regression shrinks coefficients towards zero geometrically. Moreover I know how to prove that in the special "Orthonormal Case," but I am confused how that works in the general case via "Spectral decomposition." How to call gdal_translate from Python code? Is it possible to use some gdal API to call gdal_translate from Python code? I do not mean simply executing the gdal_translate.exe from the file system, but rather call it somehow in code so I do not need to know the exact directory the gdal_translate executable is in?