Posts

sharepoint online - Getting Error while running Powershell Script to add Site Content Link -

$adminupn="xxxxx@home500.onmicrosoft.com" $orgname="xxxxxx" $usercredential = get-credential -username $adminupn -message "type password." connect-sposervice -url https://$orgname-admin.sharepoint.com -credential $usercredential # begin process $loadinfo1 = [system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint.client") $loadinfo2 = [system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint.client.runtime") $loadinfo3 = [system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint.client.userprofiles") #add sharepoint powershell snapin if not added $snapin = get-pssnapin | where-object {$_.name -eq 'microsoft.sharepoint.powershell'} if ($snapin -eq $null) { write-host "loading sharepoint powershell snapin" add-pssnapin "microsoft.sharepoint.powershell" -ea silentlycontinue } cls $starttime = $(get-date -f f) $timestamp = get-date ...

Percent symbol not getting evaluated in makefile -

i'm new makefiles etc. the file looks this: compiler_name = gcc compiler_flags = path_objects = ./obj path_sources = ./src $(path_objects)/%.o: $(path_sources)/%.c $(info generating object files...) @$(compiler_name) $(compiler_flags) -c $< -o $@ cleanup: $(path_objects)/%.o $(info final cleanup...) @rm -rf $< when try make project error: make: *** no rule make target 'obj/%.o', needed 'cleanup'. stop. it's % wildcard not getting evaluated correctly. please me. a pattern rule has '%' in target , , maybe in 1 or more of prerequisites. have: cleanup: $(path_objects)/%.o ... is not pattern rule, , '%' not wildcard, it's character. that's ordinary rule looks file called "./obj/%" prerequisite, , there's no such file. if want cleanup remove of object files in directory, there's no need of complication. this: cleanup: @echo final cleanup... @rm -rf $(pat...

android - Backbone.js fetch goes to error when loading json file -

i'm trying load json file called internationalization.js, content of file: { "response": { "loading": "loading", "login.login": "log in" } } this works fine on browser, when building ios or android app using cordova fetching fails , goes error function. i'm wondering if asynchronous nature of fetch works in different way when on mobile app. file found correctly xhr holds json content in responsetext, have seen when debugging in safari. code fetching: var internationalizationmodel = new model({}, {url: config.internationalization}); internationalizationmodel.fetch({ success: _.bind(function(model){ window.polyglot = new polyglot({phrases: model.tojson()}); app.router.navigate("home",true); }, this), error: _.bind(function(model, xhr, options){ this.logout(); }, this) relevant methods in model: sync: function(method, m...

javascript - AngularJS ng-repeat print 0 if any object missed -

one object missed in 2nd array. using ng-repeat there want print 0. please find below code <div ng-repeat="item in items"> {{item}} <div> <h3>{{item[0].name}}</h3> <div> <article> {{item[0].tc}} </article> <article> {{item[1].tc}} </article> <article> {{item[2].tc}} </article> </div> </div> </div> code in plunker print object or 0 instead <article> {{item[2].tc || 0}} </article> or <article> {{item[2].tc ? item[2].tc : 0}} </article>

Java Convert List<String> to List<Object> -

i've 2 classess csvread , myownclass. in csvread i've method public static list getdatafromcsv(); returns list of data. , data want take in method in class myownclass , return there list of objects of ownclass it looks this: list<string> datafromcsv = new arraylist<string>(); and in class, want convert list<object> of class. private static list<string> getdatafromcsvclass = new arraylist<string>(); getdatafromcsvclass = csvreader.getallcsvdata(filename); string name = datafromcsv[0]; string surname = datafromcsv[1]; string birth = datafromcsv[2]; i want return new myownclass(name, surname, birth); my error: array required list found: string name = alldata[0]; etc you can create method convert string myownclass , use stream map elements, e.g.: public static myownclass converttoobject(string element){ string[] tokens = element.split(","); return new myownclass(tokens[0], tokens[1], tokens[2]); } //...

c# - Resource not found Face API 1.0 -

for love of life can not figure out why jason format ways wrong , using microsoft face api 1.0 create person within group here code protected async void btnaddfaces_click(object sender, eventargs e) { var client = new httpclient(); var querystring = httputility.parsequerystring(string.empty); string persongroupid = txtfriendlist.text.tolower(); string persons = txtfriendname.text.tolower(); // request headers client.defaultrequestheaders.add ("ocp-apim-subscription-key", "{yourkey}"); // request parameters var uri = "https://westus.api.cognitive.microsoft.com/face/v1.0/ persongroups/wowlist/persons?" + querystring; // httpresponsemessage response; // not sure think here problem string body = "{\"name\":\"" + "waheed" + "," + "\"}"; // request body using (var content ...

android - Create a staggered grid like the given image -

Image
i trying achieve view: this partial view , can have view vertically merged 2 cells or horizontally merged 2 cells or single small view. this view can scroll vertically please me this. you can create layout using nested linearlayout attribute layout_weight , weightsum . make layout scrollable , use scrollview root layout. here working example: <?xml version="1.0" encoding="utf-8"?> <scrollview xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="8dp" android:orientation="vertical"> <!-- row1 --> <linearlayout android:layout_width="match_parent" android:layout_he...