Posts

Showing posts from March, 2015

(iPhone SDK) How to modify UIButton by tag id? -

i've created group of buttons follows: nsstring *nameimg; uibutton *button; for(int i=1;i<=144;i++){ button = [[uibutton alloc] initwithframe:cgrectmake(posx, posy, 43, 43)]; nameimg = [nsstring stringwithformat:@"img%i.png",i]; [button setbackgroundimage:[uiimage imagenamed:nameimg] forstate:(uicontrolstate)normal]; button.tag = i; [scrollview addsubview:button]; posx += 55; if (i % 4 == 0){ posy += 55; posx = 15; } } how can modify button getting tag? it's possible following line? [button.tagid settitle:@"hello"]; i don't want listener method, want modify button identifying tag. thanks in advance [(uibutton*)[scrollview viewwithtag:tagid] settitle:@"hello" forstate:uicontrolstatenormal];

.net - Where I can find the source code for the SharpRobo testing tool? -

this tool being developed thoughtworks few years ago, discontinued. heard , interested in potentially picking pieces. it described as: functional testing , recording tool windows forms applications. sharprobo supports standard winforms controls. records tests in fit format can played using fit (file or directory runner).

free form wordpress -

i have voucher distribute electronically , people complete form on wordpress site , when click submit, receive e-mail voucher. is there plugin out there that? if there not, how accomplish this? use contact form 7 plugin: http://wordpress.org/extend/plugins/contact-form-7/

javascript - Track scrubbing in webkit controller based on time control is clicked and held? -

what i'm trying accomplish track scrubbing in webkit controller. i'd set onclick function skip forward or when appropriate directional button clicked, scrub backwards or forwards if control clicked , held. however, i'm thoroughly stuck on js necessary not differentiate clicks , click holds measure time held. once time held determined, should simple setting time itunes.playerposition +/- clicktime for onclick event, use settimeout determine difference between clicking , clicking , holding? also, how measure time held using javascript? i apologize vagueness of question, i'm bit new js , can provide hugely, hugely appreciated. if more details needed, best provide them. i'm not sure onclick, i'd use onmousedown , onmouseup. set time onmousedown dragging has started, , check flagged time onmouseup.

C++ Class Copy (pointer copy) -

it understanding when make copy of class defines pointer variable, pointer copied, data pointer pointing not. my question is: 1 assume "pointer copy" in case instantiating new pointer (dynamic memory allocation) of same type? eg., new pointer new allocation containing arbitrary memory address , 1 should take care point new pointer appropriate memory address? i presume there quite simple answer question, , apologize trivial nature, trying understand pointers @ deeper level , came upon researching pointers on internet. regards, chad the pointer copied value - both classes point same original memory, no new allocation takes place. shallow copy - language default. if need allocate new memory , make copy of data have in copy constructor. deep copy - have yourself edit: 1 of advantages of c++, free decide how copying works. might copy of object read access memory can avoid cost of copying memory. can implement classes make copy of original data if new obj...

controller - Magento - Query for Product Options -

i want write controller finds different options given product (eg. large, medium, small, red, blue etc...). can show me code write controller? additional details i'm getting closer, still can't figure out. here's code wrote in controller $db = mage::getmodel('catalog/product')->load($productid); print_r($db->getoptions()); // returns empty array echo $db->gethasoptions(); // echos 1 but when print_r() on second line, getoptions returns empty array. third line echo's value 1, means there should options. additional details tried clockworkgeek's solution of $db->getproductoptions() , returned nothing. tried $db->getproductoptionscollection() , , got output array ( [totalrecords] => 0 [items] => array ( ) ) what's wrong code such not returning allowable product options? instead of getoptions() please try getcustomoptions() or getproductoptionscollection() or getproductoptions...

javascript - On propertychange issues with text value -

i have application put alert code when insert in machine 1 dollar value="" changes 1 text input shows number tried make alert on propertychange mean: when text value > = 1 shows alert telling value changed 1 or 2 3 4 show me alert when 0 , 1 want > = 1 i'm doing wrong? basically, want show alert when value changes number bigger or equal 1 here javascript: <script type="text/javascript"> function init () { var textarea = document.getelementbyid ("textarea"); if (textarea.addeventlistener) { // firefox, opera, google chrome , safari textarea.addeventlistener ('textinput', ontextinput, false); // google chrome , safari } } // google chrome , safari function ontextinput (event) { alert ("the following text has been entered: " + event.data); } // firefox, google chrome, opera, safari version 5 function oninput (event) { ale...

Rails 3 Devise or Authlogic - Production Env Mysteriously Can't See Gem? Works on Dev -

this problem easy solve somehow cannot find solution. this happens both authlogic , devise. have been banging head against wall long ripped out authlogic , restarted devise -- experience same problem. on dev fine. however, when production, whenever try rake db:seed or run console. shows me restarting server , gemfile. why can't production see gem? seems able see other gems fine. the gem see github version -- recommended fix not work me. same result default version, , forcing specific version. the fact both authlogic , devise have same problem seems indicate there problem config on production? other gemfile? dev - rails 3.0.4, 1.9.2p136 prod - rails 3.0.4, 1.9.2p0 last resort upgrading ruby match, doubt problem , lot of work reasons won't go here. ops@lightserve2:/home/proj/current$ touch tmp/restart.txt ops@lightserve2:/home/proj/current$ r c /home/darkserve/releases/20110217175218/config/initializers/devise.rb:3:in `<top (required)>': un...

python - How to clean up after subprocess.Popen? -

i have long-running python script perl worker subprocess. data sent in , out of child proc through stdin , stdout. periodically, child must restarted. unfortunately, after while of running, runs out of files ('too many open files'). lsof shows many remaining open pipes. what's proper way clean after popen'd process? here's i'm doing right now: def start_helper(self): # spawn perl helper cwd = os.path.dirname(__file__) if not cwd: cwd = '.' self.subp = subprocess.popen(['perl', 'theperlthing.pl'], shell=false, cwd=cwd, stdin=subprocess.pipe, stdout=subprocess.pipe, bufsize=1, env=perl_env) def restart_helper(self): # clean if self.subp.stdin: self.subp.stdin.close() if self.subp.stdout: self.subp.stdout.close() if self.subp.stderr: self.subp.stderr.close() # kill try: self.subp.k...

validation - XML not validating? -

never worked xml before, how come isn't validating: http://test.ipalaces.org/palnfo/template.xml with w3schools error: object # has no method 'load' you're using chrome, aren't you? xml fine; w3schools validator not. consider using different online validator, or installing 1 locally. may find you've got basic 1 installed somewhere already, depending on os (xmllint came pre-installed on mac, example.) incidentally, you're not "validating", technically, rather checking "well-formedness". validate you'd need dtd or xsd.

gwt rpc - GWT RPC serialization and circular references - chicken and egg problem -

i'm using gwt 2.1.1 , client-server communication using asyncservice (not requestfactory). have object returns "fund" object. fund has reference "distributor" object has collection of "fund" objects. in 1 scenario, i'm returning server, fund "foo" who's distributor reference has "foo", "bar" , "joe" funds. common business scenario. when deserializing on client side, error because "foo" reference in collection of funds in distributor ends no values populated. in particular, fund-id (string) not populated , used in hashcode implementation. during client-side deserialization, "bar" , "joe" funds deserialized properly, foo fails, i.e., gets deserialized few properties. what going on here when "foo" getting deserialized, has few properties deserialized , gwt attempts deserialize distributor. foo's fund-id property has not yet been deserialized. when distribut...

jQuery Click Cell to Change into Text Box -

i have been looking on google , stackoverflow haven't been able find i'm after of yet. if point me in right direction great. what have table 5 rows <tr> <th scope="row" class="table-check-cell"><input type="checkbox" name="selected[]" id="table-selected-1" value="1"></th> <td>123456</td> <td>address 1</td> <td>10th feb 2011 (10:43am)</td> <td><ul class="keywords"> <li class="pink-keyword">awaiting reply</li> <li class="purple-keyword">direct</li> </ul> </td> <td>(notes text)</td> <td>1</td> <td class="table-actions"> <a href="#" title="view" class="with-tip"><img src="images/magnifier.png" width="16" height=...

vba - Need help adding an custom object to a custom collection -

lets have custom collection , custom object have parent-child relationship i have userform user names collection , provides input other properties of collection. when click "add parent" click event handled , calls following function: public function addparent() dim newparent clsparent set newparent = new clsparent 'add parent properties' frmaddparent newparent.name = .cboparentname.value newparent.width = .txtparentwidth.value newparent.xslope = .txtparentcrossslope.value end 'show form creating child object' frmaddlanematerial.show end function the user sees new form creating child object. when user clicks "add child" event handled , calls following function: public function addchild() dim newchild clschild set newchild = new clschild 'add child properties' frmaddchild newchild.name = .cboparentname.value ...

actionscript 3 - Flash: making an interactable image -

im trying figure out how take image , make interactable in different parts. image bunch of arrows make circle, and, want happen when particular arrow hovered on enlarges arrows , hovers on 2 adjacent arrows. i imported image illustrator flash onto single frame , made each arrow button, down image enlarged version, appears images on separate layers somehow? when go hover on 1 of arrows, under 1 arrow on another. how hovered on arrow on top of of other images in movie? maybe code that, onhover brought symbol front of stage? i'm not 100% sure structure of flash app/movie think along line of following: import flash.display.sprite; import flash.events.mouseevent; arrow.addeventlistener(mouseevent.mouse_over, onarrowmouseover); arrow.addeventlistener(mouseevent.mouse_out, onarrowmouseout); function onarrowmouseover(e:mouseevent):void { var arrow:sprite = sprite(e.target); setchildindex(arrow, this.numchildren-1); arrow.scalex = arrow.scaley = 2; } fun...

c# - Why do nested locks not cause a deadlock? -

possible duplicate: re-entrant locks in c# why code not cause deadlock? private static readonly object = new object(); ... lock(a) { lock(a) { .... } } if thread holds lock, can "take lock" again without issue. as why is, (and why it's idea), consider following situation, have defined lock ordering elsewhere in program of -> b: void f() { lock(a) { /* stuff inside */ } } void dostuff() { lock(b) { //do stuff inside b, involves leaving b in inconsistent state f(); //do more stuff inside b consistent again } } whoops, violated our lock ordering , have potential deadlock on our hands. we really need able following: function dostuff() { lock(a) lock(b) { //do stuff inside b, involves leaving b in inconsistent state f(); //do more stuff inside b consistent again } } so our lock ordering maintained, withou...

animation - How to get desired height of WPF UI element with current height of 0? -

my ultimate goal animate change in size between 2 usercontrols. way have attempted achieve has produced 1 major problem. i start datatemplate contains basic text , icon display, 'edit' usercontrol height set 0 , edit button. edit usercontrol in gridrow height="auto", starts out height of 0. button has doubleanimation triggered button click animates height of usercontrol 0 300. works fine. here simplified code example. <datatemplate x:key="usertemplate" datatype="{x:type datatypes:user}"> ... <controls:userview grid.row="1" grid.columnspan="5" x:name="editrow" datacontext="{binding}" height="0" /> <controls:usereditor grid.row="2" grid.columnspan="5" x:name="editrow" datacontext="{binding}" height="0" /> <button grid.row="0" grid.column="4" name="edit" style="{staticresource but...

php - HTML Form problem, choose an existing problem or add a new one -

i developing form php application , need have form user can either select option drop down menu or add new option via same form? what type of form input called? possible? thanks a select dropdown "other" option, , other selected allow and/or require them enter value standard text input field. you'll need 2 form elements, can't done one.

How much does getting a list of directories affect php's performance -

very simple question time, have group of folders , of them contain files autoload whenever run sites script. not want have specify files autoload because want process dynamic , want able create , delete different files on fly. of course easiest solution list of folders in directories , build paths auto load files, if files exist script includes them. but, question how affect performance of script? framework want release later on performance quite issue. ideas? you should consider letting php autoload classes . if won't work, you're pretty left directory-scanning solution, , shouldn't care performance penalties. if want functionality, you'll put costs. generally shouldn't stress overmuch performance in php anyways. if becomes issue when framework complete , revisit it. chances you'll find whatever performance gains/losses incur rendered moot implementing caching system in framework. see premature optimization .

sql - What is difference in performance of following 2 queries -

what difference in performance of following 2 queries in sql server 2008 query 1: select a.id,a.name,b.class,b.std,c.result,d.grade student inner join classes b on b.id = a.id inner join results c on c.id = a.id inner join grades d on d.name = a.name a.name='test' , a.id=3 query 2: select a.id,a.name,b.class,b.std,c.result,d.grade student inner join classes b on b.id = a.id , a.name='test' , a.id=3 inner join results c on c.id = a.id inner join grades d on d.name = a.name is there best way achieve best perofermance in above 2 queries you can have 100% guarantee execute same, same plan. the time matter when splitting and/where clauses in inner join when options force order used. great performance @ expense of writes, create these indexes: a (id, name) b (id) includes (class, std) c (id) includes (result) d (name) includes (grade) however, still depends on distribution of data , selectivity of indexes whether used. e.g. if grade table c...

string - Poweshell concatenation order with function variables and literals -

i'm not sure if mad or missing trying simple pipe separate load of variables in function , write them out. "easy" say? have thought so. here wee extract of attempts write powehell function make rest of code little easier on eye. $logtofile=$false function logentry($entrytype, $section, $message) { #the way assumed woudl work $logstring1 = $(get-date -format "yyyy-mm-dd hh:mm:ss") + "|" + $entrytype + "|" + $section + "|" + $message #another way should work $logstring2 = "$(get-date -format "yyyy-mm-dd hh:mm:ss")|$entrytype|$section|$message" #proof not pipes causing issues $logstring3 = "$(get-date -format "yyyy-mm-dd hh:mm:ss"),$entrytype,$section,$message" #another method found. not sure issue there $logstring4 = $(get-date -format "yyyy-mm-dd hh:mm:ss"), $entrytype, $section, $message -join "|" $whatiwant = $(get-date -format ...

android - How to change text on a Textview -

evening :) i have little problem... as can see in code below, textview trying settext on, getting me nullpointer :( is there can tell me doing wrong ? :) and string s isnt null or, view itself. working when setting text in oncreate(). thanks.. public class smsshower extends activity{ private textview status; public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); requestwindowfeature(window.feature_no_title); setcontentview(r.layout.show); //status = (textview)findviewbyid(r.id.status); status = (textview)findviewbyid(r.id.status); } public void displaytext(string s){ status.settext(s); } } smsreceiverclass: public class smsreceiver extends broadcastreceiver { private string str; private boolean received = false; private smsshower smsshow; @override public void onreceive(context context, intent intent) { //---get sms message pas...

c# - Databinding in Silverlight with RIA Services -

i'm trying display content of table in combobox. i'm using mvvm pattern , in viewmodel class if write works: private ienumerable<eventtype> _eventtypes; public manageprofilemodel() { _referencedata = new referencedatacontext(); _referencedata.load(_referencedata.geteventtypesquery(), false); _eventtypes = _referencedata.eventtypes; } like combobox displaying data. however, want _eventtypes list: private list<eventtype> _eventtypes; but if write this: public manageprofilemodel() { _referencedata = new referencedatacontext(); _referencedata.load(_referencedata.geteventtypesquery(), false); _eventtypes = _referencedata.eventtypes.tolist(); } then combobox empty. wrong that? i want use list, because want able add , remove data in list. best regards. if remember correctly, can not convert ienumerable ilist directly. little tricky. ...

Silverlight Binding Question -

hi all, i trying out hand silverlight first time , have question regarding binding. have form bound custom data object. on have 2 boxes labelled such: driving experiece [textbox] years [textbox] months. i need bind single integer property of drivingexperiencemonths. instance, if drivingexperiencemonths equal 29, see 2 in years textbox , 5 in months text box. i can of course add listener text changed events text boxes , handle way, else on form using twoway binding, , hoping well. thanks in advance you in wpf implementing imultivalueconverter , unfortunately, isn't supported in silverlight. the best option have viewmodel handle this. create "months" , "years" property automatically synchronizes drivingexperiencemonths value. if want use oneway binding (just display), 2 ivalueconverter s used. twoway databinding, have handled in code.

api - Yahoo Mail Web Apps PHP -

sorry newb question, started programming php i'm following yahoo mail web apps php tutorial on retrieving mail yahoo. guide here http://developer.yahoo.com/mail/docs/user_guide/credentialtheuser.html on step 3 says to: in unzipped directory, run following command, can either json or soap: $php listfolders.php what mean run command? run command on cmd.exe or somewhere else? thanks! yes, need cd (change directory) "unzipped directory", , i'll assume don't have php command available in shell, need supply entire path. from cmd.exe, /path/to/your/php.exe listfolders.php or if not wish cd directory, specify full path /path/to/your/php.exe /path/to/unzipped/listfolders.php

android - Create clickable item on listview -

how make clickable item in listview , data directly db when clicking it? should use cursor , column names in cursor?? simple, create simplecursoradapter , interface database given layout. once have can pull callback on listview , cast same type (cursor) then pull information relative specific row , should golden!

php - using Google Docs as a database? -

Image
i create simple php page site, show timetable / calendar data, each slot either free or have appointment in it. because data 1 table, {month, day, hour, talk_name, talk_description}, thought why not use google docs spreadsheet database. ok, main reason i'm reading books how use mysql in php, i'm definately not on level to: create nice admin interface managing events make whole thing safe (i mean idea safety use .htaccess admin folder , make site read-only elsewhere). on other hand use google spreadsheets editing table, way both security aspects , ui aspects solved. my question how recommend me that? google docs can both publish in xml , csv formats. can use fgetcsv datas? can give me simple examples how parse csv, , if efficient (ok, less 50 views day), if (sorry abstract syntax)? $source_csv = fgetcsv(...); get_talk_name(x,y,z) { rows in $source_csv { if (month == x && day == y && hour == z) return talk_name } } get_talk_desc(x,y,z) {...

jquery - Hide a specific H2 id using javascript or CSS -

we're looking zendesk our support site it's not customizable. i'm trying remove specific text page using widgets function (which can created in javascript or css). i'm trying hide following h2 tag while displaying page: <h2 id="search_box">knowledge base &amp; forums</h2> i've tried following css: .search_box { display: none; } but doesn't seem work. i'm not great either css or javascript , don't know when these widgets run, assume i'm doing wrong in terms of accessing element on page. i've been able hide text using following combination of javascript , css codes, doesn't need because hide part of page has text in it: javascript: $j('h2:contains(knowledge base & forums)').addclass('forumtitle'); css: .forumtitle { display: none; } thanks help! #search_box { display: none; } . classes, # ids

visual studio 2008 - Redacting ASP.net web.config File Contents -

other database connection strings, default there sensitive values populated in web.config visual studio 2008? publickeytoken values these sensitive values? bad security practice publish web.config files connection strings redacted? publickeytoken not sensitive. as redacting connection strings, afraid of? who's going hold of web.config?

iphone - my toolbar button not showing the image -

here code have used show toolbar , image on it. - (void)viewdidload { [super viewdidload]; self.navigationitem.title=@"nice quote"; app=(nicequote123appdelegate *)[[uiapplication sharedapplication]delegate]; self.tableview.backgroundcolor = [uicolor colorwithpatternimage:[uiimage imagenamed:@"bac1.jpg"]]; self.navigationcontroller.navigationbar.barstyle=uibarstyleblackopaque; toolbar=[uitoolbar new]; toolbar.barstyle=uibarstyleblackopaque; [toolbar sizetofit]; toolbar.frame = cgrectmake(0, 435, 320, 50); uibarbuttonitem *che=[[uibarbuttonitem alloc]initwithcustomview:]; uibarbuttonitem *wifi=[[uibarbuttonitem alloc] initwithimage:[uiimage imagenamed:@"email.png"] style:uibarbuttonitemstyleplain target:self action:@selector(send_clicked:)]; uibarbuttonitem *wifi1=[[uibarbuttonitem alloc] initwithimage:[uiimage imagenamed:@"mobile2.png...

php - What does the insertEntry in YOUTUBE API return? -

this use upload video youtube using youtube api. $newentry = $yt->insertentry($myvideoentry, $uploadurl, 'zend_gdata_youtube_videoentry'); once upload, how can unique code of video uploaded ?? mean is, in url, http://www.youtube.com/watch?v=pbi3lc18k8q "pbi3lc18k8q" unique code video. so, how video uploaded?? do code after upload it: // assuming $videoentry object returned during upload $state = $videoentry->getvideostate(); if ($state) { echo 'upload status video id ' . $videoentry->getvideoid() . ' ' . $state->getname() . ' - ' . $state->gettext() . "\n"; } else { echo "not able retrieve video status information yet. " . "please try again later.\n"; }

Div innerHTML not updating during jquery ajax calls -

i facing problem while updating div's html. html code div is <div id="divforlog" style="z-index:200000;overflow:auto;position:fixed;width:400px;height:300px;border:solid 2px gray;padding:10px;background-color:#f1f1f1"> </div> onclick of button call code shows hidden div. , takes array of string contains page ids. each id call ".ashx" page using jquery , on success update div's html. works fine in firefox not in other browsers(chrome , ie). @ end of function , hide div using jquery "slideup" method , sliding works in frefox,ie , chrome , shows inner html of div before disappearing. main problem div not shown , updated. in javascreipt theere div's reference used progress bar , doesn't show in ie , chrome. javascript code below: var progress=0; var totalpages; var logstring=""; function getprogressbarvalue(){ var s = '<span style="text-align:center;display...

pdf generation - GUI to add acrofields to existing pdf -

i have pdf created source not have acrofields in it. know can add acrofields programmatically provided know co-ordinates. but want add acrofields visually (drag-drop). there opensource gui tool available allows me edit pdf , add acrofields ? once add acrofields, filling values programmatically. right iam looking gui (opensource) allows me add acrofields. i don't think there open source acroform editors. there several "free trial" apps floating around however.

How to display strings in a WPF ListView in different colours? -

i fill wpf listview strings using databinding. code looks (and work! ;) ): xaml: <listview itemssource="{binding entries}"> </listview> i left out code better overview. entries ilist<string> . so far, working fine. comes problem: string in entries may contain particular keyword indicates string wants displayed red background inside listview. have method getbackground(string s) returns colour depending on string. how can make listview display items in correct colour. first idea have converter converting string colour using abovementioned method. have add converter , how pass string converter parameter? first idea was: <listview itemssource="{binding entries, converter={staticresource entrytocolourconverter}, converterparameter=???}" </listview> does have idea how done? on right track? best wishes, christian edit 1: changed code (as first step) towards: <usercontrol.resources> <dat...

c# - When to use which design pattern? -

i design patterns much, find difficult see when can apply one. have read lot of websites design patterns explained. understand of them, find difficult recognize pattern in own situations. so, why ask question. there guidelines / alarm bells when use design pattern. for example, if doing switch statement determine object need create, want use factory design pattern. switch statement in case 'alarm bell' use factory pattern. so, know more 'alarm bells' determine design pattern? for starters take peek @ page: http://codebetter.com/jeremymiller/2006/04/11/six-design-patterns-to-start-with/ while jeremy here deals few set of patterns, must read these articles , follow this: http://codebetter.com/jeremymiller/2005/09/01/learning-about-design-patterns/ also use references on article(especially eric gamma's interview) , should set.

Aggregating Data in Rails 3 -

i want aggregate data different sources, twitter lastfm , sort. can't figure out how store data. in database can't figure out how abstract make table hold data without compromising logical understanding of data in each column. wondering if else had experience , tackled in rails. one option, if want stick sql, have model/table contains fields common every data source (title, url, summary) associated other models/tables contain fields specific individual data sources. associations regular or polymorphic. , if wanted in metaprogramming use method_missing delegate method calls fields not present in 'common' model associated models. work best polymorphic join. psudeo-code: class datasource belongs_to :data_source_extension, :polymorphic => true def method_missing(method) if data_source_extension.responds_to? method data_source_extension.send(method) else super end end end the other option sti, 1 table fields , 'type...

google maps - Is there any limit to drawing path using Geocoder (Android)? -

Image
i able draw path between 2 locations, if distance long - more 300 kilometers - path not drawn completely. i using code below in order draw path: class mapoverlay extends com.google.android.maps.overlay { road mroad; arraylist<geopoint> mpoints; public mapoverlay(road road, mapview mv) { mroad = road; if (road.mroute.length > 0) { mpoints = new arraylist<geopoint>(); (int = 0; < road.mroute.length; i++) { mpoints.add(new geopoint((int) (road.mroute[i][1] * 1000000), (int) (road.mroute[i][0] * 1000000))); } int movetolat = (mpoints.get(0).getlatitudee6() + (mpoints.get( mpoints.size() - 1).getlatitudee6() - mpoints.get(0) .getlatitudee6()) / 2); int movetolong = (mpoints.get(0).getlongi...

Magento: Checkout redirects to cart before 'Place Order' is pressed (should go to payal) -

this first actual post on stackoverflow. i'm on here quite because guys solve queries! we have problem in checkout cart on magento site. we have magento version 1.4.1.1 , using 1 page checkout , paypal standard checkout. the problem appears when customer adds lots of different products cart (say 7 or more). when click on 'place order' button, should taken paypal complete order. instead redirected cart (the default failure url) the checkout works fine when buy few items or many of same item. doesn't work when buy multiple different items. any help/advice/solution/anything! appreciated! thanks, heather i expereinced issue... run php version 5.2.10, magento ver. 1.3.2.4 , use paypal website standard pro... we have been optimising server install apc , tuning mysql... uninstalling / reinstalling apc swap out version of apc use spin locks... after completing these works , running end end test paypal integration failed work... or more point on clic...

CSS text over flow why isn't this working -

i want text in header shortned ellipses. doesn't whole address shows in 1 line <table border="0" style="font-weight:normal; position: absolute; top:45; left: 0;"> <th align="left" style="" width="10%"> <span style=" overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width:10px; font-weight:normal; white;" onclick="dropdownresize()"><i>address</i> &nbsp; <b>${bean.address}</b></span> </th> <tr > <td style=" border-style:solid; border-width:0px; text-transform:capitalize; text-indent:1px;"> </br> <br>usual address <br><b>${bean.address}</b></br> <br>  </td> </tr> </table> you have lot of stuff wrong code, for start using <b> <i> using <table> s layout con...

iphone - AVAssetWriter startWriting Problem -

avassetwriter startwriting returning bool false value when i'm writing movie on 2g device, other devices returning true value , working fine.anyone faced problem or have clue why happening,help me please i receiving false on startwriting on ipad, when works on both iphone3 , 4 (all have ios 4.2). status of writer failed, nserror as: "the operation couldn't completed. (avfoundationerrordomain error -11800)." creation of writer yielded no error when creating file type: avfiletypequicktimemovie, , file did not exist. i've tried using different pixel buffer pixel formats no avail. lastly, i've tried changing video type mpeg4 , m4v...again, no avail. i'm posting here instead of creating new problem, both same result , not addressed. need have resolved w/in few days, if learn anything, i'll post find.

Learning C++ using a template -

do recommend learning c++ using template? edit have basic programming language (i know how work things loops, arrays, classes , functions) , have been recommended follow tutorials in template made creating games. i become game programmer. the short answer question yes . the longer answer yes, but need consider when move c++ template world . c++ rich languare , comes enormous power , possibilities. use power 1 needs responsibility , 1 must have knowledge use things wisely. there many things 1 needs understand in c++ in order write code , templates not in list of important things. however, mentioned stl (standard template library) central piece in c++ , is, see name, library using templates (heavily). in opinion, stl should start looking @ when start learning c++ . need understand basic concepts templates . same goes boost, masterpiece in c++ template programming. here might need more understanding templates are, , do. my advice start learning c++ fundamentals...

c# - Streaming at LOW bitrate using RESTful WCF service -

i want continuously stream data @ low bitrate : few bytes per second. my wcf rest service works fine when stream large amount of data. when bitrate low, seems stream buffered until there enough data pass transport layer. as result, receive 16ko of data every 16 sec instead of 1ko every sec. how can implement low bitrate streaming in wcf rest? my wcf service: void startmywcfservice() { host = new webservicehost(typeof(iserv), new uri("http://localhost:4530/"); var bnd = new webhttpbinding(); bnd.transfermode = transfermode.streamed; host.addserviceendpoint(typeof(iserv), bnd, ""); host.open(); } [servicecontract] public interface iserv { [operationcontract, webget(uritemplate = "/")] stream mystream(); } [servicebehavior(instancecontextmode = instancecontextmode.single)] class serv : iserv { public stream mystream() { var resp = weboperationcontext.current.outgoingresponse; resp.statusc...

php - How to check which one of the username or password is incorrect? -

i want check 1 of username or password incorrect in single mysql query. scenario: when user types username , password , clicks submit, want show error message 1 incorrect. need simple , optimized query this. as general rule of thumb it's better return message user saying "the username or password incorrect" wouldn't indicate attacker if username or password wrong.

c# - Multi Series Ext Chart JS -

in ext.charts, want create multi series chart (line + bar in 1 chart) gets data in store c#. is possible? there example can please show explain how works. definitely possible! have example graph line + bar in extjs demo pages itself: http://dev.sencha.com/deploy/dev/examples/chart/charts.html (refer last chart line , bar) regarding fetching data c#.. need url send data (xml or json). so, can have java,c#,python, php or other server side technology. extjs uses stores hold info, need have store, load data , associate store chart render data. ps: have series of tutorials @ blog - http://technopaper.blogspot.com/2010/05/getting-started-with-extjs-charts.html update have explained how handle charts series in blog. have @ above link. have similar chart (only think using line chart). json array returned server side is: [ {month:'jan', sales: 2000, rev: 3000},{month:'feb', sales: 1800, rev: 2900}, {month:'mar', sales: 1500, rev: 3100},{month...

Different compilers, different output? -

Image
i have bit of c code i've been working on in xcode on mac. wanted work on windows machine , compile tinyc. when run it, output different. is possible due using different compilers? thanks! edit 1 the code simple script opens wav file throw samples array. #include <stdio.h> #include <stdlib.h> #include <string.h> void read_wav_header(unsigned int *samp_rate, unsigned int *bits_per_samp, unsigned int *num_samp); void read_wav_data(int *data, unsigned int samp_rate, unsigned int bits_per_samp, unsigned int num_samp); int conv_bit_size(unsigned int in, int bps); int main(void) // int read_wav(void) { unsigned int samp_rate, bits_per_samp, num_samp; read_wav_header(&samp_rate, &bits_per_samp, &num_samp); printf("samp_rate=[%d] bits_per_samp=[%d] num_samp=[%d]\n", samp_rate, bits_per_samp, num_samp); int *data = (int *) malloc(num_samp * sizeof(int)); read_wav_data(data, samp_rate, bi...

c# - Wrapper for code block -

for example have datagrid , want before databinding , after databinding, so: dgvtasksdoclist.savelayouttofile(); statuschangesextendedbindingsource.datasource = dt; dgvtasksdoclist.restorelayoutfromfile(); and want add such code cases when binding sources. there easy way write such code before/after action(sure can add 2 lines, may there known way of doing such things)? seems case aop - http://en.wikipedia.org/wiki/aspect-oriented_programming . for example postsharp able create attribute persistlayout , apply this: [persistlayout] public void binddatasource(object dt) { statuschangesextendedbindingsource.datasource = dt; } then postsharp extent source-code @ compile-time invoke additional two-lines. other idea might invoke these 2 methods in statuschangesextendedbindingsource.datasource property setter decision needs lot more context know.

c# - Adding WCF service to existing application? -

i have existing application has requirement interacted mobile device. mobile device has wifi connection, , connecting pc hosting main application on lan. mobile device needs add/edit/find/delete objects main application maintaining. main application encapsulates functionality in simple repository classes. i believe approach add wcf service main application exposes set of methods mobile device can call against. have looked wcf today , tried setup example application, when called wcf methods unable access data, such feel wcf service running in own application domain , such has no access same static classes in main application. if setup wcf service project in vs 2008/2010, how can run under same application domain main winforms application, remote application on lan can communicate data application. below sample winform using system; using system.servicemodel; using system.windows.forms; using dataproject; namespace windowsformsapplication1 { public partial class form1 : ...