|
Keith Barrow wrote: Auld Pretender.
you trying to say something!
Do you want to take this outside!
|
|
|
|
|
The TV switches itself on at 5am and comes on to BBC1. In my deep state of slumber I thought I had dreamt that Robin Willimas had died as my brain had obviously picked up that information in the news bulletin. It wasn't until my Alarm went off at 5:15 that I began to question if it was a dream or not.
Went for a shower and when I came came back and sat on the bed to get dressed it was in the ticker going along the bottom of the screen and confirmed it wasn't a dream.
I hate that early morning wake ups where you feel like you are drunk/hungover due to tiredness and no booze is involved.
|
|
|
|
|
Yeah, that morning after feeling without the joys of the night before!
---------------------------------
Obscurum per obscurius.
Ad astra per alas porci.
Quidquid latine dictum sit, altum videtur .
|
|
|
|
|
|
I didn't know you cared!
I must get up to The Granite City again soon, I fancy another trawl along Union Street.
---------------------------------
Obscurum per obscurius.
Ad astra per alas porci.
Quidquid latine dictum sit, altum videtur .
|
|
|
|
|
I participated in the death walk[^] this weekend.
I reached the 85 km mark, but then the knees stopped bending. Literally, brain said bend, but the knee didn't move. over and out.
(still seriously hurting in one knee today) Sad thing really, since you have to give up because of injury rather than fatigue or pain. . Even worse is the feeling that I would have taken my knee string (bandage) (hope that translated well) with me, I would have made it. After the ordeal we still had to go to the train on foot, take the train, then the bus and then walk home. (you know how many stairs you encounter in train- & bus stations ?! )
anyway, it was a good experience. (but probably I'm not going to repeat it)
|
|
|
|
|
so.. how many hours walking?
cool!
|
|
|
|
|
started on Friday 21:00 and stopped Saturday 16:30, so 19,5 hours.
|
|
|
|
|
Not bad!
|
|
|
|
|
A question comes to mind, though : why ?
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Entropy isn't what it used to.
|
|
|
|
|
V. wrote: I reached the 85 km mark, but then the knees stopped bending.
Impressive but I question your sensibility, as you can really create some serious and permanent injury from repetitive stress.
Marc
|
|
|
|
|
yeah still limping today...
|
|
|
|
|
And people say I'm crazy (I'm a runner, and I've done four marathons) ...
Software Zen: delete this;
|
|
|
|
|
Basically I take in a standard URI starting with /me/... like /me/skydrive/folder1/folder2/file and then return the file.
The way it is suppose to work.
All written in visual basic - just to be different.
Programmed using Unidex so feel free to ask what this or that does.
This is a working example that does not need to be debugged
The only thing Unidex does in this example is parses the words from the URI, once you create your own code to put each word in a list you should be able to use this same logic.
'Take in any string, parse the information and returns the file from the users OneDrive
Public Async Function RetrieveFile(FullPath As String) As Task(Of Windows.Storage.IStorageFile)
Dim CurrentFolderInfo As Microsoft.Live.LiveOperationResult
Dim CurrentlyFoundFolders As Microsoft.Live.LiveOperationResult
Dim CurrentlyFoundFiles As Microsoft.Live.LiveOperationResult
Dim FileName = ""
Dim Result As Unidex.Reference.OldStructures.Strings = FullPath
If Result.Items(0).ToLower <> "me" Then Throw New Exception("First word of path must be me!")
Select Case Result.Items(1).ToLower
Case "skydrive" : CurrentFolderInfo = Await Me.GetRootFolder
Case "calendars" : CurrentFolderInfo = Await Me.GetCalendars
Case "contacts" : CurrentFolderInfo = Await Me.GetContacts
Case "events" : CurrentFolderInfo = Await Me.GetEvents
Case Else : Throw New Exception("Second word of path is invalid!")
End Select
CurrentlyFoundFolders = Await Me.GetFolders(CurrentFolderInfo)
For Each Current In Result.Separators
Try
Select Case Current.Separator
Case "/", "\"
Select Case Current.WordBefore
Case "", "me", "skydrive", "calendars", "contacts", "events"
Case Else
CurrentFolderInfo = Await Me.GetFolder(Current.WordBefore, CurrentlyFoundFolders)
CurrentlyFoundFolders = Await Me.GetFolders(CurrentFolderInfo)
End Select
Case "."
CurrentlyFoundFiles = Await Me.GetFiles(CurrentFolderInfo)
FileName = Current.WordBefore & "." & Current.WordAfter
Return Await Me.GetFile(CurrentFolderInfo, FileName)
End Select
Catch
End Try
Next
Throw New Exception("Sequence completed without locating a filename.")
End Function
'Get a Directory
Public Async Function GetFolder(FolderName As String, FolderInfo As ResultsStructure) As Task(Of Microsoft.Live.LiveOperationResult)
Dim SubFolder As ResultsStructure = FolderInfo.Results.FirstOrDefault(Function(f) f.Key = FolderName)
Return Await LiveConnectClient.GetAsync(SubFolder.ID)
End Function
'Get the folders of a directory of any given name
Public Async Function GetFolders(FolderInfo As ResultsStructure) As Task(Of Microsoft.Live.LiveOperationResult)
Return Await LiveConnectClient.GetAsync(FolderInfo.ID & "/files?filter=folders")
End Function
'Get the files of a directory of any given name
Public Async Function GetFiles(FolderInfo As ResultsStructure) As Task(Of Microsoft.Live.LiveOperationResult)
Return Await LiveConnectClient.GetAsync(FolderInfo.ID & "/files")
End Function
'Get the URI of any given file name
Public Async Function GetFile(FolderInfo As ResultsStructure, FileName As String) As Task(Of Microsoft.Live.LiveOperationResult)
Dim File As ResultsStructure = FolderInfo.Results.FirstOrDefault(Function(f) f.Key = FileName)
Return Await LiveConnectClient.GetAsync(File.DownloadPath)
End Function
'Create local target of the file in a temporary folder
Public Async Function TemporaryStorageFile(FileName As String) As Task(Of Windows.Storage.StorageFile)
Return Await Windows.Storage.ApplicationData.Current.TemporaryFolder.CreateFileAsync(FileName, Windows.Storage.CreationCollisionOption.ReplaceExisting)
End Function
'Set as background task for the OS the continue the process
Public Async Function SetBackgroundTask(DownLoadPath As String, OutputFile As Windows.Storage.StorageFile) As Task(Of Microsoft.Live.LiveDownloadOperationResult)
Return Await LiveConnectClient.BackgroundDownloadAsync(DownLoadPath, OutputFile)
End Function
modified 12-Aug-14 2:53am.
|
|
|
|
|
Probably better posted as a Tip/Trick rather than in the lounge!!
|
|
|
|
|
|
Lounge postings disappear rapidly. After 3 months, it'll be hard to find it here and people won't come upon it. A Tip has longevity.
|
|
|
|
|
Where do I find these tips?
|
|
|
|
|
On the front page, or under articles. A tip/trick is a short article. Click the articles menu option and choose "Submit an article or tip" from the dropdown to create your own tip. Just make sure you select Tip/Trick in the appropriate combo on the right hand side.
|
|
|
|
|
|
|
Pete O'Hanlon wrote: On the front page, or under articles. A tip/trick is a short article. Click the articles menu option and choose "Submit an article or tip" from the dropdown to create your own tip. Just make sure you select Tip/Trick in the appropriate combo on the right hand side. Hey, that's useful information.
You should put it on the Tips/Tricks forum.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
|
ohhh Christan Graus is your man - i'm sure he was talking about pretty much this exact stuff the other day
Drop him a message - hes very helpful
Bryce
MCAD
---
|
|
|
|
|
The Microsoft documentation is horrifying to get this job done, this here is a working example for people in how to achieve something that Microsoft Virtual Academy said had to be done using URI relative to a single file and you couldn't navigate through the OneDrive like any other folder.
|
|
|
|