Posts

Showing posts from May, 2010

r - Accessing variables initialized inside eval -

can explain how access variables created within eval statement? know there many other solutions problem, trying understand why running scope issue here. error error in paste0("fit<-summary(lm(npisplit~", x, ",data=df));rs<-round(fit$r.squared,3);pv<-round(fit$coefficients[,4],3);if(pv<0.05){paste(", : object 'rs' not found code df<-data.frame(npisplit=c(0,0,0,1,1,1),happiness=c(2,5,6,8,7,4)) moods<-c('happiness') lapply(moods,function(x){ eval(parse(text=paste0( "fit<-summary(lm(npisplit~",x,",data=df));rs<-round(fit$r.squared,3);pv<-round(fit$coefficients[,4],3);if(pv<0.05){paste(",x,"=",rs,"&",pv,")}"))) }) you need escape quotes inside of quotes. x <- 1 lapply(1:2, function(.) eval(parse(text="y<-x+1;paste(\"y=\", y)")))

Pandas & AWS Lambda -

does have compiled version of pandas compatible aws lambda? after searching around few hours, cannot seem find i'm looking , documentation on subject non-existent. i need access package in lambda function have been unsuccessful @ getting package compile usage in lambda function. in lieu of compilation can provide reproducible steps create binaries? unfortunately have not been able reproduce of guides on subjects combine pandas scipy don't need , adds layer of burden. i believe should able use recent pandas version (or likely, 1 on machine). can create lambda package pandas this, first find pandas package installed on machine i.e. open python terminal , type import pandas pandas.__file__ that should print '/usr/local/lib/python3.4/site-packages/pandas/__init__.py' now copy pandas folder location (in case '/usr/local/lib/python3.4/site-packages/pandas ) , place in repository. package lambda code pandas this: zip -r9 my_lambda.zip pandas...

python - Extract indices of array outside of a slice -

i want perform statistics on annulus around central portion of 2d array (performing statistics on background around star in image,for instance). know how obtain 2d slice of region inside of array , return indices of slice, there way of obtaining indices of values outside of slice? i have 2d array called 'z' , box size (psf_box) around want perform statistics. i've got far: center = np.ceil(np.shape(z)[0]/2.0) # center of array # make 2d slice of star, , convert pixels nan annulus[center-ceil(psf_size/2.0):center+ceil(psf_size/2.0)-1,\ center-ceil(psf_size/2.0):center+ceil(psf_size/2.0)-1] = np.nan np.savetxt('annulus.dat',annulus,fmt='%s') i convert pixels inside of box slice nan, don't know how output indices of pixels outside of box not 'nan'. or better yet, there way perform operations on area around slice directly? (as opposed outputting pixel values aren't nan) i hope represents want do, ie. elements of annulus in 2...

groovy - Object.getText() Expression in Ireport -

in ireport designer, created field named address of type of java.lang.object , created text expression of $f{address}.text . data of address java.util.map , looks this: ["bldgname":null, "barangay":["name":"minaulon", "objid":"057-01-0013"], "province":"lanao del norte", "text":"minaulon, bacolod, \nlanao del norte", "unitno":null, "type":"local", "bldgno":null, "pin":null, "city":null, "subdivision":null, "municipality":"bacolod", "street":null] after previewing report, error thrown saying: net.sf.jasperreports.engine.fill.jrexpressionevalexception: error evaluating expression : source text : $f{address}.text @ net.sf.jasperreports.engine.fill.jrevaluator.evaluate(jrevaluator.java:197) @ net.sf.jasperreports.engine.fill.jrcalculator.evaluate(jrcalculator.java:53...

requirejs - Backbone.js / require.js - Override model function to work with backend as a service -

good morning guys. have little understanding problem backbone.js. have javascript sdk backend service getter , setter methods datas platform. i have load javascript sdk require.js it´s work fine. need create models work getter , setter methods data collection view. not have clue...maybe have right idea me. this current model: define(['jquery','underscore','backbone'], function($,_,backbone) { var holidayperson = backbone.model.extend({ initialize: function() { console.log("init model holidayperson"); this.on("change", function(data) { console.log("change model holidayperson"+json.stringify(data)); }); } }); return holidayperson; }); actually create instance of model in view: define(['jquery','underscore','backbone','text!tpl/dashboard.html','holidayperson','apio'], function($,_,backbone,tp...

logic - C++ logical operator Q -

this question might seem noobish question this: these 2 statements logically same? int a; int b; int c; if (!a && !b && !c) //do if (!(a || b || c)) //do a truth table useful understanding logics. #include <iostream> using std::cout; using std::endl; int main(void) { int a; int b; int c; bool differ = false; cout << "a b c x y\n"; (a = 0; <= 1; a++) { (b = 0; b <= 1; b++) { (c = 0; c <= 1; c++) { bool x = (!a && !b && !c); bool y = (!(a || b || c)); differ = differ || (x != y); cout << << " " << b << " " << c << " " << x << " " << y << "\n"; } } } if (differ) { cout << "they differ" << endl; } else { cout << ...

javascript - How to use Bootstrap Popover with Angular2 -

Image
i trying bootstrap 3 popover display angular 2 interpolated template. possible? here have far: $('.ba-header--user-menu').popover({ placement: 'bottom', toggle: 'popover', trigger: 'focus', html: true, content: '{{user.email}}' }); which gives me this: jquery , angular don't play together. install ng2-popover : npm ng2-popover and use this: <span popover="content shown in popover"> element on popover applied. </span>

python - Django api returning model ID instead of model's title -

Image
im new django when make api call shows model.id wanted model.title as can see my title 1 wanted title of model not id model.py class post(models.model): title=models.charfield(max_length=200) description=models.textfield(max_length=10000) pub_date=models.datetimefield(auto_now_add=true) def __unicode__(self): return self.title def description_as_list(self): return self.description.split('\n') class comment(models.model): title=models.foreignkey(post) comments=models.charfield(max_length=200) def __unicode__(self): return '%s' % (self.title) views.py def detail(request, id): posts = post.objects.get(id=id) comments=posts.comment_set.all() forms=commentform if request.method == 'post': form=commentform(request.post) if form.is_valid(): comment = form.save(commit=false) comment.title = posts print comment comm...

opengl - Why my 2d graphic application run faster on Inegrated graphics card? -

i working on 2d graphic application opengl(like qgis). when testing benchmarks, there weird performance difference between 2 graphic cards. made simple test , draw 1 million squares using vbo. there 4m vertices each 20 bytes, total vbo size 80 mb. , draw whole things 1 drawelements call. when measured render time in laptop has 2 graphic cards runs 43 ms on geforce , 1 ms on integrated intel card. expected faster on geforce. why so? should disable opengl options? my system specification is: asus n53m integrated graphics card , geforce gt 610m edit : tested on system amd radeon hd 5450, 44 ms again. used single precision instead , reduced 30 ms. still integrated gpu more faster! not measuring issue, because can see lag when zoom in/out. the run time behavior of different opengl implementations vastly differs found out in experiments regarding low-latency rendering techniques vr. in general reliable timing interval measure, gives consistent results inter-frame time bet...

Angularjs javascript canvas not cleared -

i have application number of canvases within page. these canvases value (picture) inserting base64 string input element , clicking button (that handles required manipulations in background). my problem that, without loading base64 string, somehow canvases retain pictures loaded in previous session. i'm using chrome right now. tried closing chrome , reopening, deleting history, etc. still when page open after cleaning history, contents of canvases still exist. i added following code beginning of relevant angularjs controller: context_picture.clearrect(0 , 0 , canvas_picture.width , canvas_picture.height ) ; which not resolve issue. any clue why experiencing , how hard-clear canvases? thanks. got error!!!! not original picture being held somewhere, picking white rectangle when no picture added (i saw base64 string , didn't occur me of wh...

ruby on rails - Invoking named routes helpers in views ends with NameError -

invoking named routes helpers in views ends nameerror following configuration: routes.rb : scope :orders, as: :orders scope '/:order_id', as: :order post :returns, :to => 'order_returns#create' end end $rake routes : orders_order_returns post /orders/:order_id/returns(.:format) order_returns#create when add <%= orders_order_returns_path %> template, rails exit undefined local variable or method 'orders_order_returns_path' #<#<class:0x007faec10fe728>:0x007faec10dc8d0> ... executing rails.application.routes.named_routes.helpers.map(&:to_s) in console on exception page returns: ["spree_path", "orders_order_returns_path", "rails_info_properties_path", "rails_info_routes_path", "rails_info_path", "rails_mailers_path", "spree_url", "orders_order_returns_url", "rails_info_properties_url", "rails_info_routes_url", ...

mysql - If statement in multiple SQL triggers -

i need mysql triggers, , guess should quite simple. have db consists of 3 tables (trable1, table2, table3), each of these has 2 columns (column1, column2). here need. if row inserted table1, want automaticaly replicated table2 , table3. likewise updates on table2 , table3. here trick, heed if condition, checks if row there, otherwise sql throws me error. grateful help. do want throw error or want avoid it? in first case, like if exists (select 1 table2or3 col1 = new.col1) signal ... end if; read more signals here . if don't want throw error there's possibility insert foo(col1, col2) values (new.col1, new.col2) on duplicate key update whatever = whatever; if specify on duplicate key update, , row inserted cause duplicate value in unique index or primary key, update of old row performed. read more here . or insert ignore .... if use ignore keyword, errors occur while executing insert statement treated warnings instead. example, without ...

google app engine - GAE Python NDB Datastore - No need for memcache.set? -

the documentation ( https://cloud.google.com/appengine/docs/python/ndb/ ) states ndb uses memcache cache service "hot spots" in data i using memcache follows: memcache.set(key=(id), value=params, time=0) that expires (auto flushes) pretty , use ndb datastore. thought have put key-value in both ndb , memcache, check both. being done automatically ndb? ie. ancestor_key = ndb.key("book", guestbook_name or "*notitle*") greetings = greeting.query_book(ancestor_key).fetch(20) would implicitly set memcache ? and when read ndb, implicitly try memcache.get(key) first? thanks patience. edit - tried: as test tried this: class book(ndb.model): content = ndb.stringproperty() class update(webapp2.requesthandler): def post(self): p1='1' p2='2' p3='3' p4='4' p5='5' id='test' paramarray = (p1,p2,p3,p4,p5) book ...

Run cassandra-stress get Not enough replica available for query at consistency LOCAL_ONE in 3 node of datastax-enterprise -

in datastax-enterprise cqlsh 5.0.1 | cassandra 2.1.12.1046 | dse 4.8.4 | cql spec 3.2.1 | native protocol v3 when run cassandra-stress, error below: [root@pg0 ~]# cassandra-stress write n=19000000 -rate threads=100 -node 192.168.35.150 unable create stress keyspace: keyspace names must case-insensitively unique ("keyspace1" conflicts "keyspace1") sleeping 2s... warming write 50000 iterations... warn 04:12:00 found netty's native epoll transport in classpath, epoll not available. using nio instead. java.lang.unsatisfiedlinkerror: /tmp/libnetty-transport-native-epoll4216253360502585010.so: /lib64/libc.so.6: version `glibc_2.14' not found (required /tmp/libnetty-transport-native-epoll4216253360502585010.so) @ java.lang.classloader$nativelibrary.load(native method) ~[na:1.8.0_66] @ java.lang.classloader.loadlibrary0(classloader.java:1938) ~[na:1.8.0_66] @ java.lang.classloader.loadlibrary(classloader.java:1821) ~[na:1.8.0_66] @ java.lan...

wordpress - Cannot add any fields except selectbox and textbox in woocommerce_admin_billing_fields hook in woocommerce plugin -

i using woocommerce plugin wordpress website. have added fields(check box, radio button, etc..) in billing form. want add fields in admin order edit billing address fields. have used woocommerce_admin_billing_fields hook. in hook, select , text type working. others not working. anyone has idea?

php remove the word starts with # -

this question has answer here: deleting word starting specific letter/character php 4 answers i want remove words starts # in content. for example $content = "#test lorem ipsum dummy text of printing , typesetting industry. lorem ipsum has been industry #test2 standard dummy text ever since 1500s, when unknown printer took galley of type #test3 , scrambled make type specimen book. has survived not 5 centuries, leap electronic typesetting, remaining unchanged. #test4 popularised in 1960s release of letraset sheets containing lorem ipsum passages, , more desktop publishing software aldus pagemaker including versions of lorem ipsum #test5." here #test1, #test2, #test3, #test4, #test5 # words. want remove words. i use preg_replace . not getting output. please me. thanks you can try /#[a-z0-9]+/i . pattern replace alphanumeric word followed #...

office365api - Adding contacts to outlook -

i using outlook rest api , need add thousands contacts. searching how add range of contacts except adding each separately. idea? yes can accessing batch endpoint in o365. can post contacts of 20 contacts in 1 batch. check out details of batch endpoint in o365: https://msdn.microsoft.com/office/office365/api/batch-outlook-rest-requests hope helps.

the memory location of static and extern storage class in C -

this question has answer here: can variable declared both static , extern? 4 answers why won't extern link static variable? 4 answers i have 2 files sharing global variables. in main.c #include<stdio.h> static int b; extern int b; main() { extern int a; printf("a=%d &a:%p\n",a,&a); printf("b=%d &b:%p\n",b,&b); fn(); } in fun.c #include<stdio.h> int b=25; int a=10; fn() { printf("in fna=%d &a:%p\n",a,&a); printf("in fnb=%d &b:%p\n",b,&b); } if compile both files. i'm not getting compilation error. , fine.the output a=10 &a:0x804a018 b=0 &b:0x804a024 in fna=10 &a:0x804a018 in fnb=25 &b:0x804a014 but, in main.c if alter lines extern int b , static int b this ...

javascript - Filter Last child when Hover Element -

Image
i have problem when want create inpector plugin of jquery, if select child of element should not select parent element. that inpect double border actualy home element inspected follow parent. this jsfiddle http://jsfiddle.net/rp7hr/46/ and code how plugin called $(function(){ //generate dropdown list var test = $('.summary').ksinspect(); }); and don't understand why element on iframe tag cannot hover ? the effect see becuase of event bubbling. stop should use event.stoppropagation() here updated demo see updated _ks.onmouseover = function() { var el = ktm.query(document).find('*'); el.on('mouseenter',function(e){ e.stoppropagation(); // newly added line... var d = new date(); var id = d.gettime() + randomid(1); var parents = ktm.query(this).parents("*"); var getparents = _get_parents(ktm.query(this)); ktm.query(this).attr('data-key',id); /...

Converting a string to int in SML -

in attempt create interpreter simple language in sml, struggling convert string integer. instance, val somestring = " 1.9" int.fromstring somestring returns: val 1 : int option furthermore, when try extract value option type using: valof(int.fromstring somestring); it returns: val = 1 : int i confused why still converting string integer though real number. , how can convert string int , handle errors if any. i don't know how conversion in every implementation works, in poly/ml valid int returned if valid int has been read far - if whole string not valid int. as molbdnilo pointed out, easier use char.isdigit function (or own allows more int cases) check if string int: list.all char.isdigit (string.explode somestring) concerning confusion valof, expected because saw int.fromstring returned int option. valof function defined this: fun valof (opt: 'a option) : 'a = case opt of none => raise fail "option none...

javascript - Can anyone tell me how to store 10 scores and display one score in a line using local storage? -

can tell me how store 10 scores , display 1 score in line using local storage? var score = new array(10); var highscore = new array(); var len = score.length; function f_score() { (i = 0; < len; i++) { (j = 0; j < len; j++) { if (score[j] < score[j + 1]) { temp = score[i]; score[i] = score[i + 1]; score[i + 1] = temp; } localstorage.setitem("highscore", score); var highscore = localstorage.getitem("highscore"); } } document.write(highscore + "<br>")

networking - Correlation in a directed graph - R -

i have directed graph in following format each pair (row) indicates edge source target source target 364 448 364 449 364 371 364 372 534 743 534 371 i need calculate correlation (kind of dependency) each pair. made adjunct matrix mentioned format , try calculate correlation , covariance based on 1 . result got not correct. r or other free tool can used fine. any solution? thanks

java - developing a add to index method in generic linked list class -

i'm having trouble implementing add method generic linked list class adds value @ given index. however, can't doing correctly when running through test class i'm getting following errors: 1) t31addtoemptylist(linkedlisttest$add2test) java.lang.indexoutofboundsexception 2) t32addtothreeitemlist0(linkedlisttest$add2test) java.lang.assertionerror: 4 element list has wrong size. expected:<4> was:<3> 3) t35addtothreeitemlist3(linkedlisttest$add2test) java.lang.indexoutofboundsexception this add @ index method: public void add(int index, e value){ if (index < 0 || index >= this.size) { throw new indexoutofboundsexception(); //if empty add front }else if(index == 0) { front = new listnode(value, front); // if index last element add front }else if(index == size){ add(value); }else { listnode current = front; (int = 0; < index - 1; i++){ current = current.next; } ...

How apply masking on label using jquery? -

i have requirement show ssn(social security number) value in label when showing in label not applying masking.i have used following line of code mask value in lable. $("#test").mask("00-00-0000"); in case of textbox working fine.so please let me know how can implement it. jquery mask plugin can mask on label: jsfiddle: <label id="ssn">999990000</label> $(function() { $("#ssn").mask("00-00-0000"); });

Windows Batch file execution error -

i trying run batch file concatenate csv files pattern contracteligibility_* in working folder.they of same format , need concatenate without repeating header. the code follows: @echo off>combined.csv cls setlocal enabledelayedexpansion if exist c:\users\kartikeya.avasthi\desktop\batch_scripts\combined.csv del c:\users\kartikeya.avasthi\desktop\batch_scripts\combined.csv dir /a-d /b c:\users\kartikeya.avasthi\desktop\batch_scripts\contracteligibility_*.csv>c:\users\kartikeya.avasthi\desktop\batch_scripts\dirfiles.txt cd c:\users\kartikeya.avasthi\desktop\batch_scripts\ /f "tokens=*" %%a in (c:\users\kartikeya.avasthi\desktop\batch_scripts\dirfiles.txt) ( set /p header=<%%a echo !header!>combined.csv ) /f "tokens=*" %%a in (c:\users\kartikeya.avasthi\desktop\batch_scripts\dirfiles.txt) ( more +1 %%a>>combined.csv ) del dirfiles.txt it concatenates fine getting "echo off " @ start of file first line. know ...

bash - send '%' in cut command (linux) -

i wring script using vbscript. script needs run in cmd , connect system linux os. need use cut command take specific number. when trying send % via script sends . any ides? this code: oshell.sendkeys "cat /tmp/dftemp1.txt | cut -d'%' -f1 > /tmp/dftemp2.txt" when use code in securecrt it's working. when copy line , paste manually in cmd line it's working too. it's not working when trying run automatclly. when in doubt, read documentation . the sendkeys method uses characters modifiers of characters (instead of using face-values). set of special characters consists of parentheses, brackets, braces, , the:     plus sign + ,     caret ^ ,     percent sign % ,     and tilde ~ send these characters enclosing them within braces "{}". example, send plus sign, send string argument "{+}". change this: oshell.sendkeys "cat /tmp/dftemp1.txt | cut -d'%' -f1 > ...

objective c - Key Value Observing context not work -

Image
in objective-c, when using key-value observing, have bank class accountdomestic property , person property. person added observe accountdomestic property. have static void *bankcontext = & bankcontext in bank class context. however, after change accountdomestic property, old , new value not shown correctly due mismatch of context , bankcontext in -(void)observevalueforkeypath:(nsstring *)keypath ofobject:(id)object change:(nsdictionary<nsstring *,id> *)change context:(void *)context method in person. the code following, first bank class: bank.h #import <foundation/foundation.h> #import "person.h" static void * const bankcontext = &bankcontext; @class person; @interface bank : nsobject @property (nonatomic, strong) nsnumber* accountdomestic; @property (nonatomic, strong) person* person; -(instancetype)initwithperson:(person *)person; @end bank.m @implementation -(instancetype)initwithperson:(person *)person{ if(self = [super init]){ ...

c# - String parsing using RegEx -

i have string below. x:= fmlvar("function1", "var1"); i parse above string , 2 arguments ("funtion1" , "var1"). fmlvar function accepts 2 strings arguments. at present, using string manipulation function such indexof , substring process above string , strip out arguments. is there better way doing this? possibly using regular expression. any advice appreciated. thanks alan try this: var s = "x:= fmlvar(\"function1\", \"var1\");"; var match = new regex(@"fmlvar\(""(.+?)"", ""(.+?)""\);").match(s); var arg1 = match.groups[1]; var arg2 = match.groups[2];

libraries for building HTML form using PHP -

i'm looking building html form using php wondering may libraries exist. know open source library can use ? do think, it's idea create function construct html form using php ? there risk on performance (loading pages of website) ? function input($label,$id,$type) { echo $label.' <input type="'.$type.'" id="'.$id.'" name="'.$id.'" />'; } input('user name','login','text'); my purpose build library maitain code. i have couple of functions created in days. use them projects, not framework dependent. nowadays prefer using symfony's form component when possible. take look, give idea. function lb($text, $forid='', $style='', $attr='') { if($style!='') $style='style="'.$style.'"'; if($forid!='') $forid='for="'.$forid.'"'; return '<label ...

oracle - Best way to output 100,000 records from PL/SQL program into XML file -

i'm new xml have been been given task output test set of 100,000 records xml file, bigger file in future. within each record there subsets of child data needs output file (see structure of code below). i'm trying find best solution dbms_xmldom looking @ forums outdated tool know there xmlelement think works in sql , not pl/sql. is there else works in pl/sql other dbms_xmldom or should stick i'm doing. tool has output each record output file. the current version of database 11g release 1. any advice great in advance. begin r_prod_rec in c_prod_rec loop output process master record xml file r_prod_child1_rec in c_prod_child1_rec(r_prod_rec.id) loop output process child record table1 xml file end loop r_prod_child2_rec in c_prod_child2_rec(r_prod_rec.id) loop output process child record table2 xml file end loop end loop end oracle setup : create table parents ( id, attr1, attr2 ) select level...

Understanding the use of Tcl namespace variable -

i have namespace variable defined below: namespace eval ::smb::{ variable smbinfo ------ ------ proc ::smb::smbcreate {name dutport} { variable smbinfo global dutports dutport_2 dutports_3 smb ------ ------ if{"" != [info command smb::$name]} { return -code error "command name \"$name\" exists" } set smbinfo($name -dutport) $dutport i new tcl , trying understand above piece of code. few questions, please correct me if wrong @ point: the variable smbinfo defined on top in namespace getting overridden 1 declared in procedure smbcreate. unable figure out objective of line: set smbinfo($name -dutport) $dutport i can see 'dutports' defined global not find 'dutport'. have not executed code yet. error? is ($name - dutport) creating array index variable smbinfo , value of $dutport being set particular array variable? i have similar co...

c++ - Getting error in cv::imshow() - ASSERT: "false" in file qasciikey.cpp, line 501 -

i getting error whenever call cv::waitkey(): assert: "false" in file qasciikey.cpp, line 501 i not sure why getting error. running on ubuntu server 14.04 ec2 instance connected through mobaxterm on windows. if run of same code on normal ubuntu machine, works great. this line happens: char key = cvwaitkey(33);

node.js - Load `svn export` output into Vinyl stream -

for gulp task, need manipulate versioned files (and those) in subversion working copy. since i'm not aware of plug-in can filter out unversioned files gulp pipe i'm using child_process.execfilesync() run regular svn export command , files in temporary directory. feed diredtory gulp.src() . it works , it's not particularly slow i'm wondering... there way skip file system entirely , create stream of vinyl files right svn export ? svn ls [-r] ... you have filter pure directory-nodes output, but... nodes without subtrees in have clean output without costly file-operations

osx - How to restore Sublime Text settings and preferences and undo the symlink created in Dropbox? -

how can restore sublime text settings , preferences , undo symlink created in dropbox? cannot access sublime text 2 preferences on machine after creating symlink in dropbox. these commands ran on primary machine: cd ~/dropbox ln -s ~/'library/application support/sublime text 2' sublime-text-2-settings these created "sublime-text-2-settings" in dropbox root directory. then on second machine, ran following commands: cd ~/library/application\ support/sublime\ text\2/ rm -r packages ln -s ~/dropbox/sublime-text-2-settings packages this from: https://github.com/rowno/rolandwarmerdam.co.nz/blob/master/app/_posts/2013-01-09-sync-sublime-text-2-settings.md now, sublime text 2 on both machines being rendered in total black , white color scheme, black sidebar too, it's impossible view files. also, cannot access preferences on either machine making impossible move forward. how can undo symlink? how can access preferences on primary machine? i spent ...

c++ - Formatting GDB template arguments in a backtrace -

as work c++ template library in gdb (through terminal), trying find way of pretty-printing template arguments when, instance, viewing backtrace. as example, visually trying find second (outermost) template argument in frame printed in gdb follows: (gdb) f #10 try_to_refine_element<cgal::null_mesh_visitor_level< cgal::mesh_3::tets::refine_facets_visitor<cgal::regular_triangulation_3 <cgal::robust_weighted_circumcenter_filtered_traits_3<... (+10397 char) gist these not stl templates, stl-template-printing-tools not applicable, , pretty-printing specific types not interest (i.e. custom pretty-printers) want view hierarchy of template arguments wide variety of classes/methods, rather representing content (these use-cases addressed in gdb docs ). there few pretty-printing in-built settings in gdb none seem affect templates (please correct if i've missed them!). is there way of getting gdb line-break , indent these more readably, or standard script use? templ...

Get Location form GPS and set marker on google maps in android -

hi trying getting location(latitude , longitude) gps , set marker on google map not working.in code trying latitude , longitude gps location listener method onlocationchanged method never calling not showing toast. public class mapsfragment extends fragment implements onmapreadycallback, googlemap.onmaploadedcallback { private static view view; private supportmapfragment mmap; private static double latitude = 28.6538100, longitude = 77.2289700; googlemap gmap; private static final int permission_request_code = 1; private mindislocationlistener locationlistener; private locationmanager lm; public mapsfragment() { } @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { fragmentmanager fm = getactivity().getsupportfragmentmanager(); supportmapfragment mmapfragment = (supportmapfragment) getactivity() .getsupportfragment...

ruby - self.included in a module -

i have class brand includes module simpleurlsanitizer . module has class method defined below: class brand include simpleurlsanitizer end module simpleurlsanitizer def self.included base base.send :extend, self end end since including module, have access module's instance methods. class method included called when module included in class. base brand class. included method doing? self inside method referring module or brand class? how work? as you're including simpleurlsanitizer in class, methods of simpleurlsanitizer accessible instance method. default behavior. the included part making sure that, can access methods class methods.

java - Finesse Class<E> into Class<E[]> -

public abstract class abstractrestclientservice<e extends idable<string>> implements genericservice<e, string> { private class<e> classtype; private class<e[]> classarray; private string controllerpath; public abstractrestclientservice(final class<e> classtype, final class<e[]> classarray, final string controllerpath) { this.classtype = classtype; this.classarray = classarray; this.controllerpath = controllerpath; this.webservice = new genericwebclientservice<e>(); } // ... other methods } is there way manipulate classtype classarray don't need pass in classarray parameter? i hate think best way it, here's how i've handled it. public abstract class abstractrestclientservice<e extends idable<string>> implements genericservice<e, string> { private class<e> classtype; private class...

php - Disabling selection of dates before specific date -

Image
i want when user selects start date , end date dates before start date selected become disable in end date. using html5 input type=date this. how can achieve task? you should validate things on server-side level too, without seeing code it's kind of hard guess looks like. however, can use attribute min="yyyy-mm-dd" specify first valid day, , likewise max="yyyy-mm-dd" maximum available day select. you can use javascript modify on fly, example <input type="date" id="start" name="start" onchange='var end = document.getelementbyid("end"); end.setattribute("min", this.value); end.value = (this.value);' /> <input type="date" id="end" name="end" /> this set attribute min of id="end" value selected of id=start . jsfiddle

android - AutoCompletetextview custom adapter issue -

Image
i have 1 autocomplete text view display firm name sq-lite database. database records came there no issue.but issue adapter .adapter not clear first search , suggestion display remove , again type , there no suggestion in database adapter display old suggestion search in last. below put images identify whats problem this image write output this wrong output 1 : here code topuptransfer.java public class topuptransfer extends baseactivity{ autocompletetextview memberview; arraylist <string> name = null,name1= null; button btnsubmit; string membercode2,amount; edittext amnt,smspin;; hashmap<string,string> memberdetail; autocompleteadapter2 adapter; databasehelper db; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.topuptransfer); if(!(thread.getdefaultuncaughtexceptionhandler() instanceof exceptionhandler)) { ...