Posts

html - Responsive Form on top of Responsive Image? - Bootstrap -

i trying place form on top of responsive image, , want form responsive , resize in relation image currently image responsive cannot form stick in 1 place on image , resize in same position is possible? current code: http://www.codeply.com/go/ffgsrfictx the following correspond form section of page have provided. i have removed image element , used resource link background-image of form element. form fields wrapped bootstrap classes. a min-height has been set on form element prevent distortion of background image. html: <!--- bootstrap style sheet --> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" /> <!-- form section --> <section id="contact class" class="container content-section text-center"> <h1 class="brand-heading">contact</h1> <div class="container-fluid"> <div class="row">...

ruby on rails - undefined method `popups_path' for # -

i create model, view , controller when added form code on new.html.haml file. started showing error. routes defined follows model popups.rb class popups < activerecord::base attr_accessible :title, :body, :slug, :pipelinetype end controller popups_controller.rb class popupscontroller < applicationcontroller def new @popups = popups.new end def create @popups = popups.new(params[:url]) if @popups.save flash[:popups] = @popups.id redirect_to new_popups_url else render :action => "new" end end def show @popups = popups.find(params[:id]) redirect_to @popups.url end end views popups - new.html.haml = simple_form_for @popups |f| = f.input :title = f.input :body = f.input :pipelinetype = f.input :slug = f.submit routes.rb resources :popups, :only => [:show, :new, :create] migrate file create_table :popups |t| t.string :title t.text :body t.string :slug ...

javascript - Angularjs issue $http.get not loading image -

i'm trying create ionic application uses gallery. i'm unsure why image isn't being loaded application. what i'm trying develop gallery loads images json file. here's html <ion-view view-title="gallery" align-title="center"> <ion-content ng-controller="photoctrl" ng-init="getimages()"> <div class="row" ng-repeat="image in images" ng-if="$index % 4 === 0"> <div class="col col-25" ng-if="$index < images.length"> <img ng-src="{{data.images[$index].src}}" width="100%" /> </div> <div class="col col-25" ng-if="$index + 1 < images.length"> <img ng-src="{{data.images[$index + 1].src}}" width="100%" /> </div> <div class="col col-25" ng-if="$index + 2 < images.length"...

ruby on rails - API test writes in dev db but reads in test db -

i'm trying test api airborne the call api works , create user, in dev db : there no log of creation , find using rails c. but when user.find in test, searches test db : there logs , doesn't find user. here's test : require 'rails_helper' describe 'register#create' 'should create new user' post '/register', { email: 'mail@mail.fr', password: '12345678', password_confirmation: '12345678' } puts response.body expect_status 200 expect(user.find_by_email('mail@mail.fr')).to exist end end here's method i'm trying test : class registrationscontroller < devise::registrationscontroller respond_to :json skip_before_filter :verify_authenticity_token acts_as_token_authentication_handler_for user skip_before_filter :authenticate_entity_from_token!, only: [:create] skip_before_filter :authenticate_entity!, only: [:create]...

jquery - How do i edit a Javascript / Bootbox/ Bootstrap confirm window? -

i have simple bootbox / javascript confirm window at: https://www.guard-gate.com/test2/index.html how make success button link google, danger button link yahoo.com , click me button close box? how change position of window in middle of page? you try setting modal in middle: var windowheightcalc = $(window).height() / 2, modalheightcalc = $('.modal-content').height(); $('.modal').css({ 'margin-top': [windowheightcalc - modalheightcalc, 'px'].join('') }); you don't need bootbox making modal use default bootstrap modal - http://getbootstrap.com/javascript/#modals you can modify , change links wish. open run: $('#mymodal').modal('show'); and hide it: $('#mymodal').modal('hide');

Visual Studio C++ project - Can't find std lib -

sorry dumb question i'm new using visual studio c++ ... i have custom c++ project in visual studio 2013 (it's example project developing reason rack extensions) , works have resharper installed , shows me lot of errors in code pointing out std files , types aren't found (e.g. stddef.h , cmath , null , among others). how tell project (or resharper?) find them?

Is there a way to optimize this x86 assembly code? -

assume given values in eax,ecx. write piece of code calculates 5*eax + 3*ecx + 1, , stores result inside eax. (* means multiplication here). my code : ;initialize values in eax , ecx mov eax,3 mov ecx,4 ;compute 3*ecx mov ebx,eax mov eax,ecx mov edx,3 mul edx ; compute 5*eax mov ecx,eax mov eax,ebx mov edx,5 mul edx ; compute 5*eax + 3*ecx + 1 lea eax,[ecx + eax] inc eax if "optimize" mean optimize instruction count, sure, use lea more: ;initialize values in eax , ecx mov eax,3 mov ecx,4 ;compute 3*ecx lea ecx,[ecx*2 + ecx] ; compute 5*eax lea eax,[eax*4 + eax] ; compute 5*eax + 3*ecx + 1 lea eax,[ecx + eax + 1] this 16 bytes less in machine code size if eyes serve me right. the rules governing can compute lea listed in section specifying offset in intel's manuals .