SELECT
sqltext.TEXT,
req.session_id,
req.status,
req.start_time,
req.command,
req.cpu_time,
req.total_elapsed_time
FROM sys.dm_exec_requests req
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext
“No problem can be solved from the same level of consciousness that created it.” Albert Einstein (1879-1955)
Tuesday, 28 May 2019
Saturday, 20 April 2019
Setting up Basic Express Server
-- npm install express
// include express
const express = require('express');
const app = express();
// serve static files in Public folder
app.use(express.static('public'));
// run he server on port 2222
app.listen(2222, () => console.log('Server running on 2222...'));
// include express
const express = require('express');
const app = express();
// serve static files in Public folder
app.use(express.static('public'));
// run he server on port 2222
app.listen(2222, () => console.log('Server running on 2222...'));
Wednesday, 17 April 2019
Call JavaScript function after AJAX UpdatePanel Refresh (Partial PostBack) in ASP.Net
<asp:UpdatePanel runat="server">
<ContentTemplate>
Employee :
<asp:ListBox ID="lstEmployee" runat="server" SelectionMode="Multiple">
<asp:ListItem Text="Nikunj Satasiya" Value="1" />
<asp:ListItem Text="Dev Karathiya" Value="2" />
<asp:ListItem Text="Hiren Dobariya" Value="3" />
<asp:ListItem Text="Vivek Ghadiya" Value="4" />
<asp:ListItem Text="Pratik Pansuriya" Value="5" />
</asp:ListBox>
</ContentTemplate>
</asp:UpdatePanel>
<script type="text/javascript">
window.onload = function () {
DrawEmployeeDDL();
};
//On UpdatePanel Refresh
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm != null) {
prm.add_endRequest(function (sender, e) {
if (sender._postBackSettings.panelsToUpdate != null) {
DrawEmployeeDDL();
}
});
};
function DrawEmployeeDDL() {
$('[id*=lstEmployee]').multiselect({
includeSelectAllOption: true
});
};
</script>
<ContentTemplate>
Employee :
<asp:ListBox ID="lstEmployee" runat="server" SelectionMode="Multiple">
<asp:ListItem Text="Nikunj Satasiya" Value="1" />
<asp:ListItem Text="Dev Karathiya" Value="2" />
<asp:ListItem Text="Hiren Dobariya" Value="3" />
<asp:ListItem Text="Vivek Ghadiya" Value="4" />
<asp:ListItem Text="Pratik Pansuriya" Value="5" />
</asp:ListBox>
</ContentTemplate>
</asp:UpdatePanel>
<script type="text/javascript">
window.onload = function () {
DrawEmployeeDDL();
};
//On UpdatePanel Refresh
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm != null) {
prm.add_endRequest(function (sender, e) {
if (sender._postBackSettings.panelsToUpdate != null) {
DrawEmployeeDDL();
}
});
};
function DrawEmployeeDDL() {
$('[id*=lstEmployee]').multiselect({
includeSelectAllOption: true
});
};
</script>
Monday, 8 April 2019
React Apollo Boost & GraphQL Template Installer
{
"name": "project-name",
"version": "1.0.0",
"description": "A starter for React-Apollo-GraphQL projects",
"main": "server.js",
"scripts": {
"server": "nodemon server.js",
"client": "cd client && npm start",
"dev":
"concurrently --names \"server,client\" \"npm run server --silent\" \"npm run client --silent\""
},
"author": "",
"license": "ISC",
"dependencies": {
"apollo-server-express": "^1.3.6",
"bcrypt": "^2.0.1",
"body-parser": "^1.18.3",
"concurrently": "^3.5.1",
"cors": "^2.8.4",
"dotenv": "^5.0.1",
"express": "^4.16.3",
"graphql": "^0.13.2",
"graphql-tools": "^3.0.2",
"jsonwebtoken": "^8.2.1",
"mongoose": "^5.1.3"
},
"devDependencies": {
"nodemon": "^1.17.5"
}
}
"name": "project-name",
"version": "1.0.0",
"description": "A starter for React-Apollo-GraphQL projects",
"main": "server.js",
"scripts": {
"server": "nodemon server.js",
"client": "cd client && npm start",
"dev":
"concurrently --names \"server,client\" \"npm run server --silent\" \"npm run client --silent\""
},
"author": "",
"license": "ISC",
"dependencies": {
"apollo-server-express": "^1.3.6",
"bcrypt": "^2.0.1",
"body-parser": "^1.18.3",
"concurrently": "^3.5.1",
"cors": "^2.8.4",
"dotenv": "^5.0.1",
"express": "^4.16.3",
"graphql": "^0.13.2",
"graphql-tools": "^3.0.2",
"jsonwebtoken": "^8.2.1",
"mongoose": "^5.1.3"
},
"devDependencies": {
"nodemon": "^1.17.5"
}
}
Thursday, 4 April 2019
JQuery Datatable add View Edit Delete Column in ASP.NET
"fnDrawCallback": function () {
jQuery(element).find('thead tr th:last-child').replaceWith("<th>View / Edit</th>");
jQuery(element).find('tbody tr').each(function () {
var courseID = $(this).find('td:first-child').html();
var links = "<a href='/view?id={{courseID}}'></a>";
$(this).find("td:last-child:not(:first-child)").replaceWith("<td>" + links.replace(/{{courseID}}/g, courseID) + "</td>");
});
}
CSS to position search and page drop downlist:
.dataTables_filter {
float: left !important;
text-align: left !important;
}
.dataTables_length {
float: right !important;
text-align: right !important;
}
jQuery(element).find('thead tr th:last-child').replaceWith("<th>View / Edit</th>");
jQuery(element).find('tbody tr').each(function () {
var courseID = $(this).find('td:first-child').html();
var links = "<a href='/view?id={{courseID}}'></a>";
$(this).find("td:last-child:not(:first-child)").replaceWith("<td>" + links.replace(/{{courseID}}/g, courseID) + "</td>");
});
}
CSS to position search and page drop downlist:
.dataTables_filter {
float: left !important;
text-align: left !important;
}
.dataTables_length {
float: right !important;
text-align: right !important;
}
Wednesday, 3 April 2019
Git Credential Manager for Windows Popups
- Installed Git Credential Manager for Windows
- Opened the terminal by clicking the Terminal button in SourceTree.
- Issued the commands below:
- git config --global credential.helper manager
- git config --global credential.useHttpPath true
Tuesday, 2 April 2019
JQuery Datatable with Update Panel in ASP.NET
</head>
<body>
<form runat="server">
<asp:ScriptManager runat="server">
...
</form>
<script>
$(document).ready(function () {
// bind data table on first page load
bindDataTable();
// bind data table on every UpdatePanel refresh
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(bindDataTable);
});
function bindDataTable() {
// Apply DataTable library
jQuery('.datatable-sortable').hide().each((index, element) => {
jQuery(element)
.prepend(jQuery("<thead></thead>")
.append(jQuery(element).find("tbody tr:first")))
.dataTable(
{
"oLanguage": {
"sLengthMenu": "Show _MENU_",
},
"order": [],
"iDisplayLength": 20,
"aLengthMenu": [[-1, 10, 20, 30, 50, 100, 200], ["All", 10, 20, 30, 50, 100, 200]],
"fnInitComplete": function () {
jQuery(element)
.show()
.addClass("hover")
.addClass("compact")
.addClass("nowrap");
}
});
});
}
</script>
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"/>
<script type="text/javascript" src="//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
</body>
<body>
<form runat="server">
<asp:ScriptManager runat="server">
...
</form>
<script>
$(document).ready(function () {
// bind data table on first page load
bindDataTable();
// bind data table on every UpdatePanel refresh
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(bindDataTable);
});
function bindDataTable() {
// Apply DataTable library
jQuery('.datatable-sortable').hide().each((index, element) => {
jQuery(element)
.prepend(jQuery("<thead></thead>")
.append(jQuery(element).find("tbody tr:first")))
.dataTable(
{
"oLanguage": {
"sLengthMenu": "Show _MENU_",
},
"order": [],
"iDisplayLength": 20,
"aLengthMenu": [[-1, 10, 20, 30, 50, 100, 200], ["All", 10, 20, 30, 50, 100, 200]],
"fnInitComplete": function () {
jQuery(element)
.show()
.addClass("hover")
.addClass("compact")
.addClass("nowrap");
}
});
});
}
</script>
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"/>
<script type="text/javascript" src="//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
</body>
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...