Search Results

Search found 14 results on 1 pages for 'davidyell'.

Page 1/1 | 1 

  • jQueryUI Slider handle not moving

    - by DavidYell
    I'm trying to implement a jQuery slider with increments. I've gone from, the actual project page, to a test page of the project with just the slider, to just the slider. In all cases I've been unable to get the handle to move. It also seems to have a width of 1px or similar. My code is as follows, <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>jQuery slider</title> <link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.8.custom.css" type="text/css" media="screen" charset="utf-8" /> <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.8.custom.min.js"></script> <script type="text/javascript"> $(function() { $("#slider").slider(); }); </script> </head> <body> <div id="slider"></div> </body> </html> I'm sure there is something very simple at fault here, but I really cannot see it for the life of me. The custom part of my download, was just clicking the 'select all components'.

    Read the article

  • Speeding up CakePHP

    - by DavidYell
    I've been a keen fan and user of CakePHP for about 2.5 years now, but the main bugbear that most fellow developers level at the framework is that it's slow, and the dispatch cycle takes too long to make it a viable solution for production environments. I'm hoping that this question will inspire people to share their tips, tricks and hacks for speeding up CakePHP performance. The blog post I most often refer to is here, http://www.pseudocoder.com/archives/8-ways-to-speed-up-cakephp-apps Which has great tips, but there must be more out there! So please feel free to share your thoughts on making this excellent framework that much more nimble!

    Read the article

  • PHP: Profiling code and strict environment ~ Improving my coding

    - by DavidYell
    I would like to update my local working environment to be stricter in an effort to improve my code. I know that my code is okay, but as with most things there is always room for improvement. I use XAMPP on my local machine, for simplicities sake Apache Friends XAMPP (Basic Package) version 1.7.2 So I've updated my php.ini : error_reporting to be E_ALL | E_STRICT to help with the code standard. I've also enabled the XDebug extension zend_extension = "C:\xampp\php\ext\php_xdebug.dll" which seems to be working, having tested some broken code and got the nice standard orange error notice. However, having read this question, http://stackoverflow.com/questions/133686/what-is-the-best-way-to-profile-php-code and enabled the profiler, I cannot seem to create a cachegrind file. Many of the guides that I've looked at seem to think you need to install XDebug in XAMPP which leads me to think they are out of date, as XDebug is bundled with XAMPP these days. So I would appreciate it if anyone can help point me in the right direction with both configuring XDebug to output grind files, and or just a great set of default settings for the XDebug config in XAMPP. Seems there is very little documentation to go on. If people have tips on integrating these tools with Netbeans, that would be awesomesauce. I'm happy to get suggestions on other things that I can do to help tighten up my php code, both syntactically and performance wise Thanks, and apologies for the rambling question(s)! Ninja edit I should menion that I'm using named vhosts as my Apache configuration, which I think is why running XDebug on port 9000 isn't working for me. I guess I'd need to edit my vhost to include port 9000

    Read the article

  • Git submodules not updating?

    - by DavidYell
    I have a project in which I've included some libraries as submodules. They work fine on the machine that you add them on, but when I get home and checkout the repo, I get the folders for the submodules but they are empty. .gitmodules Neon@Neon-PC /cygdrive/c/xampp/htdocs/learning-lithium $ cat .gitmodules [submodule "libraries/lithium"] path = libraries/lithium url = git://github.com/UnionOfRAD/lithium.git [submodule "app/webroot/css/elements"] path = app/webroot/css/elements url = https://github.com/dmitryf/elements.git [submodule "app/libraries/li3_markdown"] path = app/libraries/li3_markdown url = https://github.com/sandelius/li3_markdown.git [submodule "app/webroot/markitup"] path = app/webroot/markitup url = https://github.com/markitup/1.x.git Config and status commands Neon@Neon-PC /cygdrive/c/xampp/htdocs/learning-lithium $ git submodule -af14f48b419310935446176290e1f9dc641400e0 app/libraries/li3_markdown -ebdcd8ca09c874f5e2ef81ec198cc441f37a4f74 app/webroot/css/elements -328291e49a3c7e1fb76b3342f112734864836205 app/webroot/markitup -4980010526d05c556c496ff63951da31828c5943 libraries/lithium Neon@Neon-PC /cygdrive/c/xampp/htdocs/learning-lithium $ git submodule update Neon@Neon-PC /cygdrive/c/xampp/htdocs/learning-lithium $ git submodule status -af14f48b419310935446176290e1f9dc641400e0 app/libraries/li3_markdown -ebdcd8ca09c874f5e2ef81ec198cc441f37a4f74 app/webroot/css/elements -328291e49a3c7e1fb76b3342f112734864836205 app/webroot/markitup -4980010526d05c556c496ff63951da31828c5943 libraries/lithium I added these as you would normally with, git submodule add <repo> <path> git submodule init The submodules are hosted on Github and my repo is hosted on Bitbucket, although I'm not sure if this is relevant.

    Read the article

  • jQueryUI Modal confirmation dialog on form submission

    - by DavidYell
    I am trying to get a modal confirmation dialog working when a user submits a form. My approach, I thought logically, would be to catch the form submission. My code is as follows, $('#multi-dialog-confirm').dialog({ autoOpen: false, height: 200, modal: true, resizable: false, buttons: { 'Confirm': function(){ //$(this).dialog('close'); return true; }, 'Cancel': function(){ $(this).dialog('close'); return false; } } }); $('#completeform').submit(function(e){ e.preventDefault(); var n = $('#completeform input:checked').length; if(n == 0){ alert("Please check the item and mark as complete"); return false; }else{ var q = $('#completeform #qty').html(); if(q > 1){ $('#multi-dialog-confirm').dialog('open'); } } //return false; }); So I'm setting up my dialog first. This is because I'm pretty certain that the scope of the dialog needs to be at the same level as the function which calls it. However, the issue is that when you click 'Confirm' nothing happens. The submit action does not continue. I've tried $('#completeform').submit(); also, which doesn't seem to work. I have tried removing the .preventDefault() to ensure that the form submission isn't completely cancelled, but it doesn't seem to make a difference between that and returning false. Not checking the box, show and alert fine. Might change to dialog at some point ;), clicking 'Cancel' closes the dialog and remains on the page, but the elusive 'Confirm' buttons seems to not continue with the form submission event. If anyone can help, I'd happily share my lunch with you! ;)

    Read the article

  • Displaying full path of filename in tabs ~ Netbeans 6.8

    - by DavidYell
    I can't seem to find a way in the options to display the full path of the file at the title of the tab. I can hover over it to see it, but it would be nice to see it at a glance. There is a SU question about it also, http://superuser.com/questions/88637/netbeans-how-to-view-file-full-path-in-window-title-or-somewhere-else Does anyone have a solution for this to actually display it? I can see there is a custom .jar for it in the RC2 Netbeans, but that's probably way old now. PS, I should mention that a path relative to the project would be ideal, as well as a full path. Either really :)

    Read the article

  • Unserializing an API return object (PHP/Ebay API)

    - by DavidYell
    I have been working with the Ebay api for a project and have found it great. I have however found a problem now, more PHP related. When I read my items from Ebay, I store a bunch of details in the database. Currently, just for the sake of it really, I serialize the whole return object and store it in the database in a related table. The idea being, that when I display my information, I have all the details to hand should I need them. The problem arises in that the pricing information is always in a sub object. [ConvertedAdjustmentAmount] => __PHP_Incomplete_Class Object ( [__PHP_Incomplete_Class_Name] => eBayAmountType [_] => 0 [currencyID] => USD ) As you can see when I unserialize my object, my cunning plan falls foul of the Incomplete class problem. I have checked the following question, without success. http://stackoverflow.com/questions/965611/forcing-access-to-php-incomplete-class-object-properties The main issue lies, as far as I can see, in that the price class is stored in the Ebay api, so how do I recreate it? I have been reading this page, http://uk3.php.net/manual/en/function.unserialize.php and trying to figure out, unserialize_callback_func which I can't figure out either, so any help would be appreciated!

    Read the article

  • [Apache] Creating rewrite rules for multiple urls in the same folder

    - by DavidYell
    I have been asked by our client to convert a site we created into SEO friendly url format. I've managed to crack a small way into this, but have hit a problem with having the same urls in the same folder. I am trying to rewrite the following urls, /review/index.php?cid=intercasino /review/submit.php?cid=intercasino /review/index.php?cid=intercasino&page=2#reviews I would like to get them to, /review/intercasino /submit-review/intercasino /review/intercasino/2#reviews I've almost got it working using the following rule, RewriteRule (submit-review)/(.*)$ review/submit.php?cid=$2 [L] RewriteRule (^review)/(.*) review/index.php?cid=$2 The problem, you may already see, is that /submit-review rewrites to /review, which in turn gets rewritten to index.php, thus my review submission page is lost in place of my index page. I figured that putting [L] would prevent the second rule being called, but it seems that it rewrites both urls in two seperate passes. I've also tried [QSE], and [S=1] I would rather not have to move my files into different folders to get the rewriting to work, as that just seems too much like bad practise. If anyone could give me some pointers on how to differentiate between these similar urls that would be great! Thanks (Ref: http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html)

    Read the article

  • Static footer, with attached and scaling overlap

    - by DavidYell
    I have been asked by a client to create a site where the content area overlaps the footer. However they also want the footer to be attached to the bottom of the viewport, which I've done, but it seems that I can't find a good way to vertically stretch the content to maintain the overlap should the browser be resized. I've created a diagram to help explain, http://www.squaresphere.co.uk/images/footer-diagram.png So ideally I need a way of calculating the height of the content and stretching the content div if content_length viewport.height, but keep a min-height if content_length < viewport.height A solution using html+css would be fantastic, but I'm starting to think that I'm going to have to do some funky jQuery onviewportresize or something Any suggestions would be awesome, thanks!

    Read the article

  • PHP mysql_real_escape_string() returning `NULL`

    - by DavidYell
    I'm using PHP Version 5.1.6 and trying to escape a query string from my $_GET array. However my script is returning a NULL after it's escaped. It seems that mysql_escape_string() works fine, but it's deprecated, so I don't want to use it. Having checked over the phpinfo() the MySQL lib is all loaded fine from what I can see. Has anyone experienced this kind of thing before? $term = $_GET['q']; var_dump($term); // string(7) "richard" echo "<br />"; $sterm = mysql_real_escape_string($term, $db); var_dump($sterm); // NULL It's very strange to me, I can't imagine why this function wouldn't work.

    Read the article

  • CakePHP dropping session between pages

    - by DavidYell
    Hi, I have an application with multiple regions and various incoming links. The premise, well it worked before, is that in the app_controller, I break out these incoming links and set them in the session. So I have a huge beforeFilter() in my *app_controller* which catches these and sets two variables in the session. Viewing.region and Search.engine, no problem. The problem arises that the session does not seem to be persistant across page requests. So for example, going to /reviews/write (userReviews/add) should have a session available which was set when the user arrived at the site. Although it seems to have vanished! It would appear that unless $this-params is caught explicitly in the *app_controller* and a session variable written, it does not exist on other pages. So far I have tried, swapping between storing session in 'cake' and 'php' both seem to exhibit the same behaviour. I use 'php' as a default. My Session.timeout is '120', Session.checkAgent is False and Security.level is 'low'. All of which should give enough leniency to the framework to allow sessions the most room to live! I'm a bit stumped as to why the session seems to be either recreated or blanked when a new page is being requested. I have commented out the requestAction() calls to make sure that isn't confusing the session request object also, which doesn't seem to make a difference. Any help would be great, as I don't have to have to recode the site to pass all the various variables via parameters in the url, as that would suck, and it's worked before, thus switching on $this-Session-read('Viewing.region') in all my code!

    Read the article

  • Aptana function definition popups

    - by DavidYell
    I've noticed that in Aptana 2.0 over 1.5.1 that when typing a php function, you no longer get the popup window showing the function description and it's parameters. Does anyone know how to get this working again? As I relied on it quite heavily to remember which parameters went where. Open in PHP Manual shortcut Shift+F2 also doesn't work either, so all I can do is open my browser and keep php.net open all the time. Are either of these features functional? I know that Open delcaration has never worked annoyingly, but I had the function popup in 1.5.1 perfectly.

    Read the article

  • PHP: Three item validation comparison

    - by DavidYell
    I have 3 featured product panels on the homepage, and I'm writing a CMS page for it. I'm trying to validate the items. They are selected via three <select> elements, featured1, featured2 and featured3. The default is <option value="0" selected>Select an element</option> I need to validate the $_POST to ensure that the user hasn't selected the same product for more than one of the panels. I have worked out that each $_POST needs to be $_POST['featuredN'] > 0 but I can't seem to find a logical way of processing the 7 potential outcomes. Using a logic table, where 1 is a set value. 1 2 3 ------- 0 0 0 1 1 1 1 0 0 0 1 0 0 0 1 1 1 0 0 1 1 If an item is 0, then I will not update it, but I want the user to be able to update a single item if needs be. I cannot find a logical way to see if the item is not 0, and then compare it to another item if that also is not 0. So far my colleague suggested, adding up the values. Which works to see if condition 1 0 0 0 is not met. I have a vague feeling that some form of recursive function might be in order, but I can't quite get my brain to help me on this one! So to the collective brain! :)

    Read the article

  • Finding and marking the largest of three values in a two dimensional array

    - by DavidYell
    I am working on a display screen for our office, and I can't seem to think of a good way to find the largest numerical value in a set of data in a two dimensional array. I've looked at using max() and also asort() but they don't seem to cope with a two dimensional array. I'm returning my data through our mysql class, so the rows are returned in a two dimensional array. Array( [0] => Array( [am] => 12, [sales] => 981), [1] => Array( [am] => 43, [sales] => 1012), [2] => Array( [am] => 17, [sales] => 876) ) I need to output a class when foreaching the data in my table for the AM with the highest sales value. Short of comparing them all in if statements. I have tried to get max() on the array, but it returns an array, as it's look within the dimension. When pointing it at a specific dimension it returns the key not the value. I figured that I could asort() the array and pop the top value off, store it in a variable and then compare against that in my foreach() loop, but that seems to have trouble sorting across two dimensions. Lastly, I figured that I could foreach() the values, comparing them against the previous one each time, untill I found the largest. This approach however means storing every value, luckily only three, but then comparing against them all again. Surely there must be a simpler way to achieve this, short of converting it into a single dimension array, then doing an asort() on that?

    Read the article

1