Search Results

Search found 1295 results on 52 pages for 'martin riedel'.

Page 26/52 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • working with generic lifetime managers in unity config section

    - by Martin Bailey
    I have the following generic lifetime manager public class RequestLifetimeManager<T> : LifetimeManager, IDisposable { public override object GetValue() { return HttpContext.Current.Items[typeof(T).AssemblyQualifiedName]; } public override void RemoveValue() { HttpContext.Current.Items.Remove(typeof(T).AssemblyQualifiedName); } public override void SetValue(object newValue) { HttpContext.Current.Items[typeof(T).AssemblyQualifiedName] = newValue; } public void Dispose() { RemoveValue(); } } How do I reference this in the unity config section. Creating a type alias <typeAlias alias="requestLifeTimeManager`1" type=" UI.Common.Unity.RequestLifetimeManager`1, UI.Common" /> and specifying it as a lifetime manager <types> <type type="[interface]" mapTo="[concretetype]" > <lifetime type="requestLifeTimeManager`1" /> </type> </types> causes the following error Cannot create an instance of UI.Common.Unity.RequestLifetimeManager`1[T] because Type.ContainsGenericParameters is true. How do you reference generic lifetime managers ?

    Read the article

  • Is there a J2SE sensor API?

    - by Martin Strandbygaard
    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 interface, and users have to write apps against this. I would like to change this approach and implement a "standard" API so that implementations aren't that closely tied to my library. I've looked at JSR 256, but that really isn't a great solution as it's for J2ME, and my library is mostly used by Android devices or laptops running the full J2SE.

    Read the article

  • Haskell Parse Paragraph and em element with Parsec

    - by Martin
    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 and returns an emphasized element em = do{ ;count 2 (char '-') ; ;s <- manyTill anyChar (count 2 (char '-')) ;return (emphasize << s) } But I don't know how to get the paragraphs with emphasized items Any ideas? Thanks!!

    Read the article

  • asp.net profiles not working in global.asax?

    - by Martin Ongtangco
    Hello, i have a class that returns the parameters i've set in the profile properties in web.config. It works great on classes, but I cannot seem to make it work under the Global.asax? Here is how I get the parameter: public static string MissingPagePath { get { return HttpContext.Current.Profile.GetPropertyValue("MissingPage").ToString(); } } Help!

    Read the article

  • how to set tab order in jquery

    - by Martin Ongtangco
    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 textbox field. How do you set the jquery to detect the next visible textbox/dropdown/etc input field and move to that on pressing the tab button instead of running through the buttons near it?

    Read the article

  • Where would I implement this array to pass?

    - by Keeano Martin
    I currently build an NSMutableArray in Class A.m within the ViewDidLoad Method. - (void)viewDidLoad { [super viewDidLoad]; //Question Array Setup and Alloc stratToolsDict = [[NSMutableDictionary alloc] initWithObjectsAndKeys:countButton,@"count",camerButton,@"camera",videoButton,@"video",textButton,@"text",probeButton,@"probe", nil]; stratTools = [[NSMutableArray alloc] initWithObjects:@"Tools",stratToolsDict, nil]; stratObjectsDict = [[NSMutableDictionary alloc]initWithObjectsAndKeys:stratTools,@"Strat1",stratTools,@"Strat2",stratTools,@"Strat3",stratTools,@"Strat4", nil]; stratObjects = [[NSMutableArray alloc]initWithObjects:@"Strategies:",stratObjectsDict,nil]; QuestionDict = [[NSMutableDictionary alloc]initWithObjectsAndKeys:stratObjects,@"Question 1?",stratObjects,@"Question 2?",stratObjects,@"Question 3?",stratObjects,@"Question 4?",stratObjects,@"Question 5?", nil]; //add strategys to questions QuestionsList = [[NSMutableArray alloc]init]; for (int i = 0; i < 1; i++) { [QuestionsList addObject:QuestionDict]; } NSLog(@"Object: %@",QuestionsList); At the end of this method you will see QuestionsList being initialized and now I need to send this Array to Class B. So I place its setters and getters using the @property and @Synthesize method. Class A.h @property (retain, nonatomic) NSMutableDictionary *stratToolsDict; @property (retain, nonatomic) NSMutableArray *stratTools; @property (retain, nonatomic) NSMutableArray *stratObjects; @property (retain, nonatomic) NSMutableDictionary *QuestionDict; @property (retain, nonatomic) NSMutableArray *QuestionsList; Class A.m @synthesize QuestionDict; @synthesize stratToolsDict; @synthesize stratObjects; @synthesize stratTools; @synthesize QuestionsList; I use the property method because I am going to call this variable from Class B and want to be able to assign it to another NSMutableArray. I then add the @property and @class for Class A to Class B.h as well as declare the NSMutableArray in the @interface. #import "Class A.h" @class Class A; @interface Class B : UITableViewController<UITableViewDataSource, UITableViewDelegate>{ NSMutableArray *QuestionList; Class A *arrayQuestions; } @property Class A *arrayQuestions; Then I call NSMutableArray from Class A in the Class B.m -(id)initWithStyle:(UITableViewStyle)style { if ([super initWithStyle:style] != nil) { //Make array arrayQuestions = [[Class A alloc]init]; QuestionList = arrayQuestions.QuestionsList; Right after this I Log the NSMutableArray to view values and check that they are there and it returns NIL. //Log test NSLog(@"QuestionList init method: %@",QuestionList); Info about Class B- Class B is a UIPopOverController for Class A, Class B has one View which holds a UITableView which I have to populate the results of Class A's NSMutableArray. Why is the NsMutableArray coming back as NIL? Ultimately would like some help figuring it out as well, it seems to really have me confused. Help is greatly appreciated!!

    Read the article

  • Alternatives to Goolgle Earth for sat image

    - by Martin Beckett
    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 lets me use coordinates in a range of local map datums and convert them to Lat/Long without me having to incorporate the whole of CGAL?

    Read the article

  • Embed Javafx in html

    - by Gabriel Martin
    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.

    Read the article

  • Java bitshift strangeness

    - by Martin
    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, when given a value of -128 for bar, produces a value of -2 for foo: byte foo = (byte)((bar & ((byte)-64)) >>> 6); What this is meant to do is take an 8bit byte, mask of the leftmost 2 bits, and shift them into the rightmost 2 bits. Ie: initial = 0b10000000 (-128) -64 = 0b11000000 initial & -64 = 0b10000000 0b10000000 >>> 6 = 0b00000010 The result actually is -2, which is 0b11111110 Ie. 1s rather than zeros are shifted into left positions

    Read the article

  • Add UIBarButtonItem in interface builder, how to?

    - by Martin
    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] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(saveClicked:)]; self.navigationItem.rightBarButtonItem = saveButton; [saveButton release]; My idea now was to use interface builder instead. But I'm not sure how to do it. What I'm trying to do is to add a UINavigationItem in the xib file of the viewcontroller (my viewcontroller is called TextViewController), something like this: See this image: http://i48.tinypic.com/qq5yk7.jpg But how can I make TextViewController use the UINavigationItem I added? The button I add doesn't show in the navigationbar. Any ideas on how to do this? What am I missing?

    Read the article

  • Symfony Forms - trigger a custom error message in a form

    - by Martin Sikora
    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 own validator?

    Read the article

  • Using ServletOutputStream to write very large files in a Java servlet without memory issues

    - by Martin
    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 being written into the heap which is then causing an OutOfMemory error and bringing down the entire server. These files can only be served out to authenticated users over https which is why I am serving them through a Servlet instead of just sticking them in Apache. The code I am using is (some fluff removed around this): resp.setHeader("Content-length", "" + fileLength); resp.setContentType("application/vnd.ms-excel"); resp.setHeader("Content-Disposition","attachment; filename=\"export.csv\""); FileInputStream inputStream = null; try { inputStream = new FileInputStream(path); byte[] buffer = new byte[1024]; int bytesRead = 0; do { bytesRead = inputStream.read(buffer, offset, buffer.length); resp.getOutputStream().write(buffer, 0, bytesRead); } while (bytesRead == buffer.length); resp.getOutputStream().flush(); } finally { if(inputStream != null) inputStream.close(); } The FileInputStream doesn't seem to be causing a problem as if I write to another file or just remove the write completly the memory usage doesn't appear to be a problem. What I am thinking is that the resp.getOutputStream().write is being stored in memory until the data can be sent through to the client. So the entire file might be read and stored in the resp.getOutputStream() causing my memory issues and crashing! I have tried Buffering these streams and also tried using Channels from java.nio, none of which seems to make any bit of difference to my memory issues. I have also flushed the outputstream once per iteration of the loop and after the loop, which didn't help.

    Read the article

  • Create Django formset wihtout multiple queries

    - by Martin
    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 Django queries the database for each of the forms in the formset, even though the data displayed in them is the same. Is this the way Formsets work or am I doing something wrong? Is there a way around it inside django or would I have to use JavaScript for a workaround?

    Read the article

  • Tracking graphics tablet input in C#

    - by Martin
    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 myself if needed. My first attempt at this was to use the vbtablet library. However, when I sent this to a friend it failed to work. It seems that the underlying technology is quite old and not supported by some tablets. My second attempt is to play with the Microsoft.Ink system. This looks promising, but I know very little about this subject and I'm struggling to make it work properly - for example I can't find how to read the raw tablet input and disable mouse pointer mode on the tablet when using an InkOverlay. What's the best system to use and what good documentation is there for a beginner in this field?

    Read the article

  • Getter/setter on javascript array?

    - by Martin Hansen
    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]; }); arr[i].defineSetter('value', function(index, val) { //Do something _arr[index] = val; }); };

    Read the article

  • use ngen and bundle .NET dlls to run application in .NET-less machine?

    - by Camilo Martin
    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 (correct?) would it be possible to ship the framework's DLLs with my ngen'd application so that it does not require the runtime to be installed? (e.g., the scenario for most Windows XP machines) Oh, and please don't bother mentioning Remotesoft's Salamander Linker or Xenocode's Postbuild. They are not for my (and many's) current budget (and they seem to simply bundle the framework in a virtualized enviroinment, which means big download sizes and slow startup times I believe)

    Read the article

  • Implications of using many USB web cameras

    - by Martin
    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 performance caveats? By performance I mean how would it affect the time to read the image data from multiple cameras compared to a single one.

    Read the article

  • decimal.TryParse() drops leading "1"

    - by Martin Harris
    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 returns a decimal value as a string so we store it as a string in our model object: [DataMember(Name = "value")] public string Value { get; set; } When we display that value on screen it is formatted to a specific number of decimal places. So the process we use is string - decimal then decimal - string. The application is currently undergoing final testing and is running on more than 100 machines, where this all works fine. However on one machine if the decimal value has a leading '1' then it is replaced by a zero. I added simple logging to the code so it looks like this: Log("Original string value: {0}", value); decimal val; if (decimal.TryParse(value, out val)) { Log("Parsed decimal value: {0}", val); string output = val.ToString(format, CultureInfo.InvariantCulture.NumberFormat); Log("Formatted string value: {0}", output); return output; } On my machine - any every other client machine - the logfile output is: Original string value: 1.010000 Parsed decimal value: 1.010000 Formatted string value: 1.01 On the defective machine the output is: Original string value: 1.010000 Parsed decimal value: 0.010000 Formatted string value: 0.01 So it would appear that the decimal.TryParse method is at fault. Things we've tried: Uninstalling and reinstalling the client application Uninstalling and reinstalling .net 3.5 sp1 Comparing the defective machine's regional settings for numbers (using English (United Kingdom)) to those of a working machine - no differences. Has anyone seen anything like this or has any suggestions? I'm quickly running out of ideas... While I was typing this some more info came in: Passing a string value of "10000" to Convert.ToInt32() returns 0, so that also seems to drop the leading 1.

    Read the article

  • /analyze flag in Visual Studio 2010 Professional

    - by Martin
    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 a default /analyze- flag added (one I can't find a GUI setting for). This does not work as well as the VS2008 version (or at all). Can anyone shed some light into this? What does the new /analyze- flag do and is there any way to enable the old analysis?

    Read the article

  • Access violation of member of pointer object

    - by Martin Lauridsen
    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 later point in time. The client first gets some data from the server, and uses this to instantiate instance_. After this, it will request some more data, and upon receiving this (these are three coeffecients for a quadratic polynomial), it should set these in the instance_ object. However upon calling a member function of instance_, I get an access violation on one of the members of instance_ within that function call. I posted my code here: on pastebin, and I get the error on line 100. The call comes from line 71, and before that line 21. Any ideas to solve this? Thanks!

    Read the article

  • integrating two systems through email

    - by Martin
    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 could be "Issue #4128 fixed"). What is the simplest way to accomplish this using C++ or C#?

    Read the article

  • org.eclipse.jdt.ui.wizards.NewClassWizardPage available on Linux, but not on the Mac?

    - by Martin Cowie
    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 Eclipse with the PDE, both were downloaded with the last week. The bundle org.eclipse.jdt.ui is available on the Mac, but for some reason the Mac will not compile the phrase import org.eclipse.jdt.ui.wizards.NewClassWizardPage; Saying "The import org.eclipse.jdt.ui.wizards.NewClassWizardPage cannot be resolved". The MANIFEST.MF is a simple one .. Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: RcpTest0 Bundle-SymbolicName: rcpTest0; singleton:=true Bundle-Version: 1.0.0.qualifier Bundle-Activator: rcptest0.Activator Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.eclipse.core.resources, org.eclipse.jdt, org.eclipse.jdt.core, org.eclipse.jdt.ui Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Your clues & boos are all most welcome.

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >