Search Results

Search found 810 results on 33 pages for 'phil jackson'.

Page 11/33 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • preg_match Vs preg_match_all browser error not php?

    - by Phil Jackson
    Hi all i have the following: $str = base64_encode(preg_replace("#\s|\r|\t|\n#", " ", file_get_contents("../www.cms.actwebdesigns.co.uk2/logged.php"))); if(preg_replace("#(PD9waHAg)((?!(Pz4g)).)*#is", $str, )) { #print_r($matches); echo "<xmp>".base64_decode($matches[0]."Pz4g")."</xmp>"; } now this works but i want to be able to use it for all occurrences on page. (finds php segments in page) So i used preg_match_all but returns a browser error (page has been moved or no longer exists) Anyone know why?

    Read the article

  • FileSystemWatcher keeping parent directory

    - by Henry Jackson
    I am using FileSystemWatcher to monitor a folder, and it seems to be preventing the folder's parent from being deleted. For example, I have the file structure: C:\Root\FolderToWatch\... with the FileSystemWatcher targeting FolderToWatch. While my program is running, if I go to Windows Explorer and try to delete Root, I get an error "Cannot delete Root: access is denied". However, if I delete FolderToWatch FIRST, I can then delete Root without incident. (Needless to say, if the FileSystemWatcher is not enabled, I have no problem deleting either folder.) What gives? Why does the FileSystemWatcher hang onto it's target's parent like that? How (if possible) can I stop this behavior? I would like the user to be able to freely move or delete directories in Windows Explorer.

    Read the article

  • Multi-variable indexes in postgres

    - by Jackson Davis
    Im looking at an application where I will be doing quite a few SELECTs where I am trying to find column_a = x AND column_b = y. Is the correct to create that index that something like the following? CREATE INDEX index_name ON table (column_a, column_b)

    Read the article

  • php - arrange array to display in score order

    - by Phil Jackson
    hi, i have wrote a script to produce an array of data but now want to display in order of score. The array outputs as follows; [display_name] => Array ( [0] => ACT_Web_Designs [1] => user1_design [2] => user2_design ) [proffesion] => Array ( [0] => Web Developer [1] => web developer [2] => Web Developer ) [score] => Array ( [0] => 15 [1] => 6 [2] => 15 ) [img] => Array ( [0] => ./?0000=gif&0001=3fadb8c362ff39f3322909899ff14760&0002=prof_pic [1] => [2] => ) so in a nutshell I am wanting it to be converted as follows; [display_name] => Array ( [0] => ACT_Web_Designs [1] => user2_design [2] => user1_design ) [proffesion] => Array ( [0] => Web Developer [1] => web developer [2] => Web Developer ) [score] => Array ( [0] => 15 [1] => 15 [2] => 6 ) [img] => Array ( [0] => ./?0000=gif&0001=3fadb8c362ff39f3322909899ff14760&0002=prof_pic [1] => [2] => ) I have been looking at asort() but cant get anything to work. any help would be much appreciated.

    Read the article

  • mysql query - syntax error - cannot find out why

    - by Phil Jackson
    Hi all, im taring my hair out over this one. A query is throwing an error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM, SUBJECT, DATE, READ, MAIL ) VALUES ( 'EJackson', 'dfdf', '1270974101', 'fa' at line 1 I printed out the query to see what could be the problem: INSERT INTO db.tablename ( FROM, SUBJECT, DATE, READ, MAIL ) VALUES ( 'EJackson', 'dfdf', '1270974299', 'false', 'dfdsfdsfd' ) and finaly the structure consists of: CREATE TABLE db.tablename ( `ID` int(12) NOT NULL auto_increment, `FROM` varchar(255) NOT NULL, `SUBJECT` varchar(255) NOT NULL, `DATE` varchar(255) NOT NULL, `READ` varchar(255) NOT NULL, `MAIL` varchar(255) NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; I cant find anything wrong. Any Help would be much appreciated. ( db.tablename is a replacement for the actual tablename )

    Read the article

  • IEnumerable<T> representing the "rest" of an IEnumerable<T> sequence

    - by Henry Jackson
    If I am walking through an IEnumerable<T>, is there any way to get a new IEnumerable<T> representing the remaining items after the current one. For example, I would like to write an extension method IEnumerator<T>.Remaining(): IEnumerable<int> sequence = ... IEnumerator<int> enumerator = sequence.GetEnumerator(); if (enumerator.MoveNext() && enumerator.MoveNext()) { IEnumerable<int> rest = enumerator.Remaining(); // 'rest' would contain elements in 'sequence' start at the 3rd element } I'm thinking of the collection of a sort of singly-linked list, so there should be a way to represent any remaining elements, right? I don't see any way to do this exposed on either IEnumerable<T> or IEnumerator<T>, so maybe it's incompatible with the notion of a potentially unbounded, nondeterministic sequence of elements.

    Read the article

  • jquery - deciding whether a user is "away"

    - by Phil Jackson
    hi, im doing a little test to check whether the user is "away" (unactive) or not; function away_status(){ $("#away_stat_update").everyTime(1000, function(i) { var number = Number($(this).html()); if( number == 20 ) { // set user as away alert( "user away" ); } if( number > 20 ) { $("*").mousemove(function(e){ $("#away_stat_update").html(0); var number = Number(0); // reset user to being online alert( "user back online" ); }); } $("#away_stat_update").html( number + 1 ); }); $("*").mousemove(function(e){ $("#away_stat_update").html(0); }); } away_status(); the only problem is that when the number is greater than 20 and the mouse is moved it keeps alerting "user back on line" instead of doing it just once. The number is resetting by the way.

    Read the article

  • jQuery/JavaScript Date form validation

    - by Victor Jackson
    I am using the jQuery date picker calendar in a form. Once submitted the form passes params along via the url to a third party site. Everything works fine, except for one thing. If the value inserted into the date field by the datepicker calendar is subsequently deleted, or if the default date, that is in the form on page load, is deleted and the form is submitted I get the following error: "Conversion from string "" to type 'Date' is not valid." The solution to my problem is really simple, I want to validate the text field where the date is submitted and send out a default date (current date) if the field is empty for any reason. The problem is I am terrible at Javascript and cannot figure out how to do this. Here is the form code for my date field. [var('default_date' = date)] <input type="text" id="datepicker" name="txtdate" value="[$default_date]" onfocus="if (this.value == '[$default_date]') this.value = '';" onchange="form.BeginDate.value = this.value; form.EndDate.value = this.value;" /> <input type="hidden" name="BeginDate" value="[$default_date]"/> <input type="hidden" name="EndDate" value="[$default_date]"/>

    Read the article

  • String to image only produces black background

    - by Phil Jackson
    Hi im really having a problem find how to fix this. $string = "foo"; $font = 4; $width = ImageFontWidth($font) * strlen($string); $height = ImageFontHeight($font); $im = @imagecreatetruecolor ($width,$height); $bg = imagecolorallocate($im, 255, 255, 255); $textcolor = imagecolorallocate($im, 0, 0, 0); imagestring($im, 5, 0, 0, $string, $textcolor); imagegif($im, 'somefile.gif', 8); imagedestroy($im); I cannot seem to change the background from black. Does anyone have any ideas?

    Read the article

  • What are unused/undeclared dependencies in maven ? What to do with them ?

    - by b7kich
    Maven dependency:analyze complains about the dependencies in my project. How does it determine which are unused and which are undeclared ? What should I do about them ? Example: $ mvn dependency:analyze ... [WARNING] Used undeclared dependencies found: [WARNING] org.slf4j:slf4j-api:jar:1.5.0:provided [WARNING] commons-logging:commons-logging:jar:1.1.1:compile [WARNING] commons-dbutils:commons-dbutils:jar:1.1-osgi:provided [WARNING] org.codehaus.jackson:jackson-core-asl:jar:1.6.1:compile ... [WARNING] Unused declared dependencies found: [WARNING] commons-cli:commons-cli:jar:1.0:compile [WARNING] org.mortbay.jetty:servlet-api:jar:2.5-20081211:test [WARNING] org.apache.httpcomponents:httpclient:jar:4.0-alpha4:compile [WARNING] commons-collections:commons-collections:jar:3.2:provided [WARNING] javax.mail:mail:jar:1.4:provided Note: A lot of these dependencies are used in my runtime container and I declared them as provided to avoid having same library on the classpath twice with different versions.

    Read the article

  • MS Access question

    - by Scott Jackson
    I've an access database table with 3 fields : Purchase date Warranty time Warranty expiry Warranty time has 1, 2, 3, 4, 5 in it which corresponds to years. How can I auto-populate the 'Warranty expiry' field (which is a date field) by looking at the 'Purchase date' and then adding on the 'Warranty time' (warranty time will be 1 = 365 days, 2 = 730 days, etc)?

    Read the article

  • Can .NET Task instances go out of scope during run?

    - by Henry Jackson
    If I have the following block of code in a method (using .NET 4 and the Task Parallel Library): var task = new Task(() => DoSomethingLongRunning()); task.Start(); and the method returns, will that task go out of scope and be garbage collected, or will it run to completion? I haven't noticed any issues with GCing, but want to make sure I'm not setting myself up for a race condition with the GC.

    Read the article

  • Process every pair in a sequence

    - by Henry Jackson
    I'm looking for a concise way to process every (unordered) pair of elements in a sequence in .NET. I know I can do it with nested foreach loops, but I was looking for something a little more readable. I was imagining something like a modified Any() extension method: IEnumerable<Transaction> transactions = ... if (transactions.AnyPair( (first, second) => first.UniqueID == second.UniqueID)) throw ... Or maybe a foreach-style one: IEnumerable<JigsawPiece> pieces = ... pieces.ForEachPair( (first, second) => { TryFit(first, second); }); This question has been asked for other languages (e.g. see http://stackoverflow.com/questions/942543/operation-on-every-pair-of-element-in-a-list), but I'm looking for a .NET solution.

    Read the article

  • mysql - offset problem

    - by Phil Jackson
    Hi, I recently posted a question about getting last 3 results in table in the correct order. I now want the get all comments apart from the last 3 in the correct order. Here is my syntax; SELECT * FROM (SELECT * FROM $table ORDER BY ID DESC OFFSET 3) AS T ORDER BY TIME_STAMP the error i am receiving is; You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OFFSET, 3) AS T ORDER BY TIME_STAMP' at line 1 I can't seem to get it to work. Any help much appreciated.

    Read the article

  • SQL Server Query Command

    - by Scott Jackson
    Hi, I have an SQL database table, I want to find everything in a table where the 'Room' says 'DISPOSED', Insert 'DISPOSED' into the 'Status' field and then delete the entry in 'Room'. Basically moving the entry from one field to another (if the 'Room' field has 'DISPOSED' in it) Hope this makes sense. Thanks for any help.

    Read the article

  • JRI Fatal Error on Ubuntu

    - by Peter Jackson
    I have successfully installed JRI and rJava on Windows 7. I am now trying to get it to work on Ubuntu with 64bit OS. I can make rJava calls from within R but getting JRI to work is more difficult. I am running NetBeans 7.1.2 and I have followed various tricks in setting R_HOME and java.library.path to enable all the classes to be loaded. That is, I am past the error messages such as "jri library not found" and "R_HOME not set". From my java code,I can see that R_HOME = /usr/lib64/R. The error message I get now is Fatal error: you must specify '--save', '--no-save' or '--vanilla' This happens when Rengine is first called: Rengine r = new Rengine(args,false,null); This appears to be an error message from R; it seems to be expecting a command line argument. I haven't seen any posting with this error message. Any ideas? Thanks, Peter

    Read the article

  • algorithm - How to sort a 0/1 array with 2n/3 comparisons?

    - by Jackson Tale
    In Algorithm Design Manual, there is such an excise 4-26 Consider the problem of sorting a sequence of n 0’s and 1’s using comparisons. For each comparison of two values x and y, the algorithm learns which of x < y, x = y, or x y holds. (a) Give an algorithm to sort in n - 1 comparisons in the worst case. Show that your algorithm is optimal. (b) Give an algorithm to sort in 2n/3 comparisons in the average case (assuming each of the n inputs is 0 or 1 with equal probability). Show that your algorithm is optimal. For (a), I think it is fairly easy. I can choose a[n-1] as pivot, then do something like in quicksort partition, scan 0 to n - 2, find the middle point where left side is all 0 and right side is all 1, this take n - 1 comparisons. But for (b), I can't get a clue. It says "each of the n inputs is 0 or 1 with equal probability", so I guess I can assume the numbers of 0 and 1 equal? But how can I get a result which is related to 1/3? divide the whole array into 3 groups? Thanks

    Read the article

  • Passing a variable from beggining to end - Paypal

    - by Phil Jackson
    Hi all, I'be been at this for days and i cant seem to figure it out. All i want to do is when subscribe button is pushed, a variable is send ( post get i dont care ) payment is completed and landed on the success page, with my variable! From what i can gather this should be able to do it: <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="0000000"> <Input type="hidden" name="custom" value="<?php md5($code.microtime()); ?>"/> <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_subscribeCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> Any help much appreciated ( and yes I've read paypal and sandbox documentation, just not that good at reading. )

    Read the article

  • VMware event hooks in .NET

    - by Henry Jackson
    I'm developing an in-house .NET application that will be run on a VM (with VMware), and want to know if there's a way to get notifications from VM system events (like suspending, resumed, etc.) Anyone know of a convenient way to do that? The virtual machine has VMware Tools installed, does that provide a .NET API for hooking events?

    Read the article

  • domain -> subdomain - passing session data

    - by Phil Jackson
    Howdy, having a little trouble here. I have domain.co.uk setting a session. When I click on a link on domain.co.uk to go to sub.domain.co.uk the session is not being read. I have altered session.cookie_domain to .domain.co.uk not still not working. Is there anything else that needs changing? Regards, me.

    Read the article

  • Where to intercept resolution of controller/view in ASP.Net MVC for customizations?

    - by Jason Jackson
    I am trying to figure out where the appropriate place is to intercept the resolution of what view + controller is being called in ASP.Net MVC 2. I have a situation where I have a controller and a corresponding set of views. I also have the possibility of a customized version of both the controller and N of the views sitting in the project (or we may use something like Portable Views from the MvcContrib project). If the customized version of the controller or view(s) exists at run time, and the user satisfies certain criteria, I need to call the customized controller and use the appropriate customized view. At design/compile time we don't know what customizations may be in place. My first run at this was by using a custom controller factory that returns a custom controller if it exists. However, this controller is "wired up" to the standard view, and I cannot figure out how to return the customized view if it also exists. To complicate matters, there may be no customized controller but customized views, and visa-versa.

    Read the article

  • PHP - string to image only produces black background

    - by Phil Jackson
    Hi im really having a problem find how to fix this. $string = "foo"; $font = 4; $width = ImageFontWidth($font) * strlen($string); $height = ImageFontHeight($font); $im = @imagecreatetruecolor ($width,$height); $bg = imagecolorallocate($im, 255, 255, 255); $textcolor = imagecolorallocate($im, 0, 0, 0); imagestring($im, 5, 0, 0, $string, $textcolor); imagegif($im, 'somefile.gif', 8); imagedestroy($im); I cannot seem to change the background from black. Does anyone have any ideas?

    Read the article

  • Merge Primary Keys - Cascade Update

    - by Chris Jackson
    Is there a way to merge two primary keys into one and then cascade update all affected relationships? Here's the scenario: Customers (idCustomer int PK, Company varchar(50), etc) CustomerContacts (idCustomerContact int PK, idCustomer int FK, Name varchar(50), etc) CustomerNotes (idCustomerNote int PK, idCustomer int FK, Note Text, etc) Sometimes customers need to be merged into one. For example, you have a customer with the id of 1 and another with the id of 2. You want to merge both, so that everything that was 2 is now 1. I know I could write a script that updates all affected tables one by one, but I'd like to make it more future proof by using the cascade rules, so I don't have to update the script every time there is a new relationship added. Any ideas?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >