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
Retrieves all of the trust relationships for this domain - Does not Grab Forest Trusts | |
([System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()).GetAllTrustRelationships() | |
Grab Forest Trusts. | |
([System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest()).GetAllTrustRelationships() | |
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
// What system are we connected to? | |
systeminfo | findstr /B /C:"OS Name" /C:"OS Version" | |
// Get the hostname and username (if available) | |
hostname | |
echo %username% | |
// Get users | |
net users | |
net user [username] |
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> | |
#include <cstring> | |
using namespace std; | |
//function prototype | |
void solve(char[]); | |
int main() | |
{ | |
char name[100] = { 0 }; | |
char result; |
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
/*****************************************************************//** | |
* \file hw6.c | |
* \brief Counts the number of words of a given length in maxRow sentences | |
* | |
* \author labgeek@gmail.com | |
* \date 4/10/1996 | |
*********************************************************************/ | |
#include <stdio.h> |
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> | |
#include <array> | |
using namespace std; | |
bool sumOfTwo(int a[], int b[], int v, int len1, int len2) | |
{ | |
for(int i = 0; i<len1; i++) | |
{ | |
int needed_value = v - a[i]; | |
for(int j = 0; j<len2; j++){ |
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
/* | |
* Sort number using STL vectors | |
*/ | |
#include <cmath> | |
#include <cstdio> | |
#include <vector> | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; |
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 <stdio.h> | |
#include <string.h> | |
int main(){ | |
char *s; | |
s = malloc(1024 * sizeof(char)); | |
scanf("%[^\n]", s); | |
// printf("%s", s); | |
char *token = strtok(s, " "); |
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
/* | |
* List.cpp | |
* | |
* Created on: Jul 20, 2020 | |
* Author: labgeek@gmail.com | |
*/ | |
#include <iostream> | |
#include <cstdlib> | |
#include "List.h"; |
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
/* | |
* List.h | |
* | |
* Created on: Jul 20, 2020 | |
* Author: labgeek@gmail.com | |
*/ | |
#ifndef LIST_H_ | |
#define LIST_H_ |
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 <stdio.h> | |
#include <stdlib.h> | |
void rArray(int *, int); | |
int main() | |
{ | |
int num, *arr, i; | |
scanf("%d", &num); | |
arr = (int*) malloc(num * sizeof(int)); | |
for(i = 0; i < num; i++) { |
NewerOlder