Posts

ios - UICollection View and UITable View inside UITableViewCell -

Image
i using uistackview add uilabels along uitableview , uicollectionview. when data loaded views uilabels shown. i have not added constraints in views please me know behavior of uistackview not allowing me show uitableview , uicollectionview. but if add height constraints view works view gets messy. on scrolling main view in uistackview present after data load operation finished, view seen correctly. i adding view wanted when main view first loads in attachment.

c# - Sort MongoDB result on aggregation of list element field -

i started play around mongodb on c#. use restaurant sample data ( https://raw.githubusercontent.com/mongodb/docs-assets/primer-dataset/primer-dataset.json ). what trying figure out is, how can sort restaurants total of rating score. can provide sample on how using aggregatefluent api? got lost that. thanks! i create dto classes collection: public class restaurant { public objectid _id { get; set; } public address address { get; set; } public string borough { get; set; } public string cuisine { get; set; } public grades[] grades {get;set;} public string name { get; set; } public string restaurant_id {get;set;} } public class grades { public datetime date {get;set;} public string grade {get;set;} public int? score {get;set;} } public class address { public string building { get; set; } public double[] coord { get; set; } public string street { get; set; } public string zipcode { get; set;} } and if create c...

api - Searching users on LinkedIn using Python-LinkedIn -

i new python programming. trying access linkedin data using pyhton. have performed steps mentioned @ https://ozgur.github.io/python-linkedin/ when run code profile, desired result if try code else (like search_profile() or get_group(41001)) following error linkedinerror: 400 client error: bad request url: the code have written below: api_key = "xyz" api_secret = "abc" return_url = "http://localhost:8080/testprj/auth/linkedin" access_token = "abcdef" application = linkedin.linkedinapplication(token=access_token) application.get_profile() # no error application.get_group(41001) # error application.search_profile(selectors=[{'people':['first_name','last_name']}]) # error can me understand issue , how solve ? thanks !!!

android - retrofit gives 500 internal server error when I add only one item, but postman response works fine -

Image
i trying debug issue "http 500 internal access error" .for code shown below: private void submitorder() { list<string> itemids = new arraylist<>(); list<integer> itemquantity = new arraylist<>(); (foodtruckitem foodtruckitem : foodtruckitemlist) { itemids.add(foodtruckitem.getitemid()); itemquantity.add(foodtruckitem.getitemquantityordered()); } if (internetconnection.checkconnection(this)) { observable<genericresponse> results = retroclient.getapiservice() .submitorder("******", "", total, "anywhere", "", "*****", itemids, itemquantity, foodtruckinfo.getfoodtruckid()); results.subscribeon(schedulers.io()).observeon(androidschedulers.mainthread()) .subscribe(new subscriber<genericresponse>() { @override public voi...

catransform3d - How do I get the right perspective for the used pattern? iOS Project with Swift3 -

Image
the following image house garage; garage door pattern: the garage door overlaid pattern, how can transform pattern perspectively correct? this ios/swift3 project i'm working on, using following code let layer:calayer = self.rectimageview.layer var rotationandperspectivetransform:catransform3d = catransform3didentity rotationandperspectivetransform.m34 = 1.0 / -250 rotationandperspectivetransform = catransform3drotate(rotationandperspectivetransform, self.calculateangleofperspective(), 0.0, 1.0, 0.0) layer.transform = rotationandperspectivetransform i'm getting following view garage door wrong perspective: can please guide me right direction, how can achieve, seen in upper half of image, instead of lower part? in advance!

java - Going back to Main Activity on Android app with back key to see user score -

hopefully can advice on this. my program has sprite that, when hit/clicked, score tallied on screen. when game on (time runs out), want user able press key on phone go main/start screen/activity began game, show score (how many hits). i'm struggling figure out how go back key press. can figure out high score bit @ later date if need be. want start screen. update: i think may have manifest why it's not working. i've tried add 'gameview' class manifest won't accept it. says has no default constructor. ideas? <application android:allowbackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme" > <activity android:name="cct.mad.lab.mainmenu" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.main" /> ...

Android close current activity and return to previous activity -

in second activity, can uninstall app after uninstall finished, second activity remains. need go previous activity after uninstall finished uri packageuri = uri.parse("package:"+packageinfo.packagename); intent uninstallintent = new intent(intent.action_delete, packageuri); startactivity(uninstallintent); update first activity (firstactivity.java) firstactivity.java use startactivityforresult (uninstallintent, 1); //1 request_code after unintalling app, firstactivity.onactivityresult automatically called, can use method something. @override protected void onactivityresult(int requestcode, int resultcode, intent data) { super.onactivityresult(requestcode, resultcode, data); if (requestcode == 1) { if (resultcode == result_ok) { // un-installed finish(); } else { // failed un-install } } }