Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    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.
    Fari Liang
    @fariliang
    See the login on the homepage?
    It is not a devise page, but you are able to log in there.
    You can copy the form of login on the homepage to any other page and it will work.
    Sammy khaleel
    @Sammykhaleel
    devise registration page looks like this
    <!--~~~~~~~~~~~~~~~~~~~~~~~~ Before ~~~~~~~~~~~~~~~~~~~~~~~~-->
        <!-- Page Title -->
        <% provide(:title, "Sign in")%>
    
          <!-- Page Background -->
          <!DOCTYPE html>
          <html style="background: url(/assets/background1.jpg) no-repeat center center fixed; 
          -webkit-background-size: cover;
          -moz-background-size: cover;
           -o-background-size: cover;
          background-size: cover;"><!-- Signup Page Background -->
    <!--~~~~~~~~~~~~~~~~~~~~~~~~ Sidebar ~~~~~~~~~~~~~~~~~~~~~~~~-->
    <!--~~~~~~~~~~~~~~~~~~~~~~~~ Page Contents ~~~~~~~~~~~~~~~~~~~~~~~~-->
    
    <!-- Sign Up -->
    <div class="user-links">
        Do not have an account? <%= link_to 'Sign up', new_user_registration_path, class:"no_ajaxify" %>
    </div>
    
    <div class="center" style="width: 310px;">
    
        <!-- Cutter --><ol style="margin-top: 80px;"></ol>
    
        <span id="Join-Ratafire">Sign in.</span>
    
        <!-- Cutter --><ol style="margin-top: 18px;"></ol>
    
        <div id="Signin-box">
    
            <!-- Signin Form -->
            <%= form_for(resource, :as => resource_name, :url => session_path(resource_name),:html => {:class => "no_ajaxify"}) do |f| %>
    
            <ol>
                <%= f.text_field :email, class: "inputbox signupbox", placeholder: "Email" %>
            </ol>
            <ol>
                <%= f.password_field :password, class: "inputbox signupbox", placeholder: "Password" %>
            </ol>
            <ul>
                <% if devise_mapping.rememberable? -%>
                <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
                <% end -%>
                <%= link_to "Forgot password?", new_password_path(resource_name) %>
            </ul>
            <ol style="margin-top: 15px; padding-left: 157px;">
                <%= f.submit "SIGN IN", class: "btn-submit btn-submit-small btn btn-small2 btn-small-blue" %>
            </ol>
            <% end %>
    
        </div><!-- end of Signin-box -->
    
    </div><!-- end of center-->
    
    <!-- Footer -->
    <div style="padding: 0px 20px 18px 0; margin-top: 287px;">
        <%= render 'layouts/footer' %>
    </div>
    
    </html>
    Fari Liang
    @fariliang
                        <!-- Signin Form -->
                        <%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => 'no_ajaxify'}) do |f| %>
    
                              <ol>
                                  <%= f.text_field :email, class: "inputbox signupbox2", placeholder: "Email" %>
                              </ol>
                              <ol>
                                  <%= f.password_field :password, class: "inputbox signupbox2", placeholder: "Password" %>
                              </ol>
                              <ol style="margin-top:15px;color:#999;margin-left:120px;">
                                  <% if devise_mapping.rememberable? -%>
                                <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
                                  <% end %>
                              </ol>
                              <ol>
                              <%= link_to "Forgot your password?", new_password_path(resource_name), class:"no_ajaxify", style:"margin-left:150px;" %>
                             </ol>
                            <ol style="margin-top: -35px; padding-left: 418px;">
                                <div id="submit">
                                    <%= f.submit "SIGN IN", class: "btn-submit btn-submit-small btn btn-small2 btn-small-blue" %>
                                </div>
                            </ol>
                        <div class="signupshow-signup" style="margin-top: -32px; margin-left: 180px;" id="signupshow-signup">
                            Sign Up
                        </div>                            
                        <% end %>