Search Results

Search found 114 results on 5 pages for 'damian rees'.

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

  • how to prevent white spaces in a regular expression regex validation

    - by Rees
    i am completely new to regular expressions and am trying to create a regular expression in flex for a validation. using a regular expression, i am going to validate that the user input does NOT contain any white-space and consists of only characters and digits... starting with digit. so far i have: expression="[A-Za-z][A-Za-z0-9]*" this correctly checks for user input to start with a character followed by a possible digit, but this does not check if there is white space...(in my tests if user input has a space this input will pass through validation - this is not desired) can someone tell me how i can modify this expression to ensure that user input with whitespace is flagged as invalid?

    Read the article

  • possible to create sql query with table wildcards?

    - by Rees
    this is probably a simple question, but i have been unable to find a solution online, any help would be much appreciated. I'm trying to create an SQL query in PHP and would like to somehow apply a wild card to the TABLE filter... something perhaps like.... select * from %table%. However, I have only so far been able to see filters for column values not table names. as an example i would have tables such as: jan_table_1 feb_table_1 jan_table_2 feb_table_2 and would want to say, select only tables with a "jan" prefix... or "1" suffix. Is there a quick and easy solution to this that I have not seen? Thanks in advance!

    Read the article

  • how to change font color and size within single label component in flex

    - by Rees
    i'm trying to create a unordered list in Flex. My issue is that within each line, i want the word NEW to be a different font color and different font size from the rest of the label text. I am unsure of how to do this INLINE within the label component. Any thoughts anyone? <s:VGroup fontSize="15" color="#ffffff"> <s:Label text="\u2022 NEW Invite your friends!" /> <s:Label text="\u2022 NEW Features coming soon!" /> <s:Label text="\u2022 NEW Invite your friends!" /> </s:VGroup>

    Read the article

  • flex data provider not working if XML has single node value or less

    - by Rees
    hello, i get this error when i retrieve an XML that only has 1 node (no repeating nodes) and i try to store in an ArrayCollection. -When I have MORE than 1 "name" nodes...i do NOT get an error. My test show that XMLListCollection does NOT work either. TypeError: Error #1034: Type Coercion failed: cannot convert "XXXXXX" to mx.collections.ArrayCollection. this error occurs as the line of code: myList= e.result.list.name; Why can't ArrayCollection work with a single node? I'm using this ArrayCollection as a dataprovider for a Component -is there an alternative I can use that will take BOTH single and repeating nodes as well as work as a dataprovider? Thanks in advance! code: [Bindable] private var myList:ArrayCollection= new ArrayCollection(); private function getList(e:Event):void{ var getStudyLoungesService:HTTPService = new HTTPService(); getStuffService.url = "website.com/asdf.php"; getStuffService.addEventListener(ResultEvent.RESULT, onGetList); getStuffService.send(); } private function onGetList(e:ResultEvent):void{ myList= e.result.list.name; }

    Read the article

  • retrieving google chrome booksmarks after uninstall

    - by Rees
    Hello, I had recently (and unfortunately) uninstalled the google chrome browser from my computer -while completely forgetting about the dozens of bookmarks I had stored on it. Is there a method/directory to retrieve these chrome bookmarks after having already uninstalled??? Please do help! would be a lifesaver!

    Read the article

  • Dismiss android preferences dialog on Keyboard ACTION_DONE press

    - by Damian
    I would like to be able to close the editpreference dialog (as shown here http://twitpic.com/18ttdp) by pressing the 'Done' button on the keyboard. Currently, pressing 'Done' just dismisses the keyboard but leaves the dialog. In other parts of my application I use code similar to the following to intercept the 'Done' key press and execute actions in my activity: text.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE) { //do stuff here return true; } return false; } }); However, I am unsure of how to do achieve this same effect in my preference activity or layout xml.

    Read the article

  • grails run-war connects to mysql but grails run-war doesn't

    - by damian
    Hi, I have a unexpected problem. I had create a war with grails war. Then I had deployed in Tomcat. For my surprise the crud works fine but I don't know what persistence is using. So I did this test: Compare grails prod run-app with grails prod run-war. The first works fine, and does conect with the mysql database. The other don't. This is my DataSource.groovy: dataSource { pooled = true driverClassName = "com.mysql.jdbc.Driver" username = "grails" password = "mysqlgrails" } hibernate { cache.use_second_level_cache=false cache.use_query_cache=false cache.provider_class='net.sf.ehcache.hibernate.EhCacheProvider' } // environment specific settings environments { development { dataSource { dbCreate = "update" // one of 'create', 'create-drop','update' url = "jdbc:mysql://some-key.amazonaws.com/MyDB" } } test { dataSource { dbCreate = "update" // one of 'create', 'create-drop','update' url = "jdbc:mysql://some-key.amazonaws.com/MyDB" } } production { dataSource { dbCreate = "update" url = "jdbc:mysql://some-key.amazonaws.com/MyDB" } } } Also I extract the war to see if I could find some data source configuration file without success. More info: Grails version: 1.2.1 JVM version: 1.6.0_17 Also I think this question it's similar, but doesn't have a awnser.

    Read the article

  • Web-design / UI advice

    - by Damian
    I'm working on a website on a Fmylife style. Now the homepage is the page showing the list of the latest posts. But I think there is a problem with that: The most "interesting" page is the one showing the top posts of the last days, but that page has very few visits compared to the main page. I suppose that's only because the main page is the "default" one. So, I've been thinking of making a home page that shows no posts (only one at the top of the page) but 4 big buttons showing the visitors what are the options to browse the content. But I'm also afraid that most users will not click any option and leave the site having seen no posts. So I don't know what to do. Obviously I have no idea of what will be good from a usability/efficiency point of view. Maybe a mix of the two options will be the best, but I don't know how to mix them. Any advice or idea will be greatly appreciated. The current home page looks like this: http://soquestion.latest.secretsapp.appspot.com/latest The new home page would look like this: http://soquestion.latest.secretsapp.appspot.com/

    Read the article

  • Webservice returns java.lang.reflect.InvocationTargetException

    - by Damian
    Hi, I am receiving the above message when making a request to a java webservice. We originally created a Java Console application and manually submitted an xml file. When running this as a Java Application the response is successfully created and displayed by using System.out.println. We are creating the web service by selecting the java file that contains the methods and choosing "create webservice" specifying the dynamic project that the webservice is to be created in and the methods to be exposed. What the application is doing is taking an xml file and unmarshalling this to an object using: public static Object unmarshalToObject(Class classToBeBound, String xmlRequest) { Object obj = new Object(); try { JAXBContext jc = JAXBContext.newInstance(classToBeBound); Unmarshaller um = jc.createUnmarshaller(); obj = um.unmarshal(new StringReader(xmlRequest)); } catch (Exception e) { e.printStackTrace() } return obj; } Some processing is carried out on the file and then an object is marshalled to xml as follows: public static String marshalToXML(Object data) { StringWriter sw = new StringWriter(); try { logger.info("Create new Marshall"); JAXBContext jc = JAXBContext.newInstance("ContextPathName"); logger.info("Marshalled to xmlObjects"); Marshaller marshaller = jc.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true); marshaller.marshal(data, sw); } catch (Exception e) { logException(logger, e); } return sw.toString(); } The following is the line of code that seems to be causing an issue as the logger displays the message prior to this: JAXBContext jc = JAXBContext.newInstance("ContextPathName"); The webservice never gets to the next line - the following is the body of the SOAP message: <soapenv:Fault> <faultcode>soapenv:Server.userException</faultcode> <faultstring>java.lang.reflect.InvocationTargetException</faultstring> <detail> <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">servername</ns1:hostname> </detail> </soapenv:Fault> I have added Try/Catch around this section of code even as far as looking for JAXBExceptions but this does not seem to catch anything - nor does the general exception. This issue does not occur when running the console application. The build path for this includes the following contents of sun\jwsdp-2.0\jaxb\lib: jaxb-api.jar jsr173_1.0_api.jar jaxb-impl.jar I have added these to the lib folder in the WEB-INF file of the dynamic project. I am running the webservice in JBuilder 2008 R2 and using SOAPUI to submit the request - this points to the wsdl generated when creating the webservice. If anyone has any help or ideas on how to solve this could they please reply - thanks for taking the time to read this post!

    Read the article

  • grails prod run-app connects to mysql but grails prod run-war doesn't

    - by damian
    Hi, I have a unexpected problem. I had create a war with grails war. Then I had deployed in Tomcat. For my surprise the crud works fine but I don't know what persistence is using. So I did this test: Compare grails prod run-app with grails prod run-war. The first works fine, and does conect with the mysql database. The other don't. This is my DataSource.groovy: dataSource { pooled = true driverClassName = "com.mysql.jdbc.Driver" username = "grails" password = "mysqlgrails" } hibernate { cache.use_second_level_cache=false cache.use_query_cache=false cache.provider_class='net.sf.ehcache.hibernate.EhCacheProvider' } // environment specific settings environments { development { dataSource { dbCreate = "update" // one of 'create', 'create-drop','update' url = "jdbc:mysql://some-key.amazonaws.com/MyDB" } } test { dataSource { dbCreate = "update" // one of 'create', 'create-drop','update' url = "jdbc:mysql://some-key.amazonaws.com/MyDB" } } production { dataSource { dbCreate = "update" url = "jdbc:mysql://some-key.amazonaws.com/MyDB" } } } Also I extract the war to see if I could find some data source configuration file without success. More info: Grails version: 1.2.1 JVM version: 1.6.0_17 Also I think this question it's similar, but doesn't have a awnser.

    Read the article

  • WiX Action Sequence

    - by Damian Vogel
    I was looking for list of actions and their sequence when running a WiX setup. Somehow the official website doesn't seem to provide any information. The basic problem is that I want to schedule my custom actions correctly. Typically I need to register a DLL with regsvr32.exe, and this can only be done once the files are copied to the harddrive. However the custom action <Custom Action="RegisterShellExt" After="InstallFiles"> failed with the error message "file not found". What I've done then is analizing the log of my MSI with WiX Edit, and I've found that the Action InstallFiles exists more than once. And effectively the files are written only the second time it appears. So I changed my custom action to the following : <Custom Action="RegisterShellExt" Before="InstallFinalize"> Here is the sequence I've extracted from the logs of my MSI: Action start 15:16:49: INSTALL. Action start 15:16:49: PrepareDlg. Action start 15:16:49: AppSearch. Action start 15:16:49: LaunchConditions. Action start 15:16:49: ValidateProductID. Action start 15:16:49: DIRCA_NEWRETARGETABLEPROPERTY1.5D429292039C46FCA3253E37B4DA262A. Action start 15:16:50: CostInitialize. Action start 15:16:50: FileCost. Action start 15:16:50: CostFinalize. Action start 15:16:50: WelcomeDlg. Action 15:16:51: LicenseAgreementDlg. Dialog created Action 15:16:53: CustomizeDlg. Dialog created Action 15:16:55: VerifyReadyDlg. Dialog created Action start 15:16:56: ProgressDlg. Action start 15:16:56: ExecuteAction. Action start 15:16:58: INSTALL. Action start 15:16:58: AppSearch. Action start 15:16:58: LaunchConditions. Action start 15:16:58: ValidateProductID. Action start 15:16:58: CostInitialize. Action start 15:16:59: FileCost. Action start 15:16:59: CostFinalize. Action start 15:16:59: InstallValidate. Action start 15:17:00: InstallInitialize. Action start 15:17:08: ProcessComponents. Action 15:17:09: GenerateScript. Generating script operations for action: Action ended 15:17:09: ProcessComponents. Return value 1. Action start 15:17:09: UnpublishFeatures. Action start 15:17:09: RemoveShortcuts. Action start 15:17:09: RemoveFiles. Action start 15:17:09: InstallFiles. Action start 15:17:10: CreateShortcuts. Action start 15:17:10: RegisterUser. Action start 15:17:10: RegisterProduct. Action start 15:17:10: PublishFeatures. Action start 15:17:10: PublishProduct. Action start 15:17:10: ConfigureInstaller. Action start 15:17:10: InstallFinalize. Action 15:17:10: ProcessComponents. Updating component registration Action 15:17:12: InstallFiles. Copying new files Action 15:17:21: CreateShortcuts. Creating shortcuts Action 15:17:21: RegisterProduct. Registering product Action 15:17:23: ConfigureInstaller. [[note: CustomAction]] Action 15:17:22: PublishFeatures. Publishing Product Features Begin CustomAction 'ConfigureInstaller' Action 15:17:28: RollbackCleanup. Removing backup files Action ended 15:17:28: InstallFinalize. Return value 1. Action start 15:17:28: RegisterShellExt. [[note: CustomAction]] Action ended 15:17:33: INSTALL. Return value 1. Action start 15:17:35: ExitDialog. Does anyone know an official listing?

    Read the article

  • Pros/Cons of document based database vs relational database

    - by damian
    I've been trying to see if I can accomplish some requirements with a document based database, in this case CouchDB. Two generic requirements: CRUD of entities with some fields which have unique index on it ecommerce web app like eBay (better description here). And I'm begining to think that a Document-based database isn't the best choice to address these requirements. Furthermore, I can´t imagine a use for a Document based database (maybe my imagination is too little). Can you explain me if I am asking pears to an elm when I try to use a Document based database for this requirements?

    Read the article

  • Is it possible to run Visual Studio Database Edition schema migrations from the command line?

    - by Damian Powell
    Visual Studio 2008 Database Edition (Data Dude) has the ability to perform schema comparisons between databases and generate a script which migrates from one database to the other. Is it possible to perform this comparison and generate the migration script from the command line? If so, what are the command line tools, and are the same tools used in equivalent versions of Visual Studio 2010?

    Read the article

  • Object database for website

    - by Damian
    I was planning to use db4o for a website. It's a microblog site with small posts and comments developed in java. The thing is I contacted db4o support asking if db4o would be suitable for a website, and they answered me that only for websites with low concurrency. That means with few requests? So, now I think db4o will not be a good choice. Do you know if there is any object database for java suitable for a website?

    Read the article

  • SHA function issues

    - by Damian James
    I have this php code from my login.php if (isset($_POST['logIn'])) { $errmsg = ""; $logname = mysqli_real_escape_string($dbc, trim($_POST['usernameIn'])); $logpassword = mysqli_real_escape_string($dbc, trim($_POST['passwordIn'])); $query = "SELECT user_id, username FROM members WHERE username = '$logname' AND password = SHA('$logpassword')"; $data = mysqli_query($dbc, $query); if (mysqli_num_rows($data) == 1) { $row = mysqli_fetch_array($data); setcookie('user_id', $row['user_id'], time() + (60 * 60 * 24 * 30)); //expires after 30 days setcookie('username', $row['username'], time() + (60 * 60 * 24 * 30)); $home = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/index.php'; header('Location: ' . $home); } else { $errmsg = '<p class="errormsg">Username or password is incorrect.</p>'; } } And for some reason, it always ends up setting $errmsg in the else statement. I am sure that I'm entering information (username,password) that is correct and exists in the database. I insert my values (from a signup script) using this query: $query = "INSERT INTO members (username, password, email) VALUES ('$username', SHA('$password'), '$email')"; Anyone see the problem with this script? Thanks!

    Read the article

  • Challenge: Neater way of currying or partially applying C#4's string.Join

    - by Damian Powell
    Background I recently read that .NET 4's System.String class has a new overload of the Join method. This new overload takes a separator, and an IEnumerable<T> which allows arbitrary collections to be joined into a single string without the need to convert to an intermediate string array. Cool! That means I can now do this: var evenNums = Enumerable.Range(1, 100) .Where(i => i%2 == 0); var list = string.Join(",",evenNums); ...instead of this: var evenNums = Enumerable.Range(1, 100) .Where(i => i%2 == 0) .Select(i => i.ToString()) .ToArray(); var list = string.Join(",", evenNums); ...thus saving on a conversion of every item to a string, and then the allocation of an array. The Problem However, being a fan of the functional style of programming in general, and method chaining in C# in particular, I would prefer to be able to write something like this: var list = Enumerable.Range(1, 100) .Where(i => i%2 == 0) .string.Join(","); This is not legal C# though. The closest I've managed to get is this: var list = Enumerable.Range(1, 100) .Where(i => i%2 == 0) .ApplyTo( Functional.Curry<string, IEnumerable<object>, string> (string.Join)(",") ); ...using the following extension methods: public static class Functional { public static TRslt ApplyTo<TArg, TRslt>(this TArg arg, Func<TArg, TRslt> func) { return func(arg); } public static Func<T1, Func<T2, TResult>> Curry<T1, T2, TResult>(this Func<T1, T2, TResult> func) { Func<Func<T1, T2, TResult>, Func<T1, Func<T2, TResult>>> curried = f => x => y => f(x, y); return curried(func); } } This is quite verbose, requires explicit definition of the parameters and return type of the string.Join overload I want to use, and relies upon C#4's variance features because we are defining one of the arguments as IEnumerable rather than IEnumerable. The Challenge Can you find a neater way of achieving this using the method-chaining style of programming?

    Read the article

  • Why can't I set a cookie and redirect?

    - by Damian
    I´m having a problem setting a cookie and doing a 302 redirect In chrome the cookie is not being set (I haven't tested safari), in other browsers I was having the same problem until I added Path=/ to the cookie an now it works. This is how the header looks; the status is 302 Found Content-Type text/html; charset=iso-8859-1 Expires Thu, 01 Jan 1970 00:00:00 GMT Set-Cookie alasca-flash=error-Message<Required<error-Name<Required<error-Sex<Required<error-Age<Required<;Path=/ Location /messages/sdf Content-Length 0 Server Jetty(6.1.x) Any idea on why the cookie is not set? Or any workaround? Thanks!

    Read the article

  • How to shutdown the UDC (usage data collection) from eclipse

    - by damian
    I want to shutdown the UDC. It's very heavy for my pc. I already uncheck the "Enable Capture" checkbox but I have the feeling that it stay enable in the background. It constantly ask me the user and password of the proxy. I do not want an eclipse always trying to connect to internet and doing background procesing that I don't need.

    Read the article

  • grails scaffolding broken

    - by damian
    Grails scaffoldin does not work in my grails application. When I go from the main page to the specific controller page it output something like this: Error 500: Servlet: default URI: /myapp/myDomain/list Exception Message: Tag [sortableColumn] is missing required attribute [title] or [titleKey] at /webTestDummyDomain/list:25 Caused by: Error processing GroovyPageView: Tag [sortableColumn] is missing required attribute [title] or [titleKey] at /myDomain/list:25 Class: /myDomain/list At Line: [25] Code Snippet: Code snippet empty. If I try to create a new app scaffold works perfectly. Additional data: Application Status * App version: 0.1 * Grails version: 1.2.2 * JVM version: 1.6.0_20 * Controllers: 11 * Domains: 10 * Services: 19 * Tag Libraries: 26 Installed Plugins * i18n - 1.2.2 * filters - 1.2.2 * logging - 1.2.2 * core - 1.2.2 * tomcat - 1.2.2 * webtest - 2.0.4 * functionalTest - 1.2.7 * yui - 2.7.0.1 * rest - 0.3 * jquery - 1.4.2.1 * bubbling - 2.1.2 * urlMappings - 1.2.2 * groovyPages - 1.2.2 * servlets - 1.2.2 * dataSource - 1.2.2 * controllers - 1.2.2 * codecs - 1.2.2 * jqueryUi - 1.8-SNAPSHOT * grailsUi - 1.2-SNAPSHOT * domainClass - 1.2.2 * mimeTypes - 1.2.2 * scaffolding - 1.2.2 * converters - 1.2.2 * hibernate - 1.2.2 * validation - 1.2.2 * services - 1.2.2 Can you give me any pointer?

    Read the article

  • Serial: write() throttling?

    - by damian
    Hi everyone, I'm working on a project sending serial data to control animation of LED lights, which need to stay in sync with a sound engine. There seems to be a large serial write buffer (OSX (POSIX) + FTDI chipset usb serial device), so without manually restricting the transmission rate, the animation system can get several seconds ahead of the serial transmission. Currently I'm manually restricting the serial write speed to the baudrate (8N1 = 10 bytes serial frame per 8 bytes data, 19200 bps serial - 1920 bytes per second max), but I am having a problem with the sound drifting out of sync over time - it starts fine, but after 10 minutes there's a noticeable (100ms+) lag between the sound and the lights. This is the code that's restricting the serial write speed (called once per animation frame, 'elapsed' is the duration of the current frame, 'baudrate' is the bps (19200)): void BufferedSerial::update( float elapsed ) { baud_timer += elapsed; if ( bytes_written > 1024 ) { // maintain baudrate float time_should_have_taken = (float(bytes_written)*10)/float(baudrate); float time_actually_took = baud_timer; // sleep if we have > 20ms lag between serial transmit and our write calls if ( time_should_have_taken-time_actually_took > 0.02f ) { float sleep_time = time_should_have_taken - time_actually_took; int sleep_time_us = sleep_time*1000.0f*1000.0f; //printf("BufferedSerial::update sleeping %i ms\n", sleep_time_us/1000 ); delayUs( sleep_time_us ); // subtract 128 bytes bytes_written -= 128; // subtract the time it should have taken to write 128 bytes baud_timer -= (float(128)*10)/float(baudrate); } } } Clearly there's something wrong, somewhere. A much better approach would be to be able to determine the number of bytes currently in the transmit queue, and try and keep that below a fixed threshold. Any advice appreciated.

    Read the article

  • Drawing text at an angle (e.g. upside down) in Android

    - by Damian
    I'm trying to build a custom clock view in Android. See image http://twitpic.com/1devk7 So far to draw the time and hour markers I have been using the Canvas.rotate method to get the desired effect. However, notice that it is difficult to interpret the numbers in the lower half of the clock (e.g. 6 or 9?) because of the angle in which they are drawn. When using drawText, is it possible to draw the text at 45/90/180 degrees so that all text appears upright when my onDraw method has finished?

    Read the article

  • Switching to a VPS

    - by Damian
    Well, I know absolutely nothing about the subject, so I really need help. I currently have a website running on google app-engine (Java) and I can't get it to what I want because of app engine's limitations (no full text search mainly). The traffic is low, never reached 15% of the free quota (around 1500 daily pageviews). I also have 3 sites in drupal hosted in a shared hosting service, and this is giving me problems, because the server speed is awful. The sites are VERY low trafic, but load times are bad, and I might need to add more sites for some clients, so this will only get worse. So, i'm planning to move all that to VPS. The question is, can I have 2 http servers running in the same VPS? because I will need Apache-php-drupal server and a java server (tomcat?). I have really no idea on this, so any tip will be very helpful to me. Thanks!

    Read the article

  • How to disable secret_token in Rails 3?

    - by Damian Nowak
    I have several separate Rails 2 applications which share the same cookie. I upgraded one the applications to Rails 3.2.15 now. Mandatory secret_token in Rails 3 makes it impossible to share the session with the Rails 2 apps. I am storing the session in Redis. What the visitor only gets in the cookie is a session ID. There's no need to encrypt it. Therefore, how to disable secret_token in Rails 3? A secret is required to generate an integrity hash for cookie session data. Use config.secret_token = "some secret phrase of at least 30 characters"in config/initializers/secret_token.rb

    Read the article

  • Single intent to let user take picture OR pick image from gallery in Android

    - by Damian
    I'm developing an app for Android 2.1 upwards. I want to enable my users to select a profile picture within my app (I'm not using the contacts framework). The ideal solution would be to fire an intent that enables the user to select an image from the gallery, but if an appropriate image is not available then use the camera to take a picture (or vice-versa i.e. allow user to take picture but if they know they already have a suitable image already, let them drop into the gallery and pick said image). Currently I can do one or the other but not both. If I go directly into camera mode using MediaStore.ACTION_IMAGE_CAPTURE then there is no option to drop into the gallery. If I go directly to the gallery using Intent.ACTION_PICK then I can pick an image but if I click the camera button (in top right hand corner of gallery) then a new camera intent is fired. So, any picture that is taken is not returned directly to my application. (Sure you can press the back button to drop back into the gallery and select image from there but this is an extra unnecessary step and is not at all intuitive). So is there a way to combine both or am I going to have to offer a menu to do one or the other from within my application? Seems like it would be a common use case...surely I'm missing something?

    Read the article

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