It is recommended to have the following command somewhere in the beginning of the powershell script file:
cd /d $PSScriptRoot
The presence of this will run all the commands after it with respect to the location of the running powershell script file.
Extremely Serious
It is recommended to have the following command somewhere in the beginning of the powershell script file:
cd /d $PSScriptRoot
The presence of this will run all the commands after it with respect to the location of the running powershell script file.
Instead of using > to redirect the output into a file, pipe it to out-file cmdlet.
The out-file cmdlet allows some useful parameters as follows:
| Parameter | Argument | Description |
| -Append | Adds the output to the end of an existing file. | |
| -Encoding | Encoding | Specifies the type of encoding for the target file. The default value is utf8NoBOM.
The acceptable values for this parameter are as follows: ascii: Uses the encoding for the ASCII (7-bit) character set. |
| -FilePath | Path | Specifies the path to the output file. |
To redirecting the output of the dir command to dir.txt file, use the following command:
dir | out-file -encoding ascii -filepath "dir.txt"
If the preceding links doesn't work try to find them from the archive.
security.provider.1=org.bouncycastle.jce.provider.BouncyCastleProvider security.provider.2=org.bouncycastle.jsse.provider.BouncyCastleJsseProvider
Adjust the other security.provider to start from 3 like the following:
security.provider.3=sun.security.provider.Sun security.provider.4=sun.security.rsa.SunRsaSign security.provider.5=com.sun.net.ssl.internal.ssl.Provider security.provider.6=com.sun.crypto.provider.SunJCE security.provider.7=sun.security.jgss.SunProvider security.provider.8=com.sun.security.sasl.Provider security.provider.9=org.jcp.xml.dsig.internal.dom.XMLDSigRI security.provider.10=sun.security.smartcardio.SunPCSC security.provider.11=sun.security.mscapi.SunMSCAPI
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.ProtocolException;
import java.net.URL;
public class Main {
public static void main(String[] args) {
try {
URL url = new URL("https://www.nist.gov/");
System.out.println(url);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setDoOutput(true);
System.out.println(connection.getResponseCode());
StringBuilder response = new StringBuilder();
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
try {
String line = reader.readLine();
while (line != null) {
response.append(line);
line = reader.readLine();
}
} finally {
reader.close();
}
System.out.println(response.toString());
}
catch(ProtocolException exception) {
exception.printStackTrace();
}
catch(IOException exception) {
exception.printStackTrace();
}
}
}
You should be able to access it without any SSL handshake error.
Alternatively, you can opt to use the official JDK 6u121 via the Java SE 6 Advanced and Java SE 6 Support if you have availed of it.
The method that allows to add methods to existing type without creating a new derived type, recompiling, or otherwise modifying the original type.
A method signature template with a return value and an argument
public static <T_RETURN> <METHOD_NAME>(this <T_TYPE> <VAR_NAME>, <T_ARG1_TYPE> <ARG1_NAME>)
| Token | Description |
| T_RETURN | The type of the return value. |
| METHOD_NAME | The desired name of the method. |
| T_TYPE | The existing type to extend. |
| VAR_NAME | The holder of an instance of the T_TYPE |
| T_ARG1_TYPE | Type of the first argument. |
| ARG1_NAME | The name of the first argument. |
This method is actually a static method but the first argument has the keyword this and the target type to extend. Also it holds the instance of the target type.
The T_RETURN and the argument part of the template are optional. Also the argument is not limited to just one, you can have as many as required by your extension.
To stage a file and name it executable at the same time you can use the following git command:
git add --chmod=+x <FILENAME>
A member of a class that provides flexibility for exposing private fields.
//backing private field
private string prop;
public string ReadWriteProp {
get {
return prop;
}
set {
prop = value;
}
}
public string ReadOnlyProp {
get {
return prop;
}
}
public string WriteOnlyProp {
set {
prop = value;
}
}
A more concise property declaration especially if theres no additional logic required for the accessors.
public string ReadWriteProp {
get; set;
}
public string ReadOnlyProp {
get; private set;
}
public string WriteOnlyProp {
private get; set;
}
Delegate is a type that references methods with a particular parameter list and return type.
public delegate void Printer<T>(T data);
static void ConsoleWrite<T>(T data) {
Console.WriteLine(data);
}
Printer<String> consoleOut = new Printer<String>(ConsoleWrite);
consoleOut("test");
The virtual keyword allows to modify a method, property, indexer or event declaration and to be overridden in a derived class.
public virtual double volume() {
return len * width * height
}
The type can vary in the direction as the subclass.
The reverse of covariant.
| Language | Covariant | Contravariant |
| C# | IList<out T> | IList<in T> |
| Java | List<? extends Number> | List<? super Integer> |
© 2026 Ron and Ella Wiki Page
Theme by Anders Noren — Up ↑
Recent Comments