GeoPandas intersects doesn't find any intersection

I want to check if points layer that I have intersect with polygons layer that I have, as Boolean column in the points dataframe. I have two GeoPandas dataframes, the first one is many points and looks like this: >>>ID  geometry 0  12  POINT (5.0279 7.4547) 1  45  POINT (6.6539 12.139) ...  and the second dataframe is one layer of many different polygons  that looks something like this: >>>name     code   geometry 0  Desert   12     POLYGON ((5.52013 13.8902, 5.5265 13.892,...) 1  Water    24     POLYGON ((5.53756 13.88472, 5.5291 13.8791,...) ...  I'm trying to check if there is any intersection between the points layer and the regions layer. For that I have determined the crs and then used intersects : regions=regions.to_crs({'init': 'epsg:4326'}) points=points.set_crs({'init': 'epsg:4326'}) inter=points.geometry.intersects(regions.geometry)  A The script runs with the following warnings:  FutureWarning: '+init=:' syntax is deprecated. ':' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6 return _prepare_from_string(" ".join(pjargs)) /opt/conda/lib/python3.8/site-packages/geopandas/base.py:39: UserWarning: The indices of the two GeoSeries are different. warn("The indices of the two GeoSeries are different.")  Then when I check the results the only value is False, like all th epoints do not intersect: inter.unique().tolist() >>>[False]  *I saw on QGIS that the there are points that intersect and there are points that do not so there is no way this result is true *I have checked the dtypes - each one of my geodataframes has one column that is geometry and called geometry. My end goal: to add new column in the points geodataframe that will tell if it intersects the regions or not.


Given $a_{n+1} = \frac{{a_n}}{\sin({a_n})}$ with $0 < a_1 < \frac{\pi}{2}$. Show that the limit $\lim_{n\rightarrow\infty}{a_n}$ exists and find it.

Given $0 < a_1 < \frac{\pi}{2}$, for $n\geq 1$ we define $$a_{n+1} = \dfrac{{a_n}}{\sin({a_n})}.$$ I need to show that $\lim_{n\rightarrow\infty}{a_n} = L$, and then I need to find $L$.  I can't find a way to bound $\{a_n\}_n$ so that  $$0 <a_n < \frac{\pi}{2}$$ I've tried to use every convergence test I know, but I always have the same problem which I want to bound $\{a_n\}_n$ and can't to that without bounding $\{\sin(a_n)\}_n$.


Is anybody else having PKI problems connecting using Firefox 67.0?

I suddenly started getting the following error message when using Firefox to access Stack Exchange sites:     An error occurred during a connection to math.stackexchange.com. A required TLS feature is missing. Error code: MOZILLA_PKIX_ERROR_REQUIRED_TLS_FEATURE_MISSING      The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.      Please contact the website owners to inform them of this problem.   I should add that I am connecting just fine using Chrome.


This is a recreational script made to update my home server w/ the latest anime from . I'd like to know if there are any obvious syntactical and performance improvements, details on my usage of Selenium and BS4 and whether or not this usage is proper. More features will be added later, but as it as now I feel there are ways to improve it. One idea I've had is to install uBlock Origin on the browser instance to decrease the number of elements to iterate over, but I don't know if this would be significant.  Windows Setup   Install  to install any necessary programs. Run the following commands for whatever you don't have installed:  scoop bucket add extras scoop install python geckodriver qbittorrent pip install beautifulsoup4 selenium python-qbittorrent  Enable the qBittorrent .   Le Code  import urllib.request as Web from bs4 import BeautifulSoup as bs4  from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By  from qbittorrent import Client  qb = Client('http://127.0.0.1:8080/') # 'Bypass from localhost' should be enabled  # TODO: Check if this drive is full, and switch to an available one DL_PATH = "E:/Torrents/" headers = {} headers['User-Agent'] = "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:48.0) Gecko/20100101 Firefox/48.0" req = Web.Request('https://horriblesubs.info/current-season/', headers=headers) src = Web.urlopen(req).read() parser = bs4(src, features='html.parser') divs = parser.body.find_all('div', attrs={'class': 'ind-show'}) size = len(divs)  for i, div in enumerate(divs):     driver = webdriver.Firefox()     driver.get('https://horriblesubs.info' + div.a['href'])     WebDriverWait(driver, 50).until(EC.visibility_of_all_elements_located((By.CLASS_NAME, 'rls-info-container')))      # Expand the whole listing to get all the episodes     elem = driver.find_element_by_class_name('show-more')     while elem.text != 'No more results':         elem.click()         elem = driver.find_element_by_class_name('show-more')      src = driver.page_source     driver.close()     parser = bs4(src, features='html.parser')     hs = parser.body\         .find('div', attrs={'class': 'hs-shows'})\         .find_all('div', attrs={'class': 'rls-info-container'})      for block in hs:         # TODO: If a resolution is updated, delete the lower resolution alternative on disk         link_rel = block.find('div', attrs={'class': 'rls-link link-1080p'})          if (link_rel is None):             link_rel = block.find('div', attrs={'class': 'rls-link link-720p'})          if (link_rel is None):             link_rel = block.find('div', attrs={'class': 'rls-link link-480p'})          if (link_rel is not None):             magnet = link_rel.find('a', attrs={'title': 'Magnet Link'})['href']             qb.download_from_link(magnet, category='anime', savepath=DL_PATH + div.a.text)      print('Progress: ' + str(round(((i + 1) / size) * 100, 2)) + '%')


Can you switch to the other Unarmored Defense by multiclassing?

PHB p164 states:      If you already have the Unarmored Defense feature, you can't gain it again from another class.   So if I start as a Monk and gain the UD(Wis) feature, and then at next level up, take a level in Barbarian, can I switch to the alternate UD(Con)? Or am I stuck with UD(Wis), even if I take 19 levels in Barbarian?  I'm unclear if the rule is stating this or stating that you can't use both at the same time, which I know.


Why is conventional current still taught in school when it is unreal, given that real current flow is electron flow?

Conventional current as a concept is easily understood until the professor says what actually takes place is electron flow. Electron flow moves in the opposite direction as conventional current.  Why doesn't electrical engineering text books teach electron flow current since it reflects the actual situation more accurately?  I am sure I have missed out something. Can the more learned members here enlighten a confused person?


PHP files displayed as plain text in browser

I have an ubuntu server installed with apache2 service. but when I run the index.php file its displays as it is. it means .php files are not executing


Why can't SQL Server handle into's in 2 parts of a script?

I noticed some behavior I found weird while editing a co-workers stored procedure:       create procedure weird_behavior (@switch bit)      as      if (@switch = 0)     begin         select *         into #tables         from sys.tables st         where left(st.name, 1) in ('a','b','c')     end      else if (@switch = 1)     begin         select *          into #tables         from sys.tables st         where left(st.name, 1) in ('d','e','f')     end      select * from #tables      --drop procedure weird_behavior   you get the error:     There is already an object named '#tables' in the database.   This seems odd to me, since only one of the select * into will ever run. I'm forced to rewrite it like so:      create procedure weird_behavior (@switch bit)      as      if (@switch = 0)     begin         select *         into #tables         from sys.tables st         where left(st.name, 1) in ('a','b','c')     end      else if (@switch = 1)     begin         select *          into #tables01         from sys.tables st         where left(st.name, 1) in ('d','e','f')     end      select * from #tables      --drop procedure weird_behavior   This would cause headaches because sometimes the output is in #tables, and sometimes it is in #tables01.  Question: why won't SQL Server let me write this code?


Make Global Variable For All Forms In Python Pyqt

Can I make a global variable in QMainWindow and pass a value for it, and then get the value and print it in another form [QDialog] that i can open it with a button in QMainWindow?


Would it be a good idea to have a test site for the API?

I'm working on a little chatbot (no spam!) that I would like to be able to read questions and answers and possibly comment if there is an easily detectable duplicate.  To avoid accidental spamming with comments of the main site, is there a test site that I could use to do this?  Also, if there is not, should I make that a proposal on Area 51?


Why are standard cast iron maintenance practices compatible with food safety?

How on earth is not washing a cast iron with soap not harmful? Since even if you wash it good with hot water and Salt, wouldn't there still be a possibility of harmful bacteria and such left in the crevices in the metal? I mean the metal is porous, correct?  Also same goes for the seasoning we use (bacon grease, oil, etc) How does this not get a bunch of bacteria on it?


Does Captain Marvel only transform if the lightning strikes him?

I was showing my son who Captain Marvel / Shazam was, and I noticed something in this . When he's fighting Superman, he says "Shazam!", but holds Supes in front of the lightning bolt as an attack.  This isn't an uncommon tactic, from what I've seen, but I thought it was interesting that he didn't revert to Billy Batson. Instead, he only transformed when Superman turned the tables and held Captain Marvel in front of the bolt.  In the comics, is this how his power works? I know his transformations can be prevented my preventing him from speaking, but can you also just block the lightning bolt from reaching him?


I am looking for a good way to add security at a field level based on a group.  Different groups will use the same content type. Does OG handle this requirement. I don't want to make the full node private.


Failed to load module “canberra-gtk-module”

I just installed Ubuntu Saucy with unity on an Acer C720.  I downloaded Software Center from Synaptic and when I type in gksu software-center I get the error, Failed to load module "canberra-gtk-module."  I also tried the following:  sudo apt-get install libcanberra-gtk-module sudo apt-get install libcanberra-gtk-module:i386   For both, I get the following:  E: Unable to lock the administration directory(/var/lib/dpkg/), is another process using it? E: Could not get lock /var/lib/dpkg/lock - open (11:resource temporarily unavailable)   I am brand new to Ubuntu, so any help would be greatly appreciated.


Can I take on an academic pseudonym while publishing research papers or take initials of my name? Is it possible?

I am an graduate student. I want to take on an academic name for publishing papers in journals and would likewise be known by that name in the academic circuit. My surname is bit embarrassing and I fear that it can divert people's attention from my work. Therefore, is it possible that I keep my first name and use initials of my last name while publishing papers. I can mention my full name in websites, Google scholar and university profile. I had considered a legal name change but it is bit too much of a hassle from where I come from. Moreover, I am aware that a name change after getting married to husband's surname will not lead to uniformity in papers and can be hassle for people searching my work or for citation purposes. What can be done in this case? Can I take initials of my surname?


Creating thread for each sequence in the configuration

import java.math.BigInteger; import java.util.Arrays;  public class ThreadDemo {      public static void main(String[] args) {          int num_threads = 1000;         MyThread myt[] = new MyThread[num_threads];         for (int i = 0; i < num_threads; ++i) {             myt[i].generatesequence(100);             myt[i].start();         }         System.out.println("all threads spawned");      }  }  class MyThread extends Thread {     public int sum = 0;     public int len = 0;      MyThread(int n) {         len = n;     }      @Override     public void run() {         sum = 0;         for (int i = 1; i <= len; ++i) {             sum += i;         }     }      public void generatesequence(int n) {          // Work out total number of combinations (2^n)         BigInteger bitValue = BigInteger.valueOf(2).pow(n);         int firstOne = n - 1;          // For each combination...         while (firstOne >= 0) {             bitValue = bitValue.subtract(BigInteger.ONE);             firstOne = bitValue.getLowestSetBit();              // Initialise an array with 'n' elements all set to -1             int[] resultForThisCombination = new int[n];             Arrays.fill(resultForThisCombination, -1);              if (firstOne >= 0) {                 // We now go through each bit in the combination...                 for (int bit = firstOne; bit < n; bit++) {                     // If the bit is set, set array element to 1 else set it to -1...                     if (bitValue.testBit(bit)) {                         resultForThisCombination[bit] = 1;                     }                 }                 System.out.println(Arrays.toString(resultForThisCombination));             }          }      } }   Need to create a thread for each configuration. Configuration have only 1 or -1     for sequence of 1 you get an array of      [1]     [-1]     For sequence of 2 you get      [1, 1]     [-1, 1]     [1, -1]     [-1, -1]     Need a thread for each row also the error message i am getting are the following  Exception in thread "main" java.lang.NullPointerException     at ThreadDemo.main(ThreadDemo.java:11)


If $f$ is a continuous function on $[0,1]$ such that for all $t_1, t_2 \in [0,1]$,  $$f\left(\frac{t_1+t_2}{2}\right) \leq \frac{f(t_1)+f(t_2)}{2}$$  Show that $$f\left(\frac{t_1+t_2+ \cdots +t_n}{n}\right)\leq \frac{f(t_1)+f(t_2)+\cdots f(t_n)}{n}$$  I tried proving this statement by induction. I could do this for even $n$.   Let $k=n/2$, then,  \begin{align} f\left(\frac{t_1+t_2+ \cdots +t_n}{n}\right) &= f\left(\frac{t_1 + \cdots +t_k}{n} + \frac{t_{k+1} + \cdots +t_n}{n}\right) \\ &=f\left( \frac{\frac{2}{n}(t_1 + \cdots +t_k)}{2}+\frac{\frac{2}{n}(t_{k+1} + \cdots +t_n)}{2}\right)\\ &\leq \frac{f\left(\frac{2}{n}(t_1 + \cdots +t_k)\right)+f\left(\frac{2}{n}(t_{k+1} + \cdots +t_n)\right)}{2}\\ &=\frac{f(\frac{t_1+\cdots +t_k}{k})+f(\frac{t_{k+1}+\cdots +t_n}{k})}{2}\\ &\leq\frac{f(t_1)+f(t_2)+\cdots f(t_n)}{2k}\\ &=\frac{f(t_1)+f(t_2)+\cdots f(t_n)}{n} \end{align}  However, I don't know how to split should $n$ be odd. One reasonable thing I thought of was to split the middle term. For instance, if $n=3$, We could split it as such $t_1 + 0.5 t_2$ and $0.5 t_2 + t_3$. However, I couldn't find a neat way to carry out the induction if I do it like this. Can someone give a hint?


I am getting a 50% larger "Size on Disk" than the "Size" of files would lead me to expect, as linked. I have some idea from other posts that I have read about cluster size and small file allocation to clusters causing waste but would that account for 300GB extra space used/wasted?    Any ideas on how I could resolve this disparity and reduce the Size on Disk please?


Tag excerpts don't support formatting, but their revision history seems to suggest so

Tag excerpts don't support formatting (). However, their  seems to suggest so:


Prove two commutative linear transformations on a vector space over an algebraically closed field can be simultaneously triangularized

Prove two commutative linear transformations on a finite-dimensional vector space $V$ over an algebraically closed field can be simultaneously triangularized.  It is equivalent to show if $AB=BA$, then there exists a basis $X$ such that both $[A:X]$ and $[B:X]$ are triangular, where $A$ and $B$ are both linear transformations.  Hint: Find a subspace $W$ of $V$ that is invariant under both by $A$ and $B$, with this in mind, consider any proper value $λ$ of $A$ and examine the set of all solutions of $Ax=λx$ for the role of $W$.  Notation:Let $A$ be a linear transformation on an $n$-dimensional vector space, and let $X={x_1,x_2,...,X-n}$ be a basis in that space, then $[A]=[A:X]=(a_{ij})$ be the matrix of $A$ in the coordinate system $X$, so that  $$Ax_{j}=\sum_{i}a_{ij}x_{i}$$.  Source: Halmos, Finite dimensional vector spaces, section 56 Triangular form exercise #2.  Could anyone please help, I have not idea how to do this. Any help is appreciated. Thanks a lot.


I have been trying to install ubuntu (I tried 12.04LTS, 12.10, 12.10-secure-remix) using the wubi installer on Windows 8 and all the three times ran into the same problem showing some cannot find /ubuntu/winboot/wubildr when I tried to start ubuntu.  I tried to change the boot settings from UEFI to Legacy and then my laptop restarted and showed that "No operating System Found".  I then tried to install Ubuntu using a cd and after a lot of effort and using boot repair,etc. I landed into a new trouble. When I select UEFI on, the laptop loads Windows and windows too does not detect ubuntu. When I select Legacy mode, it starts ubuntu, shows me an option to start windows 8 but gives an error showing windows failed to load.  So in legacy mode, i am able to use only ubuntu and in UEFI mode, I am able to use only Win8. Please explain any process of starting windows in legacy mode (which I tried without any success) or starting ubuntu in UEFI mode.


When a distribution is cut into percentiles, is there any rule whether it should be included the lower or the upper bound inside the percentile?  Example: 1,2,3,4,5,6,7  The median is obviously 4. If I wanted to cut the distribution in two parts should I include 4 in the lower or the higher percentile?  I'm sorting a long list of a daily observations of the same variable into daily deciles. I am going to include the boundaries in the lower decile for necessity, because the first decile is often equal to 0, which is also the minimum value that the variable can have.


How detrimental is involvement in politics to a scientific career?

I am an undergraduate student in the hard sciences, and am thinking of pursuing a research career after graduation. I am also quite politically involved on the left, and have political articles published online. I am critical of many governments (including my own) and corporations, and of many of the applications of technology in fields I am interested in.  My politics are very important to me, and I could not give them up. That said, I often worry about how they could be detrimental to my career, especially before I'm already established. I worry, for instance, that grad school admissions would Google my name and find my views and affiliations, and that this would negatively impact my chances to get in. How realistic is this fear?


I would like to use a class that belongs not found in my MiKTeX database. I know I might as well pick up this class and put it in some directory inside the base and update MiKTeX, but I do not want to do that. What I want is to organize it into a subdirectory within the same directory as my main tex file. However, when compiling the tex file, the class is not found. Of course, if I put the direct class in the same directory as the main file I will solve the problem, but that's not what I want. So, I ask: Is there any way to tell the compiler, inside the main file body, how to find the class?  Note: I'm using MiKTeX as an example, but I'm really having the problem in overleaf. There was a revtex upgrade from version 4.1 to 4.2. However, overleaf does not find revtex4-2.cls, which is, in fact, the class I'd like to use.  Below, I show an example of how I would like to organize the files. Note that the class is in a subdirectory.


How to easily determine the results distribution for multiple dice?

I want to calculate the probability distribution for the total of a combination of dice.   I remember that the probability of is the number of combinations that total that number over the total number of combinations (assuming the dice have a uniform distribution).   What are the formulas for   The number of combinations total The number of combinations that total a certain number


Could tall buildings in very heavily populated cities affect earth's rotation

Is it possible that moving materials from one part of the earth to another area and using these materials to build tall skyscrapers in cities with dense populations could affect the rotation of the earth ever so slightly.  If so would this contribute to climate change?


Present Perfect Continuous Tense - Passive Voice - Question Forms

Please tell me how to use the positive question form of passive voice of the tense- Present perfect Continuous Tense?  The Positive Answer form could be as "I have been being taught". (Here, I am the student). I want to make a question from this tense in passive form. Please help me.


How can I know if a node is already defined?

I think I've seen this question before, but I can't find it. The problem is simple; before I assign a name to a node I would like to know if the name is already used.  I think when a node is created \node (name) {label}; some macros are defined from name.


Making a single decision tree from a random forest

I am using scikit learn  to build a Random Forest classifier.  I have heard that it might be possible to build a single decision tree from a Random  Forest. The suggestion  is that although the decision tree may not be as good a classifier as the Random Forest it may be better than the decision tree you would get by using the standard method.  However I haven't been able to find this method online. Does it exist?     My question is not about extracting one  of the decision trees from a Random Forest. It is asking about a method to construct a new decision tree from the whole Random Forest, perhaps by combining the trees in the Random Forest somehow.


Inequality and Induction: $\prod_{i=1}^n\frac{2i-1}{2i}$ $<$ $\frac{1}{\sqrt{2n+1}}$

I needed to prove that     $\prod_{i=1}^n\frac{2i-1}{2i}$ $<$ $\frac{1}{\sqrt{2n+1}}$,  $\forall n \geq 1$ .      I've atempted by induction.     I proved the case for $n=1$ and assumed it holds for some $n$. The left-side of the n+1 case is $\frac{1}{2}.\frac{3}{4}. ...  .\frac{2n-1}{2n}.\frac{2n+2-1}{2n+2}$.     Using the inductive hypothesis, i could reach the result that   $\frac{1}{2}.\frac{3}{4}. ...  .\frac{2n-1}{2n}.\frac{2n+2-1}{2n+2} <\frac{2n+1}{\sqrt{2n+1}(2n+2)}=\frac{\sqrt{2n+1}}{(2n+2)}$.      Now, i'm wondering how should i connect it to my goal :     $\frac{1}{\sqrt{2n+2+1}}=\frac{1}{\sqrt{2n+3}} $      I know one way to prove that   $\frac{\sqrt{2n+1}}{(2n+2)}<\frac{1}{\sqrt{2n+3}}  $     We just square things, then eventually reach     $ (n+1).(n+3)<(n+2)^2$     Which is easily provable because  $3<4$ ....  But I was wondering if there was another way to show that ... perharps a more direct way to show that last bit ... a way that was not so direct and brute as to involve squaring both sides.  A way of gradually manipulating the left-side until reaching the inequality with the right side.     Thanks in advance.


Links shown in spoilers when looking at revisions

Even when nothing's being modified, links are shown through spoilers when looking at the non-markdown output of a revision. This happens both when reviewing edits and when looking at the revision history like normal. And it looks weird.  Here's what it looks like when  (and nothing changed in the spoiler):    And  is an example of revision history where you can see this on one of my answers. Some of the spoiler blocks there were modified, so you can see what it looks like for comparison.


$L = \{ 0^p | \, p \,\text{ is prime} \}$ is not regular

We assume the regularity of $L$ for the sake of contradiction.     Pumping Lemma: $ \exists n \in \mathbb{N}$ for which $ \forall z \in L$ with $|z|  \geq n$, $\exists u,v,w$ with $|uv| \leq n$, $|v|  \geq 1$ such that $uv^iw \in L, \, \forall i \in \mathbb{N}$.   Let $n \in \mathbb{N}$ and $z = 0^p$ with $p \geq n \iff |z| \geq n$. Then, using the PL: $$ \exists u,v,w \quad \text{such that} \quad 0^p = uvw, \, |v| \geq 1 \rightarrow v = 0^m, \, 1 \leq m \leq n. $$  Since, $uv^iw \in L, \, \forall i \in \mathbb{N}$, this implies that each term of the sequence: $$ a_i = |uv^iw|=p + i \cdot m, \, i \in \mathbb{N} $$ is a prime. Is there a quick way to show that this is false (contradiction)?


Difference between Granger causality and Instantaneous causality?

What is the difference in terms of inference? Does Instantaneous captures the short term cause and effects?


sudo apt update fails for NVIDIA drivers on WSL

I know there are some other old topics similar to this but I couldn't find any solution from them. I was trying to install the Nvidia drivers and when I ran sudo apt update I got this error: E: The repository 'http://ppa.launchpad.net/chronitis/jupyter/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.  I also can't reboot and get this error: System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down Failed to talk to init daemon.  I am using Ubuntu 20.04.2 LTS and WSL2


Rep value on the new flair is not updated

There is an update issue with the new flairs. Yesterday I replaced all my flair snippets with the new ones, but the rep value on the "default theme" has not been updated. Here is a screeny:    The other themes show the correct value whereas the default one does not.


How many DeLoreans existed at the same time?

How many copies of the DeLorean time machine co-existed in the Back to the Future series?


Let the degree of the polynomials $P(z)=a_0+a_1z+a_2z^2+\cdots+a_nz^n$   $a_n\neq0$ and $Q(z)=b_0+b_1z+b_2z^2+\cdots+b_mz^m$ $b_m\neq 0$ be such that $m\geq n+2$. Show that   if all the zeros of $Q(z)$ are interior to a simple closed contour C,   then $$\int_C\frac{P(z)}{Q(z)} \, dz=0$$   I am lost on how to show it $P(z)$ and $Q(z)$ are polynomials, then the ratio is analytic in all the points except where $Q(z)=0$. If $\frac{P(z)}{Q(z)}$ be analytical in all the points on the contour or inside, so I could tell straight that the integral is zero, but that is not the case.


How to separate faces of an mesh, center pivot to every face according to its normal?

I have separated all faces and set the pivot point (origin) to center mass with this solution:  Here is the code: import bpy bpy.ops.object.mode_set(mode = 'EDIT') bpy.ops.mesh.select_all(action='SELECT') bpy.ops.mesh.edge_split() bpy.ops.mesh.separate(type='LOOSE') bpy.ops.object.mode_set(mode = 'OBJECT')  Q: HOW TO SET THE PIVOT POINT TO BE ORIENTED IN THE CENTER OF THE PLANE ACCORDING TO THE NORMAL


Flagging users who post useless comments

One of the things I find really annoying about Stack Overflow is that many users will post useless comments and others will upvote them. If someone doesn't think you did do your homework, then they have the right to flag a post as such, but they should not be allowed to post poor comments.  There should be a "flag as unconstructive" next to comments (and not just solutions posted). If some people are constantly in the habit of posting useless comments, penalties should be taken like locking them out of Stack Overflow for a few days. Then maybe they would think twice about making such comments. Just have a look at the comments on this post for example:    People on Stack Overflow shouldn't be able to get away with this. If they don't like a post, they should either ignore it or flag it under some category.


Please clarify how entropy increases when matter gravitationally coalesces

On John Baez's website, , he discusses the problem of how entropy increases when a cloud of ideal gas collapses gravitationally (no black holes - keeping it simple).  But he doesn't give away the answer - instead he implies that, I presume, either gravitons or photons are released during collapse and these increase the overall system entropy.  Can someone please answer which it is, gravitons or photons?  If gravitons (or gravity waves), then does this mean that pre-20th century physicists, with no notion of gravity waves, would have concluded that gravitational attraction violates the 2nd law?  And if photons, then what about if the gas particles were totally neutral - wouldn't they not emit any EM radiation in that case?  Or am I wrong that gravitons or photons are the answer? Thanks!


How is it easier to make a persistent live drive with Ubuntu 19.10?

Persistent live drive with a partition for persistence There are some web sites describing  new tools new features in [new versions of] old tools  that can create a persistent live drive from an iso file with Ubuntu 19.10 and the corresponding Ubuntu family flavours.  Why and how does it work? How is it different from earlier methods for persistent live drives? Isn't live the default for a cloned drive?


Test the series for convergence: $\sum_{n=1}^\infty \frac{1}{n(n+1)(n+2)}$

$$\sum_{n=1}^\infty \frac{1}{n(n+1)(n+2)}$$      Does calculating the limit ($\frac 1 4$) suffice for showing that it's convergent?  If not, how could I show it?     Quotient criterion - the ratio of two consecutive sequence terms is $1$, so it won't work.  Can it be done by comparing with the harmonic series? I don't see how I can transform the fraction?


I recently flagged a question as off-topic:  and my flag was marked as "Helpful" yet the question still exists and hasn't been transferred to  and/or burninated.  So, I have several questions pertaining to flagging:   If an event such as this happens, should I go back and reflag as "Needs Moderator Attention"? When is it appropriate to flag a question?  Is it appropriate to flag it even if there is/are one/several answers?  What if there is an accepted answer?  What if the question has one/several upvotes? Are there any valid reasons for this question to still exist? Is there a generally-accepted un-written-about "age" of questions that should be left as-is and not flagged as to not clog the queues (i.e. anything older than 1 year/6 months/7 days)?


Why would Mystique's DNA allow for Sentinels that can duplicate mutant powers?

The future Sentinels in  are clearly shown adapting to powers thrown at them by copying them. Isn't that what Rogue's DNA would allow for, not Mystique's? Mystique can just change appearance, not copy powers ... right? So why would study of her mutant genes allow for the abilities of the future Sentinels?


How do environmental kills charge the Ultimate Meter?

One thing that isn't mentioned in  is how environmental kills affect the Ultimate Meter. Specifically, does the HP of the hero being killed affect how much charge is gained? Is it better to boop a Roadhog off the map than a Tracer (as far as your ult meter is concerned)?


How to enable extensions that are not from Chrome Web Store?

The new version of Chrome will auto disable extensions that are not from Chrome Web Store, and cannot enable it manually in the chrome://extensions page.  How to enable the extensions and disable the "auto-disable" mechanism?


Science fiction short story: non-telepathic Earthman wins an interplanetary contest on ethics and joins government

The short story was in a collection of short stories. An Earthman takes an exam in an interplanetary contest on ethics and wins. He becomes a part of an interplanetary government. He lacks the ability to read minds as most can. He detects a lie from one other new planet without telepathic ability. It is probably pre 1990. Does anyone know the story name, author, or collection?


How to solve the diophantine equation $x^y = y^x $?

I know this might be an obvious question as we all know that the answers (beside $(x,y)=(1,1)$) are $(x,y)=(2,4)$ but the problem is, how is this exactly solved?  Tags might be inaccurate so feel free to edit my question at will.  By the way so far I tried this:  $x^y = y^x \rightarrow y\log x=x\log y $  Later on,I tried to draw their graphs and see where they intercept,but well ... no use.  A hint would be highly appreciated.


Classification of Band as a Collective Noun

The band of musicians was playing.- here band is a collective noun. The musical band is popular among teenagers.- Can I say band is a collective noun in this context?


Adding an array to sessionstorage sharepoint list

while (listItemEnumerator.moveNext()) {     var oListItem = listItemEnumerator.get_current();     listTitle.push(oListItem.get_item('Title'));     listUrl.push(oListItem.get_item('PrivacyStatementUrls').get_url());      listIsActive.push(oListItem.get_item('IsActive'));     listOrder.push(oListItem.get_item('SortOrder'));  } sessionStorage.setItem('Title', listTitle); sessionStorage.setItem('Url', listUrl); sessionStorage.setItem('IsActive', listIsActive); sessionStorage.setItem('Order', listOrder);   Here is my code for adding an array to sessionstorage. When outputting the array from session storage it seems to output a letter at a time but when I output the array without session storage it outputs the whole valu


I'm using the devanagari package to typeset Hindi/Sanskrit alphabet in LaTeX. I have defined commands like \newcommand{\S}{{\dn saa}}, \newcommand{\R}{{\dn re}} etc. From a usage point of view, I would like to use these commands in the following way:   \S\R should be formatted without space between the two characters:  \S \R should be formatted with space between the two characters:    First one works just fine, but the second one doesn't.  I know writing it as \S{} \R{} would do the job, but I'm trying to avoid writing the two extra braces. Similarly, writing it as \S\ \R\ is what I'm currently doing right now, but it would be ideal if there is a way to get read of the trailing backslashes. Furthermore, I have looked at using the xspace package, but it doesn't seem to work with the devanagari package.  A very basic working example is as follows:  \documentclass{article} \usepackage{devanagari}  \newcommand{\S}{{\dn saa}} \newcommand{\R}{{\dn re}}  \begin{document} \S\R \\     % output expected as #1 \S \R \\    % output expected as #2 \end{document}   To run the above snippet:   Save the file as sample.dn Run devnag sample.dn in the terminal, this generates a file sample.tex Run pdflatex sample.tex in the terminal to generate the PDF   Is there any way to format \S \R as shown in #2 above?


Find all triples of non-negative Integers $a,b,c$ such that $a!b!=a!+b!+c!$

Exactly what it says in the Title;  not much development from there :/


Do the electric and magnetic components of an electromagnetic wave really generate each other?

Frequently when EM waves are taught, it is said that the change in electric field causes a change in the magnetic field, which then causes a change in the electric field, and so on and so forth.   But from my understanding of basic electromagnetics, it is not necessarily a changing electric field that creates a change in magnetic field, but instead an accelerating charge. and it is this charge that creates both the electric and magnetic field. Again, from my understanding, a changing magnetic field is not generated by a changing electric field, but instead just happens to always be present perpendicular to a changing electric field due to the laws of electromagnetism.   Am I wrong? Or is the "mutual generation" concept between the electric and magnetic components of an EM wave an actual thing?


I would like to have an arrow with "1-1" above it and/or "onto" below it, with the arrow being normal size.  I get what I want with "1-1" using \stackrel:  \documentclass[12pt]{article}  \begin{document} \(  \stackrel{1-1}{\longrightarrow}\\  \stackrel{\stackrel{1-1}{\longrightarrow}}{onto} \)  \end{document}   I would like to position "onto" similarly below the arrow.  But using a nested stackrel makes the arrow to small and too high.  What should I do?


When I open the game, the screen stays at the Mojang sign and then crashes. It has something to do with my texture pack, but I can't start the game to change it and it won't let me delete the texture pack folder alone.  I've already deleted the bin and resources folders in the minecraft folder and downloaded the game again. I opened it but the same problem was still there.  How do I properly perform a clean uninstall of the game?


On the existence of a non-constant sequence whose differentiable image converges

Let $f: [a,b] \to \mathbb R$ be a function differentiable in  $(a,b)$ , then is it true that there is a non-constant   sequence $(x_n)$ in $(a,b)$ such that the sequence $\big(f(x_n)\big)$ is convergent ?


Questions:   To what extent is it possible to treat (dry) sand in presence of gravity as a fluid? How does sand differ from other more standard fluids like liquid substances?   Since the definition of "fluid" is very broad, here I list some less vague points that may help anyone answering:   the propagation of waves in sand is different from liquids: if something hits sand I would say that a single wavefront can propagate and it is rapidly damped as it moves away from the impact point. But maybe a strong enough impact can exhibit more ripples? is viscosity present in sand? how does sand behaves at the interfaces with other fluids? Can we define some kind of surface tension when gravity is present?   I would say that having an external gravitational field should be important for sand to manifest these features but I am not completely sure: maybe it is not crucial for the single wavefront after an impact.   Anyway writing this I was not thinking about self gravitation effects and, with exception for the last point, I would assume no interaction with air or other fluids.    Slightly off topic:  It is interesting that we can substitute sand with any ensemble of solid, rigid objects of a fixed size with no interaction except being impenetrable, like sofas. Maybe if said objects can intertwine and bound (like chairs that get stuck together) tha fluid could approximate liquids even more, mimicking covalent or molecular bounds.


How to find an end point of an arc given another end point, radius, and arc direction?

Given an arbitrary arc, where you know the following values: end point (x1,y1), radius (r) and arc direction (e.g. clockwise or counterclockwise from start to end), how can I calculate the other endpoint of the arc (and I say endpoint because I think of an arc as line segment that is curved, which happens to lie on the circumference of the circle and it has two end points).   Though that's just how I interpret the problem and maybe I'm not thinking about it correctly.  EDIT: Yes, I know the Origin point and the length of the arc. Sorry I forgot to mention. Also, the that circle would be on a 2D Cartesian plain (x and y axis.) Sorry, my math terminology is lacking.   Also, I'm not trying to cheat on homework or anything. This is a legitimate problem for an SVG graph I'm trying to create using JavaScript and I've tried my best but I need help.  Thanks in advance.


Make any program "think" its output is a terminal (ie stop it from "knowing" its output is a pipe/file/substitution/etc) to keep ansi-color-codes etc

EDIT:  specifically what worked for me was using the python script in  and I gave the tweaks I used to get it working for my autoloading functions in fishshell, and on ubuntu 20.04, in  on that answer    There are lot of commandline programs that apparently check whether their output is stdout a terminal or a pipe/file, and tweak what they output based on that. Those tweaks basically mainly being stripping out ansi-color-codes if the output is not stdout a terminal. At least some of these programs have their own idiosyncratic configuration options to get them to still output ansi-color-codes, but is there any sort of completely program-agnostic way of doing it? Like, something I could somehow quickly and simply "wrap around" arbitrarily any program I want the output from, in order to "fool" it into "thinking" its output was still just stdout a terminal?  Use-case example: Say you want to take the output of eix on Gentoo or apt search on Ubuntu (both just search available packages by some regex), and pipe the output into less, but keeping the default color highlighting. Or like, I have a shell function that takes ansi-color-code output, converts it to html (using the program ""), and copies it into my clipboard. eix happens to have a flag --force-color, but apt search apparently doesn't have anything like that. (And grep uses --color=always, demonstrating the whole "even if a program has the option, how to use it will be idiosyncratic" thing.)


Using single quote by curly braces in String.format in Dynamic SOQL

I'm struggling to use String.format to replace a token with a value when the token is within single quotes:  Example:  String query = String.format('SELECT Id FROM Availability WHERE Person__c = \'{0}\'', personId);   String query is equal to:  SELECT Id FROM Availability WHERE Person__c = {0}   Rather than:  SELECT Id FROM Availability WHERE Person__c = '234567890'


When I tried to connect my Ubuntu 13.10 to my VM Centos 6.5 using ssh appear the message "Connection refused" or "No route to host" even than I change the port, noting change.   I need to use SSH, VPN and Samba, but this IP in my VM Centos do not work.   How Can I resolve this problem?


Links don't show up in plain-text email of mod messages

I sent a mod message to myself before sending it to the user to check the formatting and such, and noticed missing links in the plain text version:  HTML version:   Plain text version:   As you can see, the first three links don't show up at all in the text/plain version of the email.  I pasted the links as-is:  http://vi.stackexchange.com/... some text  http://vi.stackexchange.com/... Some text   Looks like this only happens if there is a text description for the link ([..](http://..)), as the fourth link as well as a  link to a post's revisions did survive intact.    By the way, also note how it doesn't add the > markers, and just adds that as plain-text.  The input field is in Markdown – why not just use that as-is as the text/plain part of the email?


I am a developer and use ubuntu. I want to create a live cd which has te IDE and SDK tools I use for develpment and also I want to run a pre installed git client with a repository configured. Also want to give te option to install ubuntu with all this preset software and code repository.


Prove that $\prod_{i=1}^n a_i^{\lambda_i}\le \sum_{i=1}^n\lambda_i a_i.$

Question: Let $a_1,a_2,\cdots,a_n$ be positive real numbers and $\lambda_1,\lambda_2,\cdots,\lambda_n$ be non-negative real numbers such that $$\sum_{k=1}^n\lambda_k=1.$$ Prove that $$\prod_{i=1}^n a_i^{\lambda_i}\le \sum_{i=1}^n\lambda_i a_i.$$    Solution: Observe that for each $a_i$, $1\le i\le n$, we have an unique $y_i\in\mathbb{R}$, such that $a_i=e^{y_i}$. Therefore, we have $$a_1=e^{y_1},a_2=e^{y_2},\cdots, a_n=e^{y_n}.$$  Discrete Jensen Inequality: Let $f$ be a convex function defined on an interval $I\in\mathbb{R}$. Assume that $x_1,x_2,\cdots,x_n\in I$ and let $\lambda_1,\lambda_2,\cdots, \lambda_n$ be non-negative real numbers such that $\sum_{k=1}^n\lambda_k=1$. Then, $$f\left(\sum_{i=1}^n \lambda_i x_i\right)\le \sum_{i=1}^n\lambda_if(x_i).$$   Now $f(x):=e^x, \forall x\in\mathbb{R}$ is a convex function. Also we have $a_i=e^{y_i}$, $1\le i\le n$, where each $y_i\in\mathbb{R}$ and $\lambda_1,\lambda_2,\cdots,\lambda_n$ are given non-negative real numbers such that $\sum_{k=1}^n\lambda_k=1$. Thus, applying Discrete Jensen Inequality we have $$e^{\sum_{i=1}^n\lambda_i y_i}\le \sum_{i=1}^n\lambda_i e^{y_i}\\\implies \prod_{i=1}^n (e^{y_i})^{\lambda_i}\le \sum_{i=1}^n\lambda_i e^{y_i}\\\implies \prod_{i=1}^n a_i^{\lambda_i}\le \sum_{i=1}^n\lambda_i a_i.$$ Hence, we are done.   Is this solution correct and rigorous enough? And, is there any other way to solve the same?


I'm think of buying  , HP Omen 600 wired mouse for use on Ubuntu 20.04. I've seen reports about mixed compatibility. I'm not bothered about programming buttons on the mouse but if I just plug it in to the USB port should it work fine for the standard functions? I'm wondering if anyone else has tried an HP gaming wired mouse on modern Ubuntu distros and if they've had success. Thanks


Messages won't let me sign in to iMessage

On my OSX laptop (10.8.5) I've recently been unable to sign into iMessage. By recently I mean approximately a week. I've not done any updates that I recall lately.  Coworkers are able to send me messages and my phone gets the messages directly over iMessage, so my account is working on this network (wifi and wired go through the same set of equipment out to the internet, so it's not a port blocking issue, and we're a small network of about 50 users) and my account is working in general.  I can login to  just fine from my computer. I'm logging into the computer and my phone with the same gmail address and password in both places.  Next steps?  One solution on the internet was "do you have a serial number in "About This Mac" and I do.


How to grep for text in a file and display the paragraph that has the text?

Below is the text in the file:  Pseudo name=Apple Code=42B state=fault  Pseudo name=Prance Code=43B state=good   I need to grep for "42B" and get the output from the above text like:   Pseudo name=Apple Code=42B state=fault   Does anyone have idea on how to achieve this using grep/awk/sed?


Proving an inclusion for the derived group

I need help to answer the folowing problem:     Let $F$ be a field, $n\ge 1$ and $G=F^n\bigoplus F^n\bigoplus Mat(n,F).$ That is an element of $G$ has the form $(v,w,X)$ where $v$ and $w$ are n-by-1 vectors and $X$ is $n$-by$-n$ matrix, all with entires in $F$.      Define an operator on $G$ by:      $$(v_1,w_1,X_1)(v_2,w_2,X_2)=(v_1+v_2,w_1+w_2,X_1+X_2+v_1w_2^t)$$      Show that $G'=\left\{(0,0,X), X\in Mat(n,F)\right\}$. Where $G'$ is the derived group of $G$ i.e $G′=\left\{[a,b],a,b∈G\right\}$   I poved the following inclusion:  we need to compute the commutator $[(v_1, w_1, X_1), (v_2, w_2, X_2)]$. Before jumping into the computation it's clearer to first write out the inverses.  We have:  $(v_1, w_1, X_1)^{-1}      = (-v_1, -w_1, -X_1 + v_1 w_1^t)$   and  $(v_2, w_2, X_2)^{-1}      = (-v_2, -w_2, - X_2 + v_2 w_2^t)$  Then  $[(v_1, w_1, X_1), (v_2, w_2, X_2)]$   $= (v_1, w_1, X_1)(v_2, w_2, X_2) (v_1, w_1, X_1)^{-1} (v_2, w_2, X_2)^{-1}$  $= (v_1, w_1, X_1)(v_2, w_2, X_2)(-v_1, -w_1,  - X_1 + v_1 w_1^t) (-v_2, -w_2, - X_2 + v_2 w_2^t)$  The $v$'s and $w$'s all cancel out nicely in the first two coordinates. The third coordinate is some $n \times n$ matrix.  We have just proved that the set of commutators is a subset of the set of all elements of the form $(0, 0, X)$.   So we have shown that   $G'\subset \{(0,0,X)\}$. Please help me to prove the other inclusion. Thanks in advance.


If $x_1\ne x_2$ then there exists $y$ in dual space such that $y(x_1)\ne y(x_2)$

I have the following question from a past qualifying exam:  If $X$ is a Banach space and $X^*$ denotes its dual space show that if $x_1\ne x_2\in X$ there is an element $y\in X^*$ such that $y(x_1)\ne y(x_2).$  So i'm trying to construct a linear functional $y:X\rightarrow\mathbb{K}$ with the above property, but I don't seem to be getting anywhere. Perhaps there are elements of the dual space that always exist and which I can take advantage of here? Unfortunately, we didn't talk very much about Banach spaces in my course, so if anyone could point me in the right direction, I'd appreciate it.


I was graciously given the code below by sfdcfox, however after spending the night googling for test class walkthroughs I can't seem to figure it out. Would anyone have any resources to share or be able to point a beginner in the right direction for testing this extension class? public inherited sharing class InventoryTransferSheetController {   Inventory_Transfer_Sheet__c record;   public InventoryTransferSheetController(ApexPages.StandardController controller) {     record = (Inventory_Transfer_Sheet__c)controller.getRecord();   }   public void saveChildren() {        update record.Inventory_Transfer_Lines__r;       } }


Is point $p$ in triangle $ABC$?   If I have triangle $ABC$ and point $p$, how I can detect if point $p$ is in the triangle or not?


I have a JPanel subclass on which I add buttons, labels, tables, etc. To show on screen it I use JFrame:  MainPanel mainPanel = new MainPanel(); //JPanel subclass  JFrame mainFrame = new JFrame(); mainFrame.setTitle("main window title"); mainFrame.getContentPane().add(mainPanel); mainFrame.setLocation(100, 100); mainFrame.pack(); mainFrame.setVisible(true); mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);   But when I size the window, size of panel don't change. How to make size of panel to be the same as the size of window even if it was resized?


I'm starting to read Baby Rudin (Principles of mathematical analysis) now and I wonder whether you know of any companions to it. Another supplementary book would do too. I tried Silvia's notes, but I found them a bit too "logical" so to say. Are they good? What else do you recommend?


Can't Prove formula from Sakurai's Modern QM @ Perturbation Theory

I am studying Perturbation Theory from J.J. Sakurai's textbook Modern Quantum Mechanics. I am having trouble proving formulas on page 299 (5.2.5) and (5.2.6) from the previous ones [mainly (5.2.4)]. Can anyone help?  This is a problem of working with perturbation theory when the non-perturbed state has degeneracy. To elaborate I do not get why $(E-H_0-\lambda P_1VP_1)$ is not singular.  More importantly is the equation below correct and if so why:  $$(E-\lambda P_1VP_1)|l \rangle = E_D^{(0)}|l \rangle $$  That is the core of my problem. If the above equation - in the framework of Sakurai's statement of the problem - is correct I can work out all the rest on my own. However I do not get why this equation would hold true.


Does TG () prove that ZFC2 (second-order ZFC) has a model? Does it at least prove the consistency of ZFC2?


Based on these DBCC SHOWCONTIG stats, should I index this table?

I have a SQL 2008 Standard server on full mirror (safety). I reorganize all indexes weekly. I am looking into rebuilding a few indexes to improve performance. I ran DBCC SHOWCONTIG on my largest, most accessed table and got the following results.  DBCC SHOWCONTIG scanning 'MYTABLE' table... Table: 'MYTABLE' (12345678); index ID: 1, database ID: 7 TABLE level scan performed. - Pages Scanned................................: 738663 - Extents Scanned..............................: 92661 - Extent Switches..............................: 92720 - Avg. Pages per Extent........................: 8.0 - Scan Density [Best Count:Actual Count].......: 99.58% [92333:92721] - Logical Scan Fragmentation ..................: 0.35% - Extent Scan Fragmentation ...................: 41.58% - Avg. Bytes Free per Page.....................: 467.9 - Avg. Page Density (full).....................: 94.22%   Would rebuilding the index make sense on this table? Would there be any benefits to doing so?


I need an app that does the following:   Allow me to paste multiple snapshots from clipboard. Also resize and move them. Draw arrows, write texts...   Just what paint on windows does.  I've tried Gimp but is terrible slow and full of bugs.


Say I have a file's path, how do I reference that file's directory from the command line?

I can type:  dirname ~/home/blah/file.zip   for instance, and this works fine alone, but when I use this syntax as the parameter for some command it always reads 'dirname' as the desired directory. i.e.:  cd dirname ~/home/blah/file.zip bash: cd: dirname: No such file or directory   Basically, how do I get 'dirname file' to be read as one entity?


MySQL command to Extract DDL and DML and Exclude tables which are not required?

I have a db and looking for a mysql commands to extract Extract DDL and DML and Exclude tables which are not required  could you please let me know how we can do it via command prompt?  Thanks, Kathir


Java Exception in thread "main" java.lang.NullPointerException

I am trying to write a program that finds the common numbers in 2 integer arrays.  Here is my code:  public static Integer[] commonElements(int[] array1, int[] array2) {         Queue<Integer> q = new LinkedList<Integer>();         ArrayList<Integer> list = new ArrayList<Integer>();         for(int i: array1){             q.add(i);         } //O(N)         int j = 0;         while(j < array2.length){             if(array2[j] == q.peek()){                 list.add(q.peek());                 q.poll();                 j += 1;             }             else if(array2[j] > q.peek()){                 q.poll();             }            else{             j += 1;            }         }         Integer[] resultInArray = list.toArray(new Integer[list.size()]);         return resultInArray;      } }   But I keep getting the null pointer exception on this line here if(array2[j] == q.peek()), I know that the null pointer exception occurs when one of the two objects I am comparing is null, but I don't see how in this circumstance which one it is. Can anyone see what is creating the null here? Thank you!


I have following Python regex:  re =re.match(r'.*? from\s+(.*?)(\s.*|$)', q)   Here, q is a query like this:  Q1 = u"select * from dlpx_jobs where job_id=\\'531\\';"  Q2 = u"select * FROM dlpx_jobs where job_id=\\'531\\';"   Now, obviously, for Q1 the regex works because "from" is lowercase in the query but for Q2 regex doesn't work because in Q2 "from" is in Uppercase.   Is there any way through which the regex works for both the query irrespective of whether "from" is uppercase or lowercase?


how to communicate to a servlet program from your test classe (using testing / Junit)

I want to send my request to servlet program from my test classes( using TESTING tool). how to achieve this.


I'm trying to code MergeSort algorithm myself but I got to the point, when I'm not sure what is wrong so the algorithm is not working. I basically do everything like goes in mergesort algorithm, finding mid, splitting and merging. Code goes here:  void merge(int *aux1, int *aux2, int *array) {     int p1 = 0, p2 = 0, i;     //debug     printf("MERGE! sizeof aux1:%d, aux2:%d", SIZEOF_ARRAY(aux1), SIZEOF_ARRAY(aux2));     printf(" MERGE!sizeof array:%d\n", SIZEOF_ARRAY(array));      for (i = 0; i < SIZEOF_ARRAY(array); i++) {         if ((aux1[p1] > aux2[p2]) && (p2 != SIZEOF_ARRAY(aux2))) {             array[i] = aux2[p2];             p2++;         } else {             array[i] = aux1[p1];             p1++;        }    }   }  void mergeSort(int *array, int l, int r) {     if (l < r) {         int m = (l + r) / 2; //finding mid of array          int aux1[m - l + 1], aux2[r - m]; //create temporary arrays         int i;         //debug         printf("MERGESORT sizeof aux1:%d, aux2:%d\n", SIZEOF_ARRAY(aux1), SIZEOF_ARRAY(aux2));          //split arrays         for (i = l; i <= m; i++)             aux1[i - l] = array[i];          for (i = m + 1; i <= r; i++)             aux2[i - (m + 1)] = array[i];          mergeSort(aux1, l, m);         mergeSort(aux2, m + 1, r);          merge(aux1, aux2, array);     } }   The issue with the code is that when I try to debug it and I get to the point when mergeSort stops and it comes to merge the very first 2 elements of the array, in merge function, the macro SIZEOF_ARRAY(aux1) or SIZEOF_ARRAY(aux2) shows, that they (aux1[] and aux2[]) are 2 elements long, while in mergeSort function the same macro shows they have only 1 element which is correct. I totally don't know what is happening because I'm using the same temporary arrays, but macro shows different lengths. Macro code is:  #define SIZEOF_ARRAY(a) (sizeof( a ) / sizeof( a[ 0 ] ))   Any help would be appreciated. THANKS!!!


How can I change my resolution to 1280x1024? I used the info from this link     but it didn't work. This is what appears     How can I fix this? I'm using a nVidia GTX 660 GPU with the recommended driver.


Been looking to pivot rows (progress_check) into columns check 1, check 2 etc... No sum or totals required, just to display the results hopefully... Can anyone help, Thanks Ad


Did I derive a new form of the gamma function?

I wish to extend the factorial to non-integer arguments in a unique way, given the following conditions:  $n!=n(n-1)!$  $1!=1$    To anyone interested in viewing the final form before reading the whole post:   $$x!=\exp\left[\int_0^x\left(-\gamma+\int_0^1\frac{1-t^\phi}{1-t}dt\right)d\phi\right]$$    $$f(x):=\ln(x!)$$  $$f(x)=\ln(x!)=\ln(x)+\ln((x-1)!)=\ln(x)+f(x-1)$$ $$f(x)=f(x-1)+\ln(x)$$ $$\frac d{dx}f(x)=\frac d{dx}f(x-1)+\ln(x)$$ $$f'(x)=f'(x-1)+\frac1x\tag1$$ $$f'(x)=f'(x-2)+\frac1{x-1}+\frac1x$$ $$=f'(0)+1+\frac12+\frac13+\dots+\frac1x$$ for $x\in\mathbb N$:  $$f'(x)=f'(0)+\sum_{n=1}^x\frac1n\tag2$$  Euler has a nice extension of the harmonic numbers to non-integer arguments, $$f'(x)=f'(0)+\int_0^1\frac{1-t^x}{1-t}dt\tag{2.1}$$ from the FTOC we have $$\ln(x!)=\int_0^x\left(f'(0)+\int_0^1\frac{1-t^\phi}{1-t}dt\right)d\phi$$  $$x!=\exp\left[\int_0^x\left(f'(0)+\int_0^1\frac{1-t^\phi}{1-t}dt\right)d\phi\right]\tag3$$  And with $f'(0)=-\gamma$, the Euler mascheroni constant, we should get the gamma function.  Or we may just let it sit as an unknown parameter.  My questions are if this captures all possible extensions of the factorial with the given conditions, since, if it did, it'd be a pretty good general extension to the factorial? Given a few more assumptions, it is easy enough to set bounds to what $f'(0)$ might be as well. Notably, this representation fails when considering $\Re(x)\le-1$, but coupled with the first condition, it is extendable to all $x$, except of course the negative integers.  robjohn♦ notes an extension to the harmonic numbers that converges for $x\in\mathbb C$, except the negative integers: $$\int_0^1\frac{1-t^\phi}{1-t}dt=\sum_{n=1}^\infty\left(\frac1n-\frac1{n+\phi}\right)$$  Any suggestions on things I could've improved and flaws in this would be nice.  Edit: Using the second condition and $x=1$, we may have $$1=\exp\left[\int_0^1\left(f'(0)+\int_0^1\frac{1-t^\phi}{1-t}dt\right)d\phi\right]$$ $$\implies f'(0)=-\int_0^1\int_0^1\frac{1-t^\phi}{1-t}dt\ d\phi$$ $$f'(0)=-\gamma$$ where $\gamma$ is the Euler-mascheroni constant. Using this we get a new form of the gamma function(?):  $$\boxed{x!=\exp\left[\int_0^x\left(-\gamma+\int_0^1\frac{1-t^\phi}{1-t}dt\right)d\phi\right]}\tag4$$  $$=\exp\left[\int_0^x\left(-\gamma+\sum_{n=1}^\infty\left(\frac1n-\frac1{n+\phi}\right)\right)d\phi\right]$$  I'm not sure how to deal with trivial manipulations of this expression, as surely someone is gonna say "hey, just multiply everything by $(1+\sin(2\pi x))$ and it will still satisfy the conditions, right?" But regardless, I think this is a pretty cool new gamma function?  Also, references to this if it's not new. If someone could make a graph of this to look at, you would be great.


Software to draw illustrative figures in papers

I would like to have suggestions of good software for drawing illustrations in research papers. I already know about , but this works only on Linux and is at times, clunky when it comes to text. Moreover the resolution is not always perfect making it difficult to manoeuvre the objects. Besides it is tough to learn and master, with all its weird click procedures.   I would love to know about better alternatives. Not talking about graphs here, just block diagrams and explanatory illustrations.


I am using Ubuntu 12.10, can someone give-me instructions on how to make an account invisible from the login screen without deleting it?


In 5e, do the terms "creature" and "character" refer to different concepts?

Creatures in 5e is a general term covering all living entities, from NPCs to PCs, wolves to level 20 gnome wizards. Monsters, characters, and NPCs are all creatures. Monsters are creatures with a stat block, such as wolves. Characters on the other hand appears to only refer to PCs with a character sheet, such a level 20 gnome wizards. We also have NPCs, which are otherwise monsters, but the DM is using them to interact with the party socially. I see some evidence of this in various sections. For example the  section states "Characters have a proficiency bonus determined by level, as detailed in "Step-By-Step Characters." Monsters also have this bonus, which is incorporated in their stat blocks." This quote from the  rules states:  If the total equals or exceeds the DC, the ability check is a success--the creature overcomes the challenge at hand. Otherwise, it's a failure, which means the character or monster makes no progress toward the objective or makes progress combined with a setback determined by the DM.  Are these definitions correct?


I've multiple process of xargs running. I want to terminate them all using kill at once . How to do them ? . So far I've tried this ps -a | grep -i xargs | awk '{print $1}' | xargs kill .


Border on borderless pie chart, Illustrator CC

I'm an Illustrator beginner, and I have just made pie chart. I removed the borders but I still end up with a 1 pixel wide border between the pieces of the pie whenever I export to PDF or AI. Please see the attached image (zoomed to make it easier to spot it).    The question is: How do I get rid of it?


Regex - Check if string contains partial URL and convert to link

I just can't get my head around regex and this is driving me crazy.  I have the following string;  'This is a random string of text with a link to google.com/test and another link to facebook.com`   What I want to do, is turn google.com/test into https://google.com/test but leave the facebook.com link as plain text.  So basically, any instance of google.com (Including with prefixes) would turn into a link, but any other URL would remain as plain text.  Can someone give me a nudge in the right direction please?


I am willing to try out ConTeXt after reading about its typographical capabilities and differences from more classical engines. I was wondering if there was good and recent resources to learn the specificities of ConTeXt for people like me who already know the basics of the TeXnique.  In the question , there is given a link to some very good manuals. However, after parsing them, it appears that they go pretty deep from the begining or go too much into details for someone who never used ConTeXt.  So, do you know of resources that could suit my needs? Let me know if I am wrong on the resources I already find.


Is the group $(\Bbb Z,+)$ isomorphic to the the group $(\Bbb Q\setminus\{0\},\cdot)$?


Usage of spend with preposition 'on' or without preposition 'on' in clauses

Sometimes we use spend like "spend something on doing something" but sometimes we are using without on like "I spend a lot of time working on  this project". Is there any difference between these usages? If yes, what is the difference?  Thank you for your help.


How to deal with players that wants their characters to do automatic perception, stealth and searching for traps/secret doors?

Every time my players are exploring a dungeon, they want their characters to do perception checks for monsters, perception checks for traps and/or secret passages while being on stealth mode, all at the same time. If a monster comes or if they activate a trap, they get mad because "my character is always looking for traps".  If I say they need to declare their actions, the game goes like this:  [me describing a area, like a corridor they're walking in]  player: I check for traps and secret doors in the wall, the floor and the ceiling. I also want to hear anything unusual and walk silently.   They want to be on "automatic mode", expecting me to roll for their PCs every time they enter a new area. Otherwise they always have this phrase "I check for traps and secret doors in the wall, the floor..." that they say EVERYTIME I introduce a new area. I can't put them in "automatic" for this kind of roll. We're playing D&D 5e, but this happen in other campaigns, and it has always been a problem to me.   How do I deal with it?


Does Elemental Affinity add damage to Witch Bolt only once?

If a 6th level Sorcerer with Elemental Affinity (lightning) casts Witch Bolt, is only the inital bolt's damage is increased, or the damage of every one of them?  Elemental Affinity:     [...] when you cast a spell that deals damage of the type associated with your draconic ancestry, add your Charisma modifier to that damage.   Witch Bolt:     [...]  on each of your turns for the duration, you can use your action to deal 1d12 lightning damage to the target automatically.


The British pronunciation of the word "schedule"

Is pronouncing the word "schedule" as "shed-ule" only an upper class thing in the UK? Which pronunciation, "sked-ule" "or "shed-ule" is more faithful to the original etymology of the word, i.e. which came first?


What is the adjective for "a person who is correcting someone, but is doing it in a egotistical manner?" I forgot the word

What is the adjective for "a person who is correcting someone, but is doing it in a egotistical manner?" Like they are offering to help someone but they are doing it in a way that fuels their narcissism.


Creating a bootable USB-stick on OS X for PC

I am currently using a Mac running el Capitan but have now built my very first computer. I intend to use Ubuntu 16.04 as my OS.   My question is what i need to do in order to create a bootable USB, using my current OS, with which i can boot my new computer.   The internet is a vast place and the question has surely been asked before but i have not managed to find any answers. I'd be very thankful for any help.


When I open php in gnome-terminal -e, I get just empty terminal window

I'm to execute gnome-terminal -e php /var/scripts/script.php but I get nothing but empty terminal window without user name, when I do php /var/scripts/script.php the terminal is running without problems, how do I show out script's output out in new launched terminal? I want cron some stuff up end end up terminals being here for waiting me to check them out how it's going, because it's gonna happen when I'm not at workstation, and I've got it checked out... It's like 140 outputs I would need to rewrite, if I want to log that, because I haven't used wrapper... I just need terminal to see the stuff anyway.


What does the "bugs" section of /proc/cpuinfo actually show?

On a Debian Stretch and testing/Buster system with a current kernel and installed microcode I still see meltdown and spectre listed as bugs in /proc/cpuinfo.  However, running the spectre-meltdown-checker shows not vulnerable.   So I'm wondering what /proc/cpuinfo does show. Are these just the vulnerabilities for this cpu and will those always be listed despite having a patched system?


Moving the absolute value inside of an integral involving a complex function

I have the following integral to evaluate  $\lvert \int_0^\frac{\pi}{4}e^{iR^2e^{i2\theta}}iRe^{i\theta}d\theta\rvert$  and I want to put the absolute value sign inside of the integral so that I can make some simplifications.  I know that for functions of a real variable $\lvert \int_a^b f(x) dx \rvert \leq \int_a^b \lvert f(x) \rvert dx $ because of monotonicity of the integral and the fact that $-\lvert f(x) \rvert \leq f(x) \leq \lvert f(x) \rvert$.  But I am having trouble seeing this with functions of a complex value, I know that I am supposed to be able write a similar statement for the integral above, but I'm having trouble with the intuition.   I can't say that $f(z) \leq \lvert f(z) \rvert$ because there is not a total ordering of the complex numbers due to the phase terms, so I'm having trouble justifying moving the absolute value sign inside the integral.


So I have a table in my Customers.db file that looks like this:    I wanted to make a function which returns the "rows" which has the id equal to the user input. The Table is also called 'Customers and all the columns are type TEXT.  def run_query(db, query, args=NONE):     con = sqlite3.connect(db)     cur = con.cursor()     if args is None:         cur.execute(query)     else:         cur.execute(query, args)     data = cur.fetchall()     cur.close()     con.close()     return data   def get_info_by_id(db, ide):     query = "SELECT * FROM Customers WHERE id = ?"     return run_query(db, query, ide)   When I ran this in the shell like this                 get_info_by_id('Customers.db', '920')           I get the error "sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 3 supplied."


Let $f:A \rightarrow B$ be a ring homomorphism and $\mathfrak{a}_1,\mathfrak{a_2}$ be ideals of $A$. Let $\mathfrak{a}^e$ denote the extension of an ideal $\mathfrak{a}$ of $A$ in $B$. An exercise shows that $$(\mathfrak{a}_1 \cap \mathfrak{a}_2)^e \subseteq \mathfrak{a}_1^e \cap \mathfrak{a}_2^e.$$  It seems that $(\mathfrak{a}_1 \cap \mathfrak{a}_2)^e =\mathfrak{a}_1^e \cap \mathfrak{a}_2^e$ is wrong in general, but I can not find a counter-example.


How do you prove the follwing $|\sqrt[n]{x}-\sqrt[n]{y}| \le \sqrt[n]{|x-y|}$

how do you prove this inequality? $|\sqrt[n]{x}-\sqrt[n]{y}| \le \sqrt[n]{|x-y|}$ At first glance I thought the triangle inequality would be useful but it's not form what I see. If I raise everything to the power of n I get the following: Possibility 1 (n uneven) : $|x + ... -y| \le |x-y|$ I guess I would have to prove that ... $\le$ 0 but I don't know how to do that. Possibility 2 (n even) : $|x + ... +y| \le |x-y|$ Same as above but now I have to prove that ... $\le$ -y. Am I even on the right track here? Any help would be appreciated. Thanks in advance.


I installed openatrium locally on Wampserver2.4, after installing all the 186 modules, I goes to site home page, but it show following error  how to cope this error


I have at Ubuntu 12.04 swap size the same as my RAM - 1Gb.  I want to increase this a little bit, till 3Gb. Increase 2Gb of swap size.  I read  but I can't understand how to keep having this swap capacity that I have and add additional space?  Here you can see my disk structure with gparter:    I hope someone can help me increase swap size.


Force NTFS permissions inheritance for newly created files

Does anybody know a way to force that all files that get created inside some folder inherit the NTFS permissions of that folder.  The problem is the following:  I have a third party software that is creating PDF files inside a certain folder, but the problem is that those files get created with only the permissions for that user and for the administrators group, the file doesn't inherit the permissions of the folder it is in (Include inheritable permissions... is not marked on the files that get created), which give access to other groups of users also.


Prove that $a$ is always odd for when $a \% 2=1$

'%' is a common way of writing 'modulo' (or more strictly 'remainder') in lots of programming languages.  I have a simple formula: $a \% 2=1$  I have to prove that $a$ will always be an odd integer, but not sure how to write it out. I can prove by example, for example, substituting an integer into $a$, but that is not proving it.


The code i used to write     is this one  $$ X(m,n)= \begin{cases} x(n),\\ x(n-1)\\ x(n-1) \end{cases} $$   But I don't know how to write this one     I appreciate any help.   Edited: I'm sorry to add this but what if I want to write this


Geometric multiplicity of the largest eigen value

let  $$A=   \begin{pmatrix}     a & 2f & 0 \\     2f & b & 3f \\     0 & 3f & c \\   \end{pmatrix} $$ where $a,b,c,f$ are real numbers and $f\neq 0$. The geometric multiplicity of the largest eigenvalue of $A$ equals ?


What is the problem with this figure "proving" that $273=272$?

Even counting square by square each one of the figures, I can't find where is the mistake or the problem.


Let $f:G_1 \to G_2$ be a homomorphism between multiplicative groups.  Suppose that $N_1$ is a normal subgroup of $G_1$. Is the image $f(N_1)$ of $N_1$ a normal subgroup of $G_2$?


What are the specs for material design icon?

I would like to draw an app launcher icon with Inkscape but the official guide seems to miss some specs. In my understanding, to design a material design icon I just need to put some shapes together with different layers, and add drop shadow and long shadow for them respectively so they will have different elevations. However I can't find the specs for drop shadow and long shadow described in svg. Could anyone tell me the best specs that obey the guidelines?


I'm a beginner and currently doing the "Programming for everybody" course of the University of Michigan.  I wrote this code myself for task 7.2 and to my understanding the code is basically done. But for some reason at line 7 of the output (you'll see when you start the program), the program starts adding 11 additional digits at the end of the sum, as if I just substracted "0.00000000000000001" from the sum.  I just can't wrap my head around why this happens, does anybody of you see the problem?  The text-file used for this can be found here:   Thanks a lot.  file = ("mbox-short.txt") text = open(file) lcount = 0  for line in text:     line = line.rstrip()     if not line.startswith("X-DSPAM-Confidence"):         continue     lcount = lcount + 1     print()     print("Line: ", lcount)     #print(line)     a = line.find(":")     numbers = line[a+1:]     numbers = numbers.rstrip()     numbers = float(numbers)     print("New Number: ", numbers)      if lcount > 1:         print("Old sum: ", numbers_sum, "+", numbers)         numbers_sum = numbers_sum + numbers         print("New sum: ", numbers_sum)     else:         numbers_sum = numbers  numbers_avg = numbers_sum/lcount print(numbers_avg)


I am trying to use the MailManager class in Drupal 8 to send HTML mail. I got it working, but it isn't parsing the HTML markup. I think something is wrong with the headers of the email.  What I have is a custom module (Custom_forward) that contains a form and that calls Mailmanager::mail() in its submitForm() method, which contains the following code.          // Email body         $header = $sender . ' thought you would like to see this page from the website.';         $personal_message = $form_state->getValues()['message_body'];         $entity_url_value = 'toString() . '">Go to article';         $message = $header . '
' . $personal_message . '
' . $entity_url_value;          // Email         $langcode = 'en';         $mailManager = \Drupal::service('plugin.manager.mail');         $to = $form_state->getValues()['recipient'];          $params['title'] = 'Forward';         $params['message'] = $message;         $result = $mailManager->mail('custom_forward', 'forward', $to, $langcode, $params, NULL, true);          if ($result['result'] !== true) {             drupal_set_message(t('There was a problem sending your message and it was not sent.'), 'error');             \Drupal::logger('mail-log')->error($message);         }         else {             drupal_set_message(t('Your message has been sent.'));         }   According to Drupal you also need the hook_mail method in mytheme.theme to be able to send message, you can see this method here:  function custom_forward_mail($key, &$message, $params) {   $message['body'] = [];   $message['subject'] = [];   $message['headers'] = array(     'content-type' => 'text/html',     'charset' => 'UTF-8',     'format' => 'flowed',     'delsp' => 'yes',     'from' => \Drupal::config('system.site')->get('mail')   );    switch ($key) {     case 'forward':       $message['subject'] = $params['title'];       $message['body'][] = '' . $params['message'] . '';       break;   } }   As you can see, I am setting the content type to text/html and that should tell the mail system to parse the content as an HTML, but this is not working for some reasons.  This is a testing email. All the HTML markup is not shown, but also not working.  Bassem thought you would like to see this page from the website. personal message Go to article [1] [1] http://myhost/node/81


How can I change my existing question to a community wiki?   I have a set of questions on Stack Exhcange sites. I wish to make them community wiki questions. Is there any option to change my question into a community wiki? I see there is an option to do so for answers. Why is there no such options for questions?


How should I solve this problem? can anyone help?  Thanks.


Does Java optimize away a field that's just serving as a return value?

Why I'm asking:  I wanted to know it there is any optimization going on at the compiler side that would make one or the other method to return preferable. Since I have read  that python does not optimize the method to run faster.  The example:  I've declared 2 methods that deliver the same value. But barA returns it via an internal field declaration.   public class Foo {     public int barA(){         int a = 1;         return a;     }      public int barB(){         return 1;     } }   The tests:  public class TestFoo {     Foo foo = new Foo();     Method methodA = foo.getClass().getMethod("barA");     Method methodB = foo.getClass().getMethod("barB");       public TestFoo() throws NoSuchMethodException {     }       @Test     public void methodA() throws Exception {         assertTrue(Integer.TYPE.equals(methodA.getReturnType()));     }      @Test     public void methodB() throws Exception {         assertTrue(Integer.TYPE.equals(methodB.getReturnType()));     }     @Test     public void equalsSame() throws Exception{         assertEquals(foo.barA(), foo.barB());     } }   The results:  The tests showed that I'm in fact dealing with the same value and return type in both methods.  Disclaimer: This picture is not meant to highlight the stop watch, junit runs for each method, as it's in no way linked to the compiler optimization I'm asking about.    The question:  Does Java actually try to optimize away "useless" field declarations in order to execute faster?  I was not able to find a question addressing this.  Using:   jdk 1.8.0_121 junit 4.10


LED HD TV as a monitor for post processing purpose

Can I use a 47" 3d led hd tv with my pc to post process my photos? I am not sure how the quality will be on such a big screen photo being of some 4900x3600 approx.


I know my administrative and account password. But, whenever I try to change it or do anything like connecting to wifi, connecting to a new internet connection whether it be wired or a mobile network, or anything work, my Ubuntu 12.04 ( Which I have been using since 2012) is showing this message for a few days, I will be highly grateful if someone tells me how to solve this , I deadly need to connect wifi at least.


Extend tourist visa stay in USA due to coronavirus and waive I-539 fee

My mom has come to US on a tourist visa and her I-94 expires on the first week of May.   Due to the coronavirus, travel restrictions have been imposed in our home country (India). Also we want to avoid the risk of traveling in flights at this time.  Is there an easy way to to extend her stay in the US by one or two months?  I am aware that we should fill out an  to extend our stay. But in-order to submit the online application it requires a fee of $370.    Is filing I-539 the easiest way to extend her stay at this time? If so, is it possible to waive the fee due to the coronavirus situation?  After filing I-539 should she wait for an approval to continue her stay? Or is the receipt good enough?   Can you please help me with these? Thanks!  [Edit 1]:  With the current situation of the virus, traveling anywhere sounds like a very risky operation, especially for elders.   That is the main reason behind this question. If the US government will allow visitors to overstay until Covid-19 settles down!


Create A Bootable Disc Or USB From Preinstalled Windows 7 In Laptop

I have an HP laptop with preinstalled Windows 7. I have another PC where I want to install Windows 7.   I want to know how to create a bootable disc or flash drive from the laptop to install the Windows 7 to the PC.  I have the product key from the laptop.   Is this possible?


Generating a rand() %25 in which each number can only appear once

I am trying to right a program, with arrays, which gets random numbers between 0 - 24 but they can only occur once. I know how to generate random numbers, I am just stuck on how to do the check to see if the number already exists in the array. I tried generating a new rand() % 25 and comparing it with placeholders in the array and if it didn't exist put the new random number in there but it did not work.   void MultiU (){          int size = 5;          int array[5];         srand(time(0));          for (int index = 0; index < size; index++){            exists[index] = rand() %25;           }     }   I am new to programming with arrays and rand(). I hope someone can guide me in the right direction.


I know that the $E$ field inside a conductor is zero. What happens if I put a source of charge inside the conductor?  Say the conductor was spherical centered on the origin and there exists a charge at the origin.  Then by Gauss's Law, there exists a non zero field inside the conductor.  Or is it the case that even though this charge is within the sphere, it will redistribute evenly over the surface and hence the E field inside is zero?


I am having difficulty trying to center my navigation text on my page. I want all my links to be in the center of my page the whole time, even if I re-size my window. Thanks for your time.  HTML:

Home

About me

Portfolio

Talk to me

   CSS:  #navcont{     height: 80px;     background-color: #ebebeb;     width: 100%;     padding-top: 10px; } #navigation{     font-size: 15px;     font-family: "TYPOGRAPH PRO" arial; } #navigation ul li{     list-style:none;     display:inline-block;     background-color:red;     width:120px; } #navigation ul li a{     text-transform:uppercase;     text-decoration:none;     color:black; } #navigation ul li a:hover{     color:#217c7e; }


Obstruction to the splitness of an exact sequence of holomorphic vector bundles

This question was asked , but I think there will not be an answer, so let me recopy the question on Mathoverflow.  In the book of S. Kobayashi, hyperbolic complex spaces, there is the lemma (3.A.3) on the page 153, section Royden's extension lemma, whose statement is     Every exact sequence of holomorphic vector bundles $0\to E'\to E\to E''\to 0$ on a Stein manifold splits.   The author's argument is that the obstruction to a splitting lies in $H^1(X,\mathrm{Hom}(E'',E'))$ which is zero since $X$ is a Stein manifold.  Could someone explain what obstruction means and why it lies in this cohomology group? Thank you very much.


Prove that $f(x)$ is irreducible iff its reciprocal polynomial $f^*(x)$ is irreducible.

This is what I'm trying to prove:     Let $f(x)\in\mathbb{Q}[x]$ and $\deg(f(x))>1$. Prove that $f(x)$ is irreducible in $\mathbb{Q}[x]$ iff its reciprocal polynomial $f^*(x)$ is irreducible in $\mathbb{Q}[x]$.    Note: The reciprocal polynomial $f^*(x)=x^nf(1/x) \in \mathbb{Q}[x]$, where $n=\deg f$.   So my thoughts are to prove the contrapositive, i.e. $f^*(x)$ is reducible iff $f(x)$ is reducible.   So to prove the ($\Rightarrow$) direction I assume that $f^*(x)=g(x)h(x)$, so I get that $g(x)h(x)=x^nf(1/x)$ which implies $f(1/x)=(1/x^n)g(x)h(x)$. I want to say this somehow makes $f(x)$ reducible but I am unable to proceed as $f(1/x)\notin \mathbb{Q}[x] $. I thought about substituting $y=1/x$, which gives $f(y)=y^ng(1/y)h(1/y)$, but I am unable to show that this is irreducible in $\mathbb{Q}[y]$. If I could, then it would be irreducible in $\mathbb{Q}[x]$ since $\mathbb{Q}[y]\cong \mathbb{Q}[x]$   Any suggestions or hints will be appreciated.


In gravity, a particle mass $m$ is in linear motion on the x axis with a mass $M$ at the origin. Initially $v_0$ velocity and position $x_0$. After time delta T, what is the new position and velocity, $v_1$ and $x_1$? I have a degree in physics from 50 years ago and have forgotten how to solve this!


Can a hat be lost if its criteria no longer applies?

Several of the winterbash hats have criteria that are "non-binding," for example "Witticism" requires 5 upvoted questions.   If such a criteria no longer applies, such as an upvoted question or answer getting downvoted later and no longer qualifying for a hat, will the user keep the affected hat or will it no longer be available?


Difference between lexicon, vocabulary and dictionary

What exactly is the difference? Around the Web, I'm finding contradictory information and sometimes circular references.  Some say the lexicon is inherent to a language (objective) while a vocabulary is only relative to a (group of) person(s) (subjective). Wikipedia says the lexicon is the vocabulary of a language.  Dictionary should be an easy one, it's a mapping, either between languages or between words and word sense definitions. But some definitions of vocabulary seem to be equivalent to the latter.  Are there any clear formal definitions?


Should I write "a n-tuple" or "an n-tuple"

While writing a math paper, I have met many places to determine which indefinite articles should I use before a math symbol. Another example  is "a/an f-exceptional divisor", here f is a math symbol to denote a map.  Thank you for your advise!


How do I figure out who's been banished to the penalty box recently?

I don't know if schadenfreude would be an appropriate tag, but if it were, this question deserves it. Background I was strolling through [Meta] Stack Overflow today and had remembered that there was some discussion about who has been in the penalty box and how many times.  Well, I came up with an easy way to determine that (non-programmatically). I haven't sat down to make it into a Greasemonkey script, but I'm sure someone out there will. Who's been in the penalty box? To figure out who has been in the penalty box, type the following into Google:  site:stackoverflow.com/users/ This account is temporarily suspended.  This query has problems. It shows up every time Google spiders the page, so if it is spidered multiple times for the same infraction, it may appear to be multiple suspensions until you look at the time and date of the spidering of the page. Like so:  User XXXXX This period of suspension ends in 9 hours User XXXXX This period of suspention ends in 4 hours User XXXXX This period of suspension ends November 30  Question In the spirit of competition:   What ways could you programmatically determine which users are in the penalty box? How could you determine (accurately) how many times they've been there?   Rules  It must be a program (that includes scripts) It can be in any language It must accurately determine how often a user in in the penalty box (through methods such as grabbing the time/date stamp of the spidering, etc) It must not get someone banned from Stack Overflow (Nothing that scrapes every user on the site once a day) The information used to create the program must be publicly available Any solution should address this point forward. Extra points if you can accurately determine who's been in the penalty box in the past More rules will be added (or taken away) as needed. The answer with the 'best' method will be chosen (very subjective, I'm sure there are objective criteria for them, and much like Pornography, I'll know it when I see it)


Question: Let $A$ be $\{a,b,c\}$. Let the relation $R$ be $A \times A$ - $\{(a,a), (a,b), (b,b), (c,a)\}$ Which of the following statements about $R$ is true? a. $R$ is reflexive, is symmetric, and is transitive. b. $R$ is reflexive, is symmetric, and is not transitive. c. $R$ is not reflexive, is not symmetric, and is not transitive. d. $R$ is not reflexive, is symmetric, and is not transitive. e. $R$ is reflexive, is not symmetric, and is transitive. I understand why the relation is neither reflexive nor symmetric but as for whether it's not transitive I kind of understand why its not but cannot explain it.  For a relation to be transitive $(a R b) ∧ (b R z) → (a R z)$ but in the context of the question this becomes $(a R b) ∧ (b R b) → (a R b)$ however since I since I already used the ordered pair $(a R b)$ in the premise I understand I can't use it again so that being said how do I explain why it is not transitive?


how to fix error E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 2 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up mawk (1.3.3-17ubuntu3) ... update-alternatives: error: cannot stat file '/usr/bin/nodejs': Too many levels of symbolic links dpkg: error processing package mawk (--configure):  installed mawk package post-installation script subprocess returned error exit status 2 Setting up gawk (1:4.1.4+dfsg-1build1) ... update-alternatives: error: cannot stat file '/usr/bin/nodejs': Too many levels of symbolic links dpkg: error processing package gawk (--configure):  installed gawk package post-installation script subprocess returned error exit status 2 Errors were encountered while processing:  mawk  gawk E: Sub-process /usr/bin/dpkg returned an error code (1)


how to prove that $ \lim x_n^{y_n}=\lim x_n^{\lim y_n}$?

Let $(x_n)$ and $(y_n)$ be two sequences of real numbers, such that:  $\lim x_n = a > 0$ and $\lim y_n = b \in \mathbb R$  I need to prove that:  $$\lim \left( x_n ^{y_n} \right) = a^b$$  I tried using Cauchy's criterion:  $|x_n-a|<\epsilon$ and $|y_n-b|<\epsilon$, and then we need to prove that $\left| x_n ^{y_n} -a^b\right|<\epsilon$, but I didn't find a way of proving it.


I have post titles which begin with a price, eg: $199,900 - 123 Street. I am using the code below, and I'm unable to get the order by title ascending to work properly. Any suggestions please.  <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array(  'cat' =>21,  'posts_per_page' => 999999,  'paged' => $paged,  'orderby' => 'title',  'order' => 'ASC',  ); $the_query = new WP_Query($args); ?>
  <?php if ($the_query->have_posts()) : ?>  <?php while ($the_query->have_posts()): $the_query->the_post(); ?>         <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
                 <?php                 if (in_category('6')) {                 the_title();                 } else {                 ?>                  <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?>                 <?php                 }                 ?>

<?php the_post_thumbnail('thumbnail'); ?>

<?php the_excerpt(); ?>
                  <?php                 if (in_category('6')) {                 ?>
                 <?php                 } else {                 ?>  <a href="<?php the_permalink() ?>" rel="bookmark"> View Details
                 <?php                 }                 ?>
      <?php endwhile; wp_reset_postdata();?>  <?php else : ?>
Not Found

Sorry, but you are looking for something that isn't here.
     <?php get_search_form(); ?>  <?php endif; ?>


The high efficacy of the new drug is coupled with a lack of adverse effects that are typical for high-dose parenteral interferon administration.    Is it okay, or is it better to use of?     The high efficacy of the new drug is coupled with a lack of adverse effects that are typical of high-dose parenteral interferon administration.    I google for "effects typical of\for" and seem to find both variations:     Similarly, toxic side effects typical for systemic amphotericin B application as fever, chills, or nausea were not noted.       Sleep effects typical of SSRIs were greater with PAR 20 mg/day than CIT 20 mg/day, suggesting greater effects on 5HT uptake blockade   Is "for" better because it's "administration", not just "interferon"?


How to install grive tools on 16.04 or later

I see there are  for:   Utopic Vivid  Trusty   But none for Xenial or later. Despite the fact that the code is in python and bash.  Is the PPA auto build broken for it?  I cant find a way to drop a question on the PPA either even after login there...  Edit: as pointed by N0rbert,  is about grive, but the questioner's subject is not about it... that must be the reason I didnt find his answer in the 1st place. My question is objectively to the point (although his answer is better than my answer, the duplication is about the question, and my question is therefore not a duplicate).


Starting a job in a thread reads from queue from other thread

I have a problem that I can't figure out. It might not be easy to explain.  I have a singleton class with this private constructor:  private BarcodeMonitor() {     processors[Machines.H1] = new BarcodeProcessor { Queue = new BlockingQueue<BarcodeData>("H1") };     processors[Machines.H2] = new BarcodeProcessor { Queue = new BlockingQueue<BarcodeData>("H2") };     processors[Machines.M] = new BarcodeProcessor { Queue = new BlockingQueue<BarcodeData>("M") };     processors[Machines.HP] = new BarcodeProcessor { Queue = new BlockingQueue<BarcodeData>("HP") };      foreach (KeyValuePair<Machines, BarcodeProcessor> pair in processors)     {         Thread t = new Thread(t1 => pair.Value.StartProccesingQueue());         t.Name = pair.Key.ToString() + "Processor";         t.Start();         threads.Add(t);     } }   A new and unique BlockingQueue is given to the BarcodeProcessor and takes a name.   The BarcodeMonitor has this method:  public BlockingQueue<BarcodeData> GetQueue(Machines machine) {     var processor = processors[machine];     return processor.Queue; }   so that incoming barcodes are put in the queue of the right machine. This works fine.  The barcodes are dequeued in StartProccesingQueue() (of which 4 instances are running). In the dequeue method, I have:  System.Console.WriteLine(string.Format("Thread {0} is taking from queue {1}", Thread.CurrentThread.Name, name));   Dequeue() uses Monitor.Wait(_internalQueue) when the queue is empty. The Enqueue() uses Monitor.PulseAll(_internalQueue) to continue the waiting dequeue.  What is happening, is that the StartProccesingQueue() method takes from other queues, even though it just access that Queue property that is assigned with a new BlockingQueue. In fact, thus far, I've only seen items from queue "M" being taken, and only the H1 and H2 threads are doing it.  I really don't get why this is happening.


Shipping Labels not received for round trip courier service for UK Visa using VFS Global

I purchased the round-trip courier service through VFS Global. In the instructions, it states that you will receive in a separate email the shipping labels for this courier service. I receive Registration Details and Transaction Details only. No Shipping labels. I have called VFS Global in NY,NY and no human being access to ask questions, just an insane phone tree that does not answer my questions on how to get shipping labels that were never sent. I have called the British Consul in Atlanta and she could not answer my questions then transferred me to the same phone tree message that I receive through the British Consulate. I have sent emails to customercare@vfsglobal.com, info.vfsnewyork@vfsglobal.com, NYscanhub.escalate@vfsglobal.com, DLUKVInewyorksensitive@fco.gov.uk and I have received no response from anyone.  Frustrated. I do not know what to do. Please help me!!