Search Results

Search found 966 results on 39 pages for 'ryan elkins'.

Page 21/39 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • C# Checked exceptions

    - by Ryan B.
    One feature I really liked in Java that isn't in C# is checked exceptions, Is there any way to simulate or turn on checked exceptions in Visual Studio? Yes I know a lot of people dislike them, but I find they can be helpful.

    Read the article

  • Android - MapView contained within a Listview

    - by Ryan
    Hello, Currently I am trying to place a MapView within a ListView. Has anyone had any success with this? Is it even possible? Here is my code: ListView myList = (ListView) findViewById(android.R.id.list); List<Map<String, Object>> groupData = new ArrayList<Map<String, Object>>(); Map<String, Object> curGroupMap = new HashMap<String, Object>(); groupData.add(curGroupMap); curGroupMap.put("ICON", R.drawable.back_icon); curGroupMap.put("NAME","Go Back"); curGroupMap.put("VALUE","By clicking here"); Iterator it = data.entrySet().iterator(); while (it.hasNext()) { //Get the key name and value for it Map.Entry pair = (Map.Entry)it.next(); String keyName = (String) pair.getKey(); String value = pair.getValue().toString(); if (value != null) { //Add the parents -- aka main categories curGroupMap = new HashMap<String, Object>(); groupData.add(curGroupMap); //Push the correct Icon if (keyName.equalsIgnoreCase("Phone")) curGroupMap.put("ICON", R.drawable.phone_icon); else if (keyName.equalsIgnoreCase("Housing")) curGroupMap.put("ICON", R.drawable.house_icon); else if (keyName.equalsIgnoreCase("Website")) curGroupMap.put("ICON", R.drawable.web_icon); else if (keyName.equalsIgnoreCase("Area Snapshot")) curGroupMap.put("ICON", R.drawable.camera_icon); else if (keyName.equalsIgnoreCase("Overview")) curGroupMap.put("ICON", R.drawable.overview_icon); else if (keyName.equalsIgnoreCase("Location")) curGroupMap.put("ICON", R.drawable.map_icon); else curGroupMap.put("ICON", R.drawable.icon); //Pop on the Name and Value curGroupMap.put("NAME", keyName); curGroupMap.put("VALUE", value); } } curGroupMap = new HashMap<String, Object>(); groupData.add(curGroupMap); curGroupMap.put("ICON", R.drawable.back_icon); curGroupMap.put("NAME","Go Back"); curGroupMap.put("VALUE","By clicking here"); //Set up adapter mAdapter = new SimpleAdapter( mContext, groupData, R.layout.exp_list_parent, new String[] { "ICON", "NAME", "VALUE" }, new int[] { R.id.photoAlbumImg, R.id.rowText1, R.id.rowText2 } ); myList.setAdapter(mAdapter); //Bind the adapter to the list Thanks in advance for your help!!

    Read the article

  • Best Practice: Legitimate Cross-Site Scripting

    - by Ryan
    While cross-site scripting is generally regarded as negative, I've run into several situations where it's necessary. I was recently working within the confines of a very limiting content management system. I needed to include database code within the page, but the hosting server didn't have anything usable available. I set up a couple barebones scripts on my own server, originally thinking that I could use AJAX to import the contents of my scripts directly into the template of the CMS (thus retaining dynamic images, menu items, CSS, etc.). I was wrong. Due to the limitations of XMLHttpRequest objects, it's not possible to grab content from a different domain. So I thought "iFrame" - even though I'm not a fan of frames, I thought that I could create a frame that matched the width and height of the content, so that it would appear native. Again, I was blocked by cross-site scripting "protections." While I could indeed load a remote file into the iFrame, I couldn't execute JavaScript to modify its size on either the host page or inside the loaded page. In this particular scenario, I wasn't able to point a subdomain to my server. I also couldn't create a script on the CMS server that could proxy content from my server, so my last thought was to use a remote JavaScript. A remote JavaScript works. It breaks when the user has JavaScript disabled, which is a downside; but it works. The "problem" I was having with using a remote JavaScript was that I had to use the JS function document.write() to output any content. Any output that isn't JS causes script errors. In addition to using document.write() for every line, you also have to ensure that the content is escaped - or else you end up with more script errors. My solution was as follows: My script received a GET parameter ("page") and then looked for the file ({$page}.php), and read the contents into a variable. However, I had to use awkward buffering techniques in order to actually execute the included scripts (for things like database interaction) then strip the final content of all line break characters ("\n") followed by escaping all required characters. The end result is that my original script (which outputs JavaScript) accesses seemingly "standard" scripts on my server and converts their standard output to JavaScript for displaying within the CMS template. While this solution works, it seems like there may be a better way to accomplish the same thing. What is the best way to make cross-site scripting work specifically for the purpose of including content from a completely different domain?

    Read the article

  • How do I stop myself from redesigning my Silverlight screens? Is there a theme that looks like Sket

    - by Dan Ryan
    Whilst working in Silverlight I am always fighting the urge to work on the screen design rather than coding the behaviour (which is what I should be doing). My cunning plan is to find a theme that looks something like MS SketchFlow or Balsamiq which will remind me of the draft nature of the screens whilst being somewhat prettier than the default look & feel of Silverlight. Does anyone know of such a theme? Alternatively can anyone give advise on how they overcame there design addiction :) Thanks, Dan

    Read the article

  • CHECK/NOCHECK for Sql Compact Edition

    - by Ryan H
    I am attempting to wipe and repopulate test data on SQL CE. I am getting an error due to FK constraints existing. Typically in Sql2005 I would ALTER TABLE [tablename] CHECK/NOCHECK CONSTRAINT ALL to enable/disable all constraints. From what I could find in my searching, it seems that this might not be supported in CE. Is that true? If so, is there an alternative?

    Read the article

  • WPF Custom ListBox as Buttons Click not firing

    - by Ryan
    I am attempting to have a ListBox of TextBoxes with click events. I have read that one way to achieve this was to have a list of Buttons and call ButtonBase.Click="" on the ListBox. This was not working. Any advice as to how I would hook up a click event to the listbox items? Thanks <Window.Resources> <ControlTemplate x:Key="MouseOverFocusTemplate" > <Grid> <Grid.RowDefinitions> <RowDefinition Height="55*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <TextBox Width="290" TextAlignment="Left" VerticalContentAlignment="Center" BorderThickness="0" BorderBrush="Transparent" Foreground="#FF6FB8FD" FontSize="24" TextWrapping="Wrap" Text="{Binding .}" Grid.Column="1" Grid.Row="1" MinHeight="55" Cursor="Hand" IsReadOnly="True" FontFamily="Arial" > <TextBox.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FF013B73" Offset="0.501"/> <GradientStop Color="#FF091F34"/> <GradientStop Color="#FF014A8F" Offset="0.5"/> <GradientStop Color="#FF003363" Offset="1"/> </LinearGradientBrush> </TextBox.Background> </TextBox> </Grid> </ControlTemplate> <Style x:Key="MouseOverFocusStyle" TargetType="{x:Type TextBox}"> <Setter Property="Template" Value="{StaticResource MouseOverFocusTemplate}"/> </Style> <ControlTemplate x:Key="LostFocusTemplate" > <Grid> <Grid.RowDefinitions> <RowDefinition Height="55*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <TextBox Width="290" TextAlignment="Left" VerticalContentAlignment="Center" BorderThickness="0" BorderBrush="Transparent" Foreground="#FF6FB8FD" FontSize="24" TextWrapping="Wrap" Text="{Binding .}" Grid.Column="1" Grid.Row="1" MinHeight="55" Cursor="Hand" IsReadOnly="True" FontFamily="Arial" > <TextBox.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <LinearGradientBrush.RelativeTransform> <TransformGroup> <ScaleTransform CenterX="0.5" CenterY="0.5"/> <SkewTransform CenterX="0.5" CenterY="0.5"/> <RotateTransform CenterX="0.5" CenterY="0.5"/> <TranslateTransform/> </TransformGroup> </LinearGradientBrush.RelativeTransform> <GradientStop Color="#FF091F34" Offset="1"/> <GradientStop Color="#FF002F5C" Offset="0.4"/> </LinearGradientBrush> </TextBox.Background> </TextBox> </Grid> </ControlTemplate> <Style x:Key="LostFocusStyle" TargetType="{x:Type TextBox}"> <Setter Property="Template" Value="{StaticResource LostFocusTemplate}"/> </Style> <ControlTemplate x:Key="GotFocusTemplate" > <Grid> <Grid.RowDefinitions> <RowDefinition Height="55*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <TextBox Width="290" TextAlignment="Left" VerticalContentAlignment="Center" BorderThickness="0" BorderBrush="Transparent" Foreground="#FFE38E27" FontSize="24" TextWrapping="Wrap" Text="{Binding .}" Grid.Column="1" Grid.Row="1" MinHeight="55" Cursor="Hand" IsReadOnly="True" FontFamily="Arial" > <TextBox.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="Black" Offset="0.501"/> <GradientStop Color="#FF091F34"/> <GradientStop Color="#FF002F5C" Offset="0.5"/> </LinearGradientBrush> </TextBox.Background> </TextBox> </Grid> </ControlTemplate> <Style x:Key="GotFocusStyle" TargetType="{x:Type TextBox}"> <Setter Property="Template" Value="{StaticResource GotFocusTemplate}"/> </Style> <Style TargetType="{x:Type Button}" x:Key="listButton"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Border BorderBrush="Black" BorderThickness="1" Margin="-2,0,0,-1"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="55*" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <Grid.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="1" ScaleY="1"/> <SkewTransform AngleX="0" AngleY="0"/> <RotateTransform Angle="0"/> <TranslateTransform X="0" Y="0"/> </TransformGroup> </Grid.RenderTransform> <!--<ScrollViewer x:Name="PART_ContentHost" />--> <TextBox Width="290" TextAlignment="Left" VerticalContentAlignment="Center" BorderThickness="0" BorderBrush="Transparent" Foreground="#FF6FB8FD" FontSize="24" Style="{StaticResource LostFocusStyle}" TextWrapping="Wrap" Text="{Binding .}" Grid.Column="1" Grid.Row="1" MinHeight="55" Cursor="Hand" IsReadOnly="True" FontFamily="Arial" Name="bar" > <TextBox.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <LinearGradientBrush.RelativeTransform> <TransformGroup> <ScaleTransform CenterX="0.5" CenterY="0.5"/> <SkewTransform CenterX="0.5" CenterY="0.5"/> <RotateTransform CenterX="0.5" CenterY="0.5"/> <TranslateTransform/> </TransformGroup> </LinearGradientBrush.RelativeTransform> <GradientStop Color="#FF091F34" Offset="1"/> <GradientStop Color="#FF002F5C" Offset="0.4"/> </LinearGradientBrush> </TextBox.Background> </TextBox> </Grid> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="true"> <Setter TargetName="bar" Property="Style" Value="{StaticResource MouseOverFocusStyle}" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <DataTemplate x:Key="CustomListData" DataType="{x:Type ListBoxItem}"> <Button Style="{StaticResource listButton}" /> </DataTemplate> </Window.Resources> <Window.DataContext> <ObjectDataProvider ObjectType="{x:Type local:ImageLoader}" MethodName="LoadImages" /> </Window.DataContext> <ListBox ItemsSource="{Binding}" Width="320" Background="#FF021422" BorderBrush="#FF1C4B79"> <ListBox.Resources> <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}">Transparent</SolidColorBrush> <Style TargetType="{x:Type ListBox}"> <Setter Property="ItemTemplate" Value="{StaticResource CustomListData }" /> <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" /> </Style> </ListBox.Resources> </ListBox>

    Read the article

  • ng-grid get filtered column count after filtering

    - by Ryan Langton
    I'm using ng-grid with filtering. Any time the filter updates I want to get the filtered item count. I have been able to do this using the filteredRows property of ngGrid. However I'm getting the rows BEFORE the filtering occurs and I want them AFTER the filtering occurs. Here is a plunker to demonstrate the behavior: http://plnkr.co/edit/onyE9e?p=preview Here is the code where filtering is occuring: $scope.$watch('gridOptions.filterOptions.filterText2', function(searchText, oldsearchText) { if (searchText !== oldsearchText) { $scope.gridOptions.filterOptions.filterText = "name:" + searchText + "; "; $scope.recordCount = $scope.gridOptions.ngGrid.filteredRows.length; } });

    Read the article

  • Process XML in C# using external entity file

    - by Ryan Berger
    I am processing an XML file (which does not contain any dtd or ent declarations) in C# that contains entities such as &eacute; and &agrave;. I receive the following exception when attempting to load an XML file... XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(record); Reference to undeclared entity 'eacute'. I was able to track down the proper ent file here. How do I tell XmlDocument to use this ent file when loading my XML file?

    Read the article

  • IE image map remains clickable behind another div

    - by Ryan Giglio
    I have an Image Map of the United States. When you click on a state, the map fades out and a map of that state appears with an image map of the area codes in the state. In Firefox, Safari, and Chrome, the state map becomes clickable and the United States map becomes unclickable until you close the sate popover. However in Internet Explorer, the United States map remains clickable through the state popover, and I cannot click on any area codes. Here is my javascript: $(document).ready(function() { $("#usMap").html(); $("#usMap").load("/includes/us_map.inc"); }); $('area').live('click', function() { var state = $(this).attr("class"); var statePopover = $("<div id='statePopoverContainer'><a id='popoverCloseButton'>Close State</a><div id='statePopover'></div></div>"); $("#usMap").append(statePopover); $("#usMapImage").fadeTo('slow', 0.2); $("#statePopover").load("/includes/stateMaps/" + state + ".html"); }); $("#popoverCloseButton").live('click', function() { $("#statePopoverContainer").remove(); $("#usMapImage").fadeTo('slow', 1); }); I am loading the map on document ready because if you don't have Javascript, something else appears. And here is the CSS for all things related: div#usMap { width:676px; height:419px; text-align: center; position: relative; background-color:#333333; z-index: 1; } img#usMapImage { z-index: 1; } area { cursor: pointer; } div#statePopoverContainer { width:100%; height:100%; z-index:5; position:absolute; top:0; left:0; } a#popoverCloseButton { position:absolute; right:0; padding-right:5px; padding-top:5px; color:#FFFFFF; cursor:pointer; } You can see this happening at http://dev.crewinyourcode.com/ Login with beta/tester

    Read the article

  • Interface Builder caching bad data (voodoo)

    - by Ryan Townshend
    Sometimes IB will hold onto old or bad references, and I cannot seem to remove or edit them. EDIT I have made this a wiki question with the intention of gathering more data on the phenomenon. Answers involving situations where other coders have encountered this are welcome. This happened to me again last night with a table controller. When I created a spike project to try and reproduce the error, the system worked the way I anticipated. Then back in the actual project the bad behavior continued, even if I remove the xib file and all controllers involved. Creating a whole new project with none of the original (problematic) xib and nib files worked correctly. This question is not about the specifics of this incident but about this type of incident in IB. Does anyone know more about this type of bad IB behaviour, and possibly a more stylish way to to eliminate it than nuking the project? Note, removing the offending IB files and recreating them in the same project has not solved this for me in the past, only whole new projects. Answers regarding examples of when/how this glitch has been observed/created are welcome as well.

    Read the article

  • How to set username and password for SmtpClient object in .NET?

    - by Ryan
    I see different versions of the constructor, one uses info from web.config, one specifies the host, and one the host and port. But how do I set the username and password to something different from the web.config? We have the issue where our internal smtp is blocked by some high security clients and we want to use their smtp server, is there a way to do this from the code instead of web.config?

    Read the article

  • multiple redirect??

    - by Ryan Pitts
    Ok, i won't go into the full details (too much to explain) but here is what i am trying to do. I have a button on a webpage (we'll call page-1) that links to a page (we'll call it page-2). This page opens in the same window. However, i need the page (page-2) that opens to open up a new window with another page (we'll call this one page-3) when it loads. So virtually when you click the initial button (on page-1) it will go to a new page (page-2) AND a window will open as well with a different page (page-3). This is where it gets tricky. I need page-2 to automatically redirect back to page-1 after it launches page-3. Is this possible and if so, how?? Could it be a JQuery thing? Please just give some answers...i know this is way crazy and a huge workaround - but this is my last resort for this particular website. I have to do it this way because of the lack of control over some of the code.

    Read the article

  • Partial overriding in Java (or dynamic overriding while overloading)

    - by Lie Ryan
    If I have a parent-child that defines some method .foo() like this: class Parent { public void foo(Parent arg) { System.out.println("foo in Function"); } } class Child extends Parent { public void foo(Child arg) { System.out.println("foo in ChildFunction"); } } When I called them like this: Child f = new Child(); Parent g = f; f.foo(new Parent()); f.foo(new Child()); g.foo(new Parent()); g.foo(new Child()); the output is: foo in Parent foo in Child foo in Parent foo in Parent But, I want this output: foo in Parent foo in Child foo in Parent foo in Child I have a Child class that extends Parent class. In the Child class, I want to "partially override" the Parent's foo(), that is, if the argument arg's type is Child then Child's foo() is called instead of Parent's foo(). That works Ok when I called f.foo(...) as a Child; but if I refer to it from its Parent alias like in g.foo(...) then the Parent's foo(..) get called irrespective of the type of arg. As I understand it, what I'm expecting doesn't happen because method overloading in Java is early binding (i.e. resolved statically at compile time) while method overriding is late binding (i.e. resolved dynamically at compile time) and since I defined a function with a technically different argument type, I'm technically overloading the Parent's class definition with a distinct definition, not overriding it. But what I want to do is conceptually "partially overriding" when .foo()'s argument is a subclass of the parent's foo()'s argument. I know I can define a bucket override foo(Parent arg) in Child that checks whether arg's actual type is Parent or Child and pass it properly, but if I have twenty Child, that would be lots of duplication of type-unsafe code. In my actual code, Parent is an abstract class named "Function" that simply throws NotImplementedException(). The children includes "Polynomial", "Logarithmic", etc and .foo() includes things like Child.add(Child), Child.intersectionsWith(Child), etc. Not all combination of Child.foo(OtherChild) are solvable and in fact not even all Child.foo(Child) is solvable. So I'm best left with defining everything undefined (i.e. throwing NotImplementedException) then defines only those that can be defined. So the question is: Is there any way to override only part the parent's foo()? Or is there a better way to do what I want to do?

    Read the article

  • PDF permissions management with ASP.NET - Timeout Issue

    - by Ryan Smith
    I have a website that has several PDF files. I need to have quite a few of them locked down with the standard ASP.NET authentication (in a folder with web.config that denies anonymous users). I set PDF files to get handled by the ASP.NET worker process and added: <add type="System.Web.StaticFileHandler" path="*.pdf" verb="*" /> to my web.config, but for some reason they hang when downloading. I've seen this issue before on an old server, and for the live of me I can't remember what I did to solve it. Does anyone have any idea? Thanks.

    Read the article

  • Spring/Hibernate/Junit example of testing DAO against HSQLDB

    - by Ryan P.
    Hi guys, I'm working on trying to implement a JUnit test to check the functionality of a DAO. (The DAO will create/read a basic object/table relationship in HSQLDB). The trouble I'm having is the persistence of the DAO (for the non-test code) is being completed through an in-house solution using Spring/Hibernate, which eliminates the usual *.hbm.xml templates that most examples I have found contain. Beacuse of this, I'm having some trouble understanding how to setup a JUnit test to implement the DAO to create/read (just very basic funtionality) to an in-memory HSQLDB. I have found a few examples, but the usage of the in-house persistence means I can't extend some of the classes the examples show (I can't seem to get the application-context.xml setup properly). Can anyone suggest any projects/examples I could take a look at (or any documentation) to further my understanding of the best way to implement this test functionality? I feel like this should be really simple, but I keep running into problems implementing the examples I have found. Thanks in advance!

    Read the article

  • Logging in with WebFinger and OpenID

    - by Ryan
    I would like to apologize in advance for the ugly formatting. In order to talk about the problem, I need to be posting a bunch of URLs, but the excessive URLs and my lack of reputation makes StackOverflow think I could be a spammer. Any instance of 'ht~tp' is supposed to be 'http'. '{dot}' is supposed to be '.' and '{colon}' is supposed to be ':'. Also, my lack of reputation has prevented me from tagging my question with 'webfinger' and 'google-profiles'. Onto my question: I am messing around with WebFinger and trying to create a small rails app that enables a user to log in using nothing but their WebFinger account. I can succesfully finger myself, and I get back an XRD file with the following snippet: Link rel="ht~tp://specs{dot}openid{dot}net/auth/2.0/provider" href="ht~tp://www{dot}google{dot}com/profiles/{redacted}"/ Which, to me, reads, "I have an OpenID 2.0 login at the url: ht~tp://www{dot}google{dot}com/profiles/{redacted}". But when I try to use that URL to log in, I get the following error OpenID::DiscoveryFailure (Failed to fetch identity URL ht~tp://www{dot}google{dot}com/profiles/{redacted} : Error encountered in redirect from ht~tp://www{dot}google{dot}com/profiles/{redacted}: Error fetching /profiles/{Redacted}: Connection refused - connect(2)): When I replace the profile URL with 'ht~tps://www{dot}google{dot}com/accounts/o8/id', the login works perfectly. here is the code that I am using (I'm using RedFinger as a plugin, and JanRain's ruby-openid, installed without the gem) require "openid" require 'openid/store/filesystem.rb' class SessionsController < ApplicationController def new @session = Session.new #render a textbox requesting a webfinger address, and a submit button end def create ####################### # # Pay Attention to this section right here # ####################### #use given webfinger address to retrieve openid login finger = Redfinger.finger(params[:session][:webfinger_address]) openid_url = finger.open_id.first.to_s #openid_url is now: ht~tp://www{dot}google{dot}com/profiles/{redacted} #Get needed info about the acquired OpenID login file_store = OpenID::Store::Filesystem.new("./noncedir/") consumer = OpenID::Consumer.new(session,file_store) response = consumer.begin(openid_url) #ERROR HAPPENS HERE #send user to OpenID login for verification redirect_to response.redirect_url('ht~tp://localhost{colon}3000/','ht~tp://localhost{colon}3000/sessions/complete') end def complete #interpret return parameters file_store = OpenID::Store::Filesystem.new("./noncedir/") consumer = OpenID::Consumer.new(session,file_store) response = consumer.complete params case response.status when OpenID::SUCCESS session[:openid] = response.identity_url #redirect somehwere here end end end Is it possible for me to use the URL I received from my WebFinger to log in with OpenID?

    Read the article

  • Regular expression for bounce email message

    - by Ryan
    I am looking for a regular expression (or other method if there is such a thing) for detecting bounce email messages. So far I have been going through our unattended mail box and adding strings that I find into a regex. I figured someone would have something that is already complete rather than me re-inventing the wheel. Here is an example of what I have so far: /reason: 550|permanent fatal errors|Error 550|Action: Failed|Mailbox does not exist|Delivery to the following recipients failed/i

    Read the article

  • Dual slider control with custom skin

    - by Ryan French
    Hi All, I'm currently trying to create a page for users to select two points from a range, using a slide control. The first point in the range is when an alert will be sent to the user, the second point is a max limit. What I would like to do is have the bar colored green from the 0 point to the first slider point, then orange between the two sliders, and lastly red from the second slider up to the other end of the bar. Does anyone know of an easy was I can do this or of a slider control that can be skinned to do this?

    Read the article

  • Jquery Drag-Drop (Getting element being dropped into)

    - by Ryan
    I am trying to detect which cell an object is being dropped into. <table> <tr> <td class="weekday">Sun</td> <td class="weekday">Mon</td> <td class="weekday">Tue</td> <td class="weekday">Wed</td> <td class="weekday">Thu</td> <td class="weekday">Fri</td> <td class="weekday">Sat</td> </tr> <tr> <td class="droppable">&nbsp;</td> <td class="droppable">&nbsp;</td> <td class="droppable">&nbsp;</td> <td class="droppable">&nbsp;</td> <td class="droppable">&nbsp;</td> <td class="droppable">&nbsp;</td> <td class="droppable">&nbsp;</td> </tr> </table> <div class="draggable">Drag Me</div> on drop, how do i determine which day the div was dropped into. thanks for any help.

    Read the article

  • How to add a chart created in code behind to the rendered html page?

    - by Ryan
    I'm trying to create a .net charting control completely in the code behind and insert that chart at a specific location on the web page. Here is my html page: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!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></title> </head> <body> <form id="form1" runat="server"> <div id="chart"></div> </form> </body> </html> Here is the code behind: using System; using System.Drawing; using System.Web.UI.DataVisualization.Charting; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { //SET UP THE DATA TO PLOT double[] yVal = { 80, 20 }; string[] xName = { "Pass", "Fail" }; //CREATE THE CHART Chart Chart1 = new Chart(); //BIND THE DATA TO THE CHART Chart1.Series.Add(new Series()); Chart1.Series[0].Points.DataBindXY(xName, yVal); //SET THE CHART TYPE TO BE PIE Chart1.Series[0].ChartType = System.Web.UI.DataVisualization.Charting.SeriesChartType.Pie; Chart1.Series[0]["PieLabelStyle"] = "Outside"; Chart1.Series[0]["PieStartAngle"] = "-90"; //SET THE COLOR PALETTE FOR THE CHART TO BE A PRESET OF NONE //DEFINE OUR OWN COLOR PALETTE FOR THE CHART Chart1.Palette = System.Web.UI.DataVisualization.Charting.ChartColorPalette.None; Chart1.PaletteCustomColors = new Color[] { Color.Blue, Color.Red }; //SET THE IMAGE OUTPUT TYPE TO BE JPEG Chart1.ImageType = System.Web.UI.DataVisualization.Charting.ChartImageType.Jpeg; //ADD A PLACE HOLDER CHART AREA TO THE CHART //SET THE CHART AREA TO BE 3D Chart1.ChartAreas.Add(new ChartArea()); Chart1.ChartAreas[0].Area3DStyle.Enable3D = true; //ADD A PLACE HOLDER LEGEND TO THE CHART //DISABLE THE LEGEND Chart1.Legends.Add(new Legend()); Chart1.Legends[0].Enabled = false; } } I want to render the charting control inside the div with id="chart" Thanks for the help!

    Read the article

  • Map Custom URL protocol to HTTP (using NSURLProtocol?)

    - by Francisco Ryan Tolmasky I
    I have an application using a WebKit WebView and I'd like to map URL's that are loaded in this WebView with a custom URL protocol to a different HTTP URL. For example, say I am loading: custom://path/to/resource I would like to internally actually load: http://something-else.com/path/to/resource In other words, the custom protocol serves almost as a shorthand. I can't however use -webView:resource:willSendRequest:redirectResponse:fromDataSource:, because I want WebKit to actually believe this is the URL in question, not to simply redirect from one to the other. So far I've been attempting to use a custom NSURLProtocol subclass. However, this is proving trickier than I first thought because, at least to my understanding, I will have to do the actual loading myself in the NSURLProtocol subclass' startLoading method. I'd like a way to just hand off the work to the existing HTTP protocol loader, but I can't find an easy way to do this. Does anyone have a recommendation for this, or perhaps an alternative way to solve this issue? Thanks!

    Read the article

  • Pushing app to heroku problem

    - by Ryan Max
    Hi, I am trying to push my app to heroku and I get the following message: $ heroku create Creating electric-meadow-15..... done Created http://electric-meadow-15.heroku.com/ | [email protected]:electric-meadow-1 5.git $ git push heroku master ! No such app as fierce-fog-63 fatal: The remote end hung up unexpectedly It's weird that I am getting this now, I have pushed the app to heroku many times without issue. the especially weird thing is, fierce-fog-63 is an old app that I made a deleted a long time ago. Why is it now that heroku is trying to push to this app that doesn't exist anymore, especially when I have created a new one. Any suggestions?

    Read the article

  • How do I specify a keys password with MSBuild for the purpose of using Hudson?

    - by Brett Ryan
    We have just setup our hudson server to build .NET projects which seems to be working fine, however for projects that require a password when signing the assemblies I can not figure out how to tell hudson what the password is? For us the password is asked the first time a developer checks out the source code and they open with visual studio, how is this stored? Can we just place a secret file somewhere on the server?

    Read the article

  • Why isn't the static constructor of the parent class called when invoking a method on a nested class

    - by Ryan Ische
    Given the following code, why isn't the static constructor of "Outer" called after the first line of "Main"? namespace StaticTester { class Program { static void Main( string[] args ) { Outer.Inner.Go(); Console.WriteLine(); Outer.Go(); Console.ReadLine(); } } public static partial class Outer { static Outer() { Console.Write( "In Outer's static constructor\n" ); } public static void Go() { Console.Write( "Outer Go\n" ); } public static class Inner { static Inner() { Console.Write( "In Inner's static constructor\n" ); } public static void Go() { Console.Write( "Inner Go\n" ); } } } }

    Read the article

  • DataView.RowFilter an ISO8601

    - by Ryan
    I have a DataTable (instance named: TimeTable) whose DefaultView (instance named: TimeTableView) I am trying to use to filter based on a date. Column clock_in contains an ISO8601 formatted string. I would like to select all the rows in this DataTable/DefaultView between 2009-10-08T08:22:02Z and 2009-10-08T20:22:02Z. What would I have to filter on this criteria? I tried: TimeTableView = TimeTable.DefaultView; TimeTableView.RowFilter = "clock_in >= #2009-10-08T08:22:02Z# and #2009-10-08T20:22:02Z#"; This is not working for me. Am I operating on the wrong object or is my filter syntax wrong?

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >