Wednesday, 27 November 2019

Enabling Non-Null Reference Types in VS Code

Add two new properties to any PropertyGroup: LangVersion and Nullable:   <PropertyGroup>         <LangVersion>8.0</LangVersion>     <Nullable>enable</Nullable>    </PropertyGroup> Enable the annotation for nullable reference types #nullable enable string? name = null;

Friday, 4 October 2019

Getting API Data using XMLHttpRequest

<button id='get-btn' onclick='getData()'>GET</button> const getBtn = document.getElementById('get-btn'); const getData = () => {   const xhr = new XMLHttpRequest();   xhr.open('GET''https://reqres.in/api/users/');   xhr.responseType = 'json';   xhr.onload  = () => {     console.log(xhr.response);   }   xhr.send();   } getBtn.addEventListener('click'getData);

Sunday, 28 July 2019

Simon Sinek

Leaders eat last: video
How to lead in the 21st century: video
Why good leaders make you feel safe: video

Thursday, 4 July 2019

MarioPlan

   MarioPlan

SQL Check Query Return Results

DECLARE @query nvarchar(MAX); SET query = N'SELECT * FROM Table WHERE id=_id' EXEC sp_executesql @queryToPass IF ( @@ROWCOUNT > 0) BEGIN -- action END

React Alert Popup (SweetAlert)

NPM: npm install sweetalert --save CDN: <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script> import swal from 'sweetalert'; const handleSignout = (e) => {     e.preventDefault();     swal({         title: '',         text: '',         icon: '',         dangerMode: true,         buttons: {             cancel: 'Cancel',             ok: 'OK'         }     }).then((result) => {         if (result) {             // actions         }     }); }; reference: https://github.com/t4t5/sweetalert

Tuesday, 2 July 2019

Prevents React App from Flash During Firebase/API Calls

const store = createStore(     rootReducer,     compose(         applyMiddleware(             thunk.withExtraArgument({                 getFirestore,                 getFirebase             })         ),         reduxFirestore(fbConfig),         reactReduxFirebase(fbConfig, { attachAuthIsReady: true }),         window.__REDUX_DEVTOOLS_EXTENSION__         && window.__REDUX_DEVTOOLS_EXTENSION__()     ) );
store.firebaseAuthIsReady.then(() => {     ReactDOM.render(         <Provider store={store}>             <App />         </Provider>,         document.getElementById('root')     ); });

Analysis Service in Power BI Report Server

 We couldn’t connect to the Analysis Services server. Make sure you’ve entered the connection string correctly... link