- Child User Control Init
- Parent User Control Init
- Master Page Init
- Page Init
- Page Load
| DECLARE @SearchText varchar(100) = '%search-text%'; | |
| SELECT sm.object_id, OBJECT_NAME(sm.object_id) AS object_name, o.type, o.type_desc, sm.definition | |
| FROM sys.sql_modules AS sm | |
| JOIN sys.objects AS o ON sm.object_id = o.object_id | |
| where sm.definition like @SearchText collate SQL_Latin1_General_CP1_CI_AS | |
| ORDER BY o.type; | |
| GO |
| public class MyDbContext : DbContext | |
| { | |
| protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) | |
| { | |
| optionsBuilder.UseSqlServer(connectionString); | |
| optionsBuilder.ReplaceService<IQuerySqlGeneratorFactory, WithNolockQuerySqlGeneratorFactory>(); | |
| base.OnConfiguring(optionsBuilder); | |
| } |
| # Redis Cheatsheet | |
| # All the commands you need to know | |
| redis-server /path/redis.conf # start redis with the related configuration file | |
| redis-cli # opens a redis prompt | |
| # Strings. |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
| --get most used tables | |
| SELECT | |
| db_name(ius.database_id) AS DatabaseName, | |
| t.NAME AS TableName, | |
| SUM(ius.user_seeks + ius.user_scans + ius.user_lookups) AS NbrTimesAccessed | |
| FROM sys.dm_db_index_usage_stats ius | |
| INNER JOIN sys.tables t ON t.OBJECT_ID = ius.object_id | |
| WHERE database_id = DB_ID('MyDb') | |
| GROUP BY database_id, t.name | |
| ORDER BY SUM(ius.user_seeks + ius.user_scans + ius.user_lookups) DESC |
extension_id=jifpbeccnghkjeaalbbjmodiffmgedin # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc"
unzip -d "$extension_id-source" "$extension_id.zip"Thx to crxviewer for the magic download URL.
| package com.gabesechan.android.reusable.receivers; | |
| import java.util.Date; | |
| import android.content.BroadcastReceiver; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.telephony.TelephonyManager; | |
| public abstract class PhonecallReceiver extends BroadcastReceiver { |
| using System; | |
| using System.Security.Cryptography; | |
| using System.Text; | |
| public class Program | |
| { | |
| public static void Main() | |
| { | |
| Console.WriteLine(EncodePassword("Pa55w0rd")); | |
| } |