Search Results

Search found 265 results on 11 pages for 'ashley davis'.

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

  • how to convert all characters to their html entity equivalent using PHP

    - by Ashley Ward
    I want to convert this [email protected] to &#104;&#101;&#108;&#108;&#111;&#064;&#100;&#111;&#109;&#097;&#105;&#110;&#046;&#099;&#111;&#109; I have tried: url_encode($string) this provides the same string I entered, returned with the @ symbol converted to %40 also tried: htmlentities($string) this provides the same string right back. I am using a UTF8 charset. not sure if this makes a difference....

    Read the article

  • In XAML is there way to bind key press and key release to specific commands?

    - by Ashley Davis
    In my application I have keys that bound to commands using the KeyBinding class. The command is executed when the key is pressed and released. I have a special case where I want to bind separate commands to the pressed action and to the released action. For example when the space key is pressed I want my app to run a command to enter a special mode. Then when the space key is released I want to run another command to exit that special mode. Currently I do this by manually handling the KeyUp and KeyDown events. Is there anyway to execute commands for pressed and released purely in XAML?

    Read the article

  • How to use CSS to ensure items remain offscreen even if window is resized?

    - by Ashley Ward
    I am trying to implement a type of slider using jquery. However this question is about the CSS involved in trying to achieve the functionality. My site design occupies a central column of width 960px. Within this layout there is a central element, that I wish to slide right, on click of a "next" button, and at the same time, another element of the same class slides in from the left to occupy the space vacated. I have drawn a diagram of what I am trying to achieve. In this diagram the red blocks are the element I want to slide in and out, it is grouped by a div which moves left to produce the effect using jQuery I have 2 main questions: How do I get the correct margin values, given that the browser window width can vary and that all elements that are not the current item should be offscreen? 2.If the user were to resize the margins could be dynamically altered based on the values returned using the jQuery resize() event. Or is there a neater quicker better way of doing it using pure CSS?

    Read the article

  • Safari Web Inspector is not updating when I update an element with ajax

    - by Ashley
    I have a checkout page http://www.oipolloi.com/oipolloi/shop/viewbasket.php with multiple ajax calls after certain items update (EG look up postage cost when country is changed, then update discount boxes etc). I've asked for help in the past about the best method of making sure ALL calls have returned before allowing the form to be submitted for payment processing: http://stackoverflow.com/questions/2290372/how-do-i-prevent-form-submission-until-multiple-ajax-calls-have-finished-jquery I was fairly happy that the logic in the finished solution was correct, but I have still been receiving reports that people using Safari are able to submit the form without the ajax calls returning properly. I have tried using the Safari Web Inspector to debug but it seems that when you Inspect Element, then update an element with an ajax call, the Inspector doesn't seem to update. I am updating hidden fields, so it's hard to be able to know whether the problem lies with the DOM not being updated properly, or the Inspector itself. I'm using Safari 4.0.5 on PC and you can reproduce the problem above by looking for a div id="countryFieldsBilling" with Web Inspector. It should contain three hidden fields that are initially empty. You can try to make it update (or not) by choosing a country from the select menu at the bottom of 'Shipping Address' box, and then clicking the 'click to use Shipping Address' link at the top of the 'Billing Address' just below. The behaviour I am seeing is that the country chosen in the shipping select gets copied correctly to the country in the billing select, but the hidden inputs in the Web Inspector do not get updated. When these hidden inputs do not get updated, this causes the problem that Mac Safari users report. If you can let me know either how to get Web Inspector to work properly, or something else I may have missed in the behaviour of Mac Safari that may cause these problems, that would be great. Thanks in advance

    Read the article

  • How do I trigger a closing animation for a WPF ContextMenu?

    - by Ashley Davis
    Does anyone know if it is possible to trigger an animation when a WPF ContextMenu closes? I have code that triggers an animation when the ContextMenu is opened. The animation makes the context menu fade into view. I also want an animation when the ContextMenu is closed that makes it fade out. The code that starts the opened fade-in animation looks something like this: var animation = new DoubleAnimation(); animation.From = 0; animation.To = 1; animation.Duration = TimeSpan.FromSeconds(0.2); animation.Freeze(); menu.BeginAnimation(ContextMenu.OpacityProperty, animation); The fade-in animation also runs on sub-menu items. Note that I also want to run other animations besides fade in and fade out. Eg I want the context menu to scale up from nothing so that it sort of 'bounces' into view.

    Read the article

  • Why doesn't keyboard input work for a ScrollViewer when the child control has input focus?

    - by Ashley Davis
    Why doesn't keyboard input work for a ScrollViewer when the child control has input focus? This is the scenario. A WPF window opens. It sets the focus to a control that is embedded in a ScrollViewer. I hit the up and down and left and right keys. The ScrollViewer doesn't seem to handle the key events, anyone know why? This is the simplest possible example: <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300" FocusManager.FocusedElement="{Binding ElementName=control}" > <Grid> <ScrollViewer HorizontalScrollBarVisibility="Auto" > <ItemsControl x:Name="control" Width="1000" Height="1000" /> </ScrollViewer> </Grid> </Window> When you start the app that contains this window, "control" appears to have the focus as I intended. Pressing the key seems to result in bubbling key events reaching the ScrollViewer (I checked for this using WPF Snoop). I can't work out why it doesn't respond to the input.

    Read the article

  • Flash - can't access classes in another SWF

    - by Ashley Muller
    Hi, I'm trying to load a local SWF file and use the classes in that SWF (its a code only SWF, nothing in library). Here's the code that loads the library: var AD:ApplicationDomain = ApplicationDomain.currentDomain; var context:LoaderContext = new LoaderContext(false, AD); SA_gamecore_loader = new Loader(); SA_gamecore_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onGameCoreLibraryDataComplete); SA_gamecore_loader.load(new URLRequest("GameCore.swf"), context); Here's the code that tries to instantiate a class from GameCore.swf: var test:Class = GetClassFromDefinition("MenuArt") as Class; var testInstance:Object = new test(); public function GetClassFromDefinition(theStr:String):Object { var theClass:Object; try { theClass = GameCoreLibraryData.applicationDomain.getDefinition(theStr); } catch(e:ReferenceError) { trace(e); return null; } return theClass; } And this is the message that's traced: ReferenceError: Error #1065: Variable MenuArt is not defined. The GameCore.swf is in the same location as the parent swf. I'm using Flash Develop if that helps. Anyone able to point out what I'm doing wrong?

    Read the article

  • Error on SQL insert statement

    - by Ashley Stewart
    I exported a recordset from one database into a csv file, and when I try to import it into another using mysql workbench I keep this this error message: Executing SQL script in server ERROR: Error 1064: 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 ' 'Lord it Over', 'Ben', '1993-03-01', 'TRC', NULL, 1983, '1999-09-01', 'NULL', '' at line 1 INSERT INTO `TRC`.`horse` (`horse_id`, `registered_name`, `stable_name`, `arrival_date`, `last_known_location`, `is_ex_racer`, `birth_year`, `death_date`, `horse_comments`, `sex`, `referral_date`, `horse_height`, `arrival_weight`, `passport_no`, `microchip_no`, `is_on_waiting_list`) VALUES (, 'Lord it Over', 'Ben', '1993-03-01', 'TRC', NULL, 1983, '1999-09-01', 'NULL', 'NULL', 'NULL', NULL, NULL, 'NULL', 'NULL', 0) SQL script execution finished: statements: 29 succeeded, 1 failed Fetching back view definitions in final form. Nothing to fetch Any help would be appreciated as their appears to be no errors as far as I can see.

    Read the article

  • PHP How to access constant defined outside class?

    - by Ashley Ward
    I have defined some constants eg: define('DB_HOSTNAME', 'localhost', true); define('DB_USERNAME', 'root', true); define('DB_PASSWORD', 'root', true); define('DB_DATABASE', 'authtest', true); now when I try to do this: class Auth{ function AuthClass() { $this->db_link = mysql_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD) or die(mysql_error()); } } I get an error. Why is this and what do I need to do? See, I've tried using (for example) global DB_HOSTNAME but this fails with an error.

    Read the article

  • Performing time consuming operation on STL container within a lock

    - by Ashley
    I have an unordered_map of an unordered_map which stores a pointer of objects. The unordered map is being shared by multiple threads. I need to iterate through each object and perform some time consuming operation (like sending it through network etc) . How could I lock the multiple unordered_map so that it won't blocked for too long? typedef std::unordered_map<string, classA*>MAP1; typedef std::unordered_map<int, MAP1*>MAP2; MAP2 map2; pthread_mutex_lock(&mutexA) //how could I lock the maps? Could I reduce the lock granularity? for(MAP2::iterator it2 = map2.begin; it2 != map2.end; it2++) { for(MAP1::iterator it1 = *(it2->second).begin(); it1 != *(it2->second).end(); it1++) { //perform some time consuming operation on it1->second eg sendToNetwork(*(it1->second)); } } pthread_mutex_unlock(&mutexA)

    Read the article

  • NP-complete problem in Prolog

    - by Ashley
    I saw this ECLiPSe solution to the problem mentioned in this XKCD comic. I tried to convert this to pure Prolog. go:- Total = 1505, Prices = [215, 275, 335, 355, 420, 580], length(Prices, N), length(Amounts, N), totalCost(Prices, Amounts, 0, Total), writeln(Total). totalCost([], [], TotalSoFar, TotalSoFar). totalCost([P|Prices], [A|Amounts], TotalSoFar, EndTotal):- between(0, 10, A), Cost is P*A, TotalSoFar1 is TotalSoFar + Cost, totalCost(Prices, Amounts, TotalSoFar1, EndTotal). I don't think that this is the best / most declarative solution that one can come up with. Does anyone have any suggestions for improvement? Thanks in advance!

    Read the article

  • Java/Android get array from xml

    - by Ashley
    I have a list of longitude and longitude points in an xml file that is used throughout my application. I find my self repeating this code to get points often and think there must be a better way? String[] mTempArray = getResources().getStringArray(R.array.stations); int len = mTempArray.length; mStationArray = new ArrayList<Station>(); for(int i = 0; i < len; i++){ Station s = new Station(); String[] fields = mTempArray[i].split("[\t ]"); s.setValuesFromArray(fields); Log.i("ADD STATION", ""+s); mStationArray.add(s); } XML is in the format of: <?xml version="1.0" encoding="utf-8"?> <resources> <array name="stations"> <item> <name>Station name</name> <longitude>1111111</longitude> <latitude>11111</latitude> <code>1</code> </item> And another (possible) problem is that to get just one station I have to get all of them and pull the one I want from the array. Is this going to be considerably slower? Can I make this array consistent throughout the app? (But keeping the separate Intent methodology)

    Read the article

  • Why does this php/ajax query fail?

    - by Ashley Brown
    I'm ajaxing over to this php file. $a = 'old'; $b = 'new'; if ($_POST['info-type'] == $a || $b) { $info = $_POST['info-type']; $query = "SELECT * FROM `tld` WHERE type = '".$var."'"; } $query = "SELECT * FROM `tld` "; $result = mysqli_query($link,$query); while($row = mysqli_fetch_assoc($result)) { echo '<div>'.$row['something'].'</div>'; } The data posted is either 'all' 'new' or 'old'. If i send the data as either new or old, the script works and outputs as expected. If the posted data is neither new or old but all instead, it fails and don't show any errors or respond anything back. (I've monitored via dev tools aswell) So, I tried this if ($_POST['info-type'] == $a || $b) { $info = $_POST['info-type']; $var = "SELECT * FROM `tld` WHERE type = '".$var."'"; } elseif ($_POST['info-type'] == 'all'){ $query = "SELECT * FROM `tld` "; } But the script still fails. If i fully remove the IF statements and use the query without the WHERE clause like it is after the elseif, it works?

    Read the article

  • C# (With .NET & Visual Studio) WebForms - How can I get the title of a page ..?

    - by Ashley Davies
    Prety long question; How can I do the following in C#: Open a webpage (Prefferably not visible) Check whether the page redirects to a different page (Site is down, 404, etc.) Check if the title is not equal to a said string Then seperately, (They need to click a confirm button) open their browser, and go to the adress of the first (It'll be the only one) hyperlink on the site. I literally have been looking on google for ages and haven't found anything similar to what I need. Whether you give me a link to a site with a tutorial on this area of programming or actual source code doesn't make a difference to me.

    Read the article

  • zend framework - view not rendering

    - by Ashley
    Hi My zend framework render function returns: Warning: include(C:\wamp\www\cms\application\modules\default\views\scripts) [function.include]: failed to open stream: Permission denied... It's being called in a postDispatch function on the controller, but that doesn't matter as no matter where i put it, it fails. Any ideas? My view and layout are started in the bootstrap. Thanks

    Read the article

  • Dojo treemodel- adding large number of items

    - by Ashley
    I am trying to add a large number of items (100+) to my tree via ForestStoreModel by calling newItem in a loop. This seems to be quite slow and locks up the browser. Is there any way I can do something similar to grid's beginUpdate & endUpdate? I want to basically 'turn off' my tree, add 100 items in a batch, then 'turn on' my tree. Any ideas? Thanks!

    Read the article

  • Is it possible to restrict how a method can be called in PHP?

    - by Ashley Ward
    Given that my class looks like this: class Methods{ function a(){ return 'a'; } function b(){ $this->a(); } function c(){ $this->a(); } } Is it possible to ensure that function a can only be called from function b? In the above example function c should fail. I could just include it in function b, but in the future I may want to let a() be called by some new functions (e.g. d() or e())

    Read the article

  • Google Talk Chat/Conference Solutions

    - by Adam Davis
    I started using the old confbot python conference script in 2005 for my family. This essentially implements an IRC like conference room over Google Talk (or any Jabber/XMPP server). It has significantly increased family communication, and has become rather indispensable due to this. Recently it's begun to have severe problems (people can't see each other in the conference room) which has nearly killed the usefulness of it. Before I develop my own software or debug confbot (probably not - it uses an older jabber library that hasn't been updated since 2003) I wanted to see what other solutions exist that meet our needs: Supports Google Talk (Sorry, I'm not going to try to convince everyone involved to move to a new IM or other client) Free and open source (ideal, but not required) Runs on Windows (Not a web service run by someone else) Implements basic functionality such as kick/ban, emotes Remembers who joined the conference room across restarts Obeys Do Not Disturb and Busy status Archives all activity -Adam

    Read the article

  • Where can I ask questions that aren't IT questions?

    - by Adam Davis
    Thank you for your confidence in our abilities But have you read this? FAQ We get a lot of interesting technical questions on here, but Server Fault is meant to be first and foremost a resource for system administrators and IT professionals. In other words, Server Fault isn't meant to cater to every computer problem - just those that only exist in or can best be solved in the IT and sysadmin domain Yes, someone here might be able to help you, but you'll find that other forums more focused on your topic can give you a much better answer than a bunch of IT professionals. It's likely that your question will be downvoted, closed, and in some cases marked "offensive." It's not that we hate you, it's just that we like to keep our corn pops separate from our cocoa puffs. In that vein, here are a bunch of other forums where you can get help: (This list contains the top two forums for each category as voted for below.) Programming Stackoverflow Consumer Level Computer Hardware Ars Technica OpenForum Tom's Hardware Forums Computer Software Anandtech Forum Web Design/Hosting/CMS SitePoint Forums Web Hosting Talk Math, Science, Engineering Physics Forums PlanetMath Other/General Ask Metafilter Google Search Mahalo Answers Check out the answers below for even more suggestions! What forums can people go to to ask the questions that are off topic here? Please list only ONE forum per answer so votes can bring the best forums to the top. Return to FAQ Index

    Read the article

  • Can an installation of SSRS be used for other reports if the SCOM Reporting Role is installed?

    - by Pete Davis
    I'm currently in the process of planing a SCOM 2007 R2 deployment and would like to deploy the OperationsManagerDW and Reporting Server to a shared SQL 2008 cluster which is used for reporting across multiple solutions. However in the in the deployment guide for SCOM 2007 R2 it says: Due to changes that the Operations Manager 2007 Reporting component makes to SQL Server Reporting Services security, no other applications that make use of SQL Server Reporting Services can be installed on this server. Which concerns me that it may interfere with existing or future (non SCOM) reports in some way even if deployed as a separate SSRS instance. Later in the same guide it states: Installing Operations Manager 2007 Reporting Services integrates the security of the instance of SQL Reporting Services with the Operations Manager role-based security. Do not install any other Reporting Services applications in this same instance of SQL Server. Does this mean that I can install a new SSRS instance and use this on the shared cluster for SCOM reporting or that I'd also need to create a whole new SQL Server instance as well as SSRS instance or I'd need a whole separate server for SCOM OperationsManagerDW and Reporitng Server?

    Read the article

  • Does Windows XP automatically reassemble UDP fragments?

    - by Matt Davis
    I've got a Windows application that receives and processes XML messages transmitted via UDP. The application collects the data using Windows "raw" sockets, so the entire layer 3 packet is visible. We've recently run across a problem that has me stumped. If the XML messages (i.e., UDP packets) are large (i.e., 1500 bytes), they get fragmented as expected. Ordinarily, this will cause the XML processor to fail because it attempts to process each UDP packet as if it is a complete XML message. This is a known short-coming in the system at this stage of its development. On Windows 7, this is exactly what happens. The fragments are received and logged, but no processing occurs. On Windows XP, however, the same fragments are seen, and the XML processor seems to handle everything just fine. Does Windows XP automatically reassemble UDP fragments? I guess I could expect this for a normal UDP socket, but it's not expected behavior for a "raw" socket, IMO. Further, if this is the case on Windows XP, why isn't the behavior the same on Windows 7? Is there a way to enable this?

    Read the article

  • Monitor utilities

    - by Adam Davis
    I'm a big fan of good monitor usage, but only currently use a few utilities to help me attain display nirvana across several systems and monitors. Part of this is due to not knowing what's available. Please list one monitor utility that you use and what it does for you per answer, and avoid duplicates - comment on and vote up the existing answers rather than adding a duplicate. Also, if there are existing questions that delve more specifically into one area of monitor utilities link that in a separate answer. -Adam

    Read the article

  • How do I compile DarWINE in PowerPC Mac OS X 10.4.11...?

    - by Craig W. Davis
    So far I've tried using MacPorts which gives me this error: /Error: Cannot install wine for the arch(s) 'powerpc' because Error: its dependency pkgconfig is only installed for the archs 'i386 ppc'. Error: Unable to execute port: architecture mismatch To report a bug, etc... (I'm not allowed to post two links due to being a new poster...)./ I've also tried using the build script I found in the DarWINE 0.9.12 SDK download that I found on the DarWINE SourceForge.net Project Page... I've also tried the build script that I found at http://code.google.com/p/osxwinebuilder/#Building_Wine_via_the_script... None of these attempts to build DarWINE have actually worked. Whenever I build using the DarWINE build script I run it as follows: /1. I decompress the WINE tarball into ~/Downloads/WINE 2. I cd into ~/Downloads/DarWINE. 3. I run ./winemaker ~/Downloads/WINE/wine-1.2.2 or ./winemaker ~/Downloads/WINE/wine-1.2-rc2 (the reason for trying WINE 1.2-rc2 is that some people managed to get it to build on PowerPC Macs running 10.5.8...)./ I made sure to install Xcode Tools 2.5 & all the SDKs too... The net result is either a syntax type error resulting from trying to run the checked out Google Code DarWINE build script or a bunch of make errors when trying to run the official DarWINE build script that I forcefully extracted from the DarWINE 0.9.12 SDK .dmg file by using Pacifist. I trying to build DarWINE on mid-April 2006 1.42 GHz eMac with DL SuperDrive with Bluetooth 2.0+EDR with 2 GBs of RAM running 10.4.11 as I mentioned earlier... (it came with 10.4.4 on the Mac's Restore DVD-ROM that I ordered from 1-800-SOS-APPL & coconutIdentityCard told me it was made on April 12th 2006 & I know that's right because when I reinstalled Mac OS X 10.4.4 it displayed that it was registered/previously owned by a Hawaiian school...): /make[1]: winegcc: Command not found make[1]: * [main.o] Error 127 make: * [dlls/acledit] Error 2./

    Read the article

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