This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Declare a temporary table to store the counts | |
CREATE TABLE #RowCounts ( | |
TableName NVARCHAR(256), | |
RowCount1 INT | |
); | |
-- Declare variables | |
DECLARE @TableName NVARCHAR(256); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let unicodeString = ""; | |
for(let i = 0xFF21; i <= 0xFF3A; i++) { | |
unicodeString += String.fromCharCode(i); // uppercase A-Z | |
} | |
for(let i = 0xFF41; i <= 0xFF5A; i++) { | |
unicodeString += String.fromCharCode(i); // lowercase a-z | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class UnicodeHelper | |
{ | |
public static readonly Dictionary<string, string> CharacterPairs = new Dictionary<string, string>() | |
{ | |
{"’", "'"}, // UTF-8: E2 80 99 | |
{"‘", "'"}, // UTF-8: E2 80 98 | |
{"‚", ","}, // UTF-8: E2 80 9A | |
{"‛", "'"}, | |
{"“", "\""}, // UTF-8: E2 80 9C | |
{"”", "\""}, // UTF-8: E2 80 9D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:get/get.dart'; | |
import 'extService.dart'; | |
class Service1 { | |
static Service1 get to => Get.find<Service1>(); | |
int counter = 1; | |
int getCounter() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--https://stackoverflow.com/questions/9185871/how-do-i-search-an-sql-server-database-for-a-string | |
CREATE PROCEDURE FindByString | |
@DataToFind NVARCHAR(4000), | |
@ExactMatch BIT = 0 | |
AS | |
SET NOCOUNT ON | |
DECLARE @Temp TABLE(RowId INT IDENTITY(1,1), SchemaName sysname, TableName sysname, ColumnName SysName, DataType VARCHAR(100), DataFound BIT) | |
INSERT INTO @Temp(TableName,SchemaName, ColumnName, DataType) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace Utility | |
{ | |
public class AesSymmetricCrypter | |
{ | |
public string Decrypt(string key, string cipherText) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Future main() async { | |
var server = await HttpServer.bind( | |
InternetAddress.loopbackIPv4, | |
4040, | |
); | |
print('Listening on localhost:${server.port}'); | |
await for (HttpRequest request in server) { | |
request.response.write('Hello, world!'); | |
await request.response.close(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sum = function(x, y) { | |
let scale = 100; | |
return ((x*scale)+(y*scale))/scale; | |
} | |
sum(0.1, 0.2) | |
// => 0.3 | |
//OR | |
parseFloat((0.1+0.2).toFixed(2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(obj){ | |
let arr = []; | |
for(w in obj) { | |
arr.push({ | |
'name': w, | |
'type': getType(obj[w]) | |
}); | |
} | |
console.dir(arr); |
NewerOlder