This file contains hidden or 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
| composer dump-autoload -o |
This file contains hidden or 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
| use DB | |
| go | |
| ALTER TABLE Tbl_SysUserIssueCategory | |
| ADD CONSTRAINT UQ_SysUser_IssueCategory UNIQUE (SysUserId, IssueCategoryId); | |
| remove | |
| ======= | |
This file contains hidden or 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
| -- current id 1, 2, 3, 4 so reseed is 4 next is 5 | |
| DBCC CHECKIDENT ('Comment', RESEED, 4); |
This file contains hidden or 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
| composer require simplesoftwareio/simple-qrcode "~4" --with-all-dependencies | |
| enable php.ini file => extension=gd | |
| used in laravel blade file | |
| {!! QrCode::size(250)->generate('mailto:[email protected]'); !!} |
This file contains hidden or 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 TelegramBot.Helpers; | |
| Console.WriteLine("Sending Start..."); | |
| DateTime startTime = DateTime.Now; | |
| Console.Write("Type your Message: "); | |
| string message = Console.ReadLine()!; | |
| await TelegramBotHandler.SendTelegramMessage(message!); | |
| DateTime endTime = DateTime.Now; |
This file contains hidden or 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
| eg. string start = "20250101" | |
| DateTime startDate = DateTime.ParseExact(start, "yyyyMMdd", CultureInfo.InvariantCulture); |
This file contains hidden or 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
| Note: change memory limit in : /home/smedb/public_html/wp-includes/default-constants.php | |
| line 52: 40M to 256M |
This file contains hidden or 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
| if ("geolocation" in navigator) { | |
| // Geolocation is supported | |
| navigator.geolocation.getCurrentPosition( | |
| (position) => { | |
| // Success callback | |
| const latitude = position.coords.latitude; | |
| const longitude = position.coords.longitude; | |
| console.log(`Latitude: ${latitude}, Longitude: ${longitude}`); | |
| }, | |
| (error) => { |
This file contains hidden or 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
| ALTER DATABASE test SET TRUSTWORTHY ON; | |
| GO | |
| SELECT | |
| 'CREATE INDEX ' + ix.name + ' ON ' + t.name + '(' + CAST(STRING_AGG(c.name, ', ') AS VARCHAR(MAX)) + ');' AS create_index_statement | |
| FROM | |
| sys.indexes ix | |
| JOIN | |
| sys.tables t ON ix.object_id = t.object_id |
This file contains hidden or 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
| It looks like the `--use-database-names` option isn't being recognized in your `Scaffold-DbContext` command. This issue can sometimes occur due to the version of Entity Framework Core tools you're using or how the command is structured. | |
| Here are a few steps to troubleshoot and resolve this: | |
| 1. **Ensure you have the latest version of EF Core tools**: | |
| ```powershell | |
| dotnet tool update --global dotnet-ef | |
| ``` | |
| 2. **Use the `dotnet ef` CLI command instead of the Package Manager Console**: |
NewerOlder