Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Fari Liang
    @fariliang
    Ok
    See you tomorrow.
    I will go buy some snacks for work...
    Sammy khaleel
    @Sammykhaleel
    Nice love snacks
    Fari Liang
    @fariliang
    This is going to be very hard for I can barely read it. Are you familiar with making API calls?
    Sammy khaleel
    @Sammykhaleel
    Hmmm not much i'll take a look at it.
    Fari Liang
    @fariliang
    Let me know a time.
    Sammy khaleel
    @Sammykhaleel
    does 5 or 6 works?
    Fari Liang
    @fariliang
    Ok.
    Sammy khaleel
    @Sammykhaleel
    ill be in way soon, where should i go?
    Fari Liang
    @fariliang
    68 west 3rd street.
    5FE
    FPS_Advanced_Quick_Start.pdf
    Sammy khaleel
    @Sammykhaleel
    require 'open-uri'
    require 'nokogiri'
    require 'pry'
    
    class ServiceSeeds
    
      attr_accessor :doc, :status_array, :description, :delay_header, :output_hash
    
      def initialize
        @output_hash = Hash.new {|hash, key| hash[key] = {}} 
        @doc = Nokogiri::XML(open("http://web.mta.info/status/serviceStatus.txt"))
      end
    
      def descriptive_status
        @doc.xpath('//subway//line').each do |line|
    
          train_name = line.at_css("/name").text
    
          train_status = line.at_css("status").text
          @output_hash[train_name][:status] = train_status 
          super_descriptive = line.xpath("text")
    
          html = Nokogiri::HTML(super_descriptive.text)
    
          if train_status == "GOOD SERVICE"
            super_descriptive = "On time"
          else  
            html.css(".plannedWorkDetailLink").each do |detail|
              planned_work = detail.children.text
              @output_hash[train_name][:header] = planned_work
            end
    
            html.css(".plannedWorkDetail").each do |detail|
              planned_work_detail = detail.children.text
              @output_hash[train_name][:details] = planned_work_detail
            end
    
            html.css(".TitleDelay").each do |detail| # working with this 
              title_delay = detail.children.text
              @output_hash[train_name][:title_delay] = title_delay
            end
    
            html.css(".TitleServiceChange").each do |detail|
              title_service_change = detail.children.text
              @output_hash[train_name][:service_change] = title_service_change
            end       
          end 
        end 
        @output_hash
      end
    end
    
     service = ServiceSeeds.new
    
    puts "deleting old Service seeds"
    Service.destroy_all
    
    service.descriptive_status.each do |train_name, info|
    
      Service.create(name: train_name, traffic: info[:status], description: info[:header], more_detail: info[:details])
    end
    
    
    puts "Updated service information"
    Sammy khaleel
    @Sammykhaleel
    Hey quick question a bout the mobile.css.scss did you copy the style sheet inside the promo and placed it in the mobile.css.scss?
    Fari Liang
    @fariliang
    No.
    It was from another template.
    You can remove it.
    Sammy khaleel
    @Sammykhaleel
    i can't when i do the template will not work
    and also i think it's the same style file i checked out
    style.css = custom.css.scss
    Fari Liang
    @fariliang
    Because there are many js files for the template.
    It took me several hours to get it to work.
    Can you put the style file in the mobile.css ?
    Mobile.css.scss is called in application.css
    So it is called all the time. To have mobile specific ones, you can put them in the folder slidebox and then call them like how we did in application.html.erb
    Sammy khaleel
    @Sammykhaleel
    I'm working on it, but i need to show the header
    Fari Liang
    @fariliang
    Every file in a directory is not called by the application.css directly,
    Sammy khaleel
    @Sammykhaleel
    Screen Shot 2015-03-01 at 8.09.51 PM.png
    Fari Liang
    @fariliang
    Let's use the header of slidebox instead of our previous header first. I can try to put our previous header after you have done everything else, it will be easier then.
    Fari Liang
    @fariliang
    Also can you send me the techstars application's last question: what have you archived?
    achieved*
    Sammy khaleel
    @Sammykhaleel
    Ok i just finished it.
    Fari Liang
    @fariliang
    Ok
    Sammy khaleel
    @Sammykhaleel
    How is it going with Amazon?
    Fari Liang
    @fariliang
    Working.
    Fari Liang
    @fariliang
    Give me two more days. Can you send me the answer to that techstars question? The deadline is near.
    Sammy khaleel
    @Sammykhaleel
    I did put in the techstarters already can you check
    Also i have noticed that you changed devise pages so when i log in i get this
    Screen Shot 2015-03-03 at 9.58.05 PM.png
    or more precisely like this
    Screen Shot 2015-03-03 at 10.01.03 PM.png
    Fari Liang
    @fariliang
    Ok
    Interesting. I didn't see that in the sign in page.
    On my Chrome, it is normal.
    Saw the Techstars. I will submit it soon. Thanks. I studied some strategy to understand our previous failures in expansion. Now I am back to work.
    Sammy khaleel
    @Sammykhaleel
    I mean we can't use login them version because we already have in devise registration page. do have any thought a bout it.