Posts

JavaScript Sort by date multidimensional Json array -

this question has answer here: sort array of objects string property value in javascript 31 answers i have following multidimensional array want sort loc_time. var json = [{ "id": 5, "lieu_depart": "la rochelle", "lieu_arrivee": "lyon", "condlocalisation": [{ "id": 1, "longitude": "-3.120830", "latitude": "52.801452", "adresse": "paris", "loc_time": "25 jun 2012, 8:00 am" }, { "id": 3, "longitude": "2.130122", "latitude": "48.801408", "adresse": "versailles", "loc_time": "15 may 2013, 6:40 pm" }, { "id": 5, ...

java - Implementing an adapter for RecyclerView in Android -

i trying implement flexible space image pattern of material design. in order so, followed this tutorial . the problem is, tutorial uses recyclerview , , have view i'd use simple scrollview relative view: <scrollview xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="fill_parent" android:layout_height="fill_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior"> <relativelayout android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingleft="20dp" android:paddingright="20dp" > <textview android:id="@+id/loggedintitle" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_ali...

unity3d - facebook unity sdk 7.0.2 - FB.IsLoggedIn returns false when you reopen the app but should still be logged in -

prior upgrading 7.x version of unity fb sdk, fb.isloggedin return true after fb.init. now, returning false , have new login every time. this seems bug. i'm on unity 5.1.1p4 , building android. haven't tried ios yet. reproduction steps: start app, login fb close app start app again, not automatically logged in fb (fb.isloggedin false) expected behavior: fb.isloggedin should true if logged in. how worked before. in fbunityinterface.mm : add - (id)init : [[fbsdkapplicationdelegate sharedinstance] application:[uiapplication sharedapplication] didfinishlaunchingwithoptions:null]; replace in - (void)configureappid : [fbunityutility sendmessagetounity:fbunitymessagename_oninitcomplete userdata:@{} requestid:0]; with: if ([fbsdkaccesstoken currentaccesstoken]) { fbsdkaccesstoken *token = [fbsdkaccesstoken currentaccesstoken]; nsinteger expiration = token.expirationdate.timeintervalsince1970; [fbunityutility sendmessagetounity:fbunity...

ruby - Keep google analytics tracking id confidential Rails 4 -

my question within google analytics how keep ga_tracking_id out of source code ? tried achieve through environment variable value of key in source see. here relevant code. production.rb config.ga_tracking_id = env['ga_tracking_id'] application.html.erb <%# google analytics (only in production environments) %> <% if rails.env.production? %> <script> (function(i,s,o,g,r,a,m){i['googleanalyticsobject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new date();a=s.createelement(o), m=s.getelementsbytagname(o)[0];a.async=1;a.src=g;m.parentnode.insertbefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', '<%= rails.configuration.ga_tracking_id %>', 'auto'); ga('send', 'pageview'); </script> <% end %> then set k...

html - Unexpected CSS Positioning Bug -

Image
i have following code : <!doctype html> <html> <head> <title>kastflix</title> <style type="text/css"> .moviepane { background-color: #181816; top: 41px; left: 181px; position: fixed; width: 100%; height: 100%; } .movietile { background-color: #181816; margin-top: 13px; margin-left: 12px; margin-right: 12px; width: 135px; height: 235px; display:inline-block; vertical-align: top } .movieposter { width: 135px; height: 197px; border:1px solid #000000; border-radius: 3px; transition: 0.5s; position: absolute; } .movieposter:hover { border:1px solid #0094ff; } .linkoverlay { width: 137px; height: 199px; background-color: #000000; opacity: 0; transition: 0.5s; pointer-events: none; } .movieposter:hover + .linkoverlay { opacity: 0.6; } </style> </head> <body> <div class="moviepane"> <div class="movietile"> <a href="a"> <img class="movieposter...

objective c - Vendored framework inside of pod not recognized by project or other pods (Cocoapods/Cocoapods #3810) -

in project, reference several private pods company uses. 1 of these pods called dkkit dependent on private pod i've included called baseprokit. baseprokit contains 3 frameworks references inside of header , implementation files, believe considered vendored_frameworks . in existing header files of baseprokit, there references these frameworks via imports #import <ppcommon/ppcommon> work fine (usually) when compiling while solely relying on baseprokit pod. however, when dkkit included, there header alias dkkit looks when importing ( baseprokit.h ) contains above import. however, in context of dkkit, seem dkkit pod unaware of existence of ppcommon framework, , sees header files' aliases referenced via pods-baseprokit. because of this, , references <ppcommon/anything> create compilation errors (not found), , way i've been able figure out far referencing via #import "ppcommon.h" require me adjust of imports in entire baseprokit project, , doesn'...

dictionary - Now I have map marker for categories. I want to add a default map marker to google map. How? -

from demo here here . can see if clicked check box restaurants or parks. markers show up. these markers item of both 2 categories. i want add 1 more map marker default position of map. i tried add this, it's not working. var map; var var_location = new google.maps.latlng(45.430817,12.331516); function map_init() { var var_mapoptions = { center: var_location, zoom: 16, maptypeid: google.maps.maptypeid.roadmap, pancontrol:false, rotatecontrol:false, streetviewcontrol: false, scrollwheel: false, }; map = new google.maps.map(document.getelementbyid("map"), var_mapoptions); var contentstring = '<div id="mapinfo">'+ '<p><strong>peggy guggenheim collection</strong><br>'+ 'dorsoduro, 701-704<br>' + '30123, venezia<br>'+ 'p: (+39) 041 240 5411</p>...