Posts

objective c - Uploading a file to Google drive using iOS sdk -

in current application, trying upload .text file google drive using google sdk ios . issue every time got error message in log insufficient permission , if have faced or have idea on type of error kindly me. here code, gtldrivefile *file = [gtldrivefile object]; file.descriptionproperty = @"uploaded ios app."; file.mimetype = @"text/*"; file.name=@"mytextfile"; nsstring *filepath = [[nsbundle mainbundle] pathforresource:@"mytestfile" oftype:@"txt"]; gtluploadparameters *uploadparameters = [gtluploadparameters uploadparameterswithfileurl:[nsurl urlwithstring:filepath] mimetype:file.mimetype]; gtlquerydrive *query = [gtlquerydrive queryforfilescreatewithobject:file uploadparameters:uploadparameters]; [self.service executequery:query completionhandler:^(gtlserviceticket *ticket, id object, nserror *error) { if (error) { nslog(@"er...

Spring SAML configuration is breaking other http connections -

i using spring saml implement single sign on in application. evreything integrated , works sso perspective. service of application uses http client post via axis started failing following error { http://xml.apache.org/axis/ }stacktrace:javax.net.ssl.sslpeerunverifiedexception: ssl peer failed hostname validation name: null i have looked answer provided link spring security saml + https page , follow same no avail. below configuration tlsprotocolsocketfactory <bean class="org.springframework.beans.factory.config.methodinvokingfactorybean"> <property name="targetclass" value="org.apache.commons.httpclient.protocol.protocol"/> <property name="targetmethod" value="registerprotocol"/> <property name="arguments"> <list> <value>https</value> <bean class="org.apache.commons.httpclient.protocol.protocol"> ...

c# - Entity Framework v6.1 query compilation performance -

Image
i confused how ef linq queries compiled , executed. when run piece of program in linqpad couple of times, varied performance results (each time same query takes different amount of time). please find below test execution environment. tools used: ef v6.1 & linqpad v5.08. ref db : contosouniversity db downloaded msdn. for queries, using persons, courses & departments tables above db; see below. now, have below data: query goal: second person , associated departments. query: var test = ( p in persons join d in departments on p.id equals d.instructorid select new { person = p, dept = d } ); var result = (from pd in test group pd pd.person.id grp orderby grp.key select new { id = grp.key, firstname = grp.first().person.firstname, deps = grp.where(x => x.dept != null).select(x => x.dept).distinct().tolist() }).skip(1).take(1).tolist(); foreach(var r in result) { ...

php - Laravel 5 .htaccess url public remove not working -

i using laravel 5 default directory structure. removing public folder url using following code in .htaccess <ifmodule mod_rewrite.c> rewriteengine on rewriterule ^(.*)$ public/$1 [l] </ifmodule> i using xampp , path http://localhost/pro/laravel5/public so project in htdocs/pro/laravel5/ here have kept above .htaccess else default when try access project following error. notfoundhttpexception in routecollection.php line 145: in routecollection.php line 145 @ routecollection->match(object(request)) in router.php line 719 @ router->findroute(object(request)) in router.php line 642 @ router->dispatchtoroute(object(request)) in router.php line 618 @ router->dispatch(object(request)) in kernel.php line 210 @ kernel->illuminate\foundation\http\{closure}(object(request)) @ call_user_func(object(closure), object(request)) in pipeline.php line 141 @ pipeline->illuminate\pipeline\{closure}(object(request)) in verifycsrftoken.php line 43 @ verifyc...

Typescript: define type of an object -

i want define type of object literal, key valye pairs, below. in way can't manage this. please help. export const endpoints: {name: string: {method: string; url: string;}} = { allfeed: { method: 'get', url: 'https://www.yammer.com/api/v1/messages.json' }, topfeed: { method: 'get', url: 'https://www.yammer.com/api/v1/messages/algo.json' }, followingfeed: { method: 'get', url: 'https://www.yammer.com/api/v1/messages/following.json' }, defaultfeed: { method: 'get', url: 'https://www.yammer.com/api/v1/messages.json/my_feed.json' } }; you're close, should be: const endpoints: { [name: string]: { method: string; url: string; } } = { allfeed: { method: 'get', url: 'https://www.yammer.com/api/v1/messages.json' }, ... }; you can use interfaces: interface endpoint { method: string; url: string; } interfac...

openerp - How to bring products from opportunity to quotation -

hello new odoo , want help. i have created tab products(many2many) in opportunity (your pipeline) contains product comes mass mailing has been customized. when opportunity won , converted quotation want products present in opportunity transferred in order_line(one2many) tab of quotation. need know there possible way complete functionality. i see 2 ways, how that: lead (opportunity) scope try override functionality of odoo creating sale.order crm.lead . here have create sale.order.line via one2many triplets ( look write method ) or after sale.order creation, create sale.order.line (with values , create()) order scope (only useful when have lead id on sale.order creation) get crm.lead (when provided) , create sale.order.line 1 of approaches "lead (opportunity) scope".

html - How to delete the row in a div without using table in javascript -

hi guys source code need delete row in div when press delete button using javascript please give me solution me.the important thing don't use table instead of div .so please give me solution me. function add() { var x = document.queryselectorall(".div1"); var i; (i = 0; < x.length; i++) { x[i].innerhtml += "<br><br> <input type='text' name='mytext'>"; } } function del() { var y = document.queryselectorall(".div2"); var i; (var = 0; < y.length; i++) { y[i].innerhtml += "<br><br><br> <input type='button' value='delete' onclick='removerow(this)'>"; } } function removerow(input) { input.parentnode.removechild(input.previoussibling); input.parentnode.removechild(input); } #add_btn { float: left; margin: 0% 0% 0% 72%; border-radius: 25px; cursor: pointer; padding: 10px; } body { b...