Posts

jQuery - Dynamically added content - Radio on change function -

i using ajax load popup containing different settings, including button ("click" event) , radio buttons ("change" event). while "click" event works fine, (using following function) $("#my_popup").on("click", '.my_button', function() { "use strict"; // things }); ... "change" event not. see corresponding function below: $('#my_popup').on('change', 'input[name=input_name]:radio', function(){ "use strict"; if(condition) { // other things } else { // other things } }); any ideas how make work? according dynamic event binding rules in thread believe should working fine... html: <div id="my_popup"> <input id="radio_1" type="radio" name="input_name"> <input id="radio_2" type="radio" name="input_name"> <!-- [...] --> </div> tha...

php - Generate special JS for each modal Bootstrap 3 -

i'm making shop script got problem. made function show items mysql , add modal don't know how add js each modal can buy item without reloading page, on modal. code of item creating: function create_item($id, $imgid, $title, $desc, $cost, $smscode, $smsnumber) { echo ' <div class="col-sm-12 col-md-3 col-md-offset-1"> <div class="thumbnail"> <span class="pull-right title-itemshop">'. $title .'</span><img class="pull-left"src="id/'. $imgid .'.png"/> <br/><hr class="hr-itemshop"/> <a href="#" class="btn btn-danger form-control" role="button" data-toggle="modal" data-target="#'. $id .'">zobacz więcej &raquo;</a> </div> <div id="'. $id .'" ...

javascript - Node.js: how to request an image only if it changed -

i'm designing node.js app. 1 of tasks regularly download set of images public, external, site. 1 requirement avoid repeating download of images not changed previous download. plan use "request" module, since far more complete , flexible respect other networking modules (please correct me if i'm wrong). this code i'm using (please ignore mistakes, comparing dates > or < operators, consider pseudo-code ...): var request = require('request'); var myresource = { 'url': 'http://www.example.com/image1.jpg', 'last-modified': 'mon, 28 sep 2015 08:44:06 gmt' }; request( myresource.url, { method: 'head'}, function (err, res, body) { if (err) { return console.error('error requesting header:', err); } var lastmodifieddate = res.headers['last-modified']; console.log('last modified date:', lastmodifieddate); if (lastmodifieddate > myresource['la...

package - How do I speed up packaging of my WAR project in Maven 3.3.3? -

i’m using maven 3.3.3. have war project large number of static assets. when building war project (using “mvn clean install”), project take upwards of 15 minutes build, when java files have changed. below war plugin configuration. there way speed building of file? i’m using “in=place” , “usecache” options no avail … <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-war-plugin</artifactid> <version>2.6</version> <configuration> <usecache>true</usecache> <workdirectory>${user.home}/${project.artifactid}/war/work</workdirectory> </...

Objective C iOS - Crossfade size transition for UILabel -

i trying make custom uiview in label on view starts two-line preview of text, grows size of text when view pulled down make room bigger label. want transition crossfade between 2 sizes. if set frame inside animation block, animates label coming in off-screen @ new size instead of crossfading. if put in completion block, doesn't crossfade animate @ all. i'm sure doing dumb, here. note using transitionwithview in example code below, same thing happens animatewithduration... cgsize newsize = [self.label.text boundingrectwithsize:cgsizemake(self.label.frame.size.width, maxfloat) options:nsstringdrawinguseslinefragmentorigin attributes:@{ nsfontattributename : self.label.font } context:nil].size; cgrect ...

elasticsearch - Notification System on ELK -

i have elk stack. need have notification system query elastic search particular query , trigger email notification if finds one.can suggest such open source notification tool? elastic offers commercial system this, watcher . if want alert on individual events, can use email{} output logstash. assuming logs not first thing you're monitoring, recommend integrating type of check existing monitoring system. can write script these (like nagios, or commercial systems) runs query want. there's more on rational , design ideas here .

angularjs - withFixedColumns property dont work for me using angular datatable -

i using angulardatable. need create table , fixed first column. datatable work fine, when add withfixedcolumns table dissapear. have included libraries. this part of code var app = angular.module('dataview', ['datatables', 'datatables.fixedcolumns']) app.controller('dataviewctrl', function($scope, dtoptionsbuilder,){ $scope.dtoptions = dtoptionsbuilder.newoptions() .withoption('scrolly', '500px') .withoption('scrollx', '100%') .withoption('paging', false) .withoption('scrollcollapse', true) }) <script src="/assets/vendor/jquery/dist/jquery.min.js"></script> <script src="/assets/vendor/bootstrap/dist/js/bootstrap.min.js"></script> <script src="/assets/vendor/angular/angular.min.js"></script> <script src="/assets/vendor/datatables/media/js/jquery.datatables.min.js"></script> ...