Posts

Showing posts from April, 2012

Make a login into dbo for a database in SQL Server -

i attempting migrate sql server 2005 sql server 2008. both of these database instances hosted on 3rd party shared servers not have full permissions to. using mixed mode authentication. i running trouble setting new database same way old 1 set up. specifically, new web-based control panel doesn't allow dbo specified when creating new database , when using red gate sql compare sync schemas having problems because objects (that don't explicitly specify dbo in script) being created prefix of user account rather dbo. i have poured on documentation trying find way force login "user1" dbo "db1" database. came conclusion script should this: alter authorization on database::db1 user1 before running script, login "user1" exists, not user database "db1". note had submit script support of hosting company in order run it. according hosting company statement executes, when compare databases using sql compare user "user1" has not b...

xcode - custom background in uinavigationbar non application-wide, different for each view -

i found lot of solutions make custom background in uinavigationbar, application-wide, how same things in each view (each view have different background? this quite hard correctly, can make subclass has configurable background image first effort. switch background image navigate from/to other views. you must set tintcolor of bar when change background, bar buttons colored correctly.

java code corresponding to Newtonsoft.Json.JsonConvert.SerializeObject(Object source,Newtonsoft.Json.JsonSerializerSettings()) in .net? -

i have code in .net serializes request json format ... code this. var ops = new newtonsoft.json.jsonserializersettings(); ops.nullvaluehandling = newtonsoft.json.nullvaluehandling.ignore; ops.missingmemberhandling = newtonsoft.json.missingmemberhandling.ignore; ops.defaultvaluehandling = newtonsoft.json.defaultvaluehandling.ignore; ops.converters.add(new newtonsoft.json.converters.javascriptdatetimeconverter()); string strso = newtonsoft.json.jsonconvert.serializeobject(source, bindent ? newtonsoft.json.formatting.indented : newtonsoft.json.formatting.none, ops); i tried java code corresponding portion doesn't work. from understanding, newtonsoft serializer takes object member variables , outputs json string represents object. so can like: product product = new product(); product.name = "apple"; product.expiry = new datetime(2008, 12, 28); product.price = 3.99m; product.sizes = new string[] { "small", "medium", ...

html - FileUploader accept="image/*" validation problem -

i added accept="image/*" attribute file uploader <input type="file" name="imageuploader"> . i select image file in uploader. , try send data server. imageuploader set error , add class="input-validation-error" . why happens? you should try specifying type in php imageuploader , if still have problems, add each image type seperately e.g. == "image/jpeg" or "image/png" or "image/gif"

ruby - How to beautify xml code in rails application -

is there simple way print unformated xml string screen in ruby on rails application? xml beautifier? ruby core rexml::document has pretty printing: rexml::document#write( output=$stdout, indent=-1, transitive=false, ie_hack=false ) indent: integer. if -1, no indenting used; otherwise, indentation twice number of spaces, , children indented additional amount. value of 3, every item indented 3 more levels, or 6 more spaces (2 * 3). defaults -1 an example: require "rexml/document" doc = rexml::document.new "<a><b><c>text</c><d /></b><b><d/></b></a>" out = "" doc.write(out, 1) puts out produces: <a> <b> <c> text </c> <d/> </b> <b> <d/> </b> </a> edit: rails has rexml loaded, have produce new document , write pretty printed xml string can embedded in <pre> tag.

c++ - Terminate application AND call the destructors of local objects -

i have objects on stack in main function: int main(...) { cfoo foo; cbar bar; } also, have function, keeps track of errors in application: void err(std::string msg) { somehowlogerrormessage(msg); exit(1); } err function useful when have report fatal error. log error , terminate application - cannot recover after such errors. however, terminating "exit()" not invoke foo , bar destructors - behavior, expected (but wrong). "abort()" doesn't either. also, i cannot use exceptions catch them in main(). there other way implement err function so, terminates app , correctly cleans stack objects? or should somehow redesign error handling? thanks! p.s. way, can't send wm_quit message main window? not winapi, app pure win32 , err() function can handle main window. work? not without exceptions or returning err way callstack. need unwind stack.

html - PHP CodeIgniter echo svg graph (SVGGraph) -

so i've begun working svggraph http://www.goat1000.com/svggraph.php .. i'm quite happy it's not playing nice inside codeigniter app. i have function create graph. @ end can call either $graph->render('piegraph') or $graph->fetch('piegraph') ideally i'd able call function return graph echo graph wherever needed. currently, can header/content type set "image/svg+xml" problem can't print out else in document then. any ideas on how can svg's work inline html can insert them regular graphic. thanks. p.s. post code here don't have near correct. :) thanks. i haven't tested should work you, class test extends ci_controller { // here in method define svg graphics function get_svg() { header('content-type: image/svg+xml'); $graph = new svggraph(640, 480); $graph->colours = array('red','green','blue'); $graph->values...

.net - private members naming convention -

in our project use both vb.net , c# code. now, microsoft seems not recommend using "_" or "m" prefixes private fields (like _backcolor backcolor ). from other part, used visual studio "c# standard" lowercase private field can't applyed in vb.net code, because vb not support distinguishing identifiers case. what think? ps. studying little bit more ms conventions find out microsoft have no public recommendations of private fields naming, can use of desired... the whole point of standard promote consistency , understanding. in case because have multiple languages i'd go either "_" or "m" make sure document why you've made decision in 18 months time new hire (or you) doesn't @ code , go "wtf?".

ajax - jQuery mobile $(document).ready equivalent -

in ajax navigation pages, classic "document ready" form performing initialization javascript doesn't fire. what's right way execute code in ajax loaded page? (i mean, not ajax... it's jquery mobile page navigation system brings me page) ok, did suspect that... lot =) but... still doesn't work, here's code: <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>mypage</title> <link rel="stylesheet" href="jquery.mobile-1.0a4.min.css" /> <script type="text/javascript" src="jquery-1.5.min.js"></script> <script type="text/javascript" src="jquery.mobile-1.0a4.min.js"></script> <script type="text/javascript...

c# - Is there a kind of design pattern or a methodology to delete a record on Db from UI? -

is there commonly referred methodology or kind of design-pattern or model when comes delete record user interface exists in database? basically following steps should taken , when (like validation, deleting main record, how handle when there a conflict reference constraint how handle exceptions or notifying user on failure (how transfer bl failure info ui; catching exceptions or report object etc.) , more or less common issues regarding deletion context. delete link in web ui should open "delete page". on "delete page" should validate preconditions existing of related records. not display form if validation fails. post "delete page" should validate preconditions again , delete database record in 1 database transaction if second validation fails or database exception raised display general error message.

PHP Ternary Operator not working for this code -

i use ternary operator below code.. <?php if($users['active'] == 1 ) { echo 'yes'; } else { echo 'no'; } ?> i tried using code , not work.. <?php ($users['active'] == 1) ? echo "yes" : echo "no"; ?> what wrong? the echo goes outside of it, not in, (the ternary operator) returning value, not codeblock. <?php echo ($users['active'] == 1 ? "yes" : "no"); ?>

Send data from jQuery to PHP for mailing -

i’ve javascript file i’ve been using template site i’m working on , in script there simple form validation – if no error occur – sends data php page called contact.php. but i’m unsure on how “grab” data send javascript in php site? contact.php works – is, if i, in form, direct directly contact.php sends mail without problem. in file send variables this: $name = $_post['formname']; , on , in end send mail function. the code in javascript file sends data , display “successful” message on same page is: $.post("contact.php", { formfrom: fromvalue, formname: namevalue, formmessage: messagevalue }, function(data){ $("#loadingimage").fadeout("fast", function() { $("#loadingimage").before('<p>the message has been sucessfully send. thank you!</p>'); }); } ); the namevalue, messagevalue, fromvalue set in form validation var messagevalue = $("#formmessage").val(); . any appreciated. ...

php - codeigniter home page url -

i have codeigniter folder has entire application many pages of site maybe dont understand way link home page.... here problem, have folder named ci , content format ~/sites/ci$ ls -la total 56 drwxr-xr-x@ 18 tamer staff 612 apr 8 17:26 application drwxr-xr-x 11 tamer staff 374 apr 11 09:46 css drwxr-xr-x 6 tamer staff 204 mar 24 14:20 graphics -rwxr-xr-x@ 1 tamer staff 6321 apr 7 12:20 index.php drwxr-xr-x 17 tamer staff 578 apr 11 09:54 js -rwxr-xr-x@ 1 tamer staff 2496 apr 7 12:20 license.txt drwxr-xr-x@ 10 tamer staff 340 apr 7 12:20 system drwxr-xr-x@ 16 tamer staff 544 apr 7 12:20 user_guide as can see folder named ci has application folder , if put on server have navigate http;//mysite.com/ci not want. how make work without having use ci in url i'm not totally sure (so correct me if i'm wrong), way codeigniter allows use nice urls using .htaccess file rewrite. goes through index.php file. if true try move ...

charts - Seeking OSS charting library for 2-D grids, like the old Windows defrag -

i'd chart future chunks of work on systems. hours on 1 axis, hardware on other, i'd various rectangles representing future activites, not rooted on either axis. i'm imagining old windows defrag, different colored blocks each pending block. i've looked @ flotr , gnuplot , , others. they're slick, none of them seem have particular device. suggestions? ( i've thought toughing out w/ perl , gd , rolling own. ) may 1 of plots ok you? produced mathgl -- gpl plotting library. possible set hours on axis manual ticks (for v.1.* , v.2.0) or time ticks (like strftime() format, v.2.0). manual ticks can used hardware icon/text (as unicode symbols, example). position of bars defined current axis origin , can different different series.

asp.net - How to remove namespace from Inherits Attribute without a Parser Error, Could not load type -

i've seen lots of posts inherits attribute, , parser error "could not load type" i can working putting "rootnamespace.pagename" specific page, rootnamespace matches root namespace in project properites. but rather not put namespace in there. i.e. rather put "pagename" "namespace.pagename". i have library project few dlls , 10 or .aspx , .ascx files. update of library project, other projects in company copy dlls in , copy .aspx , .ascx files specific folder in project. only problem every time copy have change namespace of inherits attribute match root namesapce in project. if don't this, no compiler errors parser error when hit libary .aspx , .ascx files. this annoying, seems ridiculous many pages not work if project root namespace changes. does have ideas on how can make library pages , user controls nuse withing other peoples projects? thanks, mike g ah ha! colleague stumbled upon way around accident... ok h...

search - Implementing filters in django for e-commerce website -

i implementing e-commerce website using django. product catalog big (hundreds of products). know how should implement product filters in search. e.g. let's put 30 products initially. user might want filter search based on product attributes color, size, category, etc. is there feature in django enables building such features? if not, how should go it? querying database everytime user picks attribute, approach? thanks. i think looking faceted search . haystack should django app looking for. furthermore take @ django-filter

jquery - J-query-Styles disappear on ListItems of checkboxlist when autopostback is set to true -

i using jquery style checkboxlist, problem is, jquery styles check box list , when listitem pressed , style lost, guess due autopostback=true, cant disable coz want call postback populate datalist depending on selected checked item, there alternative or suggestions . i using http://www.no-margin-for-errors.com/projects/prettycheckboxes/ style checkboxlist sounds me you're styling page in $(document).ready(...); problem executes once when page loads initially. if loaded asynchronously, lose dynamic style. have @ least 2 options: factor out code styles checkboxes. hook event gets raised when auto-postback done. apply styles statically checkboxes using css. jquery styles nothing add css classes. can same thing in html, inspect elements in web development tool , find out how they're styled.

c++ - template code returntype overload not compiling. whats wrong -

i trying following code overload simple function work multiple types. however, fails compile. can 1 please tell me whats wrong , how fix this? typedef struct str1_type { int f1; int f2; } str1; typedef struct str2_type { char f1[100]; char f2[100]; }str2; template <typename t1, typename t2> t2 getfieldoffset(const t1& t, int i); int main() { str1 str1; str2 str2; int = getfieldoffset(str1,0); const char* test = getfieldoffset(str2,0); } template <typename t1, typename t2> t2 getfieldoffset(const t1& t, int i) { switch (i) { case 0: return t.f1; case 1: return t.f2; default: { cout << "invalid index passed: i" << << endl; return null; } } } here error message: test2.cpp: in function 'int main()': test2.cpp:73: error: no matching function call 'getfieldoffset(str1&, int)' ...

symfony1 - In symfony 1.4, is there a way to override or extend parts of a generated schema.yml? -

we using symfony 1.4 doctrine. because of nature of our development, 3 of working on project need regenerate our schema, model, forms , filters every morning. i want keep table set "versionable" in schema. if re-generate schema php symfony doctrine:build-schema , resulting file not have actas: in anymore, , need copy , paste before re-generating model, forms , filters. is there way extend schema.yml can avoid copying , pasting snippet of code every morning keep configuration constant? if so, how far need go in extending file? example, can include actas: individual table, or need define table in entirety? when regenerate model, regenerate base* files. extending setup() method contained in base* classes in * classes (you can find them 1 directory up) might solution add versionnable behavior permanently. think handy import modified schema.yml instead of modified tables, unless don't want loose data. can't apply version of schema.yml development ma...

c++ - CMake set_target_properties and include_directories -

my question largely related this (unanswered) question on cmake mailing list. essentially want know behaviour of include_directories behind scenes of visual studio 2010 generator; directories previous calls include_directories overwritten when this: set_target_properties(${target} properties compile_flags /i${some_directory}) the comments on mailing list "it shouldn't", seems behaviour seeing. understand projects in vs2010 little more complicated, unable find definitive answer. bug 2010 generator? i'm using visual studio 2010 sp1 , cmake 2.8.4 i haven't seen cmakelists.txt, ordering of include paths good? think order of include paths not defined if way. see: /i compiler option , set_target_properties , include_directories documentation.

Attach WYSIWYG to custom Drupal form -

i have custom module implementing system settings form, , attach wysiwyg text area field. however, nothing doing having affect. using latest wysiwyg module ckeditor. there no js errors. on screen plain text area. code: $form['mymodule'] = array( '#type' => 'fieldset', '#title' => t('settings'), ); $form['mymodule']['email_content'] = array( '#title' => 'email content', '#type' => 'textarea', '#description' => t('the content of message emailed user when license key assigned. can use [user_fullname] , [user_license_key] substitute user name , license key, respectively.'), '#default_value' => variable_get('mymodule_email_content', ''), ); $form['mymodule']['format'] = filter_form(2); all seems provide filter selection. got page: http://drupal....

reportingservices 2005 - Incorrect data in SSRS Reports -

my reports getting data cube. refreshed cube everytime when have use cube or report. the problem getting required data in cube, in part(some columns) of reports getting wrong data. for example cube getting data a,b,c, d,e,f,g (these measures) & x,y,z dimensions using in cubes. in reports there 3 columns test1, test2, test3. test1 has expression (sum(a)/sum(b)) test2 has expression (sum(c)/sum(d)) test3 has expression (sum(e)/sum(f)) i getting right data test1 & test2 not test3. what reason. have checked expressions. there no problem expression. is there else besides refreshing of cube. means refreshing of reports on server? thanks, shashra ssrs caches original dataset when previewing report. after deploy report, data being reported correct.

excel - I want to parse an online document using C# 4.0 and get the name, address, phone and email? -

i want parse , extract top portion , export portions excel headings, best way accomplish this? parse file (no way here based on explanation) create output xml file. write values xml stream proper excel tags.

tfs - SQL Server Analysis Services and Team Foundation Server -

i attempting setup team foundation server, running problem regarding sql server analysis services. the installer gives warning saying analysis services not running. analysis services installed when installed version of sql because have deployment wizard etc, there not service showing in services window running. i tried run deployment wizard wants me specify database connect to, , can't create database because cant connect analysis services. there appears fundamental missing here, if give me guidance appreciate it. the ad account install , configure tfs 2010 has have administrative privileges in cube. should able connect using sql server management studio. needs these privileges during configuration create , setup cube.

onclick - Help with HTML server request syntax - concat strings -

i trying execute script when button pressed on webpage. following code works: <input type="button" onclick="newajaxcommand('focuser1.htm?moveout=100');" value="out" style="width: 130px; height: 80px"> instead of sending hardcoded value of 100 want send whatever number entered in textbox on page looks this... <input type="text" name="inc" maxlength="10" style="width: 80px" value="10"> <input type="submit" name="setinc" value="set" style="width: 75px;"> so sure have syntax wrong want do: <input type="button" onclick="newajaxcommand('focuser1.htm?moveout=" + document.getelementbyid('inc').value" ');" value="out" style="width: 130px; height: 80px"> is possible? yes, possible <input type="button" onclick="newajaxcommand(...

Objective-C / Cocoa bridge in PHP? -

is there objective-c or cocoa bridge/connector php? i'm interested in mac development, want php. it'd if recommend me php compiler mac. note: know titanium -like apps, , that's not want. thanks. looks there's 1 here: http://www.slideshare.net/wezfurlong/hot-chocolate-you-got-cocoa-in-my-php (download link in slides) there's little in php going favors mac development, though. if want mac development language has more familiar syntax , don't want deal memory issues , such, doing coding macruby or rubycocoa shouldn't of jump previous php experience.

How to use TFS 2008 with Delphi 7 via MSBuild -

has had luck using msbuild delphi 7 part of tfs 2008 (microsoft team foundation server 2008) integration? curious if possible, , if is, necessary set up. thanks! update : aware later versions of delphi use msbuild, appear right upgrading isn't option. to use msbuild delphi 7, must first produce representative .dproj file bearing correct xml markup (as seen in later versions of delphi). if construct them properly, msbuild recognize them, , (as directed in xml markup) place appropriate calls delphi 7 compiler. it's simple enough, takes lot of effort manually produce .dproj markup! edit : this guy offers apparently-functional automated solution problem, available on request!

vb.net - Date instead of DateTime? -

from can tell date , datetime have same functionality. there reason why want use 1 instead of other? in vb.net date alias system.datetime , yes, they're same thing. can see aliases in this chart on msdn.

java - How to get text & Other tags between specific tags using Jericho HTML parser? -

i have html file contains specific tag, e.g. <table cellspacing=0> , end tag </table> . want between tags. using jericho html parser in java parse html. possible text & other tags between specific tags in jericho parser? for example: <table cellspacing=0> <tr><td>hello</td> <td>how you</td></tr> </table> answer: <tr><td>hello</td> <td>how you</td></tr> once have found element of table, have call getcontent().tostring(). here's quick example using sample html: source source = new source("<table cellspacing=0>\n" + " <tr><td>hello</td> \n" + " <td>how you</td></tr>\n" + "</table>"); element table = source.getfirstelement(); string tablecontent = table.getcontent().tostring(); system.out.println(tablecontent); output: <tr>...

c++ - How to compile a program to make it capable to use >4GB memory on 32-bit Linux? -

the whole code written in c, c++, , fortran. possible make use more 4gb memory. crashed when reaches 3gb memory. if possible, how set compiling options (or configure flags)? we can use gcc, g++, ...or intel compilers our os: fedora 12 x32 cat /proc/cpuinfo flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority bogomips : 5319.72 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual unfortunately hitting limit that r> 2^32 [1] 4294967296 which 4 gb limit. cannot index beyond for single application , no matter os. this 1 of reasons many of switched 64 bit versions of our oss. linux has supported since late 1990s. switch fc (or ubuntu or ...) in 64bit. one possible alternative installi...

Manipulate Windows Process Input/Output Stream with Powershell? -

is there builtin functionality powershell allows examine system processes in great detail, , view/manipulate i/o stream? there community modules? has worked process streams , know of references such work? the standard cmdlets provided powershell allows basic operations on processes. get-process cmdlet returns running processes objects detailed information process. can modules process loaded using parameter -module . can use start/stop process cmdlets manage list of running processes. however, returned objects give information may search for. get-process returns objects system.diagnostics.process , while get-process -module returns objects system.diagnostics.processmodule .

wolfram mathematica - How to intercept assigning new value for the In variable? -

i wish intercept assigning new values in variable. i have tried defining upvalues in not in case: unprotect[in]; in /: set[in[line_], expr_] /; ! trueq[$insideset] := block[{$insideset = true}, print[holdform@holdform[expr]; set[in[line], expr]]] in /: setdelayed[in[line_], expr_] /; ! trueq[$insideset] := block[{$insideset = true}, print[holdform@holdform[expr]; setdelayed[in[line], expr]]] is possible intercept it? p.s. question has arisen part of previous question on stage when mathematica creates new symbol s. edit i wish intercept explicitly assignment new downvalue in variable. $pre executes after assignment , after creating new symbol s in current $context : in[1]:= $pre := (print[names["`*"]]; print[downvalues[in][[all, 1]]]; ##) & in[2]:= during evaluation of in[2]:= {a} during evaluation of in[2]:= {holdpattern[in[1]],holdpattern[in[2]]} out[2]= have looked @ $pre , $preread ? $pre global variable value, ...

recursion - Non tail-recursive anonymous functions in Clojure -

how create recursive anonymous function in clojure not tail recursive? the following doesn't work, recur tail recursive functions. i'm reluctant drag in y-combinator.. ((fn [n] (if (= 1 n) 1 (* n (recur (dec n))))) 5) functions can given name refer specifying between fn , arglist: user> ((fn ! [n] (if (= 1 n) 1 (* n (! (dec n))))) 5) 120

c - some problem with byte xor -

i have make binary xor on 2 byte buffers. 1 encoding key, other encoded value. at moment code looks this: byte key[]={"somekey"} byte value[]={"somevalue"}; for(i= 0; < valllength; i++) { valbuf[i] = value[i] ^ key[i % keylength]; } this not work me. doing wrong? alright, terrible, felt writing easy code change. #include <stdio.h> char key[] = "this fancy key."; char text[] = "encrypt extremely long plaintext."; #define key_len (sizeof(key)) #define txt_len (sizeof(text)) void crypt(char *key, char *plaintext, char *ciphertext, int keylen, int ptlen) { int idx; (idx = 0; idx < ptlen; idx++) { ciphertext[idx] = plaintext[idx] ^ key[idx % keylen]; } } int main() { printf("plaintext before:\n\t%s\n", text); crypt(key, text, text, key_len, txt_len); printf("plaintext after:\n\t%s\n", text); crypt(key, text, text, key_len, txt_len); ...

r - How can I efficiently construct a very long factor with few levels? -

in r, want create factor few levels, length of 100 million. "normal" way me create factor call factor on character vector, expect method inefficient. proper way construct long factor without expanding corresponding character vector. here example of wrong way it: creating , factoring character vector: long.char.vector = sample(c("left", "middle", "right"), replace=true, 50000000) long.factor = factor(long.char.vector) how can construct long.factor without first constructing long.char.vector ? yes, know 2 lines of code can combined, resulting line of code still creates gigantic char vector anyway. it's not going more efficient, can sample factor vector: big.factor <- sample(factor(c("left", "middle", "right")), replace=true, 5e7)

javascript - Display a link to the status of my latest tweet using jQuery & how to execute it? -

so have jquery in <head> of page this: <script language="javascript" type="text/javascript" src="./javascript/jquery-1.2.6.js"></script> and gratefully given code display linked text reads 'read' , link latest tweet's status , looks this: jquery.getjson('http://twitter.com/status/user_timeline/brianj_smith.json?count=1&callback=?', function(data){ if (data.length > 0) { var link = jquery('<a>').attr('http://twitter.com/brianj_smith/status/' + data[0].id) .text('read'); }); now not expert @ jquery, don't know how make above jquery coding work , text "read" displayed on website, while @ same time being linked status of latest tweet. i think makes sense part. if me out great. know made post earlier, didn't understand of being said :s you add @ben's code in existing: jquery.getjson('http://twitter.com/st...

php - How come my time-value comparison is not working properly? -

if ( isset($get['when']) && !empty($get['when']) && !strtotime($get['when']) && strtotime($get['when']) < time() ) renders false forexample strtotime($get['when']) = 2010-12-06 , less time() ofc. if remove && !empty($get['when']) works fine. suggestions why? your problem !strtotime($get['when']) . strtotime returns false on failure , other values considered true statement false. think want: (strtotime($get['when']) !== false)

algorithm - How to solve: T(n) = T(n/2) + T(n/4) + T(n/8) + (n) -

i know how recurrence relations algorithms call once, i'm not sure how calls multiple times in 1 occurrence. for example: t(n) = t(n/2) + t(n/4) + t(n/8) + (n) use recursion tree. see last example of recursion tree @ clrs "intro algorithm". t(n) = t(n/2) + t(n/4) + t(n/8) + n. root n(cost) & divided 3 recursions. recursion tree looks follows: t(n) = n = n t(n/2)t(n/4)t(n/8) (n/2) (n/4) (n/8) t(n/4)t(n/8)t(n/16) t(n/8)t(n/16)t(n/32) t(n/16)t(n/32)t(n/64) n---------------------------------> n (n/2) (n/4) (n/8)--------------> (7/8)n n/4 n/8 n/16 n/8 n/16 n/32 n/16 n/32 n/64)--------> (49/64)n ... longest path: leftmost left branch = n -...

asp.net mvc 3 - RenderPartial renders on Dev but fails on Production server -

i'm calling renderpartial primary view 'user' exists: @{html.renderpartial("displaytemplates/uinfo", user);} works on dev machine production server tossing runtime error: the partial view 'displaytemplates/uinfo' not found or no view engine supports searched locations. following locations searched: ... the following locations searched: ~/views/account/displaytemplates/uinfo.aspx ~/views/account/displaytemplates/uinfo.ascx ~/views/shared/displaytemplates/uinfo.aspx ~/views/shared/displaytemplates/uinfo.ascx ~/views/account/displaytemplates/uinfo.cshtml ~/views/account/displaytemplates/uinfo.vbhtml ~/views/shared/displaytemplates/uinfo.cshtml ~/views/shared/displaytemplates/uinfo.vbhtml my file _is listed - shared/displaytemplates/uinfo.cshtml , works locally. in case it's relevent - i'm taking liberties of freely switching , forth between razor , legacy .aspx views. concerned possible complications of intermingling 2 point i've...

Problem passing string argument to MVVM LIght RelayCommand<T> -

i have defined command this: switchthemecommand = new relaycommand((t) => lookandfeelhelper.switchtheme(t)); where string name of theme want switch to, selected button click on listbox. listbox button have theme name afaict. problem when relaycommand bound button command, instead of seeing method lookandfeelhelper.switchtheme(t) int debugger, see following: - execute {method = {void b _b(system.string)}} system.action i expected see real method being invoked. relaycommand no arguments, expected method name there in _execute. i have taken away 'canexecute' example. any ideas? probably typo in question believe command definition should switchthemecommand<string> = new relaycommand((t) => lookandfeelhelper.switchtheme(t)); other that, not see wrong provided, make sure lookandfeelhelper.switchtheme(string theme) working correctly.

php - Best way to store serverside data? -

what best way store data on server, can updated using php? in case storing number. should use: mysql table .txt document if don't need search, update , order data, can use .txt file.... if need query data, highly recommend database (mysql example). if store 1 number, can using .txt file.

python - Sending file via email to MMS for AT&T -

one can send messages at&t customer via [10-digit-cell-numer]@txt.att.net email client. tried send file iphone using method (specifically audio file) no avail. message came through file attachment not present. it seems can send mms messages @mms.att.net that easy.

makefile - Qt How to make and install plugins? -

i use qt quick components desktop mentioned here: http://labs.qt.nokia.com/2011/03/10/qml-components-for-desktop/ the author gives following installation-instructions: since of developed plugin qt itself, need started qt 4.7.2 sdk. check out http://qt.gitorious.org/qt-components/desktop , equivalent of qmake && make install on system. i cloned repository, executed qmake , mingw32-make , mingw32-make install on in command-line. new folder created includes files libstyleplugin.a , styleplugin.dll. i don't know them. sample-qml-files (using components try install here) show nothing in qml-viewer, means aren't isntalled correctly. so supposed do? (btw. i'm on windows). hedge, i've done on linux believe able same on windows. built plugin good. cause seems "make install" doesn't work (lets not blame trolls - experimental project), need manually. need following: create "imports" directory inside directory whet...

matlab - geometric random graph in a circle -

i wanted generate set of coordinates distributed uniformly @ random within ball of radius r. there way in matlab without loops, in matrix-like form? thanks update: i'm sorry confusion. need generate n points uniformly @ random on circle of radius r, not sphere. the correct answer here http://mathworld.wolfram.com/diskpointpicking.html . distribution known "disk point picking"

scroll - Jquery slider using scrollTo buggy -

i trying develop jquery slider using popular slideto plugin. have whipped jfiddle can see example of slider made, code: http://jsfiddle.net/mh7mh/ the result buggy. doesn't seem loop around when have reached last slide, , should. take @ jquery - created if statement resets variable tells scrollto scroll to. code pretty self explanatory. any fixing huge help. thanks! you have multiple bugs in logic of functions. here's revamped version of js: // defining these vars in every function, not global vars var jesse = 0; var lastslide = 3; // numslide var off one, renamed lastslide // adding these events multiple times each li $("#controls a.next").click(function() { (jesse==lastslide)?(jesse=0):(jesse++); $("#contentslider").stop().scrollto('li:eq(' + jesse + ')', 500); return false; }); $("#controls a.prev").click(function() { (jesse==0)?(jesse=lastslide):(jesse--); $("#contentslider")....

Kohana URL Confusion -

my bootstrap.php file looks this, , code embed in welcome controller->action_index. kohana::init(array( 'base_url' => '/kohana/', 'index' => 'index.php' )); okay if put following in in action_index form::open('test'); the action /kohana/index.php/test . links appear absolute root install location, accept when embed links in action_index index.php!!! html::anchor('controller'); the href /kohana/controller not /kohana/index.php/controller . now if put url::site('controller'); the returned value /kohana/index.php/controller . so figured use html::anchor(url::site('controller')); but href equal http://localhost/kohana/kohana/index.php/controller . what in world going on, , how fix it? kohana url system seems unintuitive , wrong. seems kind of bug in html::anchor implementation. this happens because of 127th line of html.php (v3.1.2) $uri = url::site($uri, $pro...

ajax - JavaScript: Detect form submission completion -

i have form in iframe , submit it. how can tell when submission completes? i'm using jquery submit form don't think there's callback: $("#myform").submit(); // how attach event submission complete? submission of form redirect next page. but can try ajax function http://api.jquery.com/jquery.ajax/ adding callback easy as $.ajax({ url: "page.php", success: function() { dowhateveryouwant(); } });

actionscript 3 - Deployed Applet Suddenly Not Working -

i put applet uploads images via as3httpclientlib servlet. applet works fine in debug mode (through flash builder) , until today worked when deployed. from servlet logs, appears servlet never receives image(s) byte stream, therefore hunch applet not posting multipart data. can suggest should next find cause of problem? i suppose ran problem described here : in flash player 10 , later, if use multipart content-type (for example "multipart/form-data") contains upload (indicated "filename" parameter in "content-disposition" header within post body), post operation subject security rules applied uploads: the post operation must performed in response user-initiated action, such mouse click or key press. if post operation cross-domain (the post target not on same server swf file sending post request), target server must provide url policy file permits cross-domain access. so think should...

javascript - Can I redirect the browser if the user clicks 'Don't Allow'? -

i've implemented facebook login on website, using javascript api , fbml. when user clicks login, enters credentials popup window, goes next stage , clicks 'don't allow' when prompted permissions, window closes , nothing else happens. i want change when window closes, browser redirects url of choice. is possible current setup, using javascript api? i'm assuming mean xfbml, since can't use except fbjs in fbml. code fb.login documentation : fb.login(function(response) { if (response.session) { // user logged in } else { // user cancelled login } }); whatever goes in else block happens if don't authorization. top.location.href work there.

java - Audio Streaming on Android -

i need create audio streamer android. want play mp3(and other formats if possible). want able progressive download audio. knows way that? thanks! you should start checking link: http://developer.android.com/guide/topics/media/index.html apparently done video, since can specify url source stream. you have check references audio streaming , size of buffering should use, dependency rate @ you're getting data stream in question.

jsf - Output arbitrary tag element in Facelets? -

i want output tag dynamic attributes like: <foo attr1="val1" attr2="val1" attr3="val1"> contents </foo> where attribute names unknown in compile time. it's c:foreach or ui:repeat doesn't work here: <foo <c:foreach ... /> > so, there this? <x:element name='foo'> <foreach> <x:attribute name='#{"attr" + index}'> #{"val" + index} </x:attribute> </foreach> </x:element> thanks. you can f:attribute (xmlns:f=http://java.sun.com/jsf/core), associates attribute nearest parent uicomponent. see: http://download.oracle.com/docs/cd/e17802_01/j2ee/j2ee/javaserverfaces/1.2/docs/tlddocs/ http://myfaces.apache.org/core11/myfaces-impl/tlddoc/f/attribute.html

iphone - How to reduce size of my adHoc build -

i using many images , music in app.. the music short in duration large in size .. sound in .caf format i have many sounds that why adhoc build size reached 35mb.and still have add more. i using in creating system sound... like nsurl *tapsound = [[nsbundle mainbundle] urlforresource: @"sound1" withextension: @"aif"]; self.soundfileurlref = (cfurlref) [tapsound retain]; audioservicescreatesystemsoundid ( soundfileurlref, &soundfileobject ); i have tried use mp3 or wav sound here not working. kindly help @kumar sonu: try compressing sound files , compress images if possible. note : compressing audio files may deteriorate sound quality , may decrease kbps hope helps you.

Efficient algorithm to produce the n-way intersection of sorted arrays in C -

i need produce intersection between sorted arrays of integers in c. know how find intersection between 2 sorted arrays, need more 2 arrays, efficiently , without prior knowledge of number of arrays. can impose sensible limit on maximum number - let's ten now. these arrays anywhere few items couple of hundred thousand items long, , no means same length. pseudo-code producing intersection of 2 sorted arrays: while < m , j < n do: if array1[i] < array2[j]: increment else if array1[i] > array2[j]: increment j else add array1[i] intersection(array1, array2) increment increment j i working c, , after clear explanation rather code. i assume arrays sorted. lets assume have arrays a_1 a_n . have counter each array (thus, have n counters i_1 i_n , did 2 arrays). now introduce minimum-heap, contains whole arrays in manner such minimum array array lowest number pointed corresponding pointer. means, can @ ...

access vba - Trying to resolve an "invalid use of Null" in VBA -

quick snippet first: dim guid string dim givennames, familyname, preferredname, gender, comments, carer, medicarenumber, patientnumber string dim dob variant dim deceased, resolved, consultnotes boolean dim age variant givennames = null familyname = null preferredname = null gender = null dob = null comments = null deceased = false resolved = false carer = null age = null consultnotes = false patientnumber = null ' error any idea why last variable 1 trip up? i've assigned null bunch of other strings without errors. in vba/vb6, strings cannot set null; variants can set null. in addition, when declare variables inline comma-separated in question, last 1 typed string; of others typed variants. declare them on 1 line type have include type dim string, dim b string ... that's why makes sense declare them on single line. (btw, should noted deceased, resolved typed variants same reason.)

ruby on rails - multiple belongs_to relationship to three model -

the situation way.. class organization < activerecord::base has_many :role_memberships has_many :roles has_many :users, :through => :role_memberships, :uniq => true end class user has_many :role_memberships has_many :organizations, :through => :role_memberships, :uniq => true has_many :roles, :through => :role_memberships, :uniq => true end class rolemembership < activerecord::base belongs_to :organization belongs_to :role belongs_to :user end class role < activerecord::base belongs_to :organization has_many :role_memberships has_many :users, :through => :role_memberships, :uniq => true end the question how populate 3 foreign-keys in rolemembership table..when org.users.push(u) create record role_id left out... in case create rolemembership object itself, this: rolemembership.create(:organization_id => org.id, :role_id => role.id, :user_id => user.id)

c++ - Return SAFEARRAY of custom interface types to VB6 through COM -

is possible return array of defined interface objects c++ com function (vc6) vb6 client? i've scoured web , haven't been able come across describes need do. i've seen lot of passing bstr , variant types, need way have client side utilise interface type return inside array. what assume i'll need do - use safearray - use safearray vt_unknown type, in turns means need place objects array iunknown objects. from here on in i'm stumped. possible interpret iunknown type in vb6, , somehow turn type require? or going in complete wrong way... clarification: interfaces being placed in collection being used mimic struct. need pass array of structs. i've come solution suitable purposes, despite not being set out in question. my solution create com function takes safearray parameter , modifies it, instead of returning created array. vb6 client instantiates array, , passes c++ populating. envision future usage include precursor function vb6 calls det...

ASP.NET/MVC3 - solution for user-customized reports without developer intervention -

are there libraries or solutions (third party, open source or commercial) allow users create own reports, accessible front-end, without developers' intervention (for cases?) basically, using entity framework orm. application collect stats such transactions between users, pages on site have been visited, , user. have come interface allow administrator come reports joins between tables. adding difficulty user able come reports on fly without messing around code. we user go through orm reports, writing raw sql statements out of question. there ways let users define own custom 'views' of database generate reports? how let user write own linq query? or sql executed entity framework? linq can written string , executed also. @ nice tutorial . make nice editor yourselves hide query language user.

delphi - Missing units (IcePack, Generics.Collections) -

hi can find these units: (icepack, generics.collections)? have delphi 2006, think generics.collection on delphi 2010/xe the generics units added in delphi 2009 , of no use since delphi doesn't support generics. icepack not part of delphi , no doubt can located web search.

uncaught exception - Java [unchecked] unchecked case warning -

ok, i've been looking around , done alot of google searching, still can't find way avoid warning. integer result = chooser.showopendialog(null); if (result.equals(0)) { string tempholder = chooser.getselectedfile().getpath(); filenameload = new file(tempholder); filenamesave = filenameload; fileinputstream fis = null; objectinputstream in = null; try { fis = new fileinputstream(filenameload); in = new objectinputstream(fis);; } catch(ioexception ex) { ex.printstacktrace(); } try { loadfile = (arraylist<dot>)in.readobject(); } catch(ioexception ex) { system.out.println("cast fail"); } catch(classnotfoundexception ex) { system.out.println("cast fail"); } catch (classcastexception ex) { system.out.println("cast fail"); } try { in.close(); } catch(exception ex) { ...

Sending an Email via Python -

i'm attempting send email python. can tell, following code needs valid recipient , host host . i'm unsure on how host. simplest way? import smtplib import string subject = "test email python" = "python@mydomain.com" = "python@mydomain.com" text = "blah blah blah" body = string.join(( "from: %s" % from, "to: %s" % to, "subject: %s" % subject , "", text ), "\r\n") server = smtplib.smtp(host) server.sendmail(from, [to], body) server.quit() the host smtp relay provided isp (typically related domain name of address). if use desktop mail client, you'll able see smtp server listed in mail settings. if you're hosting using shared hosting, hosting provider should able provide smtp server use.

c# - truncate or delete all data in table with NHibernate -

with nhibernatesession.delete(entity); can delete entity. how can truncate or delete data in table nhibernate. i can hql like: session.createquery ( "truncate tablename"). executeupdate () there other options? batch, data oriented operations not nhibernate intended for. use session.createsqlquery() , specify whatever sql under normal situations. however, should consider whether need use nhibernate particular task - doesn't make sense to.

mysql - How to tell heroku to use rails 3 and ruby 1.9.2 for a newly created app? -

i created new app on machine using rvm ruby1.9.2p0 , rails 3.0.1, , did following: rails new -j -d mysql appname git init git add . git commit heroku create and app created. when do: heroku rake db:create --trace i get: can't connect local mysql server through socket '/var/run/mysqld/mysqld.sock' (2) couldn't create database {"reconnect"=>false, "encoding"=>"utf8", "username"=>"root", "adapter"=>"mysql2", "database"=>"app_production", "pool"=>5, "password"=>nil, "socket"=>"/var/run/mysqld/mysqld.sock"}, charset: utf8, collation: utf8_unicode_ci (in /app) ** invoke db:create (first_time) ** invoke db:load_config (first_time) ** invoke rails_env (first_time) ** execute rails_env ** execute db:load_config ** execute db:create and when do: heroku rake db:migrate --trace, trace has lines like: /app/.bu...

Android - Using Reflection for Admob Libraries -

how can use reflection admob libraries code compile , run if admob jar not included? try{ class arcls = class.forname("com.google.ads.adrequest"); constructor ct = arcls.getconstructor(new class[0]); object adrequest = ct.newinstance(); class avcls = class.forname("com.google.ads.adview"); //testmode method methtestmode = arcls.getmethod("settesting", new class[]{boolean.type}); methtestmode.invoke(adrequest, new object[]{new boolean(true)}); //end testmode method methloadad = avcls.getmethod("loadad", new class[]{arcls}); object adview = act.findviewbyid(r.id.adview); methloadad.invoke(adview, new object[]{adrequest}); }catch (exception e){}

Problem getting JQuery BBQ to work -

i'm still new javascript/jquery, , want learn how utilize seemingly nice plugin. i have linked both jquery , bbq this: <script src="lib/js/jquery.ba-bbq.min.js"></script> <script src="lib/js/jquery.min.js"></script> i have inserted code, given in examples of simple implementation on ben alman's site. can explain me, need edit? , kind of divs/tags/classes need test this? would appreciated. $(function(){ // keep mapping of url-to-container caching purposes. var cache = { // if url '' (no fragment), display div's content. '': $('.bbq-default') }; // bind event window.onhashchange that, when history state changes, // gets url hash , displays either our cached content or fetches // new content displayed. $(window).bind( 'hashchange', function(e) { // hash (fragment) string, leading # removed. note // in jquery 1.4, should use e.fragment instead of $.para...

version control - Storing generated files in Git -

we have reasonably large, , far messy code base wish migrate using git. @ moment, it's big monolithic chunk can't split smaller independent components. code builds large number of shared libraries, source code interleaved can't cleanly separated separate repositories @ moment. i'm not concerned whether git can cope having code in single repository, problem need version both source code , many of libraries built it. building scratch takes hours, when checking out code, developers should precompiled versions of these libraries save time. and use advice. libraries don't need 100% date (as maintain binary compatibility, , can rebuilt individual developer if necessary), i'm looking ways to avoid cluttering our source code repository countless marginally different versions of binary files can regenerated source anyway , while still making libraries accessible developers don't have rebuild scratch. so i'd way achieve following. the libraries genera...

symfony1 - is symfony system wide? -

i have directory .php files in it...do need install symfony in directory can run symfony commands directory?? tried: pear channel-discover pear.symfony-project.com and got: channel "pear.symfony-project.com" initialized the tried: pear install symfony/symfony and got: warning: configuration download directory "/build/buildd/php5-5.3.2/pear-build-download" not writeable. change download_dir config variable writeable dir avoid warning cannot install, php_dir channel "pear.symfony-project.com" not writeable current user how fix please? must run sudo?? thanks if remember well, symfony "system-wide" if installed through pear (like trying do). now recommended manual "standalone" install through svn. see http://www.symfony-project.org/gentle-introduction/1_4/en/03-running-symfony as well, sandbox bring "standalone" installation of symfony (you have in project root directory able run symfony commands) edit...

php - XML element holds non xml elements (not wrapped in cdata) -

i using simple xml php , trying parse <content> element part of following tree: <entry> ... <title> ... <link> ... <summary> ... <content> the problem <content> element cannot read string because has "non string" content not wrapped in cdata: <content type="xhtml" xml:lang="en-us" xml:base="..."> <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>text... text...</strong> text <a href="..." target="_self">link</a>. text</p> </content> i use following code: $xml = simplexml_load_file($feed_uri); and then: foreach($xml->entry $entry){ $item = new rssitem(); $item->title = (string) $entry->title; $item->content = (string)$entry->content; $item->date = (string) $entry->published; my content member var empty. others expected if change $item->content = (string)$e...

c# - string array to datarow array -

i assign string of array datarow array my code follows protected void btngenerate_click(object sender, eventargs e) { datarow[] drow; foreach (gridviewrow grrow in grdach.rows) { checkbox chkitem = (checkbox)grrow.findcontrol("checkrec"); if (chkitem.checked) { chkitm = true; chkcnt++; strbanktypeid += ((label)grrow.findcontrol("lblbanktype")).text.tostring(); strbnkarray = strbanktypeid.split(','); foreach (string str in strbnkarray) { //here have assign string of array datarow } } } } can 1 me you'll want set gridviewrow.dataitem http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridviewrow.dataitem.aspx

php - Integration between Webservices and Website -

i have web services running on central server(debian) on apache. have multiple remote machines call these webservices. 1 of webservice status/healthcheck webservice - each remote machine has cronjob calls status webservice every minute. point of status webservice send requests machines response status webservice. i have website running on same central server. want have communication between status webservice & website. i.e. can click on option on website & ask send request 'x' remote machine 'y'. if webservice running process, website communicate webservice & webservice send next time gets status call machine. however, since webservice not process - confused how can achieve - have suggestions. everything running on apache/php. you can have db table these fields: id, request, remote_machine, processed , save request website here immediately. later when each time remote machines call health check web service, can query table request matc...

c# - library for editing photos -

i want implement algorithm compressing bmp images. library/sdk recommend helping reading picture's pixels, , creating image pixel pixel? try tutorial. normal jobs images in tutorial format using c#: http://www.switchonthecode.com/tutorials/csharp-tutorial-image-editing-rotate for working images in pixel level see thread : how manipulate images @ pixel level in c#

objective c - iPhone: How to programmatically convert String entered by user into Init caps? -

i have textbox in user enters string. i want programmatically convert string init caps. how can that? try using uitextautocapitalizationtypewords or uitextautocapitalizationtypeallcharacters update capitalizedstring or uppercasestring you [textfield.text uppercasestring]; give characters in textfield capital letters

c++ - SmartPointer : cast between base and derived classes -

say have function : smartptr<a> dosomething(smartptr<a> a); and classes : class { } class b : public { } and : smartptr<a> foo = new b(); dosomething(foo); now, smartptr<b> object dosomething . smartptr<b> b = dosomething(foo); is possible ? kind of casting have ? right now, found believe ugly : b* b = (b*)dosomething().get() important notes : not have access smartptr , dosomething() code. instead of doing that, can : b *b = dynamic_cast< b* >( dosomething.get() ); but have check if b null.

Ajax url segments with jquery using AJAX crawling scheme -

i researching how approach loading content ajax web application i notice twitter using google ajax crawling scheme: (http://code.google.com/web/ajaxcrawling/) but instead of: http://twitter.com/who_to_follow#!key=value they using like: http://twitter.com/#!/who_to_follow/suggestions how handle segments instead of #key=value in ajax request jquery? any help/advice appreciated jon you can use dom window object load full hash fragment: q = window.location.hash.substring(1); q contain on right side of hash. can split q on '/' , reference result partitions array. there code examples here: http://goo.gl/0lj0j

installation - How Do I Apply Windows Hotfixes from an MSI using InstallShield? -

i building msi install our company's product installshield 2010, , needs apply several windows hotfixes in installation product needs run. i wondering what's way accomplish using installshield? using prerequisites? it took me while understand how define new prerequisite, , seem pretty limited in conditions provide check if hotfix installed, , what's exact windows version i'm running on. need define prerequisite each version of windows , each architecture creates massive bloat of prerequisites. until used python scripts msi run before termination apply these hotfixes, of windows server 2008 no longer possible, , installation of hotfixes fail. i remember saw sometime installation of enterprise product (sql server or oracle) applied windows hotfixes in installation process, , seemed pretty standard procedure. wondering if there convention how can done? you'll need prerequisites, installshield bootstrapper exe installs hotfixes before launching msi....

Selenium+PHPunit: foreach element in collection -

i looking way work collections of elements in selenium phpunit. let's have below code: <div class="test">aaa</div> <div class="test">bbb</div> <div class="test">ccc</div> i able work on <div> elements inside each loop, let's selecting elements based on class //div[@class='test'] $divs = ... // foreach ($divs $div) { // } in php, if want work html data, great solution using domdocument class -- means being able work dom methods -- via domdocument::loadhtml() method. loading html domdocument : $dom = new domdocument(); $dom->loadhtml('here html string'); you can instanciate domxpath object : $xpath = new domxpath($dom); allow extract data html, using xpath queries, domxpath::query() : $entries = $xpath->query('//div[@class='test']'); if ($entries->length > 0) { foreach ($entries $entry) { // work on $entry -- dom...

php - Appending the contents of a UNIX command to a div tag -

Image
i'm making unix web-based terminal learning purposes. far have made text box , output being displayed. sort of this. <?php $output = shell_exec('ls'); echo "<pre>$output</pre>"; ?> form <html> <head> <link href="/css/webterminal.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"> function shell_execute(str) { if (str.length==0) { document.getelementbyid("txtout").innerhtml=""; return; } if (window.xmlhttprequest) {// code ie7+, firefox, chrome, opera, safari xmlhttp=new xmlhttprequest(); } else {// code ie6, ie5 xmlhttp=new activexobject("microsoft.xmlhttp"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readystate==4 && xmlhttp.status==200) { document.getelementbyid("txtout").innerhtml=xmlhttp.responsetext; } } xmlhttp.open("get","exec.php?q=...