I have a javascript code (business logic) runs on client side, i want the same logic to execute from windows service (C# code), instead of re-writing those complex javascript code to C#, is there any way to execute it from C# class itself. Because i want to run this code inside windows service
just wondering if anyone has ever tried embedding and actually integrating any js engine into the .net environment. I could find and actually use (after a LOT of pain and effort, since it's pretty outdated and not quite finished) spidermonkey-dotnet project. Anyone with experience in this area? Engines like SquirrelFish, V8..   Not that I'm not satisfied with Mozilla's Spidermonkey (using it for Rails-like miniframework for custom components inside the core ASP.NET application), but I'd still love to explore a bit further with the options. The command-line solutions are not what I'd need, I cannot rely on anything else than CLR, I need to call methods from/to JavaScript/C# objects.  // c# class public class A {     public string Hello(string msg)     {         return msg + " whatewer";     } }  // js snippet var a = new A(); console.log(a.Hello('Call me')); // i have a console.log implemented, don't worry, it's not a client-side code :)   Just to clarify - I'm not trying to actually program the application itself in server-side javascript. It's used solely for writing custom user subapplications (can be seen as some sort of DSL). It's much easier (and safer) to allow normal people programming in js than C#.
Single question thread with multiple questions, some duplicates I've recently run into many questions where to author asks several related questions in one post, many of them asked before.   I'm wondering what out policy is on such questions:   Should I vote-close them as being not constructive? Should I vote-close them as duplicates? Should I leave them be? Or even suggest an answer?    - Each of the questions: Waiting for an AJAX request with selenium, and headless browsing in selenium have been asked here before, but he asked both in one.  I've done my best to search for similar questions here in meta but I was unable to find any, reading appreciated. Ask to install program after "The program 'x' is currently not installed" If you try to execute a program that is not installed you will get a message  The program 'x' is currently not installed. You can install it by typing:  sudo apt-get install x   and instead of offering you to install the program for you, you have to type the actual command. How can this behavior be changed? Is my paper under review (or similar) for too long and if yes, how should I react? I submitted a paper to a journal, and I suspect that it is handled too slowly.   How can I decide whether my suspicion is correct? What handling times should I expect? Given some expected handling times, when should I act? How much leeway should I give? How should I act? Whom should I contact and what should I (roughly) write?   Note that I am interested on how I should approach this situation in general, and do not seek specific numbers for my specific situation. I am therefore looking for general answers that are independent of such factors as the field or individual journal (but mention them if they are relevant factors).  This is a canonical question on this topic as per . Due to its nature, it is rather broad and not exemplary for a regular question on this site. Please feel free to improve this question. Finding the index of an item in a list How can I copy/transfer games via external hard drive? I have successfully transferred "Killing Floor" from my brother's laptop to my own via external hard drive. The problem, now that I have all the files, is that I don't know how to launch the game through Steam. All I did was copy files from his Laptop to the hard drive, then from the hard drive to my laptop, then I put the files in the "Steamapps" folder under "Steam" in my laptops hard drive. So the question is, how do I start up the game through Steam? How would one format an Excel sheet so numeric fields are set to numeric field types when importing to ArcGIS 10.2? How can I uninstall a nvidia driver completely ? As expected, Nvidia drivers have reduced my customizations. I can't login to Unity 3D session. I can't find any content to help me to uninstall the driver and I don't know what to do as I have never uninstalled them before. What's the difference between faking, mocking, and stubbing? I know how I use these terms, but I'm wondering if there are accepted definitions for faking, mocking, and stubbing for unit tests?  How do you define these for your tests?  Describe situations where you might use each.  Here is how I use them:  Fake: a class that implements an interface but contains fixed data and no logic.  Simply returns "good" or "bad" data depending on the implementation.  Mock: a class that implements an interface and allows the ability to dynamically set the values to return/exceptions to throw from particular methods and provides the ability to check if particular methods have been called/not called.  Stub: Like a mock class, except that it doesn't provide the ability to verify that methods have been called/not called.  Mocks and stubs can be hand generated or generated by a mocking framework.  Fake classes are generated by hand.  I use mocks primarily to verify interactions between my class and dependent classes.  I use stubs once I have verified the interactions and am testing alternate paths through my code.  I use fake classes primarily to abstract out data dependencies or when mocks/stubs are too tedious to set up each time. Finding the derivative of $x\uparrow\uparrow n$ I am trying to find a general derivative for the function: $f(x)=x^{x^{x^{...^{x}}}}$however to do that I must find $f^{\prime }$ and $f^{\prime \prime}$...etc. I am now trying to write down a general expression for $f^{\prime \prime}$ and I have stumble opon the series in the picture below, I wonder, do anyone have an idea of what sort of expantion it migth be ? I have tried breaking it down into three different sums, but I wasn't very successful!  EDIT  So since this post has gotten some attention and the title has been change I will tell you what I am on about, although I already have a post just for the question in the title from before. I am as I said earlier trying to find a general derivative for the function $f(x)=x^{x^{x^{...^{x}}}}$ where $n$ is an arbitrary number, natural number and greater or equal to 2. I have already made success when I tried to find the first derivative, and I have also found some interesting pattern emerge when the derivatives as well as n incresses. But my question here was if anyone knew what this expation might be or look similar to be, since I have yet to be lernt series etc. I did not know that the question needed such background since it's straight a forward question. Provide an easily discoverable way to get the full URL to an answer How could a gap between array modifier created objects be closed? I realize this is a long shot, but my phone was lost or stolen a few hours ago.  At the time it was stolen, I didn't have any specific applications installed to track it or wipe the data. So... my bad. I'm hoping the fact that I have a pattern lock will at least prevent anyone from accessing my data.  My question is, do I have any options for tracking or data wipe after the fact? (I'm more interested in tracking.)  Note: I have read similar questions, but unless I'm mistaken, they all address the question in terms of preparation before losing the phone. I'm asking about fallback options after losing the phone. Finding a replacement for the scoreboard player test What's the difference between align and align*? After some brief searching I can't find the difference between align and align*. Google summarily ignoring the * is making it harder I think.  Can you tell me the difference between these two?  Moreover, can you tell me where you generally go for this type of information? As a relatively new user I'm still building up my resources. How to carry audio over SSH? Is there a way to carry audio over ssh?   Say after connecting to remote machine through ssh -X I opened a browser and want to watch a youtube video. Currently I could only able to watch the video without any audio. But I want to hear the audio too. How to do that? Why does $x$ divided by zero not equal $x$? After all, $x$ is not being divided by anything. When you're driving and you open 1 car window, say the front one, there comes a horrible noise, but when you open another window just the slightest bit, this noise goes away (I'm sure most people know what I'm talking about then I mention this 'noise').   Why does this noise occur? Why does it go away when another window is slightly opened?   (Not sure about the tag). What is the "show desktop" keyboard shortcut? I just upgraded to 11.10 from 11.04. Previously the shortcut to show the desktop was Super +D (same as in Windows), But now it is not working. What is the new shortcut? What is the integral of $\int e^x\,\sin x\,\,dx$? I'm trying to solve the integral of $\left(\int e^x\,\sin x\,\,dx\right)$ (My solution):  $\int e^x\sin\left(x\right)\,\,dx=$  $\int \sin\left(x\right) \,e^x\,\,dx=$  $\left(\sin(x)\,\int e^x\right)-\left(\int\sin^{'}(x)\,\left(\int e^x\right)\right)$  $\left(\sin(x)\,e^x\right)-\left(\int\cos(x)\,e^x\right)$  $\left(\sin(x)\,e^x\right)-\left(\cos(x)\,e^x-\left(\int-\sin\left(x\right)\,e^x\right)\right)$  $\left(\sin(x)\,e^x\right)-\left(\cos(x)\,e^x-\left(-\sin\left(x\right)\,e^x-\int-\cos\left(x\right)\,e^x\right)\right)$  I don't know how to complete because the solution gonna be very complicated. I have a scene below where I am wanting to get an HDRI image to come in through the windows and light the scene in the window areas and have a god ray like effect.  I want to do this with a volumetric effect and have the HDRI lighting create throw patterns in the scene.  Is this possible?  To have volumetric lighting where the HDRI creates throw patterns?  Thanks for the help