Search Results

Search found 489 results on 20 pages for 'brad pears'.

Page 15/20 | < Previous Page | 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • ActiveRecord find all parents that have associated children

    - by brad
    I don't know why I can't figure this out, I think it should be fairly simple. I have two models (see below). I'm trying to come up with a named scope for SupplierCategory that would find all SupplierCategory(s) (including :suppliers) who's associated Supplier(s) are not empty. I tried a straight up join, named_scope :with_suppliers, :joins => :suppliers which gives me only categories with suppliers, but it gives me each category listed separately, so if a category has 2 suppliers, i get the category twice in the returned array: Currently I'm using: named_scope :with_suppliers, :include => :suppliers and then in my view I'm using: <%= render :partial => 'category', :collection => @categories.find_all{|c| !c.suppliers.empty? } %> Not exactly eloquent but illustrates what I'm trying to achieve. Class Definitions class SupplierCategory < AR has_many :suppliers, :order => "name" end class Supplier < AR belongs_to :supplier end

    Read the article

  • Java - Can i have a faster performance for this loop ?

    - by Brad
    I am reading a book and deleting a number of words from it. My problem is that the process takes long time, and i want to make its performance better(Less time), example : Vector<String> pages = new Vector<String>(); // Contains about 1500 page, each page has about 1000 words. Vector<String> wordsToDelete = new Vector<String>(); // Contains about 50000 words. for( String page: pages ) { String pageInLowCase = page.toLowerCase(); for( String wordToDelete: wordsToDelete ) { if( pageInLowCase.contains( wordToDelete ) ) page = page.replaceAll( "(?i)\\b" + wordToDelete + "\\b" , "" ); } // Do some staff with the final page that does not take much time. } This code takes around 3 minutes to execute. If i skipped the loop of replaceAll(...) i can save more than 2 minutes. So is there a way to do the same loop with a faster performance ?

    Read the article

  • Tips on refactoring an Android prototype

    - by Brad
    I have an Android project I've inherited from another developer. The original code was hacked together using a single View and a single Activity. The view class has a State variable that is switched on during input and rendering. Each "screen" is a single bitmap rendered directly onto the screen. There are no layouts used at all. To make things even worse each variable in both the View and Activity classes were all declared public static and would access each other frequently. I've reworked the code so it is now somewhat manageable, but it's still in those original two classes. This is my first decently sized Android app so I'm not completely sure where to go next. From the looks of things, each "screen" should have its own View and Activity. Is this the general practice? If so I need some way to share data between the separate Activities. I've read suggestions to use a Singleton class that holds generic data. Is there any other ways that are more built into the Android framework? Thanks in advance.

    Read the article

  • undefined index mode, which is the variable that case statement is looking for

    - by Brad
    receiving error: PHP Notice: Undefined index: mode in /web/ee_web/include/form-modal.php on line 51 line 51 switch($_GET["mode"]) { block of code it is in: switch($_GET["mode"]) { case "login": login_user(); break; case "logout": session_destroy(); print "<p>You are now logged out.</p>"; print "<p><input type=\"submit\" id=\"closeButton\" name=\"closeButton\" value=\"Close\" onclick=\"self.parent.tb_remove(); parent.location.reload(1);\" /></p>"; break; default: login_user(); //print "<p>How'd you end up here?</p>"; break; } The URL for the page is index.php?mode=logout, that is how I am passing the value into mode. Any way I could resolve this error message?

    Read the article

  • Displaying Data from a Join in Codeigniter

    - by Brad
    I am using a simple join to pull data from two databases. This is the join in the model function com_control(){ $this->db->select('*'); $this->db->from('comments'); $this->db->join('posts', 'comments.entry_id = posts.id'); $query = $this->db->get(); return $query->result; } My desired method of display is going to be in a table so I am starting out to use like this foreach($comm_control as $row){ $this->table->add_row( $row->entry_id, $row->comments.id, $row->comment, $row->title ); }//end of foreach My problem is the display of data from comments.id. What is the proper format to add the comment.id into the table rows? I need the ID from both tables for display, edit and delete further on in the table. The only display I get at this time for "comment.id" is the word id. The Any help would be appreciated.

    Read the article

  • fadeIn on page load

    - by Brad
    I want to fade in a background of an entry within a div - this is to show the user what the most recent entry is on page load. I want it to do it on page load, without having to click or hover or anything, just when the page loads. I have this: $(document).ready(function() { $('#box').fadeIn(5000, function() { // Animation complete }); }); Is it something like pageLoad? Any help is appreciated.

    Read the article

  • How to write a cgi script in perl that accepts output (an image file) from a urlconnection in a Java applet and writes it to the server?

    - by Brad Rock
    I created a Java applet for my web page that creates an image file. I want users to be able to run the applet and create unique images, click a button, and have the image they created be saved to the web server. I think I have the code down for writing the image to a URLconnection in the Java applet itself after having successfully written a file while running the applet on my system rather than the web page and saving a file to the local disk, and then altering a few things to write to a URLConnection instead of to the local disk (although we shall see how that works too). I am now trying to write a cgi script in perl that takes the image output from the URLConnection and writes the image to a file on my web server (note: I am a newbie to perl). I have found many examples of how to do something similar with simple text coming from an applet and then writing it to a text file, but I want to know how to apply the same concept to an image. Particularly, how do I read in the image? I've seen text input get read by using read(STDIN, $some_variable)--does the same thing work with an image? Likewise, how do I write the image file? What function do I use? Thanks for your help. I know that I am rather naive about all of this.

    Read the article

  • What is PubSubHubbub?

    What is PubSubHubbub? An overview of pubsubhubbub, a simple, open, web-hook-based pubsub protocol & open source reference implementation. Brett Slatkin and Brad Fitzpatrick demonstrate what pubsubhubbub is and how it works. For more information, visit pubsubhubbub.googlecode.com From: GoogleDevelopers Views: 23753 112 ratings Time: 03:20 More in Science & Technology

    Read the article

  • Silverlight Cream for April 03, 2010 -- #829

    - by Dave Campbell
    In this Issue: Scott Marlowe, Nokola, SilverLaw, Brad Abrams, Jeff Wilcox, Jesse Liberty, Alexey Zakharov, ondrejsv, Ward Bell, and David Anson. Shoutouts: Bart Czernicki has a post up about the latest with HTML5: HTML 5 is Born Old - Quake in HTML 5 I was sent a link to shoebox360 a while back and had to sign up to see the Silverlight use, but it does work very nice. I like the panoramic carousel in the viewer: shoebox360 Jeff Handley has a post up on RIA Services - Documentation Guidance and Community Samples... the team is looking for feedback from all of us Shawn Wildermuth posted his My MIX Talks' Source Code Laurent Bugnion posted his Sample code and slides for my TechDays10 (Belgium) talks From SilverlightCream.com: Silverlight to WCF Cross Domain SecurityException Scott Marlowe wrote an article about an often-encountered security exception having to do with cross-domain policies. He details the problem, the response, the solution, and yet another problem/solution associated... good stuff, Scott! Simple Functions for HTML Interop You've seen Nokola's graphic work... how about some HTML Interop from him? He's exposing the code he uses in his work. New Video: ChildWindow Styling - Silverlight 3 SilverLaw has a new video tutorial on Silerlight 3 ChildWindow Styling up - in German - but the video is language-agnostic :) Silverlight 4 + RIA Services - Ready for Business: Exposing WCF (SOAP\WSDL) Services Brad Abrams' continuation in his RIA series is this one demonstrating exposing RIA Services as a Soap\WSDL service Silverlight 4: New parser implementation. New parser features. Jeff Wilcox has a post up highlighting some of the new features in Silverlight 4 such as a new parser implementation with new XAML features. New Video Series – Getting Started With Silverlight Jesse Liberty is starting a new video tutorial series that's going to build out to be a "complete survey of Silverlight programming". The first two are in this post and are Getting Started and Adding Controls to a Silverlight App... looks like good material, Jesse, and all the source is there for the taking as well. Silverlight layout hack: Centered content with fixed maxwidth Alexey Zakharov has a quick tip up on creating centered content with fixed maxwidth. He calls it a dirty trick... looks like code to me :) Silverlight DataForm’s autogenerated fields send empty strings to database ondrejsv points up a problem he had with the Toolkit's DataForm, and his solution to it... with code for all of us following along behind :) DevForce Extensibility With MEF InheritedExport Ward Bell has a post up describing how they got DevForce MEF'd up, and looks like a good post to get you all excited about MEF as well... lots of external links and good info. Tip: Read-only custom DependencyProperties don't exist in Silverlight, but can be closely approximated David Anson's latest Tip is about Read-only custom DependencyProperties in Silverlight -- which strictly is not possible, but he has a code example up that gets close. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Daily tech links for .net and related technologies - Apr 5-7, 2010

    - by SanjeevAgarwal
    Daily tech links for .net and related technologies - Apr 5-7, 2010 Web Development HTML 5 is Born Old - Quake in HTML 5 Example Image Preview in ASP.NET MVC - Imran Advanced ASP.NET MVC 2 - Brad Wilson How to Serialize/Deserialize Complex XML in ASP.Net / C# - Impact Works Ban HTML comments from your pages and views - Bertrand Le Roy Measuring ASP.NET and SharePoint output cache - Gunnar Peipman Web Design Eye Candy vs. Bare-Bones in UI Design - Max Steenbergen Empathizing Color Psychology in Web...(read more)

    Read the article

  • Daily tech links for .net and related technologies - Mar 26-28, 2010

    - by SanjeevAgarwal
    Daily tech links for .net and related technologies - Mar 26-28, 2010 Web Development Creating Rich View Components in ASP.NET MVC - manzurrashid Diagnosing ASP.NET MVC Problems - Brad Wilson Templated Helpers & Custom Model Binders in ASP.NET MVC 2 - gshackles The jQuery Templating Plugin and Why You Should Be Excited! - Chris Love Web Deployment Made Awesome: If You're Using XCopy, You're Doing It Wrong - Scott Hansleman Dynamic User Specific CSS Selection at Run Time - Misfit Geek Sending email...(read more)

    Read the article

  • Microsoft gets a first for it&rsquo;s cloud security

    - by TATWORTH
    Originally posted on: http://geekswithblogs.net/TATWORTH/archive/2014/05/21/microsoft-gets-a-first-for-itrsquos-cloud-security.aspxAt http://blogs.technet.com/b/microsoft_blog/archive/2014/04/10/privacy-authorities-across-europe-approve-microsoft-s-cloud-commitments.aspx, the official Microsoft Blog by Brad Smith records that Microsoft now has approval by european data protection authorities that Microsoft’s Cloud Contracts meets EU data protection law.

    Read the article

  • USA : Microsoft appelle le gouvernement à «réduire le déficit de confiance dans la technologie» un an après la première révélation de Snowden

    USA : Microsoft appelle le gouvernement à « réduire le déficit de confiance qu'il a créé dans la technologie » un an après la première révélation de Snowden Cela fait déjà un an qu'Edward Snowden a fait publier sa première révélation sur les exactions de la NSA et ses programmes de surveillance à l'échelle internationale. Pour marquer le coup, Microsoft a entreprit de s'adresser au gouvernement américain par le biais de Brad Smith, son avocat général et accessoirement Vice-Président en charge...

    Read the article

  • What is PubSubHubbub?

    What is PubSubHubbub? An overview of pubsubhubbub, a simple, open, web-hook-based pubsub protocol & open source reference implementation. Brett Slatkin and Brad Fitzpatrick demonstrate what pubsubhubbub is and how it works. For more information, visit pubsubhubbub.googlecode.com From: GoogleDevelopers Views: 23753 112 ratings Time: 03:20 More in Science & Technology

    Read the article

  • March 2010 Meeting of Israel Dot Net Developers User Group (IDNDUG)

    - by Jackie Goldstein
    Note the special date of this meeting - Wednesday March 24, 2010 For our March 2010 meeting of the Israel Dot Net Developers User Group we have the opportunity for a special meeting with Brad Abrams from Microsoft Corp, who will in Israel for the Developer Academy 4 event. Our user group meeting will be held on Wednesday March 24, 2010 .   This meeting will focus on building Line of Business applications with Silverlight 4, RIA Services and VS2010. Abstract: Building Business Applications...(read more)

    Read the article

  • T-SQL Tuesday 24: Ode to Composable Code

    - by merrillaldrich
    I love the T-SQL Tuesday tradition, started by Adam Machanic and hosted this month by Brad Shulz . I am a little pressed for time this month, so today’s post is a short ode to how I love saving time with Composable Code in SQL. Composability is one of the very best features of SQL, but sometimes gets picked on due to both real and imaginary performance worries. I like to pick composable solutions when I can, while keeping the perf issues in mind, because they are just so handy and eliminate so much...(read more)

    Read the article

  • 15 Stylish Navigation Menus For Inspiration

    - by Jyoti
    A site’s navigation menu is one of the most prominent things that users see when they first visit. There are many ways to design a navigation menu  and since almost all websites have some form of navigation designers have to push their creative limits to build one that’s remarkable and outstanding. In this article, you’ll find a showcase of beautiful, creative, and stylish navigation menus for your inspiration. Tennessee Vacation: Alpine Meadows: White House: The Hole In Our Gospel: Navigant Consulting: The Lippincott: Torrance Web Design: Viget Extend: David Hellmann: Candes: Brad Colbow: Cheesetique : Satsu Design: Blue Moon: Africa Oasis Project

    Read the article

  • T-SQL Tuesday #24 : Dude, where's the rest of my procedure?

    - by AaronBertrand
    This month's T-SQL Tuesday is being hosted by Brad Schulz ( blog ) and the topic is one that should attract a lot of submissions: Procedures and Functions. Last week, I talked about the case against INFORMATION_SCHEMA views - I provided several examples where I feel the INFORMATION_SCHEMA views fall short of the catalog views, and expressed my belief that you are better off programming consistently against the catalog views all the time, instead of only when the INFORMATION_SCHEMA views fail. Having...(read more)

    Read the article

  • SQLServerCentral Best Practices Clinic: Part 4

    In this next installment looking at implementing best practices here at SQLServerCentral, Brad McGehee looks at a few performance counters and what they tell us about the performance of our database server. The Future of SQL Server Monitoring "Being web-based, SQL Monitor enables you to check on your servers from almost any location" Jonathan Allen.Try SQL Monitor now.

    Read the article

  • Google I/O 2010 - Making Freemium work

    Google I/O 2010 - Making Freemium work Google I/O 2010 - Making Freemium work - converting free users to paying customers Enterprise 101 Don Dodge (moderator), Brad Feld, Dave McClure, Jeff Clavier, Matt Holleran, Joe Kraus A panel of prominent venture capital leaders will help you understand how to build free apps that can be upgraded to paid & how to build products that can be profitable. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 25 0 ratings Time: 59:37 More in Science & Technology

    Read the article

  • SQL Server Central Webinar #17: Monitoring your SQL Server Instances

    Join SQL Server MVP Brad McGehee to learn why it is so important to monitor your SQL Server instances and what you should consider when starting out. This webinar will also show you how you can use Red Gate's SQL Monitor for SQL Server monitoring and will include an overview of the new features released in v3.0, including the ability to create your own custom metric definition and to support different access permissions.

    Read the article

  • SQL Server Central Webinar Series #19: Proactive Data Growth Management

    Our 19th webinar will feature Brad McGehee talking about storage challenges, costs, and potential solutions for better managing your data. Tuesday, June 12, at 4:00pm GMT. What are your servers really trying to tell you? Find out with new SQL Monitor 3.0, an easy-to-use tool built for no-nonsense database professionals.For effortless insights into SQL Server, download a free trial today.

    Read the article

  • Using dates, and times in SQL Server: a workbench approach

    In this workbench, Robyn Page provides a gentle introduction to the use of dates in SQL Server. In this new version of her article, it is brought up to date with the newer Datetime features in SQL Server 2005 and 2008. Calling all Exceptional DBAs...Enter the awards now for your chance to become 2010’s Exceptional DBA and don’t forget to download your free copy of Brad McGehee’s Day-to-Day DBA Best Practices poster. Nominate now.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20  | Next Page >