Posts

Showing posts from April, 2015

Azure SDK 2.0 installation on VS 2012 -

i have tried install windows azure sdk 2.0 on vs 2012 ultimate. have both vs 2010 , vs 2012 on widows 7 machine . getting below error web plat form log downloadmanager information: 0 : moving downloaded file 'c:\users\gowdes\appdata\local\temp\tmp8ff1.tmp' to: c:\users\gowdes\appdata\local\microsoft\web platform installer\installers\windowsazuretoolsonlyvs2012_2_0_baselocale\5abbb9f724a085d924844401579bc11ad8e16d73\windowsazuretools.vs110.exe downloadmanager information: 0 : downloading file 'http://download.microsoft.com/download/f/4/9/f49d8cf8-bcdb-4f3a-8b8a-8d00077d7df2/windowsazuretools.lightswitch.vs110.exe' to: c:\users\gowdes\appdata\local\temp\tmpdd28.tmp downloadmanager information: 0 : install exit code product 'windows azure emulator - 2.0' '0' downloadmanager information: 0 : install return code product 'windows azure emulator - 2.0' success downloadmanager information: 0 : product windows azure emulator - 2.0 done install com

git - How can I checkout specific folder and its content from a specific commit to external folder? -

how retrieve complete subfolder git (version 1.7.0.4) repository local folder without checking out whole repo in first place? thought solution: git --work-tree=/home/tmp/testcheckout checkout commitid -- images/* example repo structure directories: /git/project1/sourcecode /git/project1/images /git/project1/howto /git/project1/readme.txt so example command should checkout files under /git/project1/images /home/tmp/testcheckout have been committed git repo commit commitid checks out files have been committed @ given commitid, ignoring other files have been committed before that. problem: command above files subfolder have been committed commitid. question : want retrieve files commitid. solution this? important : don't want clone whole repository (700gb) able retrieve 1gb of files later. there must way directly files out of repo without cloning whole repo. here working solution this. solution has following features: - not checkout whole repo, ch

javascript - Unable to Move the List of values from Right Combo bx to Left Combo bx (Multiple List of values) -

function listbox_moveacross(sourceid, destid) { var src = document.getelementbyid(sourceid); var dest = document.getelementbyid(destid); var errcount = 0; (var count = 0; count < src.options.length; count++) { if (src.options[count].selected == true) { var option = src.options[count]; var newoption = document.createelement("option"); newoption.value = option.value; newoption.text = option.text; newoption.selected = true; try { dest.add(newoption, null); // standard src.remove(count, null); } catch (error) { dest.add(newoption); // ie src.remove(count); } count--; errcount++; } } if (errcount == 0) { alert("no element selected or have no element move"); } } hi can body on javascript given code moving list of values ri

xml - Invoking libxml2 for XSD validation -

i using libxml2 c validate following xml document: <?xml version="1.0"?> <charms ver="0.02"> <header seqn="1184" type="bandwidth"/> <bandwidth band="2.130000" latency="12.234000" jitter="123.456078"/> <trailer method="md5" digest="838da77ca83abd70a13a18b82afb4820"/> </charms> and xsd file contains: <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/xmlschema"> <xs:element name="charms"> <xs:complextype> <xs:sequence> <xs:element name="header"> <xs:complextype> <xs:attribute name="seqn" type="xs:int"/> <xs:attribute name="type" use="required" type="xs:st

python - Display pydoc's description as part of argparse '--help' -

i using argparse.argumentparser() in script, display pydoc description of script part of '--help' option of argparse. one possibly solution can use formatter_class or description attribute of argumentparser configure displaying of help. in case, need use 'pydoc' command internally fetch description. do have other ways (possibly elegant) it? you can retrieve docstring of script __doc__ global. add script's help, can set description argument of parser. """my python script script process file """ p = argparse.argumentparser(description=__doc__, formatter_class=argparse.rawdescriptionhelpformatter) p.add_argument('foo', help="name of file process") p.parse_args() then like: $ python tmp.py --help usage: tmp.py [-h] foo python script script process file positional arguments: foo name of file process optional arguments: -h, --help show message , exit

c# - sqlParameterCollection error -

i have definiton of procedure public int add_nastavenie(out int typnastav, int nastavid, string hod) { resetparameters(); cmd.commandtext = "add_nastav"; cmd.commandtype = commandtype.storedprocedure; sqlparameter sqlparameter; var sqlparameterout = new sqlparameter("@typnastav", sqldbtype.int); sqlparameterout.direction = parameterdirection.output; sqlparameter = new sqlparameter("@nastavenieid", sqldbtype.int); sqlparameter.direction = parameterdirection.input; sqlparameter.value = nastavid; cmd.parameters.add(sqlparameter); sqlparameter = new sqlparameter("@hodnota", sqldbtype.nvarchar, 100); sqlparameter.direction = parameterdirection.input; sqlparameter.value = hod; cmd.parameters.add(sqlparameter); var sqlparameterret = new sqlparameter("retvalue", sqldbtype.int); sqlparameterret.direction = parameterdirection.returnvalue; cmd.executenonquery(); t

Adding values to existing cursor SQL Server -

is possible add values cursor exists? while processing (between begin , fetch next)?? edit 1: i have list of values in cursor. on doing logic , selecting few records.i need perform same logic on newly selected records may lead other new records , on. recursive drill down.

c# - Returning a validation error -

i have logincontroller . loginmodel able provide validation on string lengths , required fields. displayed fine in razor page. public class logincontroller : controller { public actionresult index() { return view(); } [httppost] public actionresult index(loginmodel model) { if (modelstate.isvalid) { if (membership.validateuser(model.username, model.password)) { formsauthentication.setauthcookie(model.username, model.notpublicpc); var url = formsauthentication.getredirecturl(model.username, model.notpublicpc); return redirect(url); } else { //here want throw own validation message or otherwise //give feedback login unsuccessful } } return view(); } } public class loginmodel { [required] [stringlength(50, minimumlength = 4)] public string username { g

resteasy - JBoss REST with SIP Servlet - Class Not Found due java.lang.LinkageError -

i working on war module has run on jboss 7.1 sip (mobicent). my project structure: package: sip.multimediaconference -jaxrsactivator.java -multimediaconferenceimpl.java -servletsipmultimediaconfernece.java ... multimediaconferemcimple.java @path("multimediaconference") public class multimediaconferenceimpl implements multimediaconference { ... @get @path("/test") @produces(mediatype.text_plain) public string say() { return "hello jersey"; } ... via http://localhost:8080/conffirstconvert/rest/multimediaconference/test i should "hello jersey" displayed. instead of 2 errors: 15:37:56,523 info [org.jboss.resteasy.spi.resteasydeployment] (http-localhost/127.0.0.1:8080-1) deploying javax.ws.rs.core.application: class sip.multimediaconference.jaxrsactivator 15:37:56,525 warn [org.jboss.modules] (http-localhost/127.0.0.1:8080-1) failed define class sip.multimediaconference.multimediaconferenceimpl in module "deplo

c++ - Serializing a derived class from an interface -

new: can use this, access.hpp? template<class archive, class t> inline void serialize_adl(archive &, t &, const unsigned int); this suggests can define different serialize takes object parameter. thus code change below work? i think question how add serialize method on interface class, invoke serialize method on derived sub-class. class interface { public: virtual void avirtual() = 0; private: friend class boost::serialization::access; template<class archive, class t> void serialize_adl(archive & ar, t & object, const unsigned int version) { // work????? ar & object; } }; template<class t> class derived : interface { public: derived(t in) : m_data(in) {} virtual void avirtual() { // } private: t m_data; friend class boost::serialization::access; template<class archive> void serialize(archive & ar, const unsigned int version) { ar & m_data; } };

Simple SQL query to Couchbase -

i have following document: { "postid": "message_2d73b43390041e868694a85a65e47a09d50f019c180e93baacc454488f67a411_1375457942227", "userid": "user_2d73b43390041e868694a85a65e47a09d50f019c180e93baacc454488f67a411", "post_message": "test", "attachments": { "images": [ ], "audio": [ ], "videos": [ ] }, "timestamp": 1375457942227, "followers": [ ], "follow": 0, "reporters": [ ], "report": 0, "rerayz": 0, "mtype": "post" } i following query: select * posts users in ("user_1", "user_2", "user_3") order_by timestamp limit 20 i did following , pass multiple ?keys=["user_1", "user_2", etc] . how can results sorted timestamp in order 20 first? function (doc, meta) { if(d

c++ - converting 8/17/2003 to boost::gregorian::date -

i attempting convert 8/17/2003 boot::gregorian::date using following code std::string test = "08/17/2013"; date d(from_simple_string(test)); however unhandled exception suggestion on how accomplish ? from boost examples: // following date in iso 8601 extended format (ccyy-mm-dd) std::string s("2001-10-9"); //2001-october-09 date d(from_simple_string(s)); std::cout << to_simple_string(d) << std::endl; you have format incorrect.

javascript - Handlebars not rendering JSON context data, getting empty template -

i having strange issue handlebars compiling template properly, when passing context data, resulting fields in html blank. i've confirmed json data javascript object , not string. apologies if has been answered elsewhere. saw lot of answers json string needing actual object, i've stated, not case. template: <script type="text/x-handlebars-template" id="items-template"> {{#each downloads}} <div class="download-item"> <h3>{{pagetitle}}</h3> <p>{{description}}</p> </div> {{/each}} </script> js: var source = $("#items-template").html(); var template = handlebars.compile( $.trim(source) ); var html = template({ downloads:[ {pagetitle:'title', description:'the description'}, {pagetitle:'title', description:'the description'}, {pagetitle:'title', description:'the description'} ] }); result of html

Where is the character being added in my wordpress search function? -

i have simple search form has started acting after round of changes. issue can't figure out how character being added search form submission. instead of "mysite.com/?s=candy" when submit i'm getting "mysite.com/ no core files have been edited theme , custom plugins. thing can't pinpoint how/where search being handled , cause issue. any insight great. ----- update ----- if activate different theme, such twenty eleven, search function on theme works expected , nothing added url. leads me believe it's in theme created why happen on 1 server , not other?

python - How to create a large pandas dataframe from an sql query without running out of memory? -

i having trouble querying table of > 5 million records ms sql server database. want able select of records, code seems fail when selecting data memory. this works: import pandas.io.sql psql sql = "select top 1000000 * mytable" data = psql.read_frame(sql, cnxn) ...but not work: sql = "select top 2000000 * mytable" data = psql.read_frame(sql, cnxn) it returns error: file "inference.pyx", line 931, in pandas.lib.to_object_array_tuples (pandas\lib.c:42733) memory error i have read here similar problem exists when creating dataframe csv file, , work-around use 'iterator' , 'chunksize' parameters this: read_csv('exp4326.csv', iterator=true, chunksize=1000) is there similar solution querying sql database? if not, preferred work-around? need read in records in chunks other method? read bit of discussion here working large datasets in pandas, seems lot of work execute select * query. surely there simpler app

c++ - boost::iostreams, gzip files and tellg -

i have been using boost::iostreams reading uncompressed text file. in application, need multiple file handles (stored in map) efficiently buffer data different parameters stored in file. also, if read line , parameter @ time later interested in, restore stream position (recovered via tellg()) before called getline() can still buffer value @ future time. however, wish read gzip compressed files, otherwise perform identical operations before. have run across following issues (discovered before, solution not seem work triplet of requirements). short test main() reproduces these issues follows: #include <iostream> #include <iomanip> #include <fstream> #include <string> #include <boost/shared_ptr.hpp>// shared_ptr #include <boost/iostreams/filtering_stream.hpp>// filtering_[io]stream #include <boost/iostreams/filter/gzip.hpp>// gzip //----------------------------------------------------------------------------- int main( int argc, char** ar

How to : customize messages on an advanced combo box (GXT 3)? -

i using advanced combobox 1 : http://www.sencha.com/examples/#exampleplace:advancedcombobox . i change label displayed @ bottom of result list : displaying 1 - 10 of 274 . how possible? saw pagingtoolbar exposes messages via getters/setters don't know how combobox. any idea? i found : combobox.getcell().getpagingtoolbar()

java - How can the Page Size, Page Orientation, and Page Margins of an ods Spreadsheet Be Set Using ODFDOM? -

the apache incubation project odfdom allows users programmatically read , create various open document format files, including spreadsheets. i trying set various print options spreadsheet creating, using re-vamped "simple api", not appear have yet exposed easy way modify document properties such page margin, page size (height/width), , page orientation (landscape/portrait). i need spreadsheetdocument allow me modify these values. the necessary calls can made of underlying odf objects spreadsheetdocument provides access to. first, need proper document properties reference (for examples, "spreadsheet" reference created spreadsheetdocument): stylemasterpageelement defaultpage = spreadsheet.getofficemasterstyles().getmasterpage("default"); string pagelayoutname = defaultpage.getstylepagelayoutnameattribute(); odfstylepagelayout pagelayoutstyle = defaultpage.getautomaticstyles().getpagelayout(pagelayoutname); pagelayoutprope

c# - Reading an embedded text file -

i have created full project works perfectly. problem concerns setup project. when use on computer, text file cannot found if inside resource folder during deployment! how can ensure program find text files after installing software on computer! i have been looking solution in vain. please me sort out. if can full code happy! first set build action of text file "embeddedresource". then read file in code: var assembly = assembly.getexecutingassembly(); var resourcename = "assemblyname.myfile.txt"; using (stream stream = assembly.getmanifestresourcestream(resourcename)) { using (streamreader reader = new streamreader(stream)) { string result = reader.readtoend(); } } if can't figure out name of embedded resource find names , should obvious file is: assembly.getmanifestresourcenames(); this assuming want text file embedded in assembly. if not, might want change setup project include text file during installation.

php - Set Error Message Once Per Page Request -

i'm trying create minimum total checkout module prevent checking out total less configurable amount. i'm using event sales_quote_save_before display error on checkout/cart page when it's opened. <?xml version="1.0"?> <config> <frontend> <events> <sales_quote_save_before> <observers> <b2b> <class>b2b/observer</class> <method>checktotalscart</method> </b2b> </observers> </sales_quote_save_before> </events> </frontend> </config> and in observer public function checktotalscart() { if ($this->_hascarterror()) { /* checks, returns bool */ $this->_seterrormessage(); } } protected function _seterrormessage() { $session = mage::getsingleton("b2b/session"); /*

security - How to avoid BREACH attacks in rails? -

i've been reading breach attack and, despites attack involves web application in server level too, wondering if there's block these kind of attacks in rails. i've found breach-mitigation-rails not bullet-proof solution, mitigate attack in someways. else around there? the presenters of breach have put a website further details . listed mitigations, ordered effectiveness, are: disabling http compression separating secrets user input randomizing secrets per request masking secrets protecting vulnerable pages csrf length hiding rate-limiting requests http compression can disabled @ server, @ expense of efficiency. the breach-mitigation-rails gem addresses points #4 , #6. break caching , increase page size. another interesting fix works on point #4, none of negative impacts on efficiency, require javascript (which can cut down on spam submissions, anyway). an official fix being discussed . you may find non-rails-specific question interesting

How to force using new jsp session attributes after jQuery AJAX loading? -

for question trying show relevant code (please, see below). result of calling user.jsp in function loaduser session attributes change. these session attributes used in jquery function loadactions loads actions.jsp however, only if internet explorer set check newer versions of stored pages every visit webpage change in session attributes visible in actions.jsp . otherwise, these session attributes not change @ after calling loaduser several times. mozilla seems working properly. is there possibility force using new session attributes in function loadactions? $(document).ready(function () { loaduser(); }); var loaduser = function () { $.ajax({ url: 'user.jsp', data: {…}, success: function (data) {…}, error: function (data) {…}, complete: function () { loadactions(); } }); } var loadactions = function () { $('#actionslist').load('actions.jsp #print, #letters'); } add unique parameter call ie

matlab - How was this result obtained? -

when ran following command in matlab: x=zeros(size(30,1),1) i got 1x1 double matrix value 0 . how that? thanks. size(30,1) returns the number of rows (indicated size(a,1) ) of "matrix" 30 . since matrix has 1 element, number of rows 1 means x 1x1 matrix of zeros.

dart - How do I set the context root for a dartium launch? -

how set dartium launch application available @ localhost:3030 instead of default localhost:3030/path/file? that still not possible added pub serve sometimes. afaik darteditor should pub serve in future instead of built-in web server. see https://code.google.com/p/dart/issues/detail?id=15020 https://code.google.com/p/dart/issues/detail?id=15978 i couldn't find post afair seth ladd posted request pub serve should provide option serve application in root directory. it should possible serve dart application custom server , use darteditor debugger anyway. there bugs think should work now. don't know if it's supported create launch configuration - think so.

C projects for beginnerd -

i wondering project beginner in c knows other languages python , c++. i'm not asking tutorial or instructions set environment or compiler, more set of requirements or functionality. here project ideas useful learning c: guess number game: pick random number between 0 , 100. prompt user guess. print if number less or greater than. repeat until correct number guessed. poker hand dealer: pick 1 hand of random cards. 5 cards of spades, hearts, diamonds or clubs between 2 , a. command line arguments: 1: print entered command line arguments. 2: convert amd args string , print string. 3: command line arguments getopt. random generator: write random password generator. convert excisting script c: convert of excisting script c. file i/o: write simple text editor. game of life: write implementation of game of life. network programming: write simple irc client or irc bot.

An incompatible version 1.1.22 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.24 -

i installed apache apr on ubuntu 10.04 with sudo apt-get install libtcnative-1 when stated tomcat got following error: aug 07, 2013 6:57:32 pm org.apache.catalina.core.aprlifecyclelistener init severe: incompatible version 1.1.22 of apr based apache tomcat native library installed, while tomcat requires version 1.1.24 how have fix error? i created script compiling apache tomcat native library: #!/bin/bash export apr_path=/usr/bin/apr-1-config export java_home=/opt/java export tomcat_home=/opt/tomcat export install_prefix=/usr wajig install libaprutil1-dev make cd /tmp rm -rf tomcat-native-* tar -zxf $tomcat_home/bin/tomcat-native.tar.gz cd /tmp/tomcat-native-*/jni/native ./configure --with-apr=$apr_path --with-java-home=$java_home --prefix=$install_prefix make && make install

regex - Extract string from HTML tags using RegExp (Ruby) -

i extract "toast" string <h1>test</h1><div>toast</div> . regular expression isolate such string? edit: user who corrected formatting. more info: there 1 instance of div tag, information inside may change there never div tag in same string (the string larger given sample) thanks! this not typically done regex... , reason, if must , since said there never more single div within it... should work you: (?<=<div>).*(?=</div>)

javascript - Defining a click event programmatically -

i creating dynamic anchor tag this var anch = $('<a />', { 'href': '#' + ctrlid, 'text': text }) how add click event while creating tag automatically calls function funcone(ctrlid) , passes ctrlid? i tried no luck var anch = $('<a />', { 'href': '#' + ctrlid, 'text': text, 'onclick': funcone(ctrlid) }) var anch = $('<a />', { 'href': '#' + text, 'text': text, on: { click: function () { // }, someotherevent: function () { // } } }); demo.

Update Linked Excel Slide in Powerpoint Slide Show -

i have powerpoint presentation needs loop continuously in order display information. want linked excel worksheet object in 1 slide refresh data each time slide displayed, showing updated data in looping presentation. how go doing this? the code update 1 line: activepresentation.slides(2).shapes(1).linkformat.update you can refer both slides , shapes index number or name. above example updates link 1st shape object on 2nd slide object. need follow steps below in order make code fire @ proper time. from microsoft office documentation: how to: use events application object to create event handler event of application object, need complete following 3 steps: declare object variable in class module respond events. write specific event procedures. initialize declared object module. declare object variable before can write procedures events of application object, must create new class module , declare object of type app

For python nose test classes : What is the correct way to pass optional arguments -

i have created python class test_getfilesize use nose relevant sections: def __init__(self,mytestfile="./filetest",testsize=102400): ''' constructor''' print " running __init__", testsize,mytestfile self.testsize=testsize self.mytestfile = mytestfile and workhorse method: @with_setup(setup, teardown) def test_getfilesize(self): nose.tools import ok_, eq_,with_setup import mp4 open(self.mytestfile,"rb") out: filesize=mp4.getfilesize(out) eq_(self.testsize,filesize,msg='passed test size') print "results ", filesize,self.testsize if run nosetest against file containing class, correctly tests class using default values , correct setup , teardown methods. problem when write class that, setup method never gets run. what want able test different file sizes ( i.e. pass filesize value). if there better way it, ears. prefer not via command line i

node.js - NodeJS Native basic authentication -

is there node-native way parse basic authentication? steps be: find authentication header parse encoded value tokenize on colon , return user/pass perhaps friendly error handling/messaging on fail not looking connect/express framework solutions. i realize pretty trivial hand nice have standard way achieve without re-inventing wheel. so http auth has confusing thing. when have url credentials https://user:password@example.com', parse fine with url.parse`: url.parse('https://user:password@example.com') { protocol: 'https:', slashes: true, auth: 'user:password', host: 'example.com', port: null, hostname: 'example.com', hash: null, search: null, query: null, pathname: '/', path: '/', href: 'https://user:password@example.com/' } note it's url.parse(theurl).auth not url.parse(theurl).query.auth have. however, url itself, string. if tell http library request url, cr

Upgrade jQuery 1.4.4 to 1.8.3 -

i have "paralax effect" script uses jquery 1.4.4. need upgrade 1.8.3 version. i have .bind() thats not working 1.8.3. see script: $(document).ready(function() { //when document ready... //save selectors variables increase performance var $window = $(window); var $firstbg = $('#home'); var $secondbg = $('#produtos'); var $thirdbg = $('#empresa'); var $fourthbg = $('#contato'); var trainers = $("#second .bg"); var windowheight = $window.height(); //get height of window //apply class "inview" section in viewport $('#home, #produtos, #empresa, #contato').bind('inview', function (event, visible) { if (visible == true) { $(this).addclass("inview"); } else { $(this).removeclass("inview"); } }); //function places navigation in center of window function repositio

css - Border-radius causes weird behaviour in IE9, IE10 and IE11 -

Image
this fiddle produces expected results in real browsers (i tried ff, gc, safari), breaks unexpectedly in ie9, ie10 , ie11. no problems ie7 or ie8. <div class="root"> top <div class="footer">bottom</div> </div> .root { background-color: red; position: absolute; height: auto; bottom: 0; top: 0; left: 0; right: 0; margin: 25px; border: 0; border-radius: 7px; overflow: hidden; } .footer { background-color: green; position: fixed; left: 0; bottom: 0; width: 100%; height: 100px; } if remove border-radius or overflow:hidden parent, works fine. on earth have fixed position child? supposed positioned relatively viewport. is known\documented bug? rationale behind it? here think happening. browser vendors seem have decided fixed position elements overflow have clipping turned off, e.g. not clipped parents. makes things consistent, since fixed elements position

c# - Validate file size before upload - IE8+ -

i want validate file size before upload on ie8+ i tried validate file size before upload but didn't work. and can't configure every ie browser use "activexobject" (i saw 1 way solution). what should do? using asp.net fileupload control cannot use code validate size of file , inform user. if want better user experience, suggest investigate open source solutions following: custom http module neatupload free option. silverlight/flash option swfupload free option. asynchronous chunking option radasyncupload - telerik's asp.net asyncupload pay option, check website pricing.

Python execute code only if for loop did not begin iteration (with generator)? -

the else block in for / else clause gets executed if iteration finishes not interrupted break , so read . is there language construct let me write executes if for loop did not begin iteration? if using tuple or list , this: if seq: x in seq: # else: # else but when use generator, don't behavior want: >>> g = (x x in range(2)) >>> x in g: ... print x ... else: ... print "done" ... 0 1 done # don't want "done" here >>> g = (x x in range(2) if x > 1) >>> if g: ... x in g: ... print x ... else: ... print "done" ... >>> # expecting "done" here how can without exhausting creating tuple or list generator, while using for loop? use next() in while loop , try catch stopiteration , i'd see if there's nice way for . i can't think of better way updating boolean inside loop. any_results = false x in g: any

xml - php write file issue -

i working on php script creates xml file. when run script in browser not written out. when use shell command "php /filelocation" works fine. why this? <?php include('parse.php'); $test; $test[0] = "name:actinium"; $test[1] = "symbol:ac"; $test[2] = "atomic number:89"; $test[3] = "atomic weight:[227]"; xml_write($test); ?> <?php function xml_write($s) { $temp = explode(":",$s[0]); $data; $count = 0; for($i = 0;$i< sizeof($s);$i++) { $temp = explode(":",$s[$i]); $data[$count] = $temp[1]; $count++; } //creates root element $xml = new domdocument("1.0"); $root = $xml->createelement("table"); $xml->appendchild($root); //creates name element $name = $xml->createelement("name"); $nametext = $xml->createtextnode($data[0]); $name->appendchild($nametext); //creates symbol element $symbol = $xml-

auto renewing - Does Apple try to renew an IOS subscription past the renewal date? -

i have app supports auto renewal , trying determine if should should keep checking past renewal date auto renewable subscription if apple tries renew past date if there issue transaction failing or other reason. if so, how long? thanks if subscriber of app has opted auto renewal apple keep renewing his/her a/c till time subscriber doesn't opt out it. also till time billing method subscriber has provided information valid. regards rajeev

jquery - POST RESTful api call from Javascript/Django -

i'm trying post restful api call button on javascript. api call cross domain, challenge. how make call? in ajax call looks like: [i know can't cross-domain calls ajax]: $.ajax({ type: 'post', datatype: 'application/json', accept: 'application/json', async: false, username: 'user', password: 'name', url: 'http://exterenal.website', data: { "name": "marcus0.7", "start": 500000, "end": 1361640526000 }, success: function(){alert('done!');}, error:function(){alert('error!')}, }); in python call looks like: r = requests.post('http://externenal.website&

cordova - Playing local file from www folder -

i'm attempting use media functions of phonegap 2.7.0 play file that's locally stored inside www folder. no matter or how reference file, can't make work. (the app ios) error: "cannot use audio file resource xxxx", error code 1 i've tried giving path this: "media/rock.mp3" "www/media/rock.mp3" "file://var/mobile/applications/..../www/media/rock.mp3" "/var/mobile/applications/..../www/media/rock.mp3" they produce same error. playing file remotely http address works perfectly. here's code: function spilllyd_lokal() { var sti = window.location.pathname; sti = "file:/" + sti.replace('index.html', ''); var url = sti + "media/rock.mp3"; var my_media = new media(url, function () { alert("playaudio():audio success"); }, function (err) { alert("playaudio():audio error: " + json.stringify(err)); } ); my_media.play(); }

spring - JDBC URL is null? -

depending on spring profile hibernate should update (development) or validate (production) db schema. i'm getting exception: java.sql.sqlexception: url cannot null @ java.sql.drivermanager.getconnection(drivermanager.java:556) @ java.sql.drivermanager.getconnection(drivermanager.java:187) @ org.springframework.jdbc.datasource.drivermanagerdatasource.getconnectionfromdrivermanager(drivermanagerdatasource.java:173) @ org.springframework.jdbc.datasource.drivermanagerdatasource.getconnectionfromdriver(drivermanagerdatasource.java:164) @ org.springframework.jdbc.datasource.abstractdriverbaseddatasource.getconnectionfromdriver(abstractdriverbaseddatasource.java:153) @ org.springframework.jdbc.datasource.abstractdriverbaseddatasource.getconnection(abstractdriverbaseddatasource.java:119) @ org.hibernate.service.jdbc.connections.internal.datasourceconnectionproviderimpl.getconnection(datasourceconnectionproviderimpl.java:141) @ org.hibernate.tool.hbm2dd

iOS - Can't send Facebook requests -

i have problem ios application because don't seem able send requests people... here code have: nsmutabledictionary* params = [nsmutabledictionary dictionarywithobjectsandkeys:nil]; if([fbsession activesession].isopen) { [fbwebdialogs presentrequestsdialogmodallywithsession:[fbsession activesession] message:@"join me." title:@"invite" parameters:params handler:^(fbwebdialogresult result, nsurl *resulturl, nserror *error) { nslog(@"%@", [fbsession activesession]); if (error) nslog(@"error sending request."); else { if (result == fbwebdialogresultdialognotcompleted) nslog(@"user canceled request."); else if(result == fbwebdialogresultdialogcompleted) nslog(@"request: %@", resulturl); else nslog(@"error unknown."); } }]; } else { [fbsession openactivesessionwithrea