Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Nitya Narasimhan
    @nitya
    @johnshea merged your updates (nice!) and updated to link contributors to github profiles as well.
    John Shea
    @johnshea
    @nitya just saw it. thank you.
    Patrick Ladd
    @laddp
    @nitya RSVPs for next week's study session at DCC are closed - is that on purpose?
    Nitya Narasimhan
    @nitya
    @laddp oops. My mistake. Will fix now(thanks for the heads up)
    @laddp let me know if you can RSVP now?
    Patrick Ladd
    @laddp
    @nitya Yep works now
    Nitya Narasimhan
    @nitya
    happy dance :-)
    Patrick Ladd
    @laddp
    @nitya I think the date on the SUNY NP one is wrong too - shows Wed Feb 11 should be Tue Feb 10 right?
    Nitya Narasimhan
    @nitya
    Lemme check -- yes, all SUNY should be Tue and DCC Wed. Darn. Caught by the most basic of errors the infamous copy/paste :-)
    Patrick Ladd
    @laddp
    Happens to everybody... I think everybody is clear what's what but don't want Meetup sending wrong reminders or calendar entries
    Nitya Narasimhan
    @nitya
    @laddp Yes absolutely. I think its good now
    John Shea
    @johnshea
    On the Udacity page for lesson 1, "Create Project Sunshine", the first item on the navbar is for "Welcome to Developing Android Apps", the code behind it is
    <li data-node-key="1643858568" data-ng-repeat="morsel in morsels" class="subway-nav-station ng-scope is-viewed is-current" data-ng-class="getStyleClassesForMorsel(morsel)" style=""> <span> <!-- ngIf: morsel.model=='Exercise' --> <a href="" class="subway-nav-video" data-ng-click="goToMorsel(morsel)">&nbsp; <span class="subway-nav-station-content text-break-word ng-binding">Welcome to Developing Android Apps</span> </a> </span> </li>
    Where in the source code can I find "morsels" defined with values and function "goToMorsel"?
    Nitya Narasimhan
    @nitya
    @johnshea I can come look at this later this evening (am not at my desk right now) but why are you looking at the website code? I am guessing you want to automate capture of the links?? Just a quick scan (and the appearance of -ng- attribute names) indicates they are using AngularJS to write their front end. Angular controllers will contain these function declarations - and those have probably been minified and concatenated into the single file downloaded to client at load time. So chances are that it won’t be easy to “read” that source.
    @johnshea this is not hopefully preventing you from actually finishing lesson 2?
    John Shea
    @johnshea
    @nitya you guessed right :) I can already pull all the subchapters with jquery. Now I was trying to get the video links too.
    Nitya Narasimhan
    @nitya
    PS. when you see “morsel in morsels” it means angular is running a repeat look looking for incoming data array (morsels) with each item allocated to a single data (morsel). The morsels data is most likely being pulled in dynamically from a call to the Udacity server so chances of you see it cached are slim
    John Shea
    @johnshea
    @nitya no worries about lesson 2. I already finished it and had some time to work on the android book
    Nitya Narasimhan
    @nitya
    @johnshea very nifty — you rock!! Thanks for all the help on the book and please go for it. I can come look at it this evening and see if I can help further?
    John Shea
    @johnshea
    i was in the developer console and looked thru all the js files but don't see "morsels" or "goToMorsel" defined anywhere. Is Angulas doing something dynamic?
    i wanted to see how morsel was defined and how it was calling "goToMorsels" so I can generate the link for the book without having to click on each one and then copy URL of video
    Nitya Narasimhan
    @nitya
    @johnshea yes — but I can tell more when I am back at desk later this evening?
    John Shea
    @johnshea
    sure...np..when (and if) you have time
    Nitya Narasimhan
    @nitya
    @johnshea that would be SOOOOOO nice so I am all for it.
    John Shea
    @johnshea
    I understand this is above-n-beyond normal book editing so only if you feel inclined
    Nitya Narasimhan
    @nitya
    @johnshea grins understood
    @johnshea have to run now — ttyl
    John Shea
    @johnshea
    if it helps in the list item is data-node-key="1643858568" which it is using as part of the link
    and the link in the book is https://www.udacity.com/course/viewer#!/c-ud853/l-1395568821/m-1643858568
    but the subchapters with exam/extra stuff have additional data in the URL so I was curious how the morsel contained it to build links
    3rd link for "are you ready for the course?" has https://www.udacity.com/course/viewer#!/c-ud853/l-1395568821/e-2162698696/m-2205438564
    Nitya Narasimhan
    @nitya
    @johnshea will be you online this evening? can chat more then — but yes, the way this works (single page app) is that the prefix (up to viewer) is static but the rest of the path is dynamically composed from data provided at that handler/route. So I am guessing morsels is a data array that contains each chapter’s description and the relevant path snippet, and the click handler basically creates this completed path on the fly
    @johnshea and now I HAVE to hop off (I do love discussions like this so its tempting to reply but I am being glared at by my 6yo here so have to run)
    John Shea
    @johnshea
    @nitya go enjoy your kid time...more important than this
    @nitya I will try to be on this evening but not sure...send me a msg w/ a rough time and I will try and make it
    Nitya Narasimhan
    @nitya
    @johnshea will do. I’ll leave you a message on gitter when I am back online .
    John Shea
    @johnshea
    @nitya Hi Nitya - yesterday I did a crash course online for AngularJS at codecademy. With that quick intro to AngularJS, I then looked all over but cannot find where "morsels" is populated. If it is not too difficult/time consuming, can you help me find that part? data-ng-repeat="morsel in morsels" I am thinking it is "udacity.min.js" but having no luck - i un-minified the file and went line by line/searched.
    Nitya Narasimhan
    @nitya
    @johnshea will keep this thread clear (for android-guide questions) and will start a private thread with you on this so we can chat more. Found a few things that may help
    Ivan Fernandes
    @ivan94
    the pletch's computer died
    Ivan Fernandes
    @ivan94
    @nitya Do you remember our discussion about the share button on the last meeting? When I was using the app today I realized that it must not be behaving the way it should... I captured my screen to show you: https://www.youtube.com/watch?v=pkmduwwe7-8
    Just to describe the actions: I first enter the app, go to the Detail page. The share button shows the list ordered by my last uses. I click to share by twitter, press the back button and twitter is showing on the last used share option. When I click the share button again the twitter icon suddenly disappears (different behavior than the first time), I close and click again and twitter is on the top of my list
    Ivan Fernandes
    @ivan94
    After that I go back to the ListView, enter again to the details page and now the list on the share button do not have any order whatsoever. I close the app, remove from the memory, and then when I launch the app again and go to the details page it shows the list ordered again, including the twitter app
    Nitya Narasimhan
    @nitya
    @ivan94 — this is interesting (and a terrific question!) I am going to try out the sequence of actions on my local app and see what my behavior is. If you have your code on GitHub let me know and I can build that version and see as well. So one thing that would be interesting to see is what the persisted ShareAction history is, and understand how it changes based on various actions you’ve shown above. See http://developer.android.com/guide/topics/ui/actionbar.html#ActionProvider — there is a file (name provided by the DEFAULT_SHARE_HISTORY_FILE_NAME attribute) which stores the history of share actions, which is effectively what the SAP uses when reordering that list. I’m curious to see what the values in that are, after each action you outline. It should default to “share_history.xml” (though you can change it). If for any reason that is null, then the history does not get persisted across sessions I believe. The bottom line is that the ShareActionProvider uses the contents of this file to recreate the order in the menu, so somewhere something is not being written or read correctly from it. That’s my guess. If you find out differently, do post back here so I can update my FAQ as well.
    Ivan Fernandes
    @ivan94
    Ivan Fernandes
    @ivan94
    And an unrelated question: For the next week are we expected to finish only lesson 4A or all the 4 lessons (A, B and C)?
    Nitya Narasimhan
    @nitya
    @ivan94 - will look at this later tonight when I get back. Re next week: They just recently split this into 4a/4b/4c — so we can target 4a for this week (and folks get 4b and 4c done, that’s good - but we will cover these in the next week)
    Ivan Fernandes
    @ivan94
    Ok, thank you
    Hendrix Tavarez
    @lockerfish
    @ivan94 @nitya I took a quick look at this issue last night and I realized that I was getting the same behavior at one point. The way I "fix" it (still feels buggy, sometimes the share icon shows but it does not respond to click events) was using Intent.FLAG_ACTIVITY_NEW_DOCUMENT instead of FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET. FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET is deprecated in API level 21.
    Nitya Narasimhan
    @nitya
    @lockerfish thanks! @ivan94 did this help? Let us know..
    David DeGroate
    @Polymath-Z
    I'm having trouble completing Lesson 4B. After making the changes required for the "Inserts with ContentProvider" quiz, the tests start to fail. >> android.database.sqlite.SQLiteReadOnlyDatabaseException: attempt to write a readonly database (code 1032) << After hours of trying different things, I decided to pull their code from GitHub (the 4.16 branch). I was surprised to see that code failed as well, in exactly the same way. Does this code work for you at all?