Search Results

Search found 3325 results on 133 pages for 'david ward'.

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

  • Three20 TTSectionedDataSource row height

    - by Ward
    Hey there, I'm using Three20 to create a table with several textfields for user registration. I've found two possible methods using Three20. The first uses the TTSectionedDataSource's tableDidLoadModel method to manually add UI components and the second adds custom items that contains pre formatted UI components. The second option seems way more complex and I'm having a difficult time accessing the individual fields. So if one field is a textfield for the username, I need to access the field to submit the username and it doesn't seem like there's an easy answer. The first option gives me a lot of flexibility, but I can't figure out how to set the individual row heights. One row may have a label above a text field, another may have an image, etc. Is there a method that can be used in TTSectionedDataSource that will allow me to set the height for each row? Thus far, I'm using method one and creating UIViews to hold a label field and a text field. I've tried changing the frame of the uiview before it is added to the items array, but it has no affect. Any ideas?

    Read the article

  • EF4 Import/Lookup thousands of records - my performance stinks!

    - by Dennis Ward
    I'm trying to setup something for a movie store website (using ASP.NET, EF4, SQL Server 2008), and in my scenario, I want to allow a "Member" store to import their catalog of movies stored in a text file containing ActorName, MovieTitle, and CatalogNumber as follows: Actor, Movie, CatalogNumber John Wayne, True Grit, 4577-12 (repeated for each record) This data will be used to lookup an actor and movie, and create a "MemberMovie" record, and my import speed is terrible if I import more than 100 or so records using these tables: Actor Table: Fields = {ID, Name, etc.} Movie Table: Fields = {ID, Title, ActorID, etc.} MemberMovie Table: Fields = {ID, CatalogNumber, MovieID, etc.} My methodology to import data into the MemberMovie table from a text file is as follows (after the file has been uploaded successfully): Create a context. For each line in the file, lookup the artist in the Actor table. For each Movie in the Artist table, lookup the matching title. If a matching Movie is found, add a new MemberMovie record to the context and call ctx.SaveChanges(). The performance of my implementation is terrible. My expectation is that this can be done with thousands of records in a few seconds (after the file has been uploaded), and I've got something that times out the browser. My question is this: What is the best approach for performing bulk lookups/inserts like this? Should I call SaveChanges only once rather than for each newly created MemberMovie? Would it be better to implement this using something like a stored procedure? A snippet of my loop is roughly this (edited for brevity): while ((fline = file.ReadLine()) != null) { string [] token = fline.Split(separator); string Actor = token[0]; string Movie = token[1]; string CatNumber = token[2]; Actor found_actor = ctx.Actors.Where(a => a.Name.Equals(actor)).FirstOrDefault(); if (found_actor == null) continue; Movie found_movie = found_actor.Movies.Where( s => s.Title.Equals(title, StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault(); if (found_movie == null) continue; ctx.MemberMovies.AddObject(new MemberMovie() { MemberProfileID = profile_id, CatalogNumber = CatNumber, Movie = found_movie }); try { ctx.SaveChanges(); } catch { } } Any help is appreciated! Thanks, Dennis

    Read the article

  • Condensing repeating JQuery code

    - by Craig Ward
    I have a page that has a large image on it with a number of thumbnails. When you mouse over a thumbnail the main image changes to the image you have just rolled your mouse over. The problem is the more thumbnails I have, the more repeated code I have. How could I reduce it? The Jquery code is as follows. <script type="text/javascript"> $('#thumb1') .mouseover(function(){ $('#big_img').fadeOut('slow', function(){ $('#big_img').attr('src', '0001.jpg'); $('#big_img').fadeIn('slow'); }); }); $('#thumb2') .mouseover(function(){ $('#big_img').fadeOut('slow', function(){ $('#big_img').attr('src', 'p_0002.jpg'); $('#big_img').fadeIn('slow'); }); }); $('#thumb3') .mouseover(function(){ $('#big_img').fadeOut('slow', function(){ $('#big_img').attr('src', '_img/p_0003.jpg'); $('#big_img').fadeIn('slow'); }); }); $('#thumb4') .mouseover(function(){ $('#big_img').fadeOut('slow', function(){ $('#big_img').attr('src', '0004.jpg'); $('#big_img').fadeIn('slow'); }); }); </script> #big_img = the ID of the full size image #thumb1, #thumb2, #thumb3, #thumb4 = The ID's of the thumbnails The main code for the page is PHP if that helps.

    Read the article

  • WPF Binding Between Controls

    - by David Ward
    I have a control on a page that contains a listbox. I also have another control which is a detail view. Both of the controls have their own ViewModel which their child controls bind to. Image Outlook. It has a list of folders and when you select a folder the detail control displays the contents of the folder. How can I bind the detail control to the selected item in the list control?

    Read the article

  • iPhone Circular Progress Indicator

    - by Ward
    I'm trying to create a circular progress indicator like Shazam. It will represent progress during recording. There will be a finite amount of time and I want it to react to the sound level like Shazam's does. Any clues where to begin? Thanks

    Read the article

  • WPF Application - Role Management Recommendations

    - by David Ward
    I have a WPF application with a WCF service layer and a SQL database. I now want to restrict elements of the application so that certain functions are only available to those users with a particular role. For example, you will only be able to navigate to the settings screen if you are an administrator. I would like a user to be a member of 1 or more authorisation groups and each authorisation group to have 1 or more roles associated. A long time ago I used AzMan (Authorisation Manager) to do a similar thing. Does anyone think that there are better approaches? Is AzMan "old news"? Alternatives? Thanks.

    Read the article

  • How to deal with routing when developing a custom CMS in Codeigniter

    - by Ashley Ward
    Hi All - I’m a recent user of Codeigniter and am developing a simple backend CMS to manage pages. Based on a URL (in this example I have hidden “index.php”) : mysite.com/pagename I would like the system to detect if there is a value of “pagename” in my database, if there is, I need the system to re-route to a custom controller (eg: Pagemaker) and if there is no record called pagename, just do it’s normal thing (i.e. find a controller called pagename) Currently I have: $route['(:any)'] = "pagemaker/create/$1"; whereby all requests are forwarded to my custom function. However I want to change this structure so that if the page does NOT exist in the db, the traditional codeigniter request process is followed. Can anyone offer any advice about how to complete this? Or any advice about routing custom CMS’s in codeigniter in general?

    Read the article

  • Reliability of UDP on localhost

    - by Bryan Ward
    I know that UDP is inherently unreliable, but when connecting to localhost I would expect the kernel handles the connection differently since everything can be handled internally. So in this special case, is UDP considered a reliable protocol, or will the kernel still potentially junk some packets if buffers are overrun?

    Read the article

  • StrcutureMap Wiring - Sanity Check Please

    - by Steve Ward
    Hi - Im new to IOC and StructureMap and have an n-level application and am looking at how to setup the wirings (ForRequestedType ...) and just want to check with people with more experience that this is the best way of doing it! I dont want my UI application object to reference my persistence layer directly so am not able to wire everything up in this UI project. I now have it working by defining a Registry class in each project which wires up the types in the project as needed. The layer above registers its types and also calls the assembly below and looks for registries so that all types are registered throught the hierrachy. E.g. I have UI, Service, Domain, and Persistence libraries. In my service layer the registry looks like Scan(x => { x.Assembly("MyPersistenceProject"); x.LookForRegistries(); }); ForRequestedType<IService>().TheDefault.Is.OfConcreteType<MyService>(); Is this a recommended way of doing this in a setup such as this? Are there better ways and what are the advantages / disadvantages of these approaches in this case?

    Read the article

  • Negative zero using Crystal Report ToText()

    - by Dan Ward
    Using Crystal Reports 8.5 on Windows Vista or 7, I'm using the ToText function to report a value: totext(Sum ({ap121w7.yrentamt}, {@type1099})*100,"000000000000000000") The result (if yrentamt is 0) is -000000000000000000 The dash (I assume it's a negative sign) is unneccessary and unwanted in my report. Is this a bug, or is there an easy solution? --Note-- I would very much like to avoid the following: if {ap121w7.yrentamt}=0.00 then yrentamt := "000000000000" else yrentamt := totext({ap121w7.yrentamt}*100,"000000000000"); I have about 100 files to fix with multiple formulas per file, and the above solution doesn't seem to work consistently either.

    Read the article

  • Counting divs for pagination in Jquery

    - by Craig Ward
    I want to create a nice pagination in Jquery for a number of divs I have. EG: <div class="container"> <div id="one">content</div> <div id="two">content</div> <div id="three">content</div> <div id="four">content</div> </div> The number will not always be the same so I need to count the divs, and display a pagination like the one below. 1|2|3|4 Clicking on the page number would display the relevant div. I know how to show and hide elements using Jquery and css and have figured out I can count the divs using var numPages = $('.container').size(); but I can't work out how I can display the pagination. Any pointers?

    Read the article

  • Web App fails when moved to production environment. Which server permissions do I need?

    - by Ashley Ward
    I have developed a small web app. This app allows users to upload images. It also produces text files with the names of those images (the names are stored and retrieved to/from an MySQL Database.) I have developed this app using MAMP. To create the uploaded image files I use the PHP function imagejpeg('my/path/name.jpg') and to delete the files I use the PHP function unlink('folder1/folder2/name.jpg') to write to the text document I am using the function fopen('folder1/folder2/name.txt', 'w') all three of these functions produce errors related to permissions - now the site has been moved to a live hosting environment. Why is this? and what permissions do I need to set the folder's folder1 and folder2 to? I know that permission 777 is generally bad because it opens up your server to the public. However what I have found is that the functions fail to work unless I use 777 on the folders. Can anyone shed any light on my dilemma?

    Read the article

  • 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

  • Codeigniter: Retrieving data from multiple tables and displaying results

    - by Craig Ward
    Hi, I am developing my first big application using codeigniter and need a little help as I am fairly new to it all. I know how to get records out of the DB and display them, but I now have to get results from two tables and display them. I pass $data to the view, it works fine for $data['prop'] but I can't get the rest. $data['prop'] = $this->ManageProperty_model->get_property_details($p_id); $data['img'] = $this->ManageProperty_model->get_property_images($p_id); $this->load->model('ManageBranch_model'); $data['branch'] = $this->ManageBranch_model->get_branch_details($p_id); I usually echo out results like so: <?php foreach ($prop as $p) : ?> <?php echo $p->ID; ?> <?php endforeach; ?> Even if there is only 1 row being returned as I am not sure of another way.do I need a foreach for img and branch?

    Read the article

  • NoSQL vs. MySQL when scalability is irrelevant

    - by Bryan Ward
    Recently I have read a lot about different NoSQL databases and how they are being effectively deployed by some major websites out there. I'm starting a project in which I think the schema-free nature of a database such as MongoDB would be tremendously useful. Everything I have read though seems to indicate that the main advantage of a NoSQL database is scalability. Is choosing a NoSQL database for the schema-free design just as legitimate a design decision as that of scalability?

    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

  • Chrome starts to load image then show broken link icon

    - by Clare A Keith Ward
    Chrome (21.0.1180.79 m) On several random pages it has started to load an image and then suddenly the image disappears and there's only the broken image icon. If I right click the icon and choose to open the image in another window then the image opens, so it seems to me that it isn't a problem with the page? Here's one of the pages that it does it on; http://welshjournals.llgc.org.uk/browse/viewpage/llgc-id:1048090/llgc-id:1048951/llgc-id:1048969/get650 I'm running Kaspersky Internet Security 2012 Any help would be appreciated. Thanks Clare

    Read the article

  • Entity Framework 4.0 Unit Testing

    - by Steve Ward
    Hi, I've implemented unit testing along the lines of this article with a fake object context and IObjectSet with POCO in EF4. http://blogs.msdn.com/adonet/archive/2009/12/17/test-driven-development-walkthrough-with-the-entity-framework-4-0.aspx But I'm unsure how to implement a couple of methods on my fake object context for testing. I have CreateQuery and ExecuteFunction methods on my object context interface so that I can execute ESQL and Stored Procedures but I cant (easily) implement them in my fake object context. An alternative would be to use a test double of my repository instead of a double of my object context as suggested here: http://social.msdn.microsoft.com/Forums/en-US/adonetefx/thread/c4921443-e8a3-4414-92dd-eba1480a07ad/ But this would mean my real repository isnt being tested and would seem to just bypass the issue. Can anyone offer any recommendations?

    Read the article

  • Displaying data from mutliple arrays with codeigniter

    - by Craig Ward
    I am trying to display results from a database where the results are contained in three tables. How do I echo out the results? $p- works, but $img- or $branch- doesn't. What am I doing wrong? Example code is below Sample controller: $p_id = $this-uri-segment(3); $this-load-model('One_model'); $data['prop'] = $this-One_model-get_details($p_id); $data['img'] = $this-One-get_images($p_id); $this-load-model('Two_model'); $data['branch'] = $this-Two_model-get_details($p_id); $this-load-view('a_test_view', $data); A Sample View <?php foreach ($property as $p):?> <p><?php echo $p->SUMMARY; ?></p> <p>We have <?php echo "$img->num_photos"; ?> photos</p> <p>Branch is <?php echo $branch->name; ?>. Telephone <?php echo $branch->tel; ?></p> <ul> <li><?php echo $p->FEATURE1; ?></li> <li><?php echo $p->FEATURE2; ?></li> <li><?php echo $p->FEATURE3; ?></li> <li><?php echo $p->FEATURE4; ?></li> <li><?php echo $p->FEATURE5; ?></li> <li><?php echo $p->FEATURE6; ?></li> <li><?php echo $p->FEATURE7; ?></li> <li><?php echo $p->FEATURE8; ?></li> <li><?php echo $p->FEATURE9; ?></li> <li><?php echo $p->FEATURE10; ?></li> </ul> <?php endforeach; ?>

    Read the article

  • Seam EJB3 in an EAR is it usable by another App?

    - by Jim Ward
    Seam 2.1 and JBoss 4.2.2 I have set up the first App to have the EJB in the EAR with a local interface. the 2nd app can look up JDNI name "ear-name/ejbname/local" but fails with "NoClassDefFound". Does the EJB .jar need to be outside of the EAR? Is this a classloader visibility issue or Is this a JBoss version issue? or something else? Thank you for your thoughts..

    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

  • Is there a better way to declare an empty, typed matrix in MATLAB?

    - by Arthur Ward
    Is there a way to "declare" a variable with a particular user-defined type in MATLAB? zeros() only works for built-in numeric types. The only solution I've come up with involves using repmat() to duplicate a dummy object zero times: arr = repmat(myClass(), [1 0]) Without declaring variables this way, any code which does "arr(end+1) = myClass()" has to include a special case for the default empty matrix which is of type double. Have I missed something a little more sensible?

    Read the article

  • Circular Tally Counter Not Rolling Over

    - by chris ward
    I was practicing my java and was trying to make a simple counter with rollover at max, but for some reason it isn't rolling over. Any advice? public class HandTallyCounter { private int max; private int count; public HandTallyCounter(int max) { this.max = max; count = 0; } public void click() { if (count++ > max) { count = 0; } } public int getCount() { return count; } public void reset() { count = 0; } }

    Read the article

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