public class PaginatedList<T> : List<T>
{
public int PageIndex { get; private set; }
public int TotalPages { get; private set; }
public PaginatedList(List<T> items, int count, int pageIndex, int pageSize)
{
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
| * { | |
| box-sizing: border-box; | |
| } | |
| body, html { | |
| margin: 0; | |
| padding: 0; | |
| height: 100%; | |
| font-family: Arial, sans-serif; | |
| background-color: #f3f4f6; |
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 System.Net.Mail; | |
| using System.Net; | |
| namespace ConsoleAppTest; | |
| class EmailSystem | |
| { | |
| private readonly string smtpHost; | |
| private readonly int smtpPort; | |
| private readonly string smtpUser; |
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 System.Security.Cryptography; | |
| public class PasswordGenerator | |
| { | |
| public int MinimumLengthPassword { get; private set; } | |
| public int MaximumLengthPassword { get; private set; } | |
| public int MinimumLowerCaseChars { get; private set; } | |
| public int MinimumUpperCaseChars { get; private set; } | |
| public int MinimumNumericChars { get; private set; } |
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 Microsoft.AspNetCore.Components.WebAssembly.Authentication.Internal; | |
| using Microsoft.AspNetCore.Components.WebAssembly.Authentication; | |
| using System.Security.Claims; | |
| using System.Text.Json; | |
| namespace {Enter your namespace name here} | |
| { | |
| public class CustomUserFactory<TAccount> : AccountClaimsPrincipalFactory<RemoteUserAccount> | |
| { | |
| public CustomUserFactory(IAccessTokenProviderAccessor accessor) : base(accessor) { } |
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
| #include<iostream> | |
| using namespace std; | |
| class Animal | |
| { | |
| public: | |
| void virtual Speak() | |
| { | |
| //no code. . . | |
| } | |
| }; |
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
| #include<iostream> | |
| using namespace std; | |
| class Animal | |
| { | |
| public: | |
| virtual void Sound() | |
| { | |
| //No code. . . | |
| } |
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
| String[] requestedColumns = { CallLog.Calls.CACHED_NUMBER_LABEL, CallLog.Calls.DURATION }; | |
| Cursor calls = managedQuery( CallLog.Calls.CONTENT_URI, requestedColumns, | |
| CallLog.Calls.CACHED_NUMBER_LABEL+ " = ?", new String[] { "HourlyClient123" } , null); | |
| Log.d(DEBUG_TAG, "Call count: " + calls.getCount()); | |
| int durIdx = calls.getColumnIndex(CallLog.Calls.DURATION); | |
| int totalDuration = 0; | |
| calls.moveToFirst(); | |
| while (!calls.isAfterLast()) | |
| { | |
| Log.d(DEBUG_TAG, "Duration: " + calls.getInt(durIdx)); |
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
| /*Check Attribute name availablity*/ | |
| SELECT TABLE_NAME FROM DataBaseName_Here.INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME = ‘Name' | |
| --To check all the tables available in the Database | |
| SELECT TABLE_NAME, TABLE_TYPE FROM DataBaseName_Here.INFORMATION_SCHEMA.TABLES ORDER BY TABLE_NAME | |
| --To Get the list of columns | |
| SELECT COLUMN_NAME FROM DataBaseName_Here.INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Table Name here' | |
| /*Queries to get all the data*/ |
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
| import random | |
| Comp_guess_number = random.randint(1,5) | |
| total_number_of_Attempts = 3 | |
| cuurent_attempt =1 | |
| while(cuurent_attempt<=total_number_of_Attempts): | |
| if cuurent_attempt == total_number_of_Attempts: | |
| print("This is last attempt") |
NewerOlder