Posts

javascript - How to update kml file/layer dynamically? -

i using kml file displaying map custom boundary lines. kml file downloaded website. in file, inside placemark tag there no point tag display icons. eg: <placemark> <name>spot 2</name> <description>.....</description> <styleurl>....</styleurl> <multigeometry><polygon><outerboundaryis><linearring><coordinates> ......... </coordinates></linearring></outerboundaryis></polygon></multigeometry> </placemark> that placemark tag contains in kml file. , need, 1) how can add point tag placemark tag. there way add dynamically?. kml file has 5000 , above placemarks. 2) point tag coordinates refers center of polygon. i.e) need following <placemark> <name>spot 2</name> <description>.....</description> <styleurl>....</styleurl> <multigeometry><polygon><outerboundaryis><line...

javascript - Gravity Forms - Show link after submission -

i have link set display: none url of file users can download after correct submission of gravity form. things want show link if submission successfull. the event have found far gform_post_render , triggered each time form loaded, if there error. any suggestions? it turns out found appropriate event: $(document).bind('gform_confirmation_loaded', function() { //do stuff });

amazon web services - Laravel and environment variables in command line production without .env file -

when upgraded laravel 5 started using env system set configurations inside file @ root. .env db_host=x.x.x.x.x db_username ... this file not part of repo , when deploy set same variables onto system environment variables (using amazon beanstalk here) accessible without need of .env file. so works when use command line in scripts in production these system environment variables don't seem accessible in command line. accessible when php served through web server. i found if copy add .env file works in command line that's why i'm confused, thought system prevent committing sensitive information repo , seems have so can use php artisan migrate , other commands in production. am missing something? there way system environment variables available in command line or have somehow create .env file dynamically in production? i thought .env file part of setting server. .env file ignored git, once it's setup, can push/pull heart's content , it'll ...

cq5 - Workflow session throws RepositoryException on updating Workflow data -

trying save properties in workflow metadata , below code snippet using same. try { if (workitem.getworkflowdata().getpayloadtype().equals("jcr_path")) { addvaluestometadata(workitem, workflowsession,metadatamap); } metadatamap wfmetadata=workitem.getworkflowdata().getmetadatamap(); set<string> keys=metadatamap.keyset(); (string key : keys) { if(key.startswith("xyz")){ wfmetadata.put(key, metadatamap.get(key)); } } workflowsession.updateworkflowdata(workitem.getworkflow(), workitem.getworkflowdata()); } catch (exception e) { e.printstacktrace(); } i not closing session, throws following exception. javax.jcr.repositoryexception: session has been closed. @ org.apache.jackrabbit.oak.jcr.delegate.sessiondelegate.checkalive(sessiondelegate.java:367) @ org.apache.jackrabbit.oak.jcr.session.sessionimpl$readoperation.checkpreconditions(sessionimpl.java:110) @ org.apache.jackrab...

python - choosing reads with Hamming distance zero -

i have fastq files, reads.fastq . have list of 7-mer strings. each read in reads.fastq , want check if contains @ least 1 of 7-mer strings in list. condition that, if match found ( hamming distance ==0 ) read written array chosen_reads , next read fastq file matched. if match not found loop continues till match found. output array consists of unique reads, since matching loop terminates once first match found. wrote following code reads in output array not unique since matches hamming distance 0 reported. please suggest edits: def hamming(s1, s2): #return hamming distance between equal-length sequences if len(s1) != len(s2): raise valueerror("undefined sequences of unequal length") return sum(ch1 != ch2 ch1, ch2 in zip(s1, s2)) x in bio.seqio.parse("reads.fastq","fastq"): reads_array.append(x) nmer = 7 l_chosen = ['gttattt','attattt','tgctagt'] chosen_reads = [] x in reads_array: s2 = str...

Why cant I use the variable "i" from my constructor in other member functions? C++ -

i'm working on creating bank program programming methodology and, reason, can't seem use value assign variable i in constructor in of other member functions. instance, if user input 6 , i calculated 0.005 constructor, value (0.005) not passed makepayment function. instead, i reset zero. can shed light on this? code below. loan_data::loan_data(double p, double n, double i) { cout << "enter loan amount: $"; cin >> p; cout << "enter loan length: "; cin >> n; cout << "enter credit score: "; cin >> i; = / 100; = / 12; n = n * 12; bal = p; = (p * ((i * pow(1 + i, n)) / (pow(1 + i, n) - 1))); cout << "a is: " << << endl; cout << "bal is: " << bal << endl; cout << "i is: " << << endl; } void loan_data::makepayment(double pay) { cout <...

How to split slash / separated string in two variable in php -

assume applicant id passed other form.i have array variable coming database, here code : $array_id_applicants = explode(";",stripslashes($applicant_id1)); $applicants_num = count($array_id_applicants); $arr_app_num = array(); for($x=0;$x<=$applicants_num;$x++) { if($array_id_applicants[$x]){ $applicant_id = str_replace("'","",$array_id_applicants[$x]); $applicants = getdata("select cellphone personal applicant_id='".$applicant_id."'"); $replace_array = array("-","(",")","+","_"); array_push($arr_app_num,str_replace($replace_array,"",$applicants[1][cellphone])); } } $applicant_number = implode(";",$arr_app_num); echo $applicant_number; exit; assume value of array : $applicant_number = '639152478931 / 631687515455','631235497891' i want output : $applicant_number = '639152478931','631687515455','6312...