I'm using Text.ParserCombinators.Parsec and Text.XHtml to parse an input like this:
this is the beginning of the paragraph --this is an emphasized text-- and this is the end\n
And my output should be:
<p>this is the beginning of the paragraph <em>this is an emphasized text</em> and this is the end\n</p>
This code parses…
Does anyone know of a "standardized" Java API for working with sensors, and which is closely tied to J2ME as is the case with JSR 256?
I'm writing a Java library for interfacing with a sensor network consisting of several different types of sensors (mostly simple stuff such as temperature, humidity, GPS, etc.).
So far I've rolled my own…
Hello, in my frontend application I'm using my own login form (just email and password fields) and in the login action I'm trying to check whether the user was logged in successfuly or not.
My question is: If the user wasn't logged in successfuly is there a simple way how can I add an error message to my login form?
Do I have to write my…
I've been asked to add Google Earth images to a desktop app (civil engineering modelling app)
I was under the impression that Google's license didn't allow you to do this.
Are there any other easily accessible, and similarly high resolution, image sources anyone can recommend (Blue Marble, terraserver) ?
As a bonus, any library that…
Java has 2 bitshift operators for right shifts:
>> shifts right, and is dependant on the sign bit for the sign of the result
>>> shifts right and shifts a zero into leftmost bits
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/op3.html
This seems fairly simple, so can anyone explain to me why this code,…
Hello,
I'm using Telerik controls, specifically the numerical textbox where you can set a up-down arrow to increment/decrement values in a textbox. I am required to set the tab order to move to the next field but since there's a button on the up-down arrow, the browser will go through those buttons first then move to the next…
I need to display multiple forms (up to 10) of a model on a page. This is the code I use for to accomplish this.
TheFormSet = formset_factory(SomeForm, extra=10)
...
formset = TheFormSet(prefix='party')
return render_to_response('template.html', {
'formset' : formset,
})
The problem is, that it seems to me that…
Hi, I would like to simply ask if it is possible to embed a javafx application inside an html file. And if it is possible then I would like to know how to do this. I am open to using javascript etc. if it is required. Thanks.
I have a navigation based application that have a uinavigataioncontroller containing uitableviewcontrollers. I want to add buttons to the UINavigationbar of the uinavigataioncontroller, usually I write code to add these buttons, something like this:
UIBarButtonItem *saveButton = [[UIBarButtonItem alloc]…
I am using IBM Websphere Application Server v6 and Java 1.4 and am trying to write large CSV files to the ServletOutputStream for a user to download. Files are ranging from a 50-750MB at the moment.
The smaller files aren't causing too much of a problem but with the larger files it appears that it is…
I started to play with GeckoFX. Unfortunately I didn't found any big documentation for that. I need to get DOM tree for the page. Iterate every element and get it's information. Can someone please help me?
Is there a way to get a get/set behaviour on an array? I imagine something like this:
var arr = ['one', 'two', 'three'];
var _arr = new Array();
for (var i=0; i < arr.length; i++) {
arr[i].defineGetter('value',
function(index) {
//Do something
return _arr[index];
});
…
AFAIK, ngen turns MSIL into native code (also reffered to as pre-JIT), however I never payed too much attention at it's startup performance impact. Ngen'd applications still require the .NET base class libraries (the runtime).
Since the base class libraries have everything our .NET assemblies need…
I'm looking into connecting multiple low resolution USB webcams to a single computer. What implications might this have on performance? How does, for example, four 320x240 cameras fare against a single 640x480 camera? I'm not well versed in the architecture of the USB interface, what are the…
I'm writing an XNA application with C#, and I want to be able to control the application with a graphics tablet. All I need to be able to do is track the position and pressure of the pen on the tablet, it would be nice to have some built in gesture recognition but I'm willing to build that…
ue to faulty hardware, statistics generated over a 2 week period were significantly higher than normal (10000 times higher than normal).
After moving the application to a new server, the problem rectified itself. The issue I have is that there are 2 weeks of stats that are clearly wrong.…
I want to integrate our bug tracker system and our Support system through emails.
The bug tracker can kick out an email on every change to bugs/features. I want to download those emails, parse them and create a formatted email that the Support system can understand (ie the subject…
Short and sweet version:
On one machine out of around a hundred test machines decimal.TryParse() is converting "1.01" to 0.01
Okay, this is going to sound crazy but bare with me...
We have a client applications that communicates with a webservice through JSON, and that service…
Running Visual Studio 2008 Professional it is possible to enable static code analysis using the /analyze flag (even though this is not supported for the Professional version according to the documentation).
In Visual Studio 2010 Professional this no longer works. Instead there is…
So I am coding this client/server program. This code is from the client side. The client has an instance of an object
mpqs_sieve *instance_;
The reason I make it as a pointer is, that mpqs_sieve only has a constructor that takes 3 arguments, and I want to instantiate it at a…
Most esteemed host of Eclipse magi ..
I am trying to create an instance of the org.eclipse.jdt.ui.wizards.NewClassWizardPage class. I have one project where I do this, and it will compile & run on Linux, but not on a Mac. Both machines are running the Helios edition of…
I have an overloaded action in my Controller:
public ActionResult AssignList(int id)
{
...
}
[AcceptVerbs((HttpVerbs.Get))]
public ActionResult AssignList(int id, bool altList)
{
...
}
I'd like to use the same partial view for…
I've been writing some scripts for a game, the scripts are written in Lua. One of the requirements the game has is that the Update method in your lua script (which is called every frame) may take no longer than about 2-3 milliseconds to run, if it does the game just hangs.
…
Hello everyone. I am very new at all this c# Windows Phone programming, so this is most probably a dumb question, but I need to know anywho...
IsolatedStorageSettings appSettings =
IsolatedStorageSettings.ApplicationSettings;
if…