How to set up a Phone 8.1 pivot with an infinite number of pivotitems using caliburn micro? - caliburn.micro

I am working on a Phone 8.1 Universal app using the excellent framework caliburn micro 2.0. The application is rather simple, it will show statistics fetched from a WCF service and this information will be filtered by year and month. So I figured the best way to do this is to use the same approach as the Phone 8 native calendar app, which uses the pivot for scrolling each month, and when scrolling from december to january, the year is increased by 1.
I have tried several approaches by following tutorials on how to set this up, but I am totally confused. Every single example suggests that I should set the PivotPage as a Conductor, and then every single pivotItem as a screen, and then when activating the conductor, add every single viewmodel(1 for each pivotitem) in an Items list. That sounds reasonable, when there is a finite number of pivotitems and when the mapping between pivotitem and pivotheader is 1:1. But in my case I have ONE pivotItem that is supposed to be reloaded(disposed/created) every time the user changes pivot, and the data is not filtered by the header itself but rather on a DateTime property in my viewmodel that has the currently selected Year and Month which is used to fetch data from the backend. Not exactly what all the caliburn micro pivot tutorials are about.
So, can anyone guide me on how to design this the "caliburn micro way"...? I have tried something by adding a pivot.itemtemplate and then refresh this by hooking up to the selectionchanged event on the pivot, but this has some rather nasty sideeffects, like when I change the pivot, the previous pivot is not disposed of correctly, causing the visual tree for the app to increase by 30% for each pivot change. I have no idea why it is like that, but it tells me that I should do this 100% caliburn micro instead.
I have a very simple example that I can share if anyone wants to have a go at this, depending on how simple the solution is?
Please help!
/Henrik

Related

How to assign "fixed work" task to multiple resources taking vacations into account

Let's say you have a small project. The team has estimated all the tasks as 300 days of effort.
I have 5 developers in the team, and I want MS Project to tell me when the project will complete considering vacations and working schedule of my team member.
In order to do that:
I'm creating a Task "Development" with fixed work "300d", and task type "Fixed Work".
Then I create 5 resources, and specify a 2 week vacation for one of the developers somewhere in the middle of the schedule.
Then I assign my 5 development resources to this task.
The problem is, the 300d distributed evenly to all 5 development resources. And If one of them have a two weeks vacation in between, due to that particular resource the work will be finished 2 weeks later, where other 4 resources are sitting and doing nothing for 2 weeks. Total duration is 70 days.
what I get
What I want to get is: work is distributed accordingly through all 5 resources unevenly in a way that the whole task finishes as earlier as possible taking most of the usable time from all developers.
That's how I would expect it to work. In that particular case I was distributing hours manually.
what i would expect
Is there a possibility in MS Project to do something like this? Or am I doing something wrong?
There are a couple issues with how you are approaching the problem.
1. Rather than just planning out the manpower hours estimated to be needed for the entire project on a single line item, You should plan out the tasks that will need to be done to accomplish "Small Project"
If you discretely plan out the tasks that need to be accomplished to satisfy the scope of "Small project", you can establish dependency (predecessor/successor) relationships between your tasks and figure out what tasks need to be done before you can move on to others. When you do this it will give you a good idea of how long the total duration of the project will take and likely be more accurate than just relying on an estimate based on the manpower hours estimate your developers give you. Find out what tasks they actually need to do, not just how many hours they think the whole project will take them. This will also allow you to plan out the utilization of your resources better because you'll be able to assign specific resources to specific tasks, and not all of your resources need to be on every task.
2. In general I would avoid using the Task Usage form.
I noticed you are altering resources in the task usage form, but unless you are really experienced with Microsoft Project I would avoid ever touching that, as it's really easy to set the period of performance of resources assigned to a task to be different than the actual period of performance of the task itself. This will cause MS Project to behave unusually, and it can be hard for an unexperienced user to understand why. This usually leads to pain and frustration. This leads me to my next bit of advice:
3. If you really want to specify a resource's vacation time, it's better to adjust the calendar associated the resource to exclude those dates as working dates.
In your situation with only 5 resources on your project, this can be fairly easy to do. You can accomplish this 2 different ways (I'll start with the easiest option):
1. You can add resource specific exclusion dates to the default calendar in your project
You can accomplish this by opening the Resource Sheet table and then clicking the Project tab then Change Working Times. If you have the Resource Sheet open instead of the Gantt chart, you can specify the resource that is going to be effected by the exceptions:
In this example you can see that I would be excluding (removing) 8/23/21 thru 9/3/21 as working days for the SW Engineer resource, without needing to change the calendar used by the resource completely.
2. You can completely change the calendar used by particular resources to be different than the default calendar set for the project.
You can accomplish this by going into the Resource Sheet and opening the Base Calendar column:
From here you can assign any calendar that exists in the project to the resource. Of course this means you would need to create the calendars and assign exclusion dates to them.
To create a calendar, click the Project tab then click Change Working Times. Click Create New Calendar on the form that opens up and give it a name:
From there you can add exclusion dates and all that.
Note: In a larger project with many resources, I would recommend not messing with the calendar for the resources at all. It just gets hard to deal with when there are a lot of resources.

Bixby: Is there a way to mock profile data in the Bixby Studio simulator? Such as Email, Phone, etc (viv.self)

I'd like to test out some of the viv.self functionality but I'm only seeing the ability to change Geo/Time/Etc. Is there a way to mock other profile data?
I see MOCK DEVICE DATA in simulator. But nothing happens OnClick(). May be something is coming up.
Sorry not an answer but an additional question of this..
Is it possible to alter this data during a session? ie, I want my capsule to be aware of movement taking place so I need the data of location to vary through time during the session.
Also the mock data seems to be in place with the latest release/update.

How to do Grafana Dynamic Singlestat Panels?

I've got metrics in Graphite showing response time for various organizations. The list of organizations can change on the fly. I want panels in Grafana to appear for any origanization who's response time is over a certain threshold. Was thinking the Singlestat panels was the right panel to use. Question is how to make them appear dynamically? Is a scripted dashboard the right approach?
If a scripted dashboard is the correct solution, can anyone recommend a Grafana cloud/service provider that supports scripted dashboards? The current one I have been testing out does not support scripts. Note that I am not really tied to Graphite as the backend since this project is in proof of concept phase. Just need the backend to also be a service. Don't want to roll the backend myself. Thanks.
As far as I know, it is not possible right now.
We had a similar use case in my organisation, and here is what we did.
You can define a template variable for your organizations, and then use SingleStat panel with “Repeat Panel” on this variable, but that will display panels for all of your organizations. Filtering based on a criteria is a requested feature.
Alternatively, you can use the Table panel for your use case.
Choose Table panel
In “Metrics”, enter your metric organizations.*.response_time (or whatever more complicated you need, applyByNode can be handy for such cases)
In “Options”
“To Table Transform”: choose “Time Series aggregations”
“Columns”: Avg, or Current (depending on your needs)
“Coloring”: use thresholds to paint in red or something anything above your desired response-time threshold.
Sort the Table per the Number column.
Ta-da! Your organisations needing attention will be at the top of the table and highlighted.
In the lack of true filtering, this worked for us. Hope it will work for you too :)

SCORM to xAPI sessions and re-answering Activity + changing Score

I'm coming from a SCORM end and trying to figure out two related issues with how to do update and find the most recent data (ie, looking for best practices).
In SCORM I'd have a set of activities that would all store their answers and scores (easily understandable from the docs etc). The "how" I'm after is specifically related to resuming the set of activities multiple times, and hitting "reset" and submitting a different answer to a single activity after a statement has been sent in.
From what I read with xAPI it states that statements are immutable - so how would I go about this.
My first thought was that I'd make the statement id generated from the activity id and void the old answer when it changes - but that sounds wrong (not least because it reads like you can't re-use the id even with voiding).
So it looks like the Statement id needs to be unique, which would mean that multiple identical Objects would be found - so would I have to look through every attempt and check for the latest one?
I'm currently looking at using xAPIWrapper in the middle.
Moving from SCORM to xAPI requires a change of mindset. SCORM deals with statuses which get updated; xAPI logs events like a journal.
You can think of it like Facebook. You post a photo of your new cat; a month later you post a photo of your cat 1 month older. There's no need to go back and delete the old post. If you want the latest photo of your cat you just go and get the most recent photo tagged "Ryochet's cat". You can also look at older photos to see how your cat developed. xAPI is like that activity stream on Facebook.
So, if somebody scores 10 points on their first attempt, then 20 points on their second attempt, you'd simply send a second set of statements about the 2nd attempt. There's no need to get rid of the statements about the old attempt, that happened and is useful data to see how the learner developed.

Dynamic Data Web Site is unusable due to slowness

I have created a small "Dynamic Data Web Site" using the Entity Framework. I've no experience with this really, but it looks very interesting. Anyway, I have a single table being displayed on a single web page. The table contains over 21000 rows and the page limits me to 10 records per page, which is all fine.
My problem is that the page is incredibly slow. I'm guessing that maybe every row in the table is being loaded whenever I try to navigate, but I can't be sure this is the cause.
How can I increase the performance of the page? I want to be able to click through pages of results quickly and easily. It currently takes more than 60 seconds to click to the next set of results.
this is usually caused by filters on a table where the filter has MANY rows you could fix this using the Autocomplete filter which prefilters the data base what the user types in.
You can get this filter and other from ny NuGet package Dynamic Data Custom Filters
Also try having a look in it using Ayende's EFProf. It is a commercial product but it has a free 30 day trial. I can sometimes point out silly things you are doing and suggest some ways to optimise your data access

Resources