Posts

javascript - Broccoli and RequireJS -

hi i'm trying improve build time of requirejs app using broccoli. i'm using grunt task runner. plugin i'm using: https://github.com/dfournier/broccoli-requirejs this code have. running 'test' task nothing? grunt.registertask( 'test', function( ) { var rjs = require( 'broccoli-requirejs' ); var t = new rjs( 'private/application/controllers', { verbose: true, requirejs: { baseurl: 'private/application/controllers/', dir: 'public/files/cache/', mainconfigfile: 'private/application/controllers/system/js/require.config.js', optimize: 'uglify2', skipdiroptimize: true, generatesourcemaps: true, findnesteddependencies: true, preservelicensecomments: false, fileexclusionregexp: /^(\.|views)|(\.php)$/, paths: { 'requirejs': 'system/js/requir...

css - Long URLs don't stay inside the Bootstrap column -

Image
i'm developing wordpress theme bootstrap grids, , see problem in mobile view. fixed bootstrap column, there links in references section don't stay inside column , make mess of grids , create horizontal scroll bar: i've tried , nothing works, please need help. here code single.php : <div class="c-content-box c-size-md" style="margin-top:4%;"> <div class="container"> <div class="row"> <div class="c-content-blog-post-card-1-grid"> <div class="row"> <div class="col-md-12"> <div class="col-md-8 wow animate fadeinleft"> <div class="c-media 2 img"> <div class="c-overlay-wrapper"> <div class="c-overlay-content"> ...

javascript - Not able to combineReducers() -

i have 2 reducers in separate folders separate components in structure similar this: index.js /componentone |_ componentone.js |_ componentoneactioncreator.js |_ componentonereducer.js /componenttwo |_ componenttwo.js |_ componenttwoactioncreator.js |_ componenttworeducer.js each of these reducers work individually within app - when createstore in index.js (they're import ed in) - if try , combine them using combinereducers() , neither of functions work (doesn't break ui however). think has state - more code reference below: index.js const rootreducer = combinereducers({ componentonereducer, componenttworeducer }); let store = createstore(rootreducer, applymiddleware(thunk)) componentonereducer export default(state = {}, payload) => { let newstate = json.parse(json.stringify(state)); switch (payload.type) { case 'request_data': newstate.isloading =...

java - Why does my list not change with lambda? -

this question has answer here: remove objects arraylist based on given criteria 6 answers i have following simple method: public void exercise2(list<string> list) { list.stream().filter(s -> s.length() % 2 == 0).collect(collectors.tolist()); } and simple test, not complete successfully: @test public void testexercise2() { lesson1 lesson1 = new lesson1(); list<string> list = new arraylist<>(arrays.aslist("alpha", "bravo", "charlie", "delta", "echo", "foxtrot")); list<string> inputlist = new arraylist<>(list); lesson1.exercise2(list); assertequals("input " + inputlist.tostring(), arrays.aslist("echo"), list); } streams never modify original list. your functi...

hive - org.apache.spark.sql.TableNotFoundException when trying to create a table in Snappydata -

i trying create table spark shell (snappydata 0.9) this: val snappy = new org.apache.spark.sql.snappysession(spark.sparkcontext) val vertextableschema = structtype(array(structfield("vertexid", | stringtype, false), structfield("custname", stringtype, false))) snappy.createtable(tablename = "vertextable", | provider = "column", // create snappydata column table | schema = vertextableschema, | options = map.empty[string, string], // map options. | allowexisting = true) and getting following error: org.apache.spark.sql.tablenotfoundexception: table 'app.vertextable' not found; @ org.apache.spark.sql.hive.snappystorehivecatalog$$anonfun$3.apply(snappystorehivecatalog.scala:449) @ org.apache.spark.sql.hive.snappystorehivecatalog$$anonfun$3.apply(snappystorehivecatalog.scala:449) @ scala.collection.maplike$class.getorelse(maplike.scala:128) @ scala.collecti...

Elasticsearch malformed query, expected [END_OBJECT] but found [FIELD_NAME] -

i'm using elasticsearch client doing search query using constant_score , aggregations it's throwing exception: [parsing_exception] [constant_score] malformed query, expected [end_object] found [field_name] this i'm creating query , calling search function: fetchdata: function fetchfn(req, res, next) { var model = new urlmodel(); util.log('fetching data es::'); var query = buildaggregateurl(req.reqdata); // if (req.reqdata['domain']) { // var termfilter = { "term": { "domain": req.reqdata.domain } }; // query.constant_score.filter.bool.must.push(termfilter); // } model.search({ query }, function (er, re) { if (re) { req.sendresult = re; } next(er); }); function buildaggregateurl(opts) { var query = { constant_score: { filter: { bool: { must: [{ ...

failed to install my own perl module(pm file) -

i have made own perl modules(pm files),named test.pm package test; use exporter; use strict; use file::basename qw(basename dirname); use cwd qw(abs_path); use file::path qw(make_path); use findbin qw($bin $script); begin { our @isa = qw(exporter); our @export = qw(mkdirordie); our $version = 1.0; } sub mkdirordie { ($dir) = @_ ; if(!-d $dir){ make_path($dir); $dir=abs_path($dir); # timelog("directory created: $dir"); } } and tried install module follows, h2xs -ax -n test perl makefile.pl make make install there no error,and copy test.pm /usr/lib64/perl5/5.10.0/ ,but when call sub function using test, error has occurred, undefined subroutine &main::mkdirordie called @ /to/my/path/main.pl line 92 is there ignored? it's unclear @ point things started go wrong you. firstly, test.pm bad name perl module. perl modules should have names begin upper case letters (and test.pm taken). ...