Posts

Showing posts from September, 2011

Is it possible to export Ab Initio graph as image? -

am doing migration project, migration of ab initio graph java. possible export ab initio graph image helpful refer specially when ab initio ide not available. far doing print screen graphs go bigger , complex print screen not helpful. you "print" graph , select output .pdf file. not have picture way, you'll have graph in a file has scalable fonts makes sense if graphs tend bigger.

Java's replace method not working -

i trying replace routename , routedurationinminutes rpelace method not working. working when had outside run function inside not work. ideas? have added code trying run. im sorry , forth. tried shorten make easier others read. the value g = {"routes":[{"routename":"i-190 n; electric ave","routedurationinminutes":70,"routelengthkm":83.865,"routelengthmiles":52.111278915,"toll":false},{"routename":"i-190 n; greenville rd","routedurationinminutes":82,"routelengthkm":92.569,"routelengthmiles":57.519692099000004,"toll":false}],"startpoint":"street address","endpoint":"destination","startlatitude":"42.20115054203528","startlongitude":"-71.85038140607858","endlatitude":"42.201220801535","endlongitude":"-71.849075146695"} final runnab

Importing a module into access programmatically from a *.cls or similar file -

if open microsoft access, open visual basic window can see list of modules , code in access project. can drag text-based file (txt, cls, bas, etc) windows explorer , drop module folder. this drag , drop action import code in text-based file project , prompt save (with default name being name of file dropped. is there way programmatically using vba? seems simple task should have simple solution, i've been researching days , can't seem find simple way it. yes, that's command loadfromtext use. usage: loadfromtext acmodule, "nameofobject", "filename"

css - Show another div while li hover -

i have 2 divs first 1 has full of menu li elements , second 1 has submenu. when hover menu li should show next div css li:hover{ //display submenu } fiddle here https://jsfiddle.net/yv6pyk7a/ .seconddiv:hover { display:block; } .seconddiv > li:hover { background: #aaa; cursor: pointer; } just check one. hope solve problem.

javascript - MongoDB query is JSONArray instead JSONObject -

i want select whole document , send jsonobject. app.post('/getinvbykost', function(request, response){ var tablename = request.body.tablename; move.find({tablename: tablename}, function(err, doc) { response.json(doc); }); }); this gives correct result "[]" ->array , not {} ->jsonobject. btw: got same issue move.aggregate(pipeline, function(err, res) {... result: [ { stuff } ] there function $unwind dont it.... in case since want 1 result, findone method more appropriate. app.post('/getinvbykost', function(request, response){ var tablename = request.body.tablename; move.findone({tablename: tablename}, function(err, doc) { response.json(doc); }); });

How to insert timeuuid record in cassandra version 2.1.7 using java -

how insert timeuuid record in cassandra using java import com.datastax.driver.core.utils.uuids; insert stmt = querybuilder.insertinto("keyspacename", "tablename") .value("timeuuidfield", uuids.timebased()); resultset rs = session.execute(stmt);

jquery - Single page scrolling nav items don't work on different page -

i have built wordpress theme accommodates both single page layout , separate pages (i.e. pages navigate away front page). single page layouts, click on nav item , scrolls section. have achieved giving section id , putting id in menu link (i.e. #about or #contact). this code scrolls page section: jquery(document).ready(function($){ jquery('a[href*=#]').click(function (e) { e.preventdefault(); var navheight = jquery('#header').height(); var id = jquery(this).attr('href'); var scrollto = jquery(id).offset().top-navheight; jquery('html,body').animate({ 'scrolltop': scrollto }, 500); }); }); the problem i'm having, when navigate away page, , click on menu item typically scroll down page - menu items not work. i have tried using full url , using '/#id' neither of options work. there workaround can use here? maybe can try following code jquery(document).ready(function($){ // nav

c++ - Template function that matches only certain types? -

i want define function template: template<typename t> void foo(t arg) but want t match types. specifically, t should derive (maybe through multiple inheritance) form base class. otherwise template shouldn't included in overload set. how can this? use sfinae std::is_base_of : template <typename t, typename = std::enable_if_t< std::is_base_of<foo, t>::value >> void foo(t arg); that include foo in overload set if t inherits foo . note includes ambiguous , inaccessible bases well. if want solution allows t s inherit publicly , unambiguously foo , can instead use std::is_convertible : template <typename t, typename = std::enable_if_t< std::is_convertible<t*, foo*>::value >> void foo(t arg); note reversal of arguments. regardless of form pick, can aliased brevity: template <typename t> using enable_if_foo = std::enable_if_t<std::is_ba

WSO2 multi-tenancy with Apache ActiveMQ -

our proposed deployment wso2 have single wso2 instance(jvm) , support multiple tenants within it. has worked cleanly us. now, need extend model apache activemq also. i.e. want tenant level isolation apache activemq also. in other words, queue meant tenant 1 should not accessed other tenants. in respect, had couple of questions is there way support multi-tenants within single apache activemq installation? if so, how align wso2 tenant corresponding tenant in apache activemq ? if above option not available, okay have separate apache activemq each tenant. in case, how configure multiple apache activemqs single wso2 installation ? any other pointers appreciated ! thanks this possible virtual hosts [1] configured on apache activemq. each virtual host isolated, there supporting multi-tenant behavior. at moment not possible configure multiple apache activemq's or multiple virtual hosts single wso2 server instance. [1] https://activemq.apache.org/apollo/docume

Shebang line limit in bash and linux kernel -

i'm trying execute python scripts automatically generated zc.buildout don't have control on them. problem shebang line (#!) long either bash (80 character limit) or direct execution (some linux kernel constant don't know). this example script reproduce problem: #!/././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././bin/bash echo hola! how can bash or kernel configured allow bigger shebang lines? it's limited in kernel binprm_buf_size , set in include/linux/binfmts.h .

pdf - C# send raw print on XP -

as stated in title use helper article https://support.microsoft.com/en-us/kb/322091 send raw data printer. every thing gone right if run on machine (windows 7 hp laserjet 3050 pcl5 target printer) , pdf produced expected. if run same code form pc use xp , epson priner nothing happened (no error, print not produced). anyone can explain why of behaviour ? xp issue or may problem related printer ?

ruby - Matching multiple parts of a string as first match -

given following string: details.html?id=8220&inr=4241&marke=ford&modell=focus&art=gebrauchtwagen&standort= i need match 82204241 in single expression. need extract numbers single match. idea how can solved? (\d+) create 2 matches. tried without luck: details\.html\?[id=|.*inr=]+(\d+) regex matches substring of original string. since 82204241 not appear substring in original string, impossible match single match regex.

python - RDD to multidimensional array -

i using spark's python api , finding few matrix operations challenging. rdd 1 dimensional list of length n (row vector). possible reshape matrix/multidimensional array of size sq_root(n) x sq_root(n). for example, vec=[1,2,3,4,5,6,7,8,9] and desired output 3 x 3= [[1,2,3] [4,5,6] [7,8,9]] is there equivalent reshape in numpy? conditions: n (>50 million) huge rules out using .collect(), , can process made run on multiple threads? something should trick: rdd = sc.parallelize(xrange(1, 10)) nrow = int(rdd.count() ** 0.5) # compute number of rows rows = (rdd. zipwithindex(). # add index, assume data sorted groupby(lambda (x, i): / nrow). # group row # order column , drop index mapvalues(lambda vals: [x (x, i) in sorted(vals, key=lambda (x, i): i)]))) you can add: from pyspark.mllib.linalg import densevector rows.mapvalues(densevector) if want proper vectors.

vb.net - How can I manipulate the INNER JOIN between two tables using sql command in Visual basic 2010 my database is access -

i have 2 tables 1 product , 1 invoice . want select product using combo box instead of using product code. want select products name . how use insert to , update , , select ? :) . beginner . select * invoice inner join products on invoice.productcode=products.productcode product table= productcode, productname, category,model,price, notes invoice table=invoiceno,productcode,quantity,subtotal,discount,cash,quantity,total.

c# - Task cancelling for an autocomplete field doesn't cancel all previous tasks -

i have search method returns search suggestions ui. method fired every time user enters new character search box. i have added cancellation code cancel previous search request. works not time. private cancellationtokensource cancellationtokensource; private async task usersearch(string searchcriteria) { debug.writeline("searching {0}....", searchcriteria); try { var cts = new cancellationtokensource(); this.suggestions = await this.searchasync(searchcriteria, cts.token); } catch (operationcanceledexception) { debug.writeline("search({0}) cancelled", searchcriteria); } } private async task<ilist<string>> searchasync(string searchcriteria, cancellationtoken canceltoken) { cancellationtokensource previouscts = this.cancellationtokensource; cancellationtokensource linkedcts = cancellationtokensource.createlinkedtokensource(canceltoken); this.cancellationtokensource = linkedcts;

android - Is there a way to use ValueAnimator with a starting point mid-way within the range? -

i have image , wish animate alpha in repeating loop between transparent , visible. easy using valueanimator this: mvalueanimator1 = valueanimator.offloat(1.0f, 0f); mvalueanimator1.setrepeatmode(valueanimator.reverse); mvalueanimator1.setrepeatcount(valueanimator.infinite); mvalueanimator1.addupdatelistener(new valueanimator.animatorupdatelistener() { @override public void onanimationupdate(valueanimator animation) { float value = ((number) animation.getanimatedvalue()).floatvalue(); imageview.setalpha(value); that's straightforward if starting alpha image should 1, , straightforward if starting alpha image should 0. but in case want starting alpha value within range specified within offloat() i.e. if starting alpha should 0.75 want animation loop this: 0.75, 0.85, 0.95, 1.0, 0.95, 0.75, 0.5, 0.3, 0.1, 0.0, 0.1, 0.2, 0.4, 0.6, 0.8 etc (values representative convey general idea). is there way of using valueanimator range specified

how to set errorprovider icon left the control? -

i want, set " error provider " icon left text box or combo box ?! tried code. feature wrong! errorprovider1.geticonalignment(errorprovider1,erroriconalignment.middleleft); errorprovider1.seterror(textbox1 , "can't empty"); without code set. in "error provider" properties, using " right left " property.

php - After removing a table from the database, doctrine shows 'MappingException'. [Symfony] -

good morning, tell case. deleted table , foreign keys of database using in project under symfony . after importing mapping ( xml ) , generating entities, automatically using symfony console; when access page of project, shows me following exception can not understand: fatal error: uncaught exception 'doctrine\common\persistence\mapping\mappingexception' message 'class 'consolidador\panelbundle\entity\clients' not exist' in c:\xampp\htdocs\integracion-v2\vendor\doctrine\common\lib\doctrine\common\persistence\mapping\mappingexception.php:96 stack trace: #0 c:\xampp\htdocs\integracion-v2\vendor\doctrine\common\lib\doctrine\common\persistence\mapping\runtimereflectionservice.php(41): doctrine\common\persistence\mapping\mappingexception::nonexistingclass('consolidador\\pa...') #1 c:\xampp\htdocs\integracion-v2\vendor\doctrine\common\lib\doctrine\common\persistence\mapping\abstractclassmetadatafactory.php(281): doctrine\common\persistence\mapping\runt

assembly - Fill an array with random values -

i'm in assembly language class , doing exercise need pass parameters on stack in order generate n random numbers in specific range. the problems i'm having: 1. random numbers not in range specifying. 2. when return array , attempt sort , display again, array populated different values. i'm thinking these problems somehow related way i'm passing parameters. title program 4 (project04.asm) include irvine32.inc .data intro_1 byte "composite numbers programmed ",0 prompt_1 byte "this program generates random numbers in range [100 .. 999],",0 prompt_2 byte "displays original list, sorts list, , calculates ",0 prompt_3 byte "median value. finally, displays list sorted in descending order.",0 prompt_4 byte "how many numbers should generated? [10 .. 200]: ",0 space3 byte " ",0 errormessage byte "invalid input ",0 usernum dword ? min = 10 max = 2

linux - I2C Slave Driver for Beagle Bone Black -

i use i2c bus on beagle bone black in slave mode. searching around, question gets asked in comment section of random posts, never answered whether it's possible or not. it appears using slave mode i2c isn't common need in linux, found example in android release: https://android.googlesource.com/kernel/tegra/+/android-tegra-flounder-3.10-lollipop-release/drivers/i2c/i2c-slave.c , document on linux kernal site: https://www.kernel.org/doc/documentation/i2c/slave-interface . i'm using debian wheezy distro , can't find referenced in android file or i2c-slave-eeprom driver referenced in linux kernel document. using old kernel? how 1 go generating slave mode driver?

javascript - How to submit dynamically generated form with multiple levels of tabs and modules in PHP? -

Image
i have registration form of residential complex multiple levels, can see. can edit , generate tabs js , jquery, can't idea how pass info db. screenshot: how can submit information mysql db form generates dynamically? how correctly generate tabs (when press + button)? mean using arrays $floor[0] , etc. do submit parts, or can 1 submit button, on screenshot? the better solution use jquery wizard form. click here demo. can store data in single table , data @ end of form submition.

How to fetch String value in angularjs from model.addAttribute(Spring controller)? -

how fetch string value in angularjs model.addattribute(spring controller) ? <div ng-if="error"> <div class="error">{{error}}</div> </div> so, want check value of model attribute.

angularjs, $http 304 error, modify data property -

we using ionic framework , angularjs create mobile app phone gap build. have call our api array of items using $http.get, adding etag in header if have data in cache. if data on server has not changed 304 error ok. having trouble modifying data property on response object form server our chached data in local storage. any appreciated. thanks return $http({ method: 'get', url: 'http:example.com', params: params, headers: customheader }) .success(function(data, status, headers, config) { // stuff }) .error(function(data, status, headers, config) { if(status == '304') { alert('this data has not changed'); data = chacheddata // change data chached data?? }

How to Create search button in android -

Image
i newbie in android developement. want create search function in comic this: how can those: when click search button, displays input text box. when input, displays list of matched items. you need activity marked searchable. first add meta , intent filter manifest on activity marked single-top. <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="..."> <application android:name="..." android:icon="@drawable/logo" android:label="@string/app_name" android:theme="@style/..."> <activity android:name=".mainactivity" android:label="@string/app_name" android:launchmode="singletop" android:theme="@style/apptheme"> <meta-data android:name="android.app.searchable" android:resource="@xml/searchable" /> <intent-filter> <action android:name="android.intent.

jms - Pick specific header messages using activemq,camel selectors from queue -

how consume specific header messages queue. using camel activemq. routebuilder: ..... from("activemq:q1"). .setheader("myheader",xpath(...)) .to("activemq:q2") ..... and trying consume messages has specific header in class like. .... consumertemplate consumertemplate = camelcontext.createconsumertemplate(); exchange exchange = consumertemplate.receive("activemq:q2",10000); string body = exchange.getin().getbody(string.class); string customvalue = exchange.getin().getheader("myheader", string.class); ..... how can messages has myheader=123.? you can use jms message selectors. in camel consumer endpoint can use selector option: http://camel.apache.org/jms something long lines of exchange exchange = consumertemplate.receive("activemq:q2?selector=myheader",10000); though can't remember if name of header enough or need do exchange exchange = consumertemplate.receive("act

php - Laravel 5: Can't POST to route resource -

i have route resource route::resource('projects', 'projectscontroller'); , when run route:list can see post available. +--------+----------+--------------------------+------------------+--------------------------------------------------------------+-----------------+ | domain | method | uri | name | action | middleware | +--------+----------+--------------------------+------------------+--------------------------------------------------------------+-----------------+ | | get|head | projects | projects.index | app\http\controllers\projectscontroller@index | auth | | | post | projects | projects.store | app\http\controllers\projectscontroller@store | auth | | | get|head | projects/create | projects.create | app\http\controllers\projectscontroller@crea

javascript - How to check permanently textbox value change -

i need regarding monitoring textbox value change. here's scenario: have form has textbox filled out javascript calendar. choose date calendar populates textbox date. however, textbox never gets focus. now, need check value placed in textbox textbox gets info calendar. reason need compare dates , verify date 2 not lower date 1. onchange , onblur , onkeyup events not work i'm trying do. mean, work if use not need. i have tried code reason event never fires or never detects change. here's example of i'm trying do: $('#date2').bind('input', function() { /* fired every time, when textbox's value changes. */ } ); and jquery('#date2').on('input', function() { // stuff }); is there way that? appreciated. if don't need support older browsers, can use mutation observers that.

c# - Change settings of LAV Filters at DirectShow -

i able render rtsp video stream (rtsp://10.0.0.11:7070/stream/channel1) following graph: lav splitter -> lav video decoder -> video renderer when open rtsp stream vlc, set caching 300 ms , video gets play smoothly 300 ms delay. graph renders stream 1 second delay. how can change buffer/cache value of lav filters? or alternatively how can reduce delay when using lav filters? thank you

Make a working PayPal donate button on android -

i need make working donate button app.. i have code opens default android browser paypal url. when open paypal url this: https://www.paypal.com/de/cgi-bin/webscr?cmd=_flow&session=j-kmkoxi3p5pwtbuzyelhu8qdzvjguhgoyil1dnb8ljuui71oldo5u094tg&dispatch=5885d80a13c0db1f8e263663d3faee8d5c97cbf3d75cb63effe5661cdf3adb6d , page tells me message something.. why? so how can make paypal donate button work on android? the link not correct, should generate paypal payment link in merchant's account. follow steps1-6 in https://www.paypal.com/webapps/mpp/get-started/add-payment-link-to-facebook

javascript - TableTools - Export to Excel not working -

i have datatable view want export excel. tried use tabletools plugin. did't find step step tutorial how use problem "excel" button doing nothing. my code in test html: <!doctype html> <html> <head> <title>test</title> <!-- general libraries --> <script type="text/javascript" charset="utf8" src="//datatables.net/release-datatables/media/js/jquery.js"></script> <script type="text/javascript" charset="utf8" src="//datatables.net/release-datatables/media/js/jquery.datatables.js"></script> <script type="text/javascript" charset="utf8" src="//datatables.net/release-datatables/extensions/tabletools/js/datatables.tabletools.js"></script> <link rel="stylesheet" type="text/css" href="//datatables.net/re

hashmap - Java - Getting a list of contacts using Infusionsofts API -

i'm using java , infusionsofts api list of contacts based on customer id. can't figure out way this. i'm using googles guava use multimap it's producing error: org.apache.xmlrpc.common.xmlrpcextensionexception: serializable objects aren't supported, if isenabledforextensions() == false i'm trying hashmap , i'm inserting "id" key , customer id value there's 1 entry in hashmap. how can add parameters variable map contains: ["id",11111] ["id",22322] ["id",44444] list parameters = new arraylist(); parameters.add(app_id); parameters.add(table_name); parameters.add(limit); parameters.add(pagenumber); hashmap<string, integer> map = new hashmap<string, integer>(); for(int customerid : customerids){ map.put("id", customerid); } //problem here parameters.add(map); //this problem, need add ["id", customerid] multiple //times

Swift class does not conform to Objective-C protocol with error handling -

i have objective-c protocol @protocol someobjcprotocol - (bool) dosomethingwitherror: (nserror **)error; @end and swift class class swiftclass : someobjcprotocol { func dosomething() throws { } } compilers gives me error type 'swiftclass' not conform protocol 'someobjcprotocol'" is there solution how rid of error? i'm using xcode 7 beta 4 there 2 problems: swift 2 maps func dosomething() throws objective-c method - (bool) dosomethingandreturnerror: (nserror **)error; , different protocol method. the protocol method must marked "objective-c compatible" @objc attribute. there 2 possible solutions: solution 1: rename objective-c protocol method to @protocol someobjcprotocol - (bool) dosomethingandreturnerror: (nserror **)error; @end solution 2: leave objective-c protocol method is, , specify objective-c mapping swift method explicitly: @objc(dosomethingwitherror:) func dosomething() throws {

javascript - Passing an array of multiple base64 strings -

there base64 strings in array need send via jquery's $.post() php. var base64s = [........]; $.post("getbase64.php", { 'base64s': base64s }, php: $base64s = $_post['base64s']; //and used `$base64s[$i]` inside loop. it works when there max 2 base64 strings. there maximum size array? or might reason?

bash - How can I count the number of files containing a specific string but not containing another string? -

we run daily selenium tests test our website , extensions. if test fails, output contains string failed (it doesn't matter if contains other strings). if passes, output doesn't contain string failed must contain string ok. if output doesn't contain both strings (usually when it's empty), test failed. our code counting tests failed this: today=`tz='asia/tel_aviv' date +"%y-%m-%d"` yesterday=`tz='asia/tel_aviv' date +"%y-%m-%d" -d "yesterday"` print_test_results() { log_suffix="_${file_name}.log" yesterday_logs="${log_prefix}${yesterday}_[1,2]*${log_suffix}" today_logs="${log_prefix}${today}_0*${log_suffix}" passed_tests=`fgrep -l failed $yesterday_logs $today_logs 2>/dev/null | wc -l 2>/dev/null` failed_tests=`fgrep -l failed $yesterday_logs $today_logs 2>/dev/null | wc -l 2>/dev/null` total_tests=`ls -1 $yesterday_logs $today_logs 2>/dev/null | wc -l

hadoop - How to write Map/Reduce tasks in Golang? -

i write hadoop map/reduce jobs in go (and not streaming api!) . i tried grasp of hortonworks/gohadoop , colinmarc/hdfs still don't see how write jobs real. have searched on github codes importing these modules there nothing relevant apparently. is there wordcount.go somewhere? here's simple implementation of map/reduce written in golang (available @ github): https://github.com/dbravender/go_mapreduce

java - Glassfish Connection could not be allocated because: Identifier name '...' is too long -

so im trying run java ee project developed couple years ago , im getting error: connection not allocated because: identifier name 'c:\glassfish-3.0\glassfish\domains\domain1/lib/databases/ejbtimer' long trying run on jdk7 , glassfish 3 tried searching similar no avail any suggestions cause/how solve it? edit: stack trace (ext. link not make post long) http://pastebin.com/rzjs60ax it seems documentation project had error , pool in glassfish set wrong datasource classname

regex - Identifying Lists of Numbers With Regular Expressions in Python -

i'm working data online math tutor program, , i'd able identify features of problems. example, following question: find median of 7 numbers in following list: [22, 13, 5, 16, 4, 12, 30] i'd know if 1. problem includes list, 2. how long longest list in problem is, , 3. how many numbers in problem total. so problem above, has list, list 7 numbers long, , there 8 numbers in problem total. i've written following regex script can identify positive , negative numbers , floats, can't figure out how identify series of numbers in list: '[-+]{0,1}[0-9]+\.{0,1}(?! )[0-9]+' additionally, data poorly formatted, of following examples possible list of numbers can like: [1, 2, 3] 1, 2, 3 1,2,3. 1, 2, 3, 4, 5 i've been working on few days now, , have stopped being able make progress on it. can help? might not problem solve regex, i'm not sure how go point. in addition answer provided alfasin, can second search find sub-st

JavaFX: Is it possible to center DirectoryChooser dialog on parent stage? -

is possible center directorychooser dialog inside parent stage when call dirchooser.showdialog(ownerwindow); ? by default, shows in upper-left corner of ownerwindow . windows 7 x64 professional java(tm) se runtime environment (build 1.8.0_45-b15) this platform depedent, since tested in linux , dialog shows on center of screen, not of parent stage. so, there way report in javafx developers team , fix ?

javascript - modified code is not correct for the getvalue and setvalue -

my code working fine wanted change code.... they wanted attach setvalue , getvalue added directly footballpanel instead of sports grid, but after adding code not working fine... can guys tell me why not working.... providing modified code below... the ui action here performing there 2 radio buttons, when click each radio button 2 different grids open in 1 of grid add value, when switch radio button values in grid disappears should not disappear... after modified code values disappear, can tell me why only part of modified code here else { this.setdisabled(true); this.addcls("sports-item-disabled"); if (sportsgrid.store.getcount() > 0) { var footballpanel = sportsgrid.up('panel'); footballpanel.holdvalue = footballpanel.getvalue(); footballpanel.setvalue(); sportsgrid.addcls("sports-item-disabled"); } } whole modified code: sportscontainerhandler: f

ember.js - Ember action target to specific component -

i've upgrade ember version 1.13.5 how can target action specific component, working on previous version , doesn't respond <a href="#" class="nav-action" {{action 'open' target='view.appoverlay.categorysidemenu'}}><i class="fi-list"></i></a> in other part of template have this {{#overlay-fx viewname="appoverlay" open="opensidemenu"}} {{#side-menu open="open" use="toright" targetobject=view.appoverlay viewname="usersidemenu"}} {{partial "partial/user-side-menu"}} {{/side-menu}} {{#side-menu open="open" use="toleft" targetobject=view.appoverlay viewname="categorysidemenu"}} {{partial "partial/category-side-menu"}} {{/side-menu}} {{/overlay-fx}} is because of view deprecations, can't event access components view.name ? i keep getting error, common if action does

javascript - AngularJS nested ng-repeat click & show/hide -

i've done ton of reading , research on topic past few days , have found answers, of answers question performance , necessity. my question pertains nested ng-repeat scopes. i'm wondering best way achieve "add item" scenario adding item nested foreach. my code my html 2 ng-repeat s , goal able add item second (nested) ng-repeat <div ng-app="myapp"> <div class="nav" ng-controller="foodscontroller vm"> <div class="level1" ng-repeat="foods in vm.foodgroups">{{foods.name}} <button type="button" ng-click="vm.addnewfood()">add new food</button> <div ng-show="vm.newfoodbeingadded"> <input type="text"> </div> <div class="level2" ng-repeat="food in foods.foodsingroup">{{food.name}}</div> </div> </div>

working of tesseract,(tess-two,eyes-two) and its gradle errors with default config in android studio -

iam trying use tessearct image based compiler app. have created library under main project contains both tess-two , eyes-two files. iam having problems in building build.gradle files the project's root build.gradle file enter // top-level build file can add configuration options common sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.2.3' // note: not place application dependencies here; belong // in individual module build.gradle files } } allprojects { repositories { jcenter() } } the project's module:app/build.gradle apply plugin: 'com.android.application' android { compilesdkversion 22 buildtoolsversion "23.0.0 rc3" defaultconfig { applicationid "com.example.pavithra.ocrreader" minsdkversion 15 targetsdkversion 22 versioncode 1 versionname "1.0" } buildtypes { release { minifyenab

C# MaskedTextBox decimal currency not displaying correctly -

i struggling maskedtextbox. mask looks this: r ######.00 enter south african currency. still fine. save amount decimal field, , done correctly, decimal value , all. problem when try redisplay decimal field in maskedtextbox. way can display decimal value intact use: edtbaycost.text = allparkingbayregistrationdata(currentdisplayrecord).baycost.tostring("000000.00"); in box displays eg. r 001234.56 have tried replacing tostring("000000.00") tostring("######.00") decimal value ignored , display r 123456.00. am missing important here? try using currency format specifier tostring() method: edtbaycost.text = allparkingbayregistrationdata(currentdisplayrecord).baycost.tostring("c2"); https://msdn.microsoft.com/en-us/library/dwhawy9k(v=vs.110).aspx#cformatstring edit: you may use currency format specifier culture code. should give appropriate formatting currency attempting use: edtbaycost.text = allparkingbayregistrationdat

module - Bringing items in a template instantiation scope unqualified into local scope -

i want bring unqualified names of functions in template working/local scope. eg.: struct st { int t = 44; } template inter(t) { // 'base' template/interface/parameterized-module alias self = t; void myfunc(ref self) { writeln("inter: ", self.stringof, " : ", 11); } } template inter(t: st) { /+ ^^^^^ 'specialization' implementation template-module type `st` +/ alias self = t; void myfunc(ref self self) { writeln("inter 2 (st)! : ", self.stringof, " : ", self.t); } } void main(string[] args){ st s; /+ here +/ /+ s.myfunc(s); +/ // <- want able } something mixin template work @ cost of lots of needless code duplication ( i wouldn't duplicating compiler would have work lots of same code). put way: yes, ufcs not work in case if bring myfunc(self) scope of main() . question how bring stuff inside template's scope openly/unqu

c++ - How to eliminate cast for constructor selection -

i've been playing around generic mechanism converting value 1 set of values another, based on boost's map_list_of template. 2 sets disjoint, it's not conversion 1 enumerated type another. anyway, following code compiles , runs intended, i'm stuck on something. definition of enumtostring , right before main() , requires static_cast<const std::map<color, std::string> &> cast. (fwiw, constructor causes convert() function return key value string if cannot find key in map.) how can code compile without cast, while sticking c++03? it might without cast there not enough type information available compiler figure out keytovalue constructor call. #include <sstream> #include <map> #include "boost/assign.hpp" template<typename k, typename v> // forward reference. class keytovalue; template<typename k, typename v> // k v (value or callback default). v convert(const keytovalue<k, v> &t, const k &k) {