shintetsu_80's Profile User Rating: -----

Reputation: 32 Craftsman
Group:
Active Members
Active Posts:
107 (0.05 per day)
Joined:
01-July 08
Profile Views:
4,241
Last Active:
User is offline Dec 08 2014 03:47 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Mac
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Your Car:
Nissan
Dream Kudos:
0

Latest Visitors

Icon   shintetsu_80 has not set their status

Posts I've Made

  1. In Topic: How to pass Select Option value to JS?

    Posted 8 Dec 2014

    Try just using value instead of selectedValue.

    Change this
    var selectedOption1 = document.getElementById("username").selectedValue;
    
    


    to

    var selectedOption1 = document.getElementById("username").value;
    
  2. In Topic: scaling text height jQuery

    Posted 18 Feb 2014

    If you want the actual text to scale you should look at the font-size css property. I don't know what environment you're working in (resizable at runtime) but the short answer is yes you can do this with jQuery. Checkout jQuery.css.
  3. In Topic: looping algorithm suckyness

    Posted 18 Mar 2013

    cfoley I wholly agree with you and in fact my implementation is similar to your encapsulation idea. O(n^2) is probably not going to be an issue in my case. I was really just curious if someone smarter than me might have a solution that I wasn't seeing. Thanks for you input.
  4. In Topic: looping algorithm suckyness

    Posted 17 Mar 2013

    Starbucks internet connection sucks! Removing a double post cuz I don't know how to just delete.
  5. In Topic: looping algorithm suckyness

    Posted 17 Mar 2013

    View Postcfoley, on 16 March 2013 - 10:59 PM, said:

    Encapsulate the problem in a class. Then you don't have to care if the class materialises the view or scans your arrays every time it is queried. I'm not entirely clear on how your association array works but something suitable can probably be adapted from the following:

    public class Relation<A, B> {
    
    	public Relateion(A[] as, B[] bs, Object[] associations) {
    		// TODO Auto-generated constructor stub
    	}
    	
    	public List<A> associatedAs(B B)/>/>/> {
    		// TODO Implement
    		return null;
    	}
    
    	public List<B> associatedBs(A a) {
    		// TODO Implement
    		return null;
    	}
    
    }
    
    


    cfoley I don't understand how this solves the looping issue. I'm reading your answer to imply creating a utility class that builds the two association arrays that are needed via the Relateion method. So the Relateion method would still do the exact same looping algorithm, but you get the accessor methods associatedAs and associatedBs. Maybe I wasn't clear in the initial post, or I misunderstand you're solution. Creating a wrapper or utility object to hold the finished products is really a non-issue. I only interested in trying to find a better solution to the initial looping algorithm.

    To be fair these are completely disparate objects so there just might not be a better solution.

My Information

Member Title:
D.I.C Head
Age:
34 years old
Birthday:
January 4, 1980
Gender:
Location:
Austin, TX
Interests:
Working out
Programming
Gaming
Full Name:
Ralph Smith
Years Programming:
5
Programming Languages:
C/C++, python, Objective-C, java, C#

Contact Information

E-mail:
Private
Website URL:
Website URL  http://ralphunlimited.com

Friends

shintetsu_80 hasn't added any friends yet.

Comments

shintetsu_80 has no profile comments yet. Why not say hello?