As the title indicates, are there any C/C++ bytecode compilers/interpreters? I'm writing an application in an interpreted language that depends on certain libraries that are fully cross-compilable (there are no special flags to indicate code changes during compilation for a certain platform) but are written in C and C++. Rather than shipping…
Hey,
I'm having troubles optimizing this Levenshtein Distance calculation I'm doing. I need to do the following:
Get the record with the minimum distance for the source string as well as a trimmed version of the source string
Pick the record with the minimum distance
If the min distances are equal (original vs trimmed), choose the trimmed…
I have one class that controls one window, and another class that controls a different window in the same xib, however, the second window never displays what it should.
In the first class I alloc and init the second class, then pass some information to it. In the second class it displays that data in the table view.
Yes, in the .xib I…
I know that there are a few questions on StackOverflow on this topic but I haven't been able to get any of the suggestions to work for me. I've been banging my head against this for two days now so its time to ask for help...
The following code snippit is a simplified unit test to demonstrate what I'm trying to do, which is basically…
I am trying to implement a named-pipe communication solution in BASH between two processes.
The first process runs a script which echo something in a named-pipe:
send(){
echo 'something' > $NAMEDPIPE
}
And the second script is supposed to read the named-pipe via another script which contains:
while true;do
if read line…
I have a Red Had Enterprise Linux 5 and a CentOS 5 box, both of which I am trying to configure to automatically connect to a synergy server on startup. I have followed the guide at http://synergy2.sourceforge.net/autostart.html and configured them the same way I configured previous Ubuntu 7.10 boxes, and this only seems to get me…
Wordpress theme not displaying when activated on production server, but will display on development environment. I can view the theme in preview mode, but not when it's activated. Any idea on where to start would be great.
I am using an component, and currently have a dataProvider working that is an ArrayCollection (have a separate question about how to make this an XML file... but I digress).
Variable declaration looks like this:
[Bindable]
private var _dpImageList : ArrayCollection = new ArrayCollection([
{"location" :…
Hi... I want to hire a programmer from Germany for some dev work. Are contracts binding in that country? What sort of pitfalls may I encounter with hiring a foreign programmer?
I have a simple on my page with the opacity being set to 0.5. The problem is, the text inside that is also going transparent. How do I correct that? Do I make another div and place it on top the transparent one? If so, how to do that?
This question is an extension of a previous one I have asked.
I have a table (2014_05_31_transformed.Video) with a schema that looks like this. I have put up the JSON returned by the BigQuery API describing it's schema in this gist.
I am trying to create a view against this table with an API call that…
I have an application that displays some HTML in a QWebview, which references images on the local file system. This works fine directly running the python. When compiling via py2exe, the images no longer load. Google doesn't seem to know the answer, any ideas?
Hi guys,
I was wondering if i could assign values to a variable inside an IF statement. My code is as follows:
<?php
if ((count($newArray) = array("hello", "world")) == 0) {
// do something
}
?>
So basically i want assign the array to the $newArray variable, then count newArray…
I've built a custom jQuery rotator using just basic animation to rotate the 3 Divs (images). I've built the function and then reinitiate the function using it as a call back. Here's the code:
function ImageRotate() {
var CurrentFeature = "#container" + featureNumber;
…
Hi,
I'm faced with a big old stack of method calls in some legacy code, one or some of which is creating a bottleneck and really slowing things down. Is there any quick way I can get a report on which method calls are taking the time, short of running in debug, stepping through…
What I am trying to do is read a .java file, and pick out all of the identifiers and store them in a list. My problem is with the .split() method. If you run this code the way it is, you will get ArrayOutOfBounds, but if you change the delimiter from "." to anything else, the…
So...I'm trying to get unit tests set up in my iPhone App but I'm having some issues. I'm trying to test my model classes but they inherit directly from NSManagedObject. I'm sure this is a problem but I don't know how to get around it.
Everything is building and running as…
We have a nightly process that updates applications on a user's pc, and that requires bringing the application down and back up again (not looking to get into changing that process).
The problem is that we are building a Windows AppBar on launch which requires a valid screen,…
I have a very simple XAML form, that has one namespace definition. For some reason, when Visual Studio processes that XAML file in to it's component .g.cs, it's sticking a bunch of namespace definitions at the top that I have not asked for in the XAML, or the code behind, and…
For web applications under maintenance, assuming you have source control, when you need to remove part of the UI and the associated code, do you delete the code and check in, or do you comment out the old code?
Arguments in favor of deleting: cleaner code, can still see…
For some time, I've been running a substantial set of JUnit / Selenium tests against a number of platforms on a nightly basis. Intermittently (about once in every 40 runs), all the tests for a given platform fail with a NoClassDefFoundError on the common superclass of…
I'm working on a Java EE application, primarily JAX-RS with a JSF admin console, that uses CDI/Weld for dependency injection with @ApplicationScoped objects. Minor debugging issues aside, CDI has worked beautifully for this project.
Now I need some very…
Looking through my EF classes, they're littered with code that looks like this:
if (_myContext.[EntityType].Any(d => d.RowId == dc.RowId))
{
_myContext.[EntityType].Attach(dc);
_myContext.Entry(dc).State = EntityState.Modified;
}
else
{
…
In Lucene, using a Standard Analyzer, I want to make fields with spaces and special characters(underscore,!,@,#,....) searchable.
I set IndexField to NOT_ANALYZED_NO_NORMS and Field.Store.YES
When I look at my index in LUKE, the fields are as I…