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;
“No problem can be solved from the same level of consciousness that created it.” Albert Einstein (1879-1955)
Wednesday, 27 November 2019
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
Thursday, 4 July 2019
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')
);
});
Subscribe to:
Posts (Atom)
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
-
//convert BASE64 string to Byte{} array function base64ToArrayBuffer(base64) { var binaryString = window.atob(base64); var binar...
-
var htmlToPdf = new NReco.PdfGenerator.HtmlToPdfConverter(); htmlToPdf.PageFooterHtml = @"<div style='text-align:right; font-s...
-
static void Main(string[] args) { // create a dummy list List<string> data = GetTheListOfData(); // split the lis...