Search Results

Search found 182 results on 8 pages for 'jk'.

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

  • escaping a dollar in the middle of an ant property

    - by jk
    I have a property whose value contains a $. I'd like to use this property as a regexp in a propertyregexp. Ant appears to resolve the property as a paramater to the propertyregexp, but then the dollar gets interpreted as a regexp symbol. Example: <property name="a" value="abc$" /> <property name="b" value="xyz" /> <path id="paths"> <pathelement location="abc$/def" /> <pathelement location="abc$/ghi" /> </path> <pathconvert property="list" refid="paths" pathsep="${line.separator}" dirsep="/" /> <propertyregex property="list" input="${list}" override="true" regexp="${a}(.*)" replace="${b}\1" /> <echo message="${list}" /> I'd like to the pair xyz/def and xyz/ghi. Is this possible? I'm using Ant 1.8.

    Read the article

  • Servlet dispatcher is currently unavailable

    - by theJava
    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:prefix="/WEB-INF/jsp/" p:suffix=".jsp" /> <bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="url" value="jdbc:mysql://127.0.0.1:3306/spring"/> <property name="username" value="monty"/> <property name="password" value="indian"/> </bean> <bean id="mySessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="dataSource" ref="myDataSource" /> <property name="annotatedClasses"> <list> <value>uk.co.vinoth.spring.domain.User</value> </list> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.hbm2ddl.auto">create</prop> </props> </property> </bean> <bean id="myUserDAO" class="uk.co.vinoth.spring.dao.UserDAOImpl"> <property name="sessionFactory" ref="mySessionFactory"/> </bean> <bean name="/user/*.htm" class="uk.co.vinoth.spring.web.UserController" > <property name="userDAO" ref="myUserDAO" /> </bean> </beans> The above is my bean configuration, why do i get error when i run my application. My logs folder is empty... org.apache.catalina.loader.StandardClassLoader@122c9df org.springframework.web.servlet.DispatcherServlet java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1436) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1282) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4266) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Dec 22, 2010 3:44:48 PM org.apache.catalina.core.StandardContext loadOnStartup SEVERE: Servlet /interMedix threw load() exception java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1436) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1282) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4266) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Dec 22, 2010 3:44:48 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8181 Dec 22, 2010 3:44:48 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Dec 22, 2010 3:44:48 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/27 config=null Dec 22, 2010 3:44:48 PM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource Dec 22, 2010 3:44:49 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 558 ms Dec 22, 2010 3:44:50 PM org.apache.catalina.core.StandardWrapperValve invoke INFO: Servlet dispatcher is currently unavailable Dec 22, 2010 3:50:18 PM org.apache.catalina.core.StandardWrapperValve invoke INFO: Servlet dispatcher is currently unavailable But i have added spring-web-mvc to my class path which does contain this class file.

    Read the article

  • Threading questions

    - by JK
    If I spawn a secondary thread and the threaded method calls other methods, are those methods run in the secondary thread or the main thread? Is there a way to determine on which thread a specified piece of code is being run?

    Read the article

  • How to access system.webserver web.config node in .NET 2

    - by JK
    Are there any .NET APis that can read/update the system.webServer node in web.config? I know I can do it via reading/parsing the web.config file as xml but that's awkward. To read/update the system.web node in .NET 2 I can use: HttpModulesSection httpModulesSection = (HttpModulesSection)configuration.GetSection("system.web/httpModules"); But is there any API based way of accessing system.web/modules using .NET 2? I have to reference the .NET 2 version of system.web.configuration because I don't know in advance if my web app will be run on a server with .NET 2 or 3.5. So it is limited to .NET 2 API calls only. Thanks

    Read the article

  • Creating a Pop animation similar to the presentation of UIAlertView

    - by JK
    I would like to present a view in the same manner as that of UIAlertView - a pop/spring. Unfortunately subclassing UIAlertView is not an option for the view I need to present. I have written some code, but I can't seem to get it as realistic as I would like. I would appreciate any suggestions for greater realism or a link if anything similar has been done (I could not find anything on Google). Thank you. - (id)initWithFrame:(CGRect)frame { if ((self = [super initWithFrame:frame])) { self.backgroundColor = [UIColor whiteColor]; v = [[UIView alloc] initWithFrame:CGRectMake(140, 140, 60, 60)]; v.backgroundColor = [UIColor blueColor]; [self addSubview:v]; [self animate]; } return self; } - (void)animate { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationCurve:UIViewAnimationCurveLinear]; [UIView setAnimationDuration:0.2]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(popStep1Complete)]; v.frame = CGRectMake(90, 90, 140, 140); [UIView commitAnimations]; } - (void)popStep1Complete { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationCurve:UIViewAnimationCurveLinear]; [UIView setAnimationDuration:0.15]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(popStep2Complete)]; v.frame = CGRectMake(110, 110, 100, 100); [UIView commitAnimations]; } - (void)popStep2Complete { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationCurve:UIViewAnimationCurveLinear]; [UIView setAnimationDuration:0.15]; v.frame = CGRectMake(100, 100, 120, 120); [UIView commitAnimations]; }

    Read the article

  • JQuery validation - how to set the title attribute to the error message

    - by JK
    In JQuery validation the default behavior on an error is to create a label like so: <label for="FirstName" generated="true" class="error">This field is required.</label> Is it possible to change it so that it will output this instead (with a title attribute set to the error message)? <label for="FirstName" generated="true" class="error" title="This field is required.">This field is required.</label> I've tried the highlight method, but the label has not been created yet: $("#form").validate({ highlight: function (element, errorClass) { var label = $("label[for=" + element.id + "]"); // but label doesn't exist yet so this doesnt work if (label && label.length > 0) { // label.length is always 0 label.attr('title', label.text()); } } });

    Read the article

  • Core Text CTFrameSetter error with size suggestion

    - by JK
    I am trying to use the CTFramesetterSuggestFrameSizeWithConstraints method of CTFrameSetter to calculate the rect for a given attributed string. However, both the width and height are slightly less than needed. I would appreciate any suggestions on what may be causing this or how to correct it please.

    Read the article

  • NSFetchedResultsController not processing certain section driven moves

    - by JK
    I utilize a NSFetchedResultsController (frc) with a Core Data store. I implement all the frc delegate methods. The table is sporadically updated by background threads. All the inserts, deletes and updates work fine, with the exception that updates to the frc's index key for rows toward to the bottom of the table (50 rows), do not result in a section move. e.g. if "name" is the index key and the name "Victor" is changed to "Alex", the victor row now shows the name Alex, but is not moved to the top of the table alongside all other names starting with A. As I noted, this is only for rows towards the bottom of the table. If a row like "Andy" is changed to "Ben", the move is indeed processed correctly by the frc. Any suggestions to fix this would be appreciated. I do not use a frc cache. Thanks

    Read the article

  • Remove year component from NSDateFormatter style

    - by JK
    I would like to present a date in the kCFDateFormatterFullStyle, but without the year. Is there any way to remove the year component from this style? My app requires localization so practically I cannot programmatically set the format string for all locales. I have come accross a solution which removes the "y" characters from the format string returned by the built in styles. Unfortunately, this is not acceptable as the year components are not represented by "y" in some other languages like Japanese. Any suggestions to get the kCFDateFormatterFullStyle without the year would be great! Thanks.

    Read the article

  • Change value before sending an email in Microsoft Dynamic CRM

    - by jk
    Hi I have created one Email Template in Dynamic CRM 4. The template look like as following Dear {!User:Full Name} you received one assignment. output of the email as following Dear John Smith you received one assignment. now I need to change the value as just John. we do not have attribute like first name and last name. but when we send an email it only take first word of the string. Can anybody please tell me how can i achieve this functionality Without writing any workflow or plug ins? Thanks

    Read the article

  • Triple tap with UITapGestureRecognizer

    - by JK
    I have implemented 3 gesture recognizers - single, double and triple tap. Single and double works perfectly, but the 3 tap gesture is interpreted as a 2 tap gesture, despite the number of taps being set correctly. Does a 3 tap gesture require additional code? Thank you

    Read the article

  • Properly releasing UITableViewController and UITableView directly added to a UIViewController

    - by JK
    I have a UIViewController (parentVC) to which I add a UITableViewController as follows (it is not pushed since the tableview only occupies about half the screen): tableVC = [[SmallTableVC alloc] initWithStyle:UITableViewStylePlain]; [self.view addSubview:tableVC.tableView]; In dealloc, I add [tableVC release]; Using instruments, I can see that the tableVC is indeed fully released when parentVC released, which is good, but I am not sure why as I thought that the UITableView of tableVC would have a retain count of 2 (1 for retention by tableVC and 1 for retention by parentVC). My intuition was that an additional [tableVC.tableView release] would be required, but adding it crashes the app. Why is tableVC released properly by the current code (if indeed it actually is)? Does a UITableViewController not retain its tableView? Thanks.

    Read the article

  • Filter list as a parameter in a compiled query

    - by JK
    I have the following compiled query that I want to return a list of "groups" that don't have a "GroupID" that's contained in a filtered list: CompiledQuery.Compile(ConfigEntities contexty, List list) = from c in context.Groups where (!csList.Contains(c.GroupID)) select c).ToList() However I'm getting the following run-time error: The specified parameter 'categories' of type 'System.Collections.Generic.List`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c261364e126]]' is not valid. Only scalar parameters (such as Int32, Decimal, and Guid) are supported. Any ideas?

    Read the article

  • Core Data fetch request with array

    - by JK
    I am trying to set a fetch request with a predicate to obtain records in the store whose identifiers attribute match an array of identifiers specified in the predicate e.g. NSString *predicateString = [NSString stringWithFormat:@"identifier IN %@", employeeIDsArray]; The employeeIDsArray contains a number of NSNumber objects that match IDs in the store. However, I get an error "Unable to parse the format string". This type of predicate works if it is used for filtering an array, but as mentioned, fails for a core data fetch. How should I set the predicate please?

    Read the article

  • Secondary thread causes startup delay

    - by JK
    In my didFinishLaunchingWithOptions method I spawn a thread to perform some maintenance on my core data store. However, this increases the startup time by half a second. The startup view is a tableview which draws its content from the same store. If I let the thread sleep for a second, the startup time improves drastically. I would like to understand why the second thread is blocking/delaying the main thread. Is it because both are trying to access the store (The second thread has its own store coordinator and context) or another reason (e.g. dont spawn threads in didFinishLaunching)?

    Read the article

  • How to get a long url from a short url

    - by JK
    I would like to determine what the long url of a short url is. I have tried using http HEAD requests, but very few of the returned header fields actually contain any data pertaining to the destination/long url. Is there: 1. Any way to determine the long url? 2. If so, can it be done without downloading the body of the destination? Thank you

    Read the article

  • Livevalidation clientside validation - can you control the position of the validation messages?

    - by JK
    I'm using LiveValidaion for my clientside validation http://livevalidation.com/ and DataAnnotations for my validation rules. This all works fine except that the clientside error messages are only ever displayed to the right of the element being validated. Is it possible to move this validation message below the element being validated? Or even better, group all messages in a div at the top/bottom of the page? I dont see anything in their docs or examples

    Read the article

  • ASP.NET MVC - How to Unit Test boundaries in the Repository pattern?

    - by JK
    Given a basic repository interface: public interface IPersonRepository { void AddPerson(Person person); List<Person> GetAllPeople(); } With a basic implementation: public class PersonRepository: IPersonRepository { public void AddPerson(Person person) { ObjectContext.AddObject(person); } public List<Person> GetAllPeople() { return ObjectSet.AsQueryable().ToList(); } } How can you unit test this in a meaningful way? Since it crosses the boundary and physically updates and reads from the database, thats not a unit test, its an integration test. Or is it wrong to want to unit test this in the first place? Should I only have integration tests on the repository? I've been googling the subject and blogs often say to make a stub that implements the IRepository: public class PersonRepositoryTestStub: IPersonRepository { private List<Person> people = new List<Person>(); public void AddPerson(Person person) { people.Add(person); } public List<Person> GetAllPeople() { return people; } } But that doesnt unit test PersonRepository, it tests the implementation of PersonRepositoryTestStub (not very helpful).

    Read the article

  • How to config Remote BLOB Storage(RBS) with Microsoft Dynamics CRM 4.0 ?

    - by jk
    Hi We have working site for Dynamic crm 4.0 and in it we are storing image into the database. Now database is growing very fast and server is dying.. now I want to enable the Remote BLOB Storage with Dynamic CRM 4.0. for that I tried to install RBS for testing but everywhere is configure with Sharepoint 2010 not with Dynamic Crm. Does anybody know how to install and configure with Dyanmic CRM 4.0? Does RBS with Standard Edition of SQL Server 2008? I followed following path to install but it with Sharepoint? http://technet.microsoft.com/en-us/library/ee663474.aspx Any help is appreciate. Thanks

    Read the article

  • NSManagedObjectContext returns YES for hasChanges when there are none

    - by JK
    I created a separate NSManagedObjectContext on a separate thread to perform some store maintenance. However, I have noticed that the context returns YES for hasChanges as soon as a managed object in it is even referenced e.g. NSString *name = managedObject.name; This context is created and used exclusively in 1 method. Why is it returning has changes, when there there are none?

    Read the article

  • Jquery automatic loading gif and button disable on submit click

    - by JK
    Is it possible to automate the showing/hiding of a ajax loading gif, and the disabling/enabling of the submit button at the same time? (when the submit button is a styled not a input type=submit) Currently when submitting I do this: $("#save_button_id").click(function () { if ($('#save_button_id').hasClass('ui-state-disabled')) return false; Save(); }); function Save() { StartAjax($("#save_button_id")); $.ajax({ success: function (data) { EndAjax($("#save_button_id")); // etc... }, error: function (xhr, status, error) { EndAjax($("#save_button_id")); // etc ... } }); } function StartAjax(button) { DisableButtonClick(button); $("#ajaxLoad").show(); } function EndAjax(button) { EnableButtonClick(button); $("#ajaxLoad").hide(); } I've seen a few places talk about how to use .ajaxStart() to automatically show the loading gif, but is it possible to also find a reference to the button (a styled tag) that was clicked, and automatically disable/enable that as well? The point of this is to not have to manually type in Start/EndAjax every time, and to make sure the app is consistent everywhere.

    Read the article

  • Jquery - How to make $.post() use contentType=application/json?

    - by JK.
    I've noticed that when using $.post() in jquery that the default contentType is application/x-www-form-urlencoded - when my asp.net mvc code needs to have contentType=application/json (See this question for why I must use application/json: http://stackoverflow.com/questions/2792603/aspnet-mvc-why-is-modelstate-isvalid-false-the-x-field-is-required-when-that) How can I make $.post() send contentType=application/json? I already have a large number of $.post() functions, so I don't want to change to $.ajax() because it would take too much time If I try $.post(url, data, function(), "json") It still has contentType=application/x-www-form-urlencoded. So what exactly does the "json" param do if it does not change the contenttype to json? If I try $.ajaxSetup({ contentType: "application/json; charset=utf-8" }); That works but affects every single $.get and $.post that I have and causes some to break. So is there some way that I can change the behavior of $.post() to send contentType=application/json?

    Read the article

  • Best practise - Accessing preferences globally

    - by JK
    User preferences for my app is store in NSUserDefaults. This includes a "theme" preference, which needs to be accessed frequently by multiple classes. I would prefer not to call "[[NSUserDefaults standardUserDefaults] objectForKey:..." repeatedly as it makes for inconcise code and I assume will incur overhead. What is the preferred and most concise method for accessing preferences in any class?

    Read the article

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