Search Results

Search found 136 results on 6 pages for 'martijn courteaux'.

Page 4/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • C# Ordered dictionary index

    - by Martijn
    I am considering of using the OrderedDictionary. As a key I want to use a long value (id) and the value will be a custom object. I use the OrderedDictionary because I want to get an object by it's Id and I want to get an object by it's 'collection' index. I want to use the OrderedDictionary like this: public void AddObject(MyObject obj) { _dict.Add(obj.Id, obj); // dict is declared as OrderedDictionary _dict = new OrderedDictionary(); } Somewhere else in my code I have something similar like this: public MyObject GetNextObject() { /* In my code keep track of the current index */ _currentIndex++; // check _currentindex doesn't exceed the _questions bounds return _dict[_currentIndex] as MyObject; } Now my question is. In the last method I've used an index. Imagine _currentIndex is set to 10, but I have also an object with an id of 10. I've set the Id as a key. The Id of MyObject is of type long?. Does this goes wrong?

    Read the article

  • Vertically split variable-sized div using CSS

    - by Martijn
    I'm trying to divide an auto-scaling div into two vertically using two other div's. What I have so far: <div id='wrapper'> <div id='left'>some stuff</div> <div id='right'>more stuff</div> </div> with #frame { position: static; width: 1000px; height: auto; /* more positioning stuff */ } #left { position: absolute; width: 200px; height: 100%; } #right { position: static; margin-left: 200px; } This seems to work OK, except if the contents of #right are higher than those of #left. In this case, part of the contents of left are invisible. How can I make sure that the height of the left div is also taken into account when the needed height of #wrapper is calculated?

    Read the article

  • C# Regex replace url

    - by Martijn
    I have a bunch of links in a document which has to be replaced by a javascript call. All the links looks the same: <a href="http://domain/ViewDocument.aspx?id=3D1&doc=form" target="_blank">Document naam 1</a> <a href="http://domain/ViewDocument.aspx?id=3D2&doc=form" target="_blank">Document naam 2</a> <a href="http://domain/ViewDocument.aspx?id=3D3&doc=form" target="_blank">Document naam 3</a> Now I want all this links to be replaced to: <a href="javascript:loadDocument('1','form')">Document naam 1</a> <a href="javascript:loadDocument('2','form')">Document naam 2</a> <a href="javascript:loadDocument('3','form')">Document naam 3</a> So the Id=3D in the url is the first parameter in the function and the doc parameter is the second parameter in the function call. I want to do this using Regex because I think this is the quickest way. But the problem is my regex knowledge is too limited

    Read the article

  • c# gridview row click

    - by Martijn
    When i click on a row in my gridview, i want to go to a other page with the id i get from the database. In my RowCreated event i have the following line: e.Row.Attributes.Add("onClick", ClientScript.GetPostBackClientHyperlink(this.grdSearchResults, "Select$" + e.Row.RowIndex)); To prevent error messages i have this code: protected override void Render(HtmlTextWriter writer) { // .NET will refuse to accept "unknown" postbacks for security reasons. Because of this we have to register all possible callbacks // This must be done in Render, hence the override for (int i = 0; i < grdSearchResults.Rows.Count; i++) { Page.ClientScript.RegisterForEventValidation(new System.Web.UI.PostBackOptions(grdSearchResults, "Select$" + i.ToString())); } // Do the standard rendering stuff base.Render(writer); } My question is, how can i give a row a unique id (from the DB) and when i click the row, another page is opened (like clicking on a href) and that page can read the id. Thnx

    Read the article

  • C# Change dynamically NavigateUrl HyperLinkField

    - by Martijn
    Hi, In my code i create a HyperLinkField object. Depending on a database field value, i want to set the NavigateUrl property. This is my problem, i don't know how. With: objHF.DataNavigateUrlFields = new[] { "id", "Stype" }; i get my database field. Now i want to check the Stype value. Depeding on this value i want to set the page where to navigate to. How can i do this?? At the end i set my datasource to the gridview and after that i call the bind() method. I hope someone can help me out

    Read the article

  • Building iPhone static library for armv6 and armv7 that includes another static library

    - by Martijn Thé
    Hi, I have an Xcode project that has a "master" static library target, that includes/links to a bunch of other static libraries from other Xcode projects. When building the master library target for "Optimized (armv6 armv7)", an error occurs in the last phase, during the CreateUniversalBinary step. For each .o file of the libraries that is included by the master library, the following error is reported (for example, the FBConnectGlobal.o file): warning for architecture: armv6 same member name (FBConnectGlobal.o) in output file used for input files: /Developer_Beta/Builds/MTToolbox/MTToolbox.build/Debug-iphoneos/MTToolbox.build/Objects-normal/armv6/libMTToolbox.a(FBConnectGlobal.o) and: /Developer_Beta/Builds/MTToolbox/MTToolbox.build/Debug-iphoneos/MTToolbox.build/Objects-normal/armv7/libMTToolbox.a(FBConnectGlobal.o) due to use of basename, truncation and blank padding In the end, Xcode tells that the build has succeeded. However, when using the final static library in an application project, it won't build because it finds duplicate symbols in one part of build (armv6) and misses symbols in the other part of the build (armv7). Any ideas how to fix this? M

    Read the article

  • Javascript OLE Word

    - by Martijn
    I want to show a MS Word environment in an Iframe without all the toobars. The document that is being showed contains input fields. After these fields are filled in, the document must be printed. I have created the print button and want the (filled in) document printed when this button is clicked. I hope you understand want I want and hope you can help out.

    Read the article

  • jquery wait till large document is loaded

    - by Martijn
    In my web application I call a document can be huge. This document is loaded into an iframe. I have a title, buttons and the text which all depends on this document. The text is from the large document and is displayed in the iframe. I'd like to show an animated gif while the document is loading on 3 places (1: document title, 2: document buttons, 3: document text, the iframe) I've tried the onload event on the Iframe, but this doesn't give the me the desired effect. Here's my code that loads the document: function loadDocument(id, doc) { $("#DocumentContent").show(); $("#ButtonBox").show(); // Clear dynamic menu items $("#DynamicMenuContent").html(""); $("#PageContent").html(""); // Load document in frame $("#iframeDocument").attr("src", 'ViewDoc.aspx?id=' + id + '&doc=' + doc + ''); // $("#iframeDocument").attr("src", "Graphics/loader.gif"); // Load menu items $.ajax({ url: "ShowButtons.aspx?id=" + id + "&doc=" + doc, success: function(data) { $("#DynamicMenuContent").html(data) }, error: function(xhr, err, e) { alert("error: " + err) } }); // Set document title $("#documentTitle").load("GetDocumentInfo.aspx?p=title"); } My questions, how can I display a loader gif while the document is loaded? And remove the gif when the document is ready?

    Read the article

  • C# Winforms: How to display a loading form?

    - by Martijn
    I have a grid and when a row is double clicked a form is loaded. However a lot of data must be loaded, so I'd like to display a simple form with the text 'loading, please wait..'. And when all loading is finished, the form must disappear. This is what I have right now, but it doesn't work: Code that invokes the form with lots of data: FormWithLotData form = new FormWithLotData(); form.ShowDialog(this); Constructor of FormWithLotData: // Show load form FormIsLoading frm = new FormIsLoading(); _CloseLoadForm closeForm = new _CloseLoadForm(frm.Close); System.Threading.Thread thread = new System.Threading.Thread(frm.Show); thread.Start(); InitializeComponent(); this.Visible = false; LoadAllData(); this.Visible = true; // Close load form Invoke(closeForm); Hope you can help me out.

    Read the article

  • Winforms: How to display a "loading" form?

    - by Martijn
    I have a grid and when a row is double clicked a form is loaded. However a lot of data must be loaded, so I'd like to display a simple form with the text 'loading, please wait..'. And when all loading is finished, the form must disappear. This is what I have right now, but it doesn't work: Code that invokes the form with lots of data: FormWithLotData form = new FormWithLotData(); form.ShowDialog(this); Constructor of FormWithLotData: // Show load form FormIsLoading frm = new FormIsLoading(); _CloseLoadForm closeForm = new _CloseLoadForm(frm.Close); System.Threading.Thread thread = new System.Threading.Thread(frm.Show); thread.Start(); InitializeComponent(); this.Visible = false; LoadAllData(); this.Visible = true; // Close load form Invoke(closeForm); Hope you can help me out. EDIT: I'd like to show an animated gif on the loading form.

    Read the article

  • CSS two divs next to each other

    - by Martijn
    Hi, I want to put two divs next to each other. The right div is about 200px; en the div left must fill up the rest of the screen width? How can i do this? I don't want to use percents because then my layout is crap :) Thnx

    Read the article

  • Put text input inside label for radio button?

    - by Martijn
    I'm trying to make a radio group specifying a bunch of options, and an extra option "other" with a text input to specify. The code for this particular radio button I'm using is <input type='radio' name='RadioInput' value='Other' id='RadioInput_Other' /> <label for='RadioInput_Other'>Ohter: <input type='text' name='RadioInput_Other_Value' id='RadioInput_Other_Value' value='' /> </label> The idea is that if you give focus to the text input, the radio button corresponding to it is selected. The code above almost does this (since the text input is inside the label). However, it also shifts focus to the radio button (which is annoying, since whatever you type next is lost). Is there any way to prevent this using XHTML1.0 / CSS2? Preferably without using javascript.

    Read the article

  • Where can I define Conditional compilation constants for Delphi Prism?

    - by Martijn
    I've just ported a Web service from Delphi.NET 2006 to Delphi Prism 2009 (running in the Visual Studio 2008 IDE). But I can't find where I'm supposed to set (or unset) the conditional compilation constants! Am I blind, has this option been left out, or is it just not supported in VS? [edit: thanks to Mohammed Nasman for the link] MSDN tells me to set them using the Project Designer. First, it took me a while to figure out that the Project menu is only visible when the Solution is selected (and not the web service project). Then, there's still no way to set conditional compilation constants in the Project Designer! I just can't find a way to get to the Project Options in an ASP.NET project... Is it really not possible?

    Read the article

  • iPhone Gps logging inaccurate

    - by Martijn
    I'm logging gps points during a walk. Below it shows the function that the coordinates are saved each 5 seconds. i Did several tests but i cannot get the right accuracy i want. (When testing the sky is clear also tests in google maps shows me that the gps signal is good). here is the code: -(void)viewDidAppear:(BOOL)animated{ if (self.locationManager == nil){ self.locationManager = [[[CLLocationManager alloc] init] autorelease]; locationManager.delegate = self; // only notify under 100 m accuracy locationManager.distanceFilter = 100.0f; locationManager.desiredAccuracy= kCLLocationAccuracyBest; [locationManager startUpdatingLocation]; } } - start logging [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(getData) userInfo:nil repeats:YES]; </code> <code> -(void)getData{ int distance; // re-use location. if ([ [NSString stringWithFormat:@"%1.2f",previousLat] isEqualToString:@"0.00"]){ // if previous location is not available, do nothing distance = 0; }else{ CLLocation *loc1 = [[CLLocation alloc] initWithLatitude:previousLat longitude:previousLong]; CLLocation *loc2 = [[CLLocation alloc] initWithLatitude:latGlobal longitude:longGlobal]; distance = [loc1 getDistanceFrom: loc2]; } // overwrite latGlobal with new variable previousLat = latGlobal; previousLong = longGlobal; // store location and save data to database // this part goes ok } - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { // track the time to get a new gps result (for gps indicator orb) lastPointTimestamp = [newLocation.timestamp copy]; // test that the horizontal accuracy does not indicate an invalid measurement if (newLocation.horizontalAccuracy < 0) return; // test the age of the location measurement to determine if the measurement is cached // don't rely on cached measurements NSTimeInterval locationAge = -[newLocation.timestamp timeIntervalSinceNow]; if (locationAge > 5.0) return; latGlobal = fabs(newLocation.coordinate.latitude); longGlobal= fabs(newLocation.coordinate.longitude); } I have taken a screenshot of the plot results (the walk takes 30 minutes) and an example of what i'am trying to acomplish: http://www.flickr.com/photos/21258341@N07/4623969014/ i really hope someone can put me in the right direction.

    Read the article

  • SQL Server 2008 full-text search doesn't find word in words?

    - by Martijn
    In the database I have a field with a .mht file. I want to use FTS to search in this document. I got this working, but I'm not satisfied with the result. For example (sorry it's in dutch, but I think you get my point) I will use 2 words: zieken and ziekenhuis. As you can see, the phrase 'zieken' is in the word 'ziekenhuis'. When I search on 'ziekenhuis' I get about 20 results. When I search on 'zieken' I get 7 results. How is this possible? I mean, why doesn't the FTS resturn the minimal results which I get from 'ziekenhuis'? Here's the query I use: SELECT DISTINCT d.DocID 'Id', d.Titel, (SELECT afbeeldinglokatie FROM tbl_Afbeelding WHERE soort = 'beleid') as Pic, 'belDoc' as DocType FROM docs d JOIN kpl_Document_Lokatie dl ON d.DocID = dl.DocID JOIN HandboekLokaties hb ON dl.LokatieID = hb.LokatieID WHERE hb.InstellingID = @instellingId AND ( FREETEXT(d.Doel, @searchstring) OR FREETEXT(d.Toepassingsgebied, @searchstring) OR FREETEXT(d.HtmlDocument, @searchstring) OR FREETEXT (d.extraTabblad, @searchstring) ) AND d.StatusID NOT IN( 1, 5)

    Read the article

  • Multi-property "transactions" in Core Data / NSManagedObject / NSFetchedResultsController?

    - by Martijn Thé
    Hi, Is it possible to set multiple properties of an NSManagedObject and have the NSFetchedResultsController call controllerDidChangeContent: only once? In other words, is it possible to say something like: [managedObject beginChanges]; [managedObject setPropertyA:@"Foo"]; [managedObject setPropertyB:@"Bar"]; [managedObject commitChanges]; and then have the NSFetchedResultsController call controllerDidChangeContent: (and the other methods) only one time? Thanks!

    Read the article

  • subquery in join with doctrine dql

    - by Martijn de Munnik
    I want to use DQL to create a query which looks like this in SQL: select e.* from e inner join ( select uuid, max(locale) as locale from e where locale = 'nl_NL' or locale = 'nl' group by uuid ) as e_ on e.uuid = e_.uuid and e.locale = e_.locale I tried to use QueryBuilder to generate the query and subquery. I think they do the right thing by them selves but I can't combine them in the join statement. Does anybody now if this is possible with DQL? I can't use native SQL because I want to return real objects and I don't know for which object this query is run (I only know the base class which have the uuid and locale property). $subQueryBuilder = $this->_em->createQueryBuilder(); $subQueryBuilder ->addSelect('e.uuid, max(e.locale) as locale') ->from($this->_entityName, 'e') ->where($subQueryBuilder->expr()->in('e.locale', $localeCriteria)) ->groupBy('e.uuid'); $queryBuilder = $this->_em->createQueryBuilder(); $queryBuilder ->addSelect('e') ->from($this->_entityName, 'e') ->join('('.$subQueryBuilder.') as', 'e_')->join ->where('e.uuid = e_.uuid') ->andWhere('e.locale = e_.locale');

    Read the article

  • How to make a controls compliant for winform and webform?

    - by Martijn
    In my application I have methods which returns a control (checkbox, radiobutton, textbox) but I want to use the same class for my webform and winform. How can I achieve this? I was thinking about an interface, but I don't know how to implement this. In my code I have the following methods: public TextBox GenerateTextfield(AnswerPossibility answerPossibility) { TextBox textBox = new TextBox(); textBox.Tag = answerPossibility.Tag; return textBox; } public Collection<ButtonBase> GenerateMultipleChoice(Collection<AnswerPossibility> answers) { Collection<ButtonBase> checks = new Collection<ButtonBase>(); foreach (AnswerPossibility a in answers) { CheckBox chk = new CheckBox(); chk.Text = a.Text; chk.Name = "chk" + a.Id.ToString(); chk.Tag = a.Tag; checks.Add(chk); } return checks; } How can I make this so, that I can use this methods in a win form as well in a web form?

    Read the article

  • C# How to compress .ashx content?

    - by Martijn
    In my web application I use an ashx file to write a file to the browser. I've noticed that there's no compression over the .ashx file, but only over my .aspx files. Is it possible to compress .ashx? And if it is possible, how?

    Read the article

  • C# asp.net Howto load an aspx page from another project?

    - by Martijn
    I have 2 projects. One project is a core and contains the GUI which is always the same and acts like a kind of framework. The second project is an application that must be set in the framework. The framework consists of a masterpage and a content page (application.aspx). From my second project I want to load the application.aspx. Is this possible? And if so.. how?

    Read the article

  • C# Set combo item with selectedValue

    - by Martijn
    I am dynamically creating a combobox like this: public Control GenerateList(Question question) { // Get a list with answer possibilities List<QuestionAnswer> answers = question.GetAnswers(); // Get a collection of given answers Collection<QuestionnaireAnswer> givenAnswers = question.GetFilledAnswers(); ComboBox cmb = new ComboBox(); cmb.Name = "cmb"; cmb.DataSource = answers; cmb.DisplayMember = "Answer"; cmb.ValueMember = "Id"; // Check an answer is given to the question if (givenAnswers != null && givenAnswers.Count > 0) { cmb.SelectedValue = givenAnswers[0].AnswerId; } cmb.DropDownStyle = ComboBoxStyle.DropDownList; cmb.SelectedIndexChanged += new EventHandler(cmb_SelectedIndexChanged); cmb.Leave += new EventHandler(cmb_Leave); return cmb; } The problem is,when executing cmb.SelectedValue = givenAnswers[0].AnswerId; cmb.SelectedValue is always null. When debugging and I explore answers (the datasource) I see that Id (ValueMember) is exactle the same as AnswerId (in the if statement). Both have the same type (long) and the same value, but SelectedValue stays null. Is there something I don't see?

    Read the article

  • Load a single symbol from a LaTeX package

    - by Martijn
    When using the MnSymbol package, pdflatex gives two font warnings: LaTeX Font Warning: Encoding 'OMS' has changed to 'U' for symbol font (Font) 'symbols' in the math version 'normal' on input line 120. LaTeX Font Info: Overwriting symbol font 'symbols' in version 'normal' (Font) OMS/cmsy/m/n --> U/MnSymbolF/m/n on input line 120. It turns out that this is probably due to a clash with the AMSSymb package. Since I need just a few symbols from the package: is there a way to load one symbol from a package, in stead of all?

    Read the article

  • C# Is it possible to wire up an event to a method when it is finished?

    - by Martijn
    I have a .dll file and in there, there's a method called A. When I call that method I'd like to call a method of my own, method B. So my question is, is it possible to call method B immediately when method A is finished? Offcourse I can call method A and after that call method B manually. But I was wondering is there a manner to do this automatically, maybe with an event? So when method A is finished the event gets fired somehow and method A is called.

    Read the article

  • C# Why is a treeview node clicked when canceled is set to true?

    - by Martijn
    In my winform application I have a treeview. To give the idea that a node is disabled I set the node's forecolor and I when the BeforeSelect fires I set e.cancel to true. However when a node's tag meets some criteria a node may be selected. So that's why I have a NodeMouseClick. But when a node may not be clicked I set the e.cancel to true in the BeforeSelect event. The problem now is, the NodeMousClick event is always fired and all the code is ececuted, even when I set e.cancel to true in the BeforeSelect event. Why is that?

    Read the article

  • NSRunningApplication, return list of recent used applications?

    - by Martijn
    i'm trying to get a list of the most recent used applications. NSWorkspace returns me a list of active applications and i can sort them on a few options using NSRunningApplication. see list below: launchDate finishedLaunching processIdentifier i dont want the lauch date but the recent 'active' date (like the way cmd-tab sorts). Does anyone knows the solution for this?

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >