text:
Q: Tomcat server not starting when adding a specific servlet I am working on a project using Java Servlet. I am using eclipse juno and tomcat 7.0 for my project. I have written following servlet for saving uploaded file at local server location. But till the time I have added this servlet to my project folder, tomcat server in not starting.
package testPackage;

import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Iterator;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;

public class uploadFile extends HttpServlet {
    private static final long serialVersionUID = 1L;

    private static final String DATA_DIRECTORY = "data";
    private static final int MAX_MEMORY_SIZE = 1024 * 1024 * 2;
    private static final int MAX_REQUEST_SIZE = 1024 * 1024;

    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

        boolean isMultipart = ServletFileUpload.isMultipartContent(request);

        if (!isMultipart) {
            return;
        }

        DiskFileItemFactory factory = new DiskFileItemFactory();
        factory.setSizeThreshold(MAX_MEMORY_SIZE);
        factory.setRepository(new File(System.getProperty("java.io.tmpdir")));

        String uploadFolder = getServletContext().getRealPath("")
            + File.separator + DATA_DIRECTORY;

        ServletFileUpload upload = new ServletFileUpload(factory); //###### ERROR ######

        upload.setSizeMax(MAX_REQUEST_SIZE);

        try {
            List items = upload.parseRequest(request);
            Iterator iter = items.iterator();
            while (iter.hasNext()) {
                FileItem item = (FileItem) iter.next();

                if (!item.isFormField()) {
                    String fileName = new File(item.getName()).getName();
                    String filePath = uploadFolder + File.separator + fileName;
                    File uploadedFile = new File(filePath);
                    item.write(uploadedFile);
                }
        }

        getServletContext().getRequestDispatcher("http://localhost/test-app/done.html").forward(
                request, response);

        } catch (FileUploadException ex) {
            throw new ServletException(ex);
        } catch (Exception ex) {
            throw new ServletException(ex);
        }
    }
}

web.xml is as follows
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">

<servlet>
    <servlet-name>FileUploading</servlet-name>
    <servlet-class>testPackage.uploadFile</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>FileUploading</servlet-name>
    <url-pattern>/upload</url-pattern>
</servlet-mapping>

</web-app>

I have added required jar files (commons-collections, commons-fileupload, commons-io, commons-logging ) into buildpath and also in WEB-INF/lib folder. I have downloaded these jar from own website of apache. So, I think, there isn't any problem with the jar.
When starting the server it is giving the following error.
Oct 02, 2014 1:40:40 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.8.0_20\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\GTK2-Runtime\lib;C:\Program Files (x86)\Bitvise SSH Client;D:\Extra Installation\Software\Matlab\runtime\win64;D:\Extra Installation\Software\Matlab\bin;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;.
Oct 02, 2014 1:40:41 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:test-app' did not find a matching property.
Oct 02, 2014 1:40:41 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:servletBasic' did not find a matching property.
Oct 02, 2014 1:40:41 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-80"]
Oct 02, 2014 1:40:41 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Oct 02, 2014 1:40:41 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1893 ms
Oct 02, 2014 1:40:41 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Oct 02, 2014 1:40:41 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.34
Oct 02, 2014 1:40:44 AM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [335] milliseconds.
Oct 02, 2014 1:40:47 AM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/test-app]]
    at java.util.concurrent.FutureTask.report(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Failed to start component[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/test-app]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    ... 6 more

Caused by: java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileUploadException
    at java.lang.Class.getDeclaredFields0(Native Method)
    at java.lang.Class.privateGetDeclaredFields(Unknown Source)
    at java.lang.Class.getDeclaredFields(Unknown Source)
    at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:87)
    at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:261)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:140)
    at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
    at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:405)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:881)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 6 more

Caused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileUploadException
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    ... 20 more

Oct 02, 2014 1:40:47 AM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
    at java.util.concurrent.FutureTask.report(Unknown Source)
    at java.util.concurrent.FutureTask.get(Unknown Source)
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:684)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)

Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 6 more

Oct 02, 2014 1:40:47 AM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:684)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
    at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 11 more

There are some other servlets in the same project folder. When I am removing the above said servlet, tomcat server is starting normally. Even when I am removing the line marked as ###ERROR### in the source code then also server is starting normally.
I am quite new in this field and tried as much as I can to resolve this issue. But now I am completely clueless. Please help..

A: Apparently, tomcat is still unable to load the commons fileupload dependency packaged with the WAR.
The safest bet with most containers and app servers is to place dependencies int the shared lib folder (every major JavaEE-compliant app server has one). From this central location, most app servers can load any dependencies. You should note however, that jars placed in this folder are going to be loaded for all applications within the container; you shouldn't bundle the same jars with any applications in that instance
Related

*

*Does Tomcat load the same library file into memory twice if they are in two web apps?

*Tomcat guide on deployment


text:
Q: How do I use a list to loop a process in cmd? I have a netsh profiler that I want to get detailed information for each loop found.
        private void wifiButton_Click(object sender, EventArgs e)
    {

        Process cmd = new Process();
        cmd.StartInfo.FileName = "netsh.exe";
        System.Threading.Thread.Sleep(50);
        cmd.StartInfo.Arguments = "wlan show profiles";
        cmd.StartInfo.UseShellExecute = false;
        cmd.StartInfo.RedirectStandardOutput = true;
        cmd.StartInfo.RedirectStandardError = true;
        cmd.Start();
        //* Read the output (or the error)
        string output = cmd.StandardOutput.ReadToEnd();
        textBox3.Text = output;
        cmd.WaitForExit();

        // output would be set by earlier code
        var Output = textBox3.Text;

        var regex = new Regex(@"All User Profile[\s]+: (.*)");
        var resultList = new List<string>();

        foreach (Match match in regex.Matches(Output))
        {
            resultList.Add(match.Groups[1].ToString());
        }
        textBox4.Text = string.Join(", ", resultList);

The code above works, below I want to take the list and run the results through CMD again to get the detailed results.
        for (int i = 0; i < resultList.Count; i++)
        {
        Process cmd2 = new Process();
        cmd.StartInfo.FileName = "netsh.exe";
        System.Threading.Thread.Sleep(50);
        cmd.StartInfo.Arguments = "wlan show profiles name=" resultList(0) + " key=clear";
        cmd.StartInfo.UseShellExecute = false;
        cmd.StartInfo.RedirectStandardOutput = true;
        cmd.StartInfo.RedirectStandardError = true;
        cmd.Start();
        //* Read the output (or the error)
        string output2 = cmd2.StandardOutput.ReadToEnd();
        textBox5.Text = output2;
        cmd.WaitForExit();
        }
 }

A: Im a good and used a 0 instead of the i placeholder. Also, mislabeled my second cmd run and forgot to update to cmd2, therefore the previous command line would overlap itself and break.
   private void wifiButton_Click(object sender, EventArgs e)
    {

        Process cmd = new Process();
        cmd.StartInfo.FileName = "netsh.exe";
        System.Threading.Thread.Sleep(50);
        cmd.StartInfo.Arguments = "wlan show profiles";
        cmd.StartInfo.UseShellExecute = false;
        cmd.StartInfo.RedirectStandardOutput = true;
        cmd.StartInfo.RedirectStandardError = true;
        cmd.Start();
        //* Read the output (or the error)
        string output = cmd.StandardOutput.ReadToEnd();
        textBox3.Text = output;
        cmd.WaitForExit();
        System.Threading.Thread.Sleep(500);

        // output would be set by earlier code
        var Output = textBox3.Text;

        var regex = new Regex(@"All User Profile[\s]+: (.*)");
        var resultList = new List<string>();

        foreach (Match match in regex.Matches(Output))
        {
            resultList.Add(match.Groups[1].ToString());
        }
        textBox4.Text = string.Join(", ", resultList);

        System.Threading.Thread.Sleep(500);

        for (int i = 0; i < resultList.Count; i++)
        {
            Process cmd2 = new Process();
            cmd2.StartInfo.FileName = "netsh.exe";
            System.Threading.Thread.Sleep(50);
            cmd2.StartInfo.Arguments = "wlan show profiles name=" + resultList[i] + " key=clear";
            cmd2.StartInfo.UseShellExecute = false;
            cmd2.StartInfo.RedirectStandardOutput = true;
            cmd2.StartInfo.RedirectStandardError = true;
            cmd2.Start();
            //* Read the output (or the error)
            string output2 = cmd2.StandardOutput.ReadToEnd();
            textBox5.Text = output2;
            cmd2.WaitForExit();
        }
}

redpajama_set_name: RedPajamaStackExchange


text:
Q: Markov Chain Transition Intensity Conversion I have a question about converting a 3-state discrete state, continuous-time, markov chain to a 2-state.
My 3-state model has states: Well (state 1), Ill (state 2) and Dead (state 3).
$$\begin{bmatrix}-(a12 + a13) & a12 & a13\\0 & -a23 & a23\\ 0 & 0 & 0\end{bmatrix}$$
This 3 state matrix is full.mat in the R code.
I would like to convert it to an Alive/Dead model. I am not sure if I can do it the following way:
$$\begin{bmatrix}-(a13 + a23) & (a13+a23)\\0 & 0\end{bmatrix}$$
where I am simply adding the intensity of Well->Dead, and Ill->Dead to compute the intensity of Alive->Dead for a 2-state model? This matrix is small.mat in the R code.
I would expect that the sum of transition probabilities P(1->3) + P(2->3) from the three state model should equal P(alive -> dead) in the 2-state model.
Essentially, I am trying to determine
$$\mathrm{Pr}(X(t+h) = 3 | X(t) =1~~OR~~X(t) =2)$$
But the final 2 lines of the R-code show that these values are not equivalent, they are slightly off...
Am I doing things incorrectly, or is this just rounding approximation by expm()?
library(expm)

full.mat<- rbind(c(-0.003260632, 0.000514263, 0.002746369),
c(0.000000000, -0.007948859, 0.007948859),
c(0.000000000, 0.000000000, 0.000000000))

small.mat<-matrix(0,2,2)
small.mat[1,2]<-full.mat[1,3]+full.mat[2,3]
small.mat[1,1]<-small.mat[1,2]*-1

exp.full<-expm(full.mat)
exp.small<-expm(small.mat)

# COMPUTE PROBABILITY OF DEATH
exp.small[1,2] # this is probability of death in 2-state model
exp.full[1,3]+exp.full[2,3] # this is probability of death
in 3-state model

A: The first thing to realize is that in this model one needs to know whether one is well-being or ill to know the "chances" one has to become dead.
The exception is when $a_{13}=a_{23}=\alpha$, then the alive/dead process is indeed a Markov process on the state space $\{\mathtt{alive},\mathtt{dead}\}$ with rate transition matrix $\begin{pmatrix}-\alpha &\alpha\\ 0 & 0\end{pmatrix}$. In every other case, the usual Bayes decomposition yields
$$
\mathbb P(X(t+\mathrm dt)=3\mid X(t)=1\ \text{or}\ 2)=\alpha(t)\mathrm dt,
$$
where
$$
\alpha(t)=\frac{a_{13}p_1(t)+a_{23}p_2(t)}{p_1(t)+p_2(t)},\qquad p_i(t)=\mathbb P(X(t)=i).
$$
Note that each $p_i(t)$ depends on $t$ and on the initial distribution $(p_1(0),p_2(0))$. Recall that
$$
p_1(t)=p_1(0)\mathrm e^{-(a_{12}+a_{13})t},\quad p_2(t)=p_1(0)c(t)+p_2(0)\mathrm e^{-a_{23}t},
$$
for some explicit function $c(t)$ you might want to write down.
To sum up, call $Y(t)=\mathtt{dead}$ if $X(t)=3$ and $Y(t)=\mathtt{alive}$ otherwise. Then $(Y(t))_{t\geqslant0}$ is not (in general) a Markov process on the state space $\{\mathtt{alive},\mathtt{dead}\}$ because the distribution of the state $Y(t+\mathrm dt)$
depends on the distribution of the state $Y(t)$ (good), on $t$ itself (medium good), and also on the initial distribution of $X(0)$ (not good).

A: All rates defining the progressive model can be organized in a rate matrix $\mathbf{\mathrm{R}}$. $\mathbf{\mathrm{R}}$ is organized such that rows correspond to the "from" state, and the columns to the "to" state. Disallowed transitions are assigned a rate of $0$, and each row must sum to $0$.
\begin{align*}
\mathbf{\mathrm{R}}=\left[\begin{array}{c c c}
-(\alpha+b \alpha) & b \alpha &\alpha\\
0 & -g \alpha & g \alpha\\
0 & 0 & 0\\
\end{array} \right].
\end{align*}
We also define the state occupation column vector $\mathbf{\mathrm{P}}(t)$
\begin{align*}
\mathbf{\mathrm{P}}(t)=\left[\begin{array}{c}
W(t)\\
I(t)\\
D_O(t)\\
\end{array} \right].
\end{align*}
The rate matrix is used to compute the state occupation column vector at any arbitrary time $t$ using the relationship\cite{Cox1965}
\begin{align}
\mathbf{\mathrm{P}}(t) &= \mathbf{\mathrm{P}}(0) e^{\mathrm{\textbf{R}} t} \label{eq:p_rec}.
\end{align}
By adding two constraints,
\begin{align}
D_O(t) &= 1 - (W(t) + I(t)),~\mathrm{and}\\
D_O(0) &=0,
\end{align}
we can derive a general formula for the overall death function:
$$
D_O(t) = 1 - W(0) e^{- \alpha t (1+b)} - W(0) \frac{b }{g - 1- b }\left(e^{- \alpha t (1+b)} - e^{- \alpha t g}\right)- \left( 1 - W(0)\right)e^{-\alpha t g}
$$


text:
Q: VariableDeclarationFragment node resolveBindind() returns null in eclipse/jdt/ast I'm trying to try out eclipse jdt/ast following this article.
This is the java code as an input:
class Hello
{
    int hello()
    {
        int a = 0, b = 3;
        /* hello */
        {
            b = a * 3;
        }
        return a;
    }
    public static void main(String[] args)
    {
        int z = 0, i = 3;
        /* hello */
        {
            i = z * 3;
        }
    }
}

With ASTView, it shows that VariableDeclarationFragment has corresponding binding.

However, in this visitor code for VariableDeclarationFragment node, I always get null value for 4 local variables (a,b,z,i) as resolveBinding() return value.
What's wrong with this? I use eclipse indigo.

This is the code to get the AST
private static CompilationUnit createCompilationUnit(String sourceFile) {
    String source = readWithStringBuilder(sourceFile);
    ASTParser parser = ASTParser.newParser(AST.JLS3);
    parser.setKind(ASTParser.K_COMPILATION_UNIT);
    parser.setSource(source.toCharArray()); // set source
    parser.setResolveBindings(true); // we need bindings later on
    return (CompilationUnit) parser.createAST(null /* IProgressMonitor */); // parse
}

A: This happens because of the following from the setResolveBindings docs:

Binding information is obtained from the Java model. This means that the compilation unit must be located relative to the Java model. This happens automatically when the source code comes from either setSource(ICompilationUnit) or setSource(IClassFile). When source is supplied by setSource(char[]), the location must be established explicitly by setting an environment using setProject(IJavaProject) or setEnvironment(String[], String[], String[], boolean) and a unit name setUnitName(String). Note that the compiler options that affect doc comment checking may also affect whether any bindings are resolved for nodes within doc comments.

That means you could use something like that (from your link):
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IProject project = root.getProject("someJavaProject");
project.open(null /* IProgressMonitor */);

IJavaProject javaProject = JavaCore.create(project);

and add the setProject call:
private static CompilationUnit createCompilationUnit(String sourceFile,
        IJavaProject javaProject) {
    String source = readWithStringBuilder(sourceFile);
    ASTParser parser = ASTParser.newParser(AST.JLS3);
    parser.setKind(ASTParser.K_COMPILATION_UNIT);
    parser.setSource(source.toCharArray()); // set source
    parser.setProject(javaProject);
    parser.setResolveBindings(true); // we need bindings later on
    return (CompilationUnit) parser.createAST(null /* IProgressMonitor */); // parse
}

The second approach (without setProject):
private static CompilationUnit createCompilationUnit(String sourceFile,
        String unitName) {
    String source = readWithStringBuilder(sourceFile);
    ASTParser parser = ASTParser.newParser(AST.JLS3);
    parser.setKind(ASTParser.K_COMPILATION_UNIT);
    parser.setSource(source.toCharArray()); // set source
    String[] classpathEntries = ...;
    String[] sourcepathEntries = ...;
    parser.setEnvironment(classpathEntries, sourcepathEntries, null, true);
    parser.setUnitName(unitName);
    parser.setResolveBindings(true);
    // optional
    // parser.setBindingsRecovery(true);
    return (CompilationUnit) parser.createAST(null /* IProgressMonitor */); // parse
}

A: Does this mean I have to import source codes I want to run ASTParser on in my current project?
Right now I am using ASTParser incoporating with UIMA framework.
In that framework, I could get source code in char[] only.
Don't know how to get their corresponding IJavaProject and UnitName, which is needed if I .setSource() to a char[].

A: I tried solving this using the following piece of code
protected static CompilationUnit parseStatements(String source) {
    ASTParser parser = ASTParser.newParser(AST.JLS8);
       parser.setSource(source.toCharArray());
    parser.setKind(ASTParser.K_COMPILATION_UNIT);
    parser.setResolveBindings(true);

    parser.setEnvironment( // apply classpath
            new String[] { "//home//user//Projects//SmartCopy//ASTParser_Test//bin" }, //
            null, null, true);
    parser.setUnitName("any_name");
    final CompilationUnit cu = (CompilationUnit) parser.createAST(null);
    return cu;

}

static void newcheckVariableDeclaration(){
    String source ="package javaproject;" // package for all classes
            + "class Dummy {"
            + "int j;" //
            + "   public void add(){"
            + "int x=0,y=0;"
            + "j=x+y;\n" //
            + "   }" //
            + "}";

    final CompilationUnit root = parseStatements(source);
    root.accept(new ASTVisitor() {
        public boolean visit(SimpleName node) {
            System.out.println(node.toString());
            if(node.resolveBinding() == null){
                System.out.println(node.toString()+" is not declared");
            }
            else{
                System.out.println(node.toString() + " is declared");
            }
            System.out.println();
            return true;
        }
    });


text:
Q: Remove unused third-party tab in github I wanted to try out a third party application for github called ZenHub, I do not want to use it anymore. In github through the browser I have revoked the third-party access, under Settings > Application > Authorized OAuth apps, but I can still see it as aa tab in my repositories, and I am unable to remove it.
If I click the "ZenHub" tab, I am redirected to a page to re-authorize the application again.
I have added a picture to explain my issue, I would like to remove the "ZenHub" tab.

A: Try removing it from your Chrome extensions.

A: You can remove custom tabs by clicking the Settings tab on your repo, then the Custom tabs section and clicking the Remove button on the tab you'd like to delete.


text:
Q: API key not valid. Please pass a valid API key Firebase i am trying to implement authentication using email and password. the email and password authentication was working fine
but my realtime database was not working so i deleted that project from firebase and clear my Android studio by deleting json file and removing all dependencies, then i reconnect my project with firebase again and created a new firebase project, and after that this error occurred , i tried solutions like checked API key of json file and the firebase, implemented deppendencies again and allError Screenshot


text:
Q: Contact form doesn't work, "Value cannot be null. Parameter name: address" MVC5 I have a contact form and I have no clue on what is going wrong.
This the code for the model I wrote:
public class Contact
{
    public string FromName { get; set; }
    public string FromEmail { get; set; }
    public string Subject { get; set; }
    public string Message { get; set; }
}

The controller I created with just read/write actions:
using System.Net.Mail;
using System.Web;
using System.Web.Mvc;
using GJL.Models;

namespace GJL.Controllers
{
    public class ContactController : Controller
    {
        // GET: Contact
        [HttpGet]
        public ActionResult Index()
        {
            return View();
        }

        [HttpPost]
        public ActionResult Index(Contact vm)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    MailMessage msz = new MailMessage();
                    msz.From = new MailAddress(vm.FromEmail);//Email which you are getting
                                                         //from contact us page
                    msz.To.Add("roykooiman67@gmail.com");//Where mail will be sent
                    msz.Subject = vm.Subject;
                    msz.Body = vm.Message;
                    SmtpClient smtp = new SmtpClient();

                    smtp.Host = "smtp.gmail.com";

                    smtp.Port = 465;

                    smtp.Credentials = new System.Net.NetworkCredential
                    ("roykooiman67@gmail.com", "PasswordGmail");

                    smtp.EnableSsl = true;

                    smtp.Send(msz);

                    ModelState.Clear();
                    ViewBag.Message = "Bedankt voor je bericht!";
                }
                catch (Exception ex)
                {
                    ModelState.Clear();
                    ViewBag.Message = $" Er ging iets mis: {ex.Message}";
                }
            }

            return View();
        }

        public ActionResult Error()
        {
            return View();
        }
    }
}

And my view (in pastebin either it would've been too long):
https://pastebin.com/LvtSzY4V
And this is the error I get:

Value cannot be null. Parameter name: address

I've read that it has to with the credentials. But these are the right credentials for my account.

A: Issue was fixed after replace asp-for attribute with name attribute on input controls e.g.
    <input name="FromName" class="form-control" />
    <input name="FromEmail" class="form-control" />
    <input name="Subject" class="form-control" />
    <textarea rows="5" cols="15" name="Message" class="form-control"></textarea>

asp-for tag helper was introduced in ASP.NET Core MVC and not available in MVC5


text:
Q: SQL Server : how do I read the last character of a string, and add a new character How to read a string and if there is no , (comma) at the end of that string add a , (comma) to end of it.
@customernumber='583473,789458'

after system checking there is no comma add , (comma) and make it like below
@customernumber='583473,789458,'

A: It looks like you are trying to store multiple numeric customer numbers in a string.  That is a bad idea, and you should think hard about alternatives.
But the answer to your question is:
set @customernumber = (case when @customernumber like '%,' then @customernumber
                            else @customernumber + ','
                       end)


text:
Q: Select the correct grant type I am reading about OAuth 2 and i found the following article that help to decide which grant should i implement.
https://oauth2.thephpleague.com/authorization-server/which-grant/
I have some questions about the flow chart described in the link.
1) When the access token owner is a machine ?
If the access token owner is a cron job running in a server, can i say that the access token owner is a machine ?
2) When then access token is an user ?
If the client user is a human (end user), can i say that the access token owner is a user ?
3) What is exactly a Web App ? Is an application running on a server and accesed via a web client ? For example, a PHP application.
4) What is exactly a User Agent Based App ? Is an application developed using JS like an Angular app ?
Thanks.

A: I went through the mentioned documentation and below I have tried to map original grant types defined in OAuth 2.0 specification against it.
1) When the access token owner is a machine ? If the access token owner is a cron job running in a server, can i say that the access token owner is a machine ?
Here, token is not necessarily issued to and belongs to a machine. It could be an application which runs on a machine which does not have end user interaction but require OAuth 2.0 tokens. As you said it could be a cron job with OAuth 2.0 client credentials. This client must be a confidential client, which means it must have a client id and a password. More can be read from here
2) When then access token is an user ? If the client user is a human (end user), can i say that the access token owner is a user ?
Yes this is correct. Here access token is owned by the end user. And end user grant client application to access OAuth 2.0 resources by letting the client use the access token.
3) What is exactly a Web App ? Is an application running on a server and accesed via a web client ? For example, a PHP application.
A web app according to the diagrams perspective is one that could utilise a user agent (browser) to complete authorization request and have a back-end capable of obtaining token. Emphasis is given to back-end token request as not all application can perform this. Foe example a single page application without a back-end cannot perform this call. So if the PHP app can perform the back-end call, then yes it is a Web app. Flow is authorization code flow.
4) What is exactly a User Agent Based App ? Is an application developed using JS like an Angular app ?
Yes this is correct. It doesn't have a back-end (it may consume one) but rely on JS and runs on browser. So it will mostly use implicit flow (but if end user trust then end user password grant as shown there)


text:
Q: Can't get handers in IIS to work I don't know much about IIS configuration at all.
I'm running a blog based on Blogengine.net (http://dotnetblogengine.net/) I upgraded it to 2.6 (from 2.0) and was moved by my service provider to a new server that supports .NET 4.
The problem is that all http-handlers are not working. I have no direct control over the web server except for the web.config. The support at my service provider has generated a log for me, which gives a bit more details than a 404 when requesting something from a handler. It says HANDLER_PRECONTITION_NOT_MATCH which I suspect could be the cause of this problem.
As I said, I don't know much at all about configuration like this, the site work locally when running on IIS7.5 Express, but there seems to be the same problem when using the standard development server. My site has been non working for days now, and I'm running out of options, what to try to do!
A snippet from my web.config (exactly like the one from blogengine.net download):
<handlers accessPolicy="Read, Write, Script, Execute">
  <add name="FileHandler" verb="*" path="file.axd" type="BlogEngine.Core.Web.HttpHandlers.FileHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
  <add name="ImageHandler" verb="*" path="image.axd" type="BlogEngine.Core.Web.HttpHandlers.ImageHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
  <add name="Syndication" verb="*" path="syndication.axd" type="BlogEngine.Core.Web.HttpHandlers.SyndicationHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
  <add name="Sitemap" verb="*" path="sitemap.axd" type="BlogEngine.Core.Web.HttpHandlers.SiteMap, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
  <add name="Trackback" verb="*" path="trackback.axd" type="BlogEngine.Core.Web.HttpHandlers.TrackbackHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
  <add name="Pingback" verb="*" path="pingback.axd" type="BlogEngine.Core.Web.HttpHandlers.PingbackHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
  <add name="OpenSearch" verb="*" path="opensearch.axd" type="BlogEngine.Core.Web.HttpHandlers.OpenSearchHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
  <add name="MetaWeblog" verb="*" path="metaweblog.axd" type="BlogEngine.Core.API.MetaWeblog.MetaWeblogHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
  <add name="RSD" verb="*" path="rsd.axd" type="BlogEngine.Core.Web.HttpHandlers.RsdHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
  <!--<add name="CssHandler" verb="*" path="css.axd" type="BlogEngine.Core.Web.HttpHandlers.CssHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>-->
  <add name="WebResource" path="*.js.axd" verb="*" type="BlogEngine.Core.Web.HttpHandlers.JavaScriptHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
  <add name="Resource" verb="*" path="*.res.axd" type="BlogEngine.Core.Web.HttpHandlers.ResourceHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
  <add name="Rating" verb="*" path="rating.axd" type="BlogEngine.Core.Web.HttpHandlers.RatingHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
  <add name="Opml" verb="*" path="opml.axd" type="BlogEngine.Core.Web.HttpHandlers.OpmlHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
  <add name="BlogML" verb="*" path="blogml.axd" type="BlogEngine.Core.Web.HttpHandlers.BlogMLExportHandler, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
  <add name="SIOC" verb="*" path="sioc.axd" type="BlogEngine.Core.Web.HttpHandlers.Sioc, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
  <add name="Apml" verb="*" path="apml.axd" type="BlogEngine.Core.Web.HttpHandlers.Apml, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
  <add name="Foaf" verb="*" path="foaf*.axd" type="BlogEngine.Core.Web.HttpHandlers.Foaf, BlogEngine.Core" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode"/>
  <add name="Html" path="*.htm" verb="*" type="System.Web.StaticFileHandler" resourceType="Unspecified" preCondition="integratedMode"/>
  <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>

A: I have finally solved the problem! the "Pool mode" in my service providers settings was set to classic. I changed it to "integration" and all problems went away :-)


text:
Q: How to write a script to "listen" to battery status and alert me when it's above 60% or below 40%? I want to make a tool that alerts when battery is below 40% or above 60% so I can start/stop charging accordingly.
I know some tools alert when battery is low, that's not enough. Is there a tool that does it when bat is high?
I would like to write a script - either shell or python, that can do this. I know the command for checking bat status:
upower -i /org/freedesktop/UPower/devices/battery_BAT0

But don't know how to "listen" to the battery so that whenever it's status changes I can automatically perform an action. A link to docs will be nice, a tutorial even better.

A: You cannot write a tutorial to create one script. That would be similar to a general python tutorial, which you can find on many places on the web.
What I did is write a small script, with comments to explain what I did, to check battery charge every 10 seconds. That might be overdone. Change the line time.sleep(10) to set the interval (in seconds). The commands can be changed of course, I made it send a notification as it is.

I made it run the message, or whatever command you give it, only run once per incident, so if charge exceeds 80% for example, the command only runs once, until the next time it exceeds defined values.
How to use
The script is meant to run in the background; copy it into an empty file, save it as check_battery.py make it executable and make it run on login: Dash > Startup Applications > Add, add the command:
/path/to/check_battery.py

The script
#!/usr/bin/env python3

import subprocess
import time

def read_status():
    """
    This function reads the output of your command, finds the line with
    'percentage' (line 17, where first line = 0) and reads the figure
    """
    command = "upower -i $(upower -e | grep BAT) | grep --color=never -E percentage|xargs|cut -d' ' -f2|sed s/%//"
    get_batterydata = subprocess.Popen(["/bin/bash", "-c", command], stdout=subprocess.PIPE)
    return get_batterydata.communicate()[0].decode("utf-8").replace("\n", "")

def take_action():
    """
    When the charge is over 60% or below 40%, I assume the action does
    not have to be repeated every 10 seconds. As it is, it only runs
    1 time if charge exceeds the values. Then only if it exceeds the
    limit again.
    """
    # the two commands to run if charged over 80% or below 60%
    command_above = "notify-send 'charged over 80'%"
    command_below = "notify-send 'charged below 80%'"
    times = 0
    while True:
        charge = int(read_status())
        if charge > 60:
            if times == 0:
                subprocess.Popen(["/bin/bash", "-c", command_above])
                times = 1
        elif charge < 40:
            if times == 0:
                subprocess.Popen(["/bin/bash", "-c", command_below])
                times = 1
        else:
            times = 0
        time.sleep(10)

take_action()

A: If I understood your question correctly, you want to check the battery status in every X interval of time. It's easiest way that you run it in the background, inside a while loop:
while true
 do
    # Any script or command
    sleep [number of seconds]
 done

And if you want to run the script on startup and from then on every 5 minutes, so the construction would be:

*

*Add a line in /etc/rc.local to call your script (your battery_status.sh) + "&" to make it exit.

*Add the commands you want to run in the battery_status.sh to execute in a while loop (inside battery_status.sh).

Note that if you want to run it from cron, you need to set the full path, since cron runs with a limited set of environment variables.
Example
#!/bin/bash
while true
do
    battery_level=`acpi -b | grep -P -o '[0-9]+(?=%)'`
    if [ $battery_level -ge 60 ]; then
       notify-send "Battery is above 60%!" "Charging: ${battery_level}%"
    elif [ $battery_level -le 40 ]; then
       notify-send "Battery is lower 40%!" "Charging: ${battery_level}%"
    fi

    sleep 300 # 300 seconds or 5 minutes
done

Save this file by named battery_status.sh in your favorite location (mine is home directory) and add this line in /etc/rc.local file (in my example, just replace your battery_status.sh location by /home/username/):
sh /home/username/battery_status.sh &

That's all. Reboot and see the magic.
If you don't have instell acpi, just install that using sudo apt-get install acpi
One BONUS
If you want to run make this script responsible with AC adapter,you don't need an extra variable to check that run for one time. If your AC adapter is plugged and battery charged above 60% it makes a alert to "Unplug your adapter!" until you don't unplug that. If alert tell you

just unplug AC adapter then you will see the message alert don't appear again until your battery charge down to 40%. Then another message alert and tell you

if you don't unplug AC adapter on above 60% or don't plug AC adapter below 40%, the alert message shown every 5 minutes (you can adjust that for yourself in code, see sleep [seconds]) show and Will remind you.
 #!/bin/bash

    while true
    do
        export DISPLAY=:0.0
        battery_level=`acpi -b | grep -P -o '[0-9]+(?=%)'`
        if on_ac_power; then
            if [ $battery_level -ge 60 ]; then
                notify-send "Battery charging above 60%. Please unplug your AC adapter!" "Charging: ${battery_level}% "
                sleep 20
                if on_ac_power; then
                    gnome-screensaver-command -l   ## lock the screen if you don't unplug AC adapter after 20 seconds
                fi
             fi
        else
             if [ $battery_level -le 40 ]; then
                notify-send "Battery is lower 40%. Need to charging! Please plug your AC adapter." "Charging: ${battery_level}%"
                sleep 20
                if ! on_ac_power; then
                    gnome-screensaver-command -l   ## lock the screen if you don't plug AC adapter after 20 seconds
                fi
             fi
        fi

        sleep 300 # 300 seconds or 5 minutes
    done


text:
Q: Rotate sprite image in all angles using j2me I'm developing a game in Android and Java. In android I am using andengine for sprite image and i was able to rotate in all directions.
  int bikeFrame:
//bikeFrame++,bikeFrame--

bikeSprite.setRotation(bikeFrame);

I want to make the game in j2me also. But in j2me we have only four methods to rotate angle
(TRANS_MIRROR,TRANS_MIRROR 90,TRANS_MIRROR 270,TRANS_MIRROR 180)..
If i take images as frames I am still not getting smooth animation.
How to rotate sprite image in all angles in j2me?

A: See this thread, omarhassan123 created a code snippet that should allow you to rotate the image by any angle you like.
There is a library called J2ME ARMY KNIFE that provides all sorts of image manipulation techniques, you can get it here.
Also, see this question:
Image rotation algorithm
Another idea: decompile a game called Flexis Extreme. They do a lot of image rotation in real time so you could try to find out how they did it.

A: If you can, try LWUIT Image.rotate there is a sample at this page http://lwuit.blogspot.com.br/2008/11/round-round-infinite-progress-and.html


text:
Q: System.BadImageFormatException: 64bit MVC 2 project - with step by step instruction to reproduce the error I want to create a 64bit ASP.NET MVC 2 Web Application and reference it with a 64bit class library.
But doing so I get a "System.BadImageFormatException"-Exception
Every project/Solution I add is .Net 4.0:

*

*I create a new blank solution called "MySolution"

*I add a new project to that solution (ASP.NET MVC 2 Web Application), called "MyMvcApplication", No Test unit to make it easier (Visual studio asks to create one)

Up to this point "MyMvcApplication" is running like it should. Even when setting it to x64.

*

*I add a new project to the soltion (Class Library), called "MyClassLibrary"

*I set "MyMvcApplication" as starting project (it should be already, but just for the complete list what I do).

*I go to the menu Build/Configuration Manager, create a new Platform "x64" by copying from "Any CPU". Then I set both projects to x64.

*Now I have Debug | x64 and for "MyClassLibrary" and "MyMvcApplication" the Platform to x64 and the "Build box" ticked.

*I add a reference from "MyMvcApplication" to "MyClassLibrary" (Add reference, got to the Projects Tab and select "MyClassLibrary").

I run the "MyMvcApplication" and get the following error:
Could not load file or assembly 'MyClassLibrary' or one of its dependencies.
An attempt was made to load a program with an incorrect format.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.BadImageFormatException: Could not load file or assembly
'MyClassLibrary' or one of its dependencies. An attempt was made to load a program
with an incorrect format.

Source Error:
An unhandled exception was generated during the execution of the current web request.
Information regarding the origin and location of the exception can be identified
using the exception stack trace below.

Assembly Load Trace: The following information can be helpful to determine why the assembly 'MyClassLibrary' could not be loaded.

=== Pre-bind state information ===
LOG: User = Dev\Chris
LOG: DisplayName = MyClassLibrary
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: MyClassLibrary | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///c:/Test/MySolution/MyMvcApplication/
LOG: Initial PrivatePath = c:\Test\MySolution\MyMvcApplication\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: c:\Test\MySolution\MyMvcApplication\web.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/f962adb4/1764faec/MyClassLibrary.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/Temporary ASP.NET Files/root/f962adb4/1764faec/MyClassLibrary/MyClassLibrary.DLL.
LOG: Attempting download of new URL file:///c:/Test/MySolution/MyMvcApplication/bin/MyClassLibrary.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

EDIT:
running "corflags c:\Test\MySolution\MyMvcApplication\bin\MyClassLibrary.DLL" like suggested from  bobbymcr in the visual studio command prompt I get:
Version   : v4.0.30319
CLR Header: 2.5
PE        : PE32+
CorFlags  : 1
ILONLY    : 1
32BIT     : 0
Signed    : 0

But I don't know what to do with this information :-(
EDIT2:
When switching all projects to x86 and running the ASP.NET MVC 2 Web Application I get the following error:
Parser Error
Description: An error occurred during the parsing of a resource required to service this
request. Please review the following specific parse error details and modify your
source file appropriately.

Parser Error Message: Could not load type 'MyMvcApplication.MvcApplication'.

Source Error:

Line 1:  <%@ Application Codebehind="Global.asax.cs"
Inherits="MyMvcApplication.MvcApplication" Language="C#" %>

Source File: /global.asax    Line: 1

So I get an error no matter if I switch to x86 or x64.
What can I do?

A: The fact is that x64 bit application can load both x86 and x64 assemblies. But x86 application can load ONLY x86 assemblies. Casini (Visual Studio Development Server) is x86 application, that's why it does not support x64 Web applications to run. You must host x64 Web Applications only on IIS which support both x86 and x64.
Also make sure that Target platform for your class library is ".NET Framework 4.0" but not ".Net 4.0 Client profile".
Please mark this post as Answer if it resolve the issue.


text:
Q: Bluemix - Manual Deploy of NodeJS app Mongo works, DevOps Pipeline fails Using same commands I am trying to automate the creation of my nodeJS application + Compose MongoDB to be able to put on the IBM Marketplace.
Background: I can successfully manually install (via terminal) both the App (NodeJS) and Compose and get this running on Bluemix.
code from my DevOps service deploy stage:
#!/bin/bash
cf create-service compose-for-mongodb Standard mongodbbuzzy01
cf push "${CF_APP}" --no-start
mongourl=$(cf env ${CF_APP} | egrep -o 'mongodb://.*"' | rev | cut -c 2- | rev); cf set-env ${CF_APP} MONGO_URL $mongourl
packagejson=$(<bluemix_settings.json)
rooturl=$(awk '$0 ~ /application_uris/{getline n; gsub("\"|^[[:space:]]+","",n); print n}')
cf set-env ${CF_APP} METEOR_SETTINGS "$packagejson"
cf set-env ${CF_APP} ROOT_URL "https://$rooturl"
cf restage "${CF_APP}"
cf start "${CF_APP}"

My Manifest file:
declared-services:
      mongodbbuzzy01:
        label: compose-for-mongodb
        plan: Standard
applications:
- name:    buzzyAG
  host:    buzzyAG
  services:
    - mongodbbuzzy01

When I start the app I see the errors below referring to missing Node modules.
This does NOT happen when I setup this manually (without Dev Ops services), the app starts up fine and all is good. (ie I just run those CF commands via a terminal/shell)
Any help appreciated.
I see the following errors in the logs in the Bluemix console for the app:
```
All
Errors
Log type: all
App instances: all
API/1Created app with guid fbd4d954-f2f3-455f-a4a8-8f6d5580d4b8Mar 10, 2017 12:10:36 PM
API/1Updated app with guid fbd4d954-f2f3-455f-a4a8-8f6d5580d4b8 ({"route"=>"28f61a24-cfd1-4dfa-9a9f-4144628db6e0", :verb=>"add", :relation=>:routes, :related_guid=>"28f61a24-cfd1-4dfa-9a9f-4144628db6e0"})Mar 10, 2017 12:10:39 PM
API/6Updated app with guid fbd4d954-f2f3-455f-a4a8-8f6d5580d4b8 ({"environment_json"=>"PRIVATE DATA HIDDEN"})Mar 10, 2017 12:18:51 PM
API/1Updated app with guid fbd4d954-f2f3-455f-a4a8-8f6d5580d4b8 ({"environment_json"=>"PRIVATE DATA HIDDEN"})Mar 10, 2017 12:24:26 PM
API/3Updated app with guid fbd4d954-f2f3-455f-a4a8-8f6d5580d4b8 ({"state"=>"STARTED"})Mar 10, 2017 12:24:33 PM
STG/0Downloading swift_buildpack_v2_0_3-20161217-1748...Mar 10, 2017 12:24:33 PM
STG/0Downloading sdk-for-nodejs_v3_9-20161128-1327...Mar 10, 2017 12:24:33 PM
STG/0Downloading python_buildpack...Mar 10, 2017 12:24:33 PM
STG/0Downloading liberty-for-java_v3_6-20161209-1351...Mar 10, 2017 12:24:33 PM
STG/0Downloading php_buildpack...Mar 10, 2017 12:24:33 PM
STG/0Downloaded python_buildpackMar 10, 2017 12:24:33 PM
STG/0Downloaded sdk-for-nodejs_v3_9-20161128-1327Mar 10, 2017 12:24:33 PM
STG/0Downloading staticfile_buildpack...Mar 10, 2017 12:24:33 PM
STG/0Downloading xpages_buildpack...Mar 10, 2017 12:24:33 PM
STG/0Downloaded swift_buildpack_v2_0_3-20161217-1748Mar 10, 2017 12:24:33 PM
STG/0Downloading binary_buildpack...Mar 10, 2017 12:24:33 PM
STG/0Downloaded liberty-for-java_v3_6-20161209-1351Mar 10, 2017 12:24:33 PM
STG/0Downloading dotnet-core_v1_0_1-20161005-1225...Mar 10, 2017 12:24:33 PM
STG/0Downloading swift_buildpack...Mar 10, 2017 12:24:33 PM
STG/0Downloaded php_buildpackMar 10, 2017 12:24:33 PM
STG/0Downloaded xpages_buildpackMar 10, 2017 12:24:33 PM
STG/0Downloading liberty-for-java...Mar 10, 2017 12:24:33 PM
STG/0Downloaded binary_buildpackMar 10, 2017 12:24:33 PM
STG/0Downloading sdk-for-nodejs...Mar 10, 2017 12:24:33 PM
STG/0Downloading dotnet-core...Mar 10, 2017 12:24:33 PM
STG/0Downloaded staticfile_buildpackMar 10, 2017 12:24:33 PM
STG/0Downloaded swift_buildpackMar 10, 2017 12:24:33 PM
STG/0Downloading ruby_buildpack...Mar 10, 2017 12:24:33 PM
STG/0Downloaded sdk-for-nodejsMar 10, 2017 12:24:33 PM
STG/0Downloading java_buildpack...Mar 10, 2017 12:24:33 PM
STG/0Downloaded dotnet-core_v1_0_1-20161005-1225Mar 10, 2017 12:24:33 PM
STG/0Downloading nodejs_buildpack...Mar 10, 2017 12:24:33 PM
STG/0Downloaded liberty-for-javaMar 10, 2017 12:24:33 PM
STG/0Downloading go_buildpack...Mar 10, 2017 12:24:33 PM
STG/0Downloaded java_buildpackMar 10, 2017 12:24:33 PM
STG/0Downloaded dotnet-coreMar 10, 2017 12:24:33 PM
STG/0Downloaded ruby_buildpackMar 10, 2017 12:24:33 PM
STG/0Downloaded go_buildpackMar 10, 2017 12:24:33 PM
STG/0Creating containerMar 10, 2017 12:24:33 PM
STG/0Downloaded nodejs_buildpackMar 10, 2017 12:24:33 PM
STG/0Successfully created containerMar 10, 2017 12:24:36 PM
STG/0Downloading app package...Mar 10, 2017 12:24:36 PM
STG/0Staging...Mar 10, 2017 12:24:37 PM
STG/0Downloaded app package (9.7M)Mar 10, 2017 12:24:37 PM
STG/0 Using default npm version: 2.15.9Mar 10, 2017 12:24:46 PM
STG/0-----> Restoring cacheMar 10, 2017 12:24:46 PM
STG/0 Skipping cache restore (new runtime signature)Mar 10, 2017 12:24:47 PM
STG/0-----> Checking and configuring service extensions before installing dependenciesMar 10, 2017 12:24:47 PM
STG/0-----> Building dependenciesMar 10, 2017 12:24:47 PM
STG/0 Installing node modules (package.json)Mar 10, 2017 12:24:47 PM
STG/0 > fibers@1.0.15 install /tmp/app/node_modules/fibersMar 10, 2017 12:24:54 PM
STG/0 > node build.js || nodejs build.jsMar 10, 2017 12:24:54 PM
STG/0Mar 10, 2017 12:24:54 PM
STG/0Mar 10, 2017 12:24:54 PM
STG/0 `linux-x64-46` exists; testingMar 10, 2017 12:24:54 PM
STG/0 Binary is fine; exitingMar 10, 2017 12:24:54 PM
STG/0Mar 10, 2017 12:24:56 PM
STG/0 > node-gyp rebuildMar 10, 2017 12:24:56 PM
STG/0Mar 10, 2017 12:24:56 PM
STG/0 > bcrypt@0.8.7 install /tmp/app/node_modules/bcryptMar 10, 2017 12:24:56 PM
STG/0 make: Entering directory `/tmp/app/node_modules/bcrypt/build'Mar 10, 2017 12:25:00 PM
STG/0 CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.oMar 10, 2017 12:25:00 PM
STG/0 CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.oMar 10, 2017 12:25:01 PM
STG/0 CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.oMar 10, 2017 12:25:01 PM
STG/0 SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.nodeMar 10, 2017 12:25:03 PM
STG/0 COPY Release/bcrypt_lib.nodeMar 10, 2017 12:25:03 PM
STG/0 make: Leaving directory `/tmp/app/node_modules/bcrypt/build'Mar 10, 2017 12:25:03 PM
STG/0 > (node-gyp rebuild 2> builderror.log) || (exit 0)Mar 10, 2017 12:25:05 PM
STG/0Mar 10, 2017 12:25:05 PM
STG/0Mar 10, 2017 12:25:05 PM
STG/0 > websocket@1.0.24 install /tmp/app/node_modules/watson-developer-cloud/node_modules/websocketMar 10, 2017 12:25:05 PM
STG/0 make: Entering directory `/tmp/app/node_modules/watson-developer-cloud/node_modules/websocket/build'Mar 10, 2017 12:25:06 PM
STG/0 CXX(target) Release/obj.target/bufferutil/src/bufferutil.oMar 10, 2017 12:25:06 PM
STG/0 SOLINK_MODULE(target) Release/obj.target/bufferutil.nodeMar 10, 2017 12:25:07 PM
STG/0 COPY Release/bufferutil.nodeMar 10, 2017 12:25:08 PM
STG/0 CXX(target) Release/obj.target/validation/src/validation.oMar 10, 2017 12:25:08 PM
STG/0 SOLINK_MODULE(target) Release/obj.target/validation.nodeMar 10, 2017 12:25:09 PM
STG/0 COPY Release/validation.nodeMar 10, 2017 12:25:09 PM
STG/0 make: Leaving directory `/tmp/app/node_modules/watson-developer-cloud/node_modules/websocket/build'Mar 10, 2017 12:25:09 PM
STG/0Mar 10, 2017 12:25:14 PM
STG/0 > phantomjs@1.9.20 install /tmp/app/node_modules/webshot/node_modules/phantomjsMar 10, 2017 12:25:14 PM
STG/0 > node install.jsMar 10, 2017 12:25:14 PM
STG/0Mar 10, 2017 12:25:14 PM
STG/0 PhantomJS not found on PATHMar 10, 2017 12:25:15 PM
STG/0 Saving to /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2Mar 10, 2017 12:25:15 PM
STG/0 Downloading https://github.com/Medium/phantomjs/releases/download/v1.9.19/phantomjs-1.9.8-linux-x86_64.tar.bz2Mar 10, 2017 12:25:15 PM
STG/0 Receiving...Mar 10, 2017 12:25:15 PM
STG/0Mar 10, 2017 12:25:29 PM
STG/0 Received 12854K total.Mar 10, 2017 12:25:29 PM
STG/0 Extracting tar contents (via spawned process)Mar 10, 2017 12:25:29 PM
STG/0 Copying extracted folder /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2-extract-1489109129909/phantomjs-1.9.8-linux-x86_64 -> /tmp/app/node_modules/webshot/node_modules/phantomjs/lib/phantomMar 10, 2017 12:25:32 PM
STG/0 Removing /tmp/app/node_modules/webshot/node_modules/phantomjs/lib/phantomMar 10, 2017 12:25:32 PM
STG/0 Done. Phantomjs binary available at /tmp/app/node_modules/webshot/node_modules/phantomjs/lib/phantom/bin/phantomjsMar 10, 2017 12:25:33 PM
STG/0 Writing location.js fileMar 10, 2017 12:25:33 PM
STG/0 eventie@1.0.6 node_modules/eventieMar 10, 2017 12:25:34 PM
STG/0 html-truncate@1.2.2 node_modules/html-truncateMar 10, 2017 12:25:34 PM
STG/0 underscore@1.8.3 node_modules/underscoreMar 10, 2017 12:25:34 PM
STG/0 jquery-inview@1.1.2 node_modules/jquery-inviewMar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 vimeo-api@1.1.0 node_modules/vimeo-apiMar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 └── cookies@0.3.8Mar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 currency-symbol-map@3.1.0 node_modules/currency-symbol-mapMar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 ├── keygrip@1.0.1Mar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 autolinker@1.4.2 node_modules/autolinkerMar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 get-style-property@0.1.1 node_modules/get-style-propertyMar 10, 2017 12:25:34 PM
STG/0 in-viewport@3.4.2 node_modules/in-viewportMar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 wolfy87-eventemitter@4.3.0 node_modules/wolfy87-eventemitterMar 10, 2017 12:25:34 PM
STG/0 giphy-api@1.2.5 node_modules/giphy-apiMar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 connect-cookies@0.0.0 node_modules/connect-cookiesMar 10, 2017 12:25:34 PM
STG/0 ├── on-finished@2.3.0 (ee-first@1.1.1)Mar 10, 2017 12:25:34 PM
STG/0 fibers@1.0.15 node_modules/fibersMar 10, 2017 12:25:34 PM
STG/0 ├── bytes@2.4.0Mar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 body-parser@1.17.1 node_modules/body-parserMar 10, 2017 12:25:34 PM
STG/0 └── source-map@0.5.6Mar 10, 2017 12:25:34 PM
STG/0 ├── content-type@1.0.2Mar 10, 2017 12:25:34 PM
STG/0 source-map-support@0.4.11 node_modules/source-map-supportMar 10, 2017 12:25:34 PM
STG/0 ├── depd@1.1.0Mar 10, 2017 12:25:34 PM
STG/0 ├── qs@6.4.0Mar 10, 2017 12:25:34 PM
STG/0 └── type-is@1.6.14 (media-typer@0.3.0, mime-types@2.1.14)Mar 10, 2017 12:25:34 PM
STG/0 ├── iconv-lite@0.4.15Mar 10, 2017 12:25:34 PM
STG/0 ├── raw-body@2.2.0 (unpipe@1.0.0)Mar 10, 2017 12:25:34 PM
STG/0 ├── http-errors@1.6.1 (setprototypeof@1.0.3, inherits@2.0.3, statuses@1.3.1)Mar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 ├── debug@2.6.1 (ms@0.7.2)Mar 10, 2017 12:25:34 PM
STG/0 bcrypt@0.8.7 node_modules/bcryptMar 10, 2017 12:25:34 PM
STG/0 jquery@2.2.4 node_modules/jqueryMar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 ├── bindings@1.2.1Mar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 s3-write-stream@0.0.1 node_modules/s3-write-streamMar 10, 2017 12:25:34 PM
STG/0 └── nan@2.3.5Mar 10, 2017 12:25:34 PM
STG/0 ├── through2@0.4.2 (readable-stream@1.0.34, xtend@2.1.2)Mar 10, 2017 12:25:34 PM
STG/0 ├── backoff@2.3.0Mar 10, 2017 12:25:34 PM
STG/0 ├── stream-browserify@2.0.1 (inherits@2.0.3, readable-stream@2.2.3)Mar 10, 2017 12:25:34 PM
STG/0 └── bl@0.7.0 (readable-stream@1.0.34)Mar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 meteor-node-stubs@0.2.5 node_modules/meteor-node-stubsMar 10, 2017 12:25:34 PM
STG/0 ├── https-browserify@0.0.1Mar 10, 2017 12:25:34 PM
STG/0 ├── minimalistic-assert@1.0.0Mar 10, 2017 12:25:34 PM
STG/0 ├── buffer-shims@1.0.0Mar 10, 2017 12:25:34 PM
STG/0 ├── path-browserify@0.0.0Mar 10, 2017 12:25:34 PM
STG/0 ├── tty-browserify@0.0.0Mar 10, 2017 12:25:34 PM
STG/0 ├── evp_bytestokey@1.0.0Mar 10, 2017 12:25:34 PM
STG/0 ├── constants-browserify@1.0.0Mar 10, 2017 12:25:34 PM
STG/0 ├── punycode@1.4.1Mar 10, 2017 12:25:34 PM
STG/0 ├── indexof@0.0.1Mar 10, 2017 12:25:34 PM
STG/0 ├── browserify-cipher@1.0.0Mar 10, 2017 12:25:34 PM
STG/0 ├── string_decoder@0.10.31Mar 10, 2017 12:25:34 PM
STG/0 ├── browserify-des@1.0.0Mar 10, 2017 12:25:34 PM
STG/0 ├── create-ecdh@4.0.0Mar 10, 2017 12:25:34 PM
STG/0 ├── browserify-rsa@4.0.1Mar 10, 2017 12:25:34 PM
STG/0 ├── brorand@1.0.6Mar 10, 2017 12:25:34 PM
STG/0 ├── ripemd160@1.0.1Mar 10, 2017 12:25:34 PM
STG/0 ├── inherits@2.0.1Mar 10, 2017 12:25:34 PM
STG/0 ├── os-browserify@0.2.1Mar 10, 2017 12:25:34 PM
STG/0 ├── util-deprecate@1.0.2Mar 10, 2017 12:25:34 PM
STG/0 ├── create-hmac@1.1.4Mar 10, 2017 12:25:34 PM
STG/0 ├── cipher-base@1.0.3Mar 10, 2017 12:25:34 PM
STG/0 ├── process-nextick-args@1.0.7Mar 10, 2017 12:25:34 PM
STG/0 ├── randombytes@2.0.3Mar 10, 2017 12:25:34 PM
STG/0 ├── ieee754@1.1.8Mar 10, 2017 12:25:34 PM
STG/0 ├── core-util-is@1.0.2Mar 10, 2017 12:25:34 PM
STG/0 ├── pbkdf2@3.0.9Mar 10, 2017 12:25:34 PM
STG/0 ├── process@0.11.9Mar 10, 2017 12:25:34 PM
STG/0 ├── stream-browserify@2.0.1Mar 10, 2017 12:25:34 PM
STG/0 ├── domain-browser@1.1.7Mar 10, 2017 12:25:34 PM
STG/0 ├── miller-rabin@4.0.0Mar 10, 2017 12:25:34 PM
STG/0 ├── assert@1.4.1Mar 10, 2017 12:25:34 PM
STG/0 ├── isarray@1.0.0Mar 10, 2017 12:25:34 PM
STG/0 ├── base64-js@1.2.0Mar 10, 2017 12:25:34 PM
STG/0 ├── create-hash@1.1.2Mar 10, 2017 12:25:34 PM
STG/0 ├── diffie-hellman@5.0.2Mar 10, 2017 12:25:34 PM
STG/0 ├── Base64@0.2.1Mar 10, 2017 12:25:34 PM
STG/0 ├── vm-browserify@0.0.4Mar 10, 2017 12:25:34 PM
STG/0 ├── buffer-xor@1.0.3Mar 10, 2017 12:25:34 PM
STG/0 ├── date-now@0.1.4Mar 10, 2017 12:25:34 PM
STG/0 ├── hash.js@1.0.3Mar 10, 2017 12:25:34 PM
STG/0 ├── querystring@0.2.0Mar 10, 2017 12:25:34 PM
STG/0 ├── browserify-sign@4.0.0Mar 10, 2017 12:25:34 PM
STG/0 ├── timers-browserify@1.4.2Mar 10, 2017 12:25:34 PM
STG/0 ├── querystring-es3@0.2.1Mar 10, 2017 12:25:34 PM
STG/0 ├── console-browserify@1.1.0Mar 10, 2017 12:25:34 PM
STG/0 ├── bn.js@4.11.6Mar 10, 2017 12:25:34 PM
STG/0 ├── des.js@1.0.0Mar 10, 2017 12:25:34 PM
STG/0 ├── util@0.10.3Mar 10, 2017 12:25:34 PM
STG/0 ├── elliptic@6.3.2Mar 10, 2017 12:25:34 PM
STG/0 ├── asn1.js@4.9.0Mar 10, 2017 12:25:34 PM
STG/0 ├── readable-stream@2.2.1Mar 10, 2017 12:25:34 PM
STG/0 ├── sha.js@2.4.8Mar 10, 2017 12:25:34 PM
STG/0 ├── pako@0.2.9Mar 10, 2017 12:25:34 PM
STG/0 ├── crypto-browserify@3.11.0Mar 10, 2017 12:25:34 PM
STG/0 ├── browserify-aes@1.0.6Mar 10, 2017 12:25:34 PM
STG/0 ├── http-browserify@1.7.0Mar 10, 2017 12:25:34 PM
STG/0 ├── url@0.11.0 (punycode@1.3.2)Mar 10, 2017 12:25:34 PM
STG/0 ├── browserify-zlib@0.1.4Mar 10, 2017 12:25:34 PM
STG/0 ├── events@1.1.1Mar 10, 2017 12:25:34 PM
STG/0 ├── public-encrypt@4.0.0Mar 10, 2017 12:25:34 PM
STG/0 stripe@4.15.1 node_modules/stripeMar 10, 2017 12:25:34 PM
STG/0 ├── parse-asn1@5.0.0Mar 10, 2017 12:25:34 PM
STG/0 └── buffer@4.9.1Mar 10, 2017 12:25:34 PM
STG/0 aws-sdk@2.0.0-rc9 node_modules/aws-sdkMar 10, 2017 12:25:34 PM
STG/0 ├── lodash.isplainobject@4.0.6Mar 10, 2017 12:25:34 PM
STG/0 ├── object-assign@4.1.1Mar 10, 2017 12:25:34 PM
STG/0 d3@3.5.17 node_modules/d3Mar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 └── bluebird@2.11.0Mar 10, 2017 12:25:34 PM
STG/0 ├── qs@6.0.4Mar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 ics-js@0.9.1 node_modules/ics-jsMar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 ├── simple-guid@0.0.1Mar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 saml2-js@1.11.0 node_modules/saml2-jsMar 10, 2017 12:25:34 PM
STG/0 └── xml2js@0.2.4 (sax@1.2.2)Mar 10, 2017 12:25:34 PM
STG/0 ├── xmldom@0.1.27Mar 10, 2017 12:25:34 PM
STG/0 └── lodash@4.17.4Mar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 ├── es6-error@1.0.0Mar 10, 2017 12:25:34 PM
STG/0 ├── xmlbuilder@0.4.2Mar 10, 2017 12:25:34 PM
STG/0 ├── async@1.5.2Mar 10, 2017 12:25:34 PM
STG/0 ├── underscore@1.6.0Mar 10, 2017 12:25:34 PM
STG/0 ├── xml-crypto@0.8.5 (xpath.js@1.0.7, xmldom@0.1.19)Mar 10, 2017 12:25:34 PM
STG/0 ├── xmlbuilder@2.1.0Mar 10, 2017 12:25:34 PM
STG/0 ├── vcap_services@0.2.0Mar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 ├── xml-encryption@0.9.0 (async@0.2.10, xpath@0.0.5, ejs@0.8.8, node-forge@0.6.38)Mar 10, 2017 12:25:34 PM
STG/0 watson-developer-cloud@2.25.1 node_modules/watson-developer-cloudMar 10, 2017 12:25:34 PM
STG/0 ├── cookie@0.3.1Mar 10, 2017 12:25:34 PM
STG/0 ├── isstream@0.1.2Mar 10, 2017 12:25:34 PM
STG/0 ├── csv-stringify@1.0.4 (lodash.get@4.4.2)Mar 10, 2017 12:25:34 PM
STG/0 └── xml2js@0.4.17 (sax@1.2.2, xmlbuilder@4.2.1)Mar 10, 2017 12:25:34 PM
STG/0 ├── debug@1.0.4 (ms@0.6.2)Mar 10, 2017 12:25:34 PM
STG/0 ├── object.pick@1.2.0 (isobject@2.1.0)Mar 10, 2017 12:25:34 PM
STG/0 ├── extend@3.0.0Mar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 ├── request@2.79.0 (tunnel-agent@0.4.3, aws-sign2@0.6.0, forever-agent@0.6.1, oauth-sign@0.8.2, caseless@0.11.0, is-typedarray@1.0.0, stringstream@0.0.5, json-stringify-safe@5.0.1, aws4@1.6.0, uuid@3.0.1, qs@6.3.2, combined-stream@1.0.5, mime-types@2.1.14, tough-cookie@2.3.2, form-data@2.1.2, hawk@3.1.3, http-signature@1.1.1, har-validator@2.0.6)Mar 10, 2017 12:25:34 PM
STG/0 ├── solr-client@0.6.0 (duplexer@0.1.1, httperror@0.2.3, JSONStream@1.0.7, request@2.63.0, json-bigint@0.1.4)Mar 10, 2017 12:25:34 PM
STG/0 ├── string@3.3.3Mar 10, 2017 12:25:34 PM
STG/0 ├── object.omit@2.0.1 (is-extendable@0.1.1, for-own@0.1.5)Mar 10, 2017 12:25:34 PM
STG/0 ├── websocket@1.0.24 (yaeti@0.0.6, typedarray-to-buffer@3.1.2, debug@2.6.1, nan@2.5.1)Mar 10, 2017 12:25:34 PM
STG/0Mar 10, 2017 12:25:34 PM
STG/0 babel-runtime@6.23.0 node_modules/babel-runtimeMar 10, 2017 12:25:34 PM
STG/0 ├── tmp@0.0.31 (os-tmpdir@1.0.2)Mar 10, 2017 12:25:34 PM
STG/0 └── async@2.1.5 (lodash@4.17.4)Mar 10, 2017 12:25:34 PM
STG/0 └── phantomjs@1.9.20 (progress@1.1.8, kew@0.7.0, which@1.2.12, request-progress@2.0.1, hasha@2.2.0, extract-zip@1.5.0, fs-extra@0.26.7, request@2.67.0)Mar 10, 2017 12:25:34 PM
STG/0 ├── buffer-from@0.1.1 (is-array-buffer-x@1.0.13)Mar 10, 2017 12:25:34 PM
STG/0 ├── regenerator-runtime@0.10.3Mar 10, 2017 12:25:34 PM
STG/0 └── core-js@2.4.1Mar 10, 2017 12:25:34 PM
STG/0 webshot@0.15.3 node_modules/webshotMar 10, 2017 12:25:34 PM
STG/0-----> Checking and configuring service extensions after installing dependenciesMar 10, 2017 12:25:34 PM
STG/0-----> Installing App ManagementMar 10, 2017 12:25:34 PM
STG/0-----> Caching buildMar 10, 2017 12:25:38 PM
STG/0 Clearing previous node cacheMar 10, 2017 12:25:38 PM
STG/0 - node_modulesMar 10, 2017 12:25:38 PM
STG/0 Saving 2 cacheDirectories (default):Mar 10, 2017 12:25:38 PM
STG/0 - bower_components (nothing to cache)Mar 10, 2017 12:25:43 PM
STG/0-----> Build succeeded!Mar 10, 2017 12:25:44 PM
STG/0 ├── aws-sdk@2.0.0-rc9Mar 10, 2017 12:25:44 PM
STG/0 ├── autolinker@1.4.2Mar 10, 2017 12:25:44 PM
STG/0 ├── babel-runtime@6.23.0Mar 10, 2017 12:25:44 PM
STG/0 ├── connect-cookies@0.0.0Mar 10, 2017 12:25:44 PM
STG/0 ├── body-parser@1.17.1Mar 10, 2017 12:25:44 PM
STG/0 ├── bcrypt@0.8.7Mar 10, 2017 12:25:44 PM
STG/0 ├── currency-symbol-map@3.1.0Mar 10, 2017 12:25:44 PM
STG/0 ├── fibers@1.0.15Mar 10, 2017 12:25:44 PM
STG/0 ├── giphy-api@1.2.5Mar 10, 2017 12:25:44 PM
STG/0 ├── d3@3.5.17Mar 10, 2017 12:25:44 PM
STG/0 ├── eventie@1.0.6Mar 10, 2017 12:25:44 PM
STG/0 ├── get-style-property@0.1.1Mar 10, 2017 12:25:44 PM
STG/0 ├── in-viewport@3.4.2Mar 10, 2017 12:25:44 PM
STG/0 ├── ics-js@0.9.1Mar 10, 2017 12:25:44 PM
STG/0 ├── html-truncate@1.2.2Mar 10, 2017 12:25:44 PM
STG/0 ├── jquery@2.2.4Mar 10, 2017 12:25:44 PM
STG/0 ├── jquery-inview@1.1.2Mar 10, 2017 12:25:44 PM
STG/0 ├── saml2-js@1.11.0Mar 10, 2017 12:25:44 PM
STG/0 ├── s3-write-stream@0.0.1Mar 10, 2017 12:25:44 PM
STG/0 ├── source-map-support@0.4.11Mar 10, 2017 12:25:44 PM
STG/0 ├── underscore@1.8.3Mar 10, 2017 12:25:44 PM
STG/0 ├── webshot@0.15.3Mar 10, 2017 12:25:44 PM
STG/0 ├── vimeo-api@1.1.0Mar 10, 2017 12:25:44 PM
STG/0 ├── meteor-node-stubs@0.2.5Mar 10, 2017 12:25:44 PM
STG/0 ├── stripe@4.15.1Mar 10, 2017 12:25:44 PM
STG/0Mar 10, 2017 12:25:44 PM
STG/0 └── wolfy87-eventemitter@4.3.0Mar 10, 2017 12:25:44 PM
STG/0 ├── watson-developer-cloud@2.25.1Mar 10, 2017 12:25:44 PM
STG/0Exit status 0Mar 10, 2017 12:26:11 PM
STG/0Uploading droplet, build artifacts cache...Mar 10, 2017 12:26:11 PM
STG/0Uploading build artifacts cache...Mar 10, 2017 12:26:11 PM
STG/0Staging completeMar 10, 2017 12:26:11 PM
STG/0Uploading droplet...Mar 10, 2017 12:26:11 PM
STG/0Uploaded build artifacts cache (28.2M)Mar 10, 2017 12:26:12 PM
STG/0Uploaded droplet (52.9M)Mar 10, 2017 12:26:18 PM
STG/0Uploading completeMar 10, 2017 12:26:18 PM
STG/0Destroying containerMar 10, 2017 12:26:18 PM
CELL/0Creating containerMar 10, 2017 12:26:18 PM
STG/0Successfully destroyed containerMar 10, 2017 12:26:21 PM
CELL/0Successfully created containerMar 10, 2017 12:26:21 PM
CELL/0Starting health monitoring of containerMar 10, 2017 12:26:26 PM
APP/0> buzzy7@1.0.0 start /home/vcap/appMar 10, 2017 12:26:27 PM
APP/0> node main.jsMar 10, 2017 12:26:27 PM
APP/0module.js:327Mar 10, 2017 12:26:27 PM
APP/0Error: Cannot find module 'semver'Mar 10, 2017 12:26:27 PM
APP/0 throw err;Mar 10, 2017 12:26:27 PM
APP/0 at Function.Module._load (module.js:300:12)Mar 10, 2017 12:26:27 PM
APP/0 at Module._compile (module.js:409:26)Mar 10, 2017 12:26:27 PM
APP/0 at Function.Module._load (module.js:276:25)Mar 10, 2017 12:26:27 PM
APP/0 at Module.require (module.js:353:17)Mar 10, 2017 12:26:27 PM
APP/0 at require (internal/module.js:12:17)Mar 10, 2017 12:26:27 PM
APP/0 at Module.require (module.js:353:17)Mar 10, 2017 12:26:27 PM
APP/0 at Function.Module._resolveFilename (module.js:325:15)Mar 10, 2017 12:26:27 PM
APP/0 at Module.load (module.js:343:32)Mar 10, 2017 12:26:27 PM
APP/0 at Object.Module._extensions..js (module.js:416:10)Mar 10, 2017 12:26:27 PM
APP/0 ^Mar 10, 2017 12:26:27 PM
APP/0 at Object.<anonymous> (/home/vcap/app/programs/server/boot.js:16:5)Mar 10, 2017 12:26:27 PM
APP/0npm ERR! argv "/home/vcap/app/vendor/node/bin/node" "/home/vcap/app/vendor/node/bin/npm" "start"Mar 10, 2017 12:26:27 PM
APP/0npm ERR! node v4.5.0Mar 10, 2017 12:26:27 PM
APP/0npm ERR! npm v2.15.9Mar 10, 2017 12:26:27 PM
APP/0npm ERR! buzzy7@1.0.0 start: `node main.js`Mar 10, 2017 12:26:27 PM
APP/0npm ERR! code ELIFECYCLEMar 10, 2017 12:26:27 PM
APP/0npm ERR! Exit status 1Mar 10, 2017 12:26:27 PM
APP/0npm ERR! Mar 10, 2017 12:26:27 PM
APP/0npm ERR! not with npm itself.Mar 10, 2017 12:26:27 PM
APP/0npm ERR! This is most likely a problem with the buzzy7 package,Mar 10, 2017 12:26:27 PM
APP/0npm ERR! Failed at the buzzy7@1.0.0 start script 'node main.js'.Mar 10, 2017 12:26:27 PM
APP/0npm ERR! You can get information on how to open an issue for this project with:Mar 10, 2017 12:26:27 PM
APP/0npm ERR! node main.jsMar 10, 2017 12:26:27 PM
APP/0npm ERR! Mar 10, 2017 12:26:27 PM
APP/0npm ERR! Or if that isn't available, you can get their info via:Mar 10, 2017 12:26:27 PM
APP/0npm ERR! There is likely additional logging output above.Mar 10, 2017 12:26:27 PM
APP/0npm ERR! npm owner ls buzzy7Mar 10, 2017 12:26:27 PM
APP/0npm ERR! npm bugs buzzy7Mar 10, 2017 12:26:27 PM
APP/0npm ERR! Linux 4.4.0-45-genericMar 10, 2017 12:26:27 PM
APP/0npm ERR! Tell the author that this fails on your system:Mar 10, 2017 12:26:27 PM
APP/0npm ERR! Please include the following file with any support request:Mar 10, 2017 12:26:27 PM
APP/0npm ERR! /home/vcap/app/npm-debug.logMar 10, 2017 12:26:27 PM
APP/0Exit status 1Mar 10, 2017 12:26:28 PM
CELL/0Exit status 0Mar 10, 2017 12:26:28 PM
CELL/0Destroying containerMar 10, 2017 12:26:28 PM
API/3App instance exited with guid fbd4d954-f2f3-455f-a4a8-8f6d5580d4b8 payload: {"instance"=>"", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"2 error(s) occurred:\n\n* 2 error(s) occurred:\n\n* Exited with status 1\n* cancelled\n* cancelled", "crash_count"=>1, "crash_timestamp"=>1489109188042666420, "version"=>"d9951ba7-2814-497d-8872-7b4ab71da4e6"}Mar 10, 2017 12:26:28 PM
CELL/0Creating containerMar 10, 2017 12:26:28 PM
CELL/0Successfully destroyed containerMar 10, 2017 12:26:30 PM
CELL/0Successfully created containerMar 10, 2017 12:26:31 PM
CELL/0Starting health monitoring of containerMar 10, 2017 12:26:35 PM
APP/0> node main.jsMar 10, 2017 12:26:36 PM
APP/0> buzzy7@1.0.0 start /home/vcap/appMar 10, 2017 12:26:36 PM
APP/0 at Function.Module._resolveFilename (module.js:325:15)Mar 10, 2017 12:26:36 PM
APP/0 at Function.Module._load (module.js:276:25)Mar 10, 2017 12:26:36 PM
APP/0Error: Cannot find module 'semver'Mar 10, 2017 12:26:36 PM
APP/0 throw err;Mar 10, 2017 12:26:36 PM
APP/0 at require (internal/module.js:12:17)Mar 10, 2017 12:26:36 PM
APP/0 at Module._compile (module.js:409:26)Mar 10, 2017 12:26:36 PM
APP/0 at Module.require (module.js:353:17)Mar 10, 2017 12:26:36 PM
APP/0 at Object.Module._extensions..js (module.js:416:10)Mar 10, 2017 12:26:36 PM
APP/0 at Object.<anonymous> (/home/vcap/app/programs/server/boot.js:16:5)Mar 10, 2017 12:26:36 PM
APP/0module.js:327Mar 10, 2017 12:26:36 PM
APP/0 ^Mar 10, 2017 12:26:36 PM
APP/0 at Module.require (module.js:353:17)Mar 10, 2017 12:26:36 PM
APP/0 at Function.Module._load (module.js:300:12)Mar 10, 2017 12:26:36 PM
APP/0 at Module.load (module.js:343:32)Mar 10, 2017 12:26:36 PM
APP/0npm ERR! Linux 4.4.0-45-genericMar 10, 2017 12:26:36 PM
APP/0npm ERR! node v4.5.0Mar 10, 2017 12:26:36 PM
APP/0npm ERR! argv "/home/vcap/app/vendor/node/bin/node" "/home/vcap/app/vendor/node/bin/npm" "start"Mar 10, 2017 12:26:36 PM
APP/0npm ERR! Mar 10, 2017 12:26:36 PM
APP/0npm ERR! Exit status 1Mar 10, 2017 12:26:36 PM
APP/0npm ERR! node main.jsMar 10, 2017 12:26:36 PM
APP/0npm ERR! npm v2.15.9Mar 10, 2017 12:26:36 PM
APP/0npm ERR! code ELIFECYCLEMar 10, 2017 12:26:36 PM
APP/0npm ERR! Failed at the buzzy7@1.0.0 start script 'node main.js'.Mar 10, 2017 12:26:36 PM
APP/0npm ERR! You can get information on how to open an issue for this project with:Mar 10, 2017 12:26:36 PM
APP/0npm ERR! This is most likely a problem with the buzzy7 package,Mar 10, 2017 12:26:36 PM
APP/0npm ERR! buzzy7@1.0.0 start: `node main.js`Mar 10, 2017 12:26:36 PM
APP/0npm ERR! npm bugs buzzy7Mar 10, 2017 12:26:36 PM
APP/0npm ERR! Or if that isn't available, you can get their info via:Mar 10, 2017 12:26:36 PM
APP/0npm ERR! npm owner ls buzzy7Mar 10, 2017 12:26:36 PM
APP/0npm ERR! Tell the author that this fails on your system:Mar 10, 2017 12:26:36 PM
APP/0npm ERR! There is likely additional logging output above.Mar 10, 2017 12:26:36 PM
APP/0npm ERR! not with npm itself.Mar 10, 2017 12:26:36 PM
APP/0npm ERR! Mar 10, 2017 12:26:36 PM
APP/0npm ERR! Please include the following file with any support request:Mar 10, 2017 12:26:36 PM
APP/0npm ERR! /home/vcap/app/npm-debug.logMar 10, 2017 12:26:36 PM
APP/0Exit status 1Mar 10, 2017 12:26:37 PM
CELL/0Exit status 0Mar 10, 2017 12:26:37 PM
CELL/0Destroying containerMar 10, 2017 12:26:37 PM
CELL/0Creating containerMar 10, 2017 12:26:37 PM
CELL/0Successfully destroyed containerMar 10, 2017 12:26:39 PM
CELL/0Successfully created containerMar 10, 2017 12:26:40 PM
CELL/0Starting health monitoring of containerMar 10, 2017 12:26:44 PM
APP/0> node main.jsMar 10, 2017 12:26:45 PM
APP/0> buzzy7@1.0.0 start /home/vcap/appMar 10, 2017 12:26:45 PM
APP/0 throw err;Mar 10, 2017 12:26:45 PM
APP/0 ^Mar 10, 2017 12:26:45 PM
APP/0 at require (internal/module.js:12:17)Mar 10, 2017 12:26:45 PM
APP/0 at Function.Module._load (module.js:276:25)Mar 10, 2017 12:26:45 PM
APP/0 at Object.<anonymous> (/home/vcap/app/programs/server/boot.js:16:5)Mar 10, 2017 12:26:45 PM
APP/0 at Module.load (module.js:343:32)Mar 10, 2017 12:26:45 PM
APP/0Error: Cannot find module 'semver'Mar 10, 2017 12:26:45 PM

```

A: The log says that the module semver isn't found and it looks like it was never added  to your package.json.

A: Can you try removing/renaming your node_modules folder locally and performing an npm install and deployment again?  I'm guessing you have something slightly different in your local setup that's allowing it to work.


text:
Q: CNAME records query I have a control panel with Enta which lets me mess with my DNS settings. So I have added a CNAME record to point to an IP address.
Assume my website is called:
www.example.com

I have added a CNAME like this:
subdomain.example.com -> This works fine.

But now I wish to add another CNAME for the following to point to the same IP:
www.subdomain.example.com

This is proving to be not possible as it says I can't add "." in the name when I try to create the record.
Any help?

A: You should be able to add
www.subdomain IN CNAME www.example.com.

If your control panel is not allowing "." in the record, maybe there are a few ways to deal with this...

*

*by adding a catchall record, this would effectively make any subdomain name go to "www"

* IN CNAME www.example.com.

*Drop shell on the box and manually add the record to zone file.  ff your zone files are in an obscure place, you can see where by grepping thru lsof. After the change, make a completely different change thru the control panel (such as adding TXT record), so as to let bind reload via mgmt interface (the control panel will make changes on its own such as incrementing zone file serial number.)  Be ready revert changes if it breaks.

*Stop using control panel GUI.  All you really need is ssh and vim. Linux does not need a GUI and/or control panel to serve up DNS, or whatever.


text:
Q: Requested JSON parse failed in jquery ajax I'm having my abc.html code at client side and pqr.java servlet at the server end on another domain.But when i try for the jquery ajax call using datatype jsonp i get the error "Requested JSON parse failed" even though my server cosol displays the correct output.Please help,urgent.Thanks in advance

A: Maybe you had problems with your header.. try the following code
response.setContentType("application/json");

A: i'had added this line already.My mistake was that i was not appending callback function name to my json response at the server end.
By the way thanks. I got the answer.
http://www.ibm.com/developerworks/library/wa-aj-jsonp1/wa-aj-jsonp1-pdf.pdf

A: Even though the OP found an answer, I would like to share a mistake I was doing. In my server side code I was sending 'text' as content-type. However, in the jquery ajax call (from frontend) I had set dataType: 'json'. This mismatch was causing the error on the website. However, it was working fine on the console. Here is an answer giving more details about contentType and dataType - https://stackoverflow.com/a/18701357/5576491


text:
Q: How to resolve "Cannot connect to AppleID server" error on macOS? This is a problem that is getting bigger and bigger for me.
My Apple ID works perfectly on my iPad and iPhone. I can change the password etc and it all works fine. On my computer however it continues to give me the message (Cannot connect to APPLE ID SERVER).This means I can't backup to icloud or do any updates etc. I feel like I have tried everything imaginable to get this to work including talking to APPLE SUPPORT on the phone. WIFI connections all fine. This has been a problem I have had for quite a while.
Any suggestions would be greatly appreciated. Thank you

A: So if you can log into your Apple ID from a browser an incorrect time zone settings might cause an error in connecting your Apple ID with the Store.
To correct your time and date settings, go to Settings > General > Date & Time and make sure that everything is set correctly.
Now: Open iTunes
Click on iTunes in the Menu Bar.
Select Preferences.

Go to the Advanced Tab.
Click the Reset Cache button.
Click OK.
Close and re-open iTunes.
Now, try to sign in to the iTunes store.


text:
Q: Is it possible to change timezone in jevents? Is it possible to change timezone in jevents calendar Joomla? And, whenever timezone changes one timezone to other timezone then date automatically convert and place in the correct calendar cell.

A: JEvents stores the events based on a timezone as it is iCal based. So yes it is possible.
When you import/export events this is also configurable via the JEvents -> Configuration -> iCal Import/Export.

A: I don't know much about it but may it's help to you.
Click Here jEvent


text:
Q: Prove that the Weighted Feedback Vertex Set is NP-Complete I need to show that the Weighted Feedback Vertex Set (WFVS) is NP-Complete. How do I do this, I got confused. I'm not sure how to do this.
Thanks! :)

A: There are 3 basic steps to showing that a problem is in NP

*

*Decision Problem: Can you turn your problem into a decision problem? In the case of the WFVS problem, the decision problem might be "Given a graph G and real number K, is there a set of vertices V such that V satisfies the conditions of WFVS?

*Certificate: Can you identify an answer to your decision question? Again, in the case of the WFVS problem, an answer might be the set of vertices in the Graph

*Verification: Can you verify a certificate in polynomial time. By verifying in polynomial time, you know that the problem is not NP-Hard. Some verification steps might be: are all of the vertices/edges in the graph? is the sum of the weighted edges <= K? etc.

That is how you know that your problem is in NP.
NP Complete
To show that a problem is NP-Complete, you must find a commonly known NP-Complete problem, such as vertex cover or the travelling salesman problem, and show that your problem is just as hard as that problem by transforming the known problem into your problem, then proving that a 'yes' certificate to your problem implies a 'yes' certificate to the other problem, and vice versa.
This is how you show that your problem is NP-complete.


text:
Q: Creating a new c# numeric filed thats bigger then the default numbers We've been trying to implement a new number that can be any amount of bytes because we need a lot of precision during calculation. As well as that we're working in Unity Burst which at the moment does not support anything bigger then a float.
We've been doing this by using a byte array and implementing binary addition, subtraction, multiplication and division. And this is partly working.
The problem we're walking into is that the performance is way slower then the integer math.
So it will produce the following:
4*3 run 100.000 with int's will take about 0-1 milliseconds
4*3 run 100.000 with our number will take about 100 milliseconds

So the question is if we could use the same kind of implementation by inheriting or copying the integer math code. Or even just get a look at how it's implemented? I looked in the C# source code but can't quite find the actual math.
Any help or ideas would be appreciated.

A: As Tim Rutter suggested in the comments, take a look at the BigInteger class in .NET docs.
It isn't supported in the old Mono c# 2.0, but it is supported since .NET 4x in Unity 2017.1
To use it with burst compiler, you can convert the BigInteger instance to a byte array, as shown here.. I guess it would be similar to your workflow, except that you have to convert it back to BigInteger when making calculations.
If that doesn't work, I suggest taking a look at the first answer here, as it provides a solution for a custom BigInteger class (I haven't tried or tested it)


text:
Q: Merging similar descriptions in bank statement output Here is a sample part of a bank statement:
Description<-c(
"EXXONMOBIL    46344172   "
"EXXONMOBIL    97142239   "
"EXXONMOBIL    97523322   "
"EXXONMOBIL    99123183   "
"JIMMY JOHNS - 1236    "
"JIMMY JOHNS - 2453   "
"JIMMY JOHNS # 95612   "
"KWIK FILL 212   "
"KWIK TRIP  24500001231   "
"KWIK TRIP  32100002342  "
"KWIK TRIP  67200003453   "
"MCDONALD'S F11123    "
"MCDONALD'S F11234    "
"MCDONALD'S F25345    "
"MCDONALD'S F5349   "
)

Debit<-as.numeric(c(
"25.98",
"24.54",
"29.59",
"31.85",
"7.61",
"17.82",
"10.58",
"26.5",
"22.48",
"146.62",
"52.51",
"2.57",
"7.77",
"9.59",
"11.85"
))

df<-data.frame(Description,Debit)

with the following output:
Description                 Debit
EXXONMOBIL    46946182      25.98
EXXONMOBIL    97302509      24.54
EXXONMOBIL    97585822      29.59
EXXONMOBIL    99374183      31.85
JIMMY JOHNS - 1476          7.61
JIMMY JOHNS - 2763          17.82
JIMMY JOHNS # 90012         10.58
KWIK FILL 228               26.5
KWIK TRIP  24500002451      22.48
KWIK TRIP  32100003210      146.62
KWIK TRIP  67200006726      52.51
MCDONALD'S F11780           2.57
MCDONALD'S F11883           7.77
MCDONALD'S F25398           9.59
MCDONALD'S F4789            11.85

I was wondernig how would it be possible to aggregate the results by Description so that the unique codes are removed and I get summarized amount of expenses by each company like Exxonmobil, Jimmy Johns, etc.. Not sure if the best way if to eliminate everything after a blank space, eliminate all the numeric characters, or (in my mind could be the best one) get rid of all numeric and special characters and keep only the letters?
In any way the desired output would be something like this:
Description     Debit
EXXONMOBIL      111.96
JIMMY JOHNS     36.01
KWIK FILL       26.5
KWIK TRIP       221.61
MCDONALD'S      31.78

Any suggestions?

A: This would be fairly simple to do in REGEX.
E.g.
EXXONMOBIL.* (\d*.\d*)

You can see it working here...
Once you have those values in a group you can use whatever language to sum together values or change out which root your searching for.


text:
Q: Why is it false that every function from $\mathbb{R}^n$ to $\mathbb{R}^m$ has a standard matrix I ran into this problem in my Linear Algebra book while covering linear transformations:
True or False: Every function from $\mathbb{R}^n$ to $\mathbb{R}^m$ has a standard matrix.
I said true because if for the input of the function you give it row $i$ of the identity matrix you will get row $i$ of the standard matrix. Standard matrix $=[T(e_1) T(e_2) \cdots T(e_n)]$. I can't think of an example where we have a linear transformation where that's not the case. Am I interpreting the question incorrectly?

A: Here is some intuition that may help.

*

*Linear functions always have a matrix representation.

*Nonlinear functions never have a matrix representation.

You can think of linear functions as transformations that map squares to parallelograms, or cubes to parallelipipeds, or hyper-cubes to hyper-parallelipipeds, and so forth depending on the dimensions of the domain and range.

To find the matrix representation of a linear map, you just put the images of the unit vectors (eg, red and blue vectors in the upper right image) into a matrix, column by column.


text:
Q: Lebesgue outer measure using open balls- help with proof This question has been asked before but the solutions use a version of Vitali Covering Lemma which is not clear to me how it relates to the statement I am familiar with (below). Any help is appreciated.
The problem:

For every Lebesgue measurable set $E$ we have that $$m(E)= \inf\left\{\sum_{i=1}^\infty m(B_i): B_i\mbox{ are balls, } E\subset \cup_{i=1}^\infty B_i\right\}.$$

For the proof, we use Vitali Covering Thm:

Let $E\subset \mathbb R^n$ be Lebesgue measurable with $m(E)<\infty$. Let $\mathcal{C}$ be a covering of $E$ such that for any $x\in E$ and any $\delta<0$ there exists a ball centered at $x$ and of diameter $\delta$ in $\mathcal C$. Then, for any $\varepsilon>0$, there is a finite disjoint sub-collection $B_1,\dots, B_N$ of $\mathcal C$ such that $m(E\setminus\bigcup_{i=1}^N B_i)<\varepsilon$.

Fix $E\subset \mathbb{R}^n$. If $m(E)<\infty$, we apply Vitali Covering Thm: Let $\mathcal{C}$ be a collection of balls centered at any $x\in E$ and of any positive diameter $\delta>0$. Then, take a sequence $\varepsilon_k>0$ which approaches $0$ as $k\to \infty$. Then, by Vitali covering theorem, for each $\varepsilon_k$ there exists a finite disjoint subcollection $B^k_1,\dots,B^k_{N_k}$ of $\mathcal C$ such that
$$m(E\setminus\bigcup_{i=1}^{N_k}B_i^k)<\varepsilon_k.$$ Call $F_k:= E\setminus\bigcup_{i=1}^{N_k}B_i^k.$ Since
$E\subset F_k\cup \bigcup_{i=1}^{N_k}B_i^k,$ by monotonicity and subadditivity of measures, we get that
$$m(E)\leq m(F_k)+ m(\bigcup_{i=1}^{N_k}B_i^k).$$
Then, as $k\to\infty$, we get that $m(E)\leq m(\cap_{k=1}^\infty\bigcup_{i=1}^{N_k}B_i^k)$ and $m(F_k)\to0$.
From here:

*

*I don't know how to make an open cover of $E$ using balls $B_i^k$ and their union and intersection; as in the problem.

*I also don't know how to deal with $m(E)= \infty$.

*Lastly, I don't know how to do the other direction. Perhaps a regularity result about Lebesgue measure would help (Theorem 2.40 from Folland) but I don't know how.

A: *

*Lastly, I don't know how to do the other direction. Perhaps a regularity result about Lebesgue measure would help (Theorem 2.40 from Folland) but I don't know how.

There are certainly collections of balls with $E$ as a subset of their union. $B_n = \{x: \|x - 0\| < n\}$, for example. So the set is not empty. Further, since $A \subseteq C \implies m(A) \le m(C)$, we know that $m(E) \le m\left(\bigcup_n B_n\right) \le \sum_n m(B_n)$ for any such collection $\{B_n\}_n$. So the set is bounded below by $m(E)$. Thus the infimum exists and is $\ge m(E)$.

*

*I also don't know how to deal with $m(E)= \infty$.

Well, that is easy enough. $m(E)$ is a lower bound of values in the set, and $\infty$ is an upper bound of any set of non-negative extended-real numbers. So if the two are the same...

*

*I don't know how to make an open cover of $E$ using balls $B_i^k$ and    their union and intersection; as in the problem.

The purpose of the Vitali Covering Lemma proof is to show that there are collections of balls whose total measure exceeds that of $E$ by arbitrarily small amounts, meaning the infimum cannot be larger than $m(E)$. However, there are parts missing from the argument as you've reproduced it. "$m(E)\leq m(\cap_{k=1}^\infty\bigcup_{i=1}^{N_k}B_i^k)$", heads off in a different direction than you need. Intersections of unions of balls are not unions of balls.
Personally, I think I would try to prove it directly from the definition of outer measure. But that depends on what definition you are using, so I cannot say how to do it in your case. I would note that $n$-cubes are contained in balls the ratio of whose measure to that of the $n$-cube is some fixed factor $M$. For each $\epsilon > 0$, cover $E$ with such $n$-cubes whose total measure is $< m(E) + \epsilon / M$, then replace each of those cubes with its circumferencing ball to get a collection of balls covering $E$ whose measure $< m(E) + \epsilon$.


text:
Q: Media query for safari browser I want the media to work only on safari for a screen of 1280px
This work in all browser, but i want only safari
@media screen and (width: 1280px){

}

A: Try this
Webkit:Chrome & Safari (any version)
@media screen and (-webkit-min-device-pixel-ratio:0) {
property: value;}

Chrome 29+
@media screen and (-webkit-min-device-pixel-ratio:0) and (min-resolution:.001dpcm) {
.chrome {
    property: value;
}}

Safari (7.1+)
_::-webkit-full-page-media, _:future, :root .safari_only {
property: value;}

Safari (from 6.1 to 10.0)
@media screen and (min-color-index:0) and(-webkit-min-device-pixel-ratio:0) {
@media {
    /* Your Class */
}}

Safari (10.1+)
@media not all and (min-resolution:.001dpcm) {
@media {
    /* Your Class */
}}

USEFUL LINKS:browser specific CSS and JavaScript hacks

A: The best option is to use JavaScript:
Here's an snippet to try this detection

if (navigator.userAgent.toLowerCase().indexOf('safari/') > -1 && screen.width=="1280px") {
  console.log("True")
}else {
  document.getElementById("a").display = "none"
  console.log("False")
}

Safari mobile

I don't know how to get if media type is screen on CSS.

A: try this:
@media only screen and (width: 1280px) {

}