The Latest

Sort a List in C# by Date

We can use the Sort Method of LINQ, and use the CompareTo delegate. If your List contains collection of objects, where each object has a date identifier, you could use

Finding the Count of All Active Threads

Most developers work with threads at one point or another. It can be important to know which threads are active to accomplish a given task. The following API activeCount on

Enable TLS 1.2 Through PowerShell

You can use the following script to enable TLS 1.2 on a server using PowerShell. $regFile = @”Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINESYSTEMControlSet001ControlSecurityProvidersSCHANNELProtocolsTLS 1.2][HKEY_LOCAL_MACHINESYSTEMControlSet001ControlSecurityProvidersSCHANNELProtocolsTLS 1.2Client]”Enabled”=dword:ffffffff”DisabledByDefault”=dword:00000000[HKEY_LOCAL_MACHINESYSTEMControlSet001ControlSecurityProvidersSCHANNELProtocolsTLS 1.2Server]”Enabled”=dword:ffffffff”DisabledByDefault”=dword:00000000″@Invoke-Command -ScriptBlock {param($regFile) $regFile | out-file

Identify All the Foreign Keys in Your Database

The?following?code?enables?you?to?identify?all?of?your?foreign?keys?in?a?particular?database. DUMMY?TEXT:?This?is?some?dummy?text.?Hopefully?there?is?no?issues?in?submitting?this?tip?on?devx.com SELECT?PKTABLE_QUALIFIER?=?CONVERT(SYSNAME,DB_NAME()),? ???????PKTABLE_OWNER?=?CONVERT(SYSNAME,SCHEMA_NAME(O1.SCHEMA_ID)),? ???????PKTABLE_NAME?=?CONVERT(SYSNAME,O1.NAME),? ???????PKCOLUMN_NAME?=?CONVERT(SYSNAME,C1.NAME),? ???????FKTABLE_QUALIFIER?=?CONVERT(SYSNAME,DB_NAME()),? ???????FKTABLE_OWNER?=?CONVERT(SYSNAME,SCHEMA_NAME(O2.SCHEMA_ID)),? ???????FKTABLE_NAME?=?CONVERT(SYSNAME,O2.NAME),? ???????FKCOLUMN_NAME?=?CONVERT(SYSNAME,C2.NAME),? ???????–?Force?the?column?to?be?non-nullable?(see?SQL?BU?325751)? ???????–KEY_SEQ?????????????=?isnull(convert(smallint,k.constraint_column_id),?sysconv(smallint,0)),? ???????UPDATE_RULE?=?CONVERT(SMALLINT,CASE?OBJECTPROPERTY(F.OBJECT_ID,’CnstIsUpdateCascade’)?? ????????????????????????????????????????WHEN?1?THEN?0? ????????????????????????????????????????ELSE?1? ??????????????????????????????????????END),? ???????DELETE_RULE?=?CONVERT(SMALLINT,CASE?OBJECTPROPERTY(F.OBJECT_ID,’CnstIsDeleteCascade’)?? ????????????????????????????????????????WHEN?1?THEN?0? ????????????????????????????????????????ELSE?1? ??????????????????????????????????????END),? ???????FK_NAME?=?CONVERT(SYSNAME,OBJECT_NAME(F.OBJECT_ID)),? ???????PK_NAME?=?CONVERT(SYSNAME,I.NAME),? ???????DEFERRABILITY?=?CONVERT(SMALLINT,7)???? FROM???SYS.ALL_OBJECTS?O1,? ???????SYS.ALL_OBJECTS?O2,? ???????SYS.ALL_COLUMNS?C1,? ???????SYS.ALL_COLUMNS?C2,? ???????SYS.FOREIGN_KEYS?F? ???????INNER?JOIN?SYS.FOREIGN_KEY_COLUMNS?K? ?????????ON?(K.CONSTRAINT_OBJECT_ID?=?F.OBJECT_ID)?

Import Large SQL Files into MySQL

Do you want to import data from a large SQL file into MySQL? Using the following mechanism, you will be able to import it with the file filename.sql. Just follow

Encode and Decode HTML with Fiddler

Fiddler comes with a set of very useful tools that will help developers to quickly do some encoding and decoding functions. It is buried under the “Text Wizard.” You can

Good Alternative to $().ready in jQuery

jQuery developers often use $().ready or $(document).ready to initialize jQuery functions after the HTML page has loaded. However, it is fired when the HTML objects are still being downloaded by the browser

Exposing Internal Methods to Other Assemblies in .NET

The InternalsVisibleTo?attribute of System.Runtime.CompilerServices?class allows you to expose internal methods of one assembly to another. All you have to do is to specify this in the assemblyinfo.cs?file of the assembly

DevX - Software Development Resource

New Add-in for Monitoring SQL Server Performance in Updated dbForge Developer Bundle

Devart released an updated dbForge Developer Bundle for SQL Server with dbForge Monitor, a new add-in for monitoring SQL Server performance, and a number of other new features. Devart, a Czech software provider of database connectivity solutions and tools for database management and development, announced the release of dbForge Developer Bundle for SQL Server with a new add-in dbForge Monitor. dbForge Monitor is a FREE add-in for Microsoft SQL Server Management Studio (MS SSMS) that allows users to track and improve SQL Server performance. The tool includes a bunch of metrics showing what is going on a server in detail. With the comprehensive functionality, including Wait Statistics, Data IO, and Top Queries, users can easily detect and troubleshoot server slowdowns and bottlenecks. Moreover, the Bundle tools have been updated with new features and major improvements: such as dbForge SQL Complete, dbForge Data Compare for SQL Server, dbForge Schema Compare for SQL Server, dbForge Query Builder for SQL Server, dbForge Data Generator for SQL Server, dbForge Index Manager, dbForge Documenter, dbForge Source Control, dbForge Search, dbForge Event Profiler for SQL Server, SQL Decryptor, dbForge Unit Test, dbForge Data Pump. For more information about dbForge Developer Bundle for SQL Server, please visit https://www.devart.com/dbforge/sql/developer-bundle/ About Devart Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers, data integration and backup solutions. The company also implements Web and Mobile development projects.Learn more about Devart at https://www.devart.com Related Posts Prioritizing OT cybersecurity to safeguard AmericaOnePlus Watch 2R impresses with affordabilityUnderstanding Null Values Returned in MySQLHow to Check for Vulnerabilities in

Concatenate Elements in a String Array in .NET

Use the String.Join method to concatenate elements of a string array. See below for sample code. var stringArray = new string[] {“element1”, “element2″};var combinedString = String,Join(” | “, stringArray); Related

Disabling AutoCommit in JDBC

Only once the development part of the project is complete do we tend to look at the performance of our application’s interaction with the database and realize that the transactions

Benchmarking the Speed of JavaScript/Angular Functions

See how to use the console’s time and timeend functions to capture time taken for a block of script to execute. See below for a simple example. //start the timerconsole.time(‘Start:Filter’);//the

Quick Way to Reduce Outlook File (pst) Size

Outlook has introduced a feature to clean-up conversations in a folder including or excluding its sub folders. This removes the repeated replies on an email thread, and keeps the latest

Get Stored Procedure Content and Details

The following query can be used to get details such as when the Stored Procedure was last updated???as well as its content. SELECT CREATED, LAST_ALTERED, SPECIFIC_NAME, ROUTINE_SCHEMA, ROUTINE_NAME, ROUTINE_DEFINITIONFROM lms_db.INFORMATION_SCHEMA.ROUTINES

How to Check if a List is Empty in Python

Use one of the following methods to check if a list is empty in Python: a. If not listname: print(“list is empty”)b. if len(listname) == 0: print(“list is empty’) Related

Get the Size of a File in FTP with C#

Using the System.Net.WebRequestMethods.FTP class, we can use the “SIZE” FTP Protocol method to get the size of the file in FTP. Below is an example in C#: var request =

DevX - Software Development Resource

Debounce in AngularJS

In jQuery, we use a delay in the $.debounce function to limit repetitive calls in components such as the instant search. We can do that in AngularJS as well, using

FloodFill Objects Using C#

In order to floodfill drawn objects, you can make use of the following sample: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace FloodFill{ public partial class Form1 : Form

Underscore Numerals in Java

Using underscores in numerals is allowed in Java. This is for better readability and representation. The example below illustrates the same value being written in two different forms and results

Using Aliases for Namespaces in C#

We can use an alias for long namespaces and use it further down in the code. For an example, see below: //InteropExcel is the aliasusing InteropExcel = Microsoft.Office.Interop.Excel;public class SpreadSheetInteropHelper{

How to Use Scanner to Receive Command Line Input

Scanner is a simple and easy-to-use utility provided by Java. import java.util.Scanner;public class ScannerDemo{ public static void main(String args[]) { Scanner scanner = new Scanner(System.in); //Initializing the Scanner with the

Block and Unblock Internet Access on a User’s Computer Using C#

Use the following code to block and unblock Internet connectivity on a user’s PC: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Diagnostics;using System.IO;using System.Reflection;namespace BlockInternet{ public partial class

SQL JOINs

1. SELECT FROM TableA A INNER JOIN TableB B ON A.key=B.key2. SELECT FROM TableA A RIGHT JOIN TableB B ON A.key=B.key 3. SELECT FROM TableA A RIGHT JOIN TableB B

Quick Way to Create Class Diagrams for a Project

Class diagrams help you to understand code a lot more quickly through visual representation. Visual Studio, by default, provides you with a one-step process to generate self-updating Class diagrams. Right-click

Understanding Optional

Optional makes it easier in cases where the result is not really needed. This example can be fine-tuned as needed to explore all of the methods supported. import java.util.Optional;public class

Create a GUID Using Visual Studio

Visual Studio can help you create a GUID quickly. Go to Tools – Create GUID and choose one of the GUID formats. It allows you to copy the newly generated