Search Results

Search found 964 results on 39 pages for 'ryan b'.

Page 27/39 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • Memory Leak with jQuery UI inside UpdatePanel in ie7

    - by Ryan
    I have a fairly complex asp.net page based on UpdatePanels and jQuery UI. Unfortunately, when the panels update, the jQuery UI widgets leak memory like crazy in ie7, even if I manually 'destroy' them. Does anyone know a technique/patch to prevent these leaks? I've created a simple example page with a slider inside an UpdatePanel. Just click the 'Leak' button and refresh the page to see the leak in sieve. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Leak2.aspx.cs" Inherits="Leak2" %> <%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Leak</title> <link type="text/css" href="/jquery/css/custom-theme/jquery-ui-1.7.2.custom.css" rel="Stylesheet" /> <script type="text/javascript" src="/jquery/js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="/jquery/js/jquery-ui-1.7.2.custom.min.js"></script> </head> <body> <form id="form1" runat="server"> <div> <script type="text/javascript"> function initializeSlider() { $(".slider").slider({ min: 0, max: 100, value: 100, step: 5 }); } $(document).ready(function() { initializeSlider(); Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function() { initializeSlider(); }); }); </script> <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <div style="width: 300px;"> <div class="slider"></div> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Leak" /> </div> </ContentTemplate> </asp:UpdatePanel> </div> </form> </body> </html>

    Read the article

  • Can I customize the indentation of ternary operators in emacs' cperl-mode?

    - by Ryan Thompson
    In emacs cperl-mode, ternary operators are not treated specially. If you break them over multiple lines, cperl-mode simply indents each line the same way it indents any continued statement, like this: $result = ($foo == $bar) ? 'result1' : ($foo == $baz) ? 'result2' : ($foo == $qux) ? 'result3' : ($foo == $quux) ? 'result4' : fail_result; This is not very readable. Is there some way that I can convince cperl-mode indent like this? $result = ($foo == $bar) ? 'result1' : ($foo == $baz) ? 'result2' : ($foo == $qux) ? 'result3' : ($foo == $quux) ? 'result4' : fail_result; By the way, code example from this question.

    Read the article

  • PHP Regex: How to match anything except a pattern between two tags

    - by Ryan
    Hello, I am attempting to match a string which is composed of HTML. Basically it is an image gallery so there is a lot of similarity in the string. There are a lot of <dl> tags in the string, but I am looking to match the last <dl>(.?)+</dl> combo that comes before a </div>. The way I've devised to do this is to make sure that there aren't any <dl's inside the <dl></dl> combo I'm matching. I don't care what else is there, including other tags and line breaks. I decided I had to do it with regular expressions because I can't predict how long this substring will be or anything that's inside it. Here is my current regex that only returns me an array with two NULL indicies: preg_match_all('/<dl((?!<dl).)+<\/dl>(?=<\/div>)/', $foo, $bar) As you can see I use negative lookahead to try and see if there is another <dl> within this one. I've also tried negative lookbehind here with the same results. I've also tried using +? instead of just + to no avail. Keep in mind that there's no pattern <dl><dl></dl> or anything, but that my regex is either matching the first <dl> and the last </dl> or nothing at all. Now I realize . won't match line breaks but I've tried anything I could imagine there and it still either provides me with the NULL indicies or nearly the whole string (from the very first occurance of <dl to </dl></div>, which includes several other occurances of <dl>, exactly what I didn't want). I honestly don't know what I'm doing incorrectly. Thanks for your help! I've spent over an hour just trying to straighten out this one problem and it's about driven me to pulling my hair out.

    Read the article

  • How can I manually interpolate string escapes in a Perl string?

    - by Ryan Thompson
    In perl suppose I have a string like 'hello\tworld\n', and what I want is: 'hello world ' That is, "hello", then a literal tab character, then "world", then a literal newline. Or equivalently, "hello\tworld\n" (note the double quotes). In other words, is there a function for taking a string with escape sequences and returning an equivalent string with all the escape sequences interpolated?

    Read the article

  • Validation of dependent properties in a "live edit" WPF app

    - by Ryan Cromwell
    I'm working on an app which supports live editing. That is you update properties in one area and their impact is seen in another with hitting "apply". Happens to be a charting app. One such edit "group" allows specifying a range. A triple range in fact: High, Target and Low. Our validation is such that High must be greater than target, target must be greater than Low (rocket science). Our dilemma is that the visual experience is a bit jarring when someone wants to go from say 30,20,10 to 15,10,5. I'm curious if anyone has implemented a mechanism for this scenario that might fit well in our situation such that we don't "yell" at the user as they change the range values.

    Read the article

  • Silverlight: Binding a custom control to an arbitrary object

    - by Ryan Bates
    I am planning on writing a hierarchical organizational control, similar to an org chart. Several org chart implementations are out there, but not quite fit what I have in mind. Binding fields in a DataTemplate to a custom object does not seem to work. I started with a generic, custom control, i.e. public class NodeBodyBlock : ContentControl { public NodeBodyBlock() { this.DefaultStyleKey = typeof(NodeBodyBlock); } } It has a simple style in generic.xaml: <Style TargetType="org:NodeBodyBlock"> <Setter Property="Width" Value="200" /> <Setter Property="Height" Value="100" /> <Setter Property="Background" Value="Lavender" /> <Setter Property="FontSize" Value="11" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="org:NodeBodyBlock"> <Border Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Background="{TemplateBinding Background}" CornerRadius="4" BorderBrush="Black" BorderThickness="1" > <Grid> <VisualStateManager/> ... clipped for brevity </VisualStateManager.VisualStateGroups> <ContentPresenter Content="{TemplateBinding Content}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" /> </Grid> </Border> </ControlTemplate> </Setter.Value> </Setter> </Style> My plan now is to be able to use this common definition as a base definition of sorts, with customized version of it used to display different types of content. A simple example would be to use this on a user control with the following style: <Style TargetType="org:NodeBodyBlock" x:Key="TOCNode2"> <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> <StackPanel> <TextBlock Text="{Binding Path=NodeTitle}"/> </StackPanel> </DataTemplate> </Setter.Value> </Setter> </Style> and an instance defined as <org:NodeBodyBlock Style="{StaticResource TOCNode2}" x:Name="stTest" DataContext="{StaticResource DummyData}" /> The DummyData is defined as <toc:Node NodeNumber="mynum" NodeStatus="A" NodeTitle="INLine Node Title!" x:Key="DummyData"/> With a simple C# class behind it, where each of the fields is a public property. When running the app, the Dummy Data values simply do not show up in the GUI. A trivial test such as <TextBlock Text="{Binding NodeTitle}" DataContext="{StaticResource DummyData}"/> works just fine. Any ideas around where I am missing the plot?

    Read the article

  • Most efficient way to write over file after reading

    - by Ryan McClure
    I'm reading in some data from a file, manipulating it, and then overwriting it to the same file. Until now, I've been doing it like so: open (my $inFile, $file) or die "Could not open $file: $!"; $retString .= join ('', <$inFile>); ... close ($inFile); open (my $outFile, $file) or die "Could not open $file: $!"; print $outFile, $retString; close ($inFile); However I realized I can just use the truncate function and open the file for read/write: open (my $inFile, '+<', $file) or die "Could not open $file: $!"; $retString .= join ('', <$inFile>); ... truncate $inFile, 0; print $inFile $retString; close ($inFile); I don't see any examples of this anywhere. It seems to work well, but am I doing it correctly? Is there a better way to do this?

    Read the article

  • Displaying a notification when bluetooth is disconnected - Android

    - by Ryan T
    I am trying to create a program that will display a notification to the user if a Blue tooth device suddenly comes out of range from my Android device. I currently have the following code but no notification is displayed. I was wondering if it was possible I shouldn't use ACTION_ACL_DISCONNECTED because I believe the bluetooth stack would be expecting packets that state a disconnect is requested. My requirements state that the bluetooth device will disconnect without warning. Thank you for any assistance! BluetoothNotification.java: //This is where the notification is created. import android.app.Activity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.app.Activity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Bundle; public class BluetoothNotification extends Activity { public static final int NOTIFICATION_ID = 1; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); /** Define configuration for our notification */ int icon = R.drawable.logo; CharSequence tickerText = "This is a sample notification"; long when = System.currentTimeMillis(); Context context = getApplicationContext(); CharSequence contentTitle = "Sample notification"; CharSequence contentText = "This notification has been generated as a result of BT Disconnecting"; Intent notificationIntent = new Intent(this, BluetoothNotification.class); PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); /** Initialize the Notification using the above configuration */ final Notification notification = new Notification(icon, tickerText, when); notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); /** Retrieve reference from NotificationManager */ String ns = Context.NOTIFICATION_SERVICE; final NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns); mNotificationManager.notify(NOTIFICATION_ID, notification); finish(); } } Snippet from OnCreate: //Located in Controls.java IntentFilter filter1 = new IntentFilter(BluetoothDevice.ACTION_ACL_DISCONNECTED); this.registerReceiver(mReceiver, filter1); Snippet from Controls.java: private final BroadcastReceiver mReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); if (BluetoothDevice.ACTION_ACL_DISCONNECTED.equals(action)) { //Device has disconnected NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); } } };

    Read the article

  • very simple WebForm with masterpage

    - by Ryan
    I use method=get to send my data from one webform to the other. But I don't want to have in the URL querry things like: Search.aspx?_EVENTTARGET=&_EVENTARGUMENT=&_VIEWSTATE=%2FwEPDwUKLTYwODIwNTg5MQ9kFgJmD2QWAgIDDxYCHgZtZXRob2QFA2dldGRkGOirvzjoAxt%2BfOb915%2FpsYZXmAxLZZdpnK6UW7A9%2Fk83D&_PREVIOUSPAGE=cog5Yzt_1GerH9r2ERTIPbLWMCwMFYteZjmDYCbBO3vobCG4C_mWM7GZMNuBesyAjw77cvuNKl_aSUYzeajiW6W0CjI0tLB6ikjcM4t5Kbg1&__EVENTVALIDATION=%2FwEWAgKYsPjPDQKY24%2FQBBH4CPejKl3spy0A%2BtpMxb%2BCGVGJf73dYtmaEnIFF4IR&name=Amy&state=24&ctl00%24MainContent%24submit=Searchbut i only want the name and the state to be in the Get querry like: ?name=Amy&state=24 <configuration> <authentication mode="Forms"> <forms loginUrl="~/Account/Login.aspx" timeout="2880" /> </authentication> <membership> <providers> <clear/> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" /> </providers> </membership> <profile> <providers> <clear/> <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/> </providers> </profile> <roleManager enabled="false"> <providers> <clear/> <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" /> <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" /> </providers> </roleManager> </system.web> <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> </configuration>

    Read the article

  • Best way to validate a WinCE OS image (.bin) file?

    - by Ryan Clark
    We have a Windows CE 6.0 based product that allows for firmware upgrades through a web interface. I want to perform a sanity check on the new firmware image to be sure that it is valid. How should I perform the validation? I see in the BIOSLOADER code, there is support code for decoding a BIN file. I suppose I could massage that to perform the validation. Is there a better way? Thanks!

    Read the article

  • Showing renames in hg log?

    - by Ryan Thompson
    I know that Mercurial can track renames of files, but how do I get it to show me renames instead of adds/removes when I do hg log? For instance, instead of: A bin/extract-csv-column.pl A bin/find-mirna-binding.pl A bin/xls2csv-separate-sheets.pl A lib/Text/CSV/Euclid.pm R src/extract-csv-column.pl R src/find-mirna-binding.pl R src/modules/Text/CSV/Euclid.pm R src/xls2csv-separate-sheets.pl I want some indication that four files have been moved. I think I read somewhere that the output is like this to preserve backward-compatibility with something-or-other, but I'm not worried about that.

    Read the article

  • jQuer image hover animate

    - by Ryan Max
    Hello. I have the following jQuery script that makes an orange transparent hover effect cover the image when it's rolled over. How do I make it so this script will animate in and out (with a fade?) $(document).ready(function() { $('#gallery a').bind('mouseover', function(){ $(this).parent('li').css({position:'relative'}); var img = $(this).children('img'); $('<div />').text(' ').css({ 'height': img.height(), 'width': img.width(), 'background-color': 'orange', 'position': 'absolute', 'top': 0, 'left': 0, 'opacity': 0.5 }).bind('mouseout', function(){ $(this).remove(); }).insertAfter(this); }); });

    Read the article

  • Threading calls to web service in a web service - (.net 2.0)

    - by Ryan Ternier
    Got a question regarding best practices for doing parallel web service calls, in a web service. Our portal will get a message, split that message into 2 messages, and then do 2 calls to our broker. These need to be on separate threads to lower the timeout. One solution is to do something similar to (pseudo code): XmlNode DNode = GetaGetDemoNodeSomehow(); XmlNode ENode = GetAGetElNodeSomehow(); XmlNode elResponse; XmlNode demResponse; Thread dThread = new Thread(delegate { //Web Service Call GetDemographics d = new GetDemographics(); demResponse = d.HIALRequest(DNode); }); Thread eThread = new Thread(delegate { //Web Service Call GetEligibility ge = new GetEligibility(); elResponse = ge.HIALRequest(ENode); }); dThread.Start(); eThread.Start(); dThread.Join(); eThread.Join(); //combine the resulting XML and return it. //Maybe throw a bit of logging in to make architecture happy Another option we thought of is to create a worker class, and pass it the service information and have it execute. This would allow us to have a bit more control over what is going on, but could add additional overhead. Another option brought up would be 2 asynchronous calls and manage the returns through a loop. When the calls are completed (success or error) the loop picks it up and ends. The portal service will be called about 50,000 times a day. I don't want to gold plate this sucker. I'm looking for something light weight. The services that are being called on the broker do have time out limits set, and are already heavily logged and audited, so I'm not worried on that part. This is .NET 2.0 , and as much as I would love to upgrade I can't right now. So please leave all the goodies of 2.0 out please.

    Read the article

  • Nesting quotes in JavaScript/HTML

    - by Ryan Elkins
    How do you nest quotes in HTML beyond the second level? As far as I know, there are only 2 types of quotes - single(') and double("). I am aware of escaping - you have to escape in the code but it converts the escaped quotes back to regular quotes when it hits the browser. What is the accepted method to get around something like the following? <p onclick="exampleFunc('<div id="divId"></div>');">Some Text</p> That code prints to the browser: ');"Some Text

    Read the article

  • Saving a 'Date' using DataMapper on AppEngine+JRuby

    - by Ryan Montgomery
    I have a a model as follows: class Total include DataMapper::Resource property :id, Serial property :amount, Float, :default => 0.00 property :day, Date belongs_to :calendar end I am trying to select a specific Total from the data-store. class Calendar include DataMapper::Resource property :id, Serial property :name, String has n, :totals def get_total_for(date) return Total.first(:day => date, :calendar => self) end end When I call get_total_for(DateTime.now) I receive the following error on the call to the data-store. java.lang.IllegalArgumentException: day: org.jruby.RubyObject is not a supported property type. Is Date not allowed for usage in AppEngine? Is this a DataMapper issue? I have tried changing the name of the :day property to something else (hoping it was just a name conflict) but it doesn't seem to matter. Thanks for any help you can provide.

    Read the article

  • Speed of QHash lookups using QStrings as keys.

    - by Ryan R.
    I need to draw a dynamic overlay on a QImage. The component parts of the overlay are defined in XML and parsed out to a QHash<QString, QPicture> where the QString is the name (such as "crosshairs") and the QPicture is the resolution independent drawing. I then draw components of the overlay as they are needed at a position determined during runtime. Example: I have 10 pictures in my QHash composing every possible element in a HUD. During a particular frame of video I need to draw 6 of them at different positions on the image. During the next frame something has changed and now I only need to draw 4 of them but 2 of those positions have changed. Now to my question: If I am trying to do this quickly, should I redefine my QHash as QHash<int, QPicture> and enumerate the keys to counteract the overhead caused by string comparisons; or are the comparisons not going to make a very big impact on performance? I can easily make the conversion to integer keys as the XML parser and overlay composer are completely separate classes; but I would like to use a consistent data structure across the application. Should I overcome my desire for consistency and re-usability in order to increase performance? Will it even matter very much if I do?

    Read the article

  • How to handle customers with multiple addresses in CakePHP

    - by Ryan
    I'm putting together a system to track customer orders. Each order will have three addresses; a Main contact address, a billing address and a shipping address. I do not want to have columns in my orders table for the three addresses, I'd like to reference them from a separate table and have some way to enumerate the entry so I can determine if the addressing is main, shipping or billing. Does it make sense to create a column in the address table for AddressType and enumerate that or create another table - AddressTypes - that defines the address enumeration and link to that table? I have found other questions that touch on this topic and that is where I've taken my model. The problem I'm having is taking that into the cakePHP convention. I've been struggling to internalize the direction OneToMany relationships are formed - the way the documentation states feels backwards to me. Any help would be appreciated, Thanks!

    Read the article

  • Cross-browser method for hiding page elements until all content is loaded to prevent layout from appearing broken during load?

    - by Ryan
    I have an issue where due to some elements loading faster than others, the page looks broken for a few seconds at the start. An example is the CSS Pie behavior that allows me to do curved corners in IE, it appears before it becomes curved which looks bad. What would be ideal would be it somehow knowing when everything is loaded and then appear all at once, possibly including some kind of elegant visual way of not making the user feel impatient... any ideas or common tricks for doing this?

    Read the article

  • Adding tables to sql server result in Domain\user.name.tablename

    - by Ryan Howe
    Our app uses migratordotnet to modify the backing SQL Server 2005 database. This works great 99% of the time but we are running into an issue. We have a client that is using and Active Directory group for sql server login and when new tables are added it creates them as Domain\login.table_name. What permissions are needed to be given to the AD group to add the tables as dbo.table_name? This does not happen in with all of our clients with similar configurations so I must be missing something.

    Read the article

  • Is there a function similar to Math.Max for Entity Framework?

    - by Ryan ONeill
    I have an entity framework query as follows; From T In Db.MyTable Where (T.Col1 - T.Col2) + T.Col3 - T.Col4 > 0 _ Select T I now need to make sure that the bracketed part '(T.Col1 - T.Col2)' does not go below zero. In .Net, I'd code it as follows (but obviously EF does not like Math.Max). From T In Db.MyTable Where Math.Max(T.Col1 - T.Col2,0) + T.Col3 - T.Col4 > 0 _ Select T Is there an easy way to do this? I am using EF 2.0 (not the latest, just released version). Thanks in advance

    Read the article

  • Add database to plesk domain account via XML

    - by Ryan French
    Hi All, I'm currently working on trying to integrate a site with Plesk via the XML API and I've run into a bit of an issue. I've managed to get most things working but I'm trying to add a database to a domain and I keep getting an error. When creating the database I extract a list of Domain Accounts associated with the current clients account, and use the domain guid that is returned in the XML to try and create the new database, but Plesk is returning an error stating that the id I am using is not a valid id. I've looked at the documentation and it is saying that the domain ID that I should be sending is an integer, but the only ID I can find for the domain is the guid, which is a string. Anyone done anything like this before and know where I can get the ID from?

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >