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 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 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 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 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 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 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 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") |
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
a console-based application for school teachers. | |
This application will auto generate questions for Grades 1, 2, 3, 4 and 5. | |
Using this application teacher will be able to give different paper to each student |
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
#include<iostream.h> | |
#include<conio.h> | |
void main() | |
{ | |
int location=-1,item; | |
int arr[9]; | |
cout<<"Enter the Data"; | |
for(int i=0; i<=9;i++) | |
{ | |
cin>>arr[i]; |
NewerOlder