id stringlengths 36 36 | text stringlengths 1 1.25M |
|---|---|
58faae34-127f-4352-b0b0-d2770a5c6e60 | void end(String name); |
f92d8bc8-a4cb-41fd-8897-316a4aa9b645 | Long getCost(); |
f563fd88-2c22-4a2b-8021-d5cea7145c9f | String getName(); |
7bb2327e-b5a3-4cf1-88c7-ceb888e9451e | Long getBeginTime(); |
22cb1ce3-3a3d-4279-ba9b-8c8453a59c3e | Long getEndTime(); |
6b6c21b9-200b-47c6-8f58-799f1ea9e30b | void init(Map<String, Object> parameters); |
5cd17147-ed11-4e53-ad86-7b069e64debb | void end(Map<String, Object> parameters); |
bbf02dab-8869-4990-9b75-4fd335ea07b0 | Transaction getTransaction(); |
948c6a89-8f60-4844-b2c2-4d60e0a5786c | void setTransaction(Transaction transaction); |
184ff4bd-1063-4c3e-ae5e-b2790225286e | List<Transaction> runAction(Configuration configuration) throws InterruptedException; |
332c02ea-e9f5-4d82-ad85-2eb846bba245 | @Override
public void begin() {
beginTime = System.currentTimeMillis();
} |
2971f38e-5cbd-41c9-a683-f196b4f78fff | @Override
public void end() {
endTime = System.currentTimeMillis();
} |
8940efa7-1317-44ce-b45c-0f70216801c3 | @Override
public void begin(String name) {
this.name = name;
begin();
} |
b3e100bb-886e-4955-8b2b-de9b4cd8290f | @Override
public void end(String name) {
if (this.name.equals(name)) {
end();
}
throw new IllegalArgumentException("Transaction name is not correct, original name: " + this.name);
} |
4d2afb07-181c-4831-ac33-651ee980c29a | @Override
public Long getCost() {
return endTime - beginTime;
} |
5043ce64-abcf-4071-b3b8-c8814e8a2ec4 | @Override
public String getName() {
return name;
} |
cc3de0a0-dd4e-48cb-b066-d3e58bdf88eb | @Override
public Long getBeginTime() {
return beginTime;
} |
022db1b2-e7a9-4869-ad83-bb8b7ae61d23 | @Override
public Long getEndTime() {
return endTime;
} |
8e0fc315-64ba-4b84-99e0-36e0b63e650f | @Override
public List<Transaction> runAction(Configuration configuration) throws InterruptedException {
logger.debug("test case initializing...");
int runs = (int) (configuration.getDuration() / 1000);
int actionCount = configuration.getConcurrent() * runs;
List<Action> actions = new... |
e72dc8ed-7584-44c0-a674-7e5d359065c5 | public void test() throws Exception {
CTDogLauncher launcher = new CTDogLauncherImpl();
launcher.start("-a", "org.ctdog.TestAction",
"-c", "10",
"-t", "1000",
"-d", "1000",
"-p", "name,Andy");
} |
d9788c86-0ae5-4c45-a9b3-a89fc0e551e7 | @Override
public void init(Map<String, Object> parameters) {
for (String key : parameters.keySet()) {
System.out.println("key: " + key + "\t" + "value: " + parameters.get(key));
}
} |
332425f8-38c4-4116-955a-7ddd6cb3b878 | @Override
public void end(Map<String, Object> parameters) {
} |
ea7cd8fa-ef8a-467f-8178-c1e9c8249929 | @Override
public Transaction getTransaction() {
return transaction;
} |
4c8aa0a4-930d-4b9d-91b5-10d6518c3a4a | @Override
public void setTransaction(Transaction transaction) {
this.transaction = transaction;
} |
43ee3655-d801-408f-a472-d9d083cd6fbe | @Override
public void run() {
transaction.begin();
System.out.println("Running...");
transaction.end();
} |
17d66e27-bffb-4822-8567-265e3d5a499f | public static void main(String[] args) {
// TODO code application logic here
} |
86ef83b0-75b3-46e7-9e07-c5934ce60336 | public clsComboBox()
{} |
fc809f80-d71d-40b2-921e-0f4afcf7b710 | public clsComboBox(String codigo, String descripcion)
{
this.codigo=codigo;
this.descripcion=descripcion;
} |
a5defdc3-cbb2-4a84-8dbc-7b9aa71972ee | public String getDescripcion() {
return descripcion;
} |
c0232154-6918-492e-ae0a-8bc2101c82e5 | public void setDescripcion(String descripcion) {
this.descripcion = descripcion;
} |
6e932332-50a1-44fc-b673-56efaaa922d2 | public String getCodigo() {
return codigo;
} |
bd1d72a9-ab57-47a1-a042-512fe34e3799 | public void setCodigo(String codigo) {
this.codigo = codigo;
} |
8659f1a8-722f-46c5-9012-f0cf8946807b | @Override
public String toString()
{
return descripcion;
} |
511292bd-567c-47bb-a4c0-9d632521ce72 | public static String getSerialNumber(String drive) {
String result = "";
try {
File file = File.createTempFile("realhowto",".vbs");
file.deleteOnExit();
FileWriter fw = new java.io.FileWriter(file);
String vbs = "Set objFSO = CreateObject(\"Scripting.FileSystemObject\")\n"
... |
1485ecaf-b88d-4ee2-adb6-c5eeea22f0f1 | public static String getMotherboardSN() {
String result = "";
try {
File file = File.createTempFile("realhowto",".vbs");
file.deleteOnExit();
FileWriter fw = new java.io.FileWriter(file);
String vbs =
"Set objWMIService = GetObject(\"winmgmts:\\\\.\\root\\cimv2\")\n"
+ "S... |
b76a1314-d69c-48fd-9c9d-a6565f38e434 | String codif(String cad) {
String clue="";
for(int i=0; i<cad.length(); i++) {
for(int j=0; j<256; j++) {
if(cad.charAt(i)==(char)j) {
clue+=((char)(j+5));
}
}
... |
625979d3-0060-465e-9722-7d99ced03f8a | String decodif(String cad) {
String clue="";
for(int i=0; i<cad.length(); i++) {
for(int j=0; j<256; j++) {
if(cad.charAt(i)==(char)j) {
clue+=((char)(j-5));
}
}
... |
05658d02-8ca8-4088-a2c7-c8486d16bc61 | public boolean insertarRegistro(String codigo1, String codigo2)
{
boolean exito = false;
try
{
bd.conectarBaseDeDatos();
sql = "INSERT INTO ck_licencia(codigo_licencia, fecha_registro, estado, codigo_licencia_2)"
... |
b5595777-41a4-4c02-8301-4ae24d2ee47e | public boolean eliminarRegistro(String codigo1, String codigo2)
{
boolean exito = false;
try
{
bd.conectarBaseDeDatos();
sql = "DELETE FROM ck_licencia"
+ " WHERE codigo_licencia = '" + codigo1+"'"
... |
ce998e57-6004-4d2c-9a99-9fc0c695d8dc | public clsConexion(){
String server = obtenerServer();
url = "jdbc:postgresql://" + server + "/" + objUtils.nameBD;
user = objUtils.userBD;
pass = objUtils.passBD;
} |
02adcc19-0888-4158-9b98-cbfce190a243 | public String obtenerServer(){
String server ="";
File archivo = null;
FileReader fr = null;
BufferedReader br = null;
try {
// Apertura del fichero y creacion de BufferedReader para poder
// hacer una lectura comoda (disponer del metodo readLine()).
... |
09ace646-82d3-4089-afef-7206bac7b34d | public void conectarBaseDeDatos() {
try {
final String CONTROLADOR = "org.postgresql.Driver";
Class.forName( CONTROLADOR );
//System.getProperty( "user.dir" )+"/CarpetaBD/NombredelaBasedeDatos.mdb";
conexion = DriverManager.getConnection(url, user, pass);
... |
6a9a717c-ceb9-422c-af6f-9af4ec581c5c | public void conectarBDdinamic(String ip) {
if(ip==null)
{
ip="192.168.8.231";
}
url = "jdbc:postgresql://" + ip + "/ventasalm";
//javax.swing.JOptionPane.showMessageDialog(null, url);
String estado;
try {
final String CONTROLADOR ... |
b09e7fec-658e-4892-a4ce-d32f5faa6d04 | public void desconectarBaseDeDatos()
{
try {
if (conexion != null ) {
if(sentencia != null) {
sentencia.close();
}
conexion.close();
}
}
catch (SQLException ex) {
//ex.printStackTrace();
... |
00c5b232-247d-4176-96e7-ea306a482dfd | public inicio() {
initComponents();
lblServidor.setText(objConexion.obtenerServer());
lblBase.setText(objUtils.nameBD);
clsComboBox oItem = new clsComboBox("A", "7 DIAS");
cmbTiempo.addItem(oItem);
oItem = new clsComboBox("B", "15 DIAS");
... |
d5af9774-425a-4d89-a500-7aeb0f908601 | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
txtHardDisk = new javax.swing.JTextField();
jLabel1 = new javax.swing.JLabel();
txtMainBoard = new javax.swing.JTextField();
j... |
1864feaf-24c0-4378-bb2e-7013b9734639 | public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
} |
ee5b7b5a-537b-4bdb-a7ff-d652a57f820d | public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
} |
dd5b1631-62a4-4696-9bcf-4505fc0f8f2a | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
clsComboBox objCuotaSelect = (clsComboBox)cmbTiempo.getSelectedItem();
txtSerial.setText(objSerial.codif(objCuotaSelect.getCodigo()) + " - " + objSerial.codif(txtH... |
ac78014d-07cf-440e-8563-59ae55f76bdd | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
clsComboBox objCuotaSelect = (clsComboBox)cmbTiempo.getSelectedItem();
String codigo1 = objSerial.codif(txtHardDisk.getText());
String codigo2 = objSerial.codif(objCuotaSelect.getCodigo()) + objSe... |
b8b72d1a-9342-434c-9102-1a60cde46738 | public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://down... |
3b97d67f-43ad-44a4-baab-035dba45bf02 | public void run() {
new inicio().setVisible(true);
} |
ee064808-a0a7-47a7-ad7a-d98e6d30cc16 | public boolean isDouble(String cadena){
try {
Double.parseDouble(cadena);
return true;
}
catch (NumberFormatException nfe){
return false;
}
} |
4c5c95d8-1b3c-4a27-997a-0ba9cb8c83d2 | public boolean isEntero(String cadena){
try {
Integer.parseInt(cadena);
return true;
}
catch (NumberFormatException nfe){
return false;
}
} |
3400dbd8-32a7-4a1e-878d-1b84c267a374 | public double redondear(double numero)
{
/*numero = numero*100;
numero = (int) numero;
numero = (numero/100);*/
Locale.setDefault(Locale.ENGLISH);
DecimalFormat formateador = new DecimalFormat("####.##");
return Double.parseDouble(formateador.... |
e517c2d1-5f0e-4e4e-9af7-a081eb131d83 | public void limpiarJTable(DefaultTableModel dtmData){
int contRows = dtmData.getRowCount();
for (int i = 0; i < contRows; i++){
dtmData.removeRow(0);
}
} |
f8d6c7c4-9366-463b-9885-9952dc44a4b3 | public void setOcultarColumnasJTable(JTable tbl, int columna[])
{
for(int i=0;i<columna.length;i++)
{
tbl.getColumnModel().getColumn(columna[i]).setMaxWidth(0);
tbl.getColumnModel().getColumn(columna[i]).setMinWidth(0);
tbl.getTableHeader().getColumnModel().getCol... |
3b9c32a9-0723-485d-8c49-d684f1aeb5e5 | public void enumerarFilas(DefaultTableModel p_dtmData, int columna)
{
int maxData = p_dtmData.getRowCount();
for(int i=0; i<maxData; i++)
{
p_dtmData.setValueAt(i+1, i, columna);
}
} |
9dfc6d49-ccdd-4991-8c71-204a367003af | public void vaciarTabla(DefaultTableModel p_dtmData)
{
int contRows = p_dtmData.getRowCount();
for (int i = 0; i < contRows; i++)
{
p_dtmData.removeRow(0);
}
} |
8b17e48b-e662-49e4-9194-afbd7e7bf9c9 | public boolean isEmail(String correo) {
Pattern pat = null;
Matcher mat = null;
pat = Pattern.compile("^([0-9a-zA-Z]([_.w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-w]*[0-9a-zA-Z].)+([a-zA-Z]{2,9}.)+[a-zA-Z]{2,3})$");
mat = pat.matcher(correo);
if (mat.find()) {
System.out.println(... |
f6613818-b8a6-42ec-814b-d51c0dc2c83e | public Long getId() {
return id;
} |
ee032bf8-eb4a-410f-9c7c-3461f483fc06 | public void setId(Long id) {
this.id = id;
} |
22be41c8-2f23-4512-a57d-2130bb7a9aae | public String getPassword() {
return password;
} |
6508c6f7-f661-4ded-94c2-d7b5782b9eca | public void setPassword(String password) {
this.password = password;
} |
fc2ecea1-99a6-46d5-82a3-97e76984fd74 | public String getEmail() {
return email;
} |
cc5ab1df-0951-4f4f-a9a5-35006378e61b | public void setEmail(String email) {
this.email = email;
} |
ba2c46ab-abc4-4684-a2ac-8c217bade09d | public Integer getDonations() {
return donations;
} |
fc7f1c73-214b-45c5-9dbb-e79e46279b04 | public void setDonations(Integer donations) {
this.donations = donations;
} |
1757c489-993e-47f4-9736-990559d53f44 | public Integer getLevel() {
return level;
} |
2a85c9a0-a993-49e3-a6a4-69d1517e8d38 | public void setLevel(Integer level) {
this.level = level;
} |
e3adf0da-3d3f-4625-a5c7-444c03993ebc | public Collection<Facility> getFacilities() {
return facilities;
} |
3f4c49e0-6d2f-4156-8d1b-ecb403cf31f3 | public void setFacilities(Collection<Facility> facilities) {
this.facilities = facilities;
} |
f01bffd9-ad75-4993-ac76-20fae3912e8c | @Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((donations == null) ? 0 : donations.hashCode());
result = prime * result + ((email == null) ? 0 : email.hashCode());
result = prime * result + ((facilities == null) ? 0 : facilities.hashCode());
result = prim... |
1bfd5893-56cd-44a5-ab1f-a708e9832eb8 | @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
UserAccount other = (UserAccount) obj;
if (donations == null) {
if (other.donations != null)
return false;
} else if (!donations.equals(... |
439ddd3c-ca8a-4a1f-9b4e-bd5f40f4cfcb | public Long getId(); |
325edde5-8448-4ee0-a8ae-de6e052f6afa | public void setId(Long id); |
47254f9f-77d6-4936-8043-c9534b266743 | public MultilingualString() {
} |
b9240ee5-de3e-46d1-92b8-ed94985e96bc | public MultilingualString(FAITHLocale locale, String text) {
addText(locale, text);
} |
ed1190cd-7f5b-4202-9b20-411273d57ad7 | public void addText(FAITHLocale locale, String text) {
localizedStringMap.put(locale.getCode(), new LocalizedString(locale.getLocale(), text));
} |
dccf6c72-b879-4242-a678-242daada85fc | public String getText(FAITHLocale locale) {
if (localizedStringMap.containsKey(locale.getCode())) {
return localizedStringMap.get(locale.getCode()).getText();
}
return null;
} |
f6a5b1d0-e523-4aaf-9d6f-7e02ad384c1f | public Long getId() {
return id;
} |
2ebdc52a-a650-449a-a11a-c1c794a6a2ac | public void setId(Long id) {
this.id = id;
} |
a5a84879-1b9c-4931-9d0e-1c6a5167fccf | public Map<String, LocalizedString> getLocalizedStringMap() {
return localizedStringMap;
} |
eb0ee6e7-44c5-4e21-8ed4-09d41646cd46 | public void setLocalizedStringMap(Map<String, LocalizedString> map) {
this.localizedStringMap = map;
} |
f8e6892c-52e9-4f02-9a01-63dffaa3a1cd | @Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
result = prime * result + ((localizedStringMap == null) ? 0 : localizedStringMap.hashCode());
return result;
} |
07f276c4-a078-4972-b48e-1617451e2710 | @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
MultilingualString other = (MultilingualString) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.i... |
b54dc248-b365-45d6-a0c7-b356db7ee5cc | public Facility() {
} |
3145a40b-a55a-48a4-b96d-6b9a67d377a8 | public Facility(Facility other) {
this.setId(other.getId());
this.setName(other.getName());
this.setLevel(other.getLevel());
this.setFacilityCategory(other.getFacilityCategory());
this.setUserAccount(other.getUserAccount());
this.setStreet(other.getStreet());
this.setZip(other.getZip());
this.setCity(ot... |
78528900-9897-4b64-ba88-4646aeb9fee4 | public Long getId() {
return id;
} |
b2584228-2950-4a63-be91-89fb2554032c | public void setId(Long id) {
this.id = id;
} |
fa9458f0-892a-4fe4-8a5e-2c345ca10bec | public String getName() {
return name;
} |
195c9cb2-1719-465b-8aba-b3a21e709c6c | public void setName(String name) {
this.name = name;
} |
f7600ad6-9737-4af3-ba33-e4b6de9791d6 | public int getLevel() {
return level;
} |
d0940eea-2239-4480-ab6b-512cce106cdc | public void setLevel(int level) {
this.level = level;
} |
eddfe64c-114a-42a9-88f3-9f807d10a8e3 | public FacilityCategory getFacilityCategory() {
return facilityCategory;
} |
f1aaef94-6230-4c74-858c-905719540e2a | public void setFacilityCategory(FacilityCategory facilityCategory) {
this.facilityCategory = facilityCategory;
} |
62907a7b-d103-495f-9eb2-9acc569b291d | public UserAccount getUserAccount() {
return userAccount;
} |
92068bae-f9f7-412c-a022-d3169ebc29bd | public void setUserAccount(UserAccount userAccount) {
this.userAccount = userAccount;
} |
4bb96a12-1d28-41b9-8780-5f543a21b90e | public String getStreet() {
return street;
} |
d5715b1a-7f91-4b54-b2b3-308cab49280d | public void setStreet(String street) {
this.street = street;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.