Posts

Showing posts from May, 2012

java - How to add git module in Android Stdio -

Image
i said bye bye eclipse , configured android studio 2.1.1 in machine , trying https://github.com/gorbin/asnetutorial social network integration project. i have downloaded file anse-master.jar github , dont understand how use in own project,that can have ability integrate social sites. can guide me how use these .jar in project.if sounds stupid please let go i'm beginner in android studio. go file>new>import module module source directory enter , done don't forget compile project(':volley') in build.gradle (module app) sync project. update: won't work first set project android in project view window.it then need open build.gradle file (module app) there should add these lines in dependencies compile 'com.github.asne:asne-facebook:0.3.1' compile 'com.github.asne:asne-linkedin:0.3.1' compile 'com.github.asne:asne-twitter:0.3.1' now click on sync now. wait for time gradle build project you. once done hav...

ElasticSearch ignores "from" when using "scroll" during search? -

when testing elasticsearch, have noticed that get /vitex.inventory/items/_search?scroll=1m { "from": 10, "size": 10 } and get /vitex.inventory/items/_search { "from": 10, "size": 10 } does not return same result, from parameter ignored when scroll used. how so? why can't scroll start @ specified offset? yes, scroll needs size , from not needed. the first scroll request retrieve size documents per shard , subsequent requests well. no need specify from ignored anyway.

excel - Apply one macro to another sheet/workbook regardless of sheet or workbook name -

i have issue macros returning errors, , wondering if guys shed light on issue. the macro have looks following: sub pivot1_macro() ' ' pivot1_macro macro ' ' keyboard shortcut: ctrl+shift+m ' sheets.add activeworkbook.pivotcaches.create(sourcetype:=xldatabase, sourcedata:= _ "7-14 week!r1c2:r199c35", version:=xlpivottableversion15).createpivottable _ tabledestination:="sheet5!r3c1", tablename:="pivottable3", defaultversion _ :=xlpivottableversion15 sheets("sheet5").select cells(3, 1).select activesheet.pivottables("pivottable3").pivotfields("partmod") .orientation = xlcolumnfield .position = 1 end with activesheet.pivottables("pivottable3").pivotfields("enteredshift") .orientation = xlrowfield .position = 1 end with activesheet.pivottables("pivottable3").pivotfields("defect") .orientation = xlrowfield .position = 1 end active...

c# - Resharper source template adding empty statement -

to ease testing, put resharper source template to create substitute class nsubstitute . [sourcetemplate] public static void substitute<t>(this t o, [macro(expression = "guessexpectedtype()", editable = -1)] string type) t : class { //$ o = substitute.for<$type$>(); } assuming field, private ilogger logger; has been defined, lets me type logger.sub (resharper suggests full method name there) generate logger = substitute.for<ilogger>(); . i still have 2 issues haven't been able figure out. 1) puts empty statement before replaced code, i.e. ; logger = substitute.for<ilogger>(); this appears happen whenever there statements below replaced line. resharper suggest empty statement can removed. why being adding begin with, , how can prevent it? 2) correctly guesses substitute type if nsubstitute has been imported class ( using nsubstitute; ). without it, logger = substitute.for<object>(); , suggestion import nsubs...

reactjs - Couldn't find preset "airbnb" relative to directory -

i'm trying set enzyme (written airbnb) in order run ui tests in react. however, no matter configuration have (and i've tried several) keep getting error. added .babelrc file has following inside: { "presets": ["airbnb"] } but still gives me same error. .babelrc file on same level package.json file. i've searched everywhere online see causing this, i'm @ loss. ideas? make sure install preset npm install --save-dev babel-preset-airbnb

highcharts - Slider on barchart -

with highcharts realized barchart. 1 show number of documents per year. select 1 or more dates, use slider located below graph. managed put in place. however, can not link chart. here, if put first cursor on 2000 , second on 2003, have graph should shows dates 2000, 2001, 2002, , 2003. can me please ? here html/php code : <script src="https://code.highcharts.com/highcharts.js"></script> <script src="https://code.highcharts.com/modules/exporting.js"></script> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css"> <link rel="stylesheet" href="/resources/demos/style.css"> <script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script> <div id="container"></div> <div style="margin: 20px 0px 0px 60px"> <!-- "oninput" attribute automatically showing value of slider on load ...

mysql - How avoid joining multiple times to the same table to get results back in single rows? -

i have schema requires joining same table multiple times more information on data pointed columns. below example schema shows situation: sql fiddle: http://sqlfiddle.com/#!9/7a4019/1 create table state ( employee int not null, boss int, manager int, rep int ); create table employee ( id int not null, name varchar(255) not null ); insert employee (id, name) values (1, "joe"); insert employee (id, name) values (2, "john"); insert employee (id, name) values (3, "jack"); insert employee (id, name) values (4, "jeff"); insert employee (id, name) values (5, "jason"); insert state (employee, boss, manager, rep) values (1, 2, 3, 4); insert state (employee, boss, manager, rep) values (2, 3, 3, 4); insert state (employee, boss, manager, rep) values (3, null, null, 4); insert state (employee, boss, manager, rep) values (4, 3, 3, null); insert state (employee, boss, manager, rep) values (5, 2, 3, 4); currently, way know information in s...

javascript - Bigcommerce Stencil 500 error -

i trying stencil set on trial store. have stencil theme set default, installed node 4.4.0 recommended, goes fine. stencil start goes fine. when access site through browser following error: debug: internal, implementation, error typeerror: uncaught error: self.assembler.gettranslations not function @ paper.loadtranslations (/users/oliverharoun/.nvm/versions/node/v4.4.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/@bigcommerce/stencil-paper/index.js:137:20) @ /users/oliverharoun/.nvm/versions/node/v4.4.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/@bigcommerce/stencil-paper/index.js:62:18 @ /users/oliverharoun/.nvm/versions/node/v4.4.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/async/lib/async.js:718:13 @ async.foreachof.async.eachof (/users/oliverharoun/.nvm/versions/node/v4.4.0/lib/node_modules/@bigcommerce/stencil-cli/node_modules/async/lib/async.js:233:13) @ _parallel (/users/oliverharoun/.nvm/versions/node/v4.4.0...

javascript - Angular-only TreeView -

i looking way display treeview using angular. i cannot figure out how make 1 using angularjs itself, seems not have native treeview. the basic requirements ability select parent values children values , table setup have follows: itemlocationid parentlocationid description i have setup if requiring setup children itemlocationid parentlocationid description children /'contains items have parentlocationids = items itemlocationid'/ any , appreciated. edit: to further explain trying accomplish, give better example of layout. i trying add list table user select items location. items have item location set , list auto-select correct location based on value. i minimizable (similar combobox) or show selected value (which can swapped between , tree via button or similar action) the following images show desiring collapsed expanded

javascript - How to pass string to a function inside a directive in AngularJS? -

this templating function custom directive have created. string str passed function obtaindynamicfield(str) coming undefined. str string , not variable . function gettemplate() { return ' <td>' + ' <div class="inner">' + ' <input type="text" ' + ' class="form-control" ' + ' data-dynamic-field="obtaindynamicfield(str)"'+ ' data-ng-model="formdata.product" >' + ' </input>' + ' </div>' + ' </td>' + i struggling past 2-3 hours in this. think need escape out str unable think far on how achieve it. kindly suggest. you need escap...

c++ - Bitonic sort for key/value array -

i'm trying modify the intel's bitonic sorting algorithm sorts array of cl_int s, sort array of cl_int2 s (based on key – i.e. cl_int2.x ). the intel's example consists of simple host code , 1 opencl kernel called multiple times during 1 sorting operation (multipass). kernel loads 4 array items @ once cl_int4 , operates on them. i didn't modify host code algorithm, device code. list of changes in kernel function: modify first kernel's parameter type int4* int8* (to load 4 key-value pairs) use .even components of thearray 's elements compare values ( < ) create " pseudomask " ( int4 ) , based on that, create mask pseudomask.xxyyzzww (to capture values) although output of modified kernel sorted cl_int2 array first component ( cl_int2.x ), values ( cl_int2.y ) incorrect – value of 1 item repeated next 4 or 8 items , new value used , repeated... i'm sure there's trivial mistake, i'm unable find it. diff of original...

c++ - Playing *.avi files with Qt -

i trying play *.avi file (~900mb) code: qmediaplayer* player = new qmediaplayer(this); player->setmedia(qurl::fromlocalfile("mes1.avi")); player->setvideooutput(ui->videowidget); player->play(); where ui->videowidget qvideowidget , every time play getting error code (in application output console) since google doesn't help, choice... directshowplayerservice::dorender: unresolved error code 0x80040266 (idispatch error #102) edit1: have installed k-lite codec pack 12.2.6. edit2: application 32bit, shouldn't problem since k-lite include 32bit ( source ). use vlc-qt, , find easy play sorts of video on platforms, xp, has been abandoned qt long time ago.

ruby on rails - rmagick install extconf.rb error -

hi i'm trying install rmagick 10 hours, frustration immense.. so here follows: c:\>ruby -v ruby 2.2.4p230 (2015-12-16 revision 53155) [i386-mingw32] c:\>rails --version rails 5.0.0 c:\>gem --version 2.4.5.1 c:\ruby22\bin>convert -version invalid drive specification. c:\imagemagick-6.9.5-q16>convert -version version: imagemagick 6.9.5-3 q16 x86 2016-07-22 http://www.imagemagick.org copyright: copyright (c) 1999-2015 imagemagick studio llc license: http://www.imagemagick.org/script/license.php visual c++: 180040629 features: cipher dpc modules openmp delegates (built-in): bzlib cairo flif freetype jng jp2 jpeg lcms lqr openexr pa ngocairo png ps rsvg tiff webp xml zlib and when im trying install (i have devkit) c:\ruby22>gem install rmagick -- --with-opt-dir=c:\imagemagick-6.9.5-q16 temporarily enhancing path include devkit... building native extensions with: '--with-opt-dir=c:\imagemagick-6.9.5-q16' take while... error: error installing...

javascript - What would be the best practice implementing Google Adwords Dynamic Remarketing Tag with AngularJS -

i trying dynamically populate google adwords remarketing tag. how google code looks like: <script type="text/javascript"> var google_tag_params = { dynx_itemid: 'replace_with_value', dynx_itemid2: 'replace_with_value', dynx_pagetype: 'replace_with_value', dynx_totalvalue: 'replace_with_value', }; </script> <script type="text/javascript"> /* <![cdata[ */ var google_conversion_id = {converion-id}; // replace {converion-id} conversion id var google_custom_params = window.google_tag_params; var google_remarketing_only = true; /* ]]> */ </script> <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> </script> <noscript> <div style="display:inline;"> <!-- replace {converion-id} conversion id --> <img height="1" width="1" style="border-style:none;" alt="" src="//google...

xml - Android Bug? Multiple animations don't animate at the same time -

so i'm applying one animation multiple imageviews (arrows) , using animationset class so, see below: animation animinstruct; //inside oncreate animinstruct = animationutils.loadanimation(this, r.anim.anim_instructions); imageview arrow_bottomright = (imageview) container.findviewbyid(r.id.arrow2); imageview arrow_bottomleft = (imageview) container.findviewbyid(r.id.arrow3); imageview arrow_topleft = (imageview) container.findviewbyid(r.id.arrow0); imageview arrow_topright = (imageview) container.findviewbyid(r.id.arrow1); animationset start_atsame_time = new animationset(true); start_atsame_time.addanimation(animinstruct); arrow_topleft.setanimation(start_atsame_time); arrow_topright.setanimation(start_atsame_time); arrow_bottomleft.setanimation(start_atsame_time); arrow_bottomright.setanimation(start_atsame_time); start_atsame_time.start(); in xml (anim_instructions): <alpha android:fromalpha="0.0" android:toalpha="1.0" androi...

css - How do RGB numbers work? -

Image
i have grey color of 222,222,222 what rule don't try , error, example if know want make grey bit darker, how should know number should change , should go higher or lower? quoting stackoverflow documentation:

PHP Error on new RecursiveDirectoryIterator -

i want recursively through folder , listen folder in it. got code: $dir_iterator = new recursivedirectoryiterator("../targetdirectory"); $iterator = new recursiveiteratoriterator($dir_iterator, recursiveiteratoriterator::child_first); foreach ($iterator $file) {   echo $file; // line 36 } and en error: parse error: syntax error, unexpected ' ' (t_string) in ... line 36 can please give me hint. reason error;

PHP multidimensional array type hinting for function parameter -

in php, possible type hint multidimensional array function parameter? of course can type hint single array such: function example(array $parameter) {} but if function needs parameter multidimensional array there way enforce through type hinting? if doublearray meant array of doubles (floats) only. may want fake using custom class. consider code below. notice initial array contains strings final results doesn't: <?php class doublearray{ protected $instance; public function __construct(array $arrdoubles) { foreach($arrdoubles $key=>$double) { if(!is_double($double)){ unset($arrdoubles[$key]); } } $this->instance = array_values($arrdoubles); } public function push($numdouble){ $this->instance[] = $numdouble; } public function get(){ return $this->instance; } } $arr ...

ios - Need to combine consumable and non-reniewing subscription in one purchase -

i need combine 2 types of app-purchases in 1 item -- example purchase should be: 5 bananas / 6 months so can buy 5 bananas in app, can eat/use them 6 months. how can implement this? normal usage of purchases? thx. i don't think possible. seems have pick 1 of 2 because plan seems violate of apple's guidelines. according apple : because non-renewing subscription requires user renew each time subscription ends, app must contain code recognizes when subscription due expire , prompt user purchase new subscription. so if consumable cannot extended rejected. additionally, consumables are used 1 time you cannot allow expire before used.

How can I undo the latest git command in Android Studio? -

i'm not sure heck did, reason had " head " , " master " branch. , latest commit had " head ", tried figuring out how change master. went vcs > git > branches , , think pressed out "checkout" on master branch. now, whole project reverted master branch , lost lot of progress. now question is , how can undo this? haven't done since happened. it turns out wonderful ctrl + z did trick. undos latest thing did, if did after won't guarantee work.

javascript - Selecting an <iframe> inside of an <a> tag with jquery -

i have script display lightbox when thumbnail clicked, , worked pictures. realized needed videos, not pictures, though, , changes script don't seem working. how select iframe inside clicked anchor tag display video? html , jquery: html <div class="backdrop"></div> <div class="box"> <div class="close">x</div> <img class="big_img" src="#"> </div> <div class="container"> <ul class="body"> <li class="responsive"> <div class=image> <a href="#" class="lightbox"><img class="gallery thumbnail" src="../pics/placeholder.png"><iframe width="560" height="315" src="https://www.youtube.com/embed/uaq9-sl13zg" frameborder="0" allowfullscreen></iframe></a> <p>test</...

php - when using max() with mysqli, only one field is changing -

i having problems code: $query="insert tripmembers(tripid,id) select max(tripid),'id' tripdetails"; $result=mysqli_query($conn,$query); wherein tripid getting added,but id field not.(tried both or without single quotes around 'id') my aim copy tripid , id "tripdetails' 'tripmembers' last entry of 'tripmembers' code not working: $query="insert tripmembers(tripid,id) select tripid,id tripdetails tripid=max(tripid)"; iv checked spellings of fields yet id being stored 0 every time in "tripmembers" table ,but has proper id in "tripdetails" table pease help! the single quotes ( 'id' ) makes string literal. if that's being inserted id column numeric datatype, literal string evaluate zero. if had specified literal zero. if intent reference column named id tripdetails table, remove single quotes. if that, value returned id column indeterminate. value row, row, in trip...

python list.append(values) adding L to values -

this question has answer here: why integers in database row tuple have 'l' suffix? 3 answers i'm experiencing weird behavior when appending values python list. using openpyxl read values of multiple excel files, math , write them new excel file. when looping through rows in header column , appending values list, final result of list value of cell plus 'l'. example, here relevant pieces of code: xl_file = 'path/to/excel/file.xlsx' wb = openpyxl.load_workbook(xl_file, data_only=true) sheet = wb.get_sheet_by_name("sheetname") hdr_col = [] # empty list store contents of column header r in range(3, 13): # want rows 3-12. rows 1 , 2 of column hdr empty val = sheet.cell(row=r, column = 1).value print val # prints actual value (1, 2, 3,..., 10) hdr_col.append(val) print hdr_col # prints values l, i.e.: [1l, 2l, 3l, 4l, 5...

java - Android getSlotFromBufferLocked -

@override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view view = inflater.inflate(r.layout.fragment_register, container, false); button btnregister = (button) view.findviewbyid(r.id.actionregister); final edittext nametext = (edittext) view.findviewbyid(r.id.rusername); final edittext passtext = (edittext) view.findviewbyid(r.id.rpassword); final edittext passcontext = (edittext) view.findviewbyid(r.id.rpasswordr); btnregister.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { validate(nametext,passtext,passcontext); } }); return view; } public void validate(edittext nametext, edittext passtext, edittext passcontext){ string username = nametext.gettext().tostring(); string password = passtext.gettext().tostring(); string passcon = passcontext.gettext().tostring(); if(usern...

javascript - How to use an attribute in a directive to select data -

i'm trying make directive-element uses value of attribute make http request , prints response. part of using value of attribute make http request covered using $attrs in controller associated directive. however, if i'm trying output data 3 different attribute values in same document, directives output same data. i have made plunker of code demonstrate problem basically want this: <person personnumber='person1'></person> <person personnumber='person2'></person> <person personnumber='person3'></person> my data example.com/{person-number}: person 1: { name: "john", city: "new york" } person 2: { name: "bob", city: "los angeles" } person 3: { name: "jay", city: "san diego" } wanted output: john: new york bob: los angeles jay: san diego what get: jay: san diego jay: san diego jay: san diego ...

cassandra - accessing child constant in parent class in java -

ok, have interesting problem. using java/maven/spring-boot/cassandra... , trying create dynamic instantiation of mapper setup use. i.e. //users.java import com.datastax.driver.mapping.annotations.table; @table(keyspace="mykeyspace", name="users") public class users { @partitionkey public uuid id; //... } now, in order use have explicitly ... users user = (db).mapper(users.class); obviously replacing (db) db class. great model, running problem of code repetition. cassandra database has 2 keyspaces, both keyspaces have exact same tables exact same columns in tables, (this not choice, absolute must have according company). when need access 1 or other based on form submission becomes mess of duplicated code, example: //mywebcontroller.java import ...; @restcontroller public class myrestcontroller { @requestmapping(value="/orders", method=requestmethod.post) public string getorders(...) { if(objects.equals(client, "first_cl...

ruby on rails - How to render a view from a view using a condition? -

i'm testing out ror , trying figure out functionality allows users valid session skip logging in. the login button prompts login page, whereas want make people session skip , redirected show view using conditional statement. (checks via current_user) (if need other code comment) here's login view <%= form_for :session, url: '/login' |s| %> <%= s.text_field :username, :placeholder => 'username' %> <%= s.password_field :password, :placeholder => 'password' %> <%= s.submit "login" %> <% if current_user %> <!-- write here? --> <!-- maybe should put in controller? --> <% end %> <% if flash[:notice] && current_user %> <div class="notice"><%= flash[:notice] %></div> <% end %> here's application controller containing current_user function. (just in case) class applicationcontroller < actioncontroller::base prote...

regex - Python parse javascript for variable name and it's value -

i'm trying parse javascript tag has variable named options . value of options array, "options: [[], []]" how can return options list? currently i'm using beautifulsoup having trouble finding text , how search convert data after options python list there other text surrounding variable , it's value json.loads(re.search("options: (.*)","adsasd\noptions: [[],[]]\nqqt").group(1)) is 1 way guess... not way dont think ... think missing alot of details in order provide useful answer althoug suspect data looks more this """ { key1:'value1', options: [[],[]], other:'somve other value' } """ in case can do data = yaml.load(my_input_text) print data['options'] (see below) >>> data = yaml.load("""{ key1: 'value1', options: [[],[]], other: 'somve other value'}""") >>> data {'key1': ...

css - Changing the default popover look in ASP.NET MVC 4 Bootstrap using Razor or Jquery -

hi in advance. have registry form has on 15 fields. right i'm using data annotations validation , it's working well. need find way display edited popover when user mousses on form know fields required. right form has completed , if don't fill out required field user gets prompt @ submit time. turning out none functional , bad design strategy. have popover testing on 1 field. here might imagine lot of code fields display message this. want have bigger popover on input form display if user mouses on field. adress line 2 required field. , important need popover bigger different color , show on right off input box fields. here css code styles <style> /* tooltip */ .tooltip > .tooltip-inner { background-color: #73ad21; color: #ffffff; border: 1px solid green; padding: 15px; font-size: 20px; } /* tooltip on top */ .tooltip.top > .tooltip-arrow { border-top: 5px solid green; } /* tooltip on bottom */ .tooltip.bottom > .tooltip-arrow ...

jenkins - convert freestyle job to pipeline -

i have below graph job definition (via downstream) , want migrate pipeline parallel options. / \ b c / \ / e d -> b, c b -> e, d c -> d b , c can run in parallel, d need wait till b , c finished , e can run after b finished. how can same in pipeline ? i tried below, stage 'stage 1' build 'a' parallel one: { build 'b' }, second: { build 'c' } build 'd' build 'e' in configuration e wait till c job finished. well, if put build e inside parallel block b happen when build b done. think can add wait: false have parallel step not wait build. might problem if need build else after build e, though. stage 'stage 1' build 'a' parallel one: { build 'b' build 'e', wait: false }, second: { build 'c' } build 'd'

ruby on rails - Render remote view in local layout -

my organization considering re-implementing existing rails monolith collection of rails services. content layer, our thought our api gateway contain layout information whole app, , request individual views via http. individual services render templates , send them via http rendered html. my question this: there mechanism in rails request remote content via http, render received html erb/haml layout template, , serve rendered html? like requesting information in controller , outputting string in erb template? is there other requirement i'm missing? controller def index @content = body_of_request_to_service end view ... <%= @content %> ... but, wouldn't recommend style of microservices using ruby (unless have dev-team understands how handle async ruby io) . rule of thumb have 1 blocking service request per client request.

angularjs - javascript - Convert object values from array to string -

i'm facing problems objects, json , etc in js. if 1 can me something, amazing! :) i have object, can't change, this: { "page": [ "post", "delete" ], "news": [ "put" ] } i want convert this: { "page": "post, delete", "news": "put" } so want object values (arrays) string, tried tostring(), string(), json.stringify, , other approaches internet, (maybe had not done right) none worked me, i'm kind of new on dealing these type of data, if 1 can me, tks!! :d edit: and in case got structure: { "page": { "post": [ "post" ], "put": 122 }, "news": { "put": [ "put" ] } } how can convert like: { "page": "post, put:122", "news": "put" } if want modify initial object - enough use object.keys ...

angularjs - JavaScript, JSON and Angular JS in sublime text editor 3 -

how add/select syntax in sublime text editor 3 angular js? differences of them? json data container. use json data 1 place another. javascript scripting language. write code in javascript perform tasks. angular js library of tools, written in javascript. google runs angular development team. there many other libraries written in javascript, jquery , react, example. advantage of using library lot of mundane tasks have been written you, , helps reduce time takes write applications.

css - How To Shrink Categorized Column on xPage -

Image
here simple xpage (bootstrap theme) view control my code: <xp:viewpanel rows="30" id="viewpanelfileresource" viewstyle="width:100%" var="rowdata"> <xp:this.data> <xp:dominoview var="view1" viewname="file resources"></xp:dominoview> </xp:this.data> <xp:viewcolumn id="viewcolumn1" columnname="fileentrycategory"> <xp:viewcolumnheader id="viewcolumnheader1" value="file entry category"></xp:viewcolumnheader> </xp:viewcolumn> <xp:viewcolumn columnname="fileentrytitle" id="viewcolumn2"> <xp:viewcolumnheader id="viewcolumnheader2" value="title"></xp:viewcolumnheader> </xp:viewcolumn> </xp:viewpanel> and first column categorized. how shrink (see picture above)? setting column width doesn't help. wraps category nam...

android - How to make mutexes work in NDK on Ubuntu? -

gradle experimental plugin v.0.7.0 used work ndk in android project. for app module native code ndk configuration used: ndk { modulename = 'engine' toolchain = 'clang' cppflags.addall(["-i${file(project.mpathincocv)}".tostring(), '-o3', '-std=c++11', '-frtti', '-fexceptions']) ldlibs.addall(['android', 'log', 'opencv_java3']) stl = 'gnustl_static' } everything works great such configuration. std includes work. but. when try use mutexes (from std) in c++ code, works in os x, encounters next error in ubuntu makes compilation impossible: 'mutex' in namespa...

sharepoint 2010 - SPServices loading but not working -

$().spservices({ operation: "getgroupcollectionfromuser", userloginname: $().spservices.spgetcurrentuser(), async: false, debug: true, completefunc: function (xdata, status) { console.log($.fn.jquery); console.log(xdata.responsexml); console.log(xdata.responsexml.xml); } }); i having problem spservices not working on our dev server. works fine on prod , testing not on dev reason. if run code above following in console. {readystate: 0, responsexml: undefined, status: 0, statustext: "no transport"} i read online can problem cross domain transfers set following: $.support.cors = true; with following: {readystate: 0, responsexml: undefined, status: 0, statustext: "error: invalid argument"} i think because spgetcurrentuser call returning empty string reason instead of user. has seen behavior before? common things can cause spservices load not able execute c...

jquery - Add text to hidden input value based on selection from dropdown -

although seems simple struggling find real solution. need add/append text value of hidden input based on selection of dropdown. value in dropdown added/appended randomly generated id suffix should "12345678_mybrand". easy do, need text (not entire value) change when dropdown selection changes rather adding/appending selected dropdown option. here i'm doing html: <input id="myhiddenfield" type="text"> <select id="brand"> <option value="">please select</option> <option value="first choice">first choice</option> <option value="second choice">second choice</option> <option value="third choice">third choice</option> <option value="fourth choice">fourth choice</option> </select> jquery: jquery(document).ready(function() { var brand = $('#brand'); var hiddenfield = $('#m...

c# - Unable to POST to Web API endpoint using attribute routing -

i have web api project uses default route of "api/{controller}/{id}" "id" optional. in cases sufficient in cases need attribute routing. in specific case, have "api/customers/{customerid}/orders/{orderid}" customer id required , orderid optional. code required order id needed way pull orders particular customer used attribute route on methods allow this. i able perform operations without problem, when try post operation, 500 error. what's odd though object gets created exception gets thrown must coming after database insert created cannot confirm since debugger doesn't work. api in separate project ui , whatever reason cannot debugger work in api project breakpoints have set don't work. the last line of code in post method this: return createdatroute("defaultapi", new { id = order.id }, order); the first argument of method route name , 1 listed above default route specified in webapiconfig.cs. particular route different de...

How to pass a new variable to python script using 'for' loop -

i trying write python script traverse through list , pass new variable other python script. here code: script: encviewer.py # import necessary modules import os # list of encs root = os.listdir('/home/cassandra/desktop/file_formats/enc_root') root.sort() root = root[2:] enc in root: # pass new instance of variable 'enc' encreader.py import encreader.py script: encreader.py from __main__ import * print enc .... # remaining script currently, when executing first code, encviewer.py, execute once exit. how can pass new instance variables of 'enc' encreader.py executes throughout entire 'for' loop seen in first snippet of code? thanks. i don't know if asking possible, think miss understood idea of creating modules , importing code. "standard" way of achieving same result following: encreader.py def printer(var): print(var) # code.. encviewer.py import os encreader import printer # ...

VBA - Pasting Variable String From Host Application to a specific Textbox in Internet Explorer -

i have variable string phn storing phone number in text form in vba project working on. once have application determine phone number, need activate specific internet explorer page that has been loaded , ready go , locate specific text box call phone number (not sure how determine actual name of text box), paste string phn in box. once done, should automatically hit enter . here compiled code far: sub pbx_ic_dialer '<macro = pbx_ic_dialer> '<shortcut = shift+ctrl+p> '<desc = recorded 7/25/2016 1:11:07 pm> on error resume next dim resp string 'response inputbox, allows macro determine number dialed. dim phn string 'phone number pasted dialer dim l integer 'left value of first digit of phone # locations in pc screen dim r integer 'value of last digit of phone number in pc screen dim row integer 'row # of entire phone number dim resp2 integer'allows if statement below check ...

postgresql - How to execute PERFORM pg_notify('', '')? -

when execute perform pg_notify('channel', 'payload'); following error: error: syntax error @ or near "perform" line 1: perform pg_notify('channel', 'payload'); ^ what doing wrong? the select counterpart works, i'm looking no-result equivalent. , i'm using psql (9.5.3, server 9.5.0) . the problem here relies on fact perform can not executed directly within prompt. documentation says: sometimes useful evaluate expression or select query discard result, example when calling function has side-effects no useful result value. in pl/pgsql , use perform statement: it's little bit tricky perform can used in pl/pgsql context (functions, stored procedures , stuff). , trying execute directly in prompt not supported.

jsf 2 - When to use <ui:include>, tag files, composite components and/or custom components? -

i started using jsf 2.0 facelets , got puzzled new composite components knowing existing <ui:include> , other templating techniques offered facelets 1.x. what difference between approaches? functionally seem offer same: <ui:param> vs <cc:attribute> , <ui:insert> + <ui:define> vs tag files, reuse of existing templates. there besides syntax , clear interface specification in case of composite components? performance differ? what difference between approaches? facelet templates use facelet templates (as in <ui:composition> , <ui:include> , <ui:decorate> ) if want split main page layout fragments reuseable templates. e.g. header, menu, content, footer, etc. examples: how include xhtml in xhtml using jsf 2.0 facelets? what real conceptual difference between ui:decorate , ui:include? how customize h:head when using ui:composition template? how change head elements of page when using ui:composition how ajax-re...