Posts

Access a shared calendar (such as a meeting room via Office 365 REST API) -

i'm using office 365 rest api access account's calendars. i'd access calendars account has access to, in particular meeting rooms calendars appearing in "other calendars" section in office 365 interface. for now, if query " https://outlook.office365.com/api/v1.0/me/calendars " endpoint, got calendars own, not meeting rooms calendars. any clue on how them (via office 365 rest api) ? the rest api doesn't support access other user's calendars when logging in user. can use client credentials model grant app access calendars in organization , access them way.

android - Load bitmap in recyclerView from internalStorage with Asynctask -

i'm working in android app need downloading png web , showing in recyclerview. downloading part works fine same save in internal storage. problem display, when load in asynctask in onbindviewholder, isn't fluid..... , on avd have exception resources not closed. paste adapter : public class myadapter extends recyclerview.adapter<myadapter.myviewholder>{ private static final string tag = "myadapter"; private list<item> listitem = null; public myadapter(list<item> listitem) { this.listitem = listitem; } @override public myviewholder oncreateviewholder(viewgroup parent, int viewtype) { // log.d(logtag, "view group " + parent); view v = layoutinflater.from(parent.getcontext()).inflate(r.layout.item_row, parent, false); return new myviewholder(v); } @override public void onbindviewholder(final myviewholder holder, int position) { //log.d(logtag, " bind " + position + " holder " + holder); final...

Load HTML file and force UTF8 with PHP -

i accessing external url specific content of xpath. i tried several different ways achieve this, of them end presenting little problem. after big research, way: i create stream context open file right headers: utf-8 $opts=array('http' => array('header' => 'accept-charset: utf-8, *;q=0')); $context=stream_context_create($opts); $html=file_get_contents($url,false,$context); then, inside class, created domdocument object, load fetched html string, follows: $this->dom->loadhtml(mb_convert_encoding($html, 'html-entities', "utf-8"), libxml_html_noimplied | libxml_html_nodefdtd); it works fine in every case, strip away complex characters, á, ó, ç, etc.. example : " gobierno marroquí para " turns " gobierno marroqu para " i tried loading html plain text prefix <?xml encoding... , works fine, have issues further htmlpurifier operations. any kind of information appreciated, not looking task me, r...

java - Extract Blob value and pass to Controller in Spring MVC (without using hibernate) -

is there way extract blob file (an oracle) db , pass controller in spring mvc without using hibernate ? the following table structure: desc project_storage; project_id number(38) file_name varchar2(20) documents blob alias varchar2(50) file_type varchar2(50) my code of follows : @requestmapping(value = "/downloadfile.htm", method = requestmethod.get) @responsebody public void downloadfile(modelmap model,httpservletrequest request,httpservletresponse response,@requestparam map<string,string> parameters) { object objarray2[]=new objec map<string,object> file=user.getbyid(objarray2, "select * project_storage project_id = 63 "); log.info("the record retrieved : "+file); //the record retrieved : {project_id=63, file_name=mat.png, documents=[b@1edef76, alias=null, file_type=image/png} try {file file2=(file)file.get("documents...

mysql - How to make this eav query horizontal -

i want choose below table records have ( property_id=18 , property_value=78) , (property_id=19 , property_value=113) in table results record id = 12 . link image of table. here mysql query : select distinct `product`.* , productmeta.property_id, productmeta.property_value `shop_products` `product` left join `shop_categories` `category` on (`product`.`category_id` = `category`.`id`) left join `shop_product_metas` `productmeta` on (`product`.`id` = `productmeta`.`product_id`) `product`.`category_id` = (26) , (`product`.`price` * (1 - (`product`.`off`/100)) ) >= '100' , (`product`.`price` * (1 - (`product`.`off`/100)) ) <= '5000000' , ( ( ((`productmeta`.`property_id` = 18) , (`productmeta`.`property_value` = '77')) or ((`productmeta`.`property_id` = 18) , (`productmeta`.`property_value` = '78')) ...

c# - groupBy query Error -

we trying return query in viewbag , en error of: the key switch type of reading method , groupby , not comparable basic database provider . this our controller: public viewresult index(string sortorder, string searchstring, decimal searchprice = -1) { viewbag.namesortparm = string.isnullorempty(sortorder) ? "namedesc" : ""; viewbag.productsortparm = sortorder == "namep" ? "namepdesc" : "namep"; viewbag.companysortparm = sortorder == "names" ? "namesdesc" : "names"; var customers = s in db.customers select s; if (!string.isnullorempty(searchstring)) { customers = customers.where(s => s.name.toupper().contains(searchstring.toupper()) || s.namep.toupper().contains(searchstring.toupper())); } if (!searchprice.eq...

javascript - Binding src in embed does not work in chrome -

i'm using angularjs build web page it's working fine in ie , firefox when tried in chrome stop working. i'm wondering why not working in chrome , if there possible workaround. html <div data-ng-controller="documentcontroller"> <embed src={{documentid}} height="600" width="100%"/> </div> javascript (function(){ var document = angular.module('document', []); document.controller('documentcontroller', ['$scope', '$routeparams', function($scope, $routeparams){ $scope.title = 'document'; $scope.documentid = "document/" + $routeparams.documentid; }]); })(); edit error http error 404 problem accessing /%7b%7bdocumentid%7d%7d. reason: not found document global variable in browser environment ( docs ) , know can't overridden (maybe in old browsers). try choose name module prevent bad situations.