Posts

Showing posts from April, 2012

jquery - How to disable select based on other selected option? -

i have problem jquery function. want based on 1 selected option disable other select. in case, want disable select2 if option 1 select 1 chosen. use jquery function: $(document).ready(function(e) { $('.select1').change(function(e) { if ($('.select1').val()==1){ $('.select2').attr('disabled','disabled'); } else{ $('.select2').removeattr('disabled'); } }) }); but works if first select option 2(or other option form select) , reselect option 1(i suppose because use of change function). how disable select2 when default select1 set option 1??? $(document).ready(function(e) { if ($('.select1').val()==1){ $('.select2').attr('disabled','disabled'); } else{ $('.select2').removeattr('disabled'); } }) this wont work :/ it sounds want trigger 'change' event @ startup. $('.select1').trigger('change'); so,

libraries - Disable automatic slide. Library android-menudrawer -

i'm using library in project: android-manudrawer https://github.com/simonvt/android-menudrawer it works perfectly, problem english not good, , can not find way disable every x seconds, automatically slide. i guess parameter scroller class, can not understand code correctly. need disable automatic slide i appreciate help. regards what's undesired effect? when happen? can show code use work library? edit: the reason on method ( https://github.com/simonvt/android-menudrawer/blob/master/library/src/net/simonvt/menudrawer/menudrawer.java ) line 58: @override public void postonanimation(runnable action) { if (build.version.sdk_int >= build.version_codes.jelly_bean) { super.postonanimation(action); } else { postdelayed(action, animation_delay); } } i guess there should reason that. in case effect undesired can avoid calling commenting line 745, there's should reason why there , why there no option given user rid of it

java - Make-shift string boolean? -

i attempting create sort of settings system project creating, have hit of problem. i'm trying use string (considering these settings must later saved text file) make-shift boolean. so, need able switch string between true , false. assumed following method work, reason sets true regardless. is, far know, place in code variable set. i have no idea why following code shouldn't work, , i've done thorough searching no avail. if("true".equals(settings[0])) settings[0] = "false"; //this *always* skipped else if("false".equals(settings[0])) settings[0] = "true";` therefore, i've come here. convert string bool , inverse result. sample string[] settings = {"true"}; boolean settingbool = !boolean.parseboolean(settings[0]); system.out.println(settingbool); output: false

wordpress - Using Google Maps with Natural Earth Data Set in Fusion Tables -

i trying create plugin wordpress takes array of country names entered in post or page creation (much tags), , generates map using google maps apiv3 of countries highlighted (using polygon data natural earth data set), coming extremely short in area of finding resources regarding how merge these 2 technologies together. i pretty familiar google maps api , how manipulate within wordpress using php , variables provided post object, can't seem figure out how merge data provided in natural earth data set. i have stumbled on these, still can't figure out. country boundries using google map api v3 google maps v3: draw german state polygons? http://www.geocodezip.com/geoxml3_test/v3_fusiontables_query_sidebarf_local.html?country=germany the last link there close want do, except multiple countries matter of adding more poi's in form of countries. can't work on site. does know of tutorials on how this? or better yet, has done type of thing success? here's

c++ - How can I convert from a class with a 2D vector of chars to a 2D vector of another obj with a char variable? -

i'm still new apologies in advance if provide or not enough information problem. the run down this question isn't rogue game related question, little background of program does.. similar rogue game. ok, had class had member 2d char vector (the chars manipulated represent "dungeon"). worked seamlessly. wanted expand program decided create new class replace 2d vector of chars char visual representation of new class , other variables can stored along char. for simplistic sake, tried remove isn't necessary question. new class called tile - represents space being used dungeon level. tile has: a char variable called displaychar.. defaults ' ' changes represent contains (other variables..) the problems / poor guesses i'm not best @ understanding concepts of programming syntax/implementation, please don't judge. the way filled vector of chars, resized width of game board, , set ' ' since values chars i think need fill

c++ - iostream: no such file or directory -

Image
i working qt creator on windows vista. trying compile simple ".cpp" code includes standard c++ library "iostream", this: #include <iostream> using namespace std; int main(){ cout << "thanks"; return 0; } the problem comes before compiling code, comes when qt highlights library , acknowledge me (iostream: no such file or directory). it working fine couple of days ago, installed vs-express-2012 uninstalled because, surprisingly, not work windows vista. after removal of vs-2012, c++ libraries not seen qt creator more . note can still compile , run previous written codes command-line console, means c++ libraries haven't been removed removal of vs-2012!!. in addition, previous codes (within old projects created using same qt) has no such problem (i.e.: qt identifies , sees standard libraries), , can still compile , run them using qt creator, when create new ".cpp" file within old projects : .. however, when create new &qu

XCode not autogenerating Obj. C code from .h to .m source file -

i'm following nick kuh's book on how make iphone apps. i'm beginner. i'm on chapter 4. i'm stuck @ point clicked , dragged view view controller. program isn't autogenerating in .m source file (for example: not coming in .m source file @sythesize dealercard1, , on). i'm supposed write these in or should automatically me? thanks hello yes should have write these part. assuming using ui looking thing when dragged view controller? anyways in .h file need equivalent to @property (nonatomic, retain) iboutlet uiview *mydraggedview; and in .m file need @sythesize mydraggedview then need connect property view dragged onto controller. should google how there better tutorials can write right now. should hookup events objects in interface builder. anyways luck!

auto increment - Squeryl get value of serial -

i insert new row database , id auto-incremented ("serial"). how can value of id after insertion? currently, using following workaround: intransaction { schema.table.insert(new entry( content = "..." )) def entries = from(schema.table)(e => select(e) orderby(e.id desc)).page(0, 1) val id = entries.headoption match { case some(entry) => entry.id case none => 0 } } if there no easier way, how can ensure entire block atomic operation? yes, val new = schema.table.insert(myoriginalold) console println new.id

c++ - OpenGL vertex buffer objects on windows-how run it? qt windows -

i'm trying use vbo create terrain heightmap, don't know should include project or headers use. i'm using qt , os windows 7. when want use glgenbuffers(1, &vboid); throws error: "glgenbuffers not declared in scope" vbo not part of opengl core until specific version , on. can make cumbersome access it. developers use library glew resolve lookup of extensions vbo. another possibility use qt functionality, described here: http://entropologygames.wordpress.com/2009/10/31/howto-use-vertex-buffer-objectsvbo-with-opengl-qt/ in case suggest use qglbuffer (qt 4.7 , up), nicely encapsulates vbo functionality. http://qt-project.org/doc/qt-4.8/qglbuffer.html

css - How would you manage this layout with a CMS -

Image
these sort of layouts - horizontal aligned text , images lists, tend pretty popular on features pages of websites, ive designed 1 , coded up, come across mind when project handed on non technical person can edit text, set text / image alignment off. to fix need edit css, thats not suitable people. is there better way manage ? this html/css im using ive made jsfidlle if 1 wants play <div class="feature"> <p class="left">lorem ipsum dolor sit amet, consectetur adipisicing elit. sequi tempora eaque magni obcaecati quis @ corrupti perferendis eum magnam ipsum maiores quod fugit dolorum odio temporibus voluptate asperiores atque esse.</p> <img src="http://pictures-of-cats.org/wp-content/uploads/images/bengal-cat-ravi-w.jpg" width="200" height="200"/> </div> <div class="feature"> <p class="right">lorem ipsum dolor sit amet, consectetur adipisicing elit. s

sql server - PHP DBO - mssql - bigint as join in query -

i have php based site needs pull data mssql server hosted within intranet in office. have written sql pull data out , logically works perfectly. during testing on windows machine, code returns data require. but, when put same query php, using php dbo dblib, no return (ie false) indicates there syntax issues. answer simple questions, can connect no issues db, , many of other queries work (from same db, same table) specific slq doesn't seem work. upon further investigation have come realize there limitation 'php_mssql' in relation 'bigint' data types. had read on php.net , found this looks if there no predefined constant handle 8bit int's. just clarification, sql im trying run: select dbo.vehicle.vehicleid, dbo.vehicle.carnumber, dbo.driver.driverid, dbo.driver.drivernumber, dbo.driver.drivername, dbo.vehiclejobhistory.bookingid, dbo.vehiclejobhistory.pickupsuburb, dbo.vehiclejobhistory.destinationsuburb, dbo.vehiclejobhistory.reasondispatchedtocar,

ajax - Store Data from Field as a txt file on server (javascript) -

im trying upload plain text file server javascript form. when hit submit, need store text file on server translator program can read file. please see project , make sense link project can't submit form holding text value , generate text file on server?

php - A for loop not doing as expected -

i running loop , attempting enter data array. when run print_r of array, it's if loop running once when should running multiple times! for($i=0; $i<count($count); $i++){ $currentfield = $array[$i]; $test = "".$field."[".$i."]"; $this->_postdata[$test] = $currentfield; $this->_currentitems[$i] = $test; } print_r($this->_currentitems); die(); if echo $count before, says 3 (for example) still when print array, has 1 value! ideas? thanks. try for($i=0; $i<$count; $i++)

larger map marker in Overlay -

how add larger map marker image overlay? i'm using kmllayer , icon url inside kml file. google maps appears scale down when link larger icon. i tried inside kml didn't have effect on size of image or else overriding it. i believe forces 32x32, need 1 @ least twice touch screen/kiosk app. icon 64x64. thanks, don using geoxml3 , kmz branch, icons displayed full size (if change <scale>0</scale> <scale>1</scale> . http://www.geocodezip.com/geoxml3_test/v3_geoxml3_kmztest_linktob.html?filename=http://www.geocodezip.com/geoxml3_test/doubletaketech_net_rigsb.kml geoxml3 parses kml in client , renders markers native google maps api v3 markers. large numbers, kmllayer better option, rendered tiles, doesn't seem render markers @ native size, , doesn't support scale tag it looks have <hotspot> defined incorrectly: http://www.geocodezip.com/geoxml3_test/v3_geoxml3_kmztest_linktob.html?filename=http://www.geocodezip.com/g

vb.net sendkeys to specific active application -

i done on making sendkeys application me make life easier, im annoy when switch windows , forgot switch off sendskeys, example, application send "123123" notepad (current active application) until stop it, when switch msword not work, if switch again notepad sendkeys again, possible? life if there argument if activewindows = notepad.exe else nothing end if it's idea dont know how make in vb.net, , want use .exe instead of title of application cause think it's fitting im doing. thx in advance yes, should work, idea. did far read numlock key. long on, timer sendkeys firing. turned off, timer stopped well. adding check current focus nice addition. what methods use, please check this, think fits how find program current focus?

mysql - convert string time to datetime format in php -

i have been given export of data client has on 1million records in it. i have written script reads data array , can import of data mysql database, struggling 1 issue. there 4 columns in db export have been given dates. unfortunatly formatted in words eg "mar 31 2013 01:04:47:687am" im after php script converts "mar 31 2013 01:04:47:687am" "0000-00-00 00:00:00" (yyyy-mm-dd hh:mm:ss) any ideas or suggestions? i believe string t time can handle format, following work: $formatteddatestr = date( "y-m-d h:i:s", strtotime( "mar 31 2013 01:04:47:687am" ), ); http://php.net/manual/en/function.strtotime.php

c# - How do I make my XNA game fullscreen while maintaining aspect ratio and centered? -

i haven't been able find tutorials making game fullscreen while maintaining aspect ratio. it's bit difficult me describe in words, i'll show in 2 pictures. what have: https://dl.dropbox.com/u/51911679/pictures/whocares/screenshots/whatigot.jpg what want: https://dl.dropbox.com/u/51911679/pictures/whocares/screenshots/whatiwant.jpg the graphicsdevicemanager class can handle of you: public game1() { graphics = new graphicsdevicemanager(this); graphics.isfullscreen = true; graphics.preferredbackbufferwidth = 1280; graphics.preferredbackbufferheight = 720; //... } now, have make sure you're drawing whole screen in spritebatch coordinates (base them on width & height).

Python - Building a dynamic sql query with `-` as a range -

i've done searching , thought i'd ask before trying reinvent wheel. i'm looking build sql query unknown number of parameters. parameters of type int, item numbers. the user can input many items like, in form 1, 2, 3-10, 12 i need build sql style query (actually arcpy) return these values field item. i can pull these list such mylist = [1,2,3,4,5,6,7,8,9,10,11,12] but need build query, i'm guess like item = 1 or item = 2 or ...... thanks much jon simply can way, user_input = '1, 2, 3-10, 12' data = [item item in user_input.split(', ')] result = [] d in data: if '-' in d: result.extend(range(int(d.partition('-')[0], int(d.partition('-')[2])+2)) else: result.append(int(d)) check result is, >>> result [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12] query it, 'select * table id in (%s)' % ','.join(str(item) item in result)

php - getting error when trying to save user Select data -

i trying save state user select after 'post' form action runs on same page, keep getting unexpected t_is_equal, expecting '}' error. missing? i have following code: <select style='width:50px; float:left; position:relative; left:-160px; top:2px; border-radius:3px; ' project='statelist' class='statelist' name='statelist'> $state = array( 'az','al','ak','ar', 'ca','co', 'ct','de','dc','fl', 'ga', 'hi','id','il', 'in','ia','ks','ky','la','me','mt','nv','nh','nj','nm','ny','nc', 'nd','oh', 'ok', 'or', 'md','ma', 'mi','mn','ms', 'mo','pa', 'ri', 'sc','sd','tn', 'tx', 'ut', 'vt

javascript - Can't set customized property on objects -

i'm trying define customized property called userdata , objects location.hash, doesn't work, got false, false 2 alert calls. object.defineproperty(object.prototype, "userdata", { value: false, writable: true, enumerable: true, configurable: true }); alert (location.hash.userdata); location.hash.userdata = true; alert (location.hash.userdata); is immutable? if define own object, i.e var = {}; a.userdata = true; it set correctly, couldn't why former example doesn't work it's normal first alert gives false since default value userdata false . however, location.hash.userdata = true; not work because when treat location.hash primitive string object using dot notation, wrap primitive value in string primitive wrapper , wrapper object discarded after, it's same doing new string(location.hash).userdata = true; since cannot location.hash = ne

How to take screenshot in android emulator -

from android 4.0, supports volumn down+power key take screenshot , saved in gallery. how in android emulator. i know in eclipse, there 'take screenshot' button, not want. need in emulator , saved in emulator. as seen in post: screenshot of nexus 1 adb? , can take screenshot using adb: adb shell /system/bin/screencap -p /sdcard/screenshot.png adb pull /sdcard/screenshot.png screenshot.png

Access violation reading location 0xC0000005 C++ -

my add function has problem dereferencing first , first pointing nothing because of that. don't know how fix isn't null pointer. struct node { int data; node *next; }; class linkedlist { node *first; node *last; int count; public: linkedlist() { first = null; last = null; count = 0; } void add(int item) { if (first == null) { first->data = item; last->data = item; last->next = null; first->next = last; count = 1; } else { node *newnode = new node; newnode->data = last->data; newnode->next = last; last->data = item; last->next = null; count ++; } }

winapi - Create a window act like system default menu? -

Image
i created window in main window. when new window shows, main window lose focus , deactivate. so frame of main window not activated, following picture shown: while activated main window should this: the problem need keep main window activated while create , show new window, resemble system menu window. how this? maybe sw_showna/swp_noactivate new window ?

java - Has anyone figured out how to make a javafx tableview act like a jtable? -

i followed example 13-11 alternative solution of cell editing offical tableview tutorial , want tableview act jtable . means when cell gets focus, ready edited, , using arrow keys or enter key should instantly commit edit , move next cell. this i've gone far: first, added table.getselectionmodel().setcellselectionenabled(true); then tried modify class editingcell : class editingcell extends tablecell<person, string> { private textfield textfield; public editingcell() { } @override public void updateselected(boolean selected) { super.updateselected(selected); if (selected) { createtextfield(); settext(null); setgraphic(textfield); textfield.requestfocus(); textfield.selectall(); } else { string value = textfield.gettext(); if (value != null) { commitedit(value); } else { commitedit(null);

sql server - INSERT INTO/SELECT ONLY INSERTS ONE ROW -

i having problem sql insert into/select. insert tblpmhistory(relequipmentid,dtethispmdue,strcampus,strroom) (select intequipmentid,dtepmdatenextdue,strcampus,strroom tblequipment dtepmdatenextdue between getdate() , dateadd("day",21,getdate())) it seems insert 1 row new table, when run select part of statement on own, comes 84 rows. i not sure if there limiting bulk insert or not appreciated. the code create pmhistory table follows: create table tblpmhistory( intpmhistoryid int not null primary key identity, relequipmentid int not null foreign key references tblequipment(intequipmentid), strdescription varchar(64) default 'preventative maintenance', dtethispmdue datetime, ysnpmdone bit default '0', ysnpmconvertedtojob bit default '0', intrelatedjobnumber int default '0', strcampus varchar(30), strroom varchar(30)) create unique nonclustered index [ix_pmhistory_dtethispmdue] on tblpmhistory( dtethispmdue) (ignore_dup_ke

javascript - Preventing editing a row in kendo grid? -

i using kendo grid , while editing row checking whther row editable or not.so how make selected row non editable if not editable.i doing checking in edit function of grid. code $("#grid").kendogrid({ datasource : ds, selectable : "multiple", sortable : true, filterable : false, reorderable: true, scrollable : false, toolbar : ["create"], columns: [ { field: "event", width: "120px", title: "event type"}, { field: "event_id", width: "120px", title: "event id"}, { field: "addr_no_or_type", width: "120px", title:"address"}, { field: "event_rate", width: "100px", title: "rate"}, { field: "sched_date", width: "100px", title: "scheduled"}, { field: "complete_date", w

extjs - How to achieve Live Search/Filtering on Multiple Fields in the Grid using Ext.Js? -

i have done live search on grid. searching based on column mentioned filter code. need filter grid records based on multiple column search. in below code searches name column because mentioned name filed in filter code. not getting how achieve multiple column value search? can 1 tell me how achieve? great appreciated. thank . grid code here: { xtype: 'gridpanel', flex: 2, hidden: false, store: store, loadmask: true, id: 'grid', columns: [ {id:'id',header: 'id', width: 100, sortable: true, dataindex: 'id'}, {header: 'name', width: 150, dataindex: 'name'}, {header: 'position', width: 150, dataindex: 'position'}, {header: 'ambition', width: 250, dataindex: 'ambition'} ],

java - jqwicket PrettyPopin Modal doesn't return for parent page after submit -

in wicket web page i'm using listview display objects , in each line of component there link open prettypopin modal window edit object. the problem on submit event modal window doesn't returns parent or original page , reloaded. first showed parent page code class objlistpanel(pageorigin: pagebase/*webpage*/) extends panel("objlistpanel") serializable { add(new listview[obj]("listobj", listdata) { def populateitem(item: listitem[obj]) = { item.add(new linkedit("edit", obj)) } }) var editobjwinmodal = new modalwindow("modaleditobj") editobjwinmodal.setpagemapname("modaleditobj") editobjwinmodal.setwindowclosedcallback(new modalwindow.windowclosedcallback() { def onclose(target: ajaxrequesttarget) = setresponsepage(pageorigin) }) add(editobjwinmodal) private class linkedit(id: string, obj: obj) extends link[string](id) { add(new label("label", new model[string]() {

c# 4.0 - The process cannot access the file 'C:\Photo.jpg' because it is being used by another process -

i m trying resize uploaded image , save in particular location replacing existing file. gives me error saying "the process cannot access file 'c:\photo.jpg' because being used process." here code. private void llblchangeplayerpicture_linkclicked(object sender, linklabellinkclickedeventargs e) { ofdplayerpicture.reset(); ofdplayerpicture.filter = "jpeg(*.jpeg,*.jpg)|*.jpeg;*.jpg|bitmap (*.bmp)| *.bmp |pngs(*.png)|*.png"; ofdplayerpicture.showdialog(); image newimage; if (ofdplayerpicture.filename != "") { pboplayerpicture.image = null; pboplayerpicture.imagelocation = null; newimage = resize(image.fromfile(ofdplayerpicture.filename), new size(250, 100)); savejpeg(program.playerimagepath + regno + "\\photo1.jpg", newimage, 100); } here sav

vb.net - Issues in combobox selection -

i new vba excel , have been successful in putting conditional combobox dependent on drop down list selection, problem facing whenever click on item in combobox ,it not appear in box after click. can please me in solving problem. thank you the code used : private sub combobox1_dropbuttonclick() combobox1.clear if worksheets("sheet1").cells(2, 1).value = "phe" combobox1 row = 1 1300 .additem sheets("sheet2").cells(row, 6) next row end end if if worksheets("sheet1").cells(2, 1).value = "hss" combobox1 row = 2 56 .additem sheets("sheet2").cells(row, 8) next row end end if if worksheets("sheet1").cells(2, 1).value = "decanter" combobox1 row = 3 249 .additem sheets("sheet2").cells(row, 9) next row end end if end sub if able somehow interpret value selected, perhaps reset value of combobox. applies if value being selected properly, not visible in combobox. combobox1.v

Grails Spring Security Core Plugin :authentication not required for controller -

i have grails 2.0.4 spring-security-core:1.2.7.3 i want expose controller web service. (this methods called php application out side domain) example controller : def getanimaljson(){ def animallist = animal.list() render "${params.callback}(${animallist json})" } if logged in grails application, method call successful php application when logged out fails. i want controller not checked spring securitycore.. thanks helping .. without annotation should allowed. did annotate @ controller level? or using requestmaps or config.groovy map? if you're using annotations can add method @secured('permitall') and won't guarded. same thing requestmap or in config.groovy if you're using different approach.

java - String Switch Statement -

Image
i developing java class. can please have in using switch statement string data type. here code: string teststring = "nut"; switch (teststring) { case "nut": if(nutcount < nutmaxcount) nutcount += 1; break; case "caramel": if(caramelcount < caramelmaxcount) caramelcount += 1; break; case "chocolate": if(chocolatecount < chocolatemaxcount) chocolatecount += 1; break; case "marzipan": if(marzipancount < marzipanmaxcount) marzipancount += 1; break; } this error getting: incompatable types - found java.lang.string expected int. this link lead java 7: http://www.oracle.com/technetwork/java/javase/downloads/index.html you require java 7, can use strings in switch statement. wh

visual studio - Is there a way to recover erased code in a source-controlled project(TFS)? -

Image
i'm working on project in visual studio 2012, that's hosted on tfs.any way, don't know if it's due lack of sleep or sheer carelessness, when trying move 1 large function body 1 file another, copied declaration new file, forgot copy body , erased body old one, clicked save reflex , closed first .cpp file, when pasted in second one, surprised pasted declaration , not definition.undo pending changes undo 'add' alltogether.is there way retrieve lost source or should start rewriting asap?because spend quite while writing it. view history of file. right click >> source control >> view history, below: this assumes you've checked in @ point.

c# - Update specific cell of excel file using oledb -

i want update specific cell of excel file using oledb. i7 cell, reason i1 getting updated. can tell me what's wrong code? oledbconnection oledbconn = new oledbconnection(connstring); oledbconn.open(); // want set value of i7 cell 22, reason value i1 getting updated :( oledbcommand cmd = new oledbcommand("update [" + sheetname + "$i7:i7] set f1=22", oledbconn); int result = cmd.executenonquery(); console.writeline(result); oledbconn.close(); this may purely issue cell address scheme you're using. try $i$7:$i$7 intsead. also, f1 thing in query?

extjs4.1 - Develop Application using extjs -

recently company asked me gather knowledge in extjs. have seen lot of examples sencha but, when want develop applications using extjs should do? want dive building application using extjs. please give me link. there's bit of learning curve ext, best place start mvc application tutorial , reading application documentation: tutorials: ext mvc intro app architecture pt 1 app architecture pt 2 app architecture pt 3 documentation: app documentation in addition, make sure understanding of how event system works in extjs core of how wiring components works. have @ base observable class detailed information - components can fire events inherit class. speaking, documentation friend in ext though. one thing did while learning ext read on jay garcia's book extjs in action . no means teach need know, gives overview of ext capable of , common usage patterns.

performing different functionality on modelform buttons django -

i have modelform 2 buttons , want perform different functionality on them. modelform: class jobpostform(modelform): class meta: model = jobpost fields = ('job_title','job_type','job_location','job_description','start_date','end_date','country','how_to_apply') widgets = { 'job_type':radioselect(), 'job_location':textinput(attrs={'size':'70'}), 'job_description':textarea(attrs={'cols':200, 'rows':10}), 'start_date':textinput(attrs={ 'class': 'datepicker', 'data-date-format': 'mm/dd/yyyy', }), 'end_date':textinput(attrs={ 'class': 'datepicker', 'data-date-format': 'mm/dd/yyyy', }), } def __init__(self, *arg

c# - How to Draw Arc In windows phone 7 in canvas in Runtime? -

Image
the challenge have make canvas object in runtime windows phone 7. , add arc on , startpoint , 1 end point . have tried code pathgeometry pathgeometry = new pathgeometry(); pathfigure figure = new pathfigure(); figure.startpoint = new point(150, 200); figure.segments.add( new arcsegment( new point(300, 200), new size(700, 100), 90, false, sweepdirection.clockwise, true ) ); pathgeometry.figures.add(figure); path path = new path(); path.data = pathgeometry; path.fill = brushes.pink; path.stroke = brushes.green; now have add arc on canvas not take arguments . there other way . stuck . well guess arc means type of figure, to draw arc, had used code , works fine me , quite similar code also, hope helps .. pathfigure pthfigure1 = new pathfigure(); pthfigure1.startpoint = new point(50, 60);// starting cordinates of arcs arcsegment arcseg1 = new arcsegment(); arcseg1.point = new point(100,

php - Zend Framework 2 - ZFCUser - How to exclude landing page from auth -

i'm using zf2 in combination zfcuser , bjyauthorize . have landing page should globally accessable. other pages need behind login. at first blamed bjyauthorize not letting guest users access landing page. after discussions seems zfcuser blocking way. my question is: how can tell zfcuser not block 1 page/action? edit: my application/module.php looks in this post . when add app myapp whitlist, can access landing page other actions myapp well. any ideas how alter condition can match url or whitlist frontend-action? maybe add second route landing page. that's not clean solution, right? if insist on checking authentication in onboostrap method this: class module { protected $whitelist = array( 'zfcuser/login' => array('login'), 'your-landing-route' => array('your-landing-action'), ); public function onbootstrap($e) { $app = $e->getapplication(); $em = $app-&g

xml - Consuming SAP web service via .net -

i pretty new web service fighting strange behavior. after have imported wsdl xml file via vs2010 these unrecognized policy assertions. wsdl file created sap team, not sure did. when ignoring these commets try consume web service expections: the provided uri scheme 'https' invalid; expected 'http'. i know errormessage means have different transport logic uri defines, not sure if should or renew wsdl file. <system.servicemodel> <bindings> <custombinding> <binding name="binding"> <!-- wsdlimporter encountered unrecognized policy assertions in servicedescription 'urn:sap-com:document:sap:soap:functions:mc-style': --> <!-- <wsdl:binding name='binding'> --> <!-- <saptrnbnd:optimizedxmltransfer xmlns:saptrnbnd="http://www.sap.com/webas/710/soap/features/transportbinding/">..</saptrnbnd:optimizedxmltransfer>

linux - piping with make dosen't work -

i'm quite new make, , tried create phony target print targets: .phony: help: $(make) --print-data-base --question | \ $(awk) '/^[^.%][-a-za-z0-9_]*:/ { print substr($$1, 1, length($$1)-1) }' | \ $(sort) | \ $(pr) --omit-pagination --width=80 --columns=4 the code taken here (page 20). when run make help following: make --print-data-base --question | \ '/^[^.%][-a-za-z0-9_]*:/ { print substr($1, 1, length($1)-1) }' | \ | \ --omit-pagination --width=80 --columns=4 /bin/sh: 3: syntax error: "|" unexpected make: *** [help] error 2 what's wrong , how can fix it? i'm working on linux mint, make 3.81 built i686-pc-linux-gnu. it looks $(awk) , $(sort) , , $(pr) expanding empty string, means no such variables defined in makefile.

sql - How to extract element-path from XMLType Node? -

i have select statement on xml document , 1 column should return me path of each node . for example, given data select * table(xmlsequence( xmltype('<?xml version="1.0"?> <users><user><name>user1</name></user> <user><name>user2</name></user> <group> <user><name>user3</name></user> </group> <user><name>user4</name></user> </users>').extract('/*//*[text()]'))) t; which results in column_value -------- <user><name>user1</name></user> <user><name>user2</name></user> <user><name>user3</name></user> <user><name>user4</name></user> i'd have result this: path value ------------------------ -------------- /users/user/name user1 /users/

c# - How to abstract a field in the Select list of a Linq query? -

i have calculated field regularly want return in "select" fields of linq query, e.g. customer order total year, along other demographic info of customer. public class customer { public decimal totalpurchasesthisyear(mydatacontext db) { return db.orders.where(o => o.customerid == id) .sum(o => o.ordertotalamt); } } public class somereport { public void getcustomerinfobysalesperson(long salespersonid) { using (var db = new mydatacontext()) { var q = db.customers.where(c => c.salespersonid == salespersonid) .select(c => new { c.name, c.address, thisyearpurchases = c.totalpurchasesthisyear(db) }) .tolist(); // etc.. } } } obviously, doesn't work, because totalpurchasesthisyear has no sql translation. inside have sql translation. don't want include code directly in query, because i'm doing same calculation in lots of places. gut tells me shou

objective c - UITableView custom begin and end updates animation -

i have uitableview , want customize animation duration of begin , end update. if 0.2 want make 0.5. [tbl beginupdates]; [tbl reloadrowsatindexpaths:indexpaths withrowanimation:uitableviewrowanimationright]; [tbl endupdates]; above lines animation duration needs slow me.

mysql - Selecting all rows from one table where condition in joined table -

i have products table , productionreport table in database. the productionreport table captures weekly production information each product. app report on information. table structures productionreport productionreportid, productid, date, qty 1, 1, 2013-04-08, 50 2, 2, 2013-04-08, 12 products productid, productname 1, skin cream 2, peanut oil 3, bath salts 4, shampoo my page uses gridview list products ( select productid, productname products ) , join in productionreport table display list of products , production values week user can update. my problem sql query populate gridview. gets rows there joined value in both tables: select pro.productname, pr.productionreportid, ifnull(pr.qty, 0) qty products pro left join productionreport pr on pro.productid = pr.productid date(pr.date) = '2013-04-08' so, given above described data, i'm expecting following resultset skin cream, 1, 50 peanut oil, 2, 12 bath salts, 0,

iphone - Getting System.InvalidOperationException: Request format is invalid: multipart/form-data error while upload image(data) via AFNetworking -

i following tutorial upload image (data) via afnetworking. have done nsurl *url = [nsurl urlwithstring:@"http://184.154.0.24"]; afhttpclient *httpclient = [[afhttpclient alloc] initwithbaseurl:url]; // nsmutabledictionary* _params = [[nsmutabledictionary alloc] init]; // [_params setobject:multimdata forkey:@"bytes"]; // [_params setobject:name forkey:@"userid"]; // [_params setobject:@"hello" forkey:@"filename"]; // [_params setobject:@"png" forkey:@"contenttype"]; // [httpclient registerhttpoperationclass:[afjsonrequestoperation class]]; nsmutableurlrequest *request = [httpclient multipartformrequestwithmethod:@"post" path:@"/iphonevideoservice/webservice.asmx/getstringdata" parameters:nil constructingbodywithblock: ^(id <afmultipartformdata>formdata) { [formdata appendpartwithfiledata:multimdata name:@"stringreturn" filename:@"stringreturn.pn

jquery - What are the differences between using .first() and .eq(0)? -

this question has answer here: are jquery's :first , :eq(0) selectors functionally equivalent? 3 answers what difference between using these 2 methods retrieving first element in collection? taken live source code of jquery 1.7.1: ,first:function(){return this.eq(0)},last:function(){return this.eq(-1)} so suspected .first() wrapper calling .eq() . conclusion: no difference whatsoever. :)

c - net_ntoa, struct sockaddr_in and pointer cast -

for third line in following snippet: char cli_ip[20]; struct sockaddr cliaddr; ....... memcpy(cli_ip, inet_ntoa(((struct sockaddr_in *)cliaddr)->sin_addr), 20); i got errors: udp_receiver.c:96:41: error: cannot convert pointer type udp_receiver.c:96:41: warning: passing argument 2 of ‘memcpy’ makes pointer integer without cast [enabled default] /usr/include/string.h:44:14: note: expected ‘const void * restrict ’ argument of type ‘int’ what reason this? have included headers appropriately? man of inet_ntoa suggests following include #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> it might case compiler not find prototype of inet_ntoa , assumes returns int , gives warning in memcpy .

perl - ensembl API get 3'UTR from list of stable id -

i want sequence of 3'utr list of genes using ensembl api. below script returns first hit , stuck, ie. can not iterate each entry of table. explain why not work? my $registry = 'bio::ensembl::registry'; $registry->load_registry_from_db( -host => 'ensembldb.ensembl.org', # alternatively 'useastdb.ensembl.org' -user => 'anonymous' ); $specie = 'danio rerio'; $transcript_adaptor= $registry->get_adaptor($specie,'core','transcript') or die "error 1 $!\n"; $geneinput= 'gene_test.txt'; open (file, "$geneinput"); @data= <file>; close file; foreach $line ( @data) # stdin ensembl gene identifier { $line=~s/ //g; $line=~s/\t//g; $ line=~s/\n//g; $transcript = $transcript_adaptor->fetch_by_stable_id($line); $name = $transcript->display_id; $n3utr = $transcript->three_prime_utr; $n3utrseq = $n3utr->seq(); print "$name$n3utrseq"; } exit;

Cassandra column family bigger than nodes drive space -

i want start cassandra cluster (eg. 3 nodes), , application has 1 column family. after reading documentation, understood how cassandra replicates 1 column family across multiple nodes. for eg. every node has 2tb drive space , column family replicated on every node every node contains full copy of it. what happens if after years column family exceed 2tb , not have posibility increase drive space? if add more 10 nodes, want column family splitted parts , stored on different drives on nodes, can increase infinite size. if understood correctly, column family limited smallest drive space in cluster? the scenario describe case when data replicated nodes. configure setting replication factor (rf) number of nodes. however, rf can less number of nodes , not need scale if add more nodes. for example, if today had 3 nodes rf 3, each node contain copy of data, say. if add 3 more nodes , keep rf @ 3, each node have half data. can keep adding more nodes each node contains

ArcGIS Server and F5 -

have 1 luck f5 , arcgis server 9.3.1. how can f5 understand service in arcgis server not available (there response if service not available). f5 never knows services deals som not soc, needs spatial confguration in f5 so. not sure how in f5 can know can it.

javascript - filter out which span to update -

Image
i have following div collection in html. it's designed dynamically replicate according user interaction. <div class="bill-item"> <!-- section single item --> <div class="bill-item-img"> <!-- section item pic --> </div> <div class="bill-item-description"> <!-- section item description , pricing --> <div class="bill-item-name"> <p class="bill-item-name-left">normal cofee</p><p class="bill-item-name-right">170.00</p> <div class="clear"></div> </div> <div class="bill-item-price"> <span>170.00 usd</span> </div> <div class="bill-item-amount"> <span>2</span> </div> </div> <div class="bill-amount-selection"> <!-- section increment & decrement of item amount goes --> <a class="amount-increase" href="#"