Posts

Showing posts from September, 2012

tabactivity - Android: Landscape Child Activity in a Portrait Tab Activity -

tabactivity - Android: Landscape Child Activity in a Portrait Tab Activity - i have tab activity has 3 kid activities, a, b , c. kid activities , b follow orientation of tab activity. i.e. if tab activity in portrait should , b, if tag activity landscape should , b. child activity c should in landscape orientation regardless of tab activity orientation (preferably next android:screenorientation="sensorlandscape"). possible? i have tried using android:screenorientation="sensorlandscape" c in manifest doesn't work. best can manage utilize next in c (in onresume()) this.setrequestedorientation(activityinfo.screen_orientation_landscape); and , b utilize (also in onresume()) this.setrequestedorientation(activityinfo.screen_orientation_portrait); but flips entire tab not effect i'm looking for. any help appreciated. regards. i'm newbie , can tab layout picky in it. seek making landscape, changing orientarion of 2 a/b t...

url rewriting - UrlRewriteFilter: remove parameters -

url rewriting - UrlRewriteFilter: remove parameters - i have url example.com/sample.html?h=22&w=23 how can utilize urlrewritefilter remove params url , redirect request url example.com/sample.html? need remove params because application (hosted on tomcat) not handle these. <urlrewrite> <rule> <note>forward calls sample.html sample.html no query_string</note> <from>^/sample.html$</from> <to type="redirect" last="true">/sample.html</to> </rule> <urlrewrite> you might want utilize forwards rather redirect, depends on our circumstances. url-rewriting

java - Jackson JSON mapping of superclass value -

java - Jackson JSON mapping of superclass value - i using jackson 1.8.3 in spring application map java objects json. one of java class ( child ) extends super class ( parent ) part of libary, not able modify it. (especially not able add together annotations.) i using @jsonautodetect(jsonmethod.none) because need little set of fields object, instead using @jsonproperty . class parent { public long getid(){...}; ... } @jsonautodetect(jsonmethod.none) class kid extends parent { @jsonproperty private string title; } but 1 of fields need field id superclass, don't know how tell jackson pay attending field, without modifying parent class (because can not modify it). i not able add together annotations you can add together annotations using mix-ins. see http://wiki.fasterxml.com/jacksonmixinannotations details. depending on rest of class feild/method structures are, approach might work configure visibility access of fields/methods throu...

api - Sencha Touch dynamically render a model -

api - Sencha Touch dynamically render a model - i have database construction based on eav model. each objects has different kind of metafields different names. how create model in sencha touch dynamic? thanks. regards, shafqat there's nil preventing creating models @ run time. function processeav(attributes, types){ var modeldef = { fields:[] } for(var = 0, len = attributes.length; < len; i++){ modeldef.fields.push({name:attributes[i], type: types[i]}); } ext.regmodel('newmodel', modeldef); } you can add together additional properties needed validations , associations. this isn't great you'll doing every time loaded. may improve to, on server, output model definitions whenever alter , include them mobile html document. api mobile model sencha-touch entity-attribute-value

graphics - How to render ocean wave using opengl in 3D? -

graphics - How to render ocean wave using opengl in 3D? - how render ocean waves using opengl in 3d? reply welcome. edit: is there source code renders ocean waves not using other sdk or api? it's hard larn how render read osg source code maybe. tutorials ok, attach source code. christian (above) right. question broad , hard answer. might want research , inquire more targeted question. start looking @ shallow water equations example. (i'm skipping total fluid simulations here moment) or read tessendorf's "simulating ocean waves". or have @ cem yuksel's wave particles. if don't end implementing of it, references resource you. 1 might this collection of links. not clear answer, give more go on , can point in more specific direction. opengl graphics 3d rendering

objective c - iphone getting user location at time intervals -

objective c - iphone getting user location at time intervals - i browsed through of questions in stackoverflow couldn't clear picture. working on iphone application involves getting user's location through gps , processing based on value got. wanted create sure how should implement this? using method : [locationmanager startupdatinglocation] gives me accurate location keeps on updating not want. user's location on periodic basis.i.e., every 2 minutes. how implement that? the method thought (10 sec interval): - (void)viewdidload { self.locationmanager = [[cllocationmanager alloc] init]; locationmanager.delegate = self; locationmanager.desiredaccuracy = kcllocationaccuracybest; locationmanager.distancefilter = kcldistancefilternone; nstimer *currenttimer = [nstimer scheduledtimerwithtimeinterval:10.0 target:self selector:@selector(theactionmethod) userinfo:nil repeats:yes]; } and in action method timer : - (void)theactionmethod ...

iphone - Cocos 2d application structure -

iphone - Cocos 2d application structure - i new cocos2d , want know thing cocos2d application structure. here code in appdidfinishlaunching function in default template. - (void) applicationdidfinishlaunching:(uiapplication*)application { // init window window = [[uiwindow alloc] initwithframe:[[uiscreen mainscreen] bounds]]; // seek utilize cadisplaylink director // if fails (sdk < 3.1) utilize default director if( ! [ccdirector setdirectortype:kccdirectortypedisplaylink] ) [ccdirector setdirectortype:kccdirectortypedefault]; ccdirector *director = [ccdirector shareddirector]; // init view controller viewcontroller = [[rootviewcontroller alloc] initwithnibname:nil bundle:nil]; viewcontroller.wantsfullscreenlayout = yes; // // create eaglview manually // 1. create rgb565 format. alternative: rgba8 // 2. depth format of 0 bit. utilize 16 or 24 bit 3d effects, ccpageturntransition // // eaglview...

azure - HTTP response and headers for AJAX/oData authentication? -

azure - HTTP response and headers for AJAX/oData authentication? - how odata or ajax services should respond when authentication cookie expired , it's time renew? what should server send client when an odata or ajax service access forbidden (access denied) when session credentials stale, , need renewed, perhaps redirecting adfs, openid, or azure acs idp just looking in wikipedia lets me guess should send version of 403.x first scenario, , 401 sec scenario. please confirm if above correct, , should include in response header , body well. some examples assume wrong following: silently error out ajax service , homecoming no data attempt redirect ajax phone call idp send error text client not in json format its safe play http status codes instead of cooking own tokens or of sort. since fundamentals of odata create possible client knows how communicate http, makes sense play around http status code. clients decide on particular status code. ajax ...

.net - neatupload runtime error "cant detect few class files " -

.net - neatupload runtime error "cant detect few class files " - i getting error object reference not set instance of object. description: unhandled exception occurred during execution of current web request. please review stack trace more info error , originated in code. exception details: system.nullreferenceexception: object reference not set instance of object. source error: unhandled exception generated during execution of current web request. info regarding origin , location of exception can identified using exception stack trace below. stack trace: [nullreferenceexception: object reference not set instance of object.] brettle.web.neatupload.uploadstorage.createuploadstorageconfig() in d:\__projects\brettle\neatupload\dotnet\src\brettle.web.neatupload\brettle.web.neatupload\uploadstorage.cs:55 brettle.web.neatupload.filecontrol.get_storageconfig() in d:\__projects\brettle\neatupload\dotnet\src\brettle.web.neatupload\brettle.web.neatupload\fi...

mysql - PHP Pagination Problem -

mysql - PHP Pagination Problem - i had search through many websites , tried different ways provided online, cant seen work. not load info when click next, last, first, previous. loads first page's result. please help! give thanks in advance. function retrievename($fieldname) { $i=1; if(isset($_get[$fieldname])) { mysql_connect("localhost", "root") or die(mysql_error()); mysql_select_db("intern") or die(mysql_error()); //this checks see if there page number. if not, set page 1 if (!(isset($pagenum))) { $pagenum = 1; } //here count number of results $intern = $_get[$fieldname]; $data = mysql_query("select p.`internname`, p.`internnric`, c.`internschname` `personaldetails` p, `currentinstitution` c c.`internnric`= p.`internnric` , p.`internname` '%$intern%' || p.`internnric` '%$intern%' || c.`inter...

javascript - escape_javascript is removing angle brackets - Solutions? -

javascript - escape_javascript is removing angle brackets - Solutions? - i outfitting rails 3 app (version 3.0.9) utilize ajax , jquery fluidly handle user posts. #users_info div refreshed next post submission. can work, contents of div don't render properly. specifically, jquery code in create.js.erb: $("#right_bar").html( '<%= escape_javascript(render :partial => 'shared/user_info') %>' ); results in user info div outputting: <div id=user_info> <h1> <a href=/users/101>example usera> h1> 46 posts <br> 4 discussions <br> next 2 topics <br> joined 8 days ago.div> note how escape_javascript function removes leading angle brackets on end tags in html ( becomes a>, become h1>). how can forcefulness escape_javascript avoid doing so? think relevant code, can post more if needed. update i wondering if maybe using to_json part of solution. code: <%= esca...

c# - Add one space after every two characters and add a character infront of every single character -

c# - Add one space after every two characters and add a character infront of every single character - i want add together 1 space after every 2 characters, , add together character in front end of every single character. this code: string str2; str2 = str1.tochararray().aggregate("", (result, c) => result += ((!string.isnullorempty(result) && (result.length + 1) % 3 == 0) ? " " : "") + c.tostring()); i have no problems separating every 2 characters 1 space, how know if separated string has individual character, , add together character infront of character? i understand question confusing i'm not sure how set want in words.. i'll give example: i have string: 0123457 after separating every 2 characters space, i'll get: 01 23 45 7 i want add together 6 infront of 7. note: numbers dependent on user's input, it's not same. thanks. i think asked for string str1 = "3322356"...

java - How to inject String property in a spring bean -

java - How to inject String property in a spring bean - we inject simple property configuration shown below : <bean id="myservice" class="com.aaa.bbb.ccc.myserviceimpl"> <property name="myprop" value=""/> </bean> how annotations? using @value annotation. supports spel well, means can load properties file , have @value("${someconfigurationproperty}") java spring dependency-injection

php - Get users position between friends -

php - Get users position between friends - i'm trying users position between users friends, don't have thought of how can this... i have 2 tables. table 1: friends (where users friends listed) table 2: users (where users listed) i want query check users position between friends. so if i, illustration have id 1 (with 100 credits) , friend id 2 (with 21 credits), query list position 1. you don't provide much info on table layout, it's going impossible me provide specific example. i'm afraid don't understand question, i'll give shot... first, i'll assume users table has @ to the lowest degree these columns: id (pk) credits and friends table has these columns: user (fk users.id) friend (fk users.id) now, if understand question, want rank of user's friends, based on how many credits have, so: select u.id,u.credits friends f bring together users on f.friend = u.id f.user = 1 order u.credits desc; php sql c...

how to solve this image scaling problem in android? -

how to solve this image scaling problem in android? - how design layout should back upwards screen size. see images below.. how can create screen looks same images? edit:here larger screen [wxga] displays in proper way. becoz used image button there alter alphabets(eg a,b,....) yes totally agree farray's answer. should create separate layout files , set within particular folder layout-land, layout-large-land, layout-large, etc. , create different drawables different densities , set drawables within suitable folder drawable, drawable-hdpi, drawable-ldpi, drawable-mdpi, etc. for example: update: as want set buttons alphabets, in case should utilize gridview , define custom adapter imagebutton , set same adapter within gridview, sure looks perfect per requirement. reference, suggest go through this: http://www.firstdroid.com/2011/02/06/android-tutorial-gridview-with-icon-and-text/ android image android-layout scale

html5 - Get Line co-ordinates in Javascript -

html5 - Get Line co-ordinates in Javascript - i drawing lines using canvas (html 5), since lines/shapes not stored objects in canvas, cannot attach unique events (eg onmouseclick) i wish attach onmouseover event line, possible getting know if mouse if on particular line (using 2 x , 2 y co-ordinates) in canvas using javascript. work different line widths (eg: 2,5 pixels) want avoid using svg entire project built on canvas please advice you need utilize math formulas calculate area of line , whether point intersects it. here's basic example: find mouse coordinates relative position of canvas (how find mouse pos on element) calculate whether mouse x/y within rectangle (point in rectangle formula) done. javascript html5 javascript-events canvas

delphi - .cvs to .ctt convert -

delphi - .cvs to .ctt convert - goodday all, i want know how can write .ctt file .cvs file? has msn contact list. hotmail works .cvs msn works .ctt is possible in way? thank you! the .ctt file text file in xml format. outlook can output in several formats including .csv format (not cvs). you can load csv file using tjvcsvdataset (a component in delphi jedi vcl library), , write out in xml .ctt file extension, using omnixml or msxml in delphi. delphi contacts msn

Implementing In app Purchase in android application -

Implementing In app Purchase in android application - i developing android application in have implement in app purchase user can have alternative of buying product free or paid? has implemented before? if yes,,,,can help me how implement it? thanks tushar in-app billing launched on android market look @ this. contains links tutorials , additional informations. android

Subtle difference in how HAML handles render method with block in Rails templates -

Subtle difference in how HAML handles render method with block in Rails templates - i stumbled across looks inconsistency in how haml handles render method in rails. example 1 in erb: # template.html.erb index template. <%= render :layout => 'form4', :partial => 'stuff2' %> # _layout.html.erb <%= form_tag %> <div class="something"> <%= yield %> </div> <% end %> # _partial.html.erb <b>meh</b> <%= text_field_tag 'name' %> example 1 in haml: # template.html.haml index template. =render :layout => 'form2', :partial => 'stuff1' # _layout.html.haml =form_tag .something =yield # _partial.html.haml %b meh =text_field_tag 'name' as expected, both result in same rendering (abbreviated below): this index template. <form> <div class="something"> <b>meh</b> <input ...

jQuery AJAX POSTs to action both hit the same callback method instead of their own -

jQuery AJAX POSTs to action both hit the same callback method instead of their own - an interesting problem have run into. have struts 2 web app utilize jquery ajax calls within jquery ui dialogs lookup data. same page has couple different dialogs looking different data. each dialog has paging, hence "next" links shown below. if have 1 dialog or multiple dialogs calling same callback works fine. have multiple dialogs, each calling own callback action class breaks (meaning getcustsearchhtml() method gets called in both ajax calls below). when click on next link during task-lookup, right action method gets called success callback calls returndata.custsearchhtml instead of taskdata.tasksearchhtml. here basic code: $('#customer-lookup').delegate('#clnextlink', 'click', function(e) { e.preventdefault(); var workorderid = $("#workorderid").val(); var nextpage = $("#nextpage").val(); $.ajax({ type: ...

asp.net mvc - Default view for an area -

asp.net mvc - Default view for an area - i using asp.net mvc 3. created area called administration . there no default view associated it, if type in www.mywebsite.com/administration there error. how go , define default view when user types in above mentioned url? need go , create home controller? i have like: www.mywebsite.com/administration or www.mywebsite.com/administration/index administrationarearegistration.cs has following: public override void registerarea(arearegistrationcontext context) { context.maproute( "administration_default", "administration/{controller}/{action}/{id}", new { action = "index", id = urlparameter.optional } ); } not sure if possible? you not define default view, default action. code above misses type of controller, action of want utilize default: suppose have administrationhome controller. public override void registerarea(arearegistrationcontext context) { context....

nlp - Package to generate n-gram language models with smoothing? (Alternatives to NLTK) -

nlp - Package to generate n-gram language models with smoothing? (Alternatives to NLTK) - i'd find type of bundle or module (preferably python or perl, others do) automatically generate n-gram probabilities input text, , can automatically apply 1 or more smoothing algorithms well. that is, looking nltk ngrammodel class. can't utilize purposes because there bugs smoothing functions create choke when inquire probability of word hasn't seen before. i've read through dev forums nltk , of there seems no progress on this. any alternatives out there? looks answered own question, i'll mention i've found here in case others looking it. there 2 toolkits i've found: srilm the cmu-cambridge statistical language modeling toolkit they appear have similar functionality. both include variety of smoothing functions. nlp nltk n-gram

persistent left panel in all windows in c#? -

persistent left panel in all windows in c#? - hi have persistent or constant left panel among forms of c# desktop applicaton . not utilize inheritance way of doing . 1 point out suggestion or right search terms find examples these in google ? thanks i believe inheritance way. there particular reason cannot this? c#

wpf - Putting Stack Panels side by side -

wpf - Putting Stack Panels side by side - i need set controls grouped , set them side side. , came code utilize multiple stackpanel that. <window x:class="xamltests.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" title="mainwindow" height="310" width="525"> <grid> <stackpanel x:name="_ribbonradiobuttonpanel" orientation="vertical"> <checkbox content="signed" height="16" name="signed" checked="signed_checked" margin="10,5"/> <stackpanel x:name="_wordlength" orientation="horizontal"> <textbox height="18" name="textboxwordlength" width="30" margin="10,5"/> <textblock height=...

objective c - iOS - Accessing variable declared in method A from method B in the same class -

objective c - iOS - Accessing variable declared in method A from method B in the same class - how do this? see code illustration below: - (void)methoda { ... uilabel *label1 = [[uilabel alloc] initwithframe:frame]; ... } - (void)methodb { label1.text = "label 1"; } edit: why i'm wondering because can not set instance variable class. because not know when class loads how many uilabel s need. different amount each time class loaded. need dynamically create these uilabels in method , able access these labels throughout rest of class in convenient way. sounds might want examine design, it's not going easy keeping track of labels need dynamically create. since thats current utilize case, perhaps want maintain mutable array of labels. way can create many need , still able share info across methods (as ivar in class). class definition have (code stolen @macmade , updated): @interface myclass: nsobject { nsmutablearray * _labels...

jQuery bind click *ANYTHING* but *ELEMENT* -

jQuery bind click *ANYTHING* but *ELEMENT* - say there elements floating around, , i'm trying when click anything(divs, body, whatever...) 1 specified (e.g. div#special). i'm wondering if there's improve way accomplish besides next method can think of... $(document).bind('click', function(e) { mouse position x, y element (div#special in case) position x, y element width , height determine if mouse within element if(inside) nil else }); to handle "do except when this element clicked" situation, general approach add together event handler document handles "do this" case, add together event handler "except this" element, prevents click event bubbling document ; $('#special').on('click', function(e) { e.stoppropagation(); }); $(document).on('click', function (e) { // whatever want; event that'd fire if "special" element has been ...

c++ - Using Separate Libs for Debug and Release in VC++ -

c++ - Using Separate Libs for Debug and Release in VC++ - i'm downloading glfw utilize visual studio 2010. see download has separate folder debug , release builds (each folder has 2 libs , 1 dll), filenames in both folders same. how should configure visual studio pick right file, since expect renaming lib or dll interfere. research has been relatively unfruitful, , think may have ifdef commands or something. in advance. visual studio build properties (including directories searches files) build configuration specific. on project configuration dialog, press drop-down switch debug release. settings alter impact particular build configuration , no others. if don't have dropdown, you're using non-advanced interface, no human beingness should ever use. switch advanced interface. c++ visual-studio linker

Session and login phpmysql help -

Session and login phpmysql help - hello can please tell wrong code.i dont know wrong code showing no error , no result.i have created 2 tables in databas(mysql) 1 database used usersdetails , other used save comments , file of users. <?php session_start(); $firstname= $_session['sess_first_name']; print $firstname; $tes=$_session['sess_member_id']; print $tes; ?> <?php // default page display // connect database server $dbcnx = @mysql_connect('localhost', 'root', ''); if (!$dbcnx) { die( '<p>unable connect ' . 'database server @ time.</p>' ); } // select jokes database if(! @mysql_select_db('tes') ) { die( '<p>unable locate joke ' . 'database @ time.</p>' ); } // if joke has been submitted, // add together database. if (isset($_post['submit'])) { $name = $_post['name']; $test = $_post['test']; $sql = "insert ...

real time - Explanation of parameters in earliest deadline first algorithm -

real time - Explanation of parameters in earliest deadline first algorithm - i learning earliest deadline first algorithm exam since don't have resources need inquire help here. slightly bigger image here τ1(r0 = 0, c = 3, d = 7, t = 20) need know parameters mean, example: d - deadline t - ? c - ? and on... i know noobish question but, appreciate if give me clear simple explanation :) page 9 (physical) of textbook you've quoted defines parameters as: r,task release time, i.e. triggering time of task execution request c,task worst-case computation time, when processor allocated it d, task relative deadline, i.e. maximum acceptable delay processing t, task period algorithm real-time edf

MySQL Trigger/Procedure Not Working -

MySQL Trigger/Procedure Not Working - i have trigger , procedure should generate invoice number. examples of numbers (format: type/number/month/year): vat/5/05/2011 vat/6/05/2011 vat/7/06/2011 when inserting invoice year = year(curdate()) should increment number integer. but, when inserting invoice new year's day (on 1st of jan) should generate new invoice number, , part of scheme not working. procedure: create procedure generate_vat_number(out invoicenumber varchar(50)) begin select concat( split_str(number, '/', 1), '/', count(number) + 1, '/', split_str(number, '/', 3), '/', year(curdate()) ) invoicenumber invoices split_str(number, '/', 4) = year(curdate()) limit 1; end$$ trigger: create trigger add_invoice_number before insert on invoices each row begin phone cal...

Does C sign extend or zero extend constants? -

Does C sign extend or zero extend constants? - does c sign extend constants or 0 extend them? example: int = 123 & 0x3 is 0x3 0 extend or sign extended? in general, things 0 extended in c , sign extended? thanks! the c standard not mandate whether implementation uses 2's complement, 1's complement, or else. representation of negative values not mandated either. however, in particular case, 0x3 positive value, sign-extension , zero-extension same thing! c

android - This is overlapping. How do I fix this? -

android - This is overlapping. How do I fix this? - <?xml version="1.0" encoding="utf-8"?> <absolutelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="250px" android:id="@+id/dialog_layout_root"> <absolutelayout android:layout_width="wrap_content" android:layout_height="wrap_content"> <textview android:id="@+id/dialogtext" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textcolor="#fff" android:text="this sample text view!"> </textview> </absolutelayout> <ab...

java - JaxB binding XMLGregorianCalendar -

java - JaxB binding XMLGregorianCalendar - jaxb when binding improper date format xmlgregoriancalendar not throwing exception. instead assigns null. problem? @xmlattribute(name = "travelenddate", required = true) @xmlschematype(name = "date") protected xmlgregoriancalendar travelenddate; <xs:complextype name="searchcriteria"> <xs:attribute name="travelstartdate" type="xs:date" use="required"/> <xs:attribute name="travelenddate" type="xs:date" use="required"/> </xs:complextype> note: i'm eclipselink jaxb (moxy) lead, , fellow member of jaxb 2.x (jsr-222) expert group. this behaviour vary little between jaxb implementations. moxy illustration throw next exception if value incorrect: exception in thread "main" javax.xml.bind.unmarshalexception - linked exception: [exception [eclipselink-3003] (eclipse persistence services - 2.4.0.quali...

sql - Why am I geting this table not found error? "object ___ does not exist" -

sql - Why am I geting this table not found error? "object ___ does not exist" - i'm trying run next query. working fine until added column gpv.i_val the error i'm receiving "object gpv not exist" when does. i'm assuming simple can't seem place finger on it. select gpv.i_val, gcv.i_pln, gcv.c_typ_cov, gcv.d_eff, gcv.d_eff_pln, gcv.c_sta, gcv.d_sta, gcv.c_mde_bft_fst, gcv.a_bft_fst, gcv.c_mde_bft_sec, gcv.a_bft_sec, gcv.c_mde_bft_trd, gcv.a_bft_trd, gcv.p_cre_hom, gcv.c_cl_rsk, gpv.c_val, gcv.c_pol pearl_p.tltc906_gcv gcv, pearl_p.tltc912_gpv gpv gcv.i_pln > 0 , gcv.i_pln = gpv.i_pln , gcv.c_pol between 'lac100001' , 'lac100004' ...

php - SAX-based parser not seeking content -

php - SAX-based parser not seeking content - i trying implement sax based parser somehow recognizes start of element , end, content not provided in logs. variable holding xml filled correctly, checked through simple log. here code: <?php function startelementhandler($parser, $name, $attribs) { if($name == "id"){ $id = true; } } function endelementhandler($parser,$name){ $id = false; } function characterdatahandler($parser,$data){ if($id == true){ echo $data; } } global $id; $id = false; $parser = xml_parser_create(); xml_set_element_handler($parser, "startelementhandler","endelementhandler"); xml_set_character_data_handler($parser,"characterdatahandler"); $xml = file_get_contents("http://itunes.apple.com/de/rss/topfreeapplications/limit=100/xml"); xml_parse($parser,$xml); //xml_parser_free($parser); ?...

objective c - how to deploy custom iphone apps to devices from a pc -

objective c - how to deploy custom iphone apps to devices from a pc - i made app xcode, , want share few others. problem live in different provinces them , not have mac. rather not go through app store , don't mind getting enterprise developer business relationship if necessary. know how can go doing so? what need advertisement hoc distribution. utilize tool testflight, , allow other users download app on air. iphone objective-c xcode

iphone - Compiler error when attempting to link static C++ library to MonoDevelop -

iphone - Compiler error when attempting to link static C++ library to MonoDevelop - i created simple c++ library in xcode, basically: //numbers.h class numbers { public: int get10(); } //numbers.cpp int numbers::get10() { homecoming 10; } i compiled static (debug) library followed the instructions here until step 2, couldn't progress farther because code won't compile anymore, compiler outputs before giving me 'mtouch failed no output' message: /developer/platforms/iphonesimulator.platform/developer/usr/bin/gcc-4.2 -arch i386 -gdwarf-2 -fobjc-legacy-dispatch -fobjc-abi-version=2 -miphoneos-version-min=4.3 -isysroot /developer/platforms/iphonesimulator.platform/developer/sdks/iphonesimulator4.3.sdk /var/folders/-m/-mb3z8vagiqk88qev-fxk++++ti/-tmp-/tmp216a96e0.tmp/main.x86.o -o /var/folders/-m/-mb3z8vagiqk88qev-fxk++++ti/-tmp-/tmp216a96e0.tmp/chicksnvixens -framework cfnetwork -framework foundation -framework opengles -framework uikit -fram...

php, multithreading and other doubts -

php, multithreading and other doubts - morning i have doubts the way php works. cant find reply anywhere on books thought nail stack ;) so here goes: lets assume have 1 single server php+apache installed. here beliefs: 1 - php can handle 1 request @ time. doesn't matter if apache can handle more 1 thread @ time because invoked php interpreter single threaded. 2 - belief 1 follows believe if server receives 4 calls @ same time these calls queued , executed 1 @ time. makes request lastly gets response last. 3 - 1 , 2 follows if cron-call url corresponding script heavy-lifting/time consuming stuff slow downwards server moment script returns. whats true? whats false? cheers i see no reason why php not able handle multiple requests @ same time. said, may semi-true handling requests of single client, depending on type of script. many scripts utilize sessions. when session_start() called, session beingness opened , locked. when execution of script ...

caching - How do I clear a specific file in the Java cache? -

caching - How do I clear a specific file in the Java cache? - i remove specific cached jar file java program. java cache behaves weirdly sometimes, , keeps loading old jar if new 1 should used. the "java command panel" has "java cache viewer" feature allows see cached jar files. i wondering if there way observe cached jar file straight java program, , remove file. there api allowing that? yes! i've found solution problem. there's command line statement "javaws" let's handle specific java-related actions. can type javaws console/terminal , it'll give options remove specific application, add together code: runtime.getruntime().exec("javaws -uninstall <jnlp file>"); where can file or url. hope helps! java caching jar

visual studio - Finding c compiler from mathematica -

visual studio - Finding c compiler from mathematica - c compilers , mathematica. hi, want utilize cuda functionality in mathematica. however, requires working c compiler. unix person have windows re-create of mathematica. tried isntalling visual studio express , minigw (some sort of gcc windows port). when start mathematica , ccompiler[] after having loaded ccompilerdriver , cudalink needs, empty list of compilers. there hidden somewhere need set create mathematica find these compielrs. totally lost windows environment. i find no mention of on wolframs website, in examples visual studio allways there , working already. oh yeah, mathematica version 8. both detected automatically on system, i'm not sure what's wrong on yours. you can @ files in addons\applications\ccompilerdriver , see how different compilers detected. search resolveinstallation in these files. based found in files, things can seek are: put mingw c:\mingw . make sure vs express co...

java - Server returned HTTP response code: 500 with HttpUrlConnection in Android -

java - Server returned HTTP response code: 500 with HttpUrlConnection in Android - i post ing info specific url using next code: import java.io.outputstreamwriter; import java.net.httpurlconnection; import java.net.url; public class lookuppost { public static void main(string[] args) throws exception { string accountlookup = "<account>"+ "<name>n*</name>"+ "<type></type>"+ "<accountaddress>"+ "<address></address>"+ "<state></state>"+ "<zip></zip>"+ "<city></city>"+ "<country></country>"+ ...

html5 - How do I use Paul Irish's Conditional comments in a SharePoint 2010 master page -

html5 - How do I use Paul Irish's Conditional comments in a SharePoint 2010 master page - i want utilize paul irish's conditional comments boilerplate html template: <!--[if lt ie 7 ]> <html lang="en" class="no-js ie6"> <![endif]--> <!--[if ie 7 ]> <html lang="en" class="no-js ie7"> <![endif]--> <!--[if ie 8 ]> <html lang="en" class="no-js ie8"> <![endif]--> <!--[if ie 9 ]> <html lang="en" class="no-js ie9"> <![endif]--> <!--[if (gt ie 9)|!(ie)]><!--> <html lang="en" class="no-js"> <!--<![endif]--> in sharepoint 2010 masterpage. have read 'conditional comments don’t work in sp2010'. (not sure means!) advice use: <sharepoint:cssregistration name="foo.css" conditionalexpression="gte ie 7" runat="server" /> this all...

java - collection vs list vs arrays as return type for EJB method -

java - collection vs list vs arrays as return type for EJB method - i told collection should preferred list homecoming value of ejb method. argument in general collection more generic i.e. gives alter underlying info construction without impacting clients. , if flexibility want have designer using collection create improve sense. wouldn't create more sense homecoming array instead of collection? and performance impacts if any? thanks in advance. prefer collections on arrays; utilize generics use interfaces instead of concrete classes then have 4 options: list , set , collection , iterable . there depends semantics want include. if internal api - decide based on characteristics of collection: does hold unique items? set will clients need random access it? list will clients need modify (add, remove) (without above 2 characteristics)? collection will clients need iterate it? iterable if it's web service doesn't matter - serialized same ...

testing - How do I test a virtual property on an abstract class with Rhino Mocks and MSpec? -

testing - How do I test a virtual property on an abstract class with Rhino Mocks and MSpec? - i have virtual property, firstname , on abstract class, foo . need test virtual property's behavior. method never fires when test executes (and test fails, no matter what's in method's body). how can create method scheme under test? how can test method? class="lang-cs prettyprint-override"> [subject(typeof(foo))] public class when_whatever { found context = () => { _foosut = _mockrepository.partialmock<foo>(argumentone, argumenttwo); }; because of = () => _result = _foosut.firstname; should_return_not_null = () => _result.shouldnotbenull(); private static string _result; private static foo _foosut; } i'm using rhino mocks 3.5 , mspec. are tried partialmock feature? see here testing virtual rhino-mocks mspec

jpeg - Embed JPG data properly in PDF files generated by Inkscape -

jpeg - Embed JPG data properly in PDF files generated by Inkscape - there bug in inkscape jpeg images included in svg document embedded bitmaps rather jpeg when exporting pdf files. the result huge increment in file size. example, have simple svg drawing includes 2 mb jpeg image; exporting pdf results in 14 mb file. i looking workaround. there way fix resulting pdf inserting correctly-encoded jpg image, perhaps via sort of pdftk trickery? (in case, resulting pdf included figure in latex document rendered pdflatex, there may workarounds other straight fixing pdf generated inkscape.) one kludge utilize pdf2ps followed ps2pdf , re-encode bitmap info jpeg: pdf2ps made-by-inkscape.pdf foo.ps ps2pdf foo.ps smaller-file.pdf for test case, file sizes were: original jpeg 2.1m made-by-inkscape.pdf 15m foo.ps 104m smaller-file.pdf 1.5m but of course, involves re-encoding jpeg data, best avoided. pdf jpeg inkscape

php - GET Request won't open file -

php - GET Request won't open file - i've been trying figure out why js code works doesn't open requested file. used livehttpheader add-on firefox , sends parameters , seems work should php file requested doesn't open. wrong? appreciate help. thanks. ps: file name requested it's correct, it's not that. //xmlhttprequest enable function createbridge() { var request_type; var browser = navigator.appname; if(browser == "microsoft net explorer") { request_type = new activexobject("microsoft.xmlhttp"); } else { request_type = new xmlhttprequest(); } homecoming request_type; } var http = createbridge(); function requesting_search() { var user_inputs=[]; user_inputs[0] = document.getelementbyid("faculty1").value; user_inputs[1] = document.getelementbyid("department1")...

iphone - Message Sent to Deallocated Instance -

iphone - Message Sent to Deallocated Instance - i'm using touchxml parse element in ios. retrieve response web service using nsinvocationoperation, parse , display results. works fine background thread displays results on main thread using [self performselectoronmainthread:@selector(displayloginresult:) withobject:res waituntildone:no]; error: 2011-07-18 11:58:06.108 billsapp[873:7107] *** -[cfstring release]: message sent deallocated instance 0x5d809b0 the code parse element is: -(loginresult *) trylogin:(nsstring *)username withpassword:(nsstring*)password{ nsurl *url = [urlutility trylogin:username passwordhash:password]; cxmldocument *responseobj = [urlutility xmldocwithurl:url]; if(responseobj == [nsnull null]) homecoming [nsnull null]; cxmlelement *eleuser = [responseobj nodeforxpath:@"//user" error:nil]; cxmlelement *eleresult = [responseobj nodeforxpath:@"//result" error:nil]; loginresulttype resulttyp...

networking - WebRequest.RegisterPrefix for http:// returns true, doesn't work -

networking - WebRequest.RegisterPrefix for http:// returns true, doesn't work - i'm trying utilize webrequest.registerprefix register decorator iwebrequestcreate implementation intention beingness add together "debug" scenarios (like emulating different connectivity scenarios). i'm using mango beta 2 sdk , registerprefix method returns true when used "http://" prefix (or "http" matter), registered iwebrequestcreate instance not beingness used. i can see documentation should homecoming false duplicates, doesn't seem functioning documented. is there other way of achieving i'm after in way transparent consumers? i'm using webrequest.registerprefix unit testing, registering iwebrequestcreate implementation prefix of test:// , , work. i found after registering iwebrequestcreate http:// , calling webrequest.create http:// uri homecoming request created registered iwebrequestcreate , calling webrequest.cre...

packages - In R: how to access the index in library(help = "pcks_name")? -

packages - In R: how to access the index in library(help = "pcks_name")? - i access list of functions , descriptions given in library(help = "pcks_name") my ideal have list exported file (txt, html, pdf). thanks. you do res <- library(help="mass") class(res) <- "list" and access res$info[[2]] r packages

asp.net - Show links according to rights in MVC3 -

asp.net - Show links according to rights in MVC3 - i m working on mvc 3 application , contain different links , want show links according roles or rights. if link admin thn link shouldnt visble members right users. how accomplish thing in mvc ? thanks if you're not using asp membership, way, supposing role using username , role included in model: @{ usercontext userdb = new usercontext(); var user = userdb.usermodels.firstordefault(x => x.username.equals(user.identity.name)); if(user.role == "admin") { @actionlink("link's name","someaction", "somecontroller"); } } crude sample if you're looking for. asp.net asp.net-mvc security asp.net-mvc-3

asp.net mvc - Ajax.ActionLink not working MVC -

asp.net mvc - Ajax.ActionLink not working MVC - i have grid, need add together details column grid , when detail column selected details row should appear below current grid. my code : <% html.grid(model.innermodel.statusrecords) .empty("no info available") .attributes(new hash(id => "resultstable")) .columns(column => { column.for(x => ajax.actionlink("details", "batchdetailsbystatus", "reportscontroller", new { statusid = x.status, jobno = model.innermodel.jobnumber }, new ajaxoptions { httpmethod = "get", updatetargetid = "statusbatchdetailsdiv"})).named("details").donotencode(); column.for(x => x.status); column.for(x => x.totalcount).named("count"); }).render(); %> my controller code: [acceptverbs(httpverbs.get)] public ...

java - sun Httpserver: access from the Handler to an object created externally -

java - sun Httpserver: access from the Handler to an object created externally - maybe dumb question: i'm trying realize little server in java com.sun.net.httpserver package. @ origin of server programming, i'm missing something. it should work this: first, creates object (an hashmap) lately , periodically updated every 24 hours then there handler process requests received. processing phase done basing on content of hashmap, created outside handler. pseudo code (something dirt) public static void main(string args[]){ // creation of hashmap (which has periodically updated) httpserver server = httpserver.create(new inetsocketaddress(8000), 0); server.createcontext("/hashmap", new handler()); server.start(); } class handler implements httphandler { public void handle(httpexchange xchg) throws ioexception { //operations involves (readonly) hashmap created } } the question is: how allow handler read hashmap? there way pass...

utf 8 - Amazon SimpleDB GetAttributes Charset problem -

utf 8 - Amazon SimpleDB GetAttributes Charset problem - for next i'm using rest api discussed here: http://docs.amazonwebservices.com/amazonsimpledb/latest/developerguide/sdb_api_getattributes.html when getting rows of table (attributes of domain) can sniff http traffic , see response contains unicode characters of table cells (as should.) however, can see response content type "text/xml" , no charset specified. because of rfc2046, means default charset of "us-ascii" should used. results in parser i'm using not beingness able read unicode characters properly. to me seems bug in amazon. case? there workaround, such headers send amazon (i tried accept-charset , didn't work.) thanks help! utf-8 character-encoding amazon-web-services amazon-simpledb

javascript - IE Problem: Gap between div & img -

javascript - IE Problem: Gap between div & img - i have simple problem dispay image above div of text. in net explorer there gap between image & div of text when there should no gap(like in firefox theres no gap). can help me figure out how remove gap tween 1st image & below div? <html> <head> <style type="text/css"> <!-- .pagebox { width: 873px; } .pageboxcontent { background-color: blue; padding: auto; margin: auto; /*background: url("images/pageboxmid.png") repeat-y;*/ padding-right: 50px; padding-left: 50px; margin-top: 0px; background-color: blue; } .pageboxtop { background-color: red; } .pageboxbottom { background-color: red; } --> </style> </head> <body> <div id="container"> <div class="pagebox"> <img class="pageboxtop" src="im...

javascript - Submenu dissapears -

javascript - Submenu dissapears - css: ul.topnav { list-style: none; margin: 0px; padding: 0px; display: inline; } ul.topnav li { position: relative; display: inline; margin: 0px; padding: 0px; } ul.topnav li span.subhover {background-position: center bottom; cursor: pointer;} ul.topnav li ul.subnav { list-style: none; position: absolute; display: none; background-color: black; margin: 0px; padding: 0px; border: 1px solid gray; } ul.topnav li ul.subnav li { width: 170px; margin: 0px; padding: 0px; } html: <ul class="topnav"> <li><a href="#">home</a></li> <li> <a href="#">tutorials</a> <ul class="subnav"> <li><a href="#">sub nav link</a></li> <li><a href="#">sub nav link</a></li> </ul> </li> </ul> javascript/jquery...

.net - How to run WCF service method with WebGet attribute on the root of the host -

.net - How to run WCF service method with WebGet attribute on the root of the host - i have wcf service contract: [servicecontract] public interface ipolicyretriever { [operationcontract, webget(uritemplate = "/clientaccesspolicy.xml")] stream getsilverlightpolicy(); } with web.config section: <service behaviorconfiguration="policyretrieverservicebehavior" name="webservice.policyretriever"> <endpoint address="" binding="webhttpbinding" behaviorconfiguration="policyretrieverendpointbehavior" contract="webservice.ipolicyretriever" /> </service> the server running on localhost , visual studio web hosting, on port 8080 , web service file named webservice.svc . the above code create getsilverlightpolicy() method exposed on http://localhost:8080/webservice.svc/clientaccesspolicy.xml . what need expose file on root of webserver instead of webs...