spclientcontext.credentials = new sharepointonlinecredentials(username, securepassword); //https://msdn.microsoft.com/en-us/library/office/ee534956(v=office.14).aspx web spweb = spclientcontext.web; list splist_csv = spweb.lists.getbytitle("supplier master list"); view spview_csv = splist_csv.views.getbytitle("_data pending export csv");//oracle export field spclientcontext.load(spview_csv); spclientcontext.executequery(); camlquery query = new camlquery(); query.viewxml = spview_csv.viewquery; listitemcollection items = splist_csv.getitems(query); spclientcontext.load(items); spclientcontext.executequery(); foreach (var item in items) { //some field/item missing? } hi, using code above retrieve data sharepoint online. @ first, working fine. but, when add in new column view _data pending export csv on sharepoint online, found out new added field missing. idea? ok. found out others issue, lookup field on limit. did fix change lookup field s...
i have following architecture: +-----------------+ | collection | | | | | | | | | +-----------------+ | ^ | | create() | | | | v | getitem(b) +------------+ | | item | | | | | | +------+ | | +------------+ a class managing collection of items, creates items. , these items may need other items collection. the actual code in python, , collection passes parameter created item . see it, bad practice. improvement can see pass few functions of collection needed item , instead of whole instance. for example: class collection: getitem(self, id): ... createitem(self, id): item = item(id, self) # <-- pass self ... class item: __init__(self, id, col): ... col.getite...
just wondering if guys can code. it works serving images not pdf brochure. in advance func main(){ http.handlefunc("/", func(w http.responsewriter, r *http.request){ filename := "/var/www/filedipenser/brochure.pdf" streampdfbytes, err := ioutil.readfile( filename ) if err != nil { fmt.println(err) os.exit(1) } b := bytes.newbuffer(streampdfbytes) w.header().set("content-type", "application/pdf") if _, err := b.writeto(w); err != nil { fmt.fprintf(w, "%s", err) } w.write([]byte("pdf generated")) }) err := http.listenandserve(":4111", nil) if err != nil { log.fatal("listenandserve: ", err) fmt.println(err) } } the code bit inefficient appears working. however, pdf viewers might sensitive extraneous output adding end of http response stream...
Comments
Post a Comment