Posts

Showing posts from June, 2014

jquery - Jump to specific part of an HTML page from an external link not working -

i had created page had internal jumps particular section inside div , specified id. working fine (internally). localhost/index.html#career-div localhost/index.html#about-div i have elements ids career-div , about-div . when tried jump page (say contact.html ) index.html hashtag, did not jump particular section!! <a href="index.html#career-div">career</a> <div class="container"> <div id="career-div" class="content-block-div"> </div> </div> the above code loads index page normal, not jumping specified id. tried name attribute also, did not work! if hit enter key on address bar, page jumps should! want smoothly scroll after switching pages. the function using smooth scroll towards target , button class management here: $(function(){ $('a[href*=#]:not([href=#])').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') &

spring batch - Why use job/step listeners instead of just two more steps/tasklets (one in the beginning and one the end)? -

since job listeners have callback methods executed before & after steps, can same thing achieved having step in beginning of steps , step in end? or instead of step listener, have 1 tasklet before tasklets , tasklet @ end of tasklets of step? different listeners can't done 2 more steps or tasklets? because listeners executed in case of failures or there other design logic & need fail see?

c - arm-none-eabi-gcc: SECTIONS: unclear syntax *<archivename>.a: -

i not find clear answer specific problem, after reading several manual pages , guides. work on linker script tool chain mentioned in title. during development tying link static library (archived, .a) location in ram. not accomplish task handling regular .o file in following example: sections { outputa 0x10000 : { all.o foo.o (.input1) } outputb : { foo.o (.input2) foo1.o (.input1) } outputc : { *(.input1) *(.input2) } } after long journey, found hint in question . lead me current solution: ... .ramlib : align(4) { *liblpcspifilib_m3.a: (*); } > ramloc40 at>mflasha512 ... please note colon syntax. link contents of liblpcspifilib block ram. without ":" won't link anything. after found out how solve issue, not find other information behaviour. can explain me? for reason information hard find in official gnu docs, assume kind of extension. here on page 50 tel

html5 - vba in html- Need to onmouseup login which is not a button -

is possible automate login page using vba has mousedown , mouseup clicks . when click login button has mousedown click doesn't have button in order automate using vba. please let me know if possible in vba using functions please copy url , paste in internet tab: " http://discovery.ariba.com/rfx/3796429 ". after clicking url enter ariba discovery site , there have ship service location field. in ship service location field there multiple locations , need click on "show more". click show more if see html code it's not button in order automate click. it's awmouseup , aw page name guess. recommend yo use google chrome , try inspecting html code. need automate click using vba code. ie.document.getelementbyid("_sbsyf").click should it

android intent - Errors with taking photos and setting it in imageview with Fragments -

i cannot seem able take photo camera , set imageview. have tried many different ways either receive errors or image view wont display photo took. i'll post have coded @ moment @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view view = inflater.inflate(r.layout.fragment_snap, container, false); imageview imageview = (imageview) view.findviewbyid(r.id.camera_display); button camera_btn = (button) view.findviewbyid(r.id.camera_btn); camera_btn.setonclicklistener(new view.onclicklistener() { @override public void onclick(view view) { intent intent = new intent(mediastore.action_image_capture); getactivity().startactivityforresult(intent, capture_image_activity_request_code); } }); return view; } then onactivityresult @override public void onactivityresult(int requestcode, int resultcode, intent data) {

JQuery keyup on dynamic textboxes on dynamic form -

i have form has button trigger jquery create additional form on same page. this 2nd form has 2 text boxes: first 1 account , second 1 bankaddress when bankaddress gets focus, button created add more bankaddress text boxes. works fine , keyup trigger works fine until added code add index end of bankaddress name & id identify each box. any ideas? js function doaddmorebank(form) { $('<p class="ptxtfields"><label for="newbankaddress">&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp</label>' + '<input type="text" value="new switft address" class="newbankaddress inputnumtextbox1 keyup-charnumonly" maxlength="23">' + '<span class="bankaddrspan errorstyle"><span></p>').insertbefore("#idaddmorebank"); add

c# - Xamarin camera access in a shared project -

i'm building shared project , want access camera. i'm trying work on android. i found this here in stackoverflow , works i'm not being able put work in project becouse want call camera in contentpage , not in class app : application. i recommend library that: http://components.xamarin.com/view/xamarin.mobile

How to pass a list as an argument in python -

i new python , coding in c++ 2 years. want pass list argument in function display stuff inside in different lines (actually want make own function display stuff) myvar = [1, 4, 5, 3, 7, 4, 9, 5, 10] def displaylist(paramlist): tempindex = 0 in paramlist: print paramlist[tempindex] tempindex += 1 displaylist(myvar) this wrote , getting this: 1 4 5 3 7 4 9 5 10 this not expected output. have done wrong. note: new language. edit: apologize inconvenience showed exact output wanted, didn't notice because of negligence. please flag question gets deleted this looks expected output me. note bit more pythony way write code might be myvar = [1,4,5,3,7,4,9,5,10] def displaylist(paramlist): p in paramlist: print p displaylist(myvar)

event log - nxlog querylist doesn't work as expected -

nxlog.conf the above link copy of nxlog.conf. couldn't find documentation how use multiple blocks within querylist block, based on name assumed able this. elk server receiving events right now, not of filtered ones. wanted use 1 query block limited 10 select entries. can't find examples of people using more 3 select entries. has had luck more advance nxlog.conf's? appreciated. not sure issue query xml is. if there limitation on number of select entries, that's coming windows eventlog api cannot helped. on other hand can use nxlog's native filtering using drop() : query <querylist>\ <query id="0">\ <select path="security">*</select>\ </query>\ </querylist> exec if not ($eventid == 1 or $eventid == 2 or ...) drop();

winapi - using hook on OPENFILEW dialog disables resize control -

using code resulting dialog box drawn without ability able resized mouse: #include <windows.h> static uint_ptr callback ofnhookproc (hwnd hdlg, uint uimsg, wparam wparam, lparam lparam) { return 0; } int main() { openfilenamew ofn; zeromemory(&ofn, sizeof(ofn)); ofn.lstructsize = sizeof(openfilenamew); ofn.nmaxfile = max_path; ofn.flags = ofn_explorer | ofn_filemustexist | ofn_enablehook; ofn.lpfnhook = ofnhookproc; getopenfilenamew(&ofn); return 0; } removing ofn_enablehook shows correct dialog window resize indicator @ bottom right corner. how make dialog user-resizeable , hook procedure ? (of course hook mock here, illustrate error, no matter put inside, of course if correct on other matters, result same) you need include ofn_enablesizing flag when using ofn_enablehook . documented behavior: openfilename structure ofn_enablesizing 0x00800000 enables explorer-style dialog box resized using either mouse or keyboard.

uitableview - Swift Watchkit let user move cell (row) in a table when running app -

i have table list order create date using realm database. trying find way let user when using app, drag row (cell) new position in table. i hoping deletes used: func tableview(tableview: uitableview, commiteditingstyle editingstyle: uitableviewcelleditingstyle, forrowatindexpath indexpath: nsindexpath) { if (editingstyle == uitableviewcelleditingstyle.delete) { } } unfortunately, there no editing mode (like 1 in uitableview ) in wkinterfacetable . also, because there no drag gestures exposed in watchkit, there no way duplicate functionality in current version. one approach might add own control toggles edit mode, expose buttons in each cell move row or down. require bit of work, , actually, i'm not sure user experience due limited screen real estate.

how to implement exact C# hashcode in Java -

i have piece of code generate signature in c#, , sake of convenience, used hashcode , fine. however, boss told me signature has generated in java side too. drives me crazy. , digged .net source code. currently, need hashcode of int, double, string , bool. int , bool easy. real thing can't think of easy way double , string. environment 64-bit. have source in following: for string: public override int gethashcode() { #if feature_randomized_string_hashing if(hashhelpers.s_userandomizedstringhashing) { return internalmarvin32hashstring(this, this.length, 0); } #endif // feature_randomized_string_hashing unsafe { fixed (char *src = this) { contract.assert(src[this.length] == '\0', "src[this.length] == '\\0'"); contract.assert( ((int)src)%4 == 0, "managed string should start @ 4 bytes boundary"); #if win32

excel - Reference add in global variables from worksheet code -

i'm building excel addin, declares public variables in sub. when addin first used, copies worksheets addin (thisworkbook) user's workbook (activeworkbook). worksheets have worksheet event subs in them. question: activeworkbook worksheet event subs need reference public variables defined in thisworkboook, can't seem find them. suppose because they're in different workbook. in add-in situation, surely there must way of doing that? specific example: globaladdin.xlam in module module1 declares option explicit public testme integer and then public sub runsub() testme = 10 msgbox "the addin says testme " & testme end sub and runsub called thisworkbook._open() event. globaladdin.xlam made active addin. in workbook book2.xlm in sheet1 hasve option explicit private sub worksheet_selectionchange(byval target range) msgbox "the worksheet says testme " & testme end sub now open book2.xlm. dialog box reports value of 10 testme (this

javascript - Passing html input value to PHP using AJAX -

Image
i uploading images using ajax. since have table lists records, there more 1 rows , can't add images except first row's id. have give function parameter, couldn't figure out how implement ajax part. what want post thing_id value php form while uploading images. i updated question, see details. here's how activate modal. <a class="btn btn-warning btn-sm" data-toggle="modal" data-target="#image-edit<?php echo $row['thing_id']; ?>"><span class="glyphicon glyphicon-camera" aria-hidden="true"></span></a> my modal (you wanted more details, posting whole modal. <div class="modal fade" id="image-edit<?php echo $row['thing_id']; ?>" tabindex="-1" role="dialog" aria-labelledby="mymodallabel<?php echo $row['thing_id']; ?>" aria-hidden="true"> <div class="modal-dialog

c# - enable and disable asp validator using embedded code in asp tag dosent work -

enable , disable asp validator using embedded code in asp tag doesn't work, value written control still enabled. please check occurrences of enabled="<%# convert.toboolean(txttext.enabled) ? false : true%>" in form: <form id="frmvalidator" runat="server"> <div> <asp:validationsummary id="summary" runat="server" headertext="error(s):" cssclass="msg-error" /> <asp:textbox id="txttext" runat="server" maxlength="15" enabled="false" /> <asp:requiredfieldvalidator id="rfvtxttext" runat="server" controltovalidate="txttext" errormessage="requiered." display="none" clientvalidationfunction="" setfocusonerror="true"

mysql - Join 2 tables with all same column headers but one different -

how join 2 tables have of same column headers one? the other 3 columns same 1 table has column header "january" , other table has column header "february" so end 5 total columns in new table i of data in there if there duplicates. before used union cannot because not headers same. thanks! you can use union , rename 1 of columns: select id, name, age, xxx table1 union select id, name, age, yyy xxx table2 if add more information, can elaborate answer

powershell - OS version IF statement -

i working windows 7 , 8.1 machines. implement powershell script detect os , install program based on result. so far can os caught in if statement. $win7="6.1.7601" $win8="not tested yet" $version=(get-wmiobject win32_operatingsystem).version write-host windows version $version. if(!($version="6.1.7601")) {skip} else {install file} i trying skip script , return main script if os not win7 otherwise should install files needed. appreciated. the = operator used set value of something. need use -eq operator, compares objects. if(!($version -eq "6.1.7601"))

CKEditor 4 removes xlink:href in A tags even when allowedContent set to true -

i have use ckeditor allow users edit htlm pages may include svg images. , links defined in svg images contain attribute xlink:href. e.g: <svg preserveaspectratio="xminymin meet" version="1.1" viewbox="0 0 778 873" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <image height="100%" width="100%" xlink:href="map.png"></image> <g class="hover_group" opacity="1"> <a xlink:href="http://www.google.com"> <rect fill="red" height="100" opacity="0.0" width="160" x="110" y="240"></rect> </a> </g> </svg> i set ckeditor.config.allowedcontent = true hope tags , attributes retained editor. however, when switch , forth between wysiwyg , html mode, notice tag beco

java - MAP interface using mobicents -

hi i'm tring use jss7 build map interface send message 1 : https://code.google.com/p/jss7/source/browse/map/load/src/main/java/org/mobicents/protocols/ss7/map/load/server.java don't found document or demo know how change ussd sms unfortunately there no clear manul of how implement different map messages because of there big count. use map protocol specification (3gpp ts 29.002) learn more. you can check opensource mobicent smsc gw source code: https://code.google.com/p/smscgateway/

kendo ui - How do I get a filter to open to the left and not the right? -

i creating mobile app using kendo grid mvc. when user clicks on 1 of column filters, drop down menu appears. when click on filter options, window opens right , not visible in view port. have scroll right select options. is possible open sub-menu left? thanks help. are using adaptive rendering? http://docs.telerik.com/kendo-ui/controls/data-management/grid/adaptive "to enable adaptive rendering feature developer should set mobile propery true, phone or tablet." if not solve problem, please provide code you're using grid.

math - Creating non reoccuring random groups of people -

so isn't informatics question i'm guessing solution lies in informatics. we have group of 100 students meant have discussion amongst each other. want separate them 10 groups of 10 people. want have 3 rounds of discussions, want groups different each time. no 1 person should sit same person twice. say assign our groups letters abcdefghij (10) person1 gets round1:a round2:b round3:c person2 gets round1:a can't have round2:b or round3:c because meet again. doing hand sounds pretty insane , i'm sure there pretty simple solution this. maybe program this, can't find or don't know search for... sadly have no skills whatsoever in programming, maybe can done in excel or sth that? all or tips apreciated. taking time! yes, can done in excel. need 3 step approach: mix students in random fashion. create 1 set of mixes don't repeat students apply transformation of order students the tricky 1 2nd. the exemplary mix is: since order of stud

linux - psql return code if zero rows found -

i psql command fail if 0 rows found: psql -u postgres -d db -c "select * user id=1 , name='joe';" i want able check return value. return 0 process(!) if @ least 1 row exists , return non-zero psql process if no such row exists. how can set return code if no rows found? i don't think psql can itself, if want see if there rows or not exit status combine like psql -u postgres -d db -t -c "select * user id=1 , name='joe'" | egrep . that cause egrep exit non-zero if cannot match anything. -t make not print column headers , summary information, may need tweak command line if need stuff.

Spring beans: ambiguous constructor when creating a bean -

first, apologize if has been answered elsewhere, @ loss how resolve error. i have bean declaration as: <bean id="prefix" class="java.lang.string"> <constructor-arg index="0"> <value>uio</value> </constructor-arg> </bean> from defaultlistablebeanfactory, message printed: creating shared singleton instance of instance of singleton bean 'prefix'. after further messages, defaultlistablebeanfactory prints message: ignoring constructor [public java.lang.string(byte..,int,int,java.nio.charset.charset .. then: unsatisifed dependency expressed through constructor argument index 1 of type[int]: ambiguous constructor. i searched through web , saw similar type of question has been asked , answered few times, trying determine definitive answer is. i tried following declarations: <bean id="prefix" class="java.lang.string"> <constructor-arg index="0" type

arrays - PHP Invalid argument supplied for foreach() -

i have array: $y_exceptions = array( "lay", "interlay", "display", "delay", "obey", "decay", "play", "slay" ); i'm checking if word in array this: foreach($y_exceptions $thisexception) { which throws error invalid argument supplied foreach() what have done wrong? $y_exceptions needs array processed foreach loop. possible $y_exceptions set null before foreach loop. null not treated array, foreach expects—hence warning. on solution stricter validation before foreach: if (!is_array($y_exceptions)) { // throw exception } alternatively, instruct foreach loop run $y_exceptions array, though may cause errors downstream: foreach ((array) $y_exceptions $thisexception) { // stuff }

Spam Referral people on my Wordpress -

Image
for time in google analytics observe busy foreign sites. these spam site. how can protect? screen ga: http://oi60.tinypic.com/2vctdae.jpg these called "ghost referrals" , best way rid of them add new view , create include filter it. check out full post http://blog.tylerbuchea.com/google-analytics-filtering-out-ghost-referrals/ first go the analytics admin section , choose account , property you'd apply filter to. create new view "example.com (ghost referalls filter)". trust me on create new 1 , don't reuse existing one. i'll explain later. add new filter freshly created view. select custom tab, mark include radio button, , choose hostname dropdown. you'll want enter sites hostnames separated or operator "|" , make sure add backslash before each period. white list hostnames , block other sites sending fake data muddy analytics reports. example entry example\.com|www\.example\.com|translate\.google\.com so why new

Meteor HTML parser give me challenge -

in meteor app, i'm trying list user completed profile on single page. that, need them follow : <div class="container"> {{#each talker}} {{#if profile.completed}} <div class="row"> <div class="span5 talker-card well"> <span><b>{{profile.username}}</b>, {{profile.location}}</span><br> <b>{{profile.languages.native}}</b> <p> {{profile.bio}} </p> </div> <div class="span5 talker-card well"> <span><b>{{profile.username}}</b>, {{profile.location}}</span><br> <b>{{profile.languages.native}}</b> <p> {{profile.bio}} </p> </div> </div> {{/if}} {{/each}} two two, must in same row sized span10, split in 2 span5. the problem must define behavior 3 different cases : there profile after one, in same row there

java - Amazon EC2 - Quartz and Job not running at correct time -

i have java app deployed on amazon ec2 server. use quartz scheduling various jobs. i tried scheduling job run @ 9am - noticed didnt execute until 10am tried execute job @ 9am gmt-5 -should of executed @ 2pm gmt executed @ 3pm gmt on further analysis noticed time on amazon server set in utc , hour behind gmt currently i wondering - part of setup not correct since jobs not executing @ correct time? do need specify when setting cron trigger? setting cron in quartz follows using cronschedulebuilder cronexpression cronexpression = new cronexpression(cronvalue); timezone timezone = timezone.gettimezone("etc/gmt-5"); cronexpression.settimezone(timezone); trigger trigger = triggerbuilder.newtrigger().withidentity(triggername).startnow() .withschedule(cronschedulebuilder.cronschedule(cronexpression)).build(); jobdetail job = jobbuilder.newjob(mycloudtasksservertaskexecutor.class).withidentity(taskid.tostring())

php - How to filter BoltCM setcontent by releated ContentTypes? -

now can do: {% setcontent books = 'books' {price: '<30.00'} %} but how can fetch books filtered author in scenario books , authors 2 contenttypes , authors relation books (instead of having authors id foreign on books)? something pseudo: {% setcontent books = 'books' {related: {authors: author}} %} ( author current record on template). or taxonomies: https://docs.bolt.cm/content-fetching#using-taxonomies instead of querying 'books' , somehow filtering on having realtion, should other way around: know 'author', , can use related records, using {{ author.related() }} .

How To Create Google Compute Engine Instance Using Fog In Ruby -

i try following code getting error, server = connection.servers.create({ :name => "instance-#{time.now}", :image_name => "debian-7-wheezy-v20150325", :machine_type => "f1-micro", :zone_name => "us-central1-a", }) /home/vijay/.rvm/gems/ruby-2.0.0-p598/gems/fog-core-1.30.0/lib/fog/core/attributes.rb:151:in `requires': disks required operation (argumenterror) /home/vijay/.rvm/gems/ruby-2.0.0-p598/gems/fog-1.29.0/lib/fog/google/models/compute/server.rb:218:in `save' /home/vijay/.rvm/gems/ruby-2.0.0-p598/gems/fog-core-1.30.0/lib/fog/core/collection.rb:51:in `create' google_compute_engine.rb:11:in `<main>' i think missing parameter required, can me solve problem. first create disk: disk = connection.disks.create({ :name => "my-disk", :zone_name => "us-central1-a", :size_gb => 10, :source_image => "debian-7-wheezy-v20150325"})

jquery - Why won't my Javascript popup work anymore? -

afternoon, i've made few modifications product pages on website, @ point popup confirms product has been added shopping basket has stopped working , i'm unclear why... original page: http://www.dibor.co.uk/product.asp?productid=y646&title=gentlemenand new page: http://www.dibor.co.uk/product2.asp?productid=y646&title=gentlemenand you see when click 'add cart' on original page, popup appears. i'm stumped , forward hearing you. kind regards, shaun jquery.noconflict()(ready(function() { response.write("12") // examples - images $("#various1").fancybox({ 'titleposition' : 'inside', 'transitionin' : 'none', 'transitionout' : 'none' }); }); find in code. there ) after this. remove that

php - Laravel 5 Resolving dependencies in ServiceProvider -

i have class acts storage (add/get item). try bind singleton in 1 service provider, , resolve in another's boot method. the code changed simplicity. app/providers/bindingprovider.php <?php namespace app\providers; use illuminate\support\facades\facade; use illuminate\support\serviceprovider serviceprovider; class mybindingfacade extends facade { public static function getfacadeaccessor() { return 'my.binding'; } } class mybinding { protected $items = []; public function add($name, $item) { $this->items[$name] = $item; } public function get($name) { return $this->items[$name]; } public function getall() { return $this->items; } } class bindingprovider extends serviceprovider { public function register() { $this->app->singleton('my.binding', function($app) { return $app->make('app\providers\mybinding'); }); } publi

python - Renaming downloaded images in Scrapy 0.24 with content from an item field while avoiding filename conflicts? -

i'm attempting rename images downloaded scrapy 0.24 spider. right downloaded images stored sha1 hash of urls file names. i'd instead name them value extract item['model'] . this question 2011 outlines want , answers previous versions of scrapy , don't work latest version. once manage working i'll need make sure account different images being downloaded same filename. i'll need download each image own uniquely named folder, presumably based on original url. here copy of code using in pipeline. i got code more recent answer in link above, it's not working me. nothing errors out , images downloaded normal. doesn't seem code has effect on filenames still appear sha1 hashes. pipelines.py class allenheathpipeline(object): def process_item(self, item, spider): return item import scrapy scrapy.contrib.pipeline.images import imagespipeline scrapy.http import request scrapy.exceptions import dropitem class myimagespipeline(imagespipe

scripting - When exporting XLIFF from Xcode, how to exclude dummy strings? -

i'm using xcode's editor > export localization... export xliff file translation translations main.storyboard includes lot of unnecessary strings, placeholders/dummies useful @ design time. how exclude such strings xliff file? i've written script excludes translation. how works? cmd-line: python strip_loc.py input .xliff output .xliff exclude_list .txt [-v] example usage: python strip_loc.py en.xliff en-stripped.xliff exclude_words.txt -v exclude_list.txt file string per line. script parses list , creates dictionary of banned words. if translation source containing 1 of these strings encountered, whole translation unit removed output xml/xliff.

excel vba - Find and replace a special unicode character -

i have particular column has multiple occurrences in multiple rows of special character. it's "response" character. it's capital r slash through it. it's represented unistring 211f. can represented in html &#8479. i'd use vba search "response" character , replace "response" , line feed asc(10). how can search , replace special character? you want search what:=chrw(8479) , replace replacement:="replace" & chr(10) . this quick code make unichar-to-text replacement across active worksheet. sub replace_response() dim fnd range activesheet .cells.replace what:=chrw(8479), replacement:="response" & chr(10), lookat:=xlpart end end sub the range of replacements can pared down column, row or selected group of cells.

jQuery one event prevents other event from being fired -

i'm unsure overlooking. if design bad or if there smart way of solving this. given: 1 input field 1 hidden button logic: if input field focused, hidden button gets shown. if input field unfocused, button gets hidden. if button clicked, function called, , button gets hidden. the problem when button clicked, input field gets unfocused before, unfocus listener fires first , somehow button-click listener never fires. why this? why aren't both listeners triggered? current code structure: $(someinputfield).focus(function(){ show button } $(someinputfield).focusout(function(){ hide button } $(somebutton).click(function(){ deliver(); hide button } deliver(); never gets executed! edit: here real code: $("#input1").focus(function(){ $("#submit1").delay(600).queue(function(next){ $(this).css('display', 'block'); next(); }); }); $("#input1").

mysql - Magento - Who ordered what in Magento webshop with a query on db? -

i'm trying figure out orders in our webshop our marketing intern can figure out every customer worth, etc. i've built query, doesn't seem work correctly: select e.*, sfoi.*, sfoa.lastname, sfoa.email, sfoa.street, sfoa.postcode, sfoa.country_id sales_flat_order e inner join sales_flat_order_item sfoi on (e.entity_id=sfoi.order_id) inner join sales_flat_order_address sfoa on (e.customer_id=sfoa.customer_id) date_format(e.created_at, '%y') '2015' , sfoi.parent_item_id null , sfoi.qty_ordered > 0; the matching of customer_id gives wrong results , don't think understand database model found on magereverse.com thoroughly enough figure 1 out. we working magento 1.7.0.2. appreciated. -edit- think found solution: select e.*, sfoi.*, sfoa.lastname, sfoa.email, sfoa.street, sfoa.postcode, sfoa.country_id sales_flat_order e inner join sales_flat_order_item sfoi on (e.entity_id=sfoi.order_id) inner join sales_flat_order_address sfoa on (e.ent

xml - AS3 Append data to local file -

i have as3 game played on local desktops (not on network) , need save players details after every game. have tried few methods (filestream, sharedobject, xml) far none have worked. details saved variables player_name , player_score. need these added existing file, don't have sorted or filtered. for case use simple localshardobject. hope, you'll understand code. otherways, please ask. greetings andré import flash.events.netstatusevent; import flash.net.sharedobject; var soname:string="yourso" function writescore(playername:string, playerscore:number):void { var so:sharedobject = sharedobject.getlocal(soname); // write new object nemed playername in so.data[playername]= {name:playername, playerscore:playerscore}; // add successlistener so.addeventlistener(netstatusevent.net_status, onflushstatus); // , flush so.flush(); } function readso():object { var so:sharedobject; = sharedobject.getlocal(soname);

javascript - Some SiteCatalyst eVar values not passing in Custom Link -

i'm facing crazy matter sitecatalyst custom link (internal) request. i'm firing s.tl() through code below: var s_custom = s_gi("report-suite"); s_custom.linktrackvars = "evar76,events,list3"; s_custom.linktrackevents = "event87"; s_custom.events = "event87"; s_custom.evar76 = "value"; s_custom.list3 = "option1,option2"; s_custom.tl(this, 'o', 'link name'); the issue concerns evar76 , value not included in request, if "s_custom" trackerobject contains it. in fact, if inspect object find it. this strange seems affect "high" number evars, evar76, 77, 80, 99 , on, not lower ones. replacing evar76 evar55, 56 or 60, ex, resulting in normale behaviour values included in requests. this not depending on evars existance, or activation, in report suite , expected because no preliminar calls made adobe server in order check set, or enabled, evars in report suite. this silly behaviour f

Rate Movies in Python -

i'm trying write program display user’s movie rating. application should allow user enter ratings 5 different movies. each rating should number 1 through 10 only. application should graph ratings using horizontal bar chart made of row of asterisks ( ).each row should contain 1 10 asterisks ( ). number of asterisks depends on movie’s rating. have use tuple store name of 5 movies. i'm new @ programming please nice lol. this have far i'm struggling: movies = ("shrek", "platoon", "scary movie ii", "gone wind", "harvey", "7:4") rating = int(input ("enter movie rating: ")) in range(1,11): print ("rating movie: ", movies[rating]) while rating < 0 or rating > 10: ratings = int(input("enter movie rating: ", rating)) j in range(rating): print ("*"*5,) first, tuples aren't this. can use list instead. it's similar worth swi

Import errors on org.eclipse packages after upgrading Eclipse Indigo to Luna -

i have upgraded eclipse indigo luna time getting many errors regarding plugins not imported. please let me know if 1 have idea how add below plugins in eclipse luna. unable add plugins in eclipse luna. can 1 provide suggestions resolve these imports? org.eclipse.jface.viewers.*; org.eclipse.jface.wizard.*; org.eclipse.jdt.core.*; orgeclipse.jdt.internal.core.*; org.eclipse.jdt.internal.ui.text.java.*; org.eclipse.dt.core.search.*; org.eclipse.swt.swt; org.eclipse.swt.events.*; org.eclipse.draw2d*; org.eclipse.core.runtime.*; org.eclipse.ui.internal.*; org.eclipse.ui.ieditorpart; in past releases of eclipse eclipse development plugins available via build path when enabled plugin development environment, , there several ways that. when went new release enabled state reset , i'd same kind of errors you're getting. found easiest way re-enable plugins create dummy plugin project has side affect of enabling plugin development environment. i'd delete dummy proje

asp.net - Validate textbox with RegularExpressionValidator -

i have text box want validate format of text: p-xxxxxxxx-xxxxx-xx. need "xxxxxxxx" stricted 8 digit, "xxxxx" 1 5 digit , "xx" 1 or 2 digit. how can regular expression validator textbox in asp.net : <asp:textbox id="cadastralnumbertextbox" autopostback="true" runat="server" meta:resourcekey="cadastralnumbertextboxresource1" text='<%# bind("cadastralnumber") %>' width="98%" readonly="false"></asp:textbox> the regular expression validate p-xxxxxxxx-xxxxx(1 or 5 digits)-xx(1 or 2 digits) use ([p]-\d{8}-(\d{1}|\d{5})-(\d{1,2})) regular expression. to validate p-xxxxxxxx-xxxxx(1 to 5 digits)-xx(1 or 2 digits), use ([p]-\d{8}-(\d{1,5})-(\d{1,2})) validator the first 1 requires second grouping of numbers 1 or 5 digits long, whereas second 1 requires second grouping of numbers 1, 2, 3, 4, or 5

javascript - How do I pass bound data to nested selections in D3? -

i'm trying build , update table using d3 selectors, i'm having issues updating rows after creation. following code tries bind rows in table incoming [object] , each name , value fields. var table = d3.select("#datatable"); var binding = table.selectall("tr.data") .data(data, function(d) { return d.name; }); var enterbinding = binding.enter(); var updatebinding = binding; updatebinding.selectall("td").text(function(d) { if(d3.select(this).classed("name")) { return d.name; } else { return d.value; } }); var newrows = enterbinding.append("tr").classed("data", true); newrows.append("td") .classed("name", true) .text(function(d) { return d.name; }); newrows.append("td") .classed("value", true) .text(function(d) { return json.stringify(d.value); }); the rows created properly, , right data. update selection occur , handlers calle

c++ - Bug in VS13 regex: wrong order for alternatives? -

Image
i need regex captures argument between parentheses. blanks before , after argument should not captured. example, "( ab & c )" should return "ab & c" . argument can enclosed single quotes if leading or trailing blanks needed. so, "( ' ab & c ' )" should return " ab & c " . wstring string = l"( ' ab & c ' )"; wsmatch matches; regex_match( string, matches, wregex(l"\\(\\s*(?:'(.+)'|(.+?))\\s*\\)") ); wcout << l"<" + matches[1].str() + l"> " + l"<" + matches[2].str() + l">" + l"\n"; // results in "<> < ' ab & c '>", not ok it seems second alternative matched, took space in front of first quote! should have been caught \s after opening parenthesis. removing second alternative: regex_match( string, matches, wregex(l"\\(\\s*(?:'(.+)')\\s*\\)") ); wcout <&

flask - Python: stream stdout from function to webpage -

i'm trying stream stdout of function webpage. some_function.main takes few mins complete , want show stdout screen (its using logger). this code execute function don't on webpage, see on screen when run "python app.py" (i'm using flask) from jinja2 import environment jinja2.loaders import filesystemloader @app.route('/buildvm', methods=['get', 'post']) def buildvm(): if 'username' not in session: return redirect(url_for('login')) if request.method == "post" , 'username' in session: parmsdic = {'key':'val'} def inner(disc): sys.path.append('/some/path') import some_fuction #for x in range(100): x in some_fuction.main(disc, quite=true): yield '{0}<br/>\n'.format(x) env = environment(loader=filesystemloader('templates')) tmpl = env.get_template('results.html&#

javascript - Sorting large CSV in D3.js -

Image
i'm trying sort medium sized csv file (~3000 lines) using d3.js before passing visualization algorithm. apparently though there's wrong code sorting seems applied in 'chunks' - see image above. i'm using d3 function: dataset.sort(function(a,b) { return d3.descending(a.counttotal, b.counttotal); }); here's code: // d3 code go here // safe way load data var dataset = []; d3.csv("subjects.csv", function(error, rows) { rows.foreach(function(r) { dataset.push({ label: r.label, counttotal: r.counttotal }) }); generatevis(); }); function generatevis(){ var h = dataset.length * 100; //7000; var w = 1000; dataset.sort(function(a,b) { return d3.descending(a.counttotal, b.counttotal);

servlets - Can we Communicate twice from HttpURLConnection request in java? -

i have client/server architecture , problem facing this. here client java program , connect using httpurlconnection , server servlet. once client make request servlet sends file through stream . , client download stream . process working fine . problem suppose if file not download in client , client has send message server send file again (i want happen without making new connection). how achieve in single request. can me in this. why dont write infinite while loop, keep connecting server until positive response. mean // create connection instance while(true){ try{ // connect server , file break; } catch (exception ){ // something} }

java - Action with no state variable -

is there way specify @upnpaction no associated @upnpstatevariable in cling?. tried like public class applicationexecutionserver { @upnpaction public void anaction() { // } } but got error saying action "anaction" not associated state variable. unfortunately, there no way have 'headless' action. can have inert variable. example, have service uses supposed string setter simulate action doesn't involve primitive state variable. @upnpstatevariable(defaultvalue="0", sendevents=false) private string clienthandshakedata = null; /** * "headless" action ephemeral/transient state variable. * @param handshakedata */ @upnpaction public void setclienthandshakedata(@upnpinputargument(name="newclienthandshakedatavalue")string handshakedata){ clienthandshakedata = handshakedata; processcurrenthandshakedata(); clienthandshakedata = null; } essentially 'clienthandshakedata' ephemera

ios - Query a xml file from a url -

in ios application project have string holds address , given url of xml file holds list of addresses , precinct locations so: <?xml version=”1.0” encoding=”utf-8”?> <root> <row> <res_street_address>448 ivy yokeley rd</res_street_address> <res_city_desc>winston-salem</res_city_desc> <state_cd>nc</state_cd> <zip_code>27101</zip_code> <precinct_desc>gumtree # 16</precinct_desc> </row> this file large , takes long time load in browser. job find precinct location given address in app. have been @ days , i’m @ wits end. i’ve found far leads me believe have download file first , parse it. file large , slow app down. there way can query on records in xml file , download results? i’ve tried https://thewebaddress/voter.xml/?res_street_address=”448 ivy yokely rd”&res_city_desc=”winston-salem”… but i’ve found isn’t way this. have little experi

javascript - jQuery.ajax() error with textStatus=error -

the jquery.ajax() function use works correctly of time. not returning data. instead error() function called. $.ajax({ [...] , error: function(jqxhr, textstatus, errorthrown) { console.log(jqxhr); console.log(textstatus); console.log(errorthrown); } }); i can see in there in cases textstatus 'error' , errorthrown '' (empty). the jquery documentation lists possible values of textstatus ( "timeout" , "error" , "abort" , , "parsererror" ). not describe, 'error' means. jqxhr returns object not seam reveal additional insights. how can investigate source issue is? found out happens, whenever reload pressed in browser, while ajax request still running. this post helped me implement solution.

android - How to reslove the appium crash? -

Image
i have installed appium 1.3.7 version in mac machine. i have started appium server android app in android device. in android device, app installed , opened successfully. i have clicked show inspector button , can able see inspector screen , appium inspector crashed. we using older version of appium 1.3.1 quite stable. maybe try reinstall of appium , if doesn't work go older version.

glut - print the text entered on keyboard onto the window created in opengl -

trying display characters typed on keyboard,i using following code. void mykey(unsigned char key, int x, int y) { if (key == 13) // enter key { return; } glrasterpos2f(xpos, 600); glcolor3f(0.0, 0.0, 1.0); // text color glutbitmapcharacter(glut_bitmap_times_roman_24, key); // print color glflush(); xpos += 15; player1[i] = key; += 1; } it prints text entered onto screen but, doesnt exit supposed when press enter. want the code display player name of player1 , store array exit when press enter , continue accept second player name. only opengl stuff in display callback. you need break text entry 2 pieces: keyboard/array handling in glutkeyboardfunc() callback. once you're done modifying name list post redisplay event. string rendering in glutdisplayfunc() callback, iterate on name vector , display each string. like so: #include <gl/freeglut.h> #include <sstream> #include <string> #include <vector> us

java - Restlet stop server after exactly one request is handled -

i want use restlet create local server. server should receive exaclty 1 request (besides favicon), , after request handled should shut down. don't want use system.exit , want shut down properly. as can see in code commented line when assume request handled properly. can't tell server stop there. how can tell server stop waiting requests @ point? got working 2 issues i'd solve. i exceptions when stop server within request the response sent client not shown if stop server within request public class main { public static void main(string[] args){ server serv = null; restlet restlet = new restlet() { @override public void handle(request request, response response) { if(!request.tostring().contains("favicon")){ system.out.println("do stuff"); response.setentity("request handled", mediatype.text_plain); //stop server after first request handled.

maven central search not see my library new version -

i deployed new version of library version 1.15 maven central. mean - can via gradle, can see in maven-metadata.xml last version set 1.15, , can see in browser in path https://repo1.maven.org/maven2/com/mycompany/malibrary/1.15 old versions however maven central search http://search.maven.org/ did not able find new version artefacts! show old versions (1.10 example) did miss something? been 2 weeks since release maven

asp.net - What is meant by httpruntime -

i asked question mean httpruntime , difference between httpruntime , httpmodules in interview i tried understanding , got these link still couldn't that. can give kind of simple definition know is. i new asp.net please me. as per msdn httpruntime httpruntime class—the entry point in pipeline. httpruntime object initializes number of internal objects carry request out. httpruntime creates context request , fills http information specific request. context represented instance of httpcontext class. httpmodules an http module assembly called on every request made application. http modules called part of asp.net request pipeline , have access life cycle events throughout request. http modules therefore give opportunity examine incoming requests , take action based on request. give opportunity examine outbound response , modify it. tl;dr - httpruntime responsible managing request via spawning object , carry response end user whereas httpmodule way intercept

python - Scrapy pipeline to export csv file in the right format -

Image
i made improvement according suggestion alexce below. need picture below. each row/line should 1 review: date, rating, review text , link. i need let item processor process each review of every page. takefirst() takes first review of page. 10 pages, have 10 lines/rows in picture below. spider code below: import scrapy amazon.items import amazonitem class amazonspider(scrapy.spider): name = "amazon" allowed_domains = ['amazon.co.uk'] start_urls = [ 'http://www.amazon.co.uk/product-reviews/b0042eu3a2/'.format(page) page in xrange(1,114) ] def parse(self, response): sel in response.xpath('//*[@id="productreviews"]//tr/td[1]'): item = amazonitem() item['rating'] = sel.xpath('div/div[2]/span[1]/span/@title').extract() item['date'] = sel.xpath('div/div[2]/span[2]/nobr/text()').extract() item['review'] = sel.xpath('div/div[6]/text()'