I did a Java application that is launched by a key stored in the Windows registry. So, when i digit the key on the browser, it runs my application.  Key:  [HKEY_CLASSES_ROOT\Decoder] @="URL:Decoder Protocol" "URL Protocol"=""  [HKEY_CLASSES_ROOT\Decoder\Shell]  [HKEY_CLASSES_ROOT\Decoder\Shell\Open]  [HKEY_CLASSES_ROOT\Decoder\Shell\Open\command] @="C:\\Program Files\\Java\\jre1.8.0_73\\bin\\javaw.exe -jar \"C:\\Decoder\\dist\\Decoder.jar\" \"%1\""   Now i want to make my application run in macOS system but i can't because macOS doesn't have a registry like Windows.  I already tought about a way to do it and the only ideas I had are:   Create a Safari plug-in that is activated when I type a specific word; I found on Internet a discussion about plist files on macOS but i don't know how they work.   Is there a way to run my file through macOs browser?  Thanks in advance


Where can I enable custom fields in WP 4.9.?

I used to enable custom fields on a Page edit Admin screen, just clicking on "Screen Options" in the top right.  However on a recent 4.9.8 installation, in the screen options I see only "layout" and "enable full-height editor".  Am I missing something or has this functionality been removed from the default install?


How to integration by parts with Borel measure

How to do integration by parts when $\mu$ is a finite Borel measure. That this how to integrate by parts \begin{align} \int_0^\infty f(x) g(x) d\mu(x). \end{align}


Applying for a tourist UK visa without salary slips - I'm a freelancer. What can I use as proof of funds?

I want to apply for UK visa for a holiday. I am a freelancer working for 2 companies where I take up projects. Depending on the projects I am then paid.  I do not have the usual monthly salary slips. I am directly paid into my account after my project ends. For 1 company I take up monthly projects and the other is 2-3 times a year.  Will there be a problem in getting the visa because I don't have monthly salary slips?


Less than half of Facebook ad clicks are visible in Google Analytics

We have a website that we advertise via Facebook, but in Google Analytics only 30-50% of the clicks appear. (The page is not really public yet, so I cannot post a link here)   We already did several test runs and tried different optimizations. Unfortunately none of the optimization resulted in a massive change. (Optimizations like improving page load time, in particular loaded JS like jQuery assets via CDN, etc...)  Right now we have several hypotheses why this happens:   the page is hosted in Virginia, however the site is for Brazil, so latency might be too high in general it takes too long until the page appears, so people might close the page before it's fully loaded it's a one-page app, so it might be slow on old computers too much AJAX, in particular we use Facebook Connect people might use adblockers   We ruled out that Facebook gives us the wrong number of clicks, we already take the number of actual website clicks.  Benchmark results from webpagetest.org using São Paolo/Chrome/Cable:   Load time (First View: 3.9s-6.7s; Repeat View 1.9s-2.8s) First Byte (First View: 0.5s-1.6s; Repeat View 1s-2s) Start Render (First View: 2.3s-5.4s; Repeat View 1.4s-2.2s) Document Complete (First View: 3.9s-6.7s; Repeat View 2s-2.8s) Fully Complete (First View: 5s-8s; Repeat View 2.9s - 3.6s)   (Yesterday we changed the hosting provider, but I think the numbers before should have been similar.)  What could be the problem? To us it is very mysterious, we would assume that the click counts from Facebook would differ from Analytics' numbers by less than 5%. Seeing more than 50% of the users not reaching our website, makes us believe there is a single big problem that we are not aware of yet.


Let $f: A\rightarrow A$. Prove that if $(f ◦ g)$ is surjective, then $f$ is surjective.  We know that $(f ◦ g)$ is surjective, so that means that $\forall x\in A, \exists a$ such that $f(g(a)) = x$  Let $y = g(a) \in A$  $\implies f(y) = f(g(a)) = x$  $\implies \forall x\in A, \exists y$ such that $f(y) = x$  $\implies f$ is surjective  Is this proof correct?


Square Root Yields Different Result After Unit Conversion

This is boggling my mind.   The square root of 100 seconds is 10 seconds The square root of 100000 milliseconds is approximately 316.23 milliseconds 10 seconds does not approximately equal 316.23 milliseconds   Do I have a fundamental problem with my unit conversions or my ability to punch numbers on a calculator, or am I just not thinking through the problem with the right mindset?  The reasoning behind the question is that I made an incorrect prediction for the run time of an algorithm after I reduced its complexity. Previously, the algorithm had n operations and ran for 100 seconds, where n is the size of the input. Now, my algorithm has sqrt(n) operations. I predicted that the algorithm would run in 10 seconds, and was surprised when it ran in 0.375 seconds.   Note: For answering purposes, assume that the overhead time associated with running my program is negligible compared to the variable time it takes to run my algorithm. In other words, assume that the run-time is almost entirely dependent on the size of n, for any n of sufficient size.


How to include contents of file as verbatim?

How can I include the contents of a text file in my latex document as verbatim?  I tried (the text file does not contain any @)  \documentclass{article} \begin{document}        \verb@     \input{temp.txt}     @ \end{document}   but I get the error: \verb ended by end of line.   PS: of course the above cannot work even without the error, because if it worked the output file would just contain the single line \input{temp.txt}


In Schindler's List (1993), a woman says a story:  The trains arrived and the people were driven out with clubs. They were lined up in front of two big warehouses. One was marked "Cloak Room," and the other "Valuables." And there they were made to undress. A Jewish boy handed them pieces of string to tie their shoes together. They shaved their hair. They told them it was needed to make something special for U-boat crews. And then they were herded down a big corridor to bunkers with Stars of David on the doors and signs that said "Bath and  Inhalation Room."  Why "down a" instead of "down from"?


$\|T\|= \sup_{\| f\|=1} |\langle Tf,f \rangle|$ for complex Hilbert spaces

Let $H$ be a hilbert space over the complex numbers. Let $T:H\to H$ be a linear bounded operator prove that $$\| T\|= \sup_{\| f\|=1} |\langle Tf,f \rangle|.$$   Obviously $\sup_{\| f\|=1} |\langle Tf,f\rangle| \le \| T\|$ by C-S inequality. But how about the other inequality?


“Unable to Connect to World” Minecraft PE 1.16.201

So my brother and I have been playing Minecraft together on our iPads for years now, but in September I got a new iPad Pro 3rd Generation and I’ve been having issues with Minecraft ever since. Every time we have tried to join each other’s worlds we get the message “Unable to connect to world”. Recently after the update on December 16th, it worked for about a week without having any issues, but now it has gone back to not letting us connect to the worlds. Both of us are able to connect to other people’s worlds, but not each other’s, we’ve tried many things to fix this but so far nothing has worked. If you have any ideas for what we should do please let me know, thank you so much!


$f$ is a differentiable function such that $f(f(x)) = x$ for $x ∈ [0, 1]$. And $f(0) = 1$. What is the value of $\int_0^1{(x − f(x))^{2016}}dx$ ?  I have noticed that one solution of $f$ is $f(x) = 1-x$, then the integral can be easily evaluated. Can it be done without assuming $f(x) = 1-x$?


How are we supposed to derive formula for magnetic field density?

The formula for magnetic field density is B^2/2mu. How to prove it?


Time and again when I search for a topic on Google, Google returns me the results and also prints out some stats like  "Results 1 - 10 of about 8,850,000 for j2me. (0.24 seconds)"  I notice that the seconds taken by Google to serve the results are in fraction of a second range.  How does Google serve pages so fast, what kind of database optimization tricks has it used at its end?


I want to show that the number $\mu(n)$ of pairs of integers $(x,y)$ with $x^{2}+y^{2}<n$ satisfies $\mu(n)/n \rightarrow \pi $ as $n \rightarrow \infty$  If we consider the lattice $L=\mathbb{Z}<1,0>+\mathbb{Z}<0,1>$ and $X=\lbrace (x,y) \in \mathbb{Z}^{2}|x^{2}+y^{2}<n \rbrace$ from Minkowski's theorm we know that $X\cap L \neq \emptyset $ i want to know that is there any formula for $\mu(n)$? beacuse if we know the formula we can comput the limit.


While I understand the proof of the power rule for logarithms for positive integers, I can not prove them for fractional and negative powers. Also curious to know what would a proof for irrational powers look like?


jquery catch event from a generated element

I am getting data from AJAX to build a table.  This table will have a link to delete a row from the database.  I'm having trouble getting a listener to respond to a click on the generated content's "remove" link.   <input id="hidden-contrib-id" value="<?= $contribId ?>" />


How to re-sync photos from my iPhone to iCloud?

My iCloud storage got depleted because of my habit of never deleting photos. I’m on a free plan having 5GB of space and the iCloud reporting 4.7GB is taken by photos.  So, on my iPhone I’ve deleted several thousands photos and now on my phone I’ve got only 3GB of photos. But when I visit iCloud.com I can still see all those photos I've deleted.  How do I re-sync iCloud with what I’ve got on my phone?  I have an iPhone X with iOS version 13.1.2 on it (the latest one as per the time of writing). Most of the time I'm on a Wi-Fi connection (50mbps at home and 150mbps at work if that matters at all... I mean sync should be noticeable at the very least, it's not like 1 photo per minute).


What happens if a bounty is awarded automatically when there are 2 answers with an equal amount of upvotes?

From :     What happens if I feel my question is still unanswered? / What is automatic awarding?         24 hours after the end of the bounty period (once the grace period   ends), if the bounty starter has not manually awarded the bounty, the   bounty may be awarded automatically.      If the author offered the bounty, and accepted an answer that was   posted after the bounty was started, that answer is awarded the full   bounty.      Otherwise, either all or half of the bounty will be awarded to the   highest-scored answer among those which meet all of the following:         They were posted after the bounty was started, and   They have a score of at least 2 (at the time the automatic awarding takes place), and   They were not written by the bounty starter.         If the chosen answer was accepted by the question owner, it will   receive the full bounty. Otherwise, it will receive half the bounty.   If two eligible answers have the same score, the older answer is   chosen.      If no answer meets any of the above two criteria, the bounty is not   awarded to any answer, and is not refunded to the bounty starter.   But what happens if a bounty is awarded automatically when there are 2 (or more) answers with an equal amount of upvotes? In such a case there is no "highest-scored answer" but rather "highest-scored answers".


Number of continuously differentiable functions satisfying $f(x)>0$ and $f'(x)=f(f(x))$?

Number of continuously differentiable functions $f:\mathbb{R}\rightarrow \mathbb{R}$ satisfying $f(x)>0$ and $f'(x)=f(f(x))$ for all $x$ belonging to the set of real numbers are?


I cannot invite friends to my Minecraft realm that are using an iPad

I have purchased Minecraft Java Edition for my Dell PC.  I also purchased a monthly renewable subscription to Minecraft Realms for up to 10 players. Lastly, I setup a Microsoft XBox Live account which I understood is necessary to invite other players using other platforms/devices. My grandson has Minecraft on his iPAD.    We have a Microsoft family account and my grandson, daughter, and me are all on it. My grandson is only seven, but we set his security to allow him to communicate with friends, and accept gaming requests from friends. When we are both logged into XBox Live, we can now see each other as friends/followers.  When I go into my Realm and try to send an invite to my grandson, I get a message that says it cannot send an invite to the person that I typed in.  I am typing in his gametag. What am I doing incorrectly? Why can't I invite him into my realm so that we can play Minecraft together. It is supposed to be our grandpa/grandson bonding activity.


I am unable to understand that why do we have two ways to multiply two vectors? (viz. Dot product and cross product) How do we even know when to use which product? Is it analogous to anything with numbers? Do we multiply numbers in two ways?  Or is this concept of multiplication really just another unrelated independent operation unfortunately named multiplication due to lack of alphabet, maybe?  Basically, my question is why do we have two ways for multiplying vectors and how whoever thought of it, thought that we needed two ways?


How to copy files over the LAN with a cmd batch file?  I want when i execute the .bat to send my file from PCUSER1/Desktop to PCUSER2/DESKTOP?  How do I do that?


Ubuntu 18.04 disable tablet style slide up to unlock

Once the desktop locks due to inactivity, an overlay is displayed that must be "slid up" before being able to log in again.   I'd like do disable that overlay using any key press, or remove it entirely.


I've got this Integral to evaluate , a really messy one

$$ I=\displaystyle \int_{0}^{\infty} \dfrac{\sin (\pi x^{2})}{\sinh^{2} (\pi x)} ~\mathrm{d}x $$ Found this on the cover of a book called "Integral Kokeboken" written in some language that i've never seen and btw the ans is  $$ I=\dfrac{2-\sqrt{2}}{4}$$


Can I proof this identity somehow without using the Riemann integral?  I have tried Stolz–Cesàro Theorem and sums of valuations' progressions.


Change Time separator in the Screen Shot filename?

I managed to change screenshot names executing following command:  defaults write com.apple.screencapture name -string ""   So now file names are like:   2018-03-21 at 10.23.08 PM.png   I would prefer instead:   2018-03-21 at 10:23:08 PM.png   or:   2018-03-21 10:23:08 PM.png   or:   2018-03-21 22:23:08.png   Is it possible to change it?


How to remove the device name from the bash prompt?

Is it possible to remove the device name in my shell commands to "save space"?    My-MacBook-Pro:~ username$   to  ~ username$


How to remove completely stuck saddle post from frame

I am helping a friend fix his bike that he got for free. Everything went well, except that I cant raise the saddle. The seatpost is really stuck in the frame.   The clamp was easily removed. When I tried to turn the saddle only the saddle itself is turning, and the seatpost remained stuck. I tightened the saddle bracket as hard as I could, and I managed to turn the seat post a few millimeters back and forth. But somehow it is even more stuck now and I can't move it at all. I am afraid that I will bend/break the bracket in the seat if I tighten it anymore.   I tried with a pipe wrench and still couldn't twist it. Perhaps I will be able to if I have another person holding the bike so I have two hands for the wrench. I did manage to damage the surface of the seat post though.   I have a few questions:   How would a professional remove the seatpost? Why is it even stuck? Can this happen because of rust, or is it more likely because the previous owner hammered a 30.2mm seatpost into a frame meant for 30mm? I can see at the Wikipediaartikel () that both 29.6, 29.8, 30.0, 30.2 and 30.4mm are common sizes. As I don't have a precise caliper I can only tell you that it is approximately 30mm.  If it is because of rust, can I polish off the rust and use the same seatpost again? If so, should I polish the post or the internal part of the frame?


How do I combine multiple exposures for action shots?

I'd like to create one of those "stacked" action shot images where multiple exposures are combined to show the subject moving across a static background.   (by ):   Ideally, I'd like tips both for the photography part of this and for post-processing.  For example, I'd imagine I want to shoot manual w/ the same exposure for all shots (as with a panorama), but I'm not sure if there are any other helpful tips for taking the shots.  At one point, for example, I thought I'd have to tripod-mount the camera and keep the same framing for all shots, but I've now seen several examples where the composition moved from shot-to-shot.  I'm also interested in recommendations for post-processing -- software, technique, etc.  I can envision a manual process where I stack layers and align them by hand in Photoshop Express, but I'd be surprised if there wasn't a better way — maybe using a pano tool like Hugin.


So I am trying to argue that the set of points in $[0,1]$ which will not have $4$ in their decimal expansion has measure $0$. So I am thinking to construct a step function such that this set is a null set hence it will have measure $0$. But I am kind stuck in constructing such step functions, any hints?


Where did this ubiquitous phrase come from? Usually it is used in conjunction with either disputable of downright dubious information but I can't think of how salt helps the situation. The only thing I can think of is that since salt had a higher value in ancient times, that maybe the speaker is trying to almost bribe the recipient ("here is some info and here's some salt for your trouble") but I am just theorizing, take it with a grain of salt.


Can someone using the same DNS server as me hijack my domains?

When I register a new domain, I send it to my hosting provider by assigning it its domain name servers in the registar's settings. For example, with Digital Ocean, I input the following:  ns1.digitalocean.com ns2.digitalocean.com ns3.digitalocean.com   I then add the domain settings in the A record of my server. It just occurred to me that anyone else on the same hosting provider can add an A record with a domain I own.   Is there anything preventing this from occurring? if 2 different servers that use the same domain name server try to assign a domain to themselves through the A records, where would the domain actually resolve when you enter it in the browser? what prevents domain name collisions on the same DNS server?


PDF not displaying on Windows, looks okay on a Mac

I've come across a weird problem with exporting a PDF from InDesign file.  My collegue exported part of his design in InDesign (he works on Windows), this is a screen from the original file (taken on my Mac, but it looks the same on his PC):    This is a comparison of how the file looks on his PC and my Mac:    We both use the same export profile to preview our work, downscaling bitmaps a little, and converting whole thing to adobe RGB color profile. We use it to send lightweight files to our clients for proofing. It always worked fine until now.  I'm baffled. I've never seen PDF behaving like this before. If it was corrupted or damaged, it still produced the same results everywhere, I mean that's the point of PDF after all.  Can anyone explain what is happening?


Showing $e^\Omega = \sum_{n=1}^\infty \frac{\Omega^n}{n!}$ for non-diagonal matrix $\Omega$

Context. I am currently reading a Quantum Mechanics book in which it is stated that it is "obvious" (without proof) that $$ e^{(α Ω)} e^{(β Ω)} = e^{((α + β) Ω)} $$ where $\alpha, \beta \in \mathbb{C}$ and $\Omega$ is a square matrix of complex scalars, and $e^{\Omega}$ is defined as $$ e^\Omega = \sum_{n=\color{red}{0}}^\infty \frac{\Omega^n}{n!} $$ whenever $\lim_{n \to \infty} \Omega^n$ converges. Problem: I only know how to show this is true when $\Omega$ happens to be a diagonal matrix (in which case the matrix multiplication of $\Omega^n$ devolves to multiplication of the scalars $d_i^n$ along the diagonal of $\Omega$). How does one show this result holds in general, when $\Omega$ isn't necessarily diagonal?


Prove by induction. How do I prove $\sum\limits_{i=0}^n2^i=2^{n+1}-1$ with induction?

$\displaystyle\sum_{i=0}^n2^i=2^{n+1}-1$.  I don't understand induction so I could use some help.


List<String> nameList = new List<String>(); DropDownList ddl = new DropDownList();   List is populated here, then sorted:  nameList.Sort();   Now I need to drop it into the dropdownlist, which is where I'm having issues (using foreach):  foreach (string name in nameList){     ddl.Items.Add(new ListItem(nameList[name].ToString())); }   No workie - any suggestions? It's giving me compile errors:  Error - The best overloaded method match for 'System.Collections.Generic.List<string>.this[int]' has some invalid arguments   Error - Argument '1': cannot convert from 'string' to 'int'


What is the best alternative to iTunes 11 on OS X?

There are some old questions surrounding this topic, but the landscape has changed a bit in the last couple of years. I'm looking for some fresh answers.  Why I'm looking Over the years iTunes has become increasingly bloated without adding much of anything I care about. It looks a little slicker in some ways. Less usable in others. Like the iPhone, it's just not that exciting any more.  Where I'm looking I'm considering two primary alternatives ( or ) and one outlier (, whose future seems shaky to me).  What I've got I have a large-ish library of mostly AAC files (around 65 gigs). I have one iOS device (iPad, which I hardly use) and two Androids (an Android 2.3 phone and 4.3 tablet). I listen to my library mostly on my MacBook Pros (10.6 and 10.7). I have extensively rated, categorized, and tagged (via comments) my entire catalog and I use this data to create detailed playlists.  What I expect I'm looking for something that is focused on an ordered library and listening experience; maximizing compatibility and sound quality; and killer application performance. Integration with services like Last.fm (personal fave), Pandora, and Spotify is a plus.  What have you found? Has anyone here successfully made the break? Can you help those of us who long to escape the Apple ecosystem, even if only for a minute?  Bottom line Have you made the switch successfully? If so, what app did it for you and why and can you share your tips with the rest of us? Moving a music library around is a big effort and I would love to learn from your experience before diving in.


I'm building a program in a VM then deploying to another machine. This has been working for some time.  Today I've started receiving this error message when I attempt to execute my program:     /usr/lib/i386-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.19' not found   Both machines are running the same kernel version, and all packages are up to date:  $ uname -a Linux darwin7 3.8.0-23-generic #34-Ubuntu SMP Wed May 29 20:24:54 UTC 2013 i686 i686 i686 GNU/Linux   How might I investigate and repair this issue?


Get the position instead of the value of the highest one bit in integer

How do I get the position, rather than the value, of the highest one bit in integer? I know I can get the value like this:  // Prints 8; in 1101, the highest bit is the one denoting 8 int f = 13; System.out.println("Highest: " + Integer.highestOneBit(f));   However, I'd like to get position of the highest one bit - in this case, it would be 4 (since 1000 in binary == 8, the highest one bit is the fourth one).


Newbie developer on Ubuntu I use the Eiffel language  I tried a simple example of the EiffelWeb library based on cgi-bin  I added to apache2.conf the following lines  <Directory /usr/lib/cgi-bin/> Options ExecCGI Require all granted </Directory>  ScriptAlias "/cgi-bin/" "/usr/lib/cgi-bin/"   I have a simple Webpage with a button to execute a program (named web)  I copied the web binary to the /usr/lib/cgi-bin/ directory  Apache seems to find the web program but open a save dialog window  i get the message (in french sorry !)   I dont want to open the binary file web but to execute it  How to do that ?  The body section of the simple Webpage :       <form action="/cgi-bin/web" method="post" name="info">        <ul>          <input name="name" size="50">        </ul>        <input type="submit" value="Submit">      </form>   Thank you in advance


I am trying to convert a latlong point to UTM.   To define UTM projection, I need to calculate zone for the point.   I am trying to figure out the best way to do this.   One way to do this would be use longitude values to find the proper zone.   This would require lot of coding.   I am curious if there is a better way of doing this?


Why can't voltage in a capacitor change instantaneously?

The voltage-current equation in a capacitor is given as   $$I(t) = C\frac{dV}{dt}$$  Isn't $\frac{dV}{dt}$ by definition the instantaneous change in voltage with respect to time?  How does one show from this equation that voltage cannot change instantaneously?


Is there a set A s.t. $|\mathcal{P}(A)| = |\mathbb{N}|$?

In other words I am looking for a set that has countably infinite number of subsets.  I have a feeling it doesn't exist, but if so, how do I prove it?


Webshop for digital goods with voucher / gift card system

I'm searching for a webshop which provides the following:   The shop offers digital goods (like mp3) User can buy a voucher / gift card @Reseller (Or there is a code provided in the CD) User can enter his code @ webshop and gets the download (unregistered) User can enter his code @ webshop and download is added to his/her library (registered)   optional: Resellers can buy codes from the Webshop  I already tried prestashop as it looks quite nice. But it needs a lot of custom programming (and has a very strange voucher-system). Customer has to add the File into the basket and add the voucher at checkout. I want to skip that ;)  Is there a Webshop (Or CMS + Plugin) which provides the things I need? (it could also be a CMS with a Storage/Folder Plugin (like joomla + K2) and a possibility to activate downloads via unique Codes.)  Any ideas are highly appreciated :)  Thanks in advance.


Is the order of authors' names important?

I am trying to publish a paper based on my MSc. thesis in software engineering. I have considered myself, as the first name of the paper, and my supervisor as the second one, since I was the person behind everything. He was much concern about the structure of the thesis, and in scientific contribution, his share was something around %16.  But someone told me, a supervisor should always be the first name, because he has supervised the research. Is it true? But, i think it is not fair?  The questions are:  1- Does the order of authors' names convey some message?  2- Is it true that supervisor should be the first name?


Square root of $-1$ in the ring $\mathbb{R}[x]/\langle(x^2+1)^2\rangle$

Does there exist a square root of $-1$ in the ring $\mathbb{R}[x]/\langle(x^2+1)^2\rangle$?  Now, any element in the ring $\mathbb{R}[x]/\langle(x^2+1)^2\rangle$ is of the form $(a+ib)+e(c+id)$ where $i^2=-1$ and $e^2=0$. Now, setting $a=c=d=0$ and $b=1$, I think we would get a square of $-1$. Is this right? Any hints? Thanks beforehand.


Find all occurrences of a multi-line string between two defined tags in Python with Regex

I am trying to do something a bit unexpected. I want to parse a Python code in which some specific comment lines define a block of text or of code that I would like to extract. For this example, I will be using two types of tags, one for code, one for text description. #c print ("this is the tag I used for code I want to find") #-c  #d """This is the tag I used for a description I want to find""" #-d  Why am I tagging my code this way? Well, that's for another question. More details in  if you are interested. Now, I have been trying to catch those tags with regular expression, and as it's my first time using regex, I obviously didn't succeed... Here is my current attempt: file = 'script.py' with open(file, 'r') as f:     text = f.read()  text = read_python_script(file)  code_blocks = re.compile(r'(?s)(?<=#c\n)(.*\n)(?=#-c)') desc_blocks = re.compile(r'(?s)(?<=#d\n)(.*\n)(?=#-d)')  code = re.findall(code_blocks, text) desc = re.findall(desc_blocks, text)  Here is an example of a script I would like to parse: # -*- coding: utf-8 -*- """ Title: blablabla Author: Mathieu  Description: Report the some measurements """  import time import uuid  from database.model import TestLimit, TestResult from util import log  #d """ blablabla some description which might be multiline """ #-d # Constants #c CONSTANT_1 = 10     # Unit CONSTANT_2 = 2      # Unit #-c  class Foo(Fp):     def __init__(self, #some parameters):         # some init      def _run(self, #some parameters):         #%% Section Title 1         #%%% Sub section Title 1         #c         code I would like to catch         can be multiple liens         #-c                   with something.open():             #%%% Sub section title 2             #d             """some description I want to catch"""             #-d                          #c             some more code I want to catch             #-c  At the moment, I am getting only the first occurrence and I don't know why... EDIT: As mentioned, I should change my expression to a lazy format: r'(?s)(?<=#c\n)(.*?)(?=\n#-c)'  This doesn't completely solve the problem as I am still only catching the first occurence.


appending zeros to make number of 10 digit

I know it is a simple question and I know the way to do it, only need of mine here is Performance and with less time as possible it should do.  I am getting input as   long l = 149;   I want to make this number of size 10 with additional numbers to be added at starting to make it of 10 digit. above number should get converted to,     0000000149.   Similarly,  1      -> 0000000001 13     -> 0000000013 888888 -> 0000888888   1. I tried with loop, like checking number length, subtracting number length by 10, then adding number of zero as the subtraction result i got.  2 Already created array like  arr[0, 00, 000, 0000, 00000, 000000, 0000000, 00000000, 000000000, 0000000000];   here I am doing same thing, subtracting my number length with 10 and getting arr[numberLenth -10] + number  I am getting desired result.  I want to make sure to check is there any better solution to this like using bitwise operator for such requirement?  Thanks


Is there a way to mount back a USB stick that is once ejected, without physically detaching it and then plugging it in?  It was a live-usb of Linux Mint 14 in it, if it helps.


Linear Algebra: maximum determinant of $3 \times 3$ matrix of $1$s and $-1$s is $4$

Can anybody help me understand why the statement in the title is true? I've understood why it cannot by $6$ or $5$ through the formula of a $3 \times 3$ determinant, but I'm failing to understand why it can be $4$. Thanks!


How to I make Cisco WebEx work with 13.10 64bit?

I'm having a very hard time getting webex to work under Saucy.  Up until now I've been able to just install a java plugin, install ia32-libs, and I was good to go.  With Saucy ia32-libs is gone and it's up to us to figure out which 32-bit libraries we need to install.    So the question is, how do I install WebEx on 64bit Saucy without ia32-libs?


Regex which will match all words in string

Can you please suggest a regex code that will select all words. Basically everything between whitespaces   Example-string('This is a man's world') I need to match-'This' 'is' 'a' 'man\s' 'world'


I have imported an stl file to blender and its separate objects I can`t figure  out how to deselect the objects.  I have tried all the selection and deselection option s  The file was made on 123D this is the STL file I imported to blender and I want to un-group the highlighted objects any suggestion thanks?


Creating fractals (mandelbrot set) using math nodes

I'm new to blender and I use hp elitebook 9470m which has i5 processor, recently I tried to make fractals on a single plane using script node which is basically only available in cycles render engine(using osl). When I tried to render a 180 frames of animation each frame took about 6 minutes to render, I searched for other ways. I realized that we can even do it in shader editor using math nodes. But I'm stuck at the usage of nodes and it's iterations  Can anyone help me how to complete this in which we can even zoom into fractals (I think iterations may require many nodes, but I seriously need this)


Have been searching all over the internet on how to to remove Windows 10 from dual boot but all i get is answers that are not very clear to me on what to do.I have been using Ubuntu for like 5 months now and my Windows 10 is having glitches,that's why i'd like to uninstall it,without deleting files like music,pictures and videos.Also is there some other ways if i dont have a bootable CD? Am using an Acer Aspire V5. Kindly help me out.Thank you.


A couple of sites have messed up formatting

I see some SE sites moving to the new format, such as MSE, and this appears to work on my desktop and mobile. Most of the others are on the old format, which again works well on desktop, and is passable on mobile.  However, a couple of sites do weird things. Outdoors is especially strange - I assume it has some messed up formatting. See here - there is no nav bar, right hand column, no review link, etc:    I have turned off Ghostery and Scriptsafe blocking temporarily, the SE chat extension makes no difference, and I am running no scripts under TamperMonkey. It's an up-to-date Windows 10 install.  By comparison, here is how my machine renders MSE.  New layout, but all working (even if I don't quite like it as much as the earlier version...):


Show that this set of polynomials is ideal in F[x]

In $\mathbb{F}[x]$, where $\mathbb{F}$ is a ﬁeld, let $J$ be the set of elements of polynomials that have coefficients that add to zero (so $a_0 + a_1 + ... + a_n = 0$). Show that $J$ is an ideal of $\mathbb{F}[x]$. I know that the proof of this statement is meant to be very short, but I don't know how to go about it.


Let $T \in L(V,W)$ where $L(V,W)$ denotes the set of linear maps from $V$ to $W$. Prove that $ \text {(null}~T^*)^\perp \subseteq \text{range}~T $ where $T^*$ is the adjoint operator ( not related to the adjoint matrix) and $A^\perp $ refers to the orthogonal complement of $A$. Reference source is linear algebra done right by sheldon axler  Attempt: Let $w_2 \in \text{(null}~T^*)^\perp$.  Our aim is to show that $\exists v \in V$ such that $Tv=w_2$.  We can express $W = \text {null} ~T ~\oplus~\text{(null}~T^*)^\perp$. Thus, Let $w = w_1+w_2$ where $w_1 \in \text {null} ~T$.  $T^*(w)=T^*(w_2)=v$ for some $v \in V$     If we somehow prove that $<(Tv-w_2),~(Tv-w_2)>=0$, then we are done   But expanding the above seems to make it only more complicated.  Any ideas on how to move ahead? I have browsed through similar questions and tried to employ similar techniques but in vain.  Thanks a lot!


If $\sum a_n$ converges where $a_n \ge 0 \; \forall \; n \in \Bbb N$, then $\{n a_n\}$ converges or diverges?

I was asked this question in a PhD interview. They didn't say whether $a_n$ is non-increasing or strictly decreasing. I tried various examples such as $a_n=\frac 1{n^p}$ where $p \gt 1$, $a_n=\frac 1{n^2 \ln n}$. Then $n a_n \to 0$.  I couldn't answer this question then.  But when I saw Robert Israel's answer to  question, motivated from it, I defined a sequence $a_n$ as below :  $ a_n = \begin{cases} \frac 1n,  & \text{if $n$ is a power of 2} \\ 0, & \text{otherwise.} \end{cases}$  Here, $\sum a_n=\frac 12+ \frac 14+ \frac 18+ \cdots =\frac {\frac 12}{1 -\frac 12}=1$ and $\{n a_n\}$ diverges, because there are infinitely many terms of $0$ and $1$ in it. i.e.  $n a_n = \begin{cases} 1,  & \text{if $n$ is a power of 2} \\ 0, & \text{otherwise.} \end{cases}$  So $\{na_n\}$ converges in some cases and diverges in some cases. Am I right?  Note : I have gone through these posts, ,,  too but they have some extra conditions or specific details.  Thanks.


Remove a value from a nested list not working

My college assignment so far looks like this:  data = [[1,2,3], [4,5,6], [7,8,9]] cout = [[]]*3 for i in range(len(data)):     for j in range(len(data[i])):         check = data[i][j]         print(check)         if data[i][j] % 2 == 0:             cout[i].append(data[i][j])        print(cout)   and its output was      [[2, 4, 6, 8], [2, 4, 6, 8], [2, 4, 6, 8]]   but i want it to be      [[2], [4, 6], [8]]   thanks in advance


Would you help me with using combined adjectives and it's shortened of them?

They are 15-year-old girls  They are 15-year-olds  Are both of them the same and correct? if so, could anybody possibly kindly tell me when would you rather use which one?


How to add home directory path to be discovered by Unix which command?

I have installed node.js at custom location and added the location to the $PATH in .profile file.  $ node --version v0.6.2 $ which node $ echo $PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:~/Unix/homebrew/bin $ cat ~/.profile export  PATH="$PATH:~/Unix/homebrew/bin"   Node.js itself runs well. The problem is it is not listed by which command. So I can't install npm now. Because npm install cannot find the location of node.js. How can I make the node binary discovered by which?


We currently have a Java EE system where we are mapping to our database using JPA. It is a fairly well developed system with about 20 entities.  We now have been ordered to use Views for everything. Eg: if we have a table called PERMISSION then we also need a view called PERMISSION_VIEW. Basically we need to do this to every table, and our applications can only access the data by querying the view.  Now all our entity beans look like this :  @Entity @Table(name = "PERMISSION") @NamedQueries({         @NamedQuery(name = "Permission.findByPK", query = "SELECT p FROM Permission p WHERE p.dpNum = :dpNumber"),         @NamedQuery(name = "Permission.deleteAll", query = "DELETE FROM Permission") }) public class Permission implements Serializable {  }    Firstly, how is it possible to update tables if you are only allowed to use Views. Can Materialised Views work for this? Secondly, how much rewriting is going to be needed, if we can only use Views? Eg. For each entiry we will need to write @Table(name = "PERMISSION_VIEW"), to describe the entity, BUT, when doing an update it needs to do that to the PERMISSION table. How on earth do you consolidate this in an entity bean?


How to combine two different textures into one

After applying to a small studio and making a model of an axe with two pieces which meant separate UV maps. After submitting the model and textures, I was told that both the blade and handle of the Axe should be in one texture. I don't really know how to do this in Blender, so any help would be appreciated.


Additive group of rationals has no minimal generating set

In a comment to Arturo Magidin's answer to , Jack Schmidt says that the additive group of the rationals has no minimal generating set.     Why does $(\mathbb{Q},+)$ have no minimal generating set?


What is the intended use of drupal_static?

I understand Drupal static cache is used to store static values in the memory for the length of the request to faster access them. However throughout Drupal and contributed modules I tend to see two different versions:  Example from :  function drupal_is_front_page() {   // Use the advanced drupal_static() pattern, since this is called very often.   static $drupal_static_fast;   if (!isset($drupal_static_fast)) {     $drupal_static_fast['is_front_page'] = &drupal_static(__FUNCTION__);   }   $is_front_page = &$drupal_static_fast['is_front_page'];    if (!isset($is_front_page)) {     // As drupal_path_initialize updates $_GET['q'] with the 'site_frontpage' path,     // we can check it against the 'site_frontpage' variable.     $is_front_page = ($_GET['q'] == variable_get('site_frontpage', 'node'));   }    return $is_front_page; }   They way I read (and used) it from some tutorial I once found:  $static_cache = &drupal_static(__FUNCTION__); if (!isset($static_cache[$key])) {   // Obtain value   $static_cache[$key] = $obtained_value; }  return $static_cache[$key];   So I skipped the static declaration of the local variable, and to be honest I don't see why I should be adding it, it is in the first line of :  function &drupal_static($name, $default_value = NULL, $reset = FALSE) {   static $data = array(), $default = array();   // First check if dealing with a previously defined static variable.   if (isset($data[$name]) || array_key_exists($name, $data)) {     // Non-NULL $name and both $data[$name] and $default[$name] statics exist.     if ($reset) {       // Reset pre-existing static variable to its default value.       $data[$name] = $default[$name];     }     return $data[$name];   }   ... }   Is is even faster if I declare another static variable in my module to hold a function that manages a static variable? (The name drupal_static_fast implies this.) Is this some old Drupal 6 convention where there was no drupal_static and it had to be declared locally? Or am I missing something else?


I'm proofing a story, and at one point, as it is written at the moment, one the characters exclaims:     Prepare to die you fool!   Should there be comma after "die"?


How to minimize $\sum_{i=1}^p (y_i-x_i)^2$ with constraints $\sum_{i=1}^p y_i - 1 =0$ and $\forall i=\overline{1,p}:-y_i \le 0$?

Let $x = (x_1,\ldots,x_p) \in \mathbb R^p$. I'm solving the constrained optimization problem     $$\begin{align*} \text{min} &\quad \sum_{i=1}^p (y_i-x_i)^2 \\ \text{s.t} &\quad \sum_{i=1}^p y_i - 1 &&=0\\            &\quad\forall  i = \overline{1,p}: -y_i &&\le 0  \end{align*}$$   My attempt:  Let $f(y) = \sum_{i=1}^p (y_i-x_i)^2$, $h(y) = \sum_{i=1}^p y_i - 1$, and $g_i(y) = -y_i$ for all $i = \overline{1,p}$.  We have $f,g_i$ are convex and $h$ is linear. Let $\alpha =(1/p, \cdots, 1/p)$. Then $h(\alpha)=0$ and $g(\alpha) <0$ for all $i = \overline{1,p}$. It follows that Slater's condition is satisfied. By Karush-Kuhn-Tucker conditions, we have $$\begin{aligned} \begin{cases} \forall i = \overline{1,p}:\mu_i &\ge 0 \\ \forall i = \overline{1,p}: g_i(y) &\le 0\\ h(y) &=0 \\ \forall i = \overline{1,p}:\mu_i g_i(y)&=0 \\ \nabla f (y)+ \lambda\nabla h (y)+ \mu_i \nabla g_i (y) &=0 \end{cases} &\iff \begin{cases} \forall i = \overline{1,p}:\mu_i &\ge 0 \\ \forall i = \overline{1,p}:-y_i &\le 0\\ \sum_{i=1}^p y_i - 1&=0 \\ \forall i = \overline{1,p}: -\mu_i y_i &=0 \\ \forall i = \overline{1,p}: 2(y_i - x_i) +\lambda - \mu_i &= 0 \end{cases} \\ \end{aligned}$$  Then I'm stuck at solving the last system of equations.  How can I proceed to solve it? Thank you so much!


How to make my server email me when there are security updates?

There's obviously a way to check to see when an update is a security update. I often get greeted by a motd that says "there are N security updates."  What I'd like to do is have my server email me a list of what packages need updating for security reasons.   To take it a step further, the email would link to the applicable security notification from Ubuntu.  Basically, each server is somewhat unique. I've received several emails on the security mailing list for packages I do not have install on any/all servers. So I'd like each individual server to tell me what it needs. That way I can apply updates in a timely manner, while avoiding restarting services like Apache that would cause users to have some downtime.  How could I do this?


How to add defer="defer" tag in plugin javascripts?

I couldn't add defer tag in plugin javascripts. Google developer pagespeed test suggests me to add defer tag in contact form 7 javascripts.   This is how contact form 7 includes javascript in header.  add_action( 'wp_enqueue_scripts', 'wpcf7_enqueue_scripts' );  function wpcf7_enqueue_scripts() {     // jquery.form.js originally bundled with WordPress is out of date and deprecated     // so we need to deregister it and re-register the latest one     wp_deregister_script( 'jquery-form' );     wp_register_script( 'jquery-form', wpcf7_plugin_url( 'jquery.form.js' ),         array( 'jquery' ), '2.52', true );      $in_footer = true;     if ( 'header' === WPCF7_LOAD_JS )         $in_footer = false;      wp_enqueue_script( 'contact-form-7', wpcf7_plugin_url( 'scripts.js' ),         array( 'jquery', 'jquery-form' ), WPCF7_VERSION, $in_footer );      do_action( 'wpcf7_enqueue_scripts' ); }   Now how to add defer="defer" tag in the above code?


I want to create a new linux distro with customized name,customized wallpaper,customized packages etc.Can i do it keeping ubuntu 14.04 as base and installing packages etc on it.  Also i have successfully created a livecd using ubuntu uck but when it boots it shows ubuntu photos while installing operating system.  I want my customized photos should be displayed while installing my created operating system.  I know its kind of weard but appreciate if someone can help me... : )  Regards


New Ubuntu, combining two separate primary partitions

As you can see in the below screenshot, my partitions are essentially empty.     I just installed Ubuntu today, I had created a brand new partition to support my Ubuntu OS. However, after it successfully partitioned itself my Windows 7 partition no longer works at all. At this point I do not care about restoring my Windows 7 OS, I just want to combine my much larger currently unallocated partition of +600GB with my new Ubuntu partition. I have installed GParted and read other forums on the issue. However, whenever I try what they have suggested (as far as I can tell) resize/move only adjusts the size of the current partition. It has nothing to do with combining two separate partitions (which are both primary). Many other suggestions wanted me to delete the partition with the file system on it. I can't do that because that is the file system that I am currently using so it won't let me delete it.   I can't think of what to do. I am seriously worried that I have ruined my computer.


Mapping of categorical features into binary indicator features

I am currently reading an introductory machine learning book by Daumé () and when discussing the mapping of categorical features with "n" possible values into "n" binary indicator features, the following question is proposed:     Is it a good idea to map a categorical feature with n values to log2(n) binary features?   Why wouldn't that be the case, seeing as how much resources could be spared by working with fewer features? Does this approach depend on the model that is being used?


I've found a bunch of tutorials on how to make this work on Open GL 1 & 1.1 but I can't find it for 2.0.   I would work it out by loading the texture and use a matrix on the vertex shader to move through the sprite sheet.   I'm looking for the most efficient way to do it. I've read that when you do the thing I'm proposing you are constantly changing the VBO's and that that is not good.   Edit: Been doing some research myself. Came upon this two  and referring to the one before . I can't use PBO's since i'm using ES version of OpenGL so I suppose the best way is to make FBO's but, what I still don't get, is if I should create a Sprite atlas/batch and make a FBO/loadtexture for each frame of if I should load every frame into the buffer and change just de texture directions.


Im still very new to blender and would like to know how i can do this i cant seem to find any options for it.


What is the difference between passing arguments in Java and Python?

I come from Java and C++, and now I'm learning Python with  tutorial.  To the best of my knowledge, in Java arguments are passed by value. It seems that they are passed by reference, because when the argument is an object, we pass the reference of the object. So, if inside the called function we change the object state, the object will result modified even after the function call. But, if inside the function we reassign the function parameter we are changing the referenced object, which means that from that point the function's argument will not be affected anymore.  A simple example:  void foo(List<Integer> l){   l.append(1);  //affecting list_argument   l = new ArrayList<int>();   l.append(2);  //not affecting list_argument }  public static void main(String[] args){   List<Integer> list_argument = new ArrayList<Integer>();   foo(list_argument); //passing list_argument's reference by value   //list_argument contains 1 only }   Now, I'm reading  article about passing arguments in Python. In the article, it refers to a fancy name strategy called "passing by object", but to me it seems exactly the mechanism that I described above.  So, my question is: is there any difference the passing argument strategy between Python and Java?


Force fsck at boot time on the root file system (prior to mounting file systems, without Single-User mode)

- does not mean anything.  Setting fsck_y_enable="YES" and background_fsck="NO" in /etc/rc.conf don't do anything.  My root file system is not clean and has a lot of errors (due to a power outage - unexpected shutdown, not because hard drive or hardware are bad).  fsck shows errors:  root@host2:/usr/home/alex # fsck ** /dev/mirror/gm0p2 (NO WRITE) ** Last Mounted on / ** Root file system ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts UNREF FILE I=8268305  OWNER=root MODE=140777 SIZE=0 MTIME=Jun  6 21:58 2014 CLEAR? no   [skipped 100+ lines]  I don't have physical or KVM access to the server. This is gmirrored drive  FreeBSD host2.domain.tld 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64  # Device                Mountpoint      FStype  Options Dump    Pass# /dev/mirror/gm0p2       /               ufs     rw      1       1 /dev/mirror/gm0p3       none            swap    sw      0       0


java.util.ConcurrentModificationException on loading list of data on firebase

I'm trying to load data from firebase  here is how  i load the data      mUser = new ArrayList<>();     reference1 = FirebaseDatabase.getInstance().getReference("USERS");     reference1.addValueEventListener(new ValueEventListener() {         @Override         public void onDataChange(@NonNull DataSnapshot dataSnapshot) {              mUser.clear();             for (DataSnapshot snapshot :dataSnapshot.getChildren()){                 User user = snapshot.getValue(User.class);                 for (ChatList chatList : userList){                     if (user.getId().equals(chatList.getId())){                         mUser.add(user);                     }                 }             }              adapter = new ChatAdapter(getContext(),mUser);             recyclerViewchat.setAdapter(adapter);         }   but i got this error when  I try to run it, I get ConcurrentModificationException, can anyone explain why it happens, even if the code is running in same thread? And how could I avoid it?  10-05 16:24:14.521 24692-24692/com.example.sy.infosys_ips E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.example.sy.infosys_ips, PID: 24692     java.util.ConcurrentModificationException         at java.util.ArrayList$ArrayListIterator.next(ArrayList.java:573)         at com.example.sy.infosys_ips.Chat.ChatFragment$2.onDataChange(ChatFragment.java:102)         at com.google.android.gms.internal.firebase_database.zzfc.zza(Unknown Source)         at com.google.android.gms.internal.firebase_database.zzgx.zzdr(Unknown Source)         at com.google.android.gms.internal.firebase_database.zzhd.run(Unknown Source)         at android.os.Handler.handleCallback(Handler.java:739)         at android.os.Handler.dispatchMessage(Handler.java:95)         at android.os.Looper.loop(Looper.java:148)         at android.app.ActivityThread.main(ActivityThread.java:7325)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)


Ubuntu 14.04: very slow UI in Oracle VirtualBox

Short summary: 14.04 is much slower than 12.04 even with more RAM assigned.  I'm using latest VirtualBox 4.3.10 on Mavericks 10.9.2. How can I make it faster?


How to add MySQL to $PATH variable to resolve "mysql: command not found"?

I installed MySQL on my Mac, and now I would like to add it to my $PATH variable. I want to be able to type mysql anywhere.  I tried adding the following to my .profile file:  export PATH=${PATH}/usr/local/mysql/bin/   I have restarted my Terminal but it does not do the trick. It still says: -bash: mysql: command not found.  How can I add this properly to my $PATH?  I am using OS X Yosemite.


Why are sum-of-products implementations more popular than product-of-sums implementations?

In my book about circuit design (Fundamentals of Digital Logic with VHDL from Stephen Brown and Zvonko Vranesic), the writers always prefer a sum-of-product for representing and implementing simple circuits.  In Boolean Algebra, this preference is used as well, but I think mostly because writing sum-of-products is just easier and shorter. And maybe easier to understand for readers.  But when implementing using logic gates I would suppose other considerations than these are made as well. Like costs and delays of the gates.  So, is there a specific reason why preferably sum-of-products implementations are made? F.e. are AND-gates cheaper than OR-gates? I read about the transistor realisation of these gates, but I can't recall such a statement.


Non-discrete valuation rings of Krull dimension 1

This seems like an elementary question but a quick Google search did not yield an answer. I know that noetherian valuation rings are discrete and that discrete valuation rings have Krull dimension 1, but I'd like to know an example of a non-discrete (necessarily non-noetherian) valuation ring with Krull dimension 1. Or an explanation why such a ring cannot exist.


Updating a field programmatically, hook_node_update

Currently trying to update a field every time a node is created or updated. However the value is not being populated within the node, do I have access to the node object with this particular hook? What could I be missing?    function vbtoken_node_update($node) {         entity_get_controller('node')->resetCache(array($node->nid));         $types = node_type_get_types(); //What are the current Node Content Types?       $yes = ($types['volunteer_project']->type);        if($node->type === $yes){           $hash = md5($node->title . $node->nid . $node->nid);         $hashed = substr($hash, 0, 6);         $node = node_load($node->nid);         $node->tcode[$node->language][0]['value'] = $hashed;         node_save($node);          watchdog('vbtoken', 'Added a new Token code to %nid', array('%nid' => $node->nid));          }         else          {           dpm('not working dude');         }      }


Field Calculate unique ID, based on another column, overriding FID / Object ID order

I have a couple thousand polygons across several hundred towns.  I want the polygons within each town be labelled as such - first 3 letters of town name + _ + incrementing ID, so that they might look like this:  Ale_01 Ale_02 Bur_01 Bur_02   And so on.    Using the Python Parser of the Field Calculator, I have tried using an augmented version of the standard ID incrementing script floating around (pasted below):  prev_town = ""  rec=0  def autoIncrement(%Town%):   global rec  global prev_town  if town != prev_town:   rec = 0   pStart = 1    pInterval = 1   if (rec == 0):     rec = pStart    else:     rec += pInterval    id = town[0:3] + "_" + str(rec).zfill(2)  return id   The problem is that, the records within and across towns, were added at different times (i.e. Bur_01 was added before Ale_02), so that even after sorting by town, when applying the above script, I can get repeat ID (Ale_01 twice) due to the fact that the field calculator is applied in the order of ObjectID, and it doesn't (of course) keep track of previous IDs.  So, I have tried to augment the above code like so:  prev_town = "" rec=0  ids = [] id = "" def autoIncrement(town):   global prev_town  global rec  global ids  global id  if town != prev_town:   rec = 0  pStart = 1    pInterval = 1   if (rec == 0):     rec = pStart    else:     rec += pInterval  id = town[0:3] + "_" + str(rec).zfill(2)  while( id in ids):   if town != prev_town:    rec = 0   pStart = 1     pInterval = 1    if (rec == 0):      rec = pStart     else:      rec += pInterval   id = town[0:3] + "_" + str(rec).zfill(2)  ids.append(id)  return id   But, this seems to hang and never complete - so I can't even tell if it is working or not....  Also, this data layer is a feature service, so I am trying to do this on a local replica and sync back - that of course brings with it its own limitations.  Any suggestions?


Why doesn't The Flash catch fire due to air friction?

What protects The Flash from air friction? At the speed at which he moves, he should be affected by air friction.


Add attribute/element to existing javascript array

I have a JavaScript object   const categories = Object.keys(titles);   that looks like this  ["scifi","horror","comedy"]   I want to add "drama" to the object. I've tried   categories['drama'];    but that doesn't work. How can I add another category to this categories object?


I am using smarty template system on my website.  When it tries to cache some data, a fatal error occurs:  Fatal error: Smarty error: unable to write to $compile_dir '/var/www/html/cache/frontend'. Be sure $compile_dir is writable by the web server user. in /var/www/html/include/smarty/libs/Smarty.class.php on line 1092   I just get my vps today (Centos 7) and made basic LAMP setup.  I have uploaded all the content inside /var/www/html using sftp (root user). Then I have (still using filezilla) set /var/www/html/cache and all it's files/subdirectories to 777.  Whatever I try I can't get apache it to write on the cache folder or subfolder.  And the strange thing is that when doing   [root@localhost ~]# chmod -R 0777 /var/www/html/cache   the cache folder is still set to 2777.  I have also tried to make "apache" as the owner of /var/www/html/cache and all it's files/subdirectories but I still can't write on it.  I am completly lost and very newbie when it comes to server setup.  Any help would be appreciated, thank you.


As space expands, does this not imply that time also expands?

According to General Relativity, space and time are aspects / dimensions of a unified whole. If the speed at which wave energy travels through spacetime is constant, $c$, then as distance expands, should not time expand by corresponding amount? If so, then would 1 Plank time from Plank Epoch, be something like ~1 picosecond in today's space-time?


Basic circuit to keep LED either on or off depending on night/day

How can I have a LED either on or off (not in between) depending on night or day with basic electronics? I have created the circuit below, but it only shines and in darkness it dims.    The photo-resistor is about 3kΩ when light shines and about 1MΩ when dark.  I want my LED to shine at night and be off at day.  What is the simplest way I can achieve this?


Is it right to tell        Five years ago he already knew that two plus two equals four.      or        Five years ago he already knew that two plus two equaled four.      ?  On English classes (I live in not English speaking country) we have learnt that if present clause is dependent to past one than it turns into past. However, I did not fully agree with it and gave (the top sentence above as) an example. It caused a lot of confusion.  In my country's official pre-university English exams (one of the previous years' variants) there is a text with tasks. One of the sentences is:  Nurse believed that fresh air and food ____ very important in fighting soldiers' diseases. A. are B. were ...   I was really surprised when I discovered that the right answer is B. were.  My logic is: when nurse dies, it won't become unimportant. That's why A. are should be right.  Could someone please help figuring it out?


What are some scenarios where FTL information transfer would violate causality?

I've always heard people saying, "Faster than light information transfer can't happen because it would violate causality!  Effects can precede their causes!"  However, I'm trying to think of a situation where this would happen.  I'm sure it has something to do with relativity or something like that.  I sort of understand that people going faster perceive time slower.  Can someone help illuminate this for me by showing a scenario where causality is clearly violated due to FTL information transfer?


Java inner class (Implementing Single Linked List)

In the following code    why "Node head" is kept outside the inner class node?   Since Node class is defined after writing "Node head", does it create any problem?   why is the inner class defined as static?  class LinkedList{     Node head;  // head of list  /* Linked list Node.  This inner class is made static so that    main() can access it */ static class Node {     int data;     Node next;     Node(int d)  { data = d;  next=null; } // Constructor }


How can we find the last two and three digits of $7^{754}$?  I tried with the binomial expansion and all but i don't seem to reach anywhere with it.  Is there any other way too?


I'm making a plugin were i want to get the min and max value of a raster. When i tried the following code in the qgis python console it worked fine but in my plugin code i get the following error   ver = provider.hasStatistics(1, QgsRasterBandStats.All)  NameError: global name 'QgsRasterBandStats' is not defined   The code i m using is:      layer = self.iface.activeLayer()     renderer = layer.renderer()     provider = layer.dataProvider()     extent = layer.extent()      ver = provider.hasStatistics(1, QgsRasterBandStats.All)      stats = provider.bandStatistics(1, QgsRasterBandStats.All,extent, 0)      minum= stats.minimumValue     maxim = stats.maximumValue      self.dlg.lineEdit.addItems(minum)      self.dlg.lineEdit_2.addItems(maxim)       It look like QgsRasterBandStats isn't included in my python plugin. How can i include this?


Finding the sum of the infinite series $\sum_{k=2}^{\infty} \frac 1 {k^2-1}$

Edit: Thanks for the help everyone. Turns out I was just making an arithmetic error. Whoops!  Question answered  I've got this infinite series which starts at k=2   $$\sum_{k=2}^{\infty} \frac 1 {k^2-1}$$     I thought this series might be telescoping, so I decomposed it to: 1/2(k-1) - 1/2(k+1). Then I wrote out partial sums and found that after k=4, terms begin to cancel.   Then I summed up the parts that don't cancel and got the sum = 7/12.   However according to wolfram, the sum is 3/4. I don't understand what I'm missing.   If following my work in text form is confusing, I will gladly write it out and upload a picture.


Toddler putting small stones in her mouth thinking it's funny

My 1.5-year-old has recently started putting small stones (the size of hazelnuts) in her mouth when we are outdoors, which of course can be very dangerous.   I have tried everything I could think of to prevent any unfortunate accidents:    reacted quickly to take the stone out with a finger - it worked the first few times, but now she keeps her mouth tight and tries to escape (which in turn worries me because she could accidentally choke while she struggles) in a serious tone told her to spit the stone in normal voice tone told her that mommy doesn't want her to put stones in her mouth asked her if she was hungry and offered her something to eat (the idea being: you put stuff in your mouth if you want to eat them) tried to distract her / ignore her action   She sees it as a game and laughs and runs around with the stone in her mouth. This happens almost every time we are outdoors playing, which is every day. If I do manage to take the stone out, she would put in another one 30 seconds later.   My question is: how to best handle this situation? Both in terms of prevention (if possible), and once she has the stone in her mouth.  Note: she is generally not putting other things in her mouth that are not edible. Before this "stone game", she had a "let's taste the sand" phase, which was far less dangerous.


Give an incentive for finding duplicate questions

At present if you see a question that may be a duplicate and has an easy answer you can post the answers or post a link to the duplicate question.  (Or the few hi-rep users can vote to close it as duplicate, think of normal users here, not the people that read Meta) It is better for Stack Overflow if a link to the duplicate is posted as a comment, or the user votes to close the question as a duplicate.  However, the user gets more rep if he/she posts the easy answer quickly. I'm thinking of something along the lines of:  First person to post a comment that points to possible duplicate gets some rep if the question is closed as a duplicate and at least 2 of the other closers chose that same dupe question.  Whenever someone votes to close as a duplicate, a “possible duplicate” comment should be posted with a link to the other question, if there is not already a link to it in a comments.  (The system now does this)    As Ether said,  The removal of reputation earned from answering a question that is later closed as a duplicate would at least remove the negative incentive, but is that enough to correct this behaviour? Is a “duplicate finder” badge part of the solution?  A bronze badge for being the first person to vote to close a question as a duplicate with the same “duplicate of” question chosen as most closers choose. A silver badge for doing the same 25 times.  See also  , would also help.  Now that the duplicate can be marked by the OP as helpful, we have another trigger to consider for awarding badges and/or rep.


red circle with white x on all drives on all pcs

This happened a few days ago, i have three computers running windows 10 pro x64 1903 and all drives, even new ones added, usbs, iphones all have these x's on them seen in the picture. but it happened on all three computers at the same time. i tried clearing the icon cache which would deleted all the files but that did not fix the issue.


I have Fedora 24 installed on my PC. I am also running a Docker container for development. Each time I try to access https://twitter.com I can't and I get this error:     This site can’t be reached      This site on the company, organization or school intranet has the same   URL as an external website.       Try contacting your system administrator. ERR_ICANN_NAME_COLLISION   After some research I am not able to find a solution. So I followed some steps in order to help you help me back:   Ping twitter.com from terminal:  $ ping twitter.com PING twitter.com.dev (127.0.53.53) 56(84) bytes of data. 64 bytes from 127.0.53.53 (127.0.53.53): icmp_seq=1 ttl=64 time=0.064 ms 64 bytes from 127.0.53.53 (127.0.53.53): icmp_seq=2 ttl=64 time=0.252 ms 64 bytes from 127.0.53.53 (127.0.53.53): icmp_seq=3 ttl=64 time=0.069 ms    Wait a minute? Response from twitter.com.dev and IP 127.0.53.53 what that hell? How can this be possible? Ok, let's try to figure it out:   Check /etc/hosts in the Fedora Workstation:  $ cat /etc/hosts 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 #172.19.0.2 rperez.dev => This is a test using Docker container internal IP address #192.168.1.66 rperez.dev => This is a test using Fedora Workstation IP address 127.0.0.1   rperez.dev => This is another test using "localhost" which work as well    No luck, nothing is pointing to twitter.com.dev so nothing is redirecting me. Keep going:   Check /etc/hosts on the Docker container:  # cat /etc/hosts  127.0.0.1   localhost ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters 192.168.1.66    dockerhost 172.19.0.2  e59b9797ae06    No luck, nothing is pointing to twitter.com.dev. At this point I am out of ideas on what to check or what to fix.   The funny part is that I can access to Internet and navigate to any other site like Gmail, Microsoft, Google, News sites and so on but Twitter.   Other people at office are able to access Twitter. The difference? They are using DHCP I am not, I have setup my IP to be static.  $ cat /etc/sysconfig/network-scripts/ifcfg-enp0s31f6  HWADDR=C8:5B:76:1A:8E:55 TYPE=Ethernet BOOTPROTO=none DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=no IPV6_AUTOCONF=no IPV6_DEFROUTE=no IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=enp0s31f6 UUID=0af812a3-ac8e-32a0-887d-10884872d6c7 ONBOOT=yes DNS1=8.8.8.8 DNS2=8.8.4.4 IPADDR=192.168.1.66 PREFIX=24 GATEWAY=192.168.1.1 IPV6_PEERDNS=no IPV6_PEERROUTES=no   Any advice? If you need anything else from my side to give me an idea or clue, let me know and I will add it.  UPDATE  I am running the test above from work but I have tried from home and I got the same issue I believe is related to this"       I will wait and if that's the issue I will delete the post


My driveway (see picture) has developed potholes that are so deep that the high parts can hit the bottom of the car!  My driveway is a dirt driveway with crushed blacktop on top. Also, it is very steep in the section that has potholes. So I think that if I were to just fill the potholes with dirt, the next rain would wash them right out.  Any suggestions on the right approach to fix this problem?  My question is similar to , but my driveway is already shaped correctly to guide the rain water. I would like to figure out how to fill the potholes with dirt and at the same time get the dirt to adhere to the bottom of the pothole.  Thank you in advance!


Election modeling : How is this a valid approach?

With the recent US presidential election, there seems to be a plethora of election "modelers" (e.g. ).  Given their "accuracy" of predicting the election outcome, I have come up with a couple of criticisms of what I perceive to be deficiencies in election modeling.    To have a valid computational model (e.g. in the physical sciences), one must do extensive validation.  This means comparing your model to known physical cases with known outcomes.  Without validation, computational models are irrelevant because there is no measure of either their accuracy or precision.  Since demographics change and elections are held only once, this seems particularly challenging to election modeling. The election is held once with a binary outcome.  There is no way to measure the outcome of the election more than once.  It is unclear how one can attach a "chance of winning" to a single measurement of the state of the system and interpreting what relevance that even has.     QUESTION : Given the lack of validation, how is modeling elections (like 538 does) a valid approach?  Likewise given that elections are held only once, how is the percent "chance of winning" supposed to be interpreted?


Is there a way to get a visa to mainland China in Taipei (Taiwan)?

I have a EU passport, I'm in Hong Kong now.  I want to go to Taiwan.  After Taiwan I want to go to mainland China. How can I get a visa for mainland while in Taiwan?


When I upload my work on ShareLatex, what are the privacy obligation of this online Tex editor? I mean what if my work get stolen or lost from this online editor?


I know you can change the uuid if you choose, but if left alone does it remain the same.  Specifically I'm upgrading my motherboard but am unsure if I'll need to alter my fstab with new uuids or if all that information will remain the same.


Is it true that a dihedral group is nonabelian?  I'm not sure if the result is true. I checked it for some lower order and I think the result may correct.   But I failed to prove/disprove the result.


Basically I with my team are figuring out a way to block screenshots taken on our corporation's computers (Mac mostly). I have searched it extensively and found that there is something called Screen buffer which is being accessed by any screenshot taking software (eg. Snipping Tool etc). I tried to find the exact mechanism and the actual implementation of such softwares but with no luck. Also I found out that Netflix uses some kind of technology which corrupts screenshot image and blackens it. I did not find any actual mechanism or implementation to study it further. I also came across something called Hardware overlays but did not understand it properly in order to use it for actual implementation. I have considered a way to edit scancode maps in registry but I am looking for a more general way. I read a few articles for apple's FPS though. Can somebody please guide me through this? Some good resources for the same would be highly appreciated. Any particular or relevant forums or subs to discuss this are also welcome


What is the literary device that describes phrases like "faithfully unfaithful"?

I came across a Wikipedia page a few months ago that described a literary device that had two opposite words side by side in a sentence.  Unlike an oxymoron ("horribly kind", "run slow"), this page described words that were almost identical, but one word was the "un" of the other word. For example:   She was faithfully unfaithful to him   It is still a type of oxymoron, but I know the word I was thinking of to describe them that I read on the Wiki page was different.   Note: I'm not thinking of a tautology either. In the sentence above, "faithfully" adds more context to the unfaithful - she was faithful to her unfaithfulness.


Prove the divergence of the sequence $\left\{ \sin(n) \right\}_{n=1}^{\infty}$.

I am looking for nice ways of proving the divergence of the sequence $\left\{x_n\right\}_{n=1}^{\infty}$ defined by $$x_n=\sin{(n)}.$$ One (not so nice) way is to construct two subsequences: one where the indexes are picked such that they lie in the intervals  $$I_k=\left(\dfrac{\pi}{6}+2\pi(k-1),\dfrac{5\pi}{6}+2\pi(k-1)\right)$$ and one where they lie in $$J_k=\left(\dfrac{7\pi}{6}+2\pi(k-1),\dfrac{11\pi}{6}+2\pi(k-1)\right).$$ If ${x_n}$ converges, then all its subsequences must converge to the same limit, but here the first subsequence has all its values in the interval $\left[ \frac{1}{2}, 1\right]$ while the second has its values in $\left[-1,-\frac{1}{2}\right]$. Contradiction.  Filling the details of this proof is rather tedious and not very elegant. Anyone has a better idea?


How do I find the equation of the circle, given the points (0,2) (3,3) (7,1)

Please just explain it in the simplest way. Thank you! Show also the answer you've come up with.


Is it possible for a view to have two outputs

The reason I need this because I create a view to search through document and need two outputs. One being the document and the other being the files are part of the document group the file is associated with.  *Is this possible with one exposed filter   Thanks for any help with this


Changing default download manager in android 10

I have an android phone running android 10 and i want to set ADM as default downloader to download files from chrome or any other browser is there a way to do the same , by android settings or adm settings My device is rooted using Magisk


Attempt to invoke virtual method 'void android.app.Activity.setTitle(int)' on a null object reference

Good day,  I am having the problem said in the title when app runs on a tablet. My intention as shown in the layout is to show to the right, an empty framelayout the first time user enters the app so nothing is displayed. So far so good.  Then user clicks on an item of the listview on the left pane, so its detail is displayed on the right pane. This is well captured in the listener in the Activity below that triggers the else part, and tries to add the FragmentDetail programatically, that has its corresponding layout.   @Override public void onItemSelected(Uri wifi) {     mWifi = wifi;     if (wifi != null)     {         if (!mDualFragments)         {             Intent intent = new Intent(this, DetailActivity.class);             intent.setData(wifi);             startActivity(intent);         }         else         {             // add fragment programmatically to the framelayout             FragmentDetail fd = new FragmentDetail();             getFragmentManager()                     .beginTransaction()                     .add(R.id.mFragment_detail, fd)                     .commit();             fd.updateFragmentDetail(wifi, true);         }     } }   Then, the following method in FragmentDetail is called, and the error occurs in the setTitle getActivity(). Looks that the error is in the FragmentTransaction in the caller activity.      public void updateFragmentDetail(Uri wifi, boolean dualFragments)     {     mCurrentWifiUri = wifi;     mDualFragments = dualFragments;     if (mCurrentWifiUri != null)     {         getActivity().setTitle(R.string.title_editor_activity);         if (!dualFragments)         {             getLoaderManager().initLoader(EXISTING_WIFI_LOADER, null, this);         }         else         {             getLoaderManager().restartLoader(EXISTING_WIFI_LOADER, null, this);         }     } }   This is the Layout for tablet  <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:baselineAligned="false" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:context="eu.javimar.wirelessvlc.MainActivity" tools:showIn="@layout/activity_main">  <fragment     android:id="@+id/mFragment_list"     android:layout_weight="30"     android:layout_width="0px"     android:layout_height="match_parent"     class="eu.javimar.wirelessvlc.view.FragmentList" />  <FrameLayout     android:id="@+id/mFragment_detail"     android:layout_weight="70"     android:layout_width="0px"     android:layout_height="match_parent">     <TextView         android:layout_height="wrap_content"         android:layout_width="match_parent"         android:gravity="center"         android:layout_gravity="center_vertical"         android:layout_margin="16dp"         android:textSize="25sp"         android:text="Empty View, Click on a Wi-Fi" /> </FrameLayout>     Thanks!  UPDATE I am confused. How is this related to a NPE Q&A as the one you mention @gabe-sechan?  I know this is a NPE issue and that getActivity() is creating it. But this is solely an issue related to FragmentTransactions,  asynchronicity, and that it won't be attached to the Activity, as well answered by @mike-m.  Perhaps I'm missing something?


I'm attempting to run this zsh script: #!/bin/zsh  paths=(     "/docs/" )  for path in $paths; do     dirsearch.py -u "http://10.129.140.251:8080$path" \         -r --csv-report="$(date +"%Y_%m_%d_%H_%M")_$path.csv"     sleep(300) done  When I attempt to run it I get these errors: ./dirsearch.sh:8: command not found: date ./dirsearch.sh:8: command not found: dirsearch.py ./dirsearch.sh:10: unknown file attribute: 3                                             Steps performed so far:  Verified that the folder which dirsearch.py is located in is added to path: export PATH=/home/user/targets/dirsearch:$PATH   Verified that I am using zsh as my current shell  Ran date and dirsearch.py commands without error from various locations on the pc.  Googled the issue.  Most solutions point to a path configuration error, but I don't see how mine is missconfigured.


I have Ubuntu 16.04 on Dell Vostro 15. I want to install kinemaster on my pc. Can somebody suggest a fast and easy way ? I know it can be installed on Andriod, but can it be installed on an Ubuntu (linux) pc. If yes, please suggest a way


Different vertical alignment of text in 4-column table (tabularx)

I'm newbie in TeX, so I've decided to ask for some help.   I'm working on technical documentation for my job and I need to create a 4-column table, where text in first two columns top-aligned and centered horizontally, last two aligned with last string of second column. But I can't achieve this.   I've tried this:   and this:   But the closest result which I able to obtain is:    So, last three columns is OK, first one - not, it should be top-aligned.  I was successful to overcome this by usage of \multirow environment, but it's should be implemented individually to rows. If' I'll do this for long tables - it'll make me insane. I want one fixed style in preamble, if it's possible.  Here is my table in main body:      %russian technichal standart documentation class      \documentclass[russian, 14pt, utf8, columnsxxiv, columnxxxi, columnxxxii, pointsection, hpadding = 10mm]{eskdtext}       %%%For working of eskdx, also cyrillic      \usepackage{xecyr}       %%%set TNR as main font      \setmainfont[Mapping=tex-text]{Times New Roman}       %%%Additional position options      \usepackage{float}       %%%advanced tables      \usepackage{tabularx}      \newcolumntype{Y}{>{\centering\arraybackslash}X}            \newcolumntype{d}{>{\centering}b{.25\textwidth}}      \newcolumntype{s}{>{\centering}b{.1\textwidth}}      \newcolumntype{a}{>{\centering}p{.25\textwidth}}       %%%redefine command for № -symbol, because eskdx quite old package      \renewcommand{\No}{\textnumero}       \begin{document}       \begin{table}[H]      \label{appA}      \begin{tabularx}{\textwidth}{a|d|s|Y}      \hline       Наименование & Основные технические данные & Кол., шт. & Примечание  \\       \hline      text text text text text text text & text text text text text text text text text text& {1} & text  \\       \end{tabularx}       \end{table}       \end{document}   I'll appreciate any help!


Can you grab the ID of an object within an accordion?

I have a 'Tour' object with multiple 'Steps' associated to it through a master-detail relationship. I display the 'Steps' with an accordion that queries all of them based on the currentRecordId. I want to have a 'Delete' button for each step within the accordion and onclick it would take in the step.Id and delete that step from the database. My JS file works as needed right now, but I'd like to be able to delete from within the accordion. @AuraEnabled(cacheable=true) public static List<Step__c> getSteps(Id tourId){     return [SELECT Id, Name FROM Step__c WHERE Tour__c =: tourId]; }  @AuraEnabled public static void deleteStep(Id stepId){     List<Step__c> steps = [SELECT Id FROM Step__c WHERE Id =: stepId];     delete steps; }  Example Html: <lightning-accordion allow-multiple-sections-open>     <template if:true={steps.data}>         <template for:each={steps.data} for:item="step">             <lightning-button label="Delete" variant="destructive" onclick={deleteStep}></lightningbutton>             <!-- Code to grab {step.Id} and give it to Javascript that calls Apex function to delete -->         </template>     </template </lightning-acordion>  Example JS: deleteStep(){     deleteStep({stepId: accordionStepId}) //something like this     .then(result => {         this.message = 'it worked';     })     .catch(error => {         this.error = 'is this even possible';     }); }


Can I disable auto-correction of a single word on OS X?

I'm running into an annoying issue with OS X's automatic spelling correction where the word nala gets automatically corrected to napa.  I've tried adding nala to my custom dictionary under ~/Library/Spelling/LocalDictionary but it still reliably makes the correction anyway.  How do I configure OS X to not automatically correct a given word short of turning off automatic correction entirely which is not really desirable?


How to avoid italic for "th"? in the early 20$^{th}$ century   How to avoid italic font and just "20th"?


GRUB Failing to Boot to graphical interface

First time install. Have attempted to install UBUNTU 14.04 server version from a USB key a couple of times now. After installation it would appear the Grub boot process fails and the screen goes into "Out of range" mode. I have read a few posts about this problem, have attempted to follow these recommendations, all without any success. Getting a little frustrated, that I appear to have installed everything, but the boot process is letting me down. What can I do to get a vanilla version of Ubuntu running with the LAMP stack? Are there alternatives to the GRUB boot loader, so I can get this install up and running?


I am editing a translation of a book on Colossians. Should the sub-heading be 'A discussion of Colossians 1:1-23, or on Colossians 1:1-23?


jQuery - how to attach handlers to elements which don't exist yet?

I've just encountered a problem in jQuery. I didn't find a solution which was posted already, if there is one, i apologize for my mistake.  I have this DOM:

 user

user

user

user

user

user

 user

 user

 user

user

 user

 user

user

user

user

                                                             It is loaded via AJAX from another file. The problem I've encountered is the following. Here is my JS:  $(document).ready(function () {      function reloadUsers(query) {         $.ajax({             url: 'getLoginUsersAjax.php',             type: 'GET',             data: {query: query},             success: function (data) {                 $('.usersCardAjaxContainer').empty().html(data);             }         });     }      $(".sidebarElement span").click(function() {        console.log($(this).parent().attr("id"));     })      reloadUsers("");  });   This didn't work, i think because the elements are loaded via AJAX and aren't here yet when the click is parsed or whatever, i don't know how jQuery works internally. My workaround for that was to put the click even into the success branch of the ajax, like this:  success: function (data) {     $('.usersCardAjaxContainer').empty().html(data);      $(".sidebarElement span").click(function() {         console.log($(this).parent().attr("id"));     }) }   It works, but seems wrong to me. I've looked for other functions or methods which can do that, but i only found live which is deprecated since jQuery 1.7. Is there anything else i can use or will i have to stick with this workaround?


What is meant by "obfuscate by pretending"?

I came accross the following sentence:  "Politicians obfuscate by pretending that the world would be the same if it weren't for the Cold War."  What is the meaning of obfuscate by pretending and how does it relate to the rest of the sentence?  The way I understood it: politicans are aware that the world would not be the same if it weren't for the Cold War, but are (due to unknown or suspected reasons) not willing to admit this and therefore pretend otherwise.


How did Harry remove the Philosopher's Stone from the Mirror of Erised?

‘How did I get the Stone out of the Mirror?’   ‘Ah, now, I’m glad you asked me that. It was one of my more brilliant ideas, and between you and me, that’s saying something. You see, only one who wanted to find the Stone – find it, but not use it – would be able to get it, otherwise they’d just see themselves making gold or drinking Elixir of Life.’   Philosopher's Stone - page 217 - Bloomsbury - chapter seventeen, The Man With Two Faces - Harry talking with Dumbledore   Dumbledore doesn't directly answer Harry's question, but rather describes under what circumstances a person could collect the Philosopher's Stone from the mirror. Did Harry have to do anything to retrieve the stone, such as reach into the mirror and take it? If not, what kind of magic could have removed the stone from the mirror and put it into Harry's possession?  A canon-based answer is preferred, such as the books, interviews with J.K. Rowling, or info from Pottermore, but subjective answers within the spirit of canon are welcome.


Can I enter Canada in October 2019 with a passport that expires in February 2020?

Can I enter Canada from the US in October 2019 with my US passport that expires in February 2020?  I can not find specific requirements since the new rules were implemented. A link or website address for where the information can be found would be very helpful.


Can I multiclass to a class I only meet the requirements of due to a magic item?

Say I have a level 18 bard and want to take the last two levels in paladin. Unfortunately my strength score is only 8, ruling me out. Fortunately a friendly fighter has a belt of hill-giant strength. If I borrow this and attune to this I have a strength score of 21, plenty enough to multiclass to paladin.  My question is this: RAW would the above situation work: can I multiclass to a class I only meet the requirements of due to a magic item?   Bonus points for what happens should I lose attunement.


Is it possible for an encryption method to exist which is impossible to crack, even using quantum computers?

Quantum computers are known to be able to crack  a broad range of cryptographic algorithms which were previously thought to be solvable only by resources increasing exponentially with the bit size of the key. An example for that is .  But, as far I know, not all problems fall into this category. On , we can read     Researchers have developed a computer algorithm that doesn’t solve problems but instead creates them for the purpose of evaluating quantum computers.   Can we still expect a new cryptographic algorithm which will be hard to crack using even a quantum computer? For clarity: the question refers to specifically to the design of new algorithms.


After I read a bunch of LINQ related stuff, I suddenly realized that no articles introduce how to write asynchronous LINQ query.   Suppose we use LINQ to SQL, below statement is clear. However, if the SQL database responds slowly, then the thread using this block of code would be hindered.  var result = from item in Products where item.Price > 3 select item.Name; foreach (var name in result) {     Console.WriteLine(name); }   Seems that current LINQ query spec doesn't provide support to this.  Is there any way to do asynchronous programming LINQ? It works like there is a callback  notification when results are ready to use without any blocking delay on I/O.


How long has Talos been on Earth impersonating this character?

During the end credit scene of Spider-Man: Far from Home, we see that,      Nick Fury and Maria Hill are two Skrulls, Talos and (presumably) his wife.   And we also see that,      Nick Fury is in a spaceship like structure, presumably away from Earth.   So that begs the question,      How long has Talos been impersonating Nick Fury? Is it since the events of Captain Marvel or since Avengers: Endgame or sometime in between?


Windows 10 wallpaper background (Spring)

I saw this lovely photo on my windows 10 lock screen but I couldn't figure out its location. Clicking the "like what you see" button in the top right corner of the screen does not provide me any locational information. Please forgive me if this is a duplicate post.  Also: sorry for the low quality photo. For some reason, my computer wouldn't allow me to take a screenshot of the picture, so I had to use my phone.  Edit: This was marked as a duplicate. However, the post that supposedly had the answer to my question does not answer my question whatsoever. Again, clicking the "Like what you see?" button does not solve my problem. Also, clicking the "Spring means a flowering of new movie releases" does not give me any information about the image.


Exporting functions from a DLL with dllexport

I'd like a simple example of exporting a function from a C++ Windows DLL.  I'd like to see the header, the .cpp file, and the .def file (if absolutely required).  I'd like the exported name to be undecorated. I'd like to use the most standard calling convention (__stdcall?). I'd like the use __declspec(dllexport) and not have to use a .def file.  For example:    //header   extern "C"   {    __declspec(dllexport) int __stdcall foo(long bar);   }    //cpp   int __stdcall foo(long bar)   {     return 0;   }   I'm trying to avoid the linker added underscores and/or numbers (byte counts?) to the name.   I'm OK with not supporting dllimport and dllexport using the same header. I don't want any information about exporting C++ class methods, just c-style global functions.  UPDATE  Not including the calling convention (and using extern "C") gives me the export names as I like, but what does that mean? Is whatever default calling convention I'm getting what pinvoke (.NET), declare (vb6), and GetProcAddress would expect? (I guess for GetProcAddress it would depend on the function pointer the caller created).  I want this DLL to be used without a header file, so I don't really need the a lot of the fancy #defines to make the header usable by a caller.  I'm OK with an answer being that I have to use a *.def file.


Phrasal verb "see to" conflicting with passive voice

We saw Peter drive away.   Turned into passive:     Peter was seen to drive away.   I don't agree with this, because the meaning would be entirely different- in my limited understanding. What's making me unsure is that this is on an educational curriculum book, whose creators would surely be more proficient at English than me. We all make mistakes, so is the sentence correct?  The alternative which I suggest:      Peter was seen driving away.   The other question doesn't adress my problem. The sentence is indeed grammatically correct, but I'm saying the meaning changes because it would cause a confusion with the phrasal verb (or idiom- I might be mixing them up) "see to". I want someone to confirm or deny my arguement. Here:


Problem with dependencis where try to install virtualbox5.1

I know that it should be easy, but I'm new in Ubuntu, so please help:  sudo dpkg -i virtualbox-5.1_5.1.10-112026-Ubuntu-yakkety_amd64.deb  Wybieranie wcześniej niewybranego pakietu virtualbox-5.1. (Odczytywanie bazy danych ... 301555 plików i katalogów obecnie zainstalowanych.) Przygotowywanie do rozpakowania pakietu virtualbox-5.1_5.1.10-112026-Ubuntu-yakkety_amd64.deb ... Rozpakowywanie pakietu virtualbox-5.1 (5.1.10-112026~Ubuntu~yakkety) ... dpkg: problemy z zależnościami uniemożliwiają skonfigurowanie pakietu virtualbox-5.1:  virtualbox-5.1 zależy od libqt5core5a (>= 5.6.0~beta); jednakże:   Wersją libqt5core5a:amd64 w systemie jest 5.5.1+dfsg-16ubuntu7.2.  virtualbox-5.1 zależy od libqt5widgets5 (>= 5.6.0~beta); jednakże:   Wersją libqt5widgets5:amd64 w systemie jest 5.5.1+dfsg-16ubuntu7.2.  virtualbox-5.1 zależy od libqt5x11extras5 (>= 5.6.0); jednakże:   Wersją libqt5x11extras5:amd64 w systemie jest 5.5.1-3build1.  dpkg: błąd przetwarzania pakietu virtualbox-5.1 (--install):  problemy z zależnościami - pozostawianie nieskonfigurowanego Przetwarzanie wyzwalaczy pakietu systemd (229-4ubuntu12)... Przetwarzanie wyzwalaczy pakietu ureadahead (0.100.0-19)... ureadahead will be reprofiled on next reboot Przetwarzanie wyzwalaczy pakietu gnome-menus (3.13.3-6ubuntu3.1)... Przetwarzanie wyzwalaczy pakietu bamfdaemon (0.5.3~bzr0+16.04.20160824-0ubuntu1)... Rebuilding /usr/share/applications/bamf-2.index... Przetwarzanie wyzwalaczy pakietu desktop-file-utils (0.22-1ubuntu5)... Przetwarzanie wyzwalaczy pakietu mime-support (3.59ubuntu1)... Przetwarzanie wyzwalaczy pakietu hicolor-icon-theme (0.15-0ubuntu1)... Przetwarzanie wyzwalaczy pakietu shared-mime-info (1.5-2ubuntu0.1)... Wystąpiły błędy podczas przetwarzania:  virtualbox-5.1   Ubuntu 16.04


Does the dpi number reported by camera in JPG have any meaning?

I have two cameras, a 6mpix Panasonic FZ8, and 14mpix Canon A2200.  When I compare shots from two cameras, one of differences I notice is dpi number that camera reports in JPG info:   FZ8 reports dpi=72 A2200 reports dpi=180   What physical meaning can these numbers have? I am at loss for guesses.    I am fairly familiar with notion of dpi in scanning and printing. I can calculate density of pixels on the sensor of the camera. But then, the linear density of pixels on the sensor will be hundreds times larger than number above. So what, if anything, does it mean?


Movie about a blue-blooded alien princess, sent to Earth for safekeeping

The movie was about a girl who seemed normal, she had a brother (I think they were twins but not sure). She gets sick or is injured and is taken to the hospital. They take blood from her and it turns out to be blue.   Eventually, it is revealed that she is an alien princess and was brought to Earth for safe keeping and is not related to her family. In the end, she leaves and goes back to her planet. It's kind of an old movie, from around the 90's.   Also, I think there was an elderly woman (might be her neighbour or grandmother), who was also an alien and was her protector.


Showing that the set of $2 \times 2$ real orthogonal matrices has a particular parameterization

Theorem Every orthogonal matrix in $\mathbb{R}^{2, 2}$ is in the form   \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}   or   \begin{bmatrix} \cos\theta & \sin\theta \\ \sin\theta & -\cos\theta \end{bmatrix}   I am able to prove that $$\mathbf{M} = \begin{bmatrix}      a & \pm b \\      b & \pm a     \end{bmatrix},     |\operatorname{det}(\mathbf{M})|     = |a^2 \pm b^2|     = 1,$$ but I don't know how to continue.


Grant Anonymous access on SharePoint 2013 site

I'm using the SharePoint 2013 of the new office 365, and I'm experiencing some troubles to grant access to the anonymous users to the website.  I want to make the SharePoint site public like if it was a public facing website.  I've tried Site permissions under site settings but the option in the ribbon is missing.  I want the two SharePoint sites bellow behaving the same way without the login window.     Does anyone know how to activate anonymous access?  Thanks in advance


keframe error: no suitable context info for active keying set

I am trying to animate Minecraft with a rig, but every time I press I, or G, it comes up with the error message. no suitable context info for active keying set  Why, and how do I fix this so I can animate?


Why is $\cos(x)$ the derivative of $\sin(x)$?

The derivative of $\sin(x)$ is $\cos(x)$, and the derivative of $\cos(x)$ is $-\sin(x)$. Is there a simple proof of this, preferably using pictures?


Why is green the default solder mask color?

Solder masks can be had in many different colors. I have personally gotten white, black, red, and blue. But green is, by far, the most prevalent color on printed circuit boards, and the default at every fab house I've seen. Why green?