Python process wrapper

I need to write a process wrapper in python that will launch an application and restart it if it fails. This will be logged to an specified log location passed in from command line. Is this possible? >>> from subprocess import Popen >>>

Php script configuration settings

I have found a little script which looks interesting, you can download the svn from google code at I am trying to set it up on my xampp localhost install, and there is little documentation, here are

Linq to the entity using two tables

EDITED: I am retrieving some order data and am trying to grab the product description from another table using the productID from the first table. The code below works fine but I need to query the products table using the productid to get the string,

Get monthly publications per year in Wordpress

I'm looking to get a list of months in 2014 for posts. Such as: 2014 - January - February .... I also need the functionality of the class 'active' in there for when I'm on that month. I've tried a million plugins and messing around with the archives

Why does the [NSMetadataQuery] class check over on iOS 4.2.1?

I'm attempting to use this approach, described by Marco Arment, for checking if a class exists before using it. With the correct settings, classes are automatically weak-linked when it's appropriate. As Marco describes, "you can safely subclass or ha

Connect Apache to MySQL Remote

I am running two Ubuntu Servers (ubuntu-14.10-server-amd64.) in a virtual VMWARE test environment on an ESXI. The first server is a Back-end mysql server. IP: The Second server has an Apache2 service with PHP to serve a webpage. IP: 1

Java - Creating a batch of comma-separated values

I have a string of comma separated values and that initial string could contain any number of comma separated values. I need to create a program in such a way so that if there is 100 comma separated values in a string then I could get 5 different str

Manipulating Java string formatting XML

I'm developing a plugin that has node(computer) objects with attributes like: String name String description String labels Launcher computerLauncher ... I can convert the node(computer) object to an XML-formated String like: String xml = jenkins.inst

How to save Android logs on the road

I´m currently building an Android app, which tracks the user´s location. My aim is to test it on the go, so the device can´t be connected to my computer. Nevertheless I want to read my logs after returning back home. What is the easiest way to save m

What CMS is good for me?

I am looking to help out a non-profit get a website up and running. Only, they don't just want a website with content, they also want to maintain a database of members, and allow those members to register and pay for classes/events/seminars held by t

Can PropertiesFactoryBean read an application.yml value?

My project has a dependency that requires a set a properties object that can be read by @Value annotations: @Value("#{myProps['property.1']}") To do this in JavaConfig, I'm using the following: @Bean(name="myProps") public static Prope

Reading components in a template / directive Angular4

I am working on a grid component which is composed of mainly three things, some GridComponent component which takes in an array data source, a RowItem directive which is only responsible of creating a context for a row, and a ColumnComponent which is

java & ldquo; error can not open file & rdquo; pot

I can't run the class or jar file it gives me the "Error cannot open file". I'm using the following commands: javac src/*.java jar cfe MyJar.jar src.Main src/*.class java -jar MyJar.jar Output: javac src/*.java jar cfe MyJar.jar src.Main src/*.c

Infinite loop when using size_t in a countdown for the loop

So I'm using size_t instead of int in any indexing for loop to prevent negative indices. But when counting down, this leads to an overflow: for (size_t i = 10; i >= 0; --i) { // Do something, f.ex. array[i] = i } What would be a nice way to prevent t

php suddenly very very very slow

I'm working on a webapp using php, apache en mysql. For the past year the response times of this application have been good. Suddenly yesterday the application became very slow on firefox (complete page load, including css and js files: around 20 sec

Algorithm for finding peaks in the 2D array

Let's say I have a 2D accumulator array in java int[][] array. The array could look like this: (x and z axes represent indexes in the array, y axis represents values - these are images of an int[56][56] with values from 0 ~ 4500) or What I need to do

Component for accessing the iframe source in jquery?

I have the feeling this is something simple that I am missing, but I haven't been able to find a solution to this so far. I'm somewhat of a web noob so I apologize if this was answered somewhere already and I missed it. Below is a sample of what I'm

Retrieving the Client User Name Using Windows Authentication

I'm attempting to retrieve the user name and client machine name of the person logged on to a computer on our intranet in ASP.NET. This is just for logging purposes. I retrieve the user name "System.Security.Principal.WindowsIdentity.GetCurrent().Nam

How does a string vector cost?

what is the easiest way to print out a vector of strings on the console? I got something like this map < int, vector<string>> and i want to print the values to a user-given key. typemap::iterator p1; cin >> i for (pointer = map.begin();

awakeFromInsert calls twice with nested contexts

This project uses Mogenerator and Magical Record. I have tracked down a bug to the fact that awakeFromInsert is getting called twice. Once for each of my contexts I presume. This is an issue because I need to listen for NSNotifications on this NSMana

Make a copy of xaml child elements

I am working on a windows phone app. I want to copy children of one canvas to other canvas. I can do it with the following code but the problem is I have to remove it from one canvas first. Code is: private void add_template_Click(object sender, Rout

Is it possible to use SignalR in .net framework 2.0?

I have an Existing website that was built in .net 2.0. is it possible to integrate the signalr on it? if Yes please let me know how.. Thank you in advance.I don't believe it's possible even SignalR version 1.0 needs .net framework 4.5, see here here