Search Results

Search found 916 results on 37 pages for 'simon bull'.

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

  • MVVM, ContextMenus and binding to ViewModel defined Command

    - by Simon Fox
    Hi I am having problems with the binding of a ContextMenu command to an ICommand property in my ViewModel. The binding seems to be attaching fine...i.e when I inspect the value of the ICommand property it is bound to an instance of RelayCommand. The CanExecute delegate does get invoked, however when I open the context menu and select an item the Execute delegate does not get invoked. Heres my View (which is defined as the DataTemplate to use for instances of the following ViewModel in a resource dictionary): <UserControl x:Class="SmartSystems.DragDropProto.ProductLinkView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Proto"> <UserControl.Resources> <local:CenteringConverter x:Key="centeringConvertor"> </local:CenteringConverter> </UserControl.Resources> <UserControl.ContextMenu> <ContextMenu> <MenuItem Command="{Binding ChangeColor}">Change Color</MenuItem> </ContextMenu> </UserControl.ContextMenu> <Canvas> <Ellipse Width="5" Height="5" > <Ellipse.Fill> <SolidColorBrush Color="{Binding LinkColor}"></SolidColorBrush> </Ellipse.Fill> <Ellipse.RenderTransform> <TranslateTransform X="{Binding EndpointOneXPos, Converter={StaticResource centeringConvertor}}" Y="{Binding EndpointOneYPos, Converter={StaticResource centeringConvertor}}"/> </Ellipse.RenderTransform> </Ellipse> <Line X1="{Binding Path=EndpointOneXPos}" Y1="{Binding Path=EndpointOneYPos}" X2="{Binding Path=EndpointTwoXPos}" Y2="{Binding Path=EndpointTwoYPos}"> <Line.Stroke> <SolidColorBrush Color="{Binding LinkColor}"></SolidColorBrush> </Line.Stroke> </Line> <Ellipse Width="5" Height="5" > <Ellipse.Fill> <SolidColorBrush Color="{Binding LinkColor}"></SolidColorBrush> </Ellipse.Fill> <Ellipse.RenderTransform> <TranslateTransform X="{Binding EndpointTwoXPos, Converter={StaticResource centeringConvertor}}" Y="{Binding EndpointTwoYPos, Converter={StaticResource centeringConvertor}}"/> </Ellipse.RenderTransform> </Ellipse> </Canvas> </UserControl> and ViewModel (with uneccessary implementation details removed): class ProductLinkViewModel : BaseViewModel { public ICommand ChangeColor { get; private set; } public Color LinkColor { get; private set; } public ProductLinkViewModel(....) { ... ChangeColor = new RelayCommand(ChangeColorAction); LinkColor = Colors.Blue; } private void ChangeColorAction(object param) { LinkColor = LinkColor == Colors.Blue ? Colors.Red : Colors.Blue; OnPropertyChanged("LinkColor"); } }

    Read the article

  • The speed of Ruby and Java.

    - by Simon
    In every benchmark that I found on the web it seems that Ruby is slow, much slower than Java. The Ruby folks just state that it doesn't matter. Could you give me any example that the speed of Ruby on Rails (and the Ruby itself) really doesn't matter?

    Read the article

  • Facebook API - Get comments

    - by Simon R
    Our business has a Facebook Fan Page. The fan page doesn't seem to generate any emails to us when updates are made to the page, whether someone adds a new status or someone comments on one of the statuses etc. Currently, we are running a very crude script to grab the content of the page and then use regular expressions to get the information we require. Obviously this is not fool proof and I'm looking into alternatives to this method. I've been looking at the facebook API and wonder if the rest server might be an option. I cannot, however, seem to find out how to return information of fan page statuses and their comments. Is anyone able to direct me how to use the API to retrieve this information. I am an admin of the fan page. The programming language I'm using is PHP. Many thanks.

    Read the article

  • Determing size of visible area of a ScrollingGraphicalViewer in Eclipse GEF

    - by Simon
    I am attempting to create a simple application using Eclipse GEF that displays a diagram inside a ScrollingGraphicalViewer. On start-up I want the diagram to be centered inside the viewer (imagine a star layout where the center of the star is in the center of the view). Here are what I think are the relevant code sections: My view: public class View extends ViewPart { public static final String ID = "GEFProofOfConcept.view"; ... public void createPartControl(Composite parent) { viewer.createControl(parent); viewer.setRootEditPart(rootEditPart); viewer.setEditPartFactory(editPartFactory); viewer.setContents(DummyModelCreator.generateModel()); } The edit part code: @Override protected void refreshVisuals() { Project project = (Project) getModel(); // This is where the actual drawing is done, // Simply a rectangle with text Rectangle bounds = new Rectangle(50, 50, 75, 50); getFigure().setBounds(bounds); Label label = new Label(project.getName()); projectFont = new Font(null, "Arial", 6, SWT.NORMAL); label.setFont(projectFont); label.setTextAlignment(PositionConstants.CENTER); label.setBounds(bounds.crop(IFigure.NO_INSETS)); getFigure().add(label); setLocation(); } private void setLocation() { Project project = (Project) getModel(); if (project.isRoot()) { // Place in centre of the layout Point centrePoint = new Point(0, 0); // This is where I need the center of the view getFigure().setLocation(centrePoint); } else { ... } } And the parent of the above edit part: public class ProjectDependencyModelEditPart extends AbstractGraphicalEditPart { @Override protected IFigure createFigure() { Figure f = new FreeformLayer(); f.setLayoutManager(new XYLayout()); return f; } ... Alternative solutions to the problem also welcome, I am most certainly a GEF (and Eclipse in general) newbie.

    Read the article

  • How do I prevent Eclipse from hanging on startup?

    - by Simon Nickerson
    I am using Eclipse 3.3 ("Europa"). Periodically, Eclipse takes an inordinately long time (perhaps forever) to start up. The only thing I can see in the Eclipse log is: !ENTRY org.eclipse.core.resources 2 10035 2008-10-16 09:47:34.801 !MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. Googling reveals someone's suggestion that I remove the folder: workspace\.metadata\.plugins\org.eclipse.core.resources\.root\.indexes This does not appear to have helped. Short of starting with a new workspace (something which I am not keen to do, as it takes me hours to set up all my projects again properly), is there a way to make Eclipse start up properly?

    Read the article

  • IE8 ignoring background "no-repeat" value

    - by Simon Gibbs
    I have a page that uses a background image to do rounded corners, and in IE8 on Windows XP the background image repeats. http://j.mp/c5h1Hf It looks right in other browsers and even in "Compatability View" in IE8. Does anyone know how to remove the repetion? I'm stumped!

    Read the article

  • How to implement login page using Spring Security so that it works with Spring web flow?

    - by simon
    I have a web application using Spring 2.5.6 and Spring Security 2.0.4. I have implemented a working login page, which authenticates the user against a web service. The authentication is done by defining a custom authentincation manager, like this: <beans:bean id="customizedFormLoginFilter" class="org.springframework.security.ui.webapp.AuthenticationProcessingFilter"> <custom-filter position="AUTHENTICATION_PROCESSING_FILTER" /> <beans:property name="defaultTargetUrl" value="/index.do" /> <beans:property name="authenticationFailureUrl" value="/login.do?error=true" /> <beans:property name="authenticationManager" ref="customAuthenticationManager" /> <beans:property name="allowSessionCreation" value="true" /> </beans:bean> <beans:bean id="customAuthenticationManager" class="com.sevenp.mobile.samplemgmt.web.security.CustomAuthenticationManager"> <beans:property name="authenticateUrlWs" value="${WS_ENDPOINT_ADDRESS}" /> </beans:bean> The authentication manager class: public class CustomAuthenticationManager implements AuthenticationManager, ApplicationContextAware { @Transactional @Override public Authentication authenticate(Authentication authentication) throws AuthenticationException { //authentication logic return new UsernamePasswordAuthenticationToken(principal, authentication.getCredentials(), grantedAuthorityArray); } The essential part of the login jsp looks like this: <c:url value="/j_spring_security_check" var="formUrlSecurityCheck"/> <form method="post" action="${formUrlSecurityCheck}"> <div id="errorArea" class="errorBox"> <c:if test="${not empty param.error}"> ${sessionScope["SPRING_SECURITY_LAST_EXCEPTION"].message} </c:if> </div> <label for="loginName"> Username: <input style="width:125px;" tabindex="1" id="login" name="j_username" /> </label> <label for="password"> Password: <input style="width:125px;" tabindex="2" id="password" name="j_password" type="password" /> </label> <input type="submit" tabindex="3" name="login" class="formButton" value="Login" /> </form> Now the problem is that the application should use Spring Web Flow. After the application was configured to use Spring Web Flow, the login does not work anymore - the form action to "/j_spring_security_check" results in a blank page without error message. What is the best way to adapt the existing login process so that it works with Spring Web Flow?

    Read the article

  • What is the best XPS WYSIWYG Editor that will output XAML?

    - by Simon
    I am looking for a WYSIWYG for XPS that will ouput the raw XAML. My intentions is use the tool for a way to quickly generate and test the XAML (of XPS documents) with the intention of then generating the same xaml in code and programmatically generating an XPS document. The same approach that many people use for generating html. Can anyone recommend any of the below products or suggest any others? Better yet does anyone know of a free XPS editor? NiXPS Edit $300USD http://www.nixps.com/nixps_edit_20.html XamlPad is free but also quite limited and does not really target XPS. Office System Power Tools is not WYSIWYG http://blogs.msdn.com/adrianford/archive/2008/07/03/visual-studio-and-xps-files.aspx XPS eXaminer 1.0 $399USD http://storefront.qualitylogic.com/p-16-qualitylogic-xps-examiner.aspx

    Read the article

  • javascript RegEx hashtag matching #foo and #foo-fåäö but not http://this.is/no#hashtag

    - by Simon B.
    Currently we're using javascript new RegExp('#[^,#=!\s][^,#=!\s]*') (see [1]) and it mostly works, except that it also matches URLs with anchors like http://this.is/no#hashtag and also we'd rather avoid matching foo#bar Some attempts have been made with look-ahead but it doesn't seem to work, or that I just don't get it. With the below source text: #public #writable #kommentarer-till-beta -- all these should be matched Verkligen #bra jobbat! T ex #kommentarer till #artiklar och #blogginlägg, kool. -- mixed within text http://this.is/no#hashtag -- problem xxy#bar -- We'd prefer not matching this one, and... #foo=bar =foo#bar -- we probably shouldn't match any of those either. #foo,bar #foo;bar #foo-bar #foo:bar -- We're flexible on whether these get matched in part or in full . We'd like to get below output: (showing $ instead of <a class=tag href=.....>...</a> for readability reasons) $ $ $ -- all these should be matched Verkligen $ jobbat! T ex $ till $ och $, kool. -- mixed within text http://this.is/no$ -- problem xxy$ -- We'd prefer not matching this one, and... $=bar =foo$ -- we probably shouldn't match any of those either. $,bar $ $ $ -- We're flexible on whether these get matched in part or in full [1] http://github.com/ether/pad/blob/master/etherpad/src/plugins/twitterStyleTags/hooks.js

    Read the article

  • RegEx - Take all numeric characters following a text character

    - by Simon
    Given a string in the format: XXX999999v99 (where X is any alpha character and v is any numeric character and v is a literal v character) how can I get a regex to match the numeric characters following the v? So far I've got 'v\d\d' which includes the v but ideally I'd like just the numeric part. As an aside does anyone know of a tool in which you can specify a string to match and have the regex generated? Modifying an existing regex is one thing but I find starting from scratch painful! Edit: Re-reading this question I realise it reads like a homework assignment! However I can assure you it's not, the strings I'm trying to match represent product versions appended to product codes. The current code uses all sorts of substring expressions to retrieve the version part.

    Read the article

  • How can I reprogram a USB "easy button"?

    - by Shawn Simon
    I have a USB "easy button"- is a USB cable attached to a large button. It appears as a keyboard to the computer. When I push the button, it sends the keys Start+R and then quickly types in a pre-configured URL. I am fairly certain that the company that produces these buttons sets the URL via some sort of software over USB. How could I reprogram the button myself? What sort of software would I need? Here is a link to the website: http://www.usbsmartbuttons.com/

    Read the article

  • What relational database innovations have there been in the last 10 years

    - by Simon Munro
    The SQL implementation of relational databases has been around in their current form for something like 25 years (since System R and Ingres). Even the main (loosely adhered to) standard is ANSI-92 (although there were later updates) is a good 15 years old. What innovations can you think of with SQL based databases in the last ten years or so. I am specifically excluding OLAP, Columnar and other non-relational (or at least non SQL) innovations. I also want to exclude 'application server' type features and bundling (like reporting tools) Although the basic approach has remained fairly static, I can think of: Availability Ability to handle larger sets of data Ease of maintenance and configuration Support for more advanced data types (blob, xml, unicode etc) Any others that you can think of?

    Read the article

  • Recommendation for screen video capture for demos

    - by Simon
    I am just in the process of making some little demo tutorial videos for my app to help users get up to speed. I have used Camtasia in the past but don't really like it. Anyone have any recommendations. Good is more important than free, but free certainly helps. I can use Windows or Mac for this job.

    Read the article

  • Weird Java Math ,10 ^ 1 = 11?

    - by Simon
    For an exercise I was writing a loop that turns a string into an integer without using the built in functions by multiplying each individual value by its numerical position. 75 would be 7*(10 ^ 1) + 5*(10 ^ 0), for example. However, for some reason (10 ^ 1) keeps coming back as 11. Is there some mistake I have made or an explanation for this?

    Read the article

  • Help needed with AES between Java and Objective-C (iPhone)....

    - by Simon Lee
    I am encrypting a string in objective-c and also encrypting the same string in Java using AES and am seeing some strange issues. The first part of the result matches up to a certain point but then it is different, hence when i go to decode the result from Java onto the iPhone it cant decrypt it. I am using a source string of "Now then and what is this nonsense all about. Do you know?" Using a key of "1234567890123456" The objective-c code to encrypt is the following: NOTE: it is a NSData category so assume that the method is called on an NSData object so 'self' contains the byte data to encrypt. - (NSData *)AESEncryptWithKey:(NSString *)key { char keyPtr[kCCKeySizeAES128+1]; // room for terminator (unused) bzero(keyPtr, sizeof(keyPtr)); // fill with zeroes (for padding) // fetch key data [key getCString:keyPtr maxLength:sizeof(keyPtr) encoding:NSUTF8StringEncoding]; NSUInteger dataLength = [self length]; //See the doc: For block ciphers, the output size will always be less than or //equal to the input size plus the size of one block. //That's why we need to add the size of one block here size_t bufferSize = dataLength + kCCBlockSizeAES128; void *buffer = malloc(bufferSize); size_t numBytesEncrypted = 0; CCCryptorStatus cryptStatus = CCCrypt(kCCEncrypt, kCCAlgorithmAES128, kCCOptionPKCS7Padding, keyPtr, kCCKeySizeAES128, NULL /* initialization vector (optional) */, [self bytes], dataLength, /* input */ buffer, bufferSize, /* output */ &numBytesEncrypted); if (cryptStatus == kCCSuccess) { //the returned NSData takes ownership of the buffer and will free it on deallocation return [NSData dataWithBytesNoCopy:buffer length:numBytesEncrypted]; } free(buffer); //free the buffer; return nil; } And the java encryption code is... public byte[] encryptData(byte[] data, String key) { byte[] encrypted = null; Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); byte[] keyBytes = key.getBytes(); SecretKeySpec keySpec = new SecretKeySpec(keyBytes, "AES"); try { Cipher cipher = Cipher.getInstance("AES/ECB/PKCS7Padding", "BC"); cipher.init(Cipher.ENCRYPT_MODE, keySpec); encrypted = new byte[cipher.getOutputSize(data.length)]; int ctLength = cipher.update(data, 0, data.length, encrypted, 0); ctLength += cipher.doFinal(encrypted, ctLength); } catch (Exception e) { logger.log(Level.SEVERE, e.getMessage()); } finally { return encrypted; } } The hex output of the objective-c code is - 7a68ea36 8288c73d f7c45d8d 22432577 9693920a 4fae38b2 2e4bdcef 9aeb8afe 69394f3e 1eb62fa7 74da2b5c 8d7b3c89 a295d306 f1f90349 6899ac34 63a6efa0 and the java output is - 7a68ea36 8288c73d f7c45d8d 22432577 e66b32f9 772b6679 d7c0cb69 037b8740 883f8211 748229f4 723984beb 50b5aea1 f17594c9 fad2d05e e0926805 572156d As you can see everything is fine up to - 7a68ea36 8288c73d f7c45d8d 22432577 I am guessing I have some of the settings different but can't work out what, I tried changing between ECB and CBC on the java side and it had no effect. Can anyone help!? please....

    Read the article

  • Free POP3 .NET library?

    - by Shawn Simon
    Looking for a POP3 Client for .NET that basically just lets me log into a server and grab all the emails out, and maybe send some. I grabbed Indy.Sockets off of CodePlex and got it running but its throwing errors trying to decode the mail headers. Really anything is fine if it works.

    Read the article

  • Use jquery to create a multidimensional array

    - by Simon M White
    I'd like to use jquery and a multidemensional array to show a random quote plus the name of the individual who wrote it as a separate item. I'll then be able to use css to style them differently. The quote will change upon page refresh. So far i have this code which combines the quote and the name and person who wrote it: $(document).ready(function(){ var myQuotes = new Array(); myQuotes[0] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec in tortor mauris. Peter Jones, Dragons Den"; myQuotes[1] = "Curabitur interdum, nibh et fringilla facilisis, lacus ipsum pulvinar mauris, eu facilisis justo arcu eget diam. Duis id sagittis elit. Theo Pathetis, Dragons Den"; myQuotes[2] = "Vivamus purus purus, tincidunt et porttitor et, euismod sit amet urna. Etiam sollicitudin eros nec metus pretium scelerisque. James Caan, Dragons Den"; var myRandom = Math.floor(Math.random()*myQuotes.length); $('.quote-holder blockquote span').html(myQuotes[myRandom]); }); any help would be greatly appreciated.

    Read the article

  • Can I pass data via JQUERY to ASP.NET MVC controller action and have a view rendered in new browser

    - by Simon Lomax
    Hi, Can anyone advise if its possible to pass data via JQUERY to an ASP.NET MVC controller action and have a view rendered in new browser tab based on the model data passed to the action method. My scenario is that I have a Jqgrid populated with product info on a page. The user would tick the items in the grid that they would like a label produced for. After they've made their slection they would click a button and I would like (if possible) to render a view of that contains a label for each selected item and have the view render in a new browser tab. All the code to allow the selections and post the relevant data back to the action method is all working fine and I know its easy to use the Jquery $(selector).load() command to populate an element on the current page with the HTML returned from the action. But is it possible to populate an element on a page in a new browser tab. If it is how would I go about it? Hope this make sense.

    Read the article

  • NSURLConnection not "firing" until UITableView scrolls..

    - by Simon
    Hi, I've got a UITableView that loads an image asynchronously and places it in the UITableViewCell once it's loaded (I'm using almost the exact same code as in the "LazyTableImages" tutorial). This works fine for all images when I scroll the table, but it's not loading the images that are first in the view. The code is definitely working fine as the class that actually sends the NSURLConnection request is being called correctly (I added an NSLog and it reached the console). The NSURLConnection is just not calling the delegate methods (didReceiveData, connectionDidFinishLoading, etc). Here's my code: HomeController.m - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; NSArray *feed = [feeds objectAtIndex: indexPath.row]; /** * Name of person */ [...] /** * Feed entry */ [...] /** * Misc work */ [...] } FeedRecord *feedRecord = [self.entries objectAtIndex:indexPath.row]; if( !feedRecord.image ) { if (self.table.dragging == NO && self.table.decelerating == NO) { [self startIconDownload:feedRecord forIndexPath:indexPath]; } cell.imageView.image = [UIImage imageNamed:@"Placeholder.png"]; } return cell; } - (void)startIconDownload:(FeedRecord *)feedRecord forIndexPath:(NSIndexPath *)indexPath { IconDownloader *iconDownloader = [imageDownloadsInProgress objectForKey:indexPath]; if (iconDownloader == nil) { iconDownloader = [[IconDownloader alloc] init]; iconDownloader.feedRecord = feedRecord; iconDownloader.indexPathInTableView = indexPath; iconDownloader.delegate = self; [imageDownloadsInProgress setObject:iconDownloader forKey:indexPath]; [iconDownloader startDownload]; [iconDownloader release]; } } IconDownload.m #import "IconDownloader.h" #import "FeedRecord.h" #define kAppIconHeight 48 @implementation IconDownloader @synthesize feedRecord; @synthesize indexPathInTableView; @synthesize delegate; @synthesize activeDownload; @synthesize imageConnection; #pragma mark - (void)dealloc { [feedRecord release]; [indexPathInTableView release]; [activeDownload release]; [imageConnection cancel]; [imageConnection release]; [super dealloc]; } - (void)startDownload { NSLog(@"%@ %@",@"Started downloading", feedRecord.profilePicture); // this shows in log self.activeDownload = [NSMutableData data]; // alloc+init and start an NSURLConnection; release on completion/failure NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest: [NSURLRequest requestWithURL: [NSURL URLWithString:feedRecord.profilePicture]] delegate:self]; self.imageConnection = conn; NSLog(@"%@",conn); // this shows in log [conn release]; } - (void)cancelDownload { [self.imageConnection cancel]; self.imageConnection = nil; self.activeDownload = nil; } #pragma mark - #pragma mark Download support (NSURLConnectionDelegate) - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { NSLog(@"%@ %@",@"Got data for", feedRecord.profilePicture); [self.activeDownload appendData:data]; } - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { NSLog(@"%@",@"Fail!"); // Clear the activeDownload property to allow later attempts self.activeDownload = nil; // Release the connection now that it's finished self.imageConnection = nil; } - (void)connectionDidFinishLoading:(NSURLConnection *)connection { NSLog(@"%@ %@",@"Done", feedRecord.profilePicture); // Set appIcon and clear temporary data/image UIImage *image = [[UIImage alloc] initWithData:self.activeDownload]; self.feedRecord.image = image; self.activeDownload = nil; [image release]; // Release the connection now that it's finished self.imageConnection = nil; NSLog(@"%@ %@",@"Our delegate is",delegate); // call our delegate and tell it that our icon is ready for display [delegate feedImageDidLoad:self.indexPathInTableView]; } @end Has anyone else experienced anything like this or can identify an issue with my code? Thanks!

    Read the article

  • "The specified table does not exist" - for the administrator it does! Vista only issue

    - by Simon Nunn
    Hello, I've got a weird bug occurring in a compact database on a Vista deployment machine. Basically the sdf file seem to be schizophrenic. The client application get the entitled error when running as a user but not when I use run as administrator. I don't see this problem on my XP development machine. I installed management studio onto the deployment machine and opened two versions of the application, one as user and one as administrator. When I query: SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES I see 21 tables on the one and 26 on the other, and the administrator is seeing less tables. It turns out that the user version, with 26 rows, is a previous incarnation of this database. Any ideas on why this is happening?

    Read the article

  • In which order is model binding and validation done in ASP.NET MVC 2?

    - by Simon Bartlett
    I am using ASP.NET MVC 2, and am using a view-model per view approach. I am also using Automapper to map properties from my domain-model to the view-model. Take this example view-model (with Required data annotation attributes for validation purposes): public class BlogPost_ViewModel { public int Id { get; set; } [Required] public string Title { get; set; } [Required] public string Text { get; set; } } In the post editor view I am using a rich text editor (CKeditor). Because CKeditor is a HTML editor, I ideally need CKeditor to HTMLencode the user's input when the form is submitted, so that ASP.NET's input validation does not complain. This is not a problem as CKeditor has this functionality built in, however I need CKeditor's output decoded before mapping back to the domain object (via Automapper). I am wanting to add a new property (to the view-model above) to solve this, as follows: public string HTMLEncodedText { get { return HTMLEncode(Text); } set { Text = HTMLDecode(value); } } I can then bind this property to CKeditor in the view, but still use Automapper to map the 'Text' property in the controller - all without having to turn input-validation off. My question is: do you know how the model binding and validation process in ASP.NET MVC 2 works? Are all model properties binded before validation is carried out? Or is each individual property get validated when it is being set. I think ideally for my idea to work, all properties need to be set before the model is validated.

    Read the article

  • How do I get the cell value from a formula in Excel using VBA?

    - by Simon
    I have a formula in a range of cells in a worksheet which evaluate to numerical values. How do I get the numerical values in VBA from a range passed into a function? Let's say the first 10 rows of column A in a worksheet contain rand() and I am passing that as an argument to my function... public Function X(data as Range) as double for c in data.Cells c.Value 'This is always Empty c.Value2 'This is always Empty c.Formula 'This contains RAND() next end Function I call the function from a cell... =X(a1:a10) How do I get at the cell value, e.g. 0.62933645? Excel 2003, VB6

    Read the article

  • JS Anonymous Scope...

    - by Simon
    this Application.EventManager.on('Click', function(args) { // event listener, args is JSON TestAction.getContents(args.node.id, function(result, e) { console.log(result); this.add({ title: args.node.id, html: result }).show(); }); }); I'm really struggling with scope and anonymous functions... I want this (on the 1st line) to be the same object as this (on the 5th line)... .call() and .apply() seemed to be the right sort of idea but I don't want to trigger the event... just change it's scope.... For a bit of contexts... the this in question is a TabContainer and TestAction is a RPC that returns content... Thanks....

    Read the article

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