« first day (2177 days earlier)      last day (2768 days later) » 

5:47 AM
hi
in ASP net MVC , Automatically Log offed the session when i click the controls, like text box , dropdownn, how i can solve this bug??
 
 
6 hours later…
11:49 AM
hello Everyone, I have a question,
I try to Convert my image to Base64, so i used this method
private async Task<string> StorageFileToBase64(StorageFile file)
{
string Base64String = "";

if (file != null)
{
IRandomAccessStream fileStream = await file.OpenAsync(FileAccessMode.Read);
var reader = new DataReader(fileStream.GetInputStreamAt(0));
await reader.LoadAsync((uint)fileStream.Size);
byte[] byteArray = new byte[fileStream.Size];
reader.ReadBytes(byteArray);
Base64String = Convert.ToBase64String(byteArray);
But when i try to display if its work with a Debug.WriteLine :
Debug.WriteLine("Result = " + StorageFileToBase64(selectedFile));

I have this in my console :
Result = System.Threading.Tasks.Task`1[System.String]
So i would like to know how Can i display the content to know if it works?
 
 
2 hours later…
1:57 PM
Oh i just forgot to put .Result
 
2:42 PM
when you encounter an abstract factory, do you expect it to return a new instance every time you call its Create method?
and if yes, what should I change to make it obvious that the returned object will always be the same reference?
(in my particular case)
public ILexer<Alpha> Create()
{
    return lazy.Value; // lazy is a Lazy<T>
}
I think I should split that into CreateOnce and CreateNew
where CreateNew always creates a new instance, and CreateOnce creates an instance once and then caches it for subsequent calls
but idk
I'm at that point in the project where nothing makes sense anymore
 

« first day (2177 days earlier)      last day (2768 days later) »