Search Results

Search found 703 results on 29 pages for 'ashley ray'.

Page 10/29 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | 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

  • 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

  • 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

  • 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

  • ifcfg-eth* on CentOS 6.x, but for IPv6 only?

    - by Ray Hoffman
    Could someone kindly provide a skeleton ifcfg-eth0:[X] for creating an alias with a IPv6 address and no IPv4 address? Or, alternatively, what's the IPv6 equivalent of this: in /etc/sysconfig/network-scripts/ifcfg-eth0:1 DEVICE=eth0:1 ONBOOT=yes BOOTPROTO=static IPADDR=42.69.66.66 NETMASK=255.255.255.0 Or does this not even make sense in IPv6 space? I know that I can use, for example: IPV6INIT=yes IPV6ADDR=2600:4200::6900:6666:dead:beef But then do I need to specify that there is no IPv4 address associated with this alias? If so, how? And do I need to also specify the IPV6_DEFAULTGW? Or can it piggyback on the eth0 (unaliased) gateway, which is specifed, like with IPv4 aliases? EDIT: Answered my own question! The easiest way to accomplish this seems to be not to create an alias as with IPV4, but to specify, for example, IPV6ADDR_SECONDARIES=2600:4200::6900:6666:dead:beef on the script for the base interface, e.g. ifcfg-eth0.

    Read the article

  • Looking to use .htaccess to create SEO friendly URLs

    - by Ray
    For SEO purposes, I need someone to modify my .htaccess file. Here's what I need to do: current URL: http://www.abc.com/index.php?page=show_type&ord=1 to new URL: http://www.abc.com/amazing Please note that that if someone types in http://www.abc.com/amazing, they must be served content from the current URL, but the new URL must stay in the address bar. I tried this and it didn't seem to work RewriteEngine On RewriteRule ^/?amazing/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/ /index.php?page=show_type&ord=1

    Read the article

  • Importing csv list of contacts into Exchange 2007 GAL and create Distribution Group

    - by Ken Ray
    Here's the situation: We have a list of about 1,000 contacts (Lawyers in the area our court serves) with name and email address. I've been asked to create an email distribution list that can be used to sent emails to all of the external users on that list. I've seen various articles using the Exchange Management Shell and the Import-csv command piped through a ForEach-Object to a New-MailContact to set up the contacts. However, Exchange Management Shell is rather unhelpful, and it isn't working. What I believe I need to do is: 1) Set up a new distribution group using the Exchange Management Console. Let's say this new distribution group (which appears in the list of Distribution Groups under Recipient Configuration) is called "FloridaBar". 2) Make sure I have a csv file of the information I want to import. 3) Open Exchange Management Shell, and enter the following command: Import-csv C:\filename.csv | ForEach-Object { New-MailContact -Name $."NameColumnName" -ExternalEmailAddress $."EmailAddressColumn" -org FloridaBar Now, creating 1,000+ contacts in active directory - I assume that shouldn't be an issue. Do I have the "-org" parm wrong? Do I need to spell out the complete organization unit name (my.domain.name/Users/FloridaBar)? Is there a better way of doing this? Thanks in advance Ken

    Read the article

  • How to run Event Viewer as another user?

    - by Ray Cheng
    I want to create a shortcut to run Windows Event Viewer as another user, but the following doesn't seem to work. Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Windows\System32>C:\Windows\System32\runas.exe /noprofile /user:domain\username "C:\Windows\system32\eventvwr.msc /s" Enter the password for domain\username: Attempting to start C:\Windows\system32\eventvwr.msc /s as user "dnr\adm_rche490" ... RUNAS ERROR: Unable to run - C:\Windows\system32\eventvwr.msc /s 193: C:\Windows\system32\eventvwr.msc /s is not a valid Win32 application. But if I create the shortcut without the runas part, it works but with the current logon user. What am I doing wrong?

    Read the article

  • How to maintain the log source host using logstash

    - by Ray Rodriguez
    I am following the steps in this blog to set up rsyslog + logstash + graylog2 and I can't figure out how to replace the @source_host attribute in logstash using the mutate - replace filter. In the exmaple the author replaces his @source_host with a string value but I'd like to use the actual value that is parsed from in this case a syslog. mutate { type => loc1 replace => ["@source_host", "loc1"] } mutate { type => loc2 replace => ["@source_host", "loc2"] } How do I actually maintain the original source host in my logs?

    Read the article

  • Add a small RAID card? Will it help overall stability and performance of my nine hard drives?

    - by Ray
    Hi, Will I get any extra genuine added performance and RAID stability if I insert a basic RAID card into a PCI-E x1 slot? I am considering the Adaptec 1220SA - 2 port SATA , pci-express (1x) , raid 0/1. Ok it only supports two SATA drives. Purpose is to help support the eight internal hard drives (1TB each), a DVD drive and an external e-SATA connected 2TB hard drive - by dealing with two of the internal hard drives. My current configuration of eight internal 1TB Barracuda (7200.12) SATA hard drives, one external 2TB SATA Western Digital Green Drive (e-SATA) and one DVD drive can already be supported by the Intel P55 & JMicron controllers on the ASUS motherboard : the Intel P55 (controls six HDD; configured as three x RAID 1), and the JMicron (controls two HDD as one RAID 1, as well as the DVD drive and the external SATA drive via the motherboard's e-SATA port (controlled by the JMicron)). Bigger picture details : I have an ASUS motherboard designed for the LGA1156 type processor and it includes the Intel P55 Express Chipset and JMicron. I am using the Intel Core i7-870 processor, and have 8GB DDR3 (1333) memory (four x 2GB Corsair DIMMs). Enough overall power. The power supply is more than sufficicient for the system. Corsair AX850. The system will never need the full 850 watts (future : second graphics card). The RAID card would provide hardware RAID 1 for two of the eight intrnal drives. It would either reduce the load on : the Intel P55 firmware RAID support, or replace the JMicron controller's RAID 1 set. I am busy installing the above configuration using Windows 7 Ultimate 64-bit as the OS. The RAID card is a last minute addition to the plan. Is it worth spending the extra R700 - R900 on the Adaptec 1220SA, or equivalent RAID card? I cannot afford to spend yet another R2000 - R3000 on a RAID card that would support many SATA2 hard drives, with a better RAID, example the RAID 5. My Issue & assumption : I am trusting that the Intel P55 chipset can properly handle six drives, configured as three * RAID 1. I am assuming that the JMicron can handle, using its RED SATA ports, one RAID-1 (two HDDs). The DVD drive connects to the JMicron optical SATA port 1 (white port 1). White port 2 is not used. The e-SATA connection is from the JMicron straight to, and through the motherboard - to an on-board (rear panel) e-SATA port. Am I being a little hopeful in only using the on-board Intel P55 and the JMicron? Is it a waste of money to install a RAID card that handles two SATA2 drives? OR Is it wisdom to take the pressure a little off the Intel P55? Obviously I am interested in data security, hence RAID 1, not RAID Zero. RAID 5 would be nice. The CPU, Intel Core i7-870 will provide the clout. Context to nine drives : I am using virtualisation with Windows 7 Ultimate. Bootable VMs. The operating system gets a mirror. Loaded apps gets a mirror. The current design data is kept in another mirror and Another mirror is back-up one and / or VM territory. Then the external 2TB drive (via e-SATA) is the next layer of data security and then finally, I use off-site data security. Thanks.

    Read the article

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