Rastercalc.py and Rastercalcengine.py

Question: Is there any examples on how to use the rastercalc.py or rastercalcengine.py? And what are the purpose of these python module? Are these modules the same with gdal utilities which can be run in command line? Can I use from any of these two modules in subtracting two raster images?
Answer: Usually I use the raster calculator manually, in my case for give more weight to one value in a shp or a raster, also for calculate the IRNV in some raster.
if you want to automatice some task (in the case of the IRNV) you must use the map algebra toolset instead.
Sorry, thats all i know about it [and also sorry for my english :( ]

Rastercalc.py and Rastercalcengine.py


Windows SBS 2008 to Windows Server 2012 migration

Question: I am in the process of upgrading my Windows SBS 2008 server running Exchange, Active Directory and as a File server to Windows Server 2012 essentials. Now I know that Windows Server 2012 essentials does not have exchange, thus I was looking to migrate the Active directory and the file server to Windows Server 2012 essentials, Then I would have a separate Virtual machine running Windows server 2012 standard with Exchange 2013. Now my question is, what should I do first? Migrate the AD and File server to Windows 2012 essentials and then after the migration is finished, I create a local move of the mailboxes from SBS 2008 to Windows Server 2012 standard running exchange 2013? or should this be the other way round?
Comment: You can't have Exchange without AD so you'll need AD first. As for the rest, it's up to you.
Comment: Ok I know that, but should I first move the exchange out of the SBS or should I leave the exchange on the SBS, and move out the AD and file server first and when these are moved to the 2012 essentials, I install another machine with server 2012 w/ exchange 2013 and migrate the exchange then ?
Answer: Microsoft has published information on migrating from SBS 2008 to Essentials 2012 and migrating from previous version of Windows to Essentials 2012 R2. However, it does not contain information on migrating Exchange. For that, refer to Microsoft's guide for migration from SBS 2008 to SBS 2011. While this guide doesn't exactly fit your particular situation, it will contain useful information that you can adapt as needed. You may also want to use the Exchange Server Deployment Assistant.
Note the following:

You must install Essentials in migration mode in order to join it to the existing domain. (See this TechNet article.)
Then you can add the 2012 Standard server, install Exchange, and migrate from the existing Exchange 2007 server to the new server.
The source SBS 2008 server must be removed from the domain within 21 days of beginning the migration.
Be aware that there may be group policy settings which will no longer be applicable in the new network, or that may conflict with group policy objects created by Essentials.

Caveat: I have not done this particular scenario, but I've done many SBS-SBS migrations and SBS-Standard server migrations.
Comment: Didn't realize I was responding to an old post. Oh well, hopefully someone finds it useful.


Asymptotic of an integral involving sine and erf

Question: In a recent paper with two colleagues http://arxiv.org/pdf/1408.5720.pdf we derived a certain integral ruling the distribution of eigenvalues spacings for a model of random matrices. The integral reads
$$
J_M(s)=\int_0^\infty dt\ \frac{\sin(s t)}{t^{M-1}}[\mathrm{erf}(t)]^M\ ,
$$
where $\mathrm{erf}(x)=(2/\sqrt{\pi})\int_0^x\ e^{-y^2}dy$ is the Error function. $M$ is a large positive parameter. I am somehow struggling to find the asymptotic behavior of this integral as $M\to +\infty$. A saddle-point approach seemed a natural candidate, but somehow the oscillating part is getting in the way (unless I am making a silly mistake). Any help would be much appreciated.
Comment: Have u tried to rescale $y/t\rightarrow \tilde{y}$  and exchange the order of integration? the $t$ integral is now doable in terms of error functions and u can use their asymptotic expansions to hopefully make the resulting integration over the unit cube doable
Comment: Thanks for your suggestion. I tried your suggested rescaling, but then in order to exchange the order of integration, I need to introduce an M-fold integral in $\tilde{y}_1\cdots \tilde{y}_M$, right? This is because the $\mathrm{erf}$ is raised to power $M$... if I do that, I can indeed perform the $t$-integral, but the resulting $M$-fold integral does not seem to be any nicer...
Answer: Here's a more heuristic approach.  For a fixed $s$, look at the graph of the integrand for increasing $M$.  You will notice that the integrand all but vanishes except for a small window near $t=\epsilon$.  Thus, it is reasonable to approximate the error function with its 2nd-order Taylor expansion in this limit. We also may replace the sine with its first-order Taylor expansion.  Thus, the integral is approximately
$$s \left (\frac{2}{\sqrt{\pi}} \right )^M \int_0^{\epsilon} dt \, t^2 \, \left (1-\frac{t^2}{3} \right )^M $$
which, for the purposes of applying Laplace's method, may be rewritten as
$$s \left (\frac{2}{\sqrt{\pi}} \right )^M \int_0^{\epsilon} dt \, t^2 \, e^{M \log{(1-t^2/3)}} $$
which may be approximated by, with exponentially small error, as
$$s \left (\frac{2}{\sqrt{\pi}} \right )^M \int_0^{\infty} dt \, t^2 \, e^{-M t^2/3} $$
Thus, the leading asymptotic behavior of the integral is
$$\int_0^{\infty} dt \, \frac{\sin{s t}}{t^{M-1}} (\operatorname{erf}{t})^M \sim \frac12 s \left (\frac{2}{\sqrt{\pi}} \right )^{M-1} \left (\frac{M}{3} \right )^{-3/2} \quad (M \to \infty)$$
What does the $\sim$ mean? The largest error occurs in approximating the erf and the sine by their lowest-order Taylor expansions.  Further expansion will result in the same power of $2/\sqrt{\pi}$, but decreasing powers of $M/3$.  The next order in the expansion in fact will be $(M/3)^{-5/2}$.  Thus we may write
$$\int_0^{\infty} dt \, \frac{\sin{s t}}{t^{M-1}} (\operatorname{erf}{t})^M = \frac12 s \left (\frac{2}{\sqrt{\pi}} \right )^{M-1} \left [ \left (\frac{M}{3} \right )^{-3/2} +O \left ( M^{-5/2} \right ) \right ]$$
A log-log plot of the relative error between the integral and this leading asymptotic behavior produces a line of slope $-1$ and thus verifies the behavior.  I did this in Mathematica for $s=2$ and $M \in [10,100]$: (sorry, not very efficiently written code)
Plot[Log[10,
  Abs[(NIntegrate[
       t Sin[2 t] (Erf[t]/t)^(10^m), {t, 0,
        Infinity}] - (2/Sqrt[Pi])^((10^m - 1)) ((10^m)/3)^(-3/
          2))/(NIntegrate[
       t Sin[2 t] (Erf[t]/t)^(10^m), {t, 0,
        Infinity}] + (2/Sqrt[Pi])^((10^m - 1)) ((10^m)/3)^(-3/
          2))]], {m, 1, 2}]

ADDENDUM
Apropos the answer added here asserting that the above result may be extended to a Gaussian-like behavior in $s$, allow me to demonstrate why this is not the case.  Here I will simply extend the above result by providing the next higher-order term.  Note that, in doing so, we need to consider both the expansion in the error function and the expansion of the sine term.
First, consider the error function term.  It so happens that the next order expansion in the exponential is
$$\log{\left ( \frac{\operatorname{erf}{t}}{t}\right )} = -\frac{t^2}{3} + \frac{2 t^4}{45} + O \left ( t^6\right )$$
Now, if we consider how we defined $\epsilon$ above, we limited the region of integration out to $m \epsilon^2 = O(1)$, or $\epsilon \sim m^{-1/2}$.  Thus, for the next-order term in the exponential, $m \epsilon^4 \sim m^{-1}$.  So for the large-$m$ limit, we may actually Taylor expand the exponential of the fourth-order piece.
However, when we do that, we must also match that with the equivalent Taylor expansion of the sine.  This requires a match to the correct order of $m$ in the asymptotic expansion - in this case, the quadratic term in the sine matches the quartic term from the error function because the quartic term has a factor of $m$ built in.  (This is commonplace - see Bender & Orszag, sec. 6.4 for more details.)
I will not do out the algebra here, which I leave to the reader.  (Truth be told - I did the high-order expansion in Mathematica.)  The result is
$$\int_0^{\infty} dt \, \frac{\sin{s t}}{t^{M-1}} (\operatorname{erf}{t})^M = \frac12 s \left (\frac{2}{\sqrt{\pi}} \right )^{M-1} \left [ \left (\frac{M}{3} \right )^{-3/2} + \frac{1-s^2}{4}\left (\frac{M}{3} \right )^{-5/2}  +O \left ( M^{-7/2} \right ) \right ]$$
And here's the expected log-log of the relative error with the slope of $-2$:

For comparison, here is the result as proposed by the other answer, using all orders of the sine function combined with the first-order expansion of the error function:
$$\int_0^{\infty} dt \, \frac{\sin{s t}}{t^{M-1}} (\operatorname{erf}{t})^M \sim \frac{s}{4} \left (\frac{2}{\sqrt{\pi}} \right )^{M} \left (\frac{M}{3} \right )^{-3/2} e^{-3 s^2/4 m} $$
Here is the log-log plot of the relative error:

Note that, while the relative error is very slightly improved over the simple leading-order expansion, it provides absolutely no additional higher-order information (as the slope is still $-1$).
The point of all of this is that there is a lot of ways to get potentially bad results.  One of them is to propose expanding the amplitude function (i.e., the sine here) without a corresponding expansion of the "phase" function (i.e., the error function here).  Higher-order terms must be obtained by balancing the expansions of the two and noting that the higher-order exponentials may be Taylor expanded by the definition of the leading asymptotic expansion.  Also, assertions made here should be backed up with numerical results, which software like Mathematica makes easy to provide.
Comment: Excellent! Thanks very much.
Answer: We can re-write the integral in the form
$$
J_M (s) = \left( {\frac{2}{{\sqrt \pi  }}} \right)^M \int_0^{ + \infty } {\exp \left( { - M\log \left( {\frac{{2t}}{{\sqrt \pi  \operatorname{erf}(t)}}} \right)} \right)t\sin (st){\rm d}t} .
$$
An application of Laplace's method then yields the asymptotic expansion
\begin{align*}
J_M (s) & \sim \frac{s}{2}\left( {\frac{2}{{\sqrt \pi  }}} \right)^{M - 1} \left( {\frac{3}{M}} \right)^{3/2} \sum\limits_{n = 0}^\infty  {\frac{{a_n(s) }}{{M^n }}}
\\ & = \frac{s}{2}\left( {\frac{2}{{\sqrt \pi  }}} \right)^{M - 1} \left( {\frac{3}{M}} \right)^{3/2} \left( {1 - \frac{{3s^2  - 6}}{{4M}} + \frac{{45s^4  - 420s^2  + 596}}{{160M^2 }} +  \ldots } \right),
\end{align*}
as $M\to+\infty$, where the coefficients $a_n(s)$ are given by
$$
a_n(s)  = \frac{{2n + 1}}{{n!}}\left( {\frac{3}{4}} \right)^n \left[ {\frac{{{\rm d}^{2n} }}{{{\rm d}t^{2n} }}\left( {\frac{{\sin (st)}}{{st}}\left( {\frac{3}{{t^2 }}\log \left( {\frac{{2t}}{{\sqrt \pi  \operatorname{erf}(t)}}} \right)} \right)^{ - n - 3/2} } \right)} \right]_{t = 0} .
$$
It is not difficult to show that $a_n(s)$ is a polynomial of degree $n$ in $s^2$. Therefore the asymptotic expansion is useful provided $s=o(\sqrt M)$.
Answer: The advice given above can be tweaked to get more detailed information. After you have made the approximation $h(t)= erf(t)/t = \frac{2}{\sqrt{\pi}} ( 1- \frac{t^2}{3} +\ldots) \approx \frac{2}{\sqrt{\pi}} e^{-t^2/3}$ as suggested above, you can note further that the integral you are interested in is
$\int_0^{\infty}  t\sin(st)   h^m(t) dt \approx (\frac{2}{\sqrt{\pi}})^m \int _0^{\infty}  t \sin (st) e^{- mt^2/3} dt = -(\frac{2}{\sqrt{\pi}})^m\frac{\partial}{\partial s} \int _0^{\infty}  \cos (st) e^{- mt^2/3} dt$ and recognize the rightmost integral as the Fourier transform of a Gaussian function, which is therefore a Gaussian in $s$.
More precisely, in order to justify modeling $H(t)=\frac{\sqrt{\pi}}{2}h(t) = ( 1- t^2/3 +\ldots )$  and its high powers as Gaussians, observe that the Morse Lemma tells us that the function $ - \ln H(t)$ that vanishes quadratically at $t=0$ can be expressed exactly as the square of some differentiable function $u(t)$ that vanishes at the origin: $ - \ln H(t) = u^2(t) =t^2/3+\ldots$. Thus $H(t) = e^{-u^2}$ exactly.
(The series that defines $u(t)=\frac{t}{\sqrt{3}}+ \ldots $ converges on some interval that contains the origin). By reversion of series we can solve for $t$ as a power series in $u$.
Recall
$ H^m(t) = e^{- m u(t)^2}$ exactly.  The integral we seek is
$ \int_{t=0}^{t=\infty}  t \sin (s t) h^m(t)  dt$  which is exactly
$$((\frac{2}{\sqrt{\pi}})^m \int _{t=0}^{t=\infty} t \sin (st)  e^{- m u^2(t) } dt $$
$$= ((\frac{2}{\sqrt{\pi}})^m\frac{d}{ds}\int _{t=0}^{t=\infty} \cos(st)  e^{- m u^(t)^2 } dt $$ This is now ideally suited to the method of analysis by stationary phase when $m$ is large, because the last integrand has a sharp peak localized at the origin. The last integral can be expressed as an integral with respect to the variable $u$, by reversion of series. However, it is already qualitatively clear that since $t\approx u$, the asymptotic behavior will be similar to the behavior of the Fourier transform of a Gaussian.
Comment: I apologize up front because I do not like to comment on another answer, but I fail to see the point or even the validity of what you are showing.  For example, how do account for the higher order terms that come from the next terms in the expansion of the error function?  How would you validate your expansion numerically?
Comment: Looking through your explanation, I am even more baffled.  At one point, you invoke Morse's Lemma (thank you for the introduction - I was not familiar with the formalism) and state that $u^2(t) = t^2/3 + \cdots$.  Then, toward the end, you state that "it is qualitatively clear that since $t \approx u$..."  Which is it?  The bottom line is that your $u$ has higher-order terms in $t$ that must be accounted for before you can bring higher-order terms in from the sine.  This will then stymie your ability to consider the integral as a FT of a Gaussian or its derivative.


PowerApps screen caching

Question: I have an app with a gallery view screen to show a list of items in a SharePoint list. If you select an item in that gallery and click on a view item icon, it opens a Display form for that item. If I want to edit that item, I click the Edit button on the Display screen. That opens an Edit form. The first time I edit the item, my current version of the Edit form displays. However, if I return to the item after making an update and submitting the form via a button, the edit screen that launches is an old version of my edit screen. I am clicking the same Edit button from the same Display screen in both instances. Has anyone encountered this behavior before, and if so, do you have any fixes for it aside from build a new Edit form from scratch?
Answer: Off the top of my head, one reason could be that your gallery is using a collection as your data source and your submit button is saving directly to your SharePoint list. If that is the case, you would need to update your collection after saving the data to the SharePoint list.
If you could provide some more detail and screenshots of your app, I think we'd be able to give you a more definitive answer.
Comment: The gallery is not using a collection. It is pulling directly from the back-end SharePoint list.

PowerApps screen caching


How do I get my keyboard back

Question: I just got a new tablet a few days ago & today I disabled a lot of apps that I knew I wasn't going to use. When I put it down 2 go eat dinner & came back, I turned it back on & when I tapped the little box to put my password in the keyboard didn't pop up. I reset it about 20 times but nothing happened. What do I do now?
Comment: What kind of reset you have used?
Comment: Also what method did you use to disable apps?
Comment: @MANI: He probably means reboot
Answer: Option 1:
Use/get a USB OTG cable and plug a USB keyboard in to type the password. After that it's a matter of finding the likely disabled keyboard app or installing a new one from the store ie op2.
You may be able to jigger up a bluetooth keyboard also if the pairing popup overrides the lock (likely not but can't say for sure myself).
Option 2:
This is assuming you can get around the lock issue which is unlikely but I figure I throw it out there in case its helpful to someone else in a similar situation that isn't blocked by a lock.
You should be able to use https://play.google.com/store?hl=en to install a keyboard remotely like: Swiftkey Keyboard or Google Keyboard.
After it installs on your device, run it from the notification tray and go through the prompts/settings to enable it. At the very least you now have a backup keyboard to use to find and re-enable the presumably disabled one.
Option 3:
This requires root and a good deal more knowledge of your system and also depends on whatever method you used (unmentioned as of writing) to disable the apps in the first place.
Get an adb shell going and get a directory listing of /data/app &| /system/app &| /system/priv-app and reverse the disabling process manually.
Option 4:
Do a full Factory Data Reset from recovery.
Typically Power+Vol Down held down to get into the bootloader and then launch the recovery from there. May vary by device (unmentioned as of writing).

How do I get my keyboard back


is there a way to extract string in XCode ios project for i18n

Question: is there a way to extract string in XCode ios project for i18n, I need to auto find strings and make localized files.
Answer: As far as I know it is only possible to auto find NSLocalizedString...(...); methods and extract the keys from them. If you haven't already used on of these macros during development, you can't extract every NSString in the Project. I am pretty sure this would always lead to broken code as you can't simply replace every NSString with an NSLocalizedString statement.
To look for NSLocalizedString stuff in your code, genstrings is the way you want to go: http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/genstrings.1.html
Answer: with a few months late (sorry): genstrings and ibtool will extract from .m or .xib your strings.
edit: oups, my bad, genstrings will only extract strings being called inside a NSLocalizedString function. Maybe that could fit your need with a search-and-replace before genstrings.


Multiple database transactions on a single connection

Question: I have a multi-threaded program whereas each thread, at the start of execution, acquires a single connection from a MySql connection pool class. The thread then uses a number of database table wrapper classes to do its business logic by passing its database connection to the wrapper classes. The operations on these wrapper classes are not necessarily sequential and I want these wrapper classes to be able to commit or rollback changes on its database table independent of each other using the single database connection. I'm aware that MySql does not allow nested transactions and have not figure out a way to accomplish this.
Any help is greatly appreciated.
Thanks!
Answer: Sounds like you have to associate the transactions with the table wrappers better than just on a thread by thread basis. IOW, you need to create a transaction class. The transaction class acquires/releases connections from/to the connection pool as the transaction opens and closes.
The transaction then become the factory for your table wrappers. Any table wrapper created by the transaction is inside the transaction since it has no access to any connection but the one the transaction is on.
The annoying part of this is keeping all the objects from accessing dead objects. Some form of SmartPtr will be needed to handle what happens when the transaction commits but something tries to use the table wrapper again.
Answer: If I understand the problem correctly I believe that your only option is to implement some kind of transaction queue that allows your multiple threads to share the single connection. Each of your threads can then add "tasks" to the queue which require execution within a transaction. You then have a process which picks these tasks off the queue (you could even implement some kind of prioritisation here) and sends them to the database before returning the results to the thread that initiated the request. The calling threads would block until they receive their results, which isn't ideal, but if you really need to have multiple threads and multiple transactions I can't see another way of doing it without having multiple connections.
Answer: Well this is a classic example of a single resource usage by multiple threads.
The solution is all about using mutexes on the mysql connection operations.
Answer: There's a connection pool, why don't you acquire more connections? And maybe use semaphores to limit the number of simultaneous connections. Else, you need to lock the single connection or use client transactions (use a framework, this is not simple and you'll need to lock the connection anyway if there's only one, but the waiting time will be very small compared to not having transactions on your code side).
Answer: The easiest solution is to just create a new connection for each thread - this is how it's typically done with Apache/PHP.
If you have far fewer writes than reads (only 1 in 10 threads needs to write), you could use one global connection for SELECTs and create a new connection for each thread which needs to update.
After that, you could perhaps have a pool of up to 10 threads used for writing (so you can have up to 10 concurrent transactions). At the end of the day, if you want concurrency then you need multiple connections.


Resultant half life of sample which contain more than one type of radioctive element.

Question: If a sample is mixed with more than one radioactive elements - for example Ra-226, Po - 210 and Cs -137, then how to estimate the resultant half life of the sample? Is there any general formula to calculate the resultant half life?
Comment: In that case there is no such thing as a half life. The sum of multiple exponential functions with different decay times is not an exponential function. There are good ways to distinguish between the different constituents by their radiation, especially their gamma spectra, if they emit gamma radiation, though.
Comment: @CuriousOne Please convert that comment to an answer.
Answer: There are several things to consider. The amount of each nuclide in the mixture will determine the overall activity at any particular time.
The total activity of a mixture of 3 nuclides would be $$A = \lambda_1 N_1 + \lambda_2 N_2 + \lambda_3 N_3 $$.
Because the $N$s are changing at different rates, there will not be a single resultant halflife for the mixture.  If you know the individual activities or populations of each, you can calculate how much time is needed for the total activity to become half, but that won't be a constant halflife in the sense we normally mean.
Comment: to go one step further, what would be the number of photons emitted. Say you had Potassium-40 (1 photons per decay) Co-60 (2 photons per decay) and Cs-137 (1 photon per decay). If for simplicity each activity is 1 Bq, does it mean that the source emits 4 photons per second? $1\frac{\gamma}{Bq}\cdot 1Bq+2\frac{\gamma}{Bq}\cdot 1Bq+1\frac{\gamma}{Bq}\cdot 1Bq=4\frac{\gamma}{sec}$
Answer: With multiple nuclide types, the radioactivity is no longer described by a simple exponential, and as a result no longer has a simple half-life. Consider a rock which has equal numbers of two isotopes A and B, A with half-life of 1000 years and B with 1 million years, each with the same emission energies. The immediate decay level of A will be 1000 times that of B, so the overall emission will be dominated by A, and will reach the halfway point in slightly more than 1000 years - in rough terms, 1001 years. However, in about 10,000 years the emissions from A will drop below those of B, and from then on B will dominate the activity of the sample, which will not conform to the expectations which would result from applying the 1001 year half-life to the standard model of exponential decay.


Control Visual Studio plugins from the command line

Question: Is there a way to control the addins Visual Studio 2008 loads via the command line?
I am looking for a way to load my DevExpress plug in when I am working with VB or C# and alternatively load Visual Assist X when I am working on a c++ project.
Answer: Not a direct answer but you can disable Visual Assist X either via the menu (VAssistX | Enable/Disable ) or via the command VAssistX.EnableDisable (both of these toggle between on and off).  Alternatively, you can add .cs and .vb file extensions to the "Extension to ignore" list in Visual Assist Options | Projects | File Handling.
Answer: There is a way to access the command line from a plugin. I think the only option, if you really want this and the plugin doesn't support it out of the box, is the write your own plugin. To do this, just read Environment.CommandLine from the OnConnection method.


Read-Only Domain Controller (RODC) in Insecure Networks - Security Benefits

Question: RODCs can be deployed in locations where physical security cannot be guaranteed, to improve the security. This is the primary use case where a RODC should be deployed.
An other scenario would be to deploy a RODC in an insecure network segment (e.g. where client systems resides), disable or not allow credential caching on the RODC and block connections from the clients to RW Domain Controllers. Obviously a connection between the RODC and a RW Domain Controller must be allowed.
Now my question for this scenario: what are the security benefits here? E.g. if the RODC gets compromised, credentials cannot be dumped or used for Pass-the-Hash attacks but RODC can be abused as jumphost to RW Domain Controllers if a high privileged users gets compromised?
Answer: The answer to your question seems to be simple. You should disable password replication this way no credentials will be cached on the RODC. RODC will make a call to RDWC any time user requires authentication.
As for the admins, they should not be allowed to login on RODC. You have the capability to create RODC admins without granting them any RDWC rights. So those two should be kept separate.


Can someone patent someone else's invention?

Question: In the history, invention conflicts were on who has patented an invention sooner. This is the subject of stealing an invention. Consider one has published an invention in any kind of media, can this give him a right for claiming in the future?
For example, someone publishes an invention (whether announcement, idea, report, etc) in a media (newspaper, magazines, journals, etc) with no intention to file a patent. Then, someone else simply file a patent for that invention. Can the first person claim and file patent for his own discovery? Or the winner is always the first application received at the US Patent Office?
The article 35 U.S.C. 102 Conditions for patentability states that patentability needs novelty, and the inventor file a patent within one year. Does this mean that after one year, someone else can modify it and add some content to submit an application for his own.
In general, I am asking if other media (not official patent) can be used for claiming an invention (e.g. at court) or only who have patented are protected?
In other words, does USPTO wish/try to ideally/legally grant a patent to its real investor, or simply the first claimer is the legal owner (no matter who has actually invented).
Comment: Could you clarify what you mean by "protection"? Are you asking if you could use other media to claim patent rights? Or to invalidate someone else's patent?
Comment: @todorojo What's the difference? I can be person A (original inventor) or person B (invention thief). I want to know what is the base of legal judgement for a patent lawsuit? First application received at the USPTO or actual invention (to prove it with published materials in media). In other words, if someone has no intention to patent his invention, can someone else patent it legally? Again, in other words, does the USPTO care if one is the real invention, or it just recognizes the first one who brought the invention at the office (no matter who has invented)?
Comment: Thanks for the clarification. Having a patent does not allow you to make or use the invention--it only allows you to exclude others from doing so. That's usually what we refer to as "patent protection". However, your question seemed to suggest, but was unclear, whether you wanted to get your own patent on the invention, or merely be free to make or use it.
Comment: @todorojo `Case 1`: I had an invention but someone else filed the application before me, does this "patent protection" protects me from future claim, or I can claim that I was the actual inventions, as have evidences in published materials. `Case 2`: someone has invented something and reported (instead of filing a patent). If I patent the invention for myself, does this hinder the actual inventor from any claim (as I was the first who officially patented).
Answer: I'll go ahead and address 1) whether you can use other media that describe your invention like a patent, and 2) whether you can use other media to invalidate someone else's patent.

Note that the law has changed to first-to-file effective March 16,
  2013. Most of the below is a pre-F2F answer. However it is still a good answer for applications filed before that date.

Other media as a patent
Other media cannot be used as a patent. You cannot sue anyone for patent infringement unless you have a patent, regardless of when you made the invention, how valuable it is, or how much money you spent on it. One must apply for a patent through the USPTO to get any protection under the patent statute. This is in contrast to copyright, where one need not file anything with the government in order to have rights in one's creation.
Other media to invalidate patent
First, 102(f) requires that one applying for a patent actually invented the invention. If the other guy really did just read your publication and went to the patent office with it, the patent should be invalid under 102(f). However, that might be hard (and costly) to prove.
Second, 102(a) says that if you published the material before he invented it, then his patent is invalid. This is also problematic, because it involves determining when he came up with the invention. However, if he didn't really invent it, he'll have a hard time coming up with proof that he invented it before the publication came out.
Third, if your publication came over a year before he filed for a patent, it's invalid. No need to determine when it was purportedly invented. This is the easiest way to invalidate a patent since it requires little investigation for evidence (you'd only need to show evidence that the publication was published when you said it was).
For applications after March 15th, 2013
Under the old patent law, if you and someone else invented the same invention in the same time frame, the first to invent would receive the patent. However, under the new law, which took effect on March 16, 2013, if someone else legitimately invented the same invention after you invented it, but before you published anything about it or filed for a patent, then he would receive the patent.
Comment: Re *"This is the easiest way to invalidate a patent"*; But no one spend their days monitoring patent applications. What if a patent application got through? Would it still then be able to invalidated at a future date after it has already been granted?
Comment: "But no one spend their days monitoring patent applications." - actually, yes, many companies do because getting a patent invalidated is way easier (cheaper, too) before the grant.
Comment: I may be missing something here but I think the real question he is asking is can someone who has not actually made the invention but become aware of the invention go ahead and apply for a patent for the invention. In other words, can someone who is not the inventor and has not obtained any rights from the inventor in regard to the invention apply for the patent?
Comment: The patent for the Laser was litigated for over 20 years.  It didn't go to the person who first came up with the idea theoretically, or the person who first made a working laser.  It got messy.  The theory was in the air, and it was up for grabs.
Comment: @DeonPHugo no, you must be the inventor in order to apply for the patent. But the PTO won't make you offer proof that you invented it, so an unscrupulous person could theoretically get a patent on something they did not invent. The patent, however, could be challenged on those grounds in the future.
Answer: In theory no, in practice yes. Here is example of crowdfunding backer actually getting (!) USPTO patent on the project he backed:
https://patentpandas.org/stories/crowdfunding-backer-patented-my-project


Is it possible to apply physics in object mode?

Question: "Here's the situation. I am not an animator or a video game creator, however, I have managed to learn how to use physics tools, rigid body, passive, active, gravity, collisions, etc. I was able to use these tools in animation, but I have not been able to transfer these tools to object mode. Let me explain better with this image. I need to move the bracket and have it adapt as best as possible to the tooth, without penetrating any walls."
Answer: It is not usually practical to use physics for this purpose, because physics are slow, and because physics need setup and tuning, which is usually more work than just doing it by hand, to eye.  But, yes, even if impractical, it is possible.

I've created a physics setup: passive sphere, dynamic monkey with mesh collision, point constrained to an animated-type cube anchor.  And I've set the frame range and rigid body cache to 15000 frames, which should be plenty.  Now I can hit play on my timeline and move the cube anchor.  As I do so, the monkey follows the cube as best it can, while respecting collision:

When I have what I want, I can use a rigid body->apply transformation operation to the monkey to write the rigid body transform to the mesh:

After that, delete its physics, and the monkey stays where it was.
So the trick is mostly, setup physics and animate things with the timeline running.  Unfortunately, that's not very practical in most situations.
Answer: As Nathan says you need to do it visually, you could for example parent the object to an empty, activate the Snap tool with Face and Align Rotation to Target enabled:

Then move the empty, stick it to the surface of the target object, create several keyframes:


The observation of a non-SM resonance at 38 MeV

Question: Was reported here. Of course if this is real it is very exciting. It leads me to the question: given that it took so long to find this resonance at a meager 38 MeV, is it possible that all SUSY particles are hiding down in the MeV or KeV range (or lower)?
Comment: The "undershoot-then-overshoot" pattern that is consistently present in figures 2a,b and 3a,b is a classic sign that you may have a energy shift between the two bits being subtracted. If a grad student brought me these plots I'd ask them to introduce a couple of artificial shift to see if they could get it to get better and or worse. Then we'd go hunting for possible misunderstandings of the energy of the two distributions. And I would *pray* that we were doing a blind analysis, because this is exactly the kind of place where human bias can screw things up.
Comment: @GeorgeRupp: I don't need to ask a guru-- there is _no way_ QCD can have a 38 MeV resonance. The confinement scale is 1GeV, and there is no glue excitation lighter than this, it is almost a theorem.
Comment: "Non-SM resonance"? That's a religious statement. The SM includes QCD, and one has absolutely no clue, not even from the lattice, what happens at 38 MeV.
Comment: I thought the signal model you considered was a conformally symmetric one (here is the theory paper I think: http://www.springerlink.com/content/n22j38w2l6885m75/fulltext.pdf), ie a non-SM one. That said, I'm no expert. Maybe someone else can chime in regarding the possibility of a 38 GeV bosonic particle being consistent with QCD?
Comment: In fact, there are nonperturbative inequalities among the masses of various states (for a review see http://arxiv.org/abs/hep-ph/9911532), which taken together constitute an extremely strong case that the pion is the lightest state in QCD.
Comment: The AdS model you're referring to is a geometric formulation of confinement, which ideally should be derived from QCD, in the broader framework of the SM. Also, the light boson's mas is 38 MeV and not GeV.
Comment: To Matt Reece: the E(38) might correspond to a chiral vacuum replica  ( http://prd.aps.org/abstract/PRD/v65/i8/e085026 ), fully compatible with QCD.
Comment: @GeorgeRupp: How could a light particle be a sign of a new vacuum? The new vacuum (if it exists) is disconnected from this one, it doesn't have goldstone modes associated with it which we see. So it doesn't make a new light particle.
Comment: @Ron Maimon: it's an excitation of the chiral ground state and not a new vacuum. Just read the paper. But of course, it's a model, just like the Ads one. Unfortunately, we cannot solve QCD, so we need models.
Comment: @Matt Reece: Predicting or excluding anything at 38 MeV? No way, José. Ask your local LQCD guru, no matter if he/she is quenched or not
Answer: It is not possible that SUSY particles are hiding in keV or MeV range. In particular, there can't be any new charged particles (and similarly new color-charged particles) that would be this light because they would be easily pair-produced and easily detected.
The first (February 2012) claims by different authors (the original ones, Rupp and van Beveren, who made the conjecture) were refused by the COMPASS collaboration (which was used as one of the main pieces of "evidence") here:

http://arxiv.org/abs/1204.2349

COMPASS says that the patterns that attracted the attention or Rupp and van Beveren are due to $\pi^0$, $\eta$, and secondary interactions in the COMPASS spectrometer. Rupp and van Beveren responded that the COMPASS critique is internally inconsistent. It seems more likely to me that COMPASS is right.
The newest Russian experimental paper looks strange to me. For example, it never quotes any confidence levels, as far as I can see, and instead says that there are "almost no errors" in their measurement, a claim that it easily refuted by looking at their chaotic wiggly charts.
An extended discussion may be found on my blog.
Comment: @LubošMotl, thanks for the new style on your blog, its more readable now
Comment: There is an error analysis towards the end, they simulated the backgrounds by Monte-Carlo, but I agree that the analysis is wanting. I think they just rushed to confirm. Also, their system is messy. Is it possible to exclude diphoton decay of excited nuclear states at about 38 MeV? I mean, they claim to see the same bump in Cu and C, which is unlikely for a nuclear effect. Is there any scenario where you have an electrically neutral boson at 38MeV? I can't imagine how it would be missed. I am siding with COMPASS like you, but I want to be sure.
Comment: Agreed and I am not sure, either.
Comment: It is not a new style. It's a mobile template that's existed for several years. A few months ago, it was upgraded to deal correctly with comments and MathJax. But 90% of the people use the "old template".
Answer: I would have loved to put this reply directly under Eef's reply above, but I didn't figure out how this page works quickly enough.
Eef, when you're describing what COMPASS has done, I think that you are misrepresenting our work.  We didn't do a MC simulation of the E(38) or of this effect, as you seem to claim. Instead, we ran our usual MC simulation, not including any backgrounds, and then saw a bump appear in exactly the right place.  We understand this MC bump as being due to the material in the detector -- basically, $\pi^0$s produced in secondary hadronic interactions downstream of the target will appear as low-mass bumps in this spectrum.  Depending on the distance from the target these bumps will have different masses.  Therefore we can associate the "mass" of the bump with a specific distance, and lo and behold we find some material in the right place for 38 MeV.  The exact height of the bump is of course dependent on the backgrounds present in real data, which are not taken into account in this simulation.  For this reason we made the statement that "the COMPASS data do not confirm the existence of this state." (quoting 1204.2349).
In this regard I'm in perfect accord with my co-authors.
Comment: You can flag the moderators if you want this answer to be moved to a comment under eef van beveren's answer. (Comments require 50 reputation pts.)
Answer: You say that you are siding with COMPASS.
However, that is an ambivalent statement.
COMPASS first released the opinion that the signal at around 40 MeV is an artifact of their methods of analysis and their equipment. Since I have no access to their methods and equipment properties, I had to accept such statement. Although I was not convinced.
Later, COMPASS released a Monte-Carlo simulation of the artifact. I showed that that simulation only explains a very small contribution (of about 10 percent) of the measured signal. The main author of the simulation agreed, in private while at a COMPASS meeting in Lisboa, with my observation.
So, with which COMPASS do you side?
Furthermore, the Dubna group consists of several excellent researchers which, moreover, work on new and unique equipment for photo-photon physics.
Comment: Ok, they might not, but I definitely do. The idea that you could have a glueball at such low energies defies all common sense and lattice QCD predictions. This is just categorically impossible, you need new physics to have this, and I can't imagine what it is.
Comment: Comparing credentials and going by authority is not why one is cautious, but a dirty diavowed signal from a known noise source and two nuclear bumps at 38 MeV which require deep analysis are not the strongest case in the world. Lubos is not dismissing the claims, he is just saying you need more evidence.
Comment: I have the impression that you have not read our works on the E(38), from [past year](http://arxiv.org/abs/arXiv:1102.1863) and from [this year](http://arxiv.org/abs/arXiv:1202.1739). Quite some material is collected there. Moreover, I have no accelerator in my office. Evidence has to come from experiment. In the mentioned works I have given quite some places where evidence can be found.
Comment: Moreover, COMPASS has not proven their statement. That does not imply that COMPASS may not be right. But also for proving the contrary of our interpretation of the COMPASS signal, COMPASS needs more evidence!
Comment: Nobody is certain here, no need to be so defensive. The issue is that this particle definitely has some sort of electromagnetic couplings, so either charged constituents or strong coupling to charged objects which is pretty much the same thing, and it's degrees of freedom should alter total cross sections for quark-quark collisions, which are calculated relatively precisely from pure QCD, so it's hard to see how it works, but it might work, I don't know.
Comment: I suppose, as I say in the previously mentioned articles, that the E(38) is an empty bag of glue. Moreover, its coupling to quarks is probably quark-mass dependent. The nuclear physicists with which I have communicated, do not object to such boson.
Comment: Lattice QCD predictions: Besides the many problems of LQCD with the meson spectrum, specialists in LQCD told me in private that at energies below 200 MeV no reliable calculus is possible.
Comment: Nonsense. For obvious reasons, light states dominate the behavior of long-distance Euclidean correlation functions. I suspect you're confused about the issue of extrapolating to small quark masses, but even that is under fairly good control.
Comment: In which experiment has one measured "long-distance Euclidean correlation functions"?
Answer: User1247 pointed out my mistaken reading of the scale in a previous answer, now deleted.
Fortunately I found a pi0 mass plot in LHCB which shows that there is gamma gamma mass resolution to clear this point about a 38 MeV diphoton resonance.
By now they could provide us with a definitive plot.
Answer: The paper has been retracted.

Due to non ordinariness of the obtained results (standing out of The Standard Model) and at the request of co-authors the first version of the article is withdrawn for further verification and more detailed description of the experiment and data analysis. The second version is being prepared.

(from the replaced abstract on the arXiv)
Comment: For the record, there's a conference paper which shares most of its authors with the retracted paper where data from the retracted paper is studied. It states that "[a]ll these results support the conclusion that the observed structure with an effective mass of about 38 MeV/$c^2$ corresponds to the detection of particles with the given mass." https://www.epj-conferences.org/articles/epjconf/abs/2019/09/epjconf_ishepp2019_08004/epjconf_ishepp2019_08004.html


Using drastically different scale sizes for different objects

Question: I'm making my first complex scene and am trying to emulate the size of real world objects. I have a pack and a sword, which will be the main focal point of the piece. The kicker is, in my mind's eye, there's a huge mountain in the distance. I want to put it in "real world" scale so it sells the the distance and size when I set the camera f-stops. If I set my scale to miles or km, it gets really hard to find the pack and sword in the view port after I scale them to size. How do I go about using different such drastically different units of measurement in the same piece?
Answer: You can use outliner to select object and then numpad period "." key for centering it on the viewport.
Answer: In your preferences, check Auto Depth and Zoom To Mouse Position. This helps greatly when dealing with big distances. point your cursor over your sword before rotating, and you will see the difference.
Additionally, put your mountain on a different layer than the small objects. So, if you edit or animate them, switch the mountain layer off. Blender now can much better pan and rotate around your objects, because it can "think" and calculate in much smaller dimensions. And, of course, like the other answer said, use the numpad . to always center back to your selected object.
Answer: You could break it into two scenes: render the mountain landscape as a separate image, then bring that into the foreground scene as the background image. This will work well because it will show absolutely no perspective change as you move around your foreground scene, which will accurately reflect how far away it is.
It should also speed up rendering of the foreground scene.


IdentityServer3 Client to client authorization

Question: I am in the process of implementing IdentityServer3 in our company but I have hit a blank around how to handle client to client authorization and would appreciate any pointer in the right direction.
This is a summary of our requirements:

We have multiple web site clients that our users access. These are configured using the AuthorizationCode flow. Lets call these WebSiteClientA, WebSiteClientB.
We have multiple WebAPI clients as back end services that could be accessed by either a client (WebSiteClientA, WebSiteClientB) or a user (who has access to WebSiteClientA or WebSiteClientB). Lets call this WebAPIClientA.

Note: Our company owns the users identity as well as all clients.
Initially I though we could configure WebAPIClientA using the ClientCredentials flow. Then WebSiteClientA \ WebSiteClientB would be configured with the client credentials for WebAPIClientA and could generate an access token when it required access to WebAPIClientA, or alternatively generate an access token with limited scopes and hand this access token to the user so the user can access WebAPIClientA directly from the client side.
This would meet almost all our our requirements except 1 big one, we also want to be able to manage what scopes a client has access to for another client and with the approach of using the ClientCredentials flow anyone with the client credentials would be able to generate access tokens for all scopes under that client. ie WebSiteClientA should be able to generate an access token for WebAPIClientA with read & write scopes but WebSiteClientB should only be able to generate an access token for WebAPIClientA with the read scope.
In my mind the client\identity server conversation would be:
WebSiteClientA makes a request to the identity server for an access token to WebAPIClientA for scope X and provides the client secret for WebSiteClientA. The identity server then says yes, you are WebSiteClientA and we can see from our records you have access to WebAPIClientA with scope X, here is an access token.
Is this possible or am I looking at this in the completely wrong way and there is maybe a better approach to meeting the requirements?
Answer: It sounds like you're talking about two things.
The first is that in the APIs you need the user's id. To obtain the user id you have a decision if you want to build a trusted subsystem, or if you don't want a trusted subsystem (in the sense that your APIs trust or don't trust the MVC client to pass along the user's identifier). If you do a trusted subsystem, then the client credentials flow from the MVC client to the API is fine. If you don't want a trusted subsystem, then you need the MVC client to obtain an access token for the user (via implicit or hybrid flow).
The second issue you're asking about is if you can control the scopes each client is allowed to request, and you can via the AllowedScopes configuration property (or whatever it's called) on the client configuration. This setting is orthogonal to the first issue mentioned above.


Power consumption of an electric circuit

Question: In an electric circuit with a resistor of resistance R there is energy conversion to other forms. If there is just one resistor then the voltage drop over the resistor is always equal to the battery voltage drop. But does this mean that the change in potential energy of electrons is totaly converted in the resistor or does some conversion also happen at the pole of the battery where electrons sink? I am thinking of perfect conducting wires. So if you have 1 A and 2 ohms you get that the power consumption is 2 W. Does this mean that the power consumed is 2 W in a resistor? And how is that possible? Shouldn't the battery itself take some of this power where the electrons are being absorbed?
Answer: It depends on whether you are asking about a real battery or an ideal voltage source.
All real batteries have some internal resistance.  In fact they are often modeled as a series combination of a voltage source and a resistance.  This resistance causes power loss when current is flowing.
If you had an ideal voltage source (and ideal wires), then all the power would be delivered into the resistor.

Sholdnt the battery itself take some of this power where the electrons are being absorbed?

The ideal voltage source doesn't cause any energy loss.  Instead it is the opposite and it raises the potential of the charges in the circuit as they pass the source.
Comment: And what about scenario without any rrsistors?
Comment: The power loss you describe is normally only considered for a steady-state circuit.  A circuit with a voltage source and no resistance cannot be at steady-state, but has increasing current.  The increase cannot continue indefinitely.  Eventually the circuit will fail in some manner.  (As an example, superconductors have maximum current amounts, above that limit they stop being superconductors, resistance returns and something heats up dramatically from the high current)
Comment: So in a steady state there is no more increase in kinetic energy and then obviously energy is consumed through the resistance? Something like velocity in air because of resistance when body reaches steady velocity?


What does that means? "QCD is a non-linear and non-trivial field theory?"

Question: I know QCD is represented by the $SU(3)$ group and is non-abelian. Then, as a consequence QCD is a non-linear and non-trivial field theory.
I would like to know why? and what does that means?
Comment: perturbation analysis cannot be applied starting from the vacuum modes due to the dimensionless coupling strength constant being much higher than one. Imagine that the physically relevant scenarios and path integrals of vacuum electrodynamics had to be evaluated in electric fields above the Schwinger limit, that is more or less the situation
Comment: Are you asking why QCD is non-linear, as in "what is the underlying reason for non-linear effects"? Or do you mean "what is definition of non-linear that is used in QCD"?
Comment: @lurscher I do not get the definition in this case of non-trivial and non-linear. Sorry.
Answer: Well, people often use the term 'non-triviality' of QCD to refer to the fact that the vacuum state QCD is not simply empty, but involves quantum fluctuations and what more, just like the case of QED (although due to color, the QCD case is of course more complicated).
The non-linearity of QCD is due to the fact that gluons can couple to themselves via three- or four-gluon vertices. A famous example is the gluon distribution inside a proton or nucleus, which, due to QCD radiation, rises as a power of the energy with which the hadron is probed. However, at a certain point, the gluon density becomes so high that these non-linear gluon recombinations start to kick in, and begin to regulate this growth, an effect known as saturation.


Publishing figures in conference abstracts - will this constitute formal "publication" that will preclude our publication of this figure in journal?

Question: I have a manuscript in final stages of editing to submit it for publication, most likely to an ACS journal.  My advisor would also like me to present this research in the upcoming ACS conference.  I need to submit an abstract and they give the option of including a figure.  I'd like to include my graphical abstract if this won't preclude submitting the same graphic later as part of the manuscript.  So does a conference abstract count as "published"?
Comment: Would you later want to publish it as a stand-alone work or as a figure in another publication?
Comment: As a figure for the table of contents for the journal article, so in another publication
Comment: In practice you can do a lot with your own figures. And it depends on how much of art and design is into it. Changing labels or replotting etc all are possibilities. One should see it to give an advice.
Answer: There are several questions hidden within this one. The first is whether you retain copyright after the abstract appears. If not, and if the figure is fairly substantial (in the information conveyed and in design elements) then you may need to seek permission from the copyright holder to reuse it. And you will also, then, need to cite the abstract. This is the same as if you want to use a long quote from an article, yours or that of another. Short quotes and standard figures don't usually require permission, but do require citation. However, TOC isn't clear to me. I assume it is more that "Table of Contents".
If you do hold copyright then reusing it, with citation, is fine. But the citation is required to avoid the issue of self plagiarism.
However, if the figure is to be reused on its own as a complete work, not part of another paper, then publishers would probably consider it as already published and therefor not now innovative. I doubt that is what you intend, but note that it is up to the publisher to make determinations about such things.
My best guess, with limited information, is that you will be permitted to reuse it even if you don't hold copyright. But you will need to ask and you will need to cite. One can, of course, make reference to ones own work and even quote from it, but there are limits on how much you can use in copyrighted work.
Comment: Regarding the copyright question  I found this language in the FAQs: "You and ACS agree that you and/or third parties with copyrights shall retain copyright in and to the abstract."
Comment: Good. But publishers still have a voice in what they publish. I think you'll be fine.

Publishing figures in conference abstracts - will this constitute formal “publication” that will preclude our publication of this figure in journal?


User profile layout vs. contact form option

Question: On the user profile I have some 12 fields for the users to enter their contact information and other details about themselves. The option to activate/deactivate the personal contact form is somwhere between the fouth and the fith field.
I would like to have to personal contact form option to be on a position I intend it to be on – e.g. the first position, before all other fields, since it's an option – and not a field. Disabling the drag'n'drop i can actually rearrange the fields in the intended order. But when I switch drag'n'drop field sorting back on, the checkbox jumps back down somewhere between field four and five.
Any suggestions anybody?
Thanks!!
Answer: found the answer / an answer to my question: Installing and enabling the module profile2 helped. The missing fields ("Contact user element") showed up in the fields list and became sortable through drag'n'drop.


Reducing frequency of the "Joomla! update available" mails to once per day or once per week

Question: Is there a way to reduce the frequency of the automatic "Joomla! Update available" mails? I do not want to disable the plugin, because I want to be notified about updates. But multiple mails per day is just too much. I'd prefer to receive one mail per week, or one per day at most.
Answer: At System -> Update -> Extensions -> Options you can change the caching to 24 hours so you only get one email per day.
There does not appear to be any other option apart from disabling the System - Joomla! Update Notification plugin.
Comment: That seems to concern extensions, not Jommla itself. Anyway, I have changed this to 24 and will see what happens.
Comment: I appreciate your answer. I'll report in a day or two if things have changed.
Comment: Changing this option has indeed changed the intervall to more or less one mail per day. It is not a 24 hours intervall exactly, though, but it soes the trick. This sit doesn't have a lot of traffic, so the mail is probably triggered when Google fetches the site map file, which happens at different times.
Comment: This was a tip I found elsewhere and I haven't tested it myself so please do let us know if it helps.
Comment: Thanks for letting us know!
Answer: In Joomla 4, the setting can also be found under System -> Global Configuration -> Installer -> Updates Caching. The most you can set it to is 24 hours.


WHM: domain isn't directing to account, but is going to server IP

Question: Hoping someone might be able to help me here.  Normally when we set up for a client, we own and have control over the domain, with our own private WHM server.  In this case, the client already registered the domain using their tech dept.  Their techs, simply directed it to the IP address of our servers, so the domains are going to the awful splash page WHM provides, but it doesn't seem to be going to the account that I set up for it in the WHM.... What am I missing? I can log in with the domain and login settings I set up for the account under PHP... but the domain itself in a browser, isn't working...
Answer: Ok, I figured it out, and am answering for those in the same issue.  Flush your DNS ( cmd /ipconfig flushdns), and clear your cache, or try on another computer.


How to Wire a 100amp Sub panel 300feet away from main panel

Question: i am currently trying to figure out the best way to feed a 100amp panel fed from a 200amp Main that is 300 feet away from each other. Do you have any suggestions? and yes i know its going to be expensive.
Comment: What loads are on this new panel, and can we presume that this is an outdoor/buried run?
Comment: A 100 Amp panel could have a huge load - as much as 80 Amp continuous, or a tiny load - as little as 20A (with occasional higher amounts). Some key questions: What is your *actual* anticipated load? Is the 300 feet inside, outside or some of each? If outside, how hard to dig a trench for conduit?
Comment: This is pretty much the same as these, barring a small detail or two: https://diy.stackexchange.com/q/74445/18078  https://diy.stackexchange.com/q/203665/18078
Comment: Also similar, varying a different detail https://diy.stackexchange.com/q/195308/18078
Comment: Won't be so bad, $750 for the good stuff (#2/0).  If that's too much, for half the money you could 90A (#2) but the voltage drop would be pretty bad.  Depending on what your loads actually are.
Answer: The minimum legal size for 100A is #1 aluminum, however, voltage drop will be almost 5% with that wire.
2/0 aluminum is at a pricing and availability sweet-spot and is probably just right for that distance.
Voltage drop is proportional to actual load so it matters what the loads actually are.
You're supposed to breaker the circuit for 125% of the expected load, so a 100A breaker implies you expect <=80A of load.  At "full" 80A load your voltage drop will be 3.25% @ 300' w/ 2/0 aluminum wire, which is perfectly fine.  $2.50/foot so $750 whole job.
The minimum aluminum size you must use is #1, and #2 is legal if you downsize to 90A breaker... but there's not much cost savings to downsize wire.  Even #2 is $1.68/foot.
Aluminum wire is the preferred wire for heavy feeders of this sort.  Disregard anything you may have heard about aluminum wire for small 15/20A branch circuits; that is not applicable here.
If you really are hell-bent on superstition, you can pay $14/foot ($4200 whole job) for #1 copper, which will give you 2.99% voltage drop at 80A.


server stuck at the boot process:RECEIVED SIGTERM

Question: The issue is when I try to log in the server using SSh , it's not responding and cannot be pinged. And when I go to the console and reboot the server, its stuck in the reboot process. How Can this issue be resolved.
Comment: Are you saying that the server crashes when you try to login with ssh?
Comment: No, there is no response when I try to log in using ssh. And when I reboot the server in VSphere console, it gets stuck in the server reboot.
Comment: :-O , im sorry i still cannot understand your question, maybe because my english is very bad.   Are you saying that the system is not booting properly or stopping at the boot? Or it is just broken only in the reboot?, but it can boot if you do that manually?
Answer: Your question contains too little information to provide any good tip. It looks like it is a systemd based linux derivate that fails to switch onto the root partition during the boot process. Which seems to cause that systemd stops (SIGTERM) the systemd-jourald which is taking care of journal logs.
At this point during the boot process, networking is not even setup, so you can forget any attempt to connect via ssh or any other network protocol. The machine does not even have an ip assigned.
Answer: This might help to find the issue:
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 38: Applying options for *
debug2: resolving "server" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to server[server] port 22.
debug1: connect to address server port 22: Connection timed out
ssh: connect to host server port 22: Connection timed out


Why am I having an error trying to locally install cs-script?

Question:
You download CS-Script package from the site
The installation instructions say to unzip the file where you want and then run css_config.exe to install the package.
But if you run a later version of .NET, you'll likely see a message box that says this:
System.IO.FileLoadException: Could not load file or assembly
'file:///X:\Path\To\cs-script\csws.exe' or one of its dependencies. Operation is not
supported (Exception from HRESULT: 0x80131515)
File name: 'file:///X:\Path\To\cs-script\csws.exe' --> System.NotSupportedException:
An attempt was made to load an assembly from a network location which would
have caused the assembly to be sandboxed in previous versions of the .NET
Framework. This release of the .NET Framework does not enable CAS policy by
default, as this load may be dangerous. If this load is not intended to
sandbox the assmebly please enable the loadFromRemoteResources switch. See
http://go.microsoft.com/fwlink/?LinkId=155569 for more information
at System.Reflection.RuntimeAssembly...

What's happening? And why is it calling a local file, unzipped onto a local disk, a remote file?
What can I do?
Comment: Somebody just downvoted me, but doesn't know how many searches I had to try to come up with just a start on this. Just to start to bootstrap myself to a solution.
Answer: Those files need to be unblocked.
This happened because Windows tracked the executable as emerging from a zip file that came from the internet. Borrowing a term from Perl, that zip file is "tainted" and Windows tracks the taint from the zip file to the files unzipped from it.
You may have seen the case before that a simple download-and-run executable will ask you months after its been on the system if you really want to run that executable. If you pull up the properties file, you will see the Security warning:

This file came from another computer and might be blocked to help protect this computer.
As part of that protection, the OS seems to prefer to access them like remote files. Whereas in earlier versions of .NET this was not a problem, in .NET 4, it is. CAS, or Code Access Security is more restrictive in this version, as the dialog explains.
It also says to "enable the loadFromRemoteResources switch". So after reading up on the subject, I created a X:\Path\To\cs-script\csws.exe.config file (because there wasn't a config file) and put into it:
<configuration>
   <runtime>
      <loadFromRemoteSources enabled="true"/>
   </runtime>
</configuration>

Which did nothing. Later I found about the Unblock button on the file properties dialog. But clicking that button for csws.exe just resulted in the dialog complaining that another executable could not be launched "remotely".
So after doing some digging, I came up with the following powershell function:
function Unblock-All { Get-ChildItem @args -Recurse | Unblock-File }

And ran it like so:
Unblock-All X:\Path\To\cs-script

After that, I was successfully able to finish the installation of cs-script.
Answer: The solution to this problem is to create the configuration file on the installer, i.e. X:\Path\To\cs-script\css_config.exe.config containing:
<configuration>
   <runtime>
      <loadFromRemoteSources enabled="true"/>
   </runtime>
</configuration>


How to prioritize which content to mention and what not in the Statement of Purpose

Question: I am applying for the CS Ph.D. program in the USA. While writing my Statement of Purpose (SOP), I realized I have a multitude of accomplishments to convey. For instance, I hold both undergraduate and graduate degrees with high CGPAs, authored 17 publications, accumulated years of teaching experience, worked as a software engineer, and developed numerous tools and packages, everything relevant to my field of study. Now, I am grappling with the challenge of adhering to the word limit typically set by universities, often capped at a maximum of 1000 words (sometimes only 500). I drafted one that contains more than 2500 words. I am genuinely struggling to discern what to include and what not to include, and what the Admission Committee truly values in an LOR. Thanks a lot for your valuable time.
Answer: You have the wrong idea about the SoP. It isn't a rehash of your past, but a look toward the future. Other things in your application speak to your accomplishments: Letters of recommendations and CV especially. You also send transcripts, so your degrees and courses are clear already.
The SoP should be forward looking. What do you intend to do in graduate study and thereafter. Very brief mentions of things that support those goals can be added, but don't focus on the past.
Most of what you list goes in the CV. Support for your goals and predictions of your success come from letters.
Comment: Thanks a lot. If you don't mind, can you suggest in 2-3 bullet points what I must include in my LOR that the Admissions Committee really values or search for?  (if you have time definitely. Thanks)


What are the different types of vighnas discussed in our puranas?

Question: What are the different types of vighnas (obstacles) discussed in our puranas from which lord Vighneshwara will protect us if we worship him?
Answer: Just like we have the concept of Tāpatraya ( तापत्रय ) , i.e., three types of Sufferings, similarly, there are said to be three types of Vighnas (Obstacles or Hindrances), viz.:

Ādhyātmika Vighna (ailment of the body),
Ādhibhautika Vighna (extraneous one of a physical nature),
Ādhidaivika Vighna (divine calamities).

Three types of Vighnas as per Śhiva Purāṇa:

This is discussed in Chapter 18 - Bondage and liberation from Section 1 - Vidyeśvara-saṃhitā of the Śhiva Purāṇa.

अज्ञानमोचनं साध्यं विशेषज्ञो हि मोचकः । आदौ च विघ्नशमनं कर्तव्यं कर्मपूर्तये ॥९८॥

Freedom from ignorance is the goal. Only a specialist can achieve that. In order to fulfil a task, or a sacred rite, obstacles must be warded off.

निर्विघ्नेन कृतं साङ्गं कर्म वै सफलं भवेत् । तस्मात्सकलकर्मादौ विघ्नेशं पूजयेद्बुधः ॥९९॥

A rite performed without hindrances in the middle can be fruitful. The subsidiary rites shall also be performed. Hence at the beginning of sacred rites, an intelligent man shall adore Gaṇeśa.

सर्वबाधानिवृत्त्यर्थं सर्वान्देवान्यजेद्बुधः । ज्वरादिग्रन्थिरोगांश्च बाधा ह्याध्यात्मिकी मता ।। १००॥

An intelligent man must worship all deities in order to ward off all sorts of hindrances. (There are three types of hindrances.) The first one, the Ādhyātmika hindrance is the ailment of the body, whether it is a fever or tremor or other type of sickness.

पिशाचजम्बुकादीनां वल्मीकायुद्भवे तथा । अकस्मादेव गोधादिजन्तूनां पतनेऽपि च ॥ १०१॥ गृहे कच्छपसर्पस्त्रीदुर्जनादर्शनेऽपि च । ऋक्षनारीगवादीनां प्रसूतिविषयेऽपि च ।। १०२।। भावि दुःखं सामायाति तस्मात्ते भौतिका मताः ।अमेध्याशनिपातश्च महामारी तथैव च ।। १०३॥ ज्वरमारी विसूचिश्च गोमारी च मसूरिका । जन्मर्भग्रहसङ्क्रान्तिग्रहयोगाः स्वराशिके ।।१०४॥ दुःस्वप्नदर्शनाद्याश्च मता वै ह्याधिदैविका: । शवचाण्डालपतितस्पर्शादन्तर्गृहे गते ॥१०५॥ एतादृशे समुत्पन्ने भाविदुःखस्य सूचके । शान्तियज्ञं तु मतिमा-कुर्यात्तद्दोषशान्तये ॥१०६॥

to 106.
The second type of hindrance is Ādhibhautika (Extraneous one of a
physical nature). The visitations of Piśācas, the outcome of ant-hills etc, falling of lizards and other insects, the advent of tortoise inside the house, infesting of serpents, untimely flowering of trees, deliveries in inauspicious hours and other things indicate some future misery. Hence these are called Ādhibhautika hindrances. The third type of hindrance is Ādhidaivika (Divine calamities). When lightning strikes, small pox, cholera, plague, typhus fever and similar infectious diseases spread and bad awful dreams, evil planets affecting the birth star or Rāśi (sign of the zodiac) occur, these hindrances are called Ādhidaivika. In order to ward off these hindrances and on occasions when one touches a corpse, a cāṇḍāla or a fallen man and goes inside without bathing, Śānti Yajña shall be performed to remove the evil effects.

Hence, one must always worship Lord Gaṇeśha before any auspicious work, for he removes and protects the worshipper from the three types of Hardships (Vighna) - Ādhyātmika, Ādhibhautika, & Ādhidaivika. And since he removes the obstacles (Vighna), thus is referred by the name - Vighnahartā ( विघ्नहर्ता). And thus, he being the Lord or Master of all kinds of Obstacles, he's called Vighneśvara ( विघ्नेश्वर ).

Three types of Vighnas as per Kāmikāgama:

A very similar concept of three types of Vighnas,  along with the rituals to ameliorate those obstacles, is discussed in the Chapter 4: Arcanāvidhipaṭala in the Purva-Pada of Kāmikāgama, Basically, at the beginning of ŚhivaPūjā, the Āchārya has to remove the following three types of Vighnas —

Divya-Vighna: Caused by those resident in Devaloka,
Nabhogata-Vighna: Caused by those resident in the sky,
Bhūgata-Vighna: Caused by those resident on earth.

आजानु पादौ प्रक्षाल्य हस्तावामणिबन्धनात् ॥ कार्य त्रिविध विघ्नानां
प्रासादादपसारणम् । दिव्या नभोगताश्चैव भूगतास्त्रिविधाः
स्मृताः ॥ तत्त्व दृष्ट्या तु दिव्यांश्च पुष्पक्षेपान् नभोगतान्
। पार्णिघातत्रयाद्भौमान् प्रासादादपसारयेत् ॥

to 16.
Having cleaned his legs up to knees and his hands up to the fists, the
sadhaka should proceed to ward off three kinds of obstacles from the
surroundings of the temple (or the home shrine). The three obstacles
are - those coming from the heavens, those present in the
space(atmosphere), and those present in the land. He should drive away
the obstacles related to the heavens by looking above with his eyes
charged with the perfect knowledge of tattvas. He should expel the
space-related obstacles from the shrine by throwing the flowers. He
should ward off the earth-related obstacles by striking the ground
three times with his right heel.

As one can see, these three are exactly the same in essence, to the Vighnas discussed in the Śhiva Purāṇa.

tl;dr:
As per Śhiva Purāṇa, there are fundamentally three types of Obstacles (Vighnas) viz., Ādhyātmika Vighna, Ādhibhautika Vighna, & Ādhidaivika Vighna, from which Lord Vighneśvara (Gaṇeśha) will protect us, if we worship him.
Furthermore, if one might closely observe, and try to form a 'logical' mapping between the Tāpatraya and the three Vighnas, one might be able to say that these Vighnas are actually the 'material' physical-level manifestation of the Tāpatraya, i.e., preliminary stage of - before when a Hardship ( kaṣhṭa) becomes a Suffering - duḥkha (which I have discussed in this QnA).
Everything has been reconciled in the table below, wrt to the two texts discussed above, and the interrelationships between the Sufferings and the Obstacles :

Sufferings (Tāpatraya)
Vighnas (Kāmikāgama)
Vighnas (Śhiva Purāṇa)
Solution (as per Kāmikāgama)

Ādhibhoutika Duḥkha
Nabhogata-Vighna
Ādhibhautika Vighna
By throwing the flowers.

Ādhidaivika Duḥkha
Divya-Vighna
Ādhidaivika Vighna
By looking above with his eyes charged with the perfect knowledge of tattvas

Ādhyātmika  Duḥkha
Bhūgata-Vighna
Ādhyātmika Vighna
By striking the ground three times with his right heel


Store the unknown customers information in SFMC DE who visit the landing page through Cookies

Question: We have a requirement where need to store the information for unknown users who visit our SFMC landing page.Is it possible to identify the information through cookies or collect tracking code in SFMC and if yes so how can store into SFMC DE.
Comment: What information do you want to store exactly?
Comment: Would that be any page or a landing page hosted as a Cloud Page from Marketing Cloud?
Comment: It would be SFMC CloudPage.
Comment: Visit date, browser information and any single unique information through will be able to identify if the same user visit the page again.
Answer: There's a SetCookie function that you can set using SSJS to store cookie values.
You can also use the UpsertData function to write records to the data extension.
Note that you'll need to uniquely identify these records in your data extension so using the GUID function might help. Since the visitors will be unidentified, the GUID will help to assign a random unique value to each record.
Comment: ,Thank you for your answer. As I am not much familiar with SSJS so have further doubt that How will be able to fetch that SetCookie data or to upsert into DE. My goal is to store the cookie history into DE and verify the entry every time when a user try to access the landing page. Thank you in advance for you assistance.


USB Flash Drive on vmware workstation 10 doesn't appear in removable devices list

Question: As stated in the question, when I connect my USB flash storage devices, the removable devices list won't even show the device in the list. While it does show other USB devices like the USB internet dongle, camera and the finger print scanner, but not the USB flash drives. While everything was working fine before last night, when all of a sudden the connected drive failed, I didn't know why, but then I tried to reconnect the device by physically unplugging it from the computer and then connecting it again, the device gets recognized by the host perfectly, no problems at all, but the vmware removable menu won't show the device.
System info:

Laptop: HP Probook 450 G1 (Core i7 variant, with Intel graphics)
Host: Windows 8.1 Professional
Guest: 10.10.3 OS X Yosemite
USB Drive: Kingston G4 (USB 3.0) and HP thumb drive (USB 2.0)
vmware tools installed
vmware Workstation 10

Here's what I have tried:

1) Restarted the vm
2) Restarted the vm and host
3) Restarted all the vm services, then shutdown the vm and restarted the host
4) Re-installed the USB root hub and USB root hub (xHCI) drivers and
restarted the host.

EDIT: I restored the vm to an earlier snapshot and it is now working fine, but I'd still want to know what went wrong and what can I do in the future to avoid this issue?
Answer: In my case, the service "VMware USB Arbitration Service" was not running. As soon as started, all devices were available in VMware Workstation again.


New to film processing, how do I order?

Question: Hi!! So I'm brand new to film cameras and have my first roll that I want to send in for development. I have an order sheet printed out for Process One film developing but am confused on how to fill it out. My film is C41 35mm, 24 exp. I just want to get back uploaded scans of the photos, I don't require anything else. What options do I choose for this? Also what does it mean to 1. Develop film 2. Cut and sleeve film and 3. What is the cheapest option for developing film? Does it usually cost more to just get prints or to just get scans? If anyone can help me I would be super appreciative ty!!!!
Comment: Just tick the Dropbox option. For pricing, it'd be best to call them or look on the website.
Answer: The form is confusingly laid out – I don't blame you for being confused. They should change a few things around for sure.
Once the film comes out of your camera, it must be developed. That's the name of the chemical process to turn the latent image on the film into a fixed image (and the film must be carefully protected from light until after this chemical process is completed). Your film should be developed using the C-41 process – it says so on the film cassette. (The other two main processes are the E-6 process and traditional black and white development.) Film that uses the C-41 process is also known as print film – so the "Print Film" section on the form is relevant for you. You can ignore the section for "E6 Slide film". You can also ignore the section for "4x5 film" – that is a different film size to your 35mm film.
Once the film is developed in the C-41 process, you won't actually have your images just yet – another step is needed. That can either be printing photos using the film negatives, or scanning the film negatives to obtain digital images. Sounds like you are looking for the second option.
So you can ignore the checkboxes for "matte" and "glossy" because they relate to the finish of the paper when printing photos.
After the lab has developed your film, they will return it to you. This is so that you can use it to make reprints in future, or you might want to scan it yourself. Usually labs will cut the film strip into shorter sections of 6 or 7 frames, and put it inside plastic storage sheets like this. In some situations you might not want them to do this, so in that case you'd check the "Do not cut film" checkbox, and they would then return the full uncut developed roll to you. Otherwise, you want the "Cut & sleeve film" option. These 2 options are mutually exclusive, and I think you should be choosing one or the other.
"Develop Only" is as it says – they will put your film through the chemical development process, but they won't scan or print any photos. That's not what you want. You want your film scanned, and you want digital images made available for download, so you should tick the box that says "Upload scans to Dropbox instead of saving on CD". Confusingly, I am not sure whether you should also tick the earlier box that says "Scan to CD". Of course you don't want a CD, but I think this box is really just to tell the lab if you want the photos scanned at all.
If there's any confusion, I think the safest option is to just write what you want in the Special Instructions box.
Answer: The clash of digital and numeric technologies resulted in a somewhat confusing form!
In your case, since you have a 35 mm roll, you are only concerned about the first row under "Service Desired": Print film (35 mm)
Options are then:

To only get the film back (no photo prints)
To get photo prints back (including the film)
To get digitalized photos back

Since you want the last, I would set the print quantity to 0 and tick the "Scan to CD" box to indicate you only want digital outputs.
In the "Special Instructions" I would then tick "Upload scan to Dropbox instead of saving to CD" so that I can download those photos instead of receiving a wasteful CD.
With these settings, the photos should end up being put online for (only) you to download.
Hope this helps.

New to film processing, how do I order?


It could be alive,

Question:
It could be alive,
but it is not
Could be any color,
Depends on the one you got.
Answer: Could it be

 a mirror?

It could be alive,

 if it is reflecting a living thing (animals are often subjected to the mirror test and some believe they are being confronted by another animal)

but it is not

 because a mirror only shows a reflection

Could be any color,
Depends on the one you got.

 If you wear red, the mirror will reflect the red for example.
Answer: Is the answer

 water?

 As it can flow and move which makes it seem alive but it's not.
 Transparent and reflective so reflects any color.
Answer: Very broad/vague...  Is this

An LED?

if it was alive

(/live) then you'd know what colour it was

Could also be:

a wire, a dead animal, etc...  Maybe add a line or two?

It could be alive,


Immortality Gene? Really?

Question: I read somewhere in the internet and wondered if human genes have deactivated immortality genes locked somewhere in the DNA strand. Is this statement true? What does it mean for human lifespan?
Comment: "I read somewhere in the internet" -- please link to the specific claim, because this clearly doesn't have a shred of truth to it.  It will help those answering explain why it's not true.
Comment: I looked up the subject of the interview you linked at livescience.com on [PubMed](http://www.ncbi.nlm.nih.gov/pubmed/?term=aubrey+de+grey), and looked back to about 2010 before giving up. There are 121 citations in that search, and nearly all of them are in [Rejuvenation Research](http://www.liebertpub.com/rej), a journal that he just happens to be the editor of. All of the references I looked up were quite obviously editorials, so it looks like this guy is just playing at being a scientist. Maybe he's good at synthesizing current research, but he sure isn't contributing anything original.
Comment: Honestly, I understand you are asking this question in earnest, but everything in that interview screams that that person is a crackpot.  Ten years into his research and I've never heard anything, so he's behind schedule!
Comment: -1: You should add more information. At this moment it is difficult to predict what internet source you are talking about and therefore its authenticity cannot be verified. In general you should put in some effort before asking a question.
Comment: The original article i was referring is unavailable but here is one claim.It could be a conspiracy theory, but one could never be sure with genetic engineering. http://www.livescience.com/6967-hang-25-year-wait-immortality.html
Comment: I remember De Grey, he gave a TED talk 10 years ago http://www.ted.com/talks/aubrey_de_grey_says_we_can_avoid_aging?language=en. I don't recall him talking about specifically a gene for immortality but I guess this is the telomerase gene and in this case well it's very simplistic to say it's locked somewhere... If I remember well overexpressing this gene allowed to reconstruct the chromosome telomeres and a [study](http://www.nature.com/news/2010/101128/full/news.2010.635.html) in mice showed they would live longer. The problem is that telomerase only will not make any organisms immortal...
Answer: In tissue culture and cell engineering fields, the word "immortal" is often used to express something else instead of human or animal life spun. When you take cells from human tissues and grow them in test tubes--although flasks or dishes are used in reality--, cells stop growing after long term culture. They say it is cellular senescence. Several genes actually regulate this cellular senescence, and inactivation of these genes causes infinite cell proliferation. This is immortalization of cells. Then, cells in a human bodies are immortalized, do they get immortal? Probably, not. Cellular senescence partially explains senescence of bodies, but these two are different things. In human bodies, cellular immortalizaion occasionally occur. It is tumor pathologically.
Answer: I think you read about the telomerase: https://en.wikipedia.org/wiki/Telomerase
The chromosomes while duplicating, they loose some of the DNA segments from their ends, from the telomer. This is believed to have a direct effect on senescence.
The telomerase reproduces the end DNA strip of the chromosomes. This enzyme is found in active form in stem cells and in white blood cells.
The DNA sequence coding this enzyme is found in every cell, but in an inactivated form. Probably the article you are referring to, was talking about the telomerase, because it can be activated in almost every cell in our body. But this can lead to uncontrolled growth of the cells, and when this happens we talk about cancer.
More information at: https://en.wikipedia.org/wiki/Telomere#Structure.2C_function_and_evolutionary_biology
Answer: The article probably had a scrap of truth to it. Ageing is not plastic and longevity can be altered in a variety of ways. Although caloric restriction seems to affect longevity the most, there are also longevity genes from a range of cellular processes that have been identified in yeast and mice, indicating that ageing is a whole system process. But none of those genes are "immortality genes". Finding and testing their effects in humans is difficult.
Here is a video on the background on ageing.
Related answer that you might find interesting.

Immortality Gene? Really?


How to call other function from the same controller in Laravel application?

Question: I'm very new to Laravel and I was given a Laravel project, where I need to add some new features. The person, who has previously worked on that project hadn't left even a single comment in the code and now I must make my own scenarios about the features.
I have a controller, defined with some functions (dashboard, show_project, save_project etc.) and in one of my function, I need to use the result of calling other function.
In the concrete example, the call is made from "http://127.0.0.1:8000/username/project_slug" - there is a button "Save" and post function, called on onClick event. The function, whose output I need is normally called on "http://127.0.0.1:8000/username/project_slug/svg", which returns a view.
For better understanding, there's an example of the flow:
The user wants to save his/her project (an UML diagram) but in order to have a thumbnail, a function which generates a view (SVG format) will be called and the idea is, to take the HTML content of the page, which is on "http://127.0.0.1:8000/username/project_slug/svg" and to pass it to another API in order an image to be generated.
So far, I tried with cURL, file_get_contents, file_get_html, render methods but when I return the output, the server just keeps waiting and shows no error messages.
<code>//The both functions are in ProjectController.php

/**
 * A function, for saving the json file, where the whole of the diagram
 * components are described. From the frontend we receive the project_id and
 * the project_data(the json content).
 */
public function save_project(Request $request) {
        $input = $request->only(['project_id', 'project_data']);

        /*
          Here we need to call the other function, to render the HTML content
          and to pass it to the other API. Then we save the result with the
          other information.
        */

        /*
          What I've tried?
          $new_link = 'http://' . $_SERVER['HTTP_HOST'] . "/$username"
                                              ."/$project_slug" . "/svg";
          $contents = file_get_contents($new_link);
          return $contents;
        */

        //In the same way with cURL.

        $project = Project::where('user_id',session('userid'))
                          ->where('id',$input['project_id'])->first();
        $project->project_data = json_encode($input['project_data']);
        if($project->save()) {
            return ["status"=>"saved"];
        }
        else {
            return ["status"=>"error"];
        }
    }

/**
 * A function, which takes the the Json content (project_data) from the
 * database and passes it to the view, where the Json is transformed in HTML
 * tags.
 */
public function generate_svg(Request $request,$username,$project_slug) {
        if(session('username')!=$username) {
            return redirect("/");
        }

        $userid = session('userid');

        $project = Project::where([
            'user_id' => $userid,
            'slug' => $project_slug,
        ])->first();

        if(!is_null($project)) {
            return view('svg',compact('project'));
        }
    }

</code>
I've read about some possible ways, including Guzzle request but maybe I haven't understood correctly the idea:
If I need to make a Guzzle request from my controller to the other function inside my controller, do I need an API configuration?
What I mean? Example:
Before saving the project, the user is on this URL address "http://127.0.0.1:8000/hristo/16test". Inside the controller, I have in session variables the token, the username(hristo) and i can get the project_name(16test) from the URL but after passing this URL to the generate_svg function, there is no indication of error or success.
So I'm missing some kind of token information?
Comment: Why can't you just use `$this->`?
Comment: I've tried with `self` but still no change.
Comment: `self` is for static call, you need to use `$this` if the method you want to call is not static and you are already in a non static method.
Comment: @N69S thank you! It renders the HTML. One additional question: The function **generate_svg** has as parameters `$request`, `$username`, `$project_slug`, from which I use for this scenario only `$username` and `$project_slug`, so could I overload it only for the case of calling it with the `$username` and `$project_slug` ?
Answer: If you just need the response of the other function you can just use
<code>$response = $this->generate_svg($request, $username, $project_slug);
</code>
If you'll need to use this function from a different controller you can use this
<code>app('App\Http\Controllers\UsernameController')->generate_svg($request, $username, $project_slug);
</code>
Comment: **generate_svg()** will go to the new address and show a html page with the overview of the diagram. All I need is to call the function and take the content(the html code) without displaying the page. And with this content to proceed saving it in database or sending it to other API.
Comment: Example:
`$content = file_get_contents($this->generate_svg($request,$username,$project_slug)); return "hello";` returns me the html code, but the code is needed to be stored in `$content` and not previewed


How did people know that their visions of God were not false before the Bible was as a book compiled?

Question: I looked at many Christian apologist websites, like GotQuestions, which states that anybody who claims to see God can have their claims evaluated by Scripture. So far so good, but how would people like Abraham know that their visions of God were real and that they were not deceived if they didn't have the complete edition of the Scripture?
Comment: No man hath seen God at any time, John 1:18. He that cometh to God must _believe_ that He is, Hebrews 11:6. God is a _spirit_ and they that worship him must worship in spirit and in truth, John 4:24. God 'appeared' to Abraham's _faith_. It is true that three came to Abraham and (in connection with that appearance - whatever exactly that was) he said 'lord'.
Comment: @NigelJ I think the question is still valid if you replace "vision of God" with "vision from God"? Or even just revelation?
Comment: @NigelJ Sorry about including Noah since he only heard God's commands but Abraham did see God many times in Genesis. It was God the Son in this case since Jesus declared Himself to be the means where humans could access God the Father (simply called God due to His authority in John 1:18).
Comment: Maybe it doesn't meet the guidelines for a good question, but it certainly is interesting.  The short answer is that the premise is not true.  Scripture itself teaches that it should not be subjected to private interpretation (2 Peter 1:20).
Answer:
The first means is fulfilled prophecy.

Methusaleh's name was a prophecy: it means "When he dies, it will come". The year he died, the flood of Noah arrived.
God told Abraham that he would have a son. Twenty-five years later, he did.
Elihu announced the coming of God to Job, and God came.
Job uttered at least two dozen prophecies, which ultimately came true.
Joseph had dreams, interpreted them correctly, and the events came to pass.
Moses asked God for a sign that he would succeed in rescuing his people from Egypt:

12 And God said, "I will be with you. And this will be the sign to you
  that it is I who have sent you: When you have brought the people out
  of Egypt, you will worship God on this mountain." (Exodus 3:12)

The second means is miracles.

Enoch did not die, but was taken up into heaven
The wombs of all the women in Pharaoh's household were first shut, then opened because of how he treated Abraham
The plagues against Egypt certified what God told Moses
Job's healing and the restoration of his fortune and long life certified what God told Job

The third means is righteous character and loyalty to God in the midst of suffering and persecution:

Joseph refused to sleep with his master's wife while a slave.
Job was already a righteous man, yet when he suffered, he did not curse God.
Lot maintained his character and hospitality though surrounded by a completely wicked culture.
Abraham refused to accept the spoils of war from the unrighteous kings he was forced to ally himself with.

A consistent message, regardless of the medium of communication emplyed by God. In my study of Job, I counted thirteen different means of communication employed by Job and God to communicate with one another, and the different pieces assembled from all those means fit together harmoniously.
Faith in God despite impossible circumstances.

Abraham waiting all those years for a son, then being asked to sacrifice him
Jacob, enduring years of false dealing by his uncle Laban
Joseph in prison, believing God would set him free
Job, on the verge of death, believing that God will raise him from the dead
Moses before Pharaoh, believing God would set his people free

The Holy Spirit. The Spirit grants wisdom and many other gifts. When a life displays that fruit, it is persuasive.
Answer:
I looked at many Christian apologist websites, like GotQuestions,
  which states that anybody who claims to see God can have their claims
  evaluated by Scripture. So far so good, but how would people like
  Abraham know that their visions of God were real and that they were
  not deceived if they didn't have the complete edition of the
  Scripture?

The existence of God is not dependent upon the existence of the scriptures.  The scriptures simply tell us what God did or said in the past and details specific interactions with certain people or groups of people.
God's interactions with Adam and Eve, Noah, Abraham were written down after the events took place.  When God told Adam and Eve there would be consequences for eating the fruit, did they experience the consequences?  When God told Noah there would be a flood, was there a flood?  When God made a promise that his old wife would have a son, did she have a son?  The supernatural events that spoke to the validity of God's words miraculously came to pass.
In the same way:  Peter, James, John, Matthew, Luke, Mark, Paul, and the other followers of Jesus didn't put their faith in Jesus because of the New Testament.  They believed who he claimed to be because of what they saw.  Then a few year later they recorded what Jesus said and did.
Additionally a person today can look at the evidence of their own sinfulness, hear a quick message that God created them, their sin separates them from God, and the God sent His Son Jesus to die and rise from the dead for their sins and they can place their faith in Him without ever knowing that there is a book that contains God's written history with humanity.


Intersect a layer with a feature dataset

Question: I would like to perform an intersect of a layer with multiple layers from a feature dataset (it has about 30 layers or so), resulting in 30 different layers as well. I know I can do this as a batch process using the intersect tool, but it takes a lot of time, and I'm wondering how I could maybe optimize this. I asume this can be done using arcPy but i'm not familiar at all with it's use.
Answer: You can do this with arcpy. Specify the input layer, the single feature that you want to intersect with. Then you can list all the feature classes in the dataset and intersect with each of them
<code>import arcpy
arcpy.env.workspace = r"C:\Data\Work.gdb\FeatureDataset"
input_layer = r"C:\Data\Work.gdb\InputFeature"
fcList = arcpy.ListFeatureClasses()
for f in fcList:
    output_layer = input_layer +'_intersect_'+ f
    arcpy.Intersect_analysis([input_layer,f],output_layer)
</code>
Comment: Perfect, just getting familiar with arcpy so getting an actual example of how to use it to optimize something is great. thanks!