Posts

Showing posts from June, 2013

objective c - Launching app from root account -

i developing cocoa gui app has objective-c daemon. daemon launched launchdaemon, gui launched using loginitems each user. when update deployed need update daemon, simple, , update gui. able exit gui, replace app, , relaunch on each user account running on. daemon of course running root. how can either: 1) root, quit , re-launch app in user's interface? 2) root, quit , re-launch particular loginitem each user logged it? i have tried searching , there lots of discussions including similar question , there doesn't appear working solution available. any appreciated. i believe nsdistributednotificationcenter should work this. note using nsdistributednotificationcenter communicate between processes in different user accounts not, in , of itself, require root privileges. to coordination between user accounts, might distinguish instance of gui app , daemon active , in control, , instances passive. can use nsworkspace's notifications (nsworkspacesessiondid

javascript - assign value to select box ( form validation ) -

i creating form validation, , have fields working great. trickyness seems arise parsing value select box i know how assign value within form element, have: <select id="sms" name="sms" class="medium"> <optgroup label="sms alerts"> <option value="">please choose</option> <option value="1">yes</option> <option value="0">no</option> </optgroup> </select> but not sure within js select box. currently field have: $("#mobile").blur(function() { if(validate_form_field($(this), $(this).val().length>9)) { mobile_passed = true; } else { mobile_passed = false; } }); essentially, want validate value

Bubble Sort logical error VB.NET -

this program suppose sort records(in arysort) in ascending order last name(index 1 in arytemp , arytemp2) , place result in list box on old, preloaded, unsorted records. it sorts them strangely, have click multiple times ascending button actual sort result suppose clicking button once. why doesn't sort items single mouse click? the source: public class form1 dim file_name string = "students.txt" dim numberofrecords integer 'total number of records private sub form1_load(byval sender system.object, byval e system.eventargs) handles mybase.load if system.io.file.exists(file_name) = true dim objreader new system.io.streamreader(file_name) while objreader.peek() <> -1 lstbox.items.add(objreader.readline) numberofrecords += 1 loop objreader.close() end if end sub private sub btnascending_click(byval sender system.object, byval e system.even

python truncate text around keyword -

i have string , want search keyword or phrase , return portion of text before , after keyword or phrase. google talking about. here string grabbed web: "this filter truncates words original truncate words django filter, instead of being based on number of words, it's based on number of characters. found need when building website i'd have show labels on small text boxes , truncating words didn't gave me best results (and truncating character is...well...not elegant)." now lets want search phrase building website , output this: " ... need when building website i'd have show ... " edit: should have made more clear. has work on multiple strings / phrases, not one. building on answers of others (especially cababunga's) function, take 25 (or many) characters, stopping @ last word boundary, , provide nice match: import re def find_with_context(haystack, needle, context_length, escape=true): if escape: needle =

PowerShell Close File/Delete File After Emailing via .NET -

i'm stuck @ end of script working on file emailed out before being deleted. except.. file seems still opened, smtp client, error when try delete it. of course restarting shell let me delete it, thats not point. ;-) point i'd create it, email it, delete it, in 1 script. the error: cannot remove item c:\temp\myfile.csv: process cannot access file 'c:\temp\myfile.csv' because being used process. code: $emailfrom = 'noreply@localhost' $emailto = 'aaron@localhost' $smtpserver = 'localhost' $filename='myfile.csv' $filepathname='c:temp\' + $filename $subject = 'emailing: ' + $filename $body = 'this message been sent following file or link attachments: ' + $filename $msg = new-object net.mail.mailmessage $att = new-object net.mail.attachment($filepathname) $smtp = new-object net.mail.smtpclient($smtpserver) $msg.from = $emailfrom $msg.to.add($emailto) $msg.subject = $subject $msg.body = $body $msg.at

c - Buffer Overflow Problem -

i trying run buffer overflow example run code, problem when try run code buffer overflow, windows throws prompt stating "program has stopped working, windows checking solution program. when try make sure has overflow 1 byte. program runs, doesn't pause command window in order me see segmentation fault error address. understanding need in order change , make run desired window passed parameter.here simple program. #define buf_len 5 int main(int argc, char **argv) { char buf[buf_len]; if (argc > 1) { strcpy(buf, argv[1]); } return 0; printf(buf); system("pause"); } the problem lies fact buffer overflow behavior not standardized - example may refer older version of windows, still printed error address, or different operating system. additionally, not buffer overflows cause program crash - depends on data written where. small buffer overflows, may overwriting other local variables or padding space, instead of essential program execution (like f

linux - How to send three pipes of data over ssh? -

i have bash script on remote host produces large amount of data on fd=3 possibly interesting data on stdout , stderr. want to: log stdout , stderr file on local machine. write data on fd=3 stdout on local machine. here's how done if big script local: exec 3> >(cat) ./big_script.sh -o /dev/fd/3 2>&1 >big_script.log exec 3>&- however, want run big_script.sh on remote machine , have 3 pipes (fd=1, fd=2, , fd=3) come out of ssh program separate. best way that? nc (netcat) , tunnels ? can make kinda log radio on net way!

optimization - Processing: How can I improve the framerate in my program? -

Image
so i've been working in processing few weeks now, and, though i'm not experienced in programming, have moved on more complex projects. i'm programming evolution simulator, spawns creatures random properties. eventually, i'll add reproduction, of creatures sort of float around screen, , follow mouse somewhat. interacts sound line in, commented parts out can viewed on canvas, shouldn't change question, thought point out. as of now, framerate far less ideal me, , lowers more creatures spawned. making fundamental mistake, or running many functions per frame? here's source code, , can play in browser here : //import ddf.minim.*; //import ddf.minim.signals.*; //import ddf.minim.analysis.*; //import ddf.minim.effects.*; //minim minim; //audioinput in; boolean newcreature = true; boolean matured[]; int ellipses[]; int hair[]; int maxcreaturenumber = 75; //int volume; //int volumetolerance = 1; int creatureindex = -1; int creaturex[]; int creaturey[]; float

Modifying URLs on a Rest Server in Delphi -

i've written rest server in delphi xe (using wizard) , want change urls bit instead of having http://192.168.1.84:8080/datasnap/rest/tservermethods1/getlistings looks more http://192.168.1.84:8080/getlistings is there nice easy of doing this? the naming convention (delphi xe3): http://my.site.com/datasnap/rest/uriclassname/urimethodname[/inputparameter] you can change "datasnap" , "rest" part of url in tdshttpwebdispatcher component properties. can change class name , method name of url changing name of class , method. however, still have have 4 components url, example be: http://my.site.com/api/v1/people/listing see here: http://docwiki.embarcadero.com/radstudio/xe3/en/rest#customizing_the_url_for_rest_requests

sqlite - Need to store LOTS of data on Android device, thinking of going OODB -

i'm working on project that's based on android. without getting many details, software run on custom built device. hardware never change , same. that's definite plus :) with said, project requiring store loads , loads of data on device - upwards of 3m rows in tables. sqlite handles scanning many rows fine us, problem comes in when start doing complex joins bring related data need. we've thought denormalizing database afraid push database outside realm of usable. we looking using object oriented database, db4o or neodatis. our hope storing objects can rid of our relations on row level , store them on object (just oop). problem have not been able find performance related benchmarks (at least not recent ones) of these odbs running , being used on android. does have experience oodbs on android and/or storing , accessing large amount of data? if advice provide appreciated. -- edit here's example of problem we're facing. it's not related our app (my

Parse error in Haskell -

the following code: import io import system(getargs) main = args <- getargs let l = length args if l == 0 putstrln "foo" else putstrln "bar" generates parse error if-else clause. have tried using curly braces no avail. help! just demonstrate comment mark's answer, import system.environment (getargs) main :: io () main = args <- getargs let l = length args if l == 0 putstrln "foo" else putstrln "bar" is legal haskell. with ghc 7.0's {-# language rebindablesyntax #-} extension, can away with class ifthenelse b c d | b c -> d ifthenelse :: -> b -> c -> d instance ifthenelse bool a ifthenelse true = const ifthenelse false = flip const instance (monad m, ifthenelse (m b) (m b) (m b)) => ifthenelse (m a) (m b) (m b) (m b) ifthenelse = liftm ifthenelse main = if liftm null getargs putstrln "foo"

flex - Advanced Data Grid: Error: Bookmark no longer valid -

i working on indent , outdent advanced datagrid. have set of functions work when operating on underlying data fine, throw "error: bookmark no longer valid" when operating on selected items of datagrid. when run code runs fine: indentleaf(l5) outdentleaf(l4) but code fails: adg.selecteditem = l5 indentleaf(adg.selecteditem leaf) adg.selecteditem = l4 outdentleaf(adg.selecteditem leaf) the code not fail in instances, configurations of data grid data tree. the code needs run in debugger version of flash player if want see error thrown. have cut , pasted error text area reference below. the code in toy app seems recover ok when exception thrown, in larger app leads hard crashes. example code can found here view source turned on: http://www.crcarlson.com/adg/adgarraycollectionupdate.swf to create error, reset tree , click "indent/outdent2" i appreciate suggestions on how around this. the full stack trace looks this: error: bookmark no longer v

javascript - Can I create an html link to the current page without refreshing to the top? -

this question has answer here: how stop web page scrolling top when link clicked triggers javascript? 14 answers i have javascript fade function implemented banner div when clicked, current banner image faded one. html link tag calling function follows: <a href="#" onclick="fade('bannerdiv');"> <div id="bannerdiv"> <img src="banner_image.gif" /> </div> </a> the problem is, banner located towards middle of page (middle between top , bottom, not left , right) , when click on banner change image, brings me top of page. there way can fix this? the proper way make browser not evaluate href parameter @ - javascript:void(0) , similar targets ugly hack. you can return false in onclick event: <a href="#" onclick="fade('bannerdiv'); return

Introducing Rails into a PHP shop? Or build up what we already use? -

here's setup @ our shop: 1 large php app (kohana 2) many dev's , lots of infrastructure multiple (4-5 , growing) small php apps 1-2 dev's working on these issues: no testing no documentation a fragile , tedious deployment process i'm being moved single large app on side of house multiple smaller apps. lack of testing , proper deployment process in our shop makes me nervous i'll spend more time fixing bugs , deploying fixes writing code new features. solution a: introduce phpunit , selenium move on phing , dbdeploy problem a: setting phpunit has been relatively easy, functional testing selenium has been total pain. our vm's work great dev, selenium pegs needle, plus few simple tests take forever. don't doubt of these technologies playing together, seems mess , complexity of these working seems fragile. solution b: switch rails use integrated testing and/or rspec/cucumber (integration of latter seems simple) use integrated

krl - Timeouts in Kynetx apps? -

i wondering if there's undocumented way set timeout on dataset/datasource request? realized when api rule uses goes down, there isn't way catch after n seconds , give user error message and/or notify me downtime. there not way specify timeout. suggest enhancement

drupal fivestar module -

i gave rate permission anonymous, used anonymous role test whether can rate article or not. while annoying thing although have rated once,then can still rate second time.third time.,fourth......again , again,there no message give me , saying, "you have rated." why? there settings did wrong

scala - How do I reflectively create a new collection? -

i have instance of collection want store externally , restore original collection type. example class foo { var x : list[int] } val f = new foo f.x = list(1, 2, 3) i "serialize" out f, want reflectively create new foo, f2, , populate f2.x correct results. i can create new foo doing classof[foo].newinstance , how create correct collection type , populate it? note, i'm making lots of assumptions here, notable: 1) know type of f.x, , can serialize out type of 2) i'm serializing out contents of x preserves values 3) don't want use "standard" serialization i've tried use builders available on original collection, don't quite understand how works enough pull off. thanks, dave it easier here if had better idea of problem you're trying solve, e.g. why don't want use standard object serialization. that said, if want reflection on scala collection classes, you'll need know few things how scala compiles cla

c# - Silverlight: Access parent data context from DataTemplate? -

i'm using silverlight 4. have itemscontrol custom datatemplate . datatemplate , bind in usercontrol 's datacontext - not datacontext of specific element in items control. there way this? this should answer question : access parent datacontext datatemplate <itemscontrol x:name="level1lister" itemssource={binding mylevel1list}> <itemscontrol.itemtemplate> <datatemplate> <button content={binding mylevel2property} command={binding elementname=level1lister, path=datacontext.mylevel1command} commandparameter={binding mylevel2property}> </button> <datatemplate> <itemscontrol.itemtemplate> </itemscontrol>

php - How to take information on a left frame and update a text-field within the right frame? -

i need frames. basically, here's dilemma ... have created index page broken down 2 frames. the left frame, has tree of directory user can select files from the right frame, main content page. has text-field. let's call "file-path" what when user clicks specific file on left frame, want grab information , put on right-frame within text-field. i hope makes sense, if not , can go ahead , post more information? it's not simple want open file right-frame, know by: <a href="file.jpg" target="rightframe"> ... not sure how target text-box? cheers! edit i'm using form element: echo" "; however, want text not button, i'd rather have text itself. can suggest something? can't do: button text ... makes text-field hidden ... can't see text-field add handler (not sure this.text ) onclick="parent.rightframe.set_field(this.text)" and in right frame: function set_field(

java - create object of abstract class and interface -

can tell me how can create object of abstract class , interface. know cant intaniate absract class , interface. thanks , regards, gautam you can not instantiate abstract class or interface - can instantiate 1 of subclasses/implementers. examples of such thing typical in use of java collections. list<string> stringlist = new arraylist<string>(); you using interface type list<t> type, instance arraylist<t> .

java - name are not displaying on jsp -

private customergroup customergroup; public customergroup getcustomergroup () { return customergroup; } public void setcustomergroup (customergroup customergroup) { this.customergroup= customergroup; } when print customergroup shows group name fine. system.out.println("customer group "+customerrecord.getcustomergroup().getgroupname()); but when display on jsp doesn't show group name, show class name package. <%@ taglib prefix="s" uri="/struts-tags"%> <s:iterator value="list"> <s:property value="customergroup"/> </s:iterator> because on console explicitly printing name using, system.out.println("customer group "+customerrecord.getcustomergroup().getgroupname()); and in jsp printing customergroup <s:property value="customergroup"/> which of course different. try this, instead <s:property value="

actionscript 3 - Flex/AS code for webcam -

can 1 point me small piece of flex/as code test webcam , microphone. thanks the smallest amount of code can use create web cam video feed this: var cam:camera = camera.getcamera(); cam.setmode(640,480,30); var video:video = new video(640, 480); video.attachcamera(cam); addchild(video); glancing on docs give additional properties , arguments can use suit needs. update here link working version of code http://wonderfl.net/c/ogey

asp.net - exception while sending mail -

i sending mail giving me exception mailbox name not allowed. server response was: sorry, relaying denied location [182.72.17.210] (#5.7.1) my code public static string sendmailhtmlfromat(string sform, string sto, string ssub, string smsg) { mailmessage mailmsg = new mailmessage(); mailmsg.to.add(sto); mailmsg.from = new mailaddress(sform); mailmsg.subject = ssub; mailmsg.isbodyhtml = true; mailmsg.body = smsg; try { //smtpclient smtp = new smtpclient("smtpout.secureserver.net", 25); smtpclient smtp = new smtpclient("relay-hosting.secureserver.net", 25); smtp.credentials = new system.net.networkcredential("admin@beautiful.com", "smart123"); smtp.send(mailmsg); } catch (exception e) { } return ""; } is

c - warning:incompatible pointer type? -

hi getting following warning pls me . passing argument 3 of ‘pthread_create’ incompatible pointer type my code is: int function(int *); int main() { pthread_t thread_a; pthread_create(&thread_a,null, function,&connected); int function(int *fnd) { int bytes_recieved;; } function must return void * . see pthread_create(3) man page more details.

html - CSS, drop down and transparency problem -

Image
i have drop down list , have footer, when pull down drop down list... footer in front of list blocking view, how can eliminate this: my css footer is: #footer { height:45px; padding:10px 0; position:relative; } #footer .inner { position:relative; z-index:2; } #ie6 #footer .inner { } #footer .bg { background:url("http://jqueryui.com/images/footer_bg.png") no-repeat scroll left top transparent; height:65px; left:0; position:absolute; top:0; width:100%; z-index:1; } #ie6 #footer .bg { background:none repeat scroll 0 0 transparent; } #footer p { color:#5e5e5e; font:9px 'arial','helvetica',sans-serif; margin:0; padding:0; text-transform:uppercase; } #footer p { color:#bbbbbb; } #footer span.first { display:block; float:left; padding:6px 0 0 16px; } #footer .block { display:block; float:left; } #footer .block span, #footer span.empty { display:none; } #foote

performance - What's the fastest way to merge/join data.frames in R? -

for example (not sure if representative example though): n <- 1e6 d1 <- data.frame(x=sample(n,n), y1=rnorm(n)) d2 <- data.frame(x=sample(n,n), y2=rnorm(n)) this i've got far: d <- merge(d1,d2) # 7.6 sec library(plyr) d <- join(d1,d2) # 2.9 sec library(data.table) dt1 <- data.table(d1, key="x") dt2 <- data.table(d2, key="x") d <- data.frame( dt1[dt2,list(x,y1,y2=dt2$y2)] ) # 4.9 sec library(sqldf) sqldf() sqldf("create index ix1 on d1(x)") sqldf("create index ix2 on d2(x)") d <- sqldf("select * d1 inner join d2 on d1.x=d2.x") sqldf() # 17.4 sec the match approach works when there unique key in second data frame each key value in first. if there duplicates in second data frame match , merge approaches not same. match is, of course, faster since not doing much. in particular never looks duplicate keys. (continued after code) df1 = data.frame(a = c(1, 1, 2, 2), b = 1:4) df2 = data.fra

delphi - Add multiple TFrame controls to TScrollBox -

i'm doing little offline shopping cart application here delphi , i'm stuck. need insert frame scrollbox (act shopping cart item row, can remove item, add quantity , on) on product select listview. can't add multiple frames there. procedure tfrmmain.lvproductsselectitem(sender: tobject; item: tlistitem; selected: boolean); var cartrow: tframe1; i: integer; count: integer; begin cartrow := tframe1.create(nil); cartrow.edit1.text := item.caption; cartrowarr := tobjectlist<tframe1>.create; cartrowarr.add(cartrow); count := cartrowarr.count; := 0 cartrowarr.count - 1 begin scrollbox1.insertcontrol(cartrowarr[i]); end; end; it's on frame there , can't right. if select product need insert frame, if select product need insert antoher frame. if product select alredy there, raise quantity one. any appreciated! i suspect want multiple frames in scroll box end below each other. have tried adding cartrow.align := altop;

Update record by conditions Ruby on Rails -

can update record conditions without check record first? yes, method update_all. # update books 'rails' in title book.update_all "author = 'david'", "title '%rails%'" http://apidock.com/rails/activerecord/relation/update_all

How to implement copy protection with OpenGL render -

i want implement copy protection opengl render, here idea, none of them convinced. please give me suggestions how this? changedisplaysettingsex api allows change display device configuration. uses videoparameters structure containing copy protection details. api introduced on win2k. sets copy protection settings globally per output whereas copp or opm sets copy protection settings per application window. copp api available on vrm-7 or vmr-9 directshow filters , available starting winxp. using implies need render content using directshow. happen if render our app without directshow create dummy vrm-9 set copy protection ? opm api available vista header files part of windows 7 sdk. api seems better copp, in particular, lets application set copy protection parameters monitor handles of window, seems usable without using direct 3d, directshow or pmp. copy protection doesn't work. period. there ways contents displayed on screen. if can't programm running on syste

uisearchbar - Showing a search bar in Android -

i'm having trouble when trying show search bar @ top of app. want bar visible hole application (in activities) when app starts, no need user press button, i'm trying use android's searchable function. here's i've got far: manifest.xml <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".main" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <activity android:name=".bigimageview"> <intent-filter> <action android:name="android.intent.action.search" /> </intent-filter> <meta-data android:name="android.app.searchable&quo

Help with getting to grips with node.js -

i work full time in php , javascript team looking @ new technology adopt. want dive node.js want same book have no idea best. any recommendations ? also links good. regards oliver there no real - like in actual wood - books out yet, yahoo! press has 1 in works though, title "up , running node.js" . right there's community driven e-book makers of express.js framework, source code available on github . if videos, should check out couple of talks node's creator ryan dahl: introducion node.js - yui theater (may 2010) googletecktalk - javascript on server (july 2010) techniques single stack world - jsconf.eu (sep 2010) you can find more links on our tag wiki . ps: best thing imo start little side project , use explore node.js.

c# - 3tier/ntier architecture - good examples need -

currently working single tier architecture. want use 3iter/ntier architecture. please body provide me code samples 3iter/ntier architecture implemented. thanks in advance. try start http://www.codeproject.com/kb/architecture/three_tier_architecture.aspx

ASP.NET - How do I 'follow' a redirect from a response to an http post generated by a server side process? -

i have scenario i'm not sure how handle in asp.net. i setting automated payment system conversion previous manual, user driven payment system. the system worked so: 1.the user fills in payment form, , submits form. 2.this causes http post remote page. 3.the remote page processes post data, , payment. 4.the remote page forwards web browser on call page on original website, along query string data allows recording of response. the automated system checks due payments, , works so: 1.create server side http post , submit. 2..... and here i've got to. i've got httpwebrequest, , httpwebresponse can read. the problem request doesn't seem follow response. don't see evidence of code in callback page firing. is though redirect in remote page isn't honoured unless browser used posting. hope makes sense? any pointers on how should handling type of scenario? did set allowautoredirect property true ?

javascript - Fixed position on a mobile browser for footer -

good day, have meta this <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalabale=no, width=device-width, height=device-height" /> now can height view port js want use modify footer stays @ bottom of screen using either fixed positioning. here footer css #footer { height:30px; background-color:#d9d9d9; background-image:url(../images/footer.png); background-repeat:repeat-x; margin-top:20px; width:100%; /*bottom:0; position:fixed;*/ } how modify footer using js right thing. thank you. @cyberomin. document.getelementbyid("footer").style.position = "fixed";

android - Contact API problem with save datas Options -

i'm facing basic problem didn't find tutorial in order me... i'm writing application sort of backup contact options. want applications works android phones since 1.5 2.2 so write 2 implementation of contactapi, 1 1.5, 1.6 , other new api version. here list of problem i'm facing with. with new api, nothing. works fine, backing contacts works well. but older api i'm not able backing datas : email datas (able read, not able save) im datas (able read, not able save) notes (able read first note, if many notes, lost datas, same things backup) here code i'm using : =======email======= private arraylist<email> getemailaddresses(string id) { arraylist<email> emails = new arraylist<email>(); cursor emailcur = this.contentresolver.query(contacts.contactmethods.content_email_uri, null, contacts.contactmethods.person_id + " = ?", new string[] { id }, null); email email = null;

bash - Query on find command -

when find inside directory output like ./mywork/a.c ./mywork/b.c ./mtab my question how can use find command in such way output not show ./ my output should be mywork/a.c mywork/b.c mtab thanks, linuxpenseur add -printf "%p\n" @ end.

java - Why does DecimalFormat allow characters as suffix? -

i'm using decimalformat parse / validate user input. unfortunately allows characters suffix while parsing. example code: try { final numberformat numberformat = new decimalformat(); system.out.println(numberformat.parse("12abc")); system.out.println(numberformat.parse("abc12")); } catch (final parseexception e) { system.out.println("parse exception"); } result: 12 parse exception i expect parse exception both of them. how can tell decimalformat not allow input "12abc" ? from documentation of numberformat.parse : parses text beginning of given string produce number. the method may not use entire text of given string. here an example should give idea how make sure entire string considered. import java.text.*; public class test { public static void main(string[] args) { system.out.println(parsecompletestring("12")); system.out.println(parsecompletestring("12abc"

api - Architecture to develop an application in java that could be used with desktop and web interface too -

i'm developing java application or service execute remote commands or applications , receive results of these commands. , think project application possible use swing interface or web interface. i have take care parameters pass businnes classes , how deal results. need use architecture , project let me able use classes desktop application or web application too. i believe related api , service design. popular applications have web interface or dashboard control services, , services manageable agents installed execute demons, services or applications. start or stop commands database systems, directory services other tasks there guides how develop applications , services in java can use web , desktop environments? i felling bite confusing this, because in mind if choose develop swing approach thinks turn clear me. when imagining same project using web perspective lose directives. sorry , ihope undertand me. :-p i have been in similar situation while started w

php - Different form formatter for embeded form? -

i'm trying change form formatter of embeded form. possible approach this? class sfouterform extends sfform { public function configure() { $innerform = new sfform(); $this->embedform('inner', $innerform); $this->getwidgetschema()->setformformatter('list'); $this->getembeddedform('inner')->getwidgetschema()->setformformattername('table'); } } i'm expecting following: echo (new sfouterform()) outputs: <li><label>outer label</label><input type="text" /></li> <li> <table> <tr><td><label>inner label</label></td><td><input type="text" /></td></tr> </table> </li> once form embedded, it's original widget schema , validator schema nothing - they've been merged top level schemas. thus, need set form formatter before embedding: $this->getwidgetschema

coldfusion - SQL... Get Value from Field based on Max value of Another Field -

having complete sql mental lapse today , can't figure out. coldfusion , ms access i'm looking query of query in coldfusion. original query: <cfquery name="myquery" datasource="xxx"> select name, id, tblloc.directions, tblloc.locationorder mytable ..... order tblloc.locationorder </cfquery> i want create query query retrieve directions locationorder max. thus, if myquery returned: name id directions locationorder aa 10 aaaaaa 1 bb 11 bbbbbb 2 qoq return: directions bbbbbb but every iteration of seemingly simple sql i've tried fails. must half-asleep or something. <cfquery name="latestdirections" dbtype="query"> select directions myquery locationorder=(select max(locationorder) myquery) </cfquery> <cfquery name="latestdirections" dbtype="query"> select directions, max(locationorde

iphone - RemoteIO Audio Problem - simulator = good - device= bad -

o.k , i'm using core audio extract audio 10 different sample sources , mixing them in callback function. it works perfect in simulator , well. ran trouble when tried run on 4.2 iphone device. if mix 2 audio files in callback ok. if mix 5 or 6 audio files audio plays after short amount of time audio degrades , no audio go speakers. (the callback not stop). if try mix 10 audio files callback runs no audio @ comes out. it's callback running out of time might explain case mix 5 or 6 not explain last case mixing 10 audio sources no audio @ played. i'm not sure if following has bearing message prints console when i'm debugging. indication problem is? mem 0x1000 0x3fffffff cache mem 0x40000000 0xffffffff none mem 0x00000000 0x0fff none run running… [switching thread 11523] [switching thread 11523] re-enabling shared library breakpoint 1 continue warning: unable read symbols /developer/platforms/iphoneos.platform/devicesupport/4.2.1 (8c148)/symbols/usr/lib/info/