Why such a discrepancy on location of Abydos between Stargate the movie and SG1 the series?

Other than the obvious "retcon!!11!" reason, was there ever an in-universe explanation about the obvious mistake the scientists made about where Abydos was actually located?  In the movie it is said that the planet is "...in another galaxy, on the other side of the observable universe."  In the series it turns out that not only is Abydos in our own galaxy, but it's in fact the closest planet to Earth with a stargate on it that can still be dialed without a DHD accounting for the stellar drift.  The writers went out of their way to explain other small inconsistencies (Ra being not "last" of his kind, but "oldest", etc.) but not this huge glaring error.


Unsolved mystery - I was given a coworker's Ubuntu 12.04.1 LTS machine and set up my own (sudo/admin) user on there from the command line. I switched to my user (from his sudo/admin user) and confirmed everything was okay using the groups command and the /etc/passwd file looked great. After months of everything working perfectly, a power outage shut down the machine for the first time since I inherited it.  After booting, my new user disappeared. It's not in the /etc/passwd file and there is no entry in the /home directory. I created the user the same as I did before, and there were no errors to indicate that the user still existed.  What happened?  As requested, here is the output of   olduser@machine:~$ ls -lait /home  total 16  3408126 drwxr-xr-x 2 newuser newuser 4096 Nov 20 10:28 newuser  3407873 drwxr-xr-x 4 root root 4096 Nov 20 10:28 .  3407874 drwxr-xr-x 36 coworker coworker 4096 Nov 20 10:00 bvillupu  2 drwxr-xr-x 26 root root 4096 Oct 3 2012 ..  3408259 lrwxrwxrwx 1 root root 44 Aug 9 2012 .directory -> /etc/kubuntu-default-settings/directory-home


Can someone tell me what the icon of a server and a blue database symbol means. It is attached to database engine instance in my object explore view.  (I apologize, I am unable to add a image of the symbol at this time as I am new to stack overflow and am short two rep points needed to post images. If necessary when I cross the rep points threshold, I will attach an image.)


Passing a list in a WHERE clause python mysql

I am trying to obtain a list of speed values from my table in my database. I was wondering if their was an SQL command/method which would allow me to pass a list of CharIDs in the WHERE function, so that I would not have to create a FOR loop and carry out the four searches separately.  party_ids= [4, 3, 1, 2]  def initializegame(party_ids):     #Get selected party members IDS     print(party_ids)     #Obtain Speeds     fetchspeed=("SELECT startspeed FROM characters WHERE CharID=%s")     print(fetchspeed)     mycursor.execute(fetchspeed,party_ids)     myspeeds=mycursor.fetchall()     print(myspeeds)     print("done")   I'm relatively new to SQL and I may be missing something major.  I did try:  Yet that was a little too hard to follow.  Thanks in advance


Split string into a list, with items of equal length

I have a string (without spaces) which I need to split into a list with items of equal length. I'm aware of the split() method, but as far as I'm aware this only splits via spaces and not via length.  What I want to do is something like this:  string = "abcdefghijklmnopqrstuvwx" string = string.Split(0 - 3) print(string)  >>> ["abcd", "efgh", "ijkl", "mnop", "qrst", "uvwx"]   I have thought about looping through the list but I was wondering if there was a simpler solution?


My laptop seems to be running infinitely faster whilst charging then it does when it's not charging for some reason.  My setup is an i7 9th gen w/ an RTX 2060.   I ran some quick benchmarks in Blender. While plugged in, an image renders in about 40 seconds. However, when I unplug it, it takes upwards of 3 minutes to render! (I'm using my graphics card for these benchmarks).    is the original, more detailed post. Please note that while the wording of that post is tailored towards Blender, my laptop is just faster overall while plugged in, period.   Why is this and how do I fix this?   I hypothesize that this is because of power allocation. Maybe the processor and graphics card combined are taking more power than the computer is willing to give. However, I don't know how to change this. I'm not too well educated on this topic, so is this even possible? Thanks.   EDIT:   Someone has brought to my attention that my batter performance-mode might be set to better battery life. I can confirm that I always make sure to set it to Performance on startup, if it's set to something else, regardless of whether it is charging or not.     EDIT 2:   A lot of people seem to be suggesting the fact that my apps might be using the integrated graphics when the laptop is not charging. I have already configured apps I frequently use (such as Chrome) to use the High-Performance Nvidia processor from the NVIDIA Control Panel. Aside from that, Blender, the benchmarking app, gives an explicit option to choose between rendering on the GPU or the processor. I have chosen the RTX processor (GPU) already and the problem persists all the same.


What is the singular source of Star Wars canonization?

Is the video game Star Wars: Knights of the Old Republic blessed by Lucas and considered canon? As a secondary question, has George Lucas ever officially sanctioned anything in the Star Wars expanded universe?  I guess what the real question is; once some Star Wars media is licensed by Lucas, is it considered official canon or not? Examples pro and con would be great.  UPDATE: What I really want to know is what makes something canon in the Star Wars universe, and an article in Wookieepedia or Wikipedia is great and all but not an answer.  I will leave up the previous question(s) to show the progression of the question.


How can I get a list of all the implementations of an interface programmatically in Java?

Can I do it with reflection or something like that?


Is USB RAM or a USB processor a feasible concept?

Is USB RAM or a USB processor a feasible concept for development?


Prove the convergence of the infinite product involving nested radicals

How to show that $\frac{\sqrt{2}}{2} \cdot \frac{\sqrt{2+\sqrt{2}}}{2}\cdot \frac{\sqrt{2+\sqrt{2+\sqrt{2}}}}{2}\cdot ... =\prod\limits_{n\in \mathbb{N}} \frac{1}{2} ~ \overbrace{\sqrt{2+\sqrt{2+...+\sqrt{2}}}}^{n}$ converges ? My approach : Let $A_n =\overbrace{\sqrt{2+\sqrt{2+...+\sqrt{2}}}}^{n}$ ; now $~~ \prod\limits_{n\in\mathbb{N}} \frac{A_n }{2} $ converges if and only if $\sum\limits_{n\in \mathbb{N}}\log \frac{A_n }{2} $ converges. By the ratio-test of the sum above we have : $\lim\limits_{n\to\infty} \bigg|\dfrac{\log \frac{A_{n+1} }{2}}{\log \frac{A_n }{2}}\bigg|=1$ which doesn't prove anything ,so how to continue from here ?


textures showing up in cycles but not in evee

I have an ocean texture on a plane in a scene in blender 2.81. When using the evee render engine the ocean texture does not show up when rendering but it does in view port. In cycles it does show up in rendering however I want to render it in evee since it a bazillion times faster and doesn't have as much noise. I will have linked an image of the nodes for the ocean shader/texture and the render in cycles and evee. Nodes:  Cycles:  evee (rendered with 1 sample):


In  it's said that time is a scalar quantity. But its hard to understand that how? As stated that we consider only the magnitude of time then its a scalar. But on basis of time we define yesterday, today and tomorrow then what it will be?


"Command Prompt Here" without shift key in Windows 10

I want "Command Prompt Here" in right click menu for all folders but without having to hold shift key.   It was possible in earlier versions of windows,  but it's not working anymore, in Windows 10.  Has this method changed in Windows 10? or is there another way to do this?


After solving the equation $ abc=a!+b!+c!     $ in natural numbers which yield $a=1,b=2, c=3$ i tried to attempt the above question given in title. However i am not getting any clue. As far i think, may be some logical reasoning will be required just like one attempts to solve problems like $AA+BB=AB$ etc. But here in this question how shall i proceed to solve it? Thanks in advance


How to handle an answer that only points to a resource?

When I'm reviewing items I sometimes come across answers like this:     Here's what you are looking for: www.domain.com/resource.aspx   How should one handle these? By adding a comment?


Hi I did some reading and came across this behavior that I don't really know why is like this. Would love to get an explanation why it works like this.  class InputTest {     public static void main(String[] args){         System.out.println("WITHOUT array:");         byte a=0;         System.out.println(a);         test(a);         System.out.println(a);          System.out.println("WITH array:");         byte[] b={1,2,3,4,5};         System.out.println(b[3]);         test2(b);         System.out.println(b[3]);      }     static void test(byte a){         a=120;     }     static void test2(byte[] b){         b[3]=120;     } }   printing of the code is:  WITHOUT array: 0 0 WITH array:  4 120   So I kinda want to understand why this is so maybe I don't make a unnecessary mistake in the future.


Why would a more expensive camera have lower megapixels?

Recently, I was on the Panasonic website and came across this . When looking at it I noticed it had 12.1 megapixels, which is really low compared to cheaper cameras. So why is the megapixels so low on this camera and what does lowering the megapixels do to a camera's image? One thing I do know is lowering the megapixels give the image more sharpness, but I have no idea what that means.


Best way to save an illustrator design so it cannot be altered

I have designed a logo for a non-profit that I want to allow different committees to use it, but I don't want them to be able to alter anything but the size.  I have created the design as a vector image(all font saved as outlines) with transparent background and with separate versions for black, greyscale at 80%, white to print on dark backgrounds and a specified color.  The skill of members varies as does their printers, some barely know what a jpeg is, others are prepping brochures for press printing, others are using the image on the web and for email.  I know I can take most image formats and extract, distort, erase, change colors, superimpose other elements etc.  I don't want others to be able to do this without permission from the organization board.  Using illustrator in CS5 on iMac 27" OS X 10.10.4


I am planning to move my LAMP stack to AWS as the number of users increases. Current estimations suggest, that the Server has to handle roughly 100.000 users accessing the static landing page, out of which about 5.000 will use the internal pages (PHP and Database access). Can I use AWS to host my site and what should I pay attention to?


Can I exclude spam domains from my search results?

Sometimes when I search for something, there are plenty of links to sites with no content (those who only have the premade templates which the search terms), spammers, and leechers (as in copying content from other sites, like B r o t h e r s o f t who leeches on SoftPedia.com).  How come they have such a high ranking without any original content (furthermore, why are they not simply banned from the results)?  And also, is there some way of filtering them out? Like for example completely exclude a domain from search results?


When i'm in a deep folder hierarchy the entire list of folders are seen before $    How can i make this short even though i'm in the same folder.


How does Microsoft push Windows 10 Upgrade?

A little while ago I turned on my gaming computer and noticed the following window on my taskbar.     When I click it, I get the following window.    If I had my update settings turned off. Would they still be able to push the upgrade notification?


It is a recurring theme in HP that how your pronounce spells effects their output. There is a  but I do not see anything in the answers about different languages.    So we know that each spell has its own incantation, but are these incantations the same in all languages? Could a spell have different incantations to suit the users native tongue?


What is the most efficient algorithm to find the closest prime less than a given number $n$

Problem Given a number n, $2 \leq n \leq 2^{63}$. $n$ could be prime itself. Find the a prime $p$ that is closet to $n$.  Using the fact that for all prime $p$, $p > 2$, $p$ is odd and $p$ is of the form $6k + 1$ or $6k + 5$, I wrote a for-loop checking from $n - 1$ to 2 to check if that number is prime. So instead of checking for all numbers I need to check for every odd of the two form $p \equiv 1 \pmod{k}$, and $p \equiv 5 \pmod{k}$. However, I wonder if there is a faster algorithm to solve this problem? i.e. some constraints that can restrict the range of numbers need to be checked? Any idea would be greatly appreciated.


Let $n$ be a positive integer. I know the traditional proof that $e$ is irrational. How do we show that $e^n$ is irrational in some sort of similar line? I am of course assuming it is but I would be astounded if not. It occurs to me that since $e$ is transcendental, of course $e^n$ is irrational, but I don't want to use that fact.  Googling gives me something for $e^2$, but I could not easily find anything for $e^3$.


I am stuck on this.  i have an input file that looks like   16:20:03 Buy DRIP AMEX 500 13,51 USD 16:05:10 Sell SQ NYSE 100 36,32 USD 15:48:52 Sell NXTD Nasdaq 500 4,99 USD 15:48:52 Sell NXTD Nasdaq 500 4,99 USD 15:46:07 Buy SOXL AMEX 50 147,7209 USD 15:40:20 Buy TEUM AMEX 1 700 1,36 USD 15:40:19 Buy TEUM AMEX 300 1,36 USD   my goal is to get each four-line record onto one line, e.g.  16:20:03 Buy DRIP AMEX 500 13,51 USD 16:05:10 Sell SQ NYSE 100 36,32 USD   I know that each record is four lines. i also know that each record starts with (is separated by) a time on format hh:mm:ss  I have tried various awk commands specifying RS/FS OFS/ORS I have tried different variants of sed like  sed 'N;N;s/\n/ /'   The awk prints first record only. The sed doesn't manage to get all elements on same line  I can post more specific examples of what i have tried. It looks reallly simply. anyone who can give me a hint?  If you know an easier solution in another language, feel free to elaborate


I am a little confused about springs. I just wanted to know that if I pull an ideal spring of spring constant $k$ such that the spring has been symmetrically pulled and its elongation (total) comes out to be $x$ then would the force on one side by $$F=kx$$ or $$F=kx/2$$  I am a little bit confused and hence I resorted to ask it here.


Limit of the sequence $\frac{1^k+2^k+...+n^k}{n^{k+1}}$

How would someone find the limit of the sequence $a_n = \frac{1^k+2^k+...+n^k}{n^{k+1}}, k \in \mathbb{N}$ as $n$ goes to Infinity? Can someone give me maybe a hint where to start?


I would like to buy a , but I can't find any reviews on it regarding linux compatibility. Ubuntu does not seem to have certified this laptop (yet)?  Anybody had experience with this model? Since it's a lenovo, my gut says it will work with Ubuntu/Mint out of the box, but I just want to be sure.


I'd like to convert all my ARW (Sony) files to DNG for several reasons, but the only thing keeping me back from doing it is the fear of losing useful metadata during the conversion. I know that the image it's self is completely safe during the conversion but what about proprietary maker noteS? Will those stay too? And even if they do, are they actually useful and can be actually used by something other then Sony's own RAW converter?  P.S. I'm using Ubuntu so I'd prefer to use KipiPlugins' DNG converter because from what I understand it does everything the Adobe converter does, but if I'm wrong I can use Adobe's instead.  EDIT:  It looks like the LensID does carry over! With the ARW and the DNG files converted by Kipiplugins' built in converter, info is stored as "Exif.Sony.0x___". With Adobe's official converter, it moves the info to more logically named fields in the XMP, such as "LensID" and "Lens".  Now that I've figured it out, I think I might use Adobe's Official converter, just because I prefer how it reorganizes the Exif Data.  I'm not fully convinced though and I'd like to hear others take on all this.


I'm new Lubuntu and I want to start Chromium at boot. I've no idea where to start. Could someone point me in the right direction.


If $f'(c)$ exists then $\lim_{x\to c} f(x)=f(c)$   My attempt is below. Did I do wrong? Since I don't really understand it. I thought $f'(x) = f'(c)$ so $f'(x)-f'(c)=0$. Am I on the right track? Many thanks!  \begin{align} f(x)-f(c)&=\frac{f(x)-f(c)}{x-c}\cdot(x-c) \\ \lim_{x\to c}[f(x)-f(c)]&=\lim_{x\to c}\left[\frac{f(x)-f(c)}{x-c}\cdot(x-c)\right] \\ \lim_{x\to c}[f(x)-f(c)]&=0 \\ \lim_{x\to c} f(x)&=f(c) \end{align}


How to bundle a Python application including dependencies?

I need to package my Python application, its dependencies and Python into a single MSI installer. The end result should desirably be:   Python is installed in the standard location the package and its dependencies are installed in a separate directory (possibly site-packages) the installation directory should contain the Python uncompressed and a standalone executable is not required


I cannot edit vertices, edges or faces because of the 3d cursor. When in edit mode with the appropriate vertex, edge or face icon selected I try to click to select, say a vertex which I want to drag to resize and all I get is the 3D cursor which cancels the drag edit action.


After reinstalling a domain controller, how to recover member computers without rejoining?

Preface: I'm not a trained sysadmin. Just trying to learn as I go. Please be gentle. :)  Background: So we rented a VPS to act as our domain controller. Joined ~500 of our laptops to it. GPOs were working perfectly (thanks to advice from grawity and others on my previous question). But the VPS was very unstable, kept restarting around every 10 mins for reasons I couldn't figure out. In the end I installed 2012R2 on the VPS instead of 2016, promoted it to domain controller again and reconfigured the GPOs. I also set up another VPS as domain controller to act as a sort of backup. The servers are stable and everything works.  Problem: After I reinstalled OS on the DC I can't see the ~500 laptops that were joined earlier among the list of computers. I checked 1 laptop and it still shows itself as a member of the domain and still has existing policies but "gpupdate /force" fails and I suspect that all the older laptops won't be receiving any further updates on GPOs. At this point I don't mind manually rejoining the computers but almost all of those laptops are in the field. So I could either ask for a recall which is not gonna make me any friends or send them a .vbs script to join the computer to domain again and ask them to run it which, even if I assume everyone does, the .vbs contains the root password to the domain controller so that's a non-starter. So here's my 2 questions:   Is there any way I could rejoin those old laptops? Given that the laptops still 'consider' themselves as members of the domain. I think if I can just get them to show up in the domain computers list, I could reset the computer account and the trust issue should be solved... I think. We're unsatisfied with the support from the VPS provider and want to switch. Is there any way we can move to a new VPS with a new IP and not have to rejoin the computers again.   (I suspect the answer to second question would also answer the first one by default but I don't know for sure, so leaving it upto you.)  Bit of relevant info: We're using a publicly routable .net domain registered on godaddy. Using custom nameservers (ns1..net and ns2..net both pointing to the IP of dc1 as of now). Since the domain is publicly routable, we have set DNS of computers to 8.8.8.8 & 8.8.4.4 instead of the DCs ("gpupdate" works on newer computers with this configuration).  Thanks for reading and appreciate any guidance you can provide.  EDIT: System seems to have marked this question as duplicate of "Command to remove computer from non-existant domain". Completely different question though


Current through capacitor, displacement current

How can current flow through a capacitor(open circuit)? Why is there a need of displacement current and why does it exist for a short period of time? Does the displacement current exist in medium between the plates? Why is there a need for charge to flow from battery's terminal to capacitor's plate?


Is a Damned role always seen as Damned by a Seer? Are there exceptions? (what are they?) Can the check be influenced by items like a Wolf Pelt or Sceptre of Darkness or Veil of Shadows? Does the Damned status overrule the usual Seer result for a Maple Wolf or Lycan?


Can a continuous function from the reals to the reals assume each value an even number of times?

Suppose $f: \mathbb{R} \rightarrow \mathbb{R}$ is continuous. Is it possible for $f$ to assume each value in its range an even number of times?  To clarify, some values might be taken 0 times, some 2, some 4, etc., but always an even (and therefore finite) number. I don't require that there be a value that is assumed any particular number of times.  For example, the function might be surjective, or never take on any value exactly twice.  This question is possibly the same as . That question may instead have meant, "If $n$ is even, is it possible for $f$ to assume every value in its range exactly $n$ times?"  In any event, it has not been answered.


Seeking address for 1930s migrant to Brazil from Lebanon?

I'm looking for my grandfather who migrated to Brazil around 1930s, his name is Mahmoud Chahine. I believe he worked in the coffee industry in Sao Paulo.  I am seeking an address in Brazil where he lived. He emigrated from Lebanon and I believe he was born around 1890. His father's name is Hammady and his mother's name is Sikna.


I am able to backup my app's data from the root/data/data/you.package.name directory by just moving it to SD card manually. however, when i reverse the process,                                                                                AKA paste the data back to simulate a restore, the app just force closes, i have tried it with a bunch of apps and noticed the same reaction. Where am i wrong?


How can I detect when people click a certain word In chat?

I want to have an information button show up in chat so when you press it, it tells you information or teleports you somewhere. I heard it uses /trigger but I'm not sure how to use that. Does anyone know?


What is the name of the effect for showing past days in movies?

In , Jyn Erso remembers her childhood days.   Her childhood/past days were shown with some effects like characters talking with a low voice with echo, with high background music, slow motion (not very slow) and shaky camera.   What is the name of this effect for showing past days in movies?


How to force Google Chrome's omnibar to treat an rdp://-prefixed URL as a URL

I am currently using  to run windows remote desktop by clicking a hyperlink or typing a URL into a browser/explorer.  Unfortunately, Chrome treats URLs beginning in rdp:// as strings and searches for it.  I am specifically interested in a way of modifying the string so that Chrome treats it as a hyperlink. I am less interested in changing settings of the browser, as I would like to implement this on multiple devices. Alternatively, I guess I could change the script of the solution to find a different prefix, beginning in http:// but it seems Chrome is the only browser with this particular problem.   did not help.


Does the engine's thrust not contribute to the lift?  Here are my thoughts:  There are two types of aircraft resistance, one is the resistance created to create lift, referred to as lift resistance, and the other is other resistance.  Why is there lift resistance?   Because the wing has an angle of attack, there will be an area in the direction of the speed of the wing, so there will be lift resistance.    The engine's thrust balances lift resistance and other resistances to make the aircraft fly.  So does thrust contribute only to overcoming resistance and not contribute to lift?  Because drag contains lift resistance, and overcoming lift resistance is generating lift.  If the lift resistance is not overcome, the aircraft cannot move and the wings cannot generate lift.  Moreover, even if the aircraft is moving, if there is no engine thrust to overcome the lift resistance, then the inertia overcomes the lift resistance, so the speed of the aircraft will continue to decrease and the lift will continue to decrease.  So to generate lift, there must be engine thrust to overcome the lift resistance.  The glider does not have an engine, but in fact the glider uses the component of gravity as the thrust to overcome the lift resistance, thereby generating lift.  So, in order to generate lift, the glider had to lose altitude.  The wing is similar to a inclined plane.  We all know that there must be a thrust object to be stationary on the inclined plane.  It is wrong to say that the thrust does not contribute to the stationary object on the inclined plane.    Why is the push-to-weight ratio smaller than 1?  Because the wing is an inclined plane, we all know that the smaller the angle θ, the smaller the force F that keeps the object stationary on the inclined plane.  The same is true for the wing. The angle of attack of the wing is generally small, so the ratio of the aircraft's thrust-to-weight ratio is less than 1.  Of course, this θ angle is not the angle of attack of the wing.  On the wing, this angle is the aerodynamic angle of the wing.  Generally speaking, the angle of attack is not equal to the aerodynamic angle.  But there is an internal connection between them.  Is my idea correct? ————-


I am seeing the Schwartz Space for the first time today and I have trouble understanding the following argument:  Given that $f \in S({\mathbb{R}})$ with $f(x_0) = 0$  Taylor's theorem  tells us that we can find a function $g \in C^\infty(\mathbb{R})$ such that \begin{equation} f(x) = g(x)(x - x_0) \end{equation} Hence, for $x \neq x_0$ we can write $g(x)$ as \begin{equation} g(x) = (x - x_0)^{-1} f(x) \end{equation} According to my notes, from this it should be clear that $g \in S(\mathbb{R})$, but how can I see this immediately ? In order to derive this I think would need to direvtly go via the definition, i.e. show for each $k,m = 0,1,2, \dots$ there exist constants $c_{k,m}$ such that \begin{equation} \sup_x |x^k g^{(m)}(x)| \leq c_{k,m} \end{equation}  or is there a shorter way to infer this ? By "shorter" I mean for example a statement that somehow the constants that bound $f$ are also bounds on $g$, probably with some amendment.  Edit: Does it maybe have to do with the fact that $f$, being smooth, has a Tayler expansion and so \begin{equation} g(x) = \sum^\infty_{n = 1} \frac{f^{(n)}(x_0)}{n!}(x - x_0)^{n-1} \quad (\text{note } f(x_0)) = 0 \end{equation}  Thanks for your help!


Can Intel® Core™ i5-4210U Processor support Ubuntu 16.04 LTS? My laptop is Dell Inspiron 3542.


I'm using minipages to keep related questions together on a test that I'm writing. When I make a 2-sided document some of my spacing gets messed up before the section break. It works fine if I leave out the twoside option. What's going on here?  \documentclass[12pt,twoside]{article}   \begin{document}  \section{test} asdf  \section{More test}  \begin{minipage}{\textwidth} text \vspace{7in} \end{minipage}  \end{document}


Answers without upvotes are still in random order when one of the answers is deleted

Answers with zero votes posted shortly after each other have a randomized order to give them an equal exposure, and to prevent the  effect.  However, when one of the answers is deleted, the users that can see deleted answers (marked by a red background) still get a random order. Should not existing answers have priority over deleted answers?  Example of a case where a user sees the deleted answer on top:  I have tried to refresh the page, but it still randomizes the order. Example case:  (temporary, before the existing answer get an upvote.)


How do I use command arguments with Cmnd_Alias in sudoers?

How do I specify command arguments in sudoers? As a background, aws command is actually a gateway to a whole bunch of sub-systems and I want to restrict the user to only run aws s3 cp ...any other args...  When I try the following in /etc/sudoers  Cmnd_Alias AWSS3_CMD = /usr/local/bin/aws s3 cp, /usr/local/aws/bin/aws s3 cp gbt1 ALL=(gbt-ops) NOPASSWD: AWSS3_CMD   The shell unfortunately prompts for password  $ sudo -u gbt-ops aws s3 cp helloworld s3://my-bucket/hw.1 gbt-ops's password:   If I remove the command args in Cmnd_Alias, then it flows as desired (without password prompt), but the authorization are way too broad. So, what is the right way of restricting to only certain types of command invocations.   Cmnd_Alias AWSS3_CMD = /usr/local/bin/aws, /usr/local/aws/bin/aws   Then  $ sudo -u gbt-ops aws s3 cp helloworld s3://my-bucket/hw.1 ...happy   Thanks a lot.


Suppose $X$ is a finite set and $f : X \to X$ is a function. Then $f$ is injective if and only if $f$ is surjective.

Suppose $X$ is a set and $f : X \to X$ is a function.  If $X$ is a finite set, prove that $f$ is injective if and only if $f$ is surjective. Show that when $X$ is an infinite set, the statement is not true in general.   For that, let $X = \mathbb{R}$ and find a function $f: \mathbb{R} \to \mathbb{R}$ which is injective but not surjective, and a function $g: \mathbb{R} \to \mathbb{R}$ which is surjective but not injective  My attempt at the first part   Suppose that the function is surjective but not injective. Let $a,b \in X$ such that $f(a)=f(b)$ but $a \not =b$. Now since this is a finite set mapping to itself then there are not enough elements in $X$ to map to $X$ since two elements were used to map to one element, thus the function can't be surjective. Therefore if the function is surjective it is also injective.   Now suppose that the function is injective but not surjective. Let $a \in X$ such that $f(b)\not =a$ for all $b \in X$. Since the function was assusmed to be injective each $a \in X$ must map to an element of $X$, thus must have two elemetns in $X$ mapping to the same element in $X$. Hence the function can't be injective, therefore if the function is injective it must be surjective.   Would an exponetial function work for injective but not surjective since can't map to negative numbers. And an example of a function that is surjective but not injective could be a log function since none of the negative numbers get mapped to anything?   Also I'm having trouble seeing why it has to be finite for the first part to work. I understand it has something to do with the pigeonhole principle but its not that clear to me.


Do proficiencies with one thing from multiple different sources stack?

In D&D 5e it is possible for a character to receive proficiency in the same skill, tool, weapon and/or armor more than once via Class, Race, and/or Background.   Do any of these proficiencies stack, thereby allowing a character to receive their proficiency bonus more than once?


The inverse is a root of the reciprocal (reverse) polynomial.

Let $F$ be a field and let $a \neq 0$ be a zero of the polynomial $a_0 + a_1x + . . . +a_nx^n$ in $F[x]$.  I want to show that $\frac{1}{a}$ is a zero of the polynomial $a_n + a_{n-1}x + . . . + a_0x^n$  How can I do this?


I have been working on this question. Let A be an open set.  Does Int(A-closure)= A?    Here is my answer:  Let my space be [0,1] ∪ {2} and my topology be the subspace topology.    Let A = (0,1) ∪ {2}.  Then, A-closure = [0,1] ∪ {2}  But then, int(A-closure) = [0,1] ∪ {2} = A-closure  Hence int(A-closure) does not equal A.


How to program traditional UK Mothering Sunday in Google Calendar

I would like to enter the United Kingdom version of Mother's Day into Google Calendar so that I will be able to remember it when the right time of the year comes on a yearly basis:  I've read  and in particular the post by  which I think should have been the accepted answer as I found it really helpful.  This works for Mother's Day as celebrated in the United States, Canada, Italy, and Malta, namely, on the second Sunday of May (and I've included how to do this in Google Calendar for completeness right below from the link above):   Create an untimed event on May 8, 2011 Open event details Change the "Repeats" value to "Monthly" Change to "Repeats every 12 months" Click the "Repeat By" radio button for "day of the week" Leave "Ends Never" as is   However, now I want to add an entry for the UK Mother's Day (AKA Mothering Sunday).  I've included the following relevant quotes from Wikipedia:   Let's wee when this Mothering Sunday takes place:      The United Kingdom celebrates Mothering Sunday, which falls on the   fourth Sunday of Lent (15 March in 2015).    Ok, so here we need to find more about Lent:      Lent (Latin: Quadragesima - English: Fortieth) is a solemn religious   observance in the liturgical calendar of many Christian denominations   that begins on Ash Wednesday and covers a period of approximately six   weeks before Easter Sunday.    OK, since Lent begins on Ash Wednesday, we need to find out when Ash Wednesday is:      Ash Wednesday, a day of fasting, is the first day of Lent in Western   Christianity. It occurs 46 days (40 fasting days, if the 6 Sundays,   which are not days of fast, are excluded) before Easter and can fall   as early as 4 February or as late as 10 March.   But this information is not enough to be able to provide me with enough information to come up with a calendar, or even automatically store the infinite collection of dates Mother's Day in the UK takes up, encoded into some form and stashed into Google Calendar.  Anyone have an idea of how to code UK Mothering Day into Google Calendar?


Reparametrization trick with non-Gaussian distributions?

I am thinking about the  in a variational auto-encoder. I know that it can be used with normal distribution. Can the re-parameterization trick be applied to other distributions like Bernoulli? What are the limitations of its application?


Which other "photo booth" program can I use besides cheese (on a Toshiba AC100)?

After installing Ubuntu 12.04 on a Toshiba AC100 several days ago, as described at , and seeing during the installation that the OS was able to use the camera (the installer suggested to make a photo for the first user), I wanted to play with the camera.  I couldn't understand how to find a "photo booth" program in the new-style menu+desktop (not the classical menu with sections), so I remembered the popular "cheese" Linux program, and installed it via the Software Update tool (or whatever it is called; can be invoked from the panel on the desktop).  But cheese doesn't start, i.e., it crashes. (The  telling the same.)  As I said, the camera could be used by the OS on this machine -- this could be seen in the installer.  Which "photo booth" programs can be installed and used without crashes in Ubuntu 12.04 on a Toshiba AC100 in order to play with the webcamera?


How to delete a keyboard layout in Windows 10

I installed Windows 10 on a physically German keyboard, then installed a Window English software keyboard and bought some little stickers to make my keyboard look OK.  However, Windows shows 2 keyboards installed & occasionally toggles back to German.  Note that I am not talking about removing a language (which is all that I can find when I Google).  How do I remove the German keyboard layout?


How can you convert a monster into a playable race in Pathfinder?

Alright, I know it's within the rules to create a monster into a playable race. However the method to do so seems to be vague and not well explained. So while previously I asked if it was possible to convert monsters to PC was answered, it didn't answer how to do so in-depth.   If I were to use a CP 2 monster as an example like a Boar, how would this translate into a playable race?


How does encryption work in elliptic curve cryptography?

So I think I understand a good amount of the theory behind elliptic curve cryptography, however I am slightly unclear on how exactly a message in encrypted and then how is it decrypted. So my questions are   How are messages encrypted and decrypted? How are the public and private keys determined?   Thanks for the help


Reduce mesh size of data set for Surface pgfplot

I want to reduce the amount of sample points latex uses for creating a pgf surface plot. My data file currently has a mesh of (41x401) points. I am looking for a way to implement the (each nth point=?) statement to reduce the mesh size to for example (41X41). I am using the following code to make a surface plot of the fairly large data set:  \begin{tikzpicture} \begin{axis}[height=9cm,width=12cm] \addplot3[surf,shader=interp] table[x index=0, y index=1, z index=2] {data.dat}; \end{axis} \end{tikzpicture}   I am compiling this with LuaLaTex due to the the main memory size error I get when I compile the plot with pdfLaTex.  data file can be downloaded here:


how do i create spiral vortex with texture or by modeling

hi i need help to creating spiral vortex something like this it would be great if you help me


Getting passport stamps inside Schengen Area

It is known that passport stamps are a kind of collection for many people. But, inside European Union, we -EU citizens- are allowed to travel without passport, just with our national ID card (if we have in our countries).  Is there any way to get passport stamps like non-EU citizens? You can identify yourself with the passport of course, but they don't stamp it.


I can't find my house. It keeps taking me to something else I have done, but I can't find my mansion (my house) that I am working on. I really need to finish it before my friend comes over this weekend. What do I do?


So, I've noticed when you render something in version 2.8, it automatically opens a new window, and renders it on that.  What I want to know is this:  Is there anything special about this window, and is there a way to set it so that it renders it in the original window, like it did in version 2.79?


Has the Magical Community breached the Final Frontier? (aka Wizards in Space?)

Have they? Given that Muggles put the first man in space in 1961, even by 1991 a lot of Muggleborns perfectly aware of the space-travel would have passed through Hogwarts and into the Ministry, even the Department of Mysteries (which seems to be a bit like their research division/Area 51 combo) And even leaving Muggle technology (which Wizards don't care for or about) aside, Humans have wondered about air travel to "other worlds" and meeting aliens from the time of the Ancient Greeks, surely some Witch or Wizard somewhere might have wondered if it really was possible to fly to the moon? So, is there any canon (aka Books + Pottermore + Rowling interviews) evidence of the Wizarding community having ever travelled or trying to travel to space / other planets or satellites? ETA: Note, I am also totally okay (and in fact would be eager for) historical "Famous Wizard" card-like tidbits from canon-sources.  AWESOME example (that I'm frankly not expecting): When the Muggles managed to land on the Moon, the Department of Mysteries had to scramble to hide the Silver-backed Moon Dragon conservatory they had been maintaining near the landing site. ALSO AWESOME example (that I am hoping for): Warlock Flibberti and Witch Tigget misused this earth-based spell and amusingly found themselves on the moon with their pet monkey instead!


Tension in a string attached to different masses

Does tension in a string remain same even if masses attached to it are of different weights?   I have provided a diagram, according to me the tension in string should be different as masses hanging are different. My teacher has told me that tension in string will remain same.   Please explain why does it remain same?


How to insert a two-column figure in the current page when using LaTeX?

I know there is a command like   \begin{figure}[p] \end{figure}   But when I use it in a two-column model, the $[p]$ cannot work. So I am wondering if there is any solution to preserve the figure in current page when I use $\begin{figuire*}$.


What if we take step functions instead of simple functions in the Lebesgue integral

When we define the Lebesgue integral, we first define it for simple functions $s(x) = \sum\limits_{j=1}^n c_j\chi_{A_j}(x)$ (where $A_j$ are measurable) as $\int sd\mu = \sum\limits_{i=j}^n c_j \mu(A_j)$ and then for $f\ge 0$ as $\int fd\mu = \sup\{\int sd\mu$ : s simple and $0\le s\le f\}$. But I was wondering what could go wrong if instead of taking simple functions in the supremum, we would take step functions, i.e. $s(x)=\sum\limits_{j=1}^nc_i\chi_{I_j}(x)$ where $I_j$ are intervals (any type, like $(a,b), (a,b], [a,b), [a,b])$).


Could the antimatter from the Big Bang have gone in the opposite direction in time?

I am thinking, that the missing antimatter that was created at the Big Bang can be accounted for if we consider that it went the opposite direction in time (into the negatives)


Find the largest positive integer $n$ such that $n^3 + 100$ is divisible by $n+10$

I'm still kinda new to number theory so could someone tell me if my solution is right?   Reducing $\mod n +10$  $$n \equiv -10 \pmod{n+10} \implies n^3 + 100 \equiv -900 \pmod{n+10}$$ So we want $(n+10) \mid 900$ and the largest number would be $n = 890$


How to split a very long equation (using AMSMATH package)?

I'm trying to split up the following equation so that it fits the margins of my document, so far I have:  \documentclass{article}  \usepackage{amsmath}  \begin{document}   \begin{equation} 0 = n_1^3 n_2 n_3^2(\lambda+\mu)^2 +n_1 n_2^3 n_3^2(\lambda + \mu)^2  + (\lambda + \mu)(\mu - \rho c^2)n_1^3 n_2 + (\lambda + \mu)(\mu - \rho c^2) n_1 n_2^3 + n_1 n_2 n_3^2 (\lambda + \mu)(\mu - \rho c^2) + n_1 n_2 (\mu- \rho c^2)^2 - n_1^3 n_2 n_3^2 (\lambda + \mu)^2 - n_1 n_2^3 n_3^2 (\lambda + \mu)^2  \end{equation}  \end{document}    How do I make the equation split so that it fits?


Are there elementary ways to proof $\int_0^\infty \frac{\sin{x}}{x} \mathrm{d}{x}=\frac{\pi}{2}$?

Is there an elementary way to proof  that $$\int_0^\infty \frac{\sin{x}}{x} \mathrm{d}{x} = \frac{\pi}{2}$$ or equivalently $$\int_{-\infty}^{+\infty} \frac{\sin{x}}{x} \mathrm{d}{x} = \pi \;\;\; \text{?}$$  Prequesites (which might be assumed):   Basic knowledge about limits, complex numbers, differentiation, series and power series as well as indefinite Riemann-integration in one dimension may be assumed (including Riemann-sums). No complex or multi-dimensional calculus as well as Fourier-analysis.   Note (1):  Sorry if the question is covered somewhere already I couldn't find it. Also it is absolutely clear that the integral can be solved by a multitude of approaches if the prerequisites are dropped among them fourier analysis, polar coordinates and complex analysis.  Note (2): The closest thing I found was a combination of Robin Chapman's  and Zarax's method used in . This essentially reduces to first showing by integration by parts that $$\int_{-\infty}^{+\infty} \frac{\sin{x}}{x} \mathrm{d}{x} = S \Longleftrightarrow \int_{-\infty}^{+\infty} \frac{\sin^2{x}}{x^2} \mathrm{d}{x} = S$$ and then showing that  $$ S =  \int_{-\infty}^{+\infty} \frac{\sin^2{x}}{x^2} \mathrm{d}{x} = \pi$$ as described in . Which is what I will post as  fleshed out answer later.  Note (3): For completness sake possible solutions to the problem are already collected in  but as stated in the comments I was looking for something more basic.  Nevertheless any other basic approaches (not already collected there) are highly welcome!


after run command      Nmap localhost   I can't viewed "Printer Service on port 515" for list.  How to add Printer service on Nmap localhost list?


Probability Convergency / Stochastically bounded

We have a random variable $Y_n$ stochastically bounded, so for each $\epsilon \geq 0$ ,   $\exists$ a constant  K and a value $n_0 = n_0 (\epsilon)$ such that  $P(\left | Y_n \right |\leq K) \geq 1- \epsilon$ . So we now consider another random variable $X_n$, and we know: $$ \frac{X_n}{Y_n} \overset{P}{\rightarrow} 0 \textrm{when n} {\rightarrow} \infty $$ And we want to prove: $$ X_n \overset{P}{\rightarrow} 0 \textrm{when n} {\rightarrow} \infty $$ So this is what i think: Applying probability convergency definition $$ lim_{n\rightarrow \infty}  P( \left | \frac{X_n}{Y_n} \right | > \epsilon ) =0  \Rightarrow $$ $$ lim_{n\rightarrow \infty}  P( |X_n| > \epsilon . |Y_n| ) =0 $$ And here because $Y_n$ is stochastically bounded we can take $\epsilon$ as little as we want so the new $\epsilon$ would be $\epsilon . |Y_n|$. In this way $X_n$ converge in probability to $0$. But i do not know if this is right, and if it is actually right how can i put it in math expressions including the use of $n_0$


regular-expressions for email validation

i am making a password and email page and need to validate the email with a reg-ex. my problem is the reg-ex i use will only validate to after the @ sign after that point all emails are valid,i need a full proof reg-ex that validates and makes sure its either ".com" or the English alternative (spell check wont accept) at the end can anyone help?  My code for anyone needing it:           <form ... onsubmit="return checkForm(this);">
email: <input type="email" name="email">

Password: <input type="password" name="pwd1">

Confirm Password: <input type="password" name="pwd2">

<input type="submit">
    </form>


How to handle categorical predictors with too many levels?

I think it may be a problem if we directly use dummy variable for a categorical predictor having hundreds of levels.   I have found one solution from the book  (p.329). The solution is mentioned in classification tree sections. Specifically, the solution orders the levels of the categorical predictor by the number of occurrence of each level in one class, and then treats the predictor as an ordered predictors.   I wonder for models other than classification tree, such as linear regression, what would be proper ways of handling categorical predictors with too many levels.  I found an old post asking similar questions, but no answers have been posted:


Which site for database design questions?

Which site would be the best site to ask database design questions? I don't mean the architecture like master-slave replication, because that would fit on Server Fault.  For example, if I were building a knowledge exchange like Stack Overflow, should I store the questions and answers in one table or should I have one question table and one answer table?


Assuming you are level 20, and have access to any magic item, how high can you get AC (permanently or for a set duration)?  Constraints:   Magic items are those on the tables in the D&D 5th Edition DMG. Spells, skills, feats and abilities available to a player character are eligible for use/consideration.     No buffing, no other help from an ally. This AC is achieved by a single player character.   Extra clarification: Time and magic items are limited to practical use. Think of it as a game plan for a campaign with a very generous DM.


How to convert the following text into a proper string in C#?  &lt;IconStyle xmlns="http://earth.google.com/kml/2.0"&gt;&lt;color&gt;FFFFFFFF&lt;/color&gt;&lt;scale&gt;1.0&lt;/scale&gt;&lt;Icon&gt;&lt;href&gt;root://icons/palette-5.png&lt;/href&gt;&lt;x&gt;192&lt;/x&gt;&lt;y&gt;192&lt;/y&gt;&lt;w&gt;32&lt;/w&gt;&lt;h&gt;32&lt;/h&gt;&lt;/Icon&gt;&lt;/IconStyle&gt;&lt;LabelStyle xmlns="http://earth.google.com/kml/2.0"&gt;&lt;scale&gt;0&lt;/scale&gt;&lt;/LabelStyle&gt;&lt;BalloonStyle xmlns="http://earth.google.com/kml/2.0"&gt;&lt;text&gt;$[description]&lt;/text&gt;&lt;color&gt;FFFFFFFF&lt;/color&gt;&lt;/BalloonStyle&gt;      Forgot to mention the important catch:how to convert the string in a console application in c#?


How do I remove all files in a folder except just some specified files?

I want to remove all files in a directory while leaving just some specified files, they don't have anything in common by name. How could I achieve that?  For example, the file names I want to keep are:  file_1.png, another_file.jpg, some_music.mp3


How do I resolve a recurrence relation when the characteristic equation has fewer roots than terms?

I know how to solve "simple" recurrence relations. For instance, say you have:  $$c_0 = 20$$ $$c_1 = 30$$ $$c_n = 3 c_{n-1} - 2 c_{n-2}$$  We can write the characteristic equation as:  $$3x^{n-1} - 2x^{n-2} = x^n$$  Solving this with $n=2$, we get $x = 1$ or $x = 2$. This lets us write the relation $c_n = \alpha_1 1^n + \alpha_2 2^n$, and we can solve for $\alpha_1$ and $\alpha_2$ with the initial states $c_0$ and $c_1$.  However, this depends on the fact that $3x^{n-1} - 2x^{n-2} = x^n$ has two roots.  Now, I'm stuck on another problem where the characteristic equation has fewer roots than terms.  Say I have this recurrence relation instead:  $$a_0 = 0$$ $$a_1 = 2$$ $$a_2 = −1$$ $$a_n = 9a_{n-1} - 15a_{n-2} - 25a_{n-3}$$  The characteristic equation would be:  $$9x^{n-1} - 15x^{n-2} - 25x^{n-3} = x^n$$  However, solving with $n=3$, we only get two roots: $x=-1$ or $x=5$. There are not enough roots to write a relation in the form of $a_n = \alpha_1 r_1^n + \alpha_2r_2^n + \alpha_3r_3^n$. How do I proceed?


How would I software-decode this 260KHz serial stream?

I've probed this serial stream coming out of a scoreboard controller and it seems like a proprietary protocol. How would I go about trying to software-decode this?    The start bit is 7.8us long. All the data bits are about 3.85us, giving a bus speed of around 260KHz. A logic HIGH bit starts with a 3.1us HIGH period then a ~800ns LOW. A logic LOW bit is the same but the periods are switched. Each packet is made of 255 bits, so about one packet is sent every millisecond.  I've thought of triggering on the rising edge and then reading the pin level after a short delay, but I don't think an interrupt-driven scheme would work that well because of the overhead.  Any ideas?


What does the highlighted part means from the paragraph given down below?

Finally, at a grander level, are ‘free’ social networking sites user-owned, or are they spaces through which the forces of big capital are further extending into our everyday lives?


Can a character with darkvision see into Hunger of Hadar? This assumes the character is not inside the spells area, and therefore not blinded. This has come up a few times on this stackexchange, but never really answered.  The hunger of Hadar spell (PHB, p. 251) creates a black void of darkness, which cannot be penetrated by light. This means that no one can see in [...]  is stated in , without any rules to back it up.  I'm not even going to go into the debate about whether darkvision can see through hunger of hadar  From  Therefore I think a seperate question is warranted.


Modern references for continuum mechanics

I'm wondering what some standard, modern references might be for continuum mechanics.  I imagine most references are probably more used by mechanical engineers than physicists but it's still a classical mechanics question.   This came up in a conversation with my father (who is a mechanical engineer).  I was curious to see the types of mathematics they use in stress analysis.  Complex analysis gets used to study 2-dimensional isotropic material here:     N.I. Muskhelishvili. Some basic problems of the mathematical theory of elasticity.    3rd edition, Moscow-Leningrad. 1949. (Translated by J. R. M. Radok. Noordhoff. 1953.)    but that's quite an old reference and my library does not have it.  Any favourite more modern and easy-to-find references?   I'm fine with mathematical sophistication (I'm a mathematician) but I'm not particularly seeking it out.  I'm looking for the kind of references that would be valued by physicists and engineers.  References "for math types" are fine too but that's not really what I'm after.


Are the data dumps available as torrents?  The official location for the database dumps appears to be , but they are direct HTTP links, and some of the files are quite large (over 10 GB for Stack Overflow posts, for example).  I have had some bad luck downloading big files directly and would much prefer torrents (or any other method that can reliably continue interrupted downloads and recover from minor corruption). It wouldn't even need to be the most recent, anything from the last year or so would be sufficient.


Indefinite Integral Constant Multiple Rule

I am looking at the following  from Math Exchange.  In the post guest196883 writes      The rule stated only applies for definite integrals. That is:   $$\int_a^b\alpha f\,dx = \alpha \int_a^bf \,dx$$   Does this mean it is NOT true in general for indefinite integrals? That is:  $$\int\alpha f\,dx = \alpha \int f \,dx$$  There was a short discussion in the comments of the post on this but I don't believe it was ever fully addressed. Thank you in advance!


How do I turn specific Delphi warnings and hints off?

In CodeGear Delphi 2007, how can I turn specific warnings and hints off? I am attempting to turn off H2077 - Value assigned to 'varname' never used.


What do you call someone who always speaks in gobbledygooks?

What word would you use to describe a person using gobbledygooks even during casual conversations?


A problem due to Halmos in Santos' number theory

I found this cool problem in Santos' number theory book, page 12, but he gives the credit to Halmos.Supposedly it must be solved by mathematical induction.     Every man in a village knows instantly when another’s wife is   unfaithful, but never when his own is. Each man is completely   intelligent and knows that every other man is. The law of the village   demands that when a man can PROVE that his wife has been unfaithful,   he must shoot her before sundown the same day. Every man is completely   law-abiding. One day the mayor announces that there is at least one   unfaithful wife in the village. The mayor always tells the truth, and   every man believes him. If in fact there are exactly forty unfaithful   wives in the village (but that fact is not known to the men,) what   will happen after the mayor’s announcement?   I defined $P(n)$ to be the number of unfaithful wives in the village. Then since everyone believes the mayor and he always tells the truth, $P(1)$ must be true. This is why I defined $P(n)$ to be  the number of unfaithful wives in the village, because we've been told that $P(1)$ is true. Now I have to prove that if $P(k)$ is true, i.e. $k$ women are unfaithful, then $P(k+1)$ is true. I guess this must be somehow related to men knowing the unfaithful women in the village, but I can't proceed. I have made some different guesses in my mind, but I can't logically entail anything out of them yet.  Any hints or ideas will be appreciated.


How can I install phpmyadmin on Ubuntu 19.10?


Can't see any indication in the 3D view , when changing mesh properties from python console

Im using blender 2.75 in windows , i try to change the default cube model simple property data.edge[0].bevel_weight to 1.0  but i don't see any bevel change in the cube model in the 3d View  in the python console i do :  >>> cube  = bpy.context.active_object >>> cube.data.edges[0] bpy.data.meshes['Cube'].edges[0] >>> cube.data.edges[0].bevel_weight 0.0 >>> cube.data.edges[1].bevel_weight = 1.0 >>> cube.data.edges[1].bevel_weight 1.0   looks like in the script it is working but why i dont see any thing in the 3DView?


I'm wondering if my code is actually protected from SQL injection. My sites have been injected before and I never really understood how to prevent it. Here is my code for inserting a comment:  if ($_POST['comment']) {     $comment = strip_tags(nl2br(mysql_real_escape_string($_POST['comment'])));     $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);     // set the PDO error mode to exception     $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);     $sql = "INSERT INTO posts (comment, authorid)     VALUES ('$comment', '$uid')";     // use exec() because no results are returned     $conn->exec($sql);     echo '
Your comment was added to the wall!

'; }


Masking out parts of video footage so 3D object can appear

I have built a residential area in 3D in Blender that appears on some drone footage. The residential area is partially hidden behind some other buildings. I would like to mask out that part.   Below the arrow I would like to add a mask in the red square to hide the 3D block of apartments behind the real building


Need Help For Completely Transfer in Ubuntu

I use ubuntu 13.04 in dual boot with windows. I want to completely move into ubuntu. But I need some help.  I am a freelance web designer. Sometimes my clients send me PSD files to make theme html or anything else. But I can't use photoshop in ubuntu. I know by using wine I can install photoshop. But I have dought that can I slice my psd layers in ubuntu as I do in windows. Sometimes I have to create banner/button in photoshop. So I need a best solution for handling this type of problem.  I hate windows so much. At the first when I used ubuntu 10.04 I am in love in ubuntu. So please help me to move in ubuntu.  Regards, Mahbub Alam


Can i load images from other websites and display into my website?

Is loading the images from other sites into mysite is good?  Will it affect my website in anyways like speed, seo, copyright?  please don't mark this ques as off topic or duplicate. I need a clear understanding on this.


Split string by right closing parentheses

I'm trying to split a string in java based on brackets with the possibility that there are nested brackets, example: "{one two {three}}{one {two} {{three}}}"  what I would like to get is an array with array [0] = {one two {three}}  array [1] = {one {two} {{three}}}  I tried using the \ {(. *?) \} Regex but I get substrings like {one two {Three}  which do not take into account which is the correct closing parenthesis How can I do it?


Is there a way to recover all bookmarks in chrome after formatting PC?

I found answer for this question but not getting the satisfied answers. I am using Windows 7.


when i render arabic text from my oracle DB it looks like this:  ������� ������  even though i use windows-1256 encoding.  btw: arabic text that doesn't come from the DB is rendered correctly


Limit of the difference between two exponential functions

Find the limit $$\lim_{x \to \infty}\left((x+3)^{1+1/x}-x^{1+1/(x+3)}\right).$$   I did nothing by now.


JavaScript addEventListener function with parameters

I am wondering if there is a way to pass a function with parameters into an JS addEventListener? I have tried directly binding a function with parameters to addEventListener, but the listener does not work and executes the function right away without the event being triggered.   document.getElementById("button1").addEventListener("click", test1("text I would like to pass"));  function test1(text) {   console.log(text); } <button id="button1">Click Me</button>    The listener would work if the function bound does not contain any parameter:   document.getElementById("button1").addEventListener("click", test1);  function test1() {   console.log("text I would like to pass"); } <button id="button1">Click Me</button>    I have also tried doing the same thing using onclick but the same scenario happens. In that case, how do I bind a function with parameters to addEventListener then?


Sometimes you will not get a runtime error when you access your array out of range in C code. such as:  char array[1024]; char* ptr = array; *(ptr-10) = 'a';  //or  *(ptr-4096) = 'a';   Assuming the array is on the stack, I am curious about what is the MIN SIZE that will let *(ptr-SIZE) = 'a' throw a segmentation fault in any situation?  for example:  *(ptr-4096*1024) = 'a' // this will always throw a segmentation fault *(ptr-4096*8) = 'a' // sometimes this will not throw a segmentation fault   2017/1/10, new added:  I feel sorry for not stating the question clearly. : (  What I want to know is not just a ambiguous UNDEFINED. Assuming the stack is high, and heap is low. So the memory layout will be:  high *********      * stack *  <-  my array goes here      *********      *       *      *       *  <-  ptr may be here      *       *      *********      * heap  *      *********      * ???   *  <- ptr may be here      *********   Of course I know that     The problem is that C/C++ doesn't actually do any boundary checking with regards to arrays. It depends on the OS to ensure that you are accessing valid memory   So, the code above will cause the OS kernel invoke do_page_fault, and will try to find vma of the address, and check if the vma->vm_start < address.   Now, let's come back to the question I asked: the MIN SIZE that will let *(ptr-SIZE) = 'a' throw a segmentation fault in any situation. In other word, I want to know the SIZE that the do_page_fault can afford. It is nothing about the C compiler, but how your OS protects your memory.


Where to ask a question about multiple websites running on the same codebase

I don't know where to ask this question on the Stack Exchange Network.    I think that the answer would be too long and maybe too general.   I don't know whether if it should be asked only once as a complete question or if I should separate it into more than one question.  The Question:     I have a php website that is hosted online. I want to use the website php files to build more than one website using the same main php files. Something similar to the Exchange Network. To be more specific I mainly want the following features in my website.         Use the same php files on the main server to build the other websites.         I don't want to copy the php files to the other servers. So when i change a file in the main server the change is applied on the other websites.   The other websites will be on different domains, or maybe sub-domains. i.e: if the main website has the domain www.example.com, the other websites' domains could be info.example.com or www.example2.com.   Every website has it's own database which stores only it's data.   If the user registered on one of the network's websites, he is registered in all of the network's websites. i.e: if the user registered in the website www.example2.com, and then he opened the website info.example.com for the first time in his life, the info.website.com should consider him as a current user in the network.   Every one of the websites has a special settings that differs from the other websites of the network. For example, the page's title and the welcoming sentence both exist on all the networks' websites, but they are not the same in content.


I'm reading a csv file which is about 1 GB but it winds up taking over 10 GB of memory. Since DictReader returns an iterator over dicts, each of which has the elements of the header string encoded as keys, I can imagine lines taking up twice as much space (~1 GB) but ten times as much? This confuses me.  import csv  def readeverything(filename):      thefile = open(filename)      reader = csv.DictReader(thefile, delimiter='\t')      lines = []       for datum in reader:          lines.append(datum)      thefile.close()       return lines   The size of the raw string is actually smaller than the size of the parsed dict. I found this out using sys.getsizeof on the first line in the file and on the first record read by csv.DictReader. Therefore, the strict size of the dictionary does not account for the exponential explosion of memory usage when reading the CSV.


PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'semaphore' doesn't exist

I am having problems migrating my site to a production server. It's build in Drupal 7. I used the backup and migrate plugin to export the DB. The development server is Windows with Wamp installed and the production server is CentOS with Cpanel.  These are the errors I am getting:     Error The website encountered an unexpected error. Please try again   later. Error message PDOException: SQLSTATE[42S02]: Base table or view   not found: 1146 Table       'fosagams_co_za.semaphore' doesn't exist:   SELECT expire, value FROM   {semaphore} WHERE name = :name; Array (   [:name] => variable_init ) in    lock_may_be_available() (line 167 of   /home/balabalab/public_html/includes/lock.inc). Uncaught exception   thrown in shutdown function.      PDOException: SQLSTATE[42S02]: Base table or view not found: 1146   Table      'fosagams_co_za.semaphore' doesn't exist:   DELETE FROM  {semaphore} WHERE (value = :db_condition_placeholder_0) ;   Array (      [:db_condition_placeholder_0] =>   191980980751f69eddeb26b7.24464293 ) in  lock_release_all() (line 269   of /home/balabalab/public_html/includes/lock.inc).   I did however verify that the semaphore table exists. I am out of ideas, any help would be appreciated.  Thanks in advance.


Why does my object become so rounded when adding a Subsurf modifier?

So, I've got about... 2 hours of Blender Experience as of right now. I did try searching for the answer to my issue in a few different places, but I'm not totally sure I know what to look for.   This is my object:    And this is what happens when I apply the Subdivision Surface Modifier:    As you can see the lid becomes significantly more round. I know I'm doing something wrong, but I'm not sure what. Should the lid be a separate object? Or is the issue something else entirely? I apologize if this is a really stupid question.


Recently released from prison and didn't file taxes for two years. How do i file no income?

Should I file taxes with no income because of being in prison? What about the stimulus checks? Do I need to file taxes to receive it?


How can I prove that the space $l^{p}$ equipped with the norm (for $x=(x_{n}) \in l^{p})$: $\|x\|_{p}=(\displaystyle\sum_{n}|x_{n}|^{p})^{1/p}$ Is a separable space? (i.e. showing that there is a countable dense set in $l_{p}$). I saw a proof in which they started with first letting $x=(x_{n})$ be an element of $l^{p}$ and for any $\epsilon >0$, then they chose $N$ such that: $(\displaystyle\sum_{n>N}|x_{n}|^{p})<(\frac{\epsilon}{2})^{p}$ However, I'm not sure where does this come from. As well, I'm not sure how to proceed from this step. Thank you for your help!


How can I sort pictures in a folder based on similarity?

I have many duplicate photos in a folder. How can I sort the pictures in a folder by similarity? i.e., sorting not based on the file name or date, but based on similarity of image?


How can I create a function in zsh that calls an existing command with the same name?

How can I write a function in zsh that invokes an existing command with the same name as the function itself? For example, I've tried this to illustrate my question:  function ls  {     ls -l $1 $2 $3 }   When I execute it with ls * I get the following:  ls:1: maximum nested function level reached   I assume this is because the function is being called recursively. How I can avoid that?  This is a crude example, and in this case an alias would do the job, but I have a more complex example where an alias isn't suitable and so I would need to write a function.


Formal proof that a complete graph $K_n$ is Class 1 if n is even and it is Class 2 if n is odd.

Recall that from Vizing's theorem, the chromatic index $\chi'(G)$  can only be either $\Delta(G)$ (we call the graph Class 1) or $\Delta(G) +1$ (Class 2). My question is regard to determining the class of a given complete graph $K_n$. I don't know how complicated this question is, so it is very appreciable if there is a suggestion for me to tackle this.


Refresh a Lightning Web Component when fields of a lead record are edited

Is there a way to refresh a lightning web component after a record has been edited? I have a LWC on a lead record layout, and I want the LWC to be refreshed when I edit fields in that lead record without having to click the refresh button of the browser?


My teacher told me, when you pluck the string which is being stretched from two sides, it means there is tension in it. When I compress it from both ends, there is no tension in it. What does that mean?


Prove determinant of a matrix $=\prod_{j<i}(a_i-a_j)$

Prove that $$\begin{vmatrix} 1 & 1 & \cdots & 1 \\ a_0 & a_1 & \cdots & a_n \\ a_0^2 & a_1^2 & \cdots & a_n^2 \\ \vdots & \vdots & \ddots & \vdots \\ a_0^n & a_1^n & \cdots & a_n^n  \\\end{vmatrix}=\prod_{j<i}(a_i-a_j)$$. I have trouble with this, I thought it'd be doable with Laplace's theory but I fail to understand it.


Uniformly Continuous Function sending Bounded Set to Unbounded One

Let $(X,d)$ and $(Y,\rho)$ be metric spaces, and let $f: X \to Y$ be a uniformly continuous function. If $A \subset X$ is bounded, must $f(A) \subset Y$ be bounded?  It is clear to me that in metric spaces that satisfy the Heine-Borel property, such as $\mathbb{R}^{n}$, the answer to this question is yes. However, I can see no reason why this should hold for arbitrary metric spaces. Any ideas? Thanks!


I'm trying to make a navbar with a button and an icon of an hamburger menu. I put both divs inline but they risulted disaligned vertically. I can't find the mistake. What did I do wrong?   html, body{      padding: 0;      margin: 0;         }    .riga{      display: block;      }   .bg_grigio{       background-color: gray;          }   .testo_a_destra{       text-align: right;        }   .pulsante{       border-radius: 20px;       padding: 10px;       text-align: center;      }  .verde_vuoto{      border: 2px solid #0a5537;      background-color: inherit;      }  .div_inlinea{      display: inline;      margin-left: 40px;     }  .icona img{     width: 4%;     }  #riga_logo{     padding-top: 20px;     padding-right: 20px;     height: 50px; }

Order Benugo Delivery


Is it possible to calculate sine by hand?

Without a calculator, how can I calculate the sine of an angle, for example 32(without drawing a triangle)?


$a^n +1$ prime, then $a$ is even and $n$ is a power of $2$

I stumbled upon  problem and thought I would try to finish it (it did not get answered in the previous post), but the part with $n$ a power of two seems rather tricky. The problem is as follows:     Let $a$ and $n$ be positive integers with $a > 1$. Prove that, if   $a^n+1$ is a prime number, then $a$ is even and $n$ is a power of $2$.   Suppose $a$ is odd. Then $a=2k+1$ and therefore $a^n+1$ is even, hence not a prime. So $a$ must be even.  Now, by way of contradiction, suppose that $n$ is a power of $2$ but $a^n+1$ is composite, i.e. $$a^n+1=mk$$ for some integers $m,k$. Then $a^n=mk-1$, and since $a \mid a^n$, we must have $a \mid mk-1$. Hence $ak'=mk-1$, or $ak'+1 =mk$. I was hoping this would land a contradiction, but I can't seem to find it.  I also tried proving by contrapositive, i.e. assuming that $n$ is not a power of two and then showing that it wasn't a prime, but this did not seem to bring about much.  Any ideas?


I have some golden syrup in a plastic bottle, all looks normal. It has a best before date Feb 2010. Is it still ok to feed to kids on pancake day February 2015??


I am writing a document with LaTeX covering the basics of programming with C++ and unfortunately the '+' signs look kind of ugly to me: They seem to be too big, too thin (regarding the rest of the text) and also shifted downwards.  Here is a screenshot from my document (which is written in German):    The issue with the thickness is not visible here, because one has to zoom out to notice. The example is from a \section{}.  Are there any ways to do better? I haven't found a special '+' LaTex command, so I assume one has implement one's own solution.


I was taking a look at the post  and one of the answers says:     Others have mentioned the protection against user definition / redefinition.   And I want to know if that is true, with a source if possible. Is it possible to modify a command that starts with the "at" sign?  More specifically, I am using the  file. I want to modify the \bf Editor on the line that starts with \def\@starteditor, but I want to modify it on the .tex file, instead of modifying it in the jmlr2e.sty file.  \def\maketitle{\par  \begingroup    \def\thefootnote{\fnsymbol{footnote}}    \def\@makefnmark{\hbox to 0pt{$^{\@thefnmark}$\hss}}    \@maketitle \@thanks  \endgroup \setcounter{footnote}{0}  \let\maketitle\relax \let\@maketitle\relax  \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax}  \def\@startauthor{\noindent \normalsize\bf} \def\@endauthor{} \def\@starteditor{\noindent \small {\bf Editor:~}} \def\@endeditor{\normalsize} \def\@maketitle{\vbox{\hsize\textwidth  \linewidth\hsize \vskip \beforetitskip  {\begin{center} \Large\bf \@title \par \end{center}} \vskip \aftertitskip  {\def\and{\unskip\enspace{\rm and}\enspace}%   \def\addr{\small\it}%   \def\email{\hfill\small\sc}%   \def\name{\normalsize\bf}%   \def\AND{\@endauthor\rm\hss \vskip \interauthorskip \@startauthor}   \@startauthor \@author \@endauthor}    \vskip \aftermaketitskip   \noindent \@starteditor \@editor \@endeditor   \vskip \aftermaketitskip }}  \def\editor#1{\gdef\@editor{#1}}


A student is applying to a PhD program in Computer Sciences at Harvard and MIT. He estimates that he has two out of three chances of being accepted at Harvard and two out of five chances at MIT. He further estimates the probability that he will be accepted by both has probability of one to five. What is the probability that he is accepted by MIT if he is accepted by Harvard? Is the event "accepted by MIT" independent of the event "accepted by Harvard".  I don't understand if these are odds or probabilities


Correct way to disable /node in Drupal 7?

I find going to /node as being very useful to pinpoint exactly what content non-authorized users can see. But for two reasons I don't want anyone to access "/node".   I don't want that to end up in Google Search Results. I don't want prying eyes to go through each and every content in case something should accidentally not have been made public.   So my question is: what is the most correct way to block /node? Or should I keep it open and rather let robots.txt avoid that path?  UPDATE  To make matters worse, it seems I have set everywhere in my permissions that certain content types must not be viewable by certain roles. However, those pages are still showing up under /node ?


Proof for : How many numbers cannot be expressed as a sum of two numbers which are chosen from a given set.

We are given two numbers $a,b$ and  a range of numbers from $[b,a+b-1]$ where $b\geq1$ and $a\gt2 $. We can add any two numbers $p,q$ (not necessarily distinct) in the range to form more numbers and add them to the set. How many numbers cannot be formed even after performing these operations infinite number of times.  My Approach is this:  Two cases arise when $a\geq b$  and  $a\lt b$ 1.) $a\geq b$ , here the answer is simply $b-1$. 2.)$a\lt b$ is where I have found a series but it may always not satisfy every case.  The series is an Arithmetic progression with last term as $ b-1 $ , common difference as $ a-1 $ and number of terms  as $b-1/a-1$ .  I am not sure about this formula and hence would appreciate a mathematical proof.  3.) There is also a special case when $a=2$ , then for some $b$ the number of values which are cannot be formed gives us the the triangular number series i.e $(1,3,6,10,...)$ but this would be handled by a generalised formula , which i am still doubtful about.   Any proofs or suggestions ?


I am trying to move the data directory of my MySQL database to a second disk array that I have as a mount point /array2/.  The problem I am having is I have tried everything and after I modify the location of datadir in my.cnf mysql will not start up again.  All I get is:  start: Job failed to start


What word to choose as the opposite of "self-aware"?

What word would describe the quality of not being self-aware?   unselfaware unself-aware un-selfaware un-self-aware non-self-aware   I am aware that .  However, the Oxford English Dictionary lists self-aware as a hyphenated word, whilst unaware is not. Therefore, I am unsure which of these options to choose. Or perhaps there is a better word?


Why $\lim_{x \to ∞} 1^x=1$ even though $1^∞$ in indeterminate? I'm genuinely not getting it. Any help is appreciated!


Why is "bicycle" pronounced differently from other obviously related words?

The word bicycle is pronounced /'baɪsɪkəl/ (bahy-si-kuhl), like sickle. However, the words unicycle and motorcycle both have the -cycle pronounced as /-'saɪkəl/ (sahy-kuhl). Is there some sort of reason for this, or is this just a vagary of English pronunciation?


Is it possible for a physical object to have an irrational length?

Suppose I have a  that is infinitely precise. Also suppose that this caliper returns not a number, but rather whether the precise length is rational or irrational.  If I were to use this caliper to measure any small object, would the caliper ever return an irrational number, or would the true dimensions of physical objects be constrained to rational numbers?


Minor "you have already raised this type of flag" bug?

I flagged something as spam, then was only 90% sure I'd done so, so I clicked the flag link again to check. It showed me this:    I had, of course, only raised the spam flag, not the offensive/abusive/hate flag, so the latter probably shouldn't be saying I did.    Ah, this may be a duplicate, I didn't search enough:        And if so, it's been around a while.


Apologies if this is a duplicate post.  I did try searching to see if someone already asked/answered this but didn't find anything.   What does || mean in bash?  For example, in researching steps to troubleshoot a driver issue, I came across this command:   modprobe -q vmxnet3 && echo "vmxnet3 installed" || echo "vmxnet3 not installed"  I get that the first part is querying modprobe and returning a response of "vmxnet3 installed" if it receives a successful return code... but... what's the last part doing?


Let $X$ and $Y$ be two topological spaces.   Prove that for any $A\subseteq X$, $f(\overline{A})\subseteq\overline{f(A)}$ , if and only if $f: X \to Y$ is continuous.   I am stuck on the converse. Suppose $f: X \to Y$ is continuous. Then for every closed set C in Y, $f^{-1}(C)$ is closed in X.   WTS  for any $A\subseteq X$, $f(\overline{A})\subseteq\overline{f(A)}$.     Since $\overline{f(A)}$ is a closed set in Y, $f^{-1} \circ \overline{f(A)}$ = $ \overline{ f^{-1} \circ \overline{f(A)} }$  Also, $f(\overline{A}) \subseteq \overline{ f(\overline{A})}$


Type D Schengen Visa Technicalities Issues 3rd Countries

I have read several threads regarding type D visas but that doesn't seem to answer my seemingly specific question.  I am working in the Philippines for an international company and I have been granted a 1 year, multiple entry German Type D Visa with working permit valid until Feb 10, 2019 to perform work with one of our clients.   I have already been in Germany, finished my assignment for the time being and now I am back to the Philippines. Therefore I used the visa it was intended for the first time.  Currently I've been invited by my close friends to visit them (social visit) in Norway from Dec 15, 2018 to Feb 1, 2019. It means that I'm planning to travel to Norway while my German Type D Visa is still valid. I am willing to apply for a Norwegian Short Stay Visa however it might be all for naught as I still have a valid Type D visa.   I would like to know your inputs if it's possible to travel to Norway (Schengen area) with probable point of entry via Amsterdam. using a valid, multiple entry German Type D visa without applying for a Norwegian Short Stay Visa? if so, what kind of critical supplemental documents I might need?  I'm quite afraid that I might miss some technicalities and might cause some issues in the border control.  Additional to that, is the 90/180 still counts at this point? previous threads mentioned this quite a lot but I read      Article 6   Entry conditions for third-country nationals         For intended stays on the territory of the Member States of a duration of no more than 90 days in any 180-day   period, which entails considering the 180-day period preceding each day of stay, the entry conditions for third-country   nationals shall be the following:   (a) they are in possession of a valid travel document entitling the holder to cross the border satisfying the following   criteria:   (i) its validity shall extend at least three months after the intended date of departure from the territory of the Member   States. In a justified case of emergency, this obligation may be waived;   (ii) it shall have been issued within the previous 10 years;   (b) they are in possession of a valid visa, if required pursuant to Council Regulation (EC) No 539/2001 (1), except where   they hold a valid residence permit or a valid long-stay visa;   For the purposes of implementing paragraph 1, the date of entry shall be considered as the first day of stay on the   territory of the Member States and the date of exit shall be considered as the last day of stay on the territory of the   Member States. Periods of stay authorised under a residence permit or a long-stay visa shall not be taken into account in   the calculation of the duration of stay on the territory of the Member States.      Help or inputs regarding this matter are appreciated. Also I attached my visa details for referrence


How can the executable name of a program listed in a Dash search be determined?

Searching on the dash, I can see the program listed as "Personal File Sharing". How can I find the executable name of this program such that it can be launched in a terminal?


I have a list as input, like this:  lst = [1, 10, 100, 2, 20, 200, 3, 30, 300]   Every three element is a subgroup, and I want to split them into subgroups, like this:  lst[0:3] # => [1,10,100] lst[4:6] # => [2,20,200] lst[7:9] # => [3,30,300]   What is the elegant way of doing it?  I only find this:   I can certainly achieve this by the code about, but this falls short when the input comes with more arguments, like   lst = [1, 10, 100, 2, 20, 200, 3, 30, 300, 4, 40, 400, 5, 50, 500 ...]   I think maybe reshape() would be a good way?


I'm trying to run  sed -i "/$variable/c \$variable1' file.txt   But it's not displaying any change in the file: file.txt.  But the same command, with out the variables works fine:  sed -i "/variable/c \variable1' file.txt


The charachter * gives weird effects in strings

Then a string variable in Bash has * in it, it lists the current directory. Why and how to I include a * in a string?  I'm trying to make a script that creates a sql-statement in a variable and when I tried to add a * to the string it went all bananas and added all the names of all the files in the current directory instead of *.I have tried to escape the character but it has been futile so far. I managed to reproduce the somewhat unexpected behavior with some more basic code.  #!/bin/bash  test="select * from cars" echo $test   When running the code (./test.sh) above on my wm i get(which is the content of the current folder with select before and with cars after select Desktop dev.sh Documents Downloads elasticsearch-7.0.1-amd64.deb examples.desktop getgoogle.sh IdeaProjects java_error_in_IDEA_21052.log java_error_in_IDEA_3238.log kafka_2.12-2.2.0 kafka_2.12-2.2.0.tgz kafka-connect Music output.txt Pictures Public snap spark-2.4.1-bin-hadoop2.7 spark-2.4.1-bin-hadoop2.7.tgz Templates test.sh test.txt Untitled.ipynb Videos from cars  Now I'm definitely not a bash expert and the answer is probably obvious to an expert but I have no idea what cause is and how to proceed.   Best regards Olle


Use session variable as reference to session user on PostgreSQL session

I would like to build an authorization system to handle role-based permission within the database itself.  Basically, I want my application user to have different access. The problem of basing this on Postgresql users is that if my application has millions of users, then I must have million of Postgresql users with potentially different connection parameters every time, making unable to use any kind of connection pooling (stop me if I am wrong).  So instead I thought I should base this on roles, but since roles don't have much effect on row security (which is my primary purpose here), I can just go on and create a session variable containing the user identification upon querying. Meaning if I want to do a select on some table. My application (actually a REST API) would do the following:  SET SESSION app.user = 'my user' SELECT * from table   It would add the SET SESSION for every request to the database. If table has the proper row security, this would get the rows from table that belongs to 'my user'  I want to know if this solution makes sense and if I understood the concept of SQL session properly, any big performance impact to expect?  Edit: The question  describes the details implementation on how to go about implementing a full authorization system. I want to know if I can use a session variable, to identify my user and reuse it somewhere later in my query, instead of just using role to identify a specific user. I changed the title to make this clearer.


How do I upgrade from Ubuntu 16.04 to the latest?

After trying to add the repositories for 16.10 it doesn't even show up in the sources. After running terminal for the upgrade it stated:   org.freedesktop.PolicyKit.Error.Failed: ('system-bus-name', {'name': ':1.87'}): org.debian.apt.update-cache


Is there a way to run Python on Android?

We are working on an  version and this platform has a nice Python API..  However, there is nothing official about Python on Android, but since  exists, is there a way to let the snake and the robot work together??


How to have matrices side by side in latex?

I'm new to latex and all of my matrices seem to be created on new lines, I can't seem to put them side by side.  Here is what I am doing to make a matrix (with the 2d identity matrix as an example):  \[ \left( \begin{array}{cc} 1 & 0 \\ 0 & 1 \end{array} \right) \]   Am I making it wrong?  How can I place a second matrix directly beside this, as you would when doing matrix mathematics?  Thanks


App Version: 1.6.2.5 Device: iPhone 5s (Global) OS Version: Version 10.2.1 (Build 14D15)


How do I close entries in my alt-tab menu?

That's right, I want to close a bunch of stuff using my alt-tab window, quickly.  Let's say I have a bunch of windows open in an image editing program, for example:    I'd like to have a hotkey (e.g., CTRL+W) I can press while the alt-tab menu is up that will close the currently selected window.  Is a hotkey for this?


Is it possible to make a bijection $ [0,1] \rightarrow[0, \infty)$?

I found a lot of problems of bijections like $[0,1) \rightarrow[0, \infty)$. But I don't find ant of these:     $$\text{Is it possible to make a bijection  } [0,1] \rightarrow[0, \infty)? \text{ If yes, find at least one bijection.} $$   Can anyone help?  My work: I found one function: $f(x)=\frac{1}{\left( x-\frac{1}{2} \right) ^2}-4$. What about $f(x)=\frac{1}{\left( x-1 \right) ^2}-1$?


When using the ObsoleteAtribute in .Net it gives you compiler warnings telling you that the object/method/property is obsolete and somthing else should be used. I'm currently working on a project that requires a lot of refactoring an ex-employees code. I want to write a custom attribute that I can use to mark methods or properties that will generate compiler warnings that give messages that I write. Something like this  [MyAttribute("This code sux and should be looked at")] public void DoEverything() { }   <MyAttribute("This code sux and should be looked at")> Public Sub DoEverything() End Sub   I want this to generate a compiler warning that says, "This code sux and should be looked at". I know how to create a custom attribute, the question is how do I cause it to generate compiler warnings in visual studio.


Possible Duplicate:          What is the meaning of this sentence - "Were it not for the bodies there on the ground, it would have appeared to be a normal day at the oasis."?  Does it mean something like this - If the bodies were not there on the ground, it would have appeared to be a normal day at the oasis.  Can anyone also explain the structure of this sentence and example of some similar sentences?


I'm trying to create a tkinter program and I would like to know if tkinter has a OnQuit function or something similar. I would just like to know when the user quits the window.


We often say that the conservation of the energy could be violated by a quantity $\Delta E$ but only within a precise interval of time $\Delta t$, dictated by the Heisenberg principle ($\Delta t \lesssim h/\Delta E$). But in the Heisenberg principle it seems that the $\Delta t$ should be greater, not lesser, than this:  $$ \Delta t \cdot \Delta E > h/4\pi.$$ How could I explain all this in plain words to my students?


I have a project on Overleaf and I am using bibtex for managing my references. This has a .bib file. I want to put the paper on arxiv and they want me to add a .bbl file not .bib. How can I convert .bib to .bbl ?


Convert Fade In-out Transition to Crossfade with concating Video in FFMPEG

I refer this  for concating videos with fade in-out Transition. But for CrossFade it was not doing any concate function.   Fade in Fade out Transition code  [-y,  -i, /storage/emulated/0/Received/MP4_20190220_114210.mp4,  -i, /storage/emulated/0/Received/MP4_20190220_114036.mp4,  -i, /storage/emulated/0/Received/VID-20190407-WA0001.mp4,  -filter_complex,   [0:v]scale=iw*min(480/iw\,480/ih):ih*min(480/iw\,480/ih),pad=480:480:(480-iw*min(480/iw\,480/ih))/2:(480-ih*min(480/iw\,480/ih))/2,setsar=1:1,fade=t=out:st=22.958:d=0.5[v0];  [1:v]scale=iw*min(480/iw\,480/ih):ih*min(480/iw\,480/ih),pad=480:480:(480-iw*min(480/iw\,480/ih))/2:(480-ih*min(480/iw\,480/ih))/2,setsar=1:1,fade=t=in:st=0:d=0.5,fade=t=out:st=37.208:d=0.5[v1];  [2:v]scale=iw*min(480/iw\,480/ih):ih*min(480/iw\,480/ih),pad=480:480:(480-iw*min(480/iw\,480/ih))/2:(480-ih*min(480/iw\,480/ih))/2,setsar=1:1,fade=t=in:st=0:d=0.5,fade=t=out:st=16.846:d=0.5[v2];   [v0][0:a][v1][1:a][v2][2:a] concat=n=3:v=1:a=1[vTemp][aTemp],  -map, [vTemp], -map, [aTemp],  -vcodec, mpeg4, -shortest, -preset, ultrafast,   /storage/emulated/0/Video/Video_1563274780403.mp4]      I need to convert this code to crossfade Transition   How to concate this videos with Crossfade Transition  Your help would be appretiated.


prove that $\sum_{n=0}^{\infty} \frac{x^n}{n!} > 0$

I can't assume that this is the series representation of $e^x$. I know how to do this for the case where $x\geq 0$. I'm struggling with the case $x < 0$. I have tried to split the series as   $\sum_{l=0}^{\infty} \frac{x^{2l}}{(2l)!} - \frac{|x|^{2l+1}}{(2l+1)!}$  but it doesn't seem to work. Any hint?


I have this kind of text:  /&gt; 23 visível (diagonal)&lt;br /&gt; Energy Star&lt;br /&gt;   I want to convert it to a real texto to show on browser....  I've tried htmlentities method, but i'm getting this:   23 visÃƒÂvel (diagonal)  Energy Star   And i should get:  visível (diagonal) Energy Star


Set default python to 2.7 instead of 3.6 (Anconda & catkin_make)

running python from terminal gives python 3.6, even though the sym link in usr/bin for python is set to 2.7. I also don't see an alias for python installed, when I type alias in the terminal. catkin_make seems to use python 3.6 instead of the 2.7 that it needs...   I only find posts how of how to set ubuntu to default to 3.6. ... what do I do the other way around, to default back to 2.7 after I installed Anaconda?  Edit:  this worked to get the default python command to call python 2.7 again., but catkin_make still calls the 3.6 python...


What is the difference between can and could in 'Can/could you please explain this to me?'

Can you please explain this to me?          Could you please explain this to me?   I am unable to figure out which to use which situation. I did google, and some posts say they are both the same, even if the second one is more formal. Other posts say could is the past tense of can, but in the above example, I don't think could is used as past tense of can.  What is correct way to use these words?


Is there a filesystem that is "friendly" to both windows and Linux?

Possible Duplicate:          I'm planning to install Ubuntu 10.04 with Windows 7. (I'm new to Linux, have to use at work so I'm planning to install it at home to learn more)  I plan to use a partition to my Windows system files (C:), another for my personal files that already exists (D:) and a new one for Linux.  I want to have a partition for my personal files that works across these systems - so, if I boot with Windows or Linux, there are the same "Videos", "Pictures", "Projects" folders.  Is it possible? Is there a hd filesystem capable of having writes from both systems without too much risk of corrupting or something? (Can't be FAT32, I need to store >4gb files). I've read some  of corruption, and would like to know from a other people's experiences some POV about all the risks involved in such scenario.


Is there any text editor which supports Markdown (Ask Ubuntu's formatting style)?

Is there any text editor with support for  () which can be used to write questions or answers while you are offline?


Run python Script that reruns every 4 hours at system startup

I am fairly new to ubuntu/linux and python so I beg forgiveness in advance.  I have a small python script that I typically start in a terminal screen.  This script runs a simple task then sets a timer to run the same task again in 4 hours.  I want to run this in the background and I also want it to start running when the server boots.  I am sure this question has been asked before, but I have not had much luck finding the solution.  Any help would be greatly appreciated.  Basic cod below.  import os import datetime from threading import Timer  x = datetime.datetime.today()  if x.hour+4 > 23     do some stuff else     do other stuff  Function()     Repeat above stuff  t = Timer(sec, Function) t.start()


How to get hard drive serial number from command line?

From the Windows NT-based (Windows XP and 7 specifically) command prompt, how can I get the serial number of a hard drive as a variable? The one I'm looking at is the serial number of the physical hard disk drive


What's the difference between: "I'm having a headache" and "I have a headache"?

Is there any difference between the following sentences?  1 I'm having a headache.   2 I have a headache.


Word for an idea that is often touted as true but in fact the opposite is true?

I'm looking for a word that describes an idea that is often held out as true or used as a rationale though in fact the opposite is true. Something like "common misconception" or "antipattern" come close, but I feel as though there's a better word I'm missing.  Examples:  "Refusing to use popular security algorithms because everyone knows how they work is a [word], since it is because everyone knows how they work that they are so safe."  Not necessarily saying I 100% agree with the following, but someone who advocates for Keto might say this:  "Trying to lose weight by cutting out fat is a [word], because replacing carbohydrates and proteins with fat allows the body to enter ketosis, which is one of the best states for losing weight."  Thanks in advance.


Java: when would I ever want to use static methods when I can use a singleton instead?

Having read , none of the answers list any advantages for using a static method over a singleton, which leads me to wonder why anyone would ever want to use static methods.


Where can I find a complete reference for the $PS1 variable?

The default PS1 variable on my machine (Kubuntu 13.10) is this:  \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$   I'm looking for a reference for how the $PS1 variable works that, at a minimum, allows me to understand the above PS1 variable.


Calculate execution time of a SQL query?

I am providing search functionality in my website, when user searches a record then I want to display the time the query taken to get the results same as google does. When we search anything then google displays how much time it takes to get results?  For this I have declared a @start variable in my SP and finding the difference in the end, as below;  DECLARE @start_time DATETIME  SET @start_time = GETDATE()  -- my query SELECT * FROM @search_temp_table  SELECT RTRIM(CAST(DATEDIFF(MS, @start_time, GETDATE()) AS CHAR(10))) AS 'TimeTaken'   Is there any other easy and fast way, or a single line of query with which we can find out the time a query taken to execute?  I'm using SQL Server 2005.


So I have a laptop that originally had Windows 7 installed on it-which was upgraded to Windows 10 when Microsoft offered it for free.  I want to replace the actual hard drive with an SSD.  However, I'm getting different advice among people on how to reinstall Windows without having a problem.  I created a recovery drive using the Windows 10 utility. It clearly says on Microsoft's website that with this recovery drive: "you'll be able to use the recovery drive to reinstall Windows 10".  However, I've been told by some people that what I need to do is create a Windows 10 installation media from the .iso file from Microsoft's website.  So I am confused, will my actual recovery USB be fine just to reinstall Windows 10 on the laptop? What about the license key? Because what I most likely have is just the Windows 7 key that was initially on the computer, unless that even the original Windows 7 key was digital. I do not know the actual Windows 10 key that the laptop has at the moment.


Does an open subset of $R^n$ exist that has dimension less than $n$ in the standard topology? All the less than $n$ dimensional subsets I can think of are not open.