How to verify if nginx is running or not?
Looking at the requirement you have, the below command shall help: service nginx status
Looking at the requirement you have, the below command shall help: service nginx status
If you’re using .NET 3.5, it’s easy: public class ListHelper<T> { public static bool ContainsAllItems(List<T> a, List<T> b) { return !b.Except(a).Any(); } } This checks whether there are any elements in b which aren’t in a – and then inverts the result. Note that it would be slightly more conventional to make the method generic … Read more
On Mac, if you have an app open and you try to launch it again, the Mac just switches to the open app. You can force it to open a new instance by passing the option “-n” to the launcher. In a terminal, run open -n /Applications/MonoDevelop.app Note also that MonoDevelop is capable of opening … Read more
Try this hacky workaround on this issue: private static HttpWebRequest CreateWebRequest(Uri uri) { var type = Type.GetType(“System.Net.HttpRequestCreator, System, Version=4.0.0.0,Culture=neutral, PublicKeyToken=b77a5c561934e089”); var creator = Activator.CreateInstance(type,nonPublic:true) as IWebRequestCreate; return creator.Create(uri) as HttpWebRequest; }
Update: Since I wrote this answer two years ago, we productized Mono to run on Android. The work included a few steps: porting Mono to Android, integrating it with Visual Studio, building plugins for MonoDevelop on Mac and Windows and exposing the Java Android APIs to .NET languages. This is now available at http://monodroid.net Getting … Read more
I’ve seen this question (and variations on it) a lot lately. What amazes me is how often people respond, but how few answer. I have my preferences (I enjoy both stacks), but this is where most “answers” start to go wrong. It shouldn’t be about what I want (or what anybody else wants). Here’s how … Read more
There are a couple of scenarios to consider: (a) if you are porting an existing application and wondering if Mono is good enough for this task; (b) you are starting to write some new code, and you want to know if Mono is mature enough. For the first case, you can use the Mono Migration … Read more
Necromancing. Providing an actual answer. What is the difference between .Net Core and Mono? .NET Core now officially is the future of .NET. It started for most part with a re-write of the ASP.NET MVC framework and console applications, which of course includes server applications. (Since it’s Turing-complete and supports interop with C dlls, you … Read more
Some of these fall into the category of general NLog (or logging) tips rather than strictly configuration suggestions. Here are some general logging links from here at SO (you might have seen some or all of these already): log4net vs. Nlog Logging best practices What’s the point of a logging facade? Why do loggers recommend … Read more
When you create your Process object set StartInfo appropriately: var proc = new Process { StartInfo = new ProcessStartInfo { FileName = “program.exe”, Arguments = “command line arguments to your executable”, UseShellExecute = false, RedirectStandardOutput = true, CreateNoWindow = true } }; then start the process and read from it: proc.Start(); while (!proc.StandardOutput.EndOfStream) { string … Read more