domingo, 23 de dezembro de 2018

How I fixed my notebook, it had high CPU usage, and was hot. (How to fix a overheating laptop)

How to fix a overheating laptop




I disabled SysMain (Superfetch)  and Cleaned my Notebook FAN. It is OK now. Thanks.

sexta-feira, 28 de setembro de 2018

How to view Audio Waveform in DaVinci Resolve

Click on the Icon, in Timeline View Options

Then use the mouse cursor to increase the Audio track Height

quarta-feira, 27 de junho de 2018

My proposed UWP and .Net Core Vision


We need to move UWP forward. I want to get rid of JavaScript + HTML; I used JavaScript+HTML since Netscape days and it seems too outdated to me.

Will UWP have direct Printing API, and specify XAML Elements and Page paper size in cm / in, without that modal Print UI , more complete like WPF had?

Also I would like a Universal UWP XAML, progressive, so we can build from web to native mobile and desktop using UWP Xamarin in elmish way using XML literals. Also we have a lot of XSD to deal and F# XSD support would be great.

From what I saw XAML is superior to those JavaScript UI libraries. XAML needs a cross-platform option.


I tested it, created a @UnoPlatform project and it ran my UWP on my Android phone, my Windows 10 notebook and also on the web browser! I would even do a customer website using this if startup loading time was faster.





A progressive UWP: XAML everywhere.  

This is a good thing that need faster startup times and we would like to see to be officially supported, something like http://platform.uno/

Now there are those Android 5.1.1(API Level 22)+ Credit Card POS Machines here in Brazil, I think that Xamarin Forms is good to develop for them. I think that it would be great to have something like the Universal XAML / UWP support on it in the future.



sábado, 26 de maio de 2018

UWP: System.Exception: 'The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD))'


System.Exception: 'O aplicativo chamou uma interface marshalled para um outro thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD))'

System.Exception: 'The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD))'



            await this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
            {
                textbox1.Header = e;
            }
            );

sábado, 19 de maio de 2018

json reference cycle - from C# NewtonSoft JSON

This is more a JS problem than a Vue one - $ref/$id are non-standard JSON. NET syntax. Been a while since I’ve dealt with cyclical refs, but I think this is what I used last time: https://bitbucket.org/smithkl42/jsonnetdecycle - then store the decycled object graph in your Vue model

sexta-feira, 18 de maio de 2018

How to Get Query String Parameters with JavaScript

// Assuming "?post=1234&action=edit"
var urlParams = new URLSearchParams(window.location.search);

console
.log(urlParams.has('post')); // true
console
.log(urlParams.get('action')); // "edit"
console
.log(urlParams.getAll('action')); // ["edit"]
console
.log(urlParams.toString()); // "?post=1234&action=edit"
console
.log(urlParams.append('active', '1')); // "?post=1234&action=edit&active=1"
URLSearchParams
https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams


You can use URLSearchParams and this polyfill to ensure that it will work on most web browsers:
https://github.com/WebReflection/url-search-params/blob/master/build/url-search-params.js


https://davidwalsh.name/query-string-javascript

See
https://stackoverflow.com/a/50417160/194717
https://stackoverflow.com/a/50417160/194717
https://stackoverflow.com/a/12151322/194717

terça-feira, 15 de maio de 2018

Flurl custom Json settings

            Flurl.Http.FlurlHttp.Configure(settings =>
            {
                settings.JsonSerializer = new Flurl.Http.Configuration.NewtonsoftJsonSerializer(WebAPI.helper.serializerSettings);
            });

public static class helper
    {
        ///

        /// Utilize este arquivo helper.cs
        /// Atencao em todo o sistema deve usar esta mesma configuracao, Server e no Client,
        /// exemplo no Azure Function e no site SistemaMulti
        ///

        public static Newtonsoft.Json.JsonSerializerSettings serializerSettings = new Newtonsoft.Json.JsonSerializerSettings()
        {
            ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
            PreserveReferencesHandling = Newtonsoft.Json.PreserveReferencesHandling.All,    //????.Arrays,
            TypeNameHandling = Newtonsoft.Json.TypeNameHandling.All,
            //Formatting = Newtonsoft.Json.Formatting.Indented,

        };
        public static string ToUTF8String(this System.IO.Stream se)
        {
            using (var reader = new System.IO.StreamReader(se, Encoding.UTF8))
            {
                string value = reader.ReadToEnd();
                return value;
            }
        }
    }

sexta-feira, 4 de maio de 2018

Azure Web App - Facebook OAuth redirect


https://login.microsoftonline.com/te/tsmulti.onmicrosoft.com/oauth2/authresp
https://sistemamulti.azurewebsites.net/.auth/login/facebook/callback

segunda-feira, 16 de abril de 2018

terça-feira, 3 de abril de 2018

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF

I got this error when

sudo apt-get update

Reading package lists... Done
W: GPG error: https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF
W: The repository 'https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.



Use:



curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg