Posts

Webpack build taking too much time -

i'm using webpack module bundler project. added third party libraries lead increase in build time. due uglify js plugin. build stucks @ 91% before compltetly running webpack. without plugin, it's taking less time. have use plugin. tried use parallel uglify js plugin. didn't seem work in case. suggest me in other ways should try succeed in reducing build time. have attached webpack file reference. var webpack = require('webpack'); var path = require("path"); var glob = require("glob"); module.exports = { entry: glob.sync("./app/javascript/views/*.js") .reduce(function(map, path) { map[path.split('/').pop()] = path; return map; }, {}), output: { path: path.resolve(__dirname, 'app/assets/javascripts'), filename: '[name]' }, stats: { colors: true, reasons: false }, resolve: { extensions: ['.js', '.jsx'], ...

Excel VBA: Trigger macro on cut/paste/delete/insert events -

i have conditional formatting rule defined macro, deletes old rules , replaces them updates ones: sub setcondformat() set table = activesheet.listobjects("rules") table.range.formatconditions.delete set attribute = table.listcolumns("attribute") attribute.databodyrange.formatconditions _ .add(xlexpression, xlequal, "=isempty(a2)") .interior .colorindex = 0 end end end sub the conditional formatting in excel needs updated. otherwise cell ranges in rules fragmented. let's have 2 rules: make $a$1:$a$30 red make $b$1:$b$30 blue select a10:b10 , copy/paste a20:b20 . excel delete conditional formatting. for a20:b20 rules applied cells , add new rules have formatting a20:b20 . end 4 rules: make =$a$20 red make =$b$20 blue make =$a$1:$a$19,$a$21:$a$30 red make =$b$1:$b$19,$b$21:$b$30 blue this happens, when table structure gets changed through cut/paste/delete/insert events...

javascript - REACT - Child position with respect of scale of parent -

i have situation, have parent div in there can number of children divs , applying scale on parent div , since scale applied on parent looks child element displacing position, want children divs follow parent scale how manage situation, here portion of code.. <div classname="image-viewer"> <div classname="image-wrapper"> <div class="zoom-2 image-outer"> <img class="map-image" src="map.png"/> <div class="booth" style="left: 617px; top: 178px;">&nbsp;</div> <div class="booth" style="left: 735px; top: 160px;">&nbsp;</div> </div> </div> </div> in above code child elements have there left , top defined dynamically mouse click position on map image . have 4 predefined zoom levels css supplying dynamically on zoom in/out buttons. below css .image-viewer .image-wrapper { posi...

oauth - Caching Google JWT -

i have mobile app communicates server. authentication in mobile app, i'm using sign in google. sign in returns accesstoken send server , verify using google-auth-library suggested here: https://developers.google.com/identity/sign-in/web/backend-auth import googleauth 'google-auth-library' const auth = new googleauth() const client = new auth.oauth2(myclientid, '', '') apiroutes.use((req, res, next) => { // token request const token = req.token if (token) { // verify secret google client.verifyidtoken(token, myclientid, (err, payload) => // proceed user authenticated ... is necessary make call every request user makes? practice sort of caching? or have own implementation of jwt on server includes google payload? no, server should creates account user once validates access token , saving google id in database along other user details (id, email, name etc), , returns access token mobi...

Nifi - No Viable alternative @ Input '{' -

while trying insert xml data in cassendra db using apache nifi, getting below error. what's going wrong? error : "no viable alternative @ input '{' below replacetext processor entries: search value : (?s:(^.*)$) replacement value : $1 character set : utf-8 maximum buffer size :1 mb replacement strategy :regex replace evaluation mode :entire text putcassandraql expects input valid cql statement. if have json in content (presumably following suggestions your other question ), need create cql statement json "payload", such using replacetext following replacement value: insert mytable json '$1' if previous flow file contains json object (and has no single quotes or escaped), should create valid cql statement it, use in putcassandraql.

java - Cross browser testing on Selenium using NetBeans -

i've been working selenium webdriver 2 weeks now. came across tutorials on youtube on how test selenium on multiple browsers. but, of tutorials run using eclipse. video shows implementing xml file , running xml file. tried doing on netbeans, doesn't seem run. is there way run xml file or there way can run script on multiple browsers using netbeans? this java file: public class hotel_tree_of_life { extenthtmlreporter htmlreporter = new extenthtmlreporter("d:\\selenium\\report_v3.html"); extentreports extent = new extentreports(); extenttest test; javascriptexecutor jse; webdriver driver; @beforetest @parameters("browser") public void setup(string browser) { if(browser.equalsignorecase("firefox")) { system.setproperty("webdriver.gecko.driver", "d:\\selenium\\geckodriver.exe"); driver = new firefoxdriver(); } else if(browser....

c# - Updating big table inside migration -

i've created migration update values in 1 column. migration looks follow: public partial class updatestatuses : dbmigration { public override void up() { var updatesql = @" begin update article set status = case when status <> -1 status + 1 else status end, statusprev = case when statusprev <> -1 statusprev + 1 else statusprev end; end;"; sql(updatesql, true); } public override void down() { var updatesql = @" begin update article set status = case when status <> -1 status - 1 else status end, statusprev = case when statusprev <> -1 statusprev - 1 else statusprev end; end;"; sql(updatesql, true); } } migration works fine on smaller datasets, table migration designed run on has ~11m of records. when i'm running it throw me such exception: engine task e...