Search Results

Search found 1551 results on 63 pages for 'patrick van hout'.

Page 19/63 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Track pageviews in Google Analytics on partial url of Grails application

    - by Pieter van Gent
    For my Grails application I want to set up Google Analytics to track only "partial" url's. I 'll explain: a typical Grails url consists of the following parts: domain + application-name + controller + action + id e.g. www.mydomain.com/myapp/controller/action/12345 As far as I understand for Google Analytics the page to be tracked is identified by the entire url. For my purpose I'm not interested in the id part of the url: I want to know which actions have been performed, but I need not know for which id the action was executed. And of course I would like a generic solution, because I have multiple controllers and multiple actions... Maybe some kind of filter stating "I want to track pages 3 levels deep (/myapp/controller/action)" would do? Or a filter stating "exclude everything from url after the last /"? Any help would be much appreciated. Kind regards, Pieter

    Read the article

  • Generic object to object mapping with parametrized constructor

    - by Rody van Sambeek
    I have a data access layer which returns an IDataRecord. I have a WCF service that serves DataContracts (dto's). These DataContracts are initiated by a parametrized constructor containing the IDataRecord as follows: [DataContract] public class DataContractItem { [DataMember] public int ID; [DataMember] public string Title; public DataContractItem(IDataRecord record) { this.ID = Convert.ToInt32(record["ID"]); this.Title = record["title"].ToString(); } } Unfortanately I can't change the DAL, so I'm obliged to work with the IDataRecord as input. But in generat this works very well. The mappings are pretty simple most of the time, sometimes they are a bit more complex, but no rocket science. However, now I'd like to be able to use generics to instantiate the different DataContracts to simplify the WCF service methods. I want to be able to do something like: public T DoSomething<T>(IDataRecord record) { ... return new T(record); } So I'd tried to following solutions: Use a generic typed interface with a constructor. doesn't work: ofcourse we can't define a constructor in an interface Use a static method to instantiate the DataContract and create a typed interface containing this static method. doesn't work: ofcourse we can't define a static method in an interface Use a generic typed interface containing the new() constraint doesn't work: new() constraint cannot contain a parameter (the IDataRecord) Using a factory object to perform the mapping based on the DataContract Type. does work, but: not very clean, because I now have a switch statement with all mappings in one file. I can't find a real clean solution for this. Can somebody shed a light on this for me? The project is too small for any complex mapping techniques and too large for a "switch-based" factory implementation.

    Read the article

  • Using a variable as identifier in a json array

    - by Robbert van den Bogerd
    Hi folks! I'm wondering if it is possible to use assigned variables as identifier in a json array. When I tried this, I was getting some unexpected results: (Code is simplified, parameters are passed in a different way) var parameter = 'animal'; var value = 'pony'; Util.urlAppendParameters (url, {parameter : value}); Util.urlAppendParameters = function(url, parameters) { for (var x in parameters) { alert(x); } } Now the alert popup says: 'parameter' instead of 'animal'. I know I could use a different method (creating an array and assigning every parameter on a new line), but I want to keep my code compact. So my question is: Is it possible to use a variable as an identifier in the json array, and if so, could you please tell me how? Thanks in advance!

    Read the article

  • Nested asynchronous calls do not seem to execute as expected

    - by Kristof Van Landschoot
    While trying out jQuery, I have a question that is probably a newbie mistake, but I cannot seem to find the solution. This is the code: $.get("index.html", function() { var i = 0; for (; i < 3; i++) { var lDiv = document.createElement('div'); lDiv.id = 'body-' + i; document.getElementById('body').appendChild(lDiv); $.get('index.html', function(data) { lDiv.innerHTML = "<p>Hello World " + i + "</p>"; }); } }); The output seems to be <div id='body-0'></div> <div id='body-1'></div> <div id='body-2'> <p>Hello World 3</p> </div> I expected the lDiv.innerHTML= code to be executed for each i, but apparently it is only executed for the last i? What am I overlooking?

    Read the article

  • How to 'convert' char to function in C

    - by Tim van Elsloo
    Hi, void someFunction() { char *function = "anotherFunction"; const char *params[] = {"aVal","bVal","cVal"}; // How can I call the *function with the *params? } void anotherFunction(char *aKey, char *bKey, char *cKey) { // Do something with *aKey, *bKey and *cKey; } Does someone know how to call the *function with the *params? Thanks in advance, Tim

    Read the article

  • Modifying multiplying calculation to use delta time

    - by Bart van Heukelom
    function(deltaTime) { x = x * 0.9; } This function is called in a game loop. First assume that it's running at a constant 30 FPS, so deltaTime is always 1/30. Now the game is changed so deltaTime isn't always 1/30 but becomes variable. How can I incorporate deltaTime in the calculation of x to keep the "effect per second" the same?

    Read the article

  • How to set up source control in VS2010

    - by Jouke van der Maas
    Hi, I want to set up source control for my project, but it seems like I need a server for this. I've never done this before, and I couldn't find anything helpfull yet. Is there any way to host a server locally so Visual studio can use it? Or do you know any online (free) servers I can use? By the way, if source control is not actually what i should use for keeping track of changes in my files, please suggest a better option. Thanks in advance.

    Read the article

  • Basic Profanity Filter in Objective C for iPhone

    - by David van Dugteren
    How have you like minded individuals tackled the basic challenge of filtering profanity, obviously one can't possibly tackle every scenario but it would be nice to have one at the most basic level as a first line of defense. In Obj-c I've got NSString *tokens = [text componentsSeparatedByString:@" "]; And then I loop through each token to see if any of the keywords (I've got about 400 in a list) are found within each token. Realising False positives are also a problem, if the word is a perfect match, its flagged as profanity otherwise if more than 3 words with profanity are found without being perfect matches it is also flagged as profanity. Later on I will use a webservice that tackles the problem more precisely, but I really just need something basic. So if you wrote the word penis it would go yup naughty naughty, bad word written.

    Read the article

  • Byte from string/int in C++

    - by Tim van Elsloo
    Hi, I'm a beginning user in C++ and I want to know how to do this: How can I 'create' a byte from a string/int. So for example I've: string some_byte = "202"; When I would save that byte to a file, I want that the file is 1 byte instead of 3 bytes. How is that possible? Thanks in advance, Tim

    Read the article

  • How to write custom (odd) authentication plugins for Wordpress, Joomla and MediaWiki?

    - by Bart van Heukelom
    On our network (a group of related websites - not a LAN) we have a common authentication system which works like this: On a network site ("consumer") the user clicks on a login link This redirects the user to a login page on our auth system ("RAS"). Upon successful login the user is directed back to the consumer site. Extra data is passed in the query string. This extra data does not include any information about the user yet. The consumer site's backend contacts RAS, with this extra data, to get the information about the logged in user (id, name, email, preferences, etc.). So as you can see, the consumer site knows nothing about the authentication method. It doesn't know if it's by username/password, fingerprint, smartcard, or winning a game of poker. This is the main problem I'm encountering when trying to find out how I could write custom authentication plugins for these packages, acting as consumer sites: Wordpress Joomla MediaWiki For example Joomla offers a pretty simple auth plugin system, but it depends on a username/password entered on the Joomla site. Any hints on where to start?

    Read the article

  • Use a folder of xml files as data source for nhibernate

    - by Bart Van Eyndhoven
    I'm going to start writing NUnit tests for a few classes in my project. A certain number of these classes use data gathered through nhibernate from a sql server 2008 database. The part of the program I'm about to test is very specific (and complicated). Therefore I have made a folder of xml files. Combined, the xml files could result in the database structure. I mean each xml file corresponds to a table in the database. The data in the xml files is also consistent with the database. Is there a way to use this folder of xml files as data source for nhibernate? I mean: can I use nhibernate to gather my test data (wich I have specifically chosen) instead of data from the database? In this way, I could usefully test this component without corrrupting the (test) database for future tests.

    Read the article

  • Netbeans 7.2 won't open on OS X

    - by Mark van Wyk
    I installed Netbeans on OSX Mountain Lion running JDK 7. Everything was working fine. Then my machine for no reason crashed. After this I could no longer open Netbeans anymore. If I try to start Netbeans from the commandline: /Applications/NetBeans/NetBeans 7.2.app/Contents/MacOS/netbeans Then it works fine. From there I can select Netbeans About and confirm that my userdir and cachedir is: User directory: /Users/<user>/Library/Application Support/NetBeans/7.2 Cache directory: /Users/<user>/Library/Caches/NetBeans/7.2 So, I deleted these directories and tried again, but alas, I can only start netbeans via the commandline. Ideas appreciated...

    Read the article

  • How do I get the next token in a Cstring if I want to use it as an int? (c++)

    - by Van
    My objective is to take directions from a user and eventually a text file to move a robot. The catch is that I must use Cstrings(such as char word[];) rather than the std::string and tokenize them for use. the code looks like this: void Navigator::manualDrive() { char uinput[1]; char delim[] = " "; char *token; cout << "Enter your directions below: \n"; cin.ignore(); cin.getline (uinput, 256); token=strtok(uinput, delim); if(token == "forward") { int inches; inches=token+1; travel(inches); } } I've never used Cstrings I've never tokenized anything before, and I don't know how to write this. Our T.A.'s expect us to google and find all the answers because they are aware we've never been taught these methods. Everyone in my lab is having much more trouble than usual. I don't know the code to write but I know what I want my program to do. I want it to execute like this: 1) Ask for directions. 2) cin.getline the users input 3) tokenize the inputed string 4) if the first word token == "forward" move to the next token and find out how many inches to move forward then move forward 5) else if the first token == "turn" move to the next token. if the next token == "left" move to the next token and find out how many degrees to turn left I will have to do this for forward x, backward x, turn left x, turn right x, and stop(where x is in inches or degrees). I already wrote functions that tell the robot how to move forward an inch and turn in degrees. I just need to know how to convert the inputted strings to all lowercase letters and move from token to token and convert or extract the numbers from the string to use them as integers. If all is not clear you can read my lab write up at this link: http://www.cs.utk.edu/~cs102/robot_labs/Lab9.html If anything is unclear please let me know, and I will clarify as best I can.

    Read the article

  • How can you remove a field from a word document?

    - by Kevin van Zanten
    Dear reader, I'm working on a project where the user can insert data into a document using fields, document properties and variables. The user also needs to be able to remove the data from the document. So far, I've managed to remove the document property and variable, but I'm not sure how I would go about removing the field (that's already inserted into the document). Please advise. Yours sincerely, Kevin

    Read the article

  • XSS as attack vector even if XSS data not stored?

    - by Klaas van Schelven
    I have a question about XSS Can forms be used as a vector for XSS even if the data is not stored in the database and used at a later point? i.e. in php the code would be this: <form input="text" value="<?= @$_POST['my_field'] ?>" name='my_field'> Showing an alert box (demonstrate that JS can be run) on your own browser is trivial with the code above. But is this exploitable across browsers as well? The only scenario I see is where you trick someone into visiting a certain page, i.e. a combination of CSRF and XSS. "Stored in a database and used at a later point": the scenario I understand about CSS is where you're able to post data to a site that runs JavaScript and is shown on a page in a browser that has greater/different privileges than your own. But, to be clear, this is not wat I'm talking about above.

    Read the article

  • Get coordinates in parent, but not in stage.

    - by Bart van Heukelom
    I know about Flash's localToGlobal and globalToLocal methods to transform coordinates from the local system to the global system, but is there a way to achieve the intermediate? To transform coordinates from an arbitrary system to any other arbitrary system? I have a clickable object inside a Sprite, and the Sprite is a child of the stage. I want to retrieve the clicked point in the Sprite.

    Read the article

  • Using nodereference + views to create combined view

    - by Ian Silber
    I'm trying to set up a relational View but not sure how to do it. Here's an example of what I'm going for using the node types Artist and Song. Artist Song Length Bob Dylan Like a Rolling Stone 2:00 Bruce Springsteen Atlantic City 4:00 Burce Springsteen Born to Run 5:24 Van Morrison Domino 3:22 Van Morrison Brown Eyed Girl 4:30 Assuming I have an Artist node type that has a node reference to Song (set to unlimited) and a Song data type with an additional field for length, how would I go about configuring the view to output this view? Thanks! Ian

    Read the article

  • WPF, Setting property with single value on multiple subcontrols

    - by Andre van Heerwaarde
    I have a parent contentcontrol which displays data via a datatemplate. The datatemplate contains a stackpanel with several usercontols of the same type. I like to set the property only once on the parent control, it must set the value of the property on all the subcontrols. But if there is a way to do it on the stackpanel it's also OK. The template can be changed at runtime and the values need also to be propagated to the new template. My current solution is to implement the property on both parent and subcontrol and use code to propagate the value from the parent to all the subcontrols. My question is: is there a better or other ways of doing this?

    Read the article

  • Redirect in combination with a rewrite condition in htaccess

    - by Robbert van den Bogerd
    Hi all! I've got a cms-driven website, with no option to change the code. What I want to accomplish is creating friendly url's, using only apaches mod-rewrite engine. The problem is I'm creating an infinite loop, because I first redirect the original url (index.php?id=21) to a friendly one (/friendly/) and then rewrite the '/friendly' part back to 'id=21' I know there should be an extra condition or parameter to avoid looping in this case, but I can´t get one of the possible solutions to work. Here´s the code: RewriteCond %{query_string} ^id=21$ [NC] RewriteRule /* /peuterspeelzaal? [R=301,L] RewriteRule ^peuterspeelzaal$ index.php?id=21 [L]

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >