Posts

Only 1 contentString displays in custom Google map -

i have used tutorial adding-custom-google-maps-to-your-website to create custom google map using v3 of google maps api, but have hit problem : when markers clicked, info box pops up, each different marker on map displays same contentstring . you can see here: http://tcchurch.com.au/table1/index.php/missions i assume there problem code preventing individual contentstrings displaying. if can help, appreciate it. you need set content each infowindow documentation google.maps.event.addlistener(companymarker, 'click', function() { infowindow.setcontent(html);//relevant html infowindow.open(map,companymarker); });

c# - How can i expose dto objects using wcf data service with ef code first? -

i trying make wcf data service dont want acces database models instead want use data transfer objects. have been reading lot on internet how accomplish cant answer problem. first time me doing wcf data services little inexperienced. oke here models linked database using entity framework public class user { [key] public int userid { get; set; } public string firstname { get; set; } public string lastname { get; set; } public string username { get; set; } public string email { get; set; } public string countrycode { get; set; } public string phonenumber { get; set; } public icollection<user> contacts { get; set; } public virtual language language { get; set; } public user() { contacts = new list<user>(); } } public class message { [key] public int messageid { get; set; } public datetime sentdate { get; set; } ...

javascript doesnt continue even though it should - mysterious -

i have written simple script goes through textarea , transports !hash tags! , @person names@ 2 separate inputs. however, unless first of 2 regex conditions met (word starts '!' , ends '!' symbol), not work next condition. for example code on line 42 console.log(persons_parsed); doesnt execute @ all, unless !hash tag! typed textarea. how make work, enter @person name@ , fill in input#persons_jquery ? code in jsfiddle: http://jsfiddle.net/yz2jw/1/ the problematic part if (tags_parsed.length > 0) { var vysledek_tags = null; (i = 0; < tags_parsed.length; i++) { if (vysledek_tags) { var vysledek_tags = vysledek_tags + ', ' + tags_parsed[i].replace(/[!]/g, ''); } else { var vysledek_tags = tags_parsed[i].replace(/[!]/g, ''); } } $('#tags_jquery').val(vysledek_tags); } console.log(persons_parsed); // doesnt return v...

hadoop - Hbase: Migration from standalone mode to Fully distributed mode -

i want if possible migrate standalone mode distributed mode in hbase.i have data in standalone mode persist during migration. please help. quite old question encountered same problem , solved using following steps: in standalone mode export table want migrate: bin/hbase org.apache.hadoop.hbase.mapreduce.driver export table_name /local/path/table_name_backup in pseudodistributed/distributed mode copy table in hdfs using hadoop: ./bin/hadoop fs -copyfromlocal /local/path/table_name_backup/ table_name_backup import data using hbase: ./bin/hbase org.apache.hadoop.hbase.mapreduce.driver import table_name table_name_backup remove old data hdfs using hadoop: ./bin/hadoop dfs -rmr table_name_backup u might want check number of rows before , after migration check if went according plan: ./bin/hbase org.apache.hadoop.hbase.mapreduce.driver rowcounter table_name

javascript - Unit Testing Chrome Extensions? -

this question has answer here: how test chrome extensions? 3 answers what best way unit test google chrome extension? i need unit test various javascript functions , content-scripts on websites designed for, automate user input on webpages content script injected into. is there anyway can automate testing process? if asking unit testing, same other javascript code. remember unit tests should small possible , shouldn't touch (they can mock) external api. if asking integration testing, different matter.

php - SQL error: Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource -

i error if try publish article on cms. the error: warning: mysql_fetch_object(): supplied argument not valid mysql result resource in /home/investmp/domains/cashcow.nl/public_html/publiceer/functions.php on line 32 have error in sql syntax; check manual corresponds mysql server version right syntax use near 'premiekoopwoning moet terugkomen'', 'eddy', 'publiceren')' @ line 1 functions.php: <?php //## function list: news manager ##// //## content news: lead - header - chapeaux - flat text (text) - quote - frame - image - chart ##// //upload images folder (resize = 1|0 - $dir (default = /images stated in admin) function uploadfile($fileinput ,$resize, $dir, $id) { global $_files; $file = $_files[$fileinput]['name']; if (is_uploaded_file($_files[$fileinput]['tmp_name'])) { copy($_files[$fileinput]['tmp_name'], $dir.$id."_".$file); if($resize == 1){ ...

ruby on rails - Is it possible to convert a string into a partial? -

i have string stored in database used custom layout. i parse custom layout inside of app layout, using : render_to_string(partial: custom_template, layout: "pdf_template", locals: locals) where custom_template string db. however, when try : nomethoderror: undefined method `to_sym' nil:nilclass is possible i'm doing? if so, can complete this? i've noted can try things : render_to_string(text: template, locals: locals, template: "pdf_template") and render_to_string(inline: template, locals: locals, template: "pdf_template") but doing so, can't find template , returns : actionview::missingtemplate: missing template layouts/pdf_template {:handlers=>[:erb, :builder, :coffee, :haml], :formats=>[:pdf], :locale=>[:en, :en]}. searched in: * "/users/elephanttrip/sites/shasta/app/views" which strange because worked fine in current location , definition. if want store views in database, should ...