Search Results

Search found 1536 results on 62 pages for 'brian mitchell'.

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

  • URL flow when writing a wizard in PHP

    - by Brian
    Hello, I am writing a basic wizard for my web site. It will have 4 steps, and each needs to have its own URL. Each step must first validate a form before moving on. If the form for a given step fails to validate, I don't want the URL to change. But if it passes, I do want it to move on. What is the preferred way to write this? Using javascript alone to validate is not secure enough. I have 2 ideas so far but I don't love either: 1) Post the form to the same script and use a header() redirect to the next step if it passes. 2) Send an ajax post to validate and then use location.href to send user to the next step if it passes. Is there a better way to do this? Thanks, Brian

    Read the article

  • Embedded strongly-typed views with ASP.NET MVC

    - by Brian Vallelunga
    I'm working on a plugin-type of system for ASP.NET MVC that loads views from an embedded assembly. I have created a VirtualPathProvider that does the work of retrieving out of the assembly. Everything is working fine except for strongly-typed views. Whenever I try to load one of those, I get an exception of: Could not load type 'System.Web.Mvc.ViewPage'. The problem is that there is no Web.config file under the Views folder. Well, actually there is, but the system doesn't seem to want to read the embedded version. If I manually create the file under the corresponding directory in the web app, everything is fine. This isn't an acceptable workaround however, as each plugin would need its own file in its own specific directory. Does anyone know how I might get ASP to read the embedded Web.config file? Thanks, Brian

    Read the article

  • Double Negation in C++ code.

    - by Brian Gianforcaro
    I just came onto a project with a pretty huge code base. I'm mostly dealing with C++ and a lot of the code they write uses double negation for their boolean logic. if (!!variable && (!!api.lookup("some-string"))) { do_some_stuff(); } I know these guys are intelligent programmers, it's obvious they aren't doing this by accident. I'm no seasoned C++ expert, my only guess at why they are doing this is that they want to make absolutely positive that the value being evaluated is the actual boolean representation. So they negate it, then negate that again to get it back to its actual boolean value. Is this a correct? or am I missing something else? Thanks, Brian Gianforcaro

    Read the article

  • VB.NET - ASP.NET - MS-Access - SQL Statement

    - by Brian
    I have a button which when pressed, sets the user's rights in the db. (If Administrator UserTypeID is set to '2' and if Customer it is set to '1'). However when I run the below code, everything remains the same. I think it's from the SQL statement but I;m not sure. Can anyone help please? Protected Sub btnSetUser_Click(sender As Object, e As System.EventArgs) Handles btnSetUser.Click Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Brian\Documents\Visual Studio 2010\WebSites\WebSite3\db.mdb;") Dim cmd As OleDbCommand = New OleDbCommand("UPDATE [User] SET [UserTypeID] WHERE Username=?", conn) conn.Open() cmd.Parameters.AddWithValue("@Username", txtUser.Text) If ddUserType.SelectedItem.Text = "Administrator" Then cmd.Parameters.AddWithValue("@UserTypeID", "2") cmd.ExecuteNonQuery() lblSetUser.Text = txtUser.Text + "was set to Administrator." ElseIf ddUserType.SelectedItem.Text = "Customer" Then cmd.Parameters.AddWithValue("@UserTypeID", "1") cmd.ExecuteNonQuery() lblSetUser.Text = txtUser.Text + "was set to Customer." End If conn.Close() End Sub End Class

    Read the article

  • Posting an action works... but no image

    - by Brian Rice
    I'm able to post an open graph action to facebook using the following url: https://graph.facebook.com/me/video.watches with the following post data: video=http://eqnetwork.com/home/video.html?f=8e7b4f27-8cbd-4430-84df-d9ccb46da45f.mp4 It seems to be getting the title from the open graph metatags at the "video" object. But, it's not getting the image (even though one is specified in the metatag "og:image"). Also, if I add this to the post data: picture=http://eqnetwork.com/icons/mgen/overplayThumbnail.ms?drid=14282&subType=ljpg&w=120&h=120&o=1&thumbnail= still no image. Any thoughts? Brian

    Read the article

  • WPF: Binding items added to UserControl's exposed children

    - by Brian
    I have a user control that allows items to be added to it by exposing a Grid's Children property. Any control I add shows up fine but when I try to bind a property on the added item to a control in the main window nothing happens (example): <TextBox Name="txtTest" Text="Success!" /> <mycontrols:CustomUserControl.ExposedGridChildren> <TextBox Text="{Binding ElementName=txtTest, Path=Text, FallbackValue=fail}"/> </mycontrols:CustomUserControl.ExposedGridChildren> This example always results in the TextBox's text showing "fail". Here is how I'm exposing the children in the user control: public UIElementCollection ExposedGridChildren { get { return grdContainer.Children; } } Any thoughts? Is it a scope issue? I know I can't name the elements I add to the children because of scope errors. Thanks, Brian.

    Read the article

  • E4X in ActionScript

    - by Brian Genisio
    Hey all, Looking at the E4X implementation in ActionScript, it occurs to me that they had to figure out how to do three things that I am not sure can be done within ActionScript regularly: Properties/Getters prefixed with @: var myAttribute = xmlPerson.@name; Nameless functions for filtering: xmlData.person.(/* predicate */) lambda syntax for predicates: xmlData.person.(@name == "Brian") So here is my question: Are these just one-off capabilities (much like Vector.<>) they put in just for E4X, therefore keeping out of reach for us? Or do we, as ActionScript developers, have access to these features? More specifically, I'd love to get access to the expression tree of that lambda predicate for my own code (not tied to the XML classes in any way). I figured out that this is called the "filter operator"... but I am not sure how to harness it. Not sure I can... since ActionScript does not allow for operator overloading :(

    Read the article

  • Ajax/PHP - should I use one long running script or polling?

    - by Brian
    Hello, I have a PHP script that is kicked off via ajax. This PHP script uses exec() to run a separate PHP script via the shell. The script that is called via exec() may take 30 seconds or so to complete. I need to update the UI once it is finished. Which of these options is preferred? a) Leave the HTTP connection open for the 30 seconds and wait for it to finish. b) Have exec() run the PHP script in the background and then use ajax polling to check for completion (every 5 seconds or so). c) Something else that I haven't thought of. Thank you, Brian

    Read the article

  • jQuery/javascript events - prototype event handler

    - by Brian M. Hunt
    The following code doesn't work as I intuitively expect it to: function MyObject(input) { input.change(this._foo); this.X = undefined; } MyObject.prototype._foo = function() { alert("This code is never called"); // but if it did this.X = true; } var test_input = $("input#xyz"); // a random, existing input var m = MyObject(test_input); // attach handler (or try to) test_input.change(); // trigger event alert(m.X); // undefined I'd expect that _foo() would be called (and, if that ever happens, that the this variable in _foo() would be an instantiation of MyObject. Does anyone know why this doesn't work, and of any alternative pattern for passing an object to an event handler? Thank you for reading. Brian

    Read the article

  • Dec 5th Links: ASP.NET, ASP.NET MVC, jQuery, Silverlight, Visual Studio

    - by ScottGu
    Here is the latest in my link-listing series.  Also check out my VS 2010 and .NET 4 series for another on-going blog series I’m working on. [In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu] ASP.NET ASP.NET Code Samples Collection: J.D. Meier has a great post that provides a detailed round-up of ASP.NET code samples and tutorials from a wide variety of sources.  Lots of useful pointers. Slash your ASP.NET compile/load time without any hard work: Nice article that details a bunch of optimizations you can make to speed up ASP.NET project load and compile times. You might also want to read my previous blog post on this topic here. 10 Essential Tools for Building ASP.NET Websites: Great article by Stephen Walther on 10 great (and free) tools that enable you to more easily build great ASP.NET Websites.  Highly recommended reading. Optimize Images using the ASP.NET Sprite and Image Optimization Framework: A nice article by 4GuysFromRolla that discusses how to use the open-source ASP.NET Sprite and Image Optimization Framework (one of the tools recommended by Stephen in the previous article).  You can use this to significantly improve the load-time of your pages on the client. Formatting Dates, Times and Numbers in ASP.NET: Scott Mitchell has a great article that discusses formatting dates, times and numbers in ASP.NET.  A very useful link to bookmark.  Also check out James Michael’s DateTime is Packed with Goodies blog post for other DateTime tips. Examining ASP.NET’s Membership, Roles and Profile APIs (Part 18): Everything you could possibly want to known about ASP.NET’s built-in Membership, Roles and Profile APIs must surely be in this tutorial series. Part 18 covers how to store additional user info with Membership. ASP.NET with jQuery An Introduction to jQuery Templates: Stephen Walther has written an outstanding introduction and tutorial on the new jQuery Template plugin that the ASP.NET team has contributed to the jQuery project. Composition with jQuery Templates and jQuery Templates, Composite Rendering, and Remote Loading: Dave Ward has written two nice posts that talk about composition scenarios with jQuery Templates and some cool scenarios you can enable with them. Using jQuery and ASP.NET to Build a News Ticker: Scott Mitchell has a nice tutorial that demonstrates how to build a dynamically updated “news ticker” style UI with ASP.NET and jQuery. Checking All Checkboxes in a GridView using jQuery: Scott Mitchell has a nice post that covers how to use jQuery to enable a checkbox within a GridView’s header to automatically check/uncheck all checkboxes contained within rows of it. Using jQuery to POST Form Data to an ASP.NET AJAX Web Service: Rick Strahl has a nice post that discusses how to capture form variables and post them to an ASP.NET AJAX Web Service (.asmx). ASP.NET MVC ASP.NET MVC Diagnostics Using NuGet: Phil Haack has a nice post that demonstrates how to easily install a diagnostics page (using NuGet) that can help identify and diagnose common configuration issues within your apps. ASP.NET MVC 3 JsonValueProviderFactory: James Hughes has a nice post that discusses how to take advantage of the new JsonValueProviderFactory support built into ASP.NET MVC 3.  This makes it easy to post JSON payloads to MVC action methods. Practical jQuery Mobile with ASP.NET MVC: James Hughes has another nice post that discusses how to use the new jQuery Mobile library with ASP.NET MVC to build great mobile web applications. Credit Card Validator for ASP.NET MVC 3: Benjii Me has a nice post that demonstrates how to build a [CreditCard] validator attribute that can be used to easily validate credit card numbers are in the correct format with ASP.NET MVC. Silverlight Silverlight FireStarter Keynote and Sessions: A great blog post from John Papa that contains pointers and descriptions of all the great Silverlight content we published last week at the Silverlight FireStarter.  You can watch all of the talks online.  More details on my keynote and Silverlight 5 announcements can be found here. 31 Days of Windows Phone 7: 31 great tutorials on how to build Windows Phone 7 applications (using Silverlight).  Silverlight for Windows Phone Toolkit Update: David Anson has a nice post that discusses some of the additional controls provided with the Silverlight for Windows Phone Toolkit. Visual Studio JavaScript Editor Extensions: A nice (and free) Visual Studio plugin built by the web tools team that significantly improves the JavaScript intellisense support within Visual Studio. HTML5 Intellisense for Visual Studio: Gil has a blog post that discusses a new extension my team has posted to the Visual Studio Extension Gallery that adds HTML5 schema support to Visual Studio 2008 and 2010. Team Build + Web Deployment + Web Deploy + VS 2010 = Goodness: Visual blogs about how to enable a continuous deployment system with VS 2010, TFS 2010 and the Microsoft Web Deploy framework.  Visual Studio 2010 Emacs Emulation Extension and VIM Emulation Extension: Check out these two extensions if you are fond of Emacs and VIM key bindings and want to enable them within Visual Studio 2010. Hope this helps, Scott

    Read the article

  • No device file for partition on logical volume (Linux LVM)

    - by Brian
    I created a logical volume (scandata) containing a single ext3 partition. It is the only logical volume in its volume group (case4t). Said volume group is comprised by 3 physical volumes, which are three primary partitions on a single block device (/dev/sdb). When I created it, I could mount the partition via the block device /dev/mapper/case4t-scandatap1. Since last reboot the aforementioned block device file has disappeared. It may be of note -- I'm not sure -- that my superior (a college professor) had prompted this reboot by running sudo chmod -R [his name] /usr/bin, which obliterated all suid in its path, preventing the both of us from sudo-ing. That issue has been (temporarily) rectified via this operation. Now I'll cut the chatter and get started with the terminal dumps: $ sudo pvs; sudo vgs; sudo lvs Logging initialised at Sat Jan 8 11:42:34 2011 Set umask to 0077 Scanning for physical volume names PV VG Fmt Attr PSize PFree /dev/sdb1 case4t lvm2 a- 819.32G 0 /dev/sdb2 case4t lvm2 a- 866.40G 0 /dev/sdb3 case4t lvm2 a- 47.09G 0 Wiping internal VG cache Logging initialised at Sat Jan 8 11:42:34 2011 Set umask to 0077 Finding all volume groups Finding volume group "case4t" VG #PV #LV #SN Attr VSize VFree case4t 3 1 0 wz--n- 1.69T 0 Wiping internal VG cache Logging initialised at Sat Jan 8 11:42:34 2011 Set umask to 0077 Finding all logical volumes LV VG Attr LSize Origin Snap% Move Log Copy% Convert scandata case4t -wi-a- 1.69T Wiping internal VG cache $ sudo vgchange -a y Logging initialised at Sat Jan 8 11:43:14 2011 Set umask to 0077 Finding all volume groups Finding volume group "case4t" 1 logical volume(s) in volume group "case4t" already active 1 existing logical volume(s) in volume group "case4t" monitored Found volume group "case4t" Activated logical volumes in volume group "case4t" 1 logical volume(s) in volume group "case4t" now active Wiping internal VG cache $ ls /dev | grep case4t case4t $ ls /dev/mapper case4t-scandata control $ sudo fdisk -l /dev/case4t/scandata Disk /dev/case4t/scandata: 1860.5 GB, 1860584865792 bytes 255 heads, 63 sectors/track, 226203 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00049bf5 Device Boot Start End Blocks Id System /dev/case4t/scandata1 1 226203 1816975566 83 Linux $ sudo parted /dev/case4t/scandata print Model: Linux device-mapper (linear) (dm) Disk /dev/mapper/case4t-scandata: 1861GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 32.3kB 1861GB 1861GB primary ext3 $ sudo fdisk -l /dev/sdb Disk /dev/sdb: 1860.5 GB, 1860593254400 bytes 255 heads, 63 sectors/track, 226204 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000081 Device Boot Start End Blocks Id System /dev/sdb1 1 106955 859116006 83 Linux /dev/sdb2 113103 226204 908491815 83 Linux /dev/sdb3 106956 113102 49375777+ 83 Linux Partition table entries are not in disk order $ sudo parted /dev/sdb print Model: DELL PERC 6/i (scsi) Disk /dev/sdb: 1861GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 32.3kB 880GB 880GB primary reiserfs 3 880GB 930GB 50.6GB primary 2 930GB 1861GB 930GB primary I find it a bit strange that partition one above is said to be reiserfs, or if it matters -- it was previously reiserfs, but LVM recognizes it as a PV. To reiterate, neither /dev/mapper/case4t-scandatap1 (which I had used previously) nor /dev/case4t/scandata1 (as printed by fdisk) exists. And /dev/case4t/scandata (no partition number) cannot be mounted: $sudo mount -t ext3 /dev/case4t/scandata /mnt/new mount: wrong fs type, bad option, bad superblock on /dev/mapper/case4t-scandata, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so All I get on syslog is: [170059.538137] VFS: Can't find ext3 filesystem on dev dm-0. Thanks in advance for any help you can offer, Brian P.S. I am on Ubuntu GNU/Linux 2.6.28-11-server (Jaunty) (out of date, I know -- that's on the laundry list).

    Read the article

  • ASP.NET MVC: An Error has occured when trying to create a controller

    - by Grayson Mitchell
    I have got the following error a few times in my MVC applications, and have only managed to get past it by recreating my entire solution from scratch. The error message says make sure there is a paramaterless public constructor, but of course there is one. What else could this error refer to? (It looks like it can't find the controller at all) Code where error occurs public void Page_Load(object sender, System.EventArgs e) { // Change the current path so that the Routing handler can correctly interpret // the request, then restore the original path so that the OutputCache module // can correctly process the response (if caching is enabled). string originalPath = Request.Path; HttpContext.Current.RewritePath(Request.ApplicationPath, false); IHttpHandler httpHandler = new MvcHttpHandler(); **httpHandler.ProcessRequest(HttpContext.Current);** HttpContext.Current.RewritePath(originalPath, false); } Error Message An error occurred when trying to create a controller of type 'Moe.Tactical.Ttas.Web.Controllers.TtasController'. Make sure that the controller has a parameterless public constructor.

    Read the article

  • Frame Buffers wont work with pyglet.

    - by Matthew Mitchell
    I have this code: def setup_framebuffer(surface): #Create texture if not done already if surface.texture is None: create_texture(surface) #Render child to parent if surface.frame_buffer is None: surface.frame_buffer = glGenFramebuffersEXT(1) glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, surface.frame_buffer) glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, surface.texture, 0) glPushAttrib(GL_VIEWPORT_BIT) glViewport(0,0,surface._scale[0],surface._scale[1]) glMatrixMode(GL_PROJECTION) glLoadIdentity() #Load the projection matrix gluOrtho2D(0,surface._scale[0],0,surface._scale[1]) glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, surface.frame_buffer) for this despite the second parameter printing as 1 for a test I did, I get: glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, surface.frame_buffer) I only got this after implementing pyglet. GLUT is too limited. Thank you.

    Read the article

  • Flex: force display of control's errorTip (error toolTip) on validation failure

    - by Jeremy Mitchell
    When a Validator (i.e. StringValidator, NumberValidator, etc) dispatches an invalid event due to validation failure, the errorString property of the source control (i.e. TextInput) is set to a non-empty string which creates a red border around the control and shows an toolTip (errorTip) ONLY when the mouse hovers over the control. Question: Can you force immediate display of the toolTip (errorTip) rather than waiting for the user to hover over the control? If so, how?

    Read the article

  • visual studio 2010: The Breakpoint will not currently be hit: No symbols have been loaded for this d

    - by Grayson Mitchell
    I am using VS2010, and Silverlight 4. When I run my code the debugging does not work (I get the above error on my breakpoints. When I clean my solution a warning comes up saying that the system cannot find the file specified (a project dll). It is looking in the right path (..\debug), but there is no dll present. I started a new Silverlight 4 project, and get the same error. Sometime's the debugging does work (I am not sure if/what anything changed, but on one occasion I was surprised that my breakpoints worked. After changing one thing the breakpoints stopped working)

    Read the article

  • How to display a TimeSpan in MVC Razor

    - by John Mitchell
    So I have a duration in seconds of a video and I would like to display that duration in Razor. Currently I am using @TimeSpan.FromSeconds(item.Duration).ToString() However the rest of the code I am using uses @Html.DisplayFor(modelItem => item.Description) Is there way to get the duration (currently an int) to display a as a timespan? using the @Html.DisplayFor syntax. The item.duration is pulling form a Entity Framework model which is held as a int in the database.

    Read the article

  • DataForm commit button is not enabled when data changed.

    - by Grayson Mitchell
    This is a weird problem. I am using a dataform, and when I edit the data the save button is enabled, but the cancel button is not. After looking around a bit I have found that I have to implement the IEditableObject in order to cancel an edit. Great I did that (and it all works), but now the commit button (Save) is grayed out, lol. Anyone have any idea's why the commit button will not activate any more? Xaml <df:DataForm x:Name="_dataForm" AutoEdit="False" AutoCommit="False" CommandButtonsVisibility="All"> <df:DataForm.EditTemplate > <DataTemplate> <StackPanel Name="rootPanel" Orientation="Vertical" df:DataField.IsFieldGroup="True"> <!-- No fields here. They will be added at run-time. --> </StackPanel> </DataTemplate> </df:DataForm.EditTemplate> </df:DataForm> binding DataContext = this; _dataForm.ItemsSource = _rows; ... TextBox textBox = new TextBox(); Binding binding = new Binding(); binding.Path = new PropertyPath("Data"); binding.Mode = BindingMode.TwoWay; binding.Converter = new RowIndexConverter(); binding.ConverterParameter = col.Value.Label; textBox.SetBinding(TextBox.TextProperty, binding); dataField.Content = textBox; // add DataField to layout container rootPanel.Children.Add(dataField); Data Class definition public class Row : INotifyPropertyChanged , IEditableObject { public void BeginEdit() { foreach (var item in _data) { _cache.Add(item.Key, item.Value); } } public void CancelEdit() { _data.Clear(); foreach (var item in _cache) { _data.Add(item.Key, item.Value); } _cache.Clear(); } public void EndEdit() { _cache.Clear(); } private Dictionary<string, object> _cache = new Dictionary<string, object>(); private Dictionary<string, object> _data = new Dictionary<string, object>(); public object this[string index] { get { return _data[index]; } set { _data[index] = value; OnPropertyChanged("Data"); } } public object Data { get { return this; } set { PropertyValueChange setter = value as PropertyValueChange; _data[setter.PropertyName] = setter.Value; } } public event PropertyChangedEventHandler PropertyChanged; protected void OnPropertyChanged(string property) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(property)); } } }

    Read the article

  • Blackberry support for Forms Authentication - ASP.NET MVC app

    - by Derek Mitchell
    I'm writing an ASP.NET MVC application that uses Forms Authentication. The target clients are a variety of mobile web browsers. When I use the BlackBerry 8530 simulator my MVC app authenticates as expected. I can visit pages whose controller methods are decorated with the [Authorize] attribute - no problem - they display and therefore I assume my Forms Authentication is working correctly. Using a physical Windows Mobile device to browse my site, I have the same experience as the BB simulator, the forms authentication works as I would expect. BUT when I try to visit the site using a Blackberry 8900 physical device the Login page keeps on looping back when I click the Login page. The device is not retaining it's "authenticated" status. I added code to verify this and I can see that: Request.IsAuthenticated: False User.Identity.IsAuthenticated: False So my question is what next steps can I take to try and find out why the Blackberry 8900 is losing it's authentication status. Is this cookie related? Anyone have any ideas? Cheers Derek

    Read the article

  • Thinking Sphinx and acts_as_taggable_on plugin

    - by Brian Roisentul
    Hi, I installed Sphinx and Thinking Sphinx for ruby on rails 2.3.2. When I search without conditions search works ok. Now, what I'd like to do is filter by tags, so, as I'm using the acts_as_taggable_on plugin, my Announcement model looks like this: class Announcement < ActiveRecord::Base acts_as_taggable_on :tags,:category define_index do indexes title, :as => :title, :sortable => true indexes description, :as => :description, :sortable => true indexes tags.name, :as => :tags indexes category.name, :as => :category has category(:id), :as => :category_ids has tags(:id), :as => :tag_ids end For some reason, when I run the following command, it will bring just one announcement, that has nothing to do with what I expect. I've got many announcements, so I expected a lot of results instead. Announcement.search params[:announcement][:search].to_s, :with => {:tag_ids => 1}, :page => params[:page], :per_page => 10 I guess something is wrong, and it's not searching correctly. Can anyone give my a clue of what's going on? Thanks, Brian

    Read the article

  • Flex HDividedBox Divider backgroundColor

    - by Jeremy Mitchell
    Is there an easy way to set the backgroundColor of a HDividedBox's (or VDividedBox's) BoxDivider object(s)? A BoxDivider is the "divider" that has the drag handle on it. By default, the BoxDivider is transparent with the little handle image on it. There is a dividerSkin style that defaults to mx.skin.BoxDividerSkin which is a reference to a symbol in the Assets.swf file. Any ideas? Do I have to make an alternate skin? Is that my only option? Googling this led me to many solutions that were weird and hacky and frankly didn't seem to work. Thanks.

    Read the article

  • Trouble getting NSString from NSDictionary key into UILabel

    - by Brian
    I'm attempting to put the value associated with the key called "duration" into a UILabel but I'm getting a blank or "(null)" result showing up in the UILabel. My NSDictionary object with its keys seems to be logging as being full of the data and keys I think I want, as such: the content of thisRecordingsStats is { "12:48:25 AM, April 25" = { FILEPATH = "/Users/brian/Library/Application Support/iPhone Simulator/3.1.3/Applications/97256A91-FC47-4353-AD01-15CD494060DD/Documents/12:48:25 AM, April 25.aif"; duration = "00:04"; applesCountString = 0; ...and so on. Here's the code where I'm trying to put the NSString into the UILabel: cell.durationLabel.text = [NSString stringWithFormat:@"%@",[thisRecordingsStats objectForKey:@"duration"]]; I've also tried these other permutations: cell.durationLabel.text = [thisRecordingsStats objectForKey:@"duration"]; and I've also tried this tag-based approach: label = (UILabel *)[cell viewWithTag:8]; label.text = [[thisRecordingsStats objectForKey:@"duration"] objectAtIndex:1]; and: UILabel *label; label = (UILabel *)[cell viewWithTag:8]; label.text = [NSString stringWithFormat:@"%@",[[thisRecordingsStats objectForKey:@"duration"] objectAtIndex:1]]; I've also tried creating a string from the key's paired value and see a "(null)" value or blankness using that too. What am I missing? I assume it's something with the formatting of the string. Thanks for looking!!

    Read the article

  • Dynamicly set TextBlock's text binding

    - by Mitchell Skurnik
    I am attempting to write a multilingual application in Silverlight 4.0 and I at the point where I can start replacing my static text with dynamic text from a SampleData xaml file. Here is what I have: My Database <SampleData:something xmlns:SampleData="clr-namespace:Expression.Blend.SampleData.MyDatabase" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> <SampleData:something.mysystemCollection> <SampleData:mysystem ID="1" English="Menu" German="Menü" French="Menu" Spanish="Menú" Swedish="Meny" Italian="Menu" Dutch="Menu" /> </SampleData:something.mysystemCollection> </SampleData:something> My UserControl <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="Something.MyUC" d:DesignWidth="1000" d:DesignHeight="600"> <Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource MyDatabase}}"> <Grid Height="50" Margin="8,20,8,0" VerticalAlignment="Top" d:DataContext="{Binding mysystemCollection[1]}" x:Name="gTitle"> <TextBlock x:Name="Title" Text="{Binding English}" TextWrapping="Wrap" Foreground="#FF00A33D" TextAlignment="Center" FontSize="22"/> </Grid> </Grid> </UserControl> As you can see, I have 7 languages that I want to deal with. Right now this loads the English version of my text just fine. I have spent the better part of today trying to figure out how to change the binding in my code to swap this out when I needed (lets say when I change the language via drop down). Any help would be great!

    Read the article

  • WCF ReliableMessaging method called twice

    - by Brian
    Using Fiddler, we see 3 HTTP requests (and matching responses) for each call when: WS-ReliableMessaging is enabled, and, the method returns a large amount of data (17MB) The first HTTP request is a SOAP message with the action "CreateSequence" (presumable to establish the reliable session). The second and third HTTP requests are identical SOAP messages invoking our webservice method. Why are there two identical messages? Here is our config: <system.serviceModel> <client> <endpoint address="http://server/vdir/AccountingService.svc" binding="wsHttpBinding" bindingConfiguration="customWsHttpBinding" behaviorConfiguration="LargeServiceBehavior" contract="MyProject.Accounting.IAccountingService" name="BasicHttpBinding_IAccountingService" /> </client> <bindings> <wsHttpBinding> <binding name="customWsHttpBinding" maxReceivedMessageSize="90000000"> <reliableSession enabled="true"/> <security mode="None" /> </binding> </wsHttpBinding> </bindings> <behaviors> <endpointBehaviors> <behavior name="LargeServiceBehavior"> <dataContractSerializer maxItemsInObjectGraph="2147483647"/> </behavior> </endpointBehaviors> </behaviors> </system.serviceModel> Thanks, Brian

    Read the article

  • How to improve the use of Delphi Frames

    - by Brian Frost
    I've used frames in Delphi for years, and they are one of the most powerful features of the VCL, but standard use of them seems to have some risk such as: It's easy to accidentally move or edit the frame sub-components on a frame's host form without realising that you are 'tweaking' with the frame - I know this does not affect the original frame code, but it's generally not what you would want. When working with the frame you are still exposed to its sub-components for visual editing, even when that frame is years old and should not be touched. So I got to thinking.... Is there a way of 'grouping' components such that their positions are 'locked'? This would be useful for finished forms as well as frames. Often other developers return code to me where only the form bounds have changed and even they did not intend any change. Is there any way of turning a frame and its components into a single Delphi component? If so, the frame internals would be completely hidden and its useability would increase further. I'm interested in any thoughts... Brian.

    Read the article

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