AaronHopkins's Profile User Rating: -----

Reputation: -1 Dishonored
Group:
Active Members
Active Posts:
182 (0.14 per day)
Joined:
01-March 11
Profile Views:
1,185
Last Active:
User is offline Sep 29 2014 07:43 PM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   AaronHopkins has not set their status

Posts I've Made

  1. In Topic: Ruby - Compare Integers by Divisiblity of 2

    Posted 15 Sep 2014

    I have to use <=> & i cant use Fixnum though.
  2. In Topic: Ruby - Compare Integers by Divisiblity of 2

    Posted 15 Sep 2014

    so would something like this help?

    	def <=>(compare)
    		divisibleBy2(int) <=> compare.divisibleBy2(compare.int)
    


    it's printing out 4 >10 = false when it should be true
  3. In Topic: Ruby - Compare Integers by Divisiblity of 2

    Posted 15 Sep 2014

    class Integer
    	include Comparable
    	attr :int
    
    	def <=>(compare)
    		divisbleBy2 <=> compare.divisibleBy2(compare.int)
    	end
    
    	def initialize(int)
    		@int = int
    	end
    
    	def inspect
        		@int
    	end
    end
    
    
    def divisibleBy2(x)
    	i = 0
    	while x % 2 == 0
    		x = x/2
    		i = i + 1
    	end
    	return i
    end
    
    int1 = Integer.new(4)
    int2 = Integer.new(10)
    
    print(int1, " > ", int2, " = ", int1 > int2, "\n")
    


    I feel i'm so close, yet i'm getting the error of:
    undefined method 'new' for Integer:Class
    


    Keep in mind, I have to use that Integer class & not fixnum
  4. In Topic: The data source does not support server-side data paging.

    Posted 20 Apr 2014

    Thank you, that worked. But now I can only stay on page 1 & can't go through the rest of the pages because i'm receiving an error of not firing PageIndexChanging. I tried something like this:
          protected void titlesGridView_PageIndexChanging(object sender, EventArgs e)
          {
              titlesGridView.PageIndex = e.NewPageIndex;
              titlesGridView.DataSource = titlesQuery.ToList();
              titlesGridView.DataBind(); // displays query results  
    
          }
    


    But it won't compile. Does it need its own method like I did?
  5. In Topic: SQL Query To Obtain authors that Occurs more than twice

    Posted 13 Mar 2014

    after i join the tables this is how it looks:
    AU_FNAME       |AU_LNAME       |TITLE_NAME                              
    ------------------------------------------------------------------------
    Sarah          |Buchman        |1977!                                   
    Sarah          |Buchman        |200 Years of German Humor               
    Christian      |Kells          |Ask Your System Administrator           
    Hallie         |Hull           |But I Did It Unconsciously              
    Klee           |Hull           |But I Did It Unconsciously              
    Klee           |Hull           |Exchange of Platitudes                  
    Wendy          |Heydemark      |How About Never?                        
    Wendy          |Heydemark      |I Blame My Mother                       
    Klee           |Hull           |I Blame My Mother                       
                   |Kellsey        |Just Wait Until After School            
                   |Kellsey        |Kiss My Boo-Boo                         
    Wendy          |Heydemark      |Not Without My Faberge Egg              
    Hallie         |Hull           |Perhaps It's a Glandular Problem        
    Klee           |Hull           |Perhaps It's a Glandular Problem        
                   |Kellsey        |Perhaps It's a Glandular Problem        
    Wendy          |Heydemark      |Spontaneous, Not Annoying               
    Sarah          |Buchman        |What Are The Civilian Applications?  
    

    thats wi/ using this code:
    select authors.au_fname, authors.au_lname, titles.title_name
    	from title_authors
    	inner join authors
    		on title_authors.au_id  = authors.au_id
    	inner join titles
    		on title_authors.title_id = titles.title_id;
    

    i need it to print like this:
    AU_FNAME       |AU_LNAME       |TITLE_NAME                              
    ------------------------------------------------------------------------
    Sarah          |Buchman        |1977!                                   
    Sarah          |Buchman        |200 Years of German Humor 
    Sarah          |Buchman        |What Are The Civilian Applications?   
    Wendy          |Heydemark      |How About Never?                        
    Wendy          |Heydemark      |I Blame My Mother 
    Wendy          |Heydemark      |Not Without My Faberge Egg 
    Wendy          |Heydemark      |Spontaneous, Not Annoying                        
    Hallie         |Hull           |But I Did It Unconsciously 
    Hallie         |Hull           |Perhaps It's a Glandular Problem                
    Klee           |Hull           |But I Did It Unconsciously              
    Klee           |Hull           |Exchange of Platitudes   
    Klee           |Hull           |I Blame My Mother  
    Klee           |Hull           |Perhaps It's a Glandular Problem                                         
                   |Kellsey        |Just Wait Until After School            
                   |Kellsey        |Kiss My Boo-Boo                         
                   |Kellsey        |Perhaps It's a Glandular Problem        
    


    basically, i think i got it but i don't know how to write it. i need to combine these 2 codes, but dont know how.

    select au_id
      from title_authors
      group by au_id
      having count(*)>2
    
    

    select authors.au_fname, authors.au_lname, titles.title_name
    	from title_authors
    	inner join authors
    		on title_authors.au_id  = authors.au_id
    	inner join titles
    		on title_authors.title_id = titles.title_id
    

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

AaronHopkins hasn't added any friends yet.

Comments

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