Search Results

Search found 1903 results on 77 pages for 'james mccvoy'.

Page 40/77 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • .Net System.Net.HttpWebRequest & Authentication Cookies

    - by James
    I would like to know if the following is possible: As part of the PageLoad of an ASP.Net page request: Use HttpWebRequest (POST) to make a request to a forms authentication webpage of a different web application Examine the response to see if the authentication succeeded (identifiable if an authentication cookie has been set) If it fails, then finish the ASP.Net page request, which will display a message saying "couldn't auto-login" or some such thing If success, then instead of completing the ASP.Net page lifecycle, use "Response.Write" to send the response from the HttpWebRequest back to the browser (thus essentially displaying the webpage from the HttpWebRequest) If the above is possible, then, is there also a way to transfer the authentication cookie from the HttpWebResponse to the requesting browser? My gut feeling is probably not - but if this is the case, then how do proxy servers handle such things? Is that not essentially what they are doing? Thanks for any help

    Read the article

  • Modal Dialog and Form Elements

    - by James Jeffery
    I have a form that contains some fields and a recaptcha box. I have hidden the recaptcha box. The user clicks "create profile" and a modal dialog pops up with the recaptcha box. All fine. But, how do I submit that information? I am using Javascript to create the recaptcha HTML in the modal. I have a button called "Create Profile" that has this code attatched to the onclick: $("#form").submit() The form data gets submitted to the create.php page, but the recaptcha info does not. Do I have to manually pass this information via the post request to create.php? Without the modal dialog it works fine. I can't understand what's going on. Any ideas?

    Read the article

  • How to use IObservable/IObserver with ConcurrentQueue or ConcurrentStack

    - by James Black
    I realized that when I am trying to process items in a concurrent queue using multiple threads while multiple threads can be putting items into it, the ideal solution would be to use the Reactive Extensions with the Concurrent data structures. My original question is at: http://stackoverflow.com/questions/2997797/while-using-concurrentqueue-trying-to-dequeue-while-looping-through-in-parallel/ So I am curious if there is any way to have a LINQ (or PLINQ) query that will continuously be dequeueing as items are put into it. I am trying to get this to work in a way where I can have n number of producers pushing into the queue and a limited number of threads to process, so I don't overload the database. If I could use Rx framework then I expect that I could just start it, and if 100 items are placed in within 100ms, then the 20 threads that are part of the PLINQ query would just process through the queue. There are three technologies I am trying to work together: Rx Framework (Reactive LINQ) PLING System.Collections.Concurrent structures

    Read the article

  • Setting WCF Endpoint address at runtime?

    - by james.ingham
    Hey, If I have the following: WSHttpBinding binding = new WSHttpBinding(); EndpointAddress endpoint = new EndpointAddress(new Uri("http://xxx:pppp/MyService")); MyServiceClient client = new MyServiceClient(binding, endpoint); How can I set the endpoint bindingConfiguration? If it helps my app.config is set to: <endpoint address="http://xxx:pppp/Design_Time_Addresses/WcfServiceLibrary/ManagementService/" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IManagementService" contract="ServiceReference.IManagementService"> <identity> <dns value="localhost" /> </identity> </endpoint> However I'm looking to let the user configure this before running the client. Thanks

    Read the article

  • Verify Authenticode signature as being from our company for automatic updater

    - by James Johnston
    I am implementing an automatic update feature and need some advice on how to do this securely using best practices. I would like to use the downloaded file's Authenticode signature to verify that it is safe to run (i.e. originates from our company and hasn't been tampered with). My question is very similar to question #2008519. The bottom-line question: what's the best, most secure way to check Authenticode signatures for an automatic update feature? What fields in the certificate should be checked? Requirements being: (1) check signature is valid, (2) check it's my signature, (3) old clients can still update when my certificate expires and I get a new one. Here's some background information / ideas from my research: I believe this could be broken into two steps: Verify that the signature is valid. I believe this should be easy using WinVerifyTrust as outlined in http://msdn.microsoft.com/en-us/library/aa382384(VS.85).aspx - I don't expect problems here. Verify that the signature corresponds to our company, and not another company. This seems to be a more difficult question to answer: One possibility is to check some of the strings in the signature. Could be obtained via code at MS KB article #323809, but this article doesn't make recommendations on what fields should be checked for this type of application (or any other, for that matter). Question #1072540 also illustrates how to get some certificate info, but again doesn't recommend what fields to actually check. My concern is that the strings might not be the best check: what if another person is able to obtain a certificate with the same name, for example? Or if there's a valid reason for us to change the strings in the future? The person at question #2008519 has a very similar requirement. His need for a "TrustedByUs" function is identical to mine. However, he goes about doing the check by comparing public keys. While this would work in the short-term, it seems like it won't work for an automatic update feature. This is because code signing certificates are only valid for 2 - 3 years max. Therefore, in the future, when we buy a new certificate in 2 years, the old clients wouldn't be able to update any more due to the change in public key.

    Read the article

  • Maven building for GoogleAppEngine, forced to include JDO libraries?

    - by James.Elsey
    Hi, I'm trying to build my application for GoogleAppEngine using maven. I've added the following to my pom which should "enhance" my classes after building, as suggested on the DataNucleus documentation <plugin> <groupId>org.datanucleus</groupId> <artifactId>maven-datanucleus-plugin</artifactId> <version>1.1.4</version> <configuration> <log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration> <verbose>true</verbose> </configuration> <executions> <execution> <phase>process-classes</phase> <goals> <goal>enhance</goal> </goals> </execution> </executions> </plugin> According to the documentation on GoogleAppEngine, you have the choice to use JDO or JPA, I've chosen to use JPA since I have used it in the past. When I try to build my project (before I upload to GAE) using mvn clean package I get the following output [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to resolve artifact. Missing: ---------- 1) javax.jdo:jdo2-api:jar:2.3-ec Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=javax.jdo -DartifactId=jdo2-api -Dversion=2.3-ec -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=javax.jdo -DartifactId=jdo2-api -Dversion=2.3-ec -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] Path to dependency: 1) org.datanucleus:maven-datanucleus-plugin:maven-plugin:1.1.4 2) javax.jdo:jdo2-api:jar:2.3-ec ---------- 1 required artifact is missing. for artifact: org.datanucleus:maven-datanucleus-plugin:maven-plugin:1.1.4 from the specified remote repositories: __jpp_repo__ (file:///usr/share/maven2/repository), DN_M2_Repo (http://www.datanucleus.org/downloads/maven2/), central (http://repo1.maven.org/maven2) [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3 seconds [INFO] Finished at: Sat Apr 03 16:02:39 BST 2010 [INFO] Final Memory: 31M/258M [INFO] ------------------------------------------------------------------------ Any ideas why I should get such an error? I've searched through my entire source code and I'm not referencing JDO anywhere, so unless the app engine libraries require it, I'm not sure why I get this message.

    Read the article

  • How to synchronize SQL Server 2008 database with SQL Server 2005 database?

    - by James McFarland
    I am using VS 2008 Team Suite and SQL Server 2008 in my development environment. I am deploying to a shared-host website with shared-host SQL Server 2005. I want to push changes from my development environment to my production host. I tried using Data | Schema Compare... and it reports to me that it does not support SQL Server 2008. What do people use for this (Besides Red-Gate tools - I use those at my day job, and they rock...this is a volunteer thing for my son's school)? I am looking for something very inexpensive if not free.

    Read the article

  • RSS feed created with PHP only shows the title in the feed reader

    - by James Simpson
    I am using the following PHP code to generate the XML for an RSS feed, but it doesn't seem to be working correctly. No short description is displayed in the feed reader, all I see is the title of the article. Also, all of the articles say they were published at the same time. This is the first time I have tried to setup an RSS feed, so I'm sure I've made several stupid mistakes. $result = mysql_query("SELECT * FROM blog ORDER BY id DESC LIMIT 10"); $date = date(DATE_RFC822); header('Content-type: text/xml'); echo ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); echo ("<rss version=\"2.0\">\n"); echo ("<channel>\n"); echo ("<lastBuildDate>$date</lastBuildDate>\n"); echo ("<pubDate>$date</pubDate>\n"); echo ("<title>my website name</title>\n"); echo ("<description><![CDATA[the description]]></description>\n"); echo ("<link>http://my-domain.com</link>\n"); echo ("<language>en</language>\n"); $ch=100; while ($a = mysql_fetch_array($result)) { $headline = htmlentities(stripslashes($a['subject'])); $posturl = $a[perm_link]; $content = $a['post']; $date = date(DATE_RFC822, $a['posted']); echo ("<item>\n"); echo ("<title>$headline</title>\n"); echo ("<link>$posturl</link>\n"); echo ("<description><![CDATA[$content]]></description>\n"); echo ("<guid isPermaLink=\"true\">$posturl</guid>\n"); echo ("<pubDate>$date2</pubDate>\n"); echo ("</item>\n"); } echo ("</channel>\n"); echo ("</rss>\n");

    Read the article

  • Allowing optional variables with Rewrite Cond

    - by James Doc
    I currently have the following code: RewriteCond %{REQUEST_URI} !assets/ RewriteCond %{REQUEST_URI} !uploads/ RewriteRule ^([a-z|0-9_&;=-]+)/([a-z|0-9_&;=-]+) index.php?method=$1&value=$2 [NC,L] This works perfectly to redirect 'page/home' to 'index.php?method=page&value=home. However at some points I need to add an extra variable or two to the query string such as 'admin/useraccounts/mod/2'. When I simply tack on bits to the end of the rewrite rule it works if all the variables are 'page/home/rand/rand' or 'admin/useraccounts/mod/2', but if anything is missing such as 'page/home' I get a 404. What am I doing wrong? Many thanks.

    Read the article

  • URL routing documentation question.

    - by James Evans
    I'm reading about URL routing at How to: Define Routes for Web Forms Applications and there's something in the example I don't understand. If you look at the example provided below, routes.MapPageRoute("", "SalesReport/{locale}/{year}/{*queryvalues}", "~/sales.aspx"); specifically at "SalesReport/{locale}/{year}/{*queryvalues}" Why does queryvalues have an asterisk in front of it and locale and year don't?

    Read the article

  • Troubleshooting ASP .NET Application on Shared Hosting

    - by James
    Hi, My company has a CRM site hosted externally on a shared server and recently it has been very problematic. Users are being logged out randomly, sometimes only seconds after logging in. We are also getting viewstate validation errors at times. Both problems seem to occur more often when there are two or more people logged in at the same time, but I can't really see any particular pattern. I am using log4net to track the application state and from what I can tell it seems that the application is frequently restarting, causing all sorts of issues. I can see log messages from the Application_Start event handler but there is not always a corresponding message from the Application_End event handler. There is also logging code in the Application_Error event handler but it is not catching anything at the time of the restart. These errors started to occur soon after we moved our site to this shared server, although I don't remember it being this bad at first. Any advice on how to track down these problems would be appreciated. The server is running Windows Server 2003 and IIS 6.0. Sadly I don't have access to the server other than through Parallels Plesk and it doesn't seem to have any useful diagnostic information.

    Read the article

  • Do you always use the same technologies/frameworks?

    - by James.Elsey
    When given a new task/challenge/application to build, do you always use the same framework, for example spring / struts? Or do you try something new that you haven't used before, such as GWT? What makes you return to the same technology stack? Is it good to be advanced at particular technologies, or to have a broad understanding?

    Read the article

  • Using SQLLite transactions I/O Error

    - by james.ingham
    I currently have a client / server setup where the client sends data to the server and then the server saves the data to a SQLite database file. To do this I am using transactions which works fine in windows 7 when I run around 30 clients (each client sending data back between 5 - 30 seconds). When using the same software in Windows XP, I can get/set data multiple times with no problems until I run around 20 clients I start to get Windows Delayed wrote failed errors: This fires an exception on the server: I'm assuming this is either something to do with XP or a hardware issue on the machine i'm running XP. Does anyone have any advice to avoid this? Or if I should just catch the exception and retry saving the data? Thanks

    Read the article

  • Loading external pngs into an AS2 swf that is loaded into an AS3 swf wrapper

    - by James Fassett
    I have a Wrapper SWF that loads a series of AS2 movies. Each AS2 movie loads a series of .png files. AS3_wrapper.swf |-> AS2_1.swf |-> image_1.png |-> image_2.png |-> AS2_2.swf |-> image_1.png |-> image_2.png Inside of the AS2 I listen for the load of the pngs using onLoadInit and update my UI. This works fine for the first AS2 swf. But when I load the second AS2 swf the onLoadInit isn't triggered for the pngs. My guess is that the images are in a cache or something like that. I put a random string on the end of the request to try and avoid the cache but that doesn't seem to work. The code in the as2 looks roughly like this: var flagLoader:MovieClipLoader = new MovieClipLoader(); var listener:Object = new Object(); listener.onLoadInit = Delegate.create(this, handleImageLoad); flagLoader.addListener(listener); var row:MovieClip = frame1["row" + (numLoaded + 1)]; flagLoader.loadClip(predictionData[numLoaded].flag + "?r="+Math.random(), row.flag); I'm making sure to load only one image at a time (I've read anecdotal evidence loading more than one thing at a time can confuse the MovieClipLoader). For the first as2 file everything works great. When I load the second as2 file the handleImageLoad never gets called. Update: Even more perplexing is if I reload the first AS2 movie (after the second AS2 movie fails to load the images) the first AS2 movie loads the images again fine. Update 2: After trying to change from using a MovieClipLoader to polling (as was helpfully suggested) I have found some more evidence that is relevant. When I load the first AS2 files and trace from the top level clip it prints out _root. The second AS2 file when loaded traces the same _root. This lead me to check if they were clashing on names and they are. Both have a child called frame. The first one, when I trace it comes out as _root.frame as expected. The second AS2 file traces _level0.instance3.instance118.instance111.frame. I'm guessing this is related to the problem. Flash is keeping the _root of the two files the same but it is changing the locations of their children (for subsequently loaded files that have children with the same names). So either the onLoad is going to the wrong clip or the events about it loading are.

    Read the article

  • Number Algorithm

    - by James
    I've been struggling to wrap my head around this for some reason. I have 15 bits that represent a number. The bits must match a pattern. The pattern is defined in the way the bits start out: they are in the most flush-right representation of that pattern. So say the pattern is 1 4 1. The bits will be: 000000010111101 So the general rule is, take each number in the pattern, create that many bits (1, 4 or 1 in this case) and then have at least one space separating them. So if it's 1 2 6 1 (it will be random): 001011011111101 Starting with the flush-right version, I want to generate every single possible number that meets that pattern. The # of bits will be stored in a variable. So for a simple case, assume it's 5 bits and the initial bit pattern is: 00101. I want to generate: 00101 01001 01010 10001 10010 10100 I'm trying to do this in Objective-C, but anything resembling C would be fine. I just can't seem to come up with a good recursive algorithm for this. It makes sense in the above example, but when I start getting into 12431 and having to keep track of everything it breaks down.

    Read the article

  • Play RTSP/MMS/Http live video feeds in WPF

    - by James Cadd
    I'd like to pull a live video feed into WPF but the MediaElement doesn't appear to support these protocols. An example video stream is here (BP oil leak live feed): http://mfile.akamai.com/97892/live/reflector:45683.asx?bkup=45684 Are there any solutions for playing live streaming formats in WPF?

    Read the article

  • GoogleAppEngine : ClassNotFoundException : javax.jdo.metadata.ComponentMetadata

    - by James.Elsey
    I'm trying to deploy my application to a locally running GoogleAppEngine development server, but I'm getting the following stack trace when I start the server Apr 23, 2010 9:03:33 PM com.google.apphosting.utils.jetty.JettyLogger warn WARNING: Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientDao' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/jdo/metadata/ComponentMetadata: java.lang.ClassNotFoundException: javax.jdo.metadata.ComponentMetadata at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:319) at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:151) at java.lang.ClassLoader.loadClass(ClassLoader.java:264) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at javax.jdo.JDOHelper$18.run(JDOHelper.java:2009) at javax.jdo.JDOHelper$18.run(JDOHelper.java:2007) at java.security.AccessController.doPrivileged(Native Method) at javax.jdo.JDOHelper.forName(JDOHelper.java:2006) at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:1155) at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:803) at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:698) at org.datanucleus.jpa.EntityManagerFactoryImpl.initialisePMF(EntityManagerFactoryImpl.java:482) at org.datanucleus.jpa.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:255) at org.datanucleus.store.appengine.jpa.DatastoreEntityManagerFactory.<init>(DatastoreEntityManagerFactory.java:68) at org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider.createContainerEntityManagerFactory(DatastorePersistenceProvider.java:45) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:224) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:291) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:530) at org.mortbay.jetty.servlet.Context.startContext(Context.java:135) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) at org.mortbay.jetty.Server.doStart(Server.java:217) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:181) at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:116) at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:217) at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:162) at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48) at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:113) at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89) The server is running at http://localhost:1234/ I'm a little confused over this, since I have the same application running locally on GlassFish/MySQL. All I have done is to swap in the relevant jar files, and change the persistence.xml. My applicationContext.xml looks as follows : <context:annotation-config/> <bean id="clientDao" class="com.jameselsey.salestracker.dao.jpa.JpaDaoClient"> <property name="entityManagerFactory" ref="entityManagerFactory"/> </bean> <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"/> <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="entityManagerFactory" /> </bean> <bean id="org.springframework.context.annotation.internalPersistenceAnnotationProcessor" class="com.jameselsey.salestracker.util.GaeFixInternalPersistenceAnnotationProcessor" /> <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/> <tx:annotation-driven/> <bean id="clientService" class="com.jameselsey.salestracker.service.ClientService"/> </beans> My JPA DAO looks like this public class JpaDao extends JpaDaoSupport { protected <T> List<T> findAll(Class<T> clazz) { return getJpaTemplate().find("select c from " + clazz.getName() + " c"); } protected <T> T findOne(String jpql, Map params) { List<T> results = getJpaTemplate().findByNamedParams(jpql, params); if(results.isEmpty()) { return null; } if(results.size() > 1) { throw new IncorrectResultSizeDataAccessException(1, results.size()); } return results.get(0); } } And an example implemented method looks like this : @Override public Client getClientById(Integer clientId) { String jpql = "SELECT c " + "FROM com.jameselsey.salestracker.domain.Client c " + "WHERE c.id = " + clientId; return (Client) getJpaTemplate().find(jpql).get(0); } Like I say, this works ok on Glassfish/MySQL, is it possible this error could be a red herring to something else?

    Read the article

  • Using target-specific variable in makefile

    - by James Johnston
    I have the following makefile: OUTPUTDIR = build all: v12target v13target v12target: INTDIR = v12 v12target: DoV12.avrcommontargets v13target: INTDIR = v13 v13target: DoV13.avrcommontargets %.avrcommontargets: $(OUTPUTDIR)/%.elf @true $(OUTPUTDIR)/%.elf: $(OUTPUTDIR)/$(INTDIR)/main.o @echo TODO build ELF file from object file: destination $@, source $^ @echo Compiled elf file for $(INTDIR) > $@ $(OUTPUTDIR)/$(INTDIR)/%.o: %.c @echo TODO call GCC to compile C file: destination $@, source $< @echo Compiled object file for $<, revision $(INTDIR) > $@ $(shell rm -rf $(OUTPUTDIR)) $(shell mkdir -p $(OUTPUTDIR)/v12 2> /dev/null) $(shell mkdir -p $(OUTPUTDIR)/v13 2> /dev/null) .SECONDARY: The idea is that there are several different code configurations that need to be compiled from the same source code. The "all" target depends on v12target and v13 target, which set a number of variables for that particular build. It also depends on an "avrcommontargets" pattern, which defines how to actually do the compiling. avrcommontargets then depends on the ELF file, which in turn depends on object files, which are built from the C source code. Each compiled C file results in an object file (*.o). Since each configuration (v12, v13, etc.) results in a different output, the C file needs to be built several times with the output placed in different subdirectories. For example, "build/v12/main.o", "build/v13/main.o", etc. Sample output: TODO call GCC to compile C file: destination build//main.o, source main.c TODO build ELF file from object file: destination build/DoV12.elf, source build//main.o TODO build ELF file from object file: destination build/DoV13.elf, source build//main.o The problem is that the object file isn't going into the correct subdirectory. For example, "build//main.o" instead of "build/v12/main.o". That then prevents the main.o from being correctly rebuilt to generate the v13 version of main.o. I'm guessing the issue is that $(INTDIR) is a target specific variable, and perhaps this can't be used in the pattern targets I defined for %.elf and %.o. The correct output would be: TODO call GCC to compile C file: destination build/v12/main.o, source main.c TODO build ELF file from object file: destination build/DoV12.elf, source build/v12/main.o TODO call GCC to compile C file: destination build/v13/main.o, source main.c TODO build ELF file from object file: destination build/DoV13.elf, source build/v13/main.o What do I need to do to adjust this makefile so that it generates the correct output?

    Read the article

  • Do programmers need a union?

    - by James A. Rosen
    In light of the acrid responses to the intellectual property clause discussed in my previous question, I have to ask: why don't we have a programmers' union? There are many issues we face as employees, and we have very little ability to organize and negotiate. Could we band together with the writers', directors', or musicians' guilds, or are our needs unique? Has anyone ever tried to start one? If so, why did it fail? (Or, alternatively, why have I never heard of it, despite its success?) later: Keith has my idea basically right. I would also imagine the union being involved in many other topics, including: legal liability for others' use/misuse of our work, especially unintended uses evaluating the quality of computer science and software engineering higher education programs -- unlike many other engineering disciplines, we are not required to be certified on receiving our Bachelor's degrees evangelism and outreach -- especially to elementary school students certification -- not doing it, but working with the companies like ISC(2) and others to make certifications meaningful and useful continuing education -- similar to previous conferences -- maintain a go-to list of organizers and other resources our members can use I would see it less so as a traditional trade union, with little emphasis on: pay -- we tend to command fairly good salaries outsourcing and free trade -- most of use tend to be pretty free-market oriented working conditions -- we're the only industry with Aeron chairs being considered anything like "standard"

    Read the article

  • Wordpress Navigation

    - by James Pellerano
    I am working on a Wordpress Theme, I need to work on the navigation, I am having a little trouble creating it. The navigation I am looking for looks like this: www.neu.edu/humanities. I have gotten this far: if (is_front_page()) { wp_list_pages('title_li=&exclude=12&depth=1'); } else { // display the subpages of the current page while // display all of the main pages and all of the // and display the parent pages while on the subpages }

    Read the article

  • Select random row from MySQL (with probability)

    - by James Simpson
    I have a MySQL table that has a row called cur_odds which is a percent number with the percent probability that that row will get selected. How do I make a query that will actually select the rows in approximately that frequency when you run through 100 queries for example? I tried the following, but a row that has a probability of 0.35 ends up getting selected around 60-70% of the time. SELECT * FROM table ORDER BY RAND()*cur_odds DESC

    Read the article

  • New to web development - backend questions

    - by James
    I'm new to web development although I'm confident in the roadmap for the front-end. I need direction on two things: Basic architecture Back-end technologies For architecture, what do I need to get started? From what I know, its: Get a domain name registered (godaddy?) Find a web host ??? anything else? or start developing the site? I don't think its that easy, there must be something I'm missing, right? For the back-end technologies, I have application development experience with Java and Python, but how likely is it to find a back-end hosting site that supports these languages over PHP? Is PHP a better choice? If I stick with what I know for the back-end, am I sabotaging myself later on? If I need help, how is the market for a python/java developer vs. a php developer? What do I need to know about databases? I have some basic SQL experience. Do hosting sites have limitations on the type of databases or bandwidth I need to worry about? I'm working through some of the common sites: StackOverflow, Sitepoint forums, Google, etc...are there other resources I should use?

    Read the article

  • Getting "value is not defined" while inheriting a type

    - by James Black
    I can't see what I am doing wrong, as the files are in the correct order. In this case it is: BaseDAO.fs CreateDatabase.fs They are in the same namespace, but even when I had them in different modules, and opened the module in CreateDatabase the same error. The error is: Error 1 The value or constructor 'execNonQuery' is not defined I am trying to inherit BaseDAO and use a member that will be common to several files, and I don't see why I get the error above. namespace RestaurantServiceDAO open MySql.Data.MySqlClient type BaseDAO() = let connString = @"Server=localhost;Database=mysql;Uid=root;Pwd=$$$$;" let conn = new MySqlConnection(connString) member self.execNonQuery(sqlStr) = conn.Open() let comm = new MySqlCommand(sqlStr, conn, CommandTimeout = 10) comm.ExecuteNonQuery |> ignore comm.Dispose |> ignore The type that does inherit is here, and execNonQuery is not defined. namespace RestaurantServiceDAO open MySql.Data.MySqlClient type CreateDatabase() = inherit BaseDAO() let createRestaurantTable conn = execNonQuery "CREATE TABLE restaurant(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), cur_timestamp TIMESTAMP(8))"

    Read the article

  • storing/retrieving data for graph with long continuous stretches

    - by james
    i have a large 2-dimensional data set which i would like to graph. the graph is displayed in a browser and the data is retrieved via ajax. long stretches of this graph will be continuous - e.g., for x=0 through x=1000, y=9, then for x=1001 through x=1100, y=80, etc. the approach i'm considering is to send (from the server) and store (in the browser) only the points where the data changes. so for the example above, i would say data[0] = 9, then data[1001] = 80. then given x=999 for example, retrieving data[999] would actually look up data[0]. the problem that arises is finding a dictionary-like data structure which behaves like this. the approach i'm considering is to store the data in a traditional dictionary object, then also maintain a sorted array of key for that object. when given x=999, it would look at the mid-point of this array, determine whether the nearest lower key is left or right of that midpoint, then repeat with the correct subsection, etc.. does anyone have thoughts on this problem/approach?

    Read the article

  • C# - How do find a string within a string even if it spans across whitespace?

    - by James Heaney
    I want to be able to find and highlight a string within a string BUT I no not want to remove the space. So if my original string is : There are 12 monkeys I want to find '12 mon' and highlight those characters ending up with : There are < font color='red' 12 mon< /font keys BUT I also want the same result if I search for '12mon' (no space this time) This has really bent my mind! I'm sure it can be done with Regex.

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >