2. Windows' File System and Basic File/Directory Commands
Windows' file system is NOT case-sensitive
familial relationships
collective form of TV watching
ostracization
funky clothes
demeanor
clique
expressivity
deferent waiter
bittersweet memories
spontaneous process
assiduously
dissipative
paraplegics
fulfilling
terminal illness
unwavering purpose
daunt
suspicion
epoch
// map::find
#include <iostream>
#include <map>
public class Formatter {
public static String toString(Object aObject) {
StringBuilder result = new StringBuilder();
String newLine = System.getProperty("line.separator");
result.append( aObject.getClass().getName() );
result.append( " Object {" );
result.append(newLine);
//determine fields declared in aObject class only (no fields of superclass)
Field[] fields = aObject.getClass().getDeclaredFields();
//print field names paired with their values
for ( Field field : fields ) {
result.append(" ");
try {
field.setAccessible(true);
result.append( field.getName() );
result.append(": ");
//requires access to private field:
result.append( field.get(aObject) );
} catch ( IllegalAccessException ex ) {
System.out.println(ex);
}
result.append(newLine);
}
result.append("}");
return result.toString();
}
}
int a[] = {3,4,6,2,1};
int size = sizeof(a)/sizeof(a[0]);
std::sort(a, a+size);
do {
// print a's elements
} while(std::next_permutation(a, a+size));
public class Permute{
static void permute(java.util.List<Integer> arr, int k){
for(int i = k; i < arr.size(); i++){
java.util.Collections.swap(arr, i, k);
permute(arr, k+1);
java.util.Collections.swap(arr, k, i);
}
if (k == arr.size() -1){
System.out.println(java.util.Arrays.toString(arr.toArray()));
}
}
public static void main(String[] args){
Permute.permute(java.util.Arrays.asList(3,4,6,2,1), 0);
}
}
std::stringstream ss;
unsigned long long ll = (unsigned long long)&ss;
cout << ll;
cout << ss.str();
1
2
3
4
5
| .amp { font-family: Baskerville, 'Goudy Old Style', Palatino, 'Book Antiqua', serif; font-style: italic; font-weight: normal;} |