query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Defines common reactive operations inherited by all kinds of loaders.
public interface ReactiveLoader { default boolean isPostgresSQL(SharedSessionContractImplementor session) { return session.getJdbcServices().getDialect() instanceof PostgreSQL9Dialect; } default CompletionStage<List<Object>> doReactiveQueryAndInitializeNonLazyCollections( final String sql, final SharedSess...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Reactive() {\r\n\t\t// utility class\r\n\t}", "public interface BaseSchedulers {\n\n Scheduler io();\n\n Scheduler computation();\n\n Scheduler ui();\n\n}", "private ExtendedOperations(){}", "public interface Loader {\n\t\tpublic void load();\n\t}", "public interface BaseView {\r\n void...
[ "0.5340388", "0.5173487", "0.5170746", "0.51594543", "0.51060075", "0.5075525", "0.5073789", "0.50707", "0.5057088", "0.50473696", "0.5045318", "0.502075", "0.5009577", "0.49479696", "0.49324238", "0.48881978", "0.48778555", "0.4870874", "0.4868534", "0.48541874", "0.48426142...
0.53007245
1
Used by query loaders to add stuff like locking and hints/comments
default String preprocessSQL(String sql, QueryParameters queryParameters, SessionFactoryImplementor factory, List<AfterLoadAction> afterLoadActions) { // I believe this method is only needed for query-type loaders return sql; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void addCacheHints(final TypedQuery<?> typedQuery, final String comment) {\n\t\ttypedQuery.setHint(\"org.hibernate.cacheMode\", CacheMode.NORMAL);\n\t\ttypedQuery.setHint(\"org.hibernate.cacheable\", Boolean.TRUE);\n\t\ttypedQuery.setHint(\"org.hibernate.comment\", comment);\n\t}", "public void ca...
[ "0.59441274", "0.5415899", "0.54086506", "0.53284067", "0.53203446", "0.5270327", "0.52562195", "0.5207692", "0.5158717", "0.5108669", "0.5012224", "0.498006", "0.49617136", "0.4917062", "0.4894183", "0.48834282", "0.48610476", "0.48530933", "0.48325458", "0.48206404", "0.481...
0.0
-1
interface: the object of device.
public interface I_DevOBJ { /** * get:deviceId * * @return the deviceId */ public String getDeviceId(); /** * get:oui * * @return the oui */ public String getOui(); /** * get:device_serialnumber * * @return the device_serialnumber */ public String getSn(); /** * set:deviceId * ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Reference getDevice();", "public interface IDeviceInfo\r\n{\r\n public DeviceInfo GetDeviceInfo();\r\n}", "public interface ElectronicsDevice {\n}", "public interface IRobotDeviceRequest {\n\n /**\n * Returns the device name.\n * \n * @return the device name\n */\n String getDeviceNa...
[ "0.70390016", "0.68213785", "0.68060476", "0.67690223", "0.66911894", "0.66456985", "0.663261", "0.65998983", "0.6597535", "0.6597535", "0.6542434", "0.6485562", "0.6424698", "0.64103705", "0.6408736", "0.6402556", "0.6363049", "0.63056076", "0.63043576", "0.6301273", "0.6296...
0.7591194
0
Gets the application context
public static Context getAppContext() { return mContext; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Context getContext(){\n return appContext;\n }", "public static Context getAppContext() {\n return _BaseApplication.context;\n }", "public static ApplicationContext getApplicationContext() {\n return appContext;\n }", "ApplicationContext getAppCtx();", "public st...
[ "0.8746098", "0.84311223", "0.8304579", "0.82281965", "0.8206656", "0.8061354", "0.79799086", "0.79325354", "0.79133826", "0.7822299", "0.7719088", "0.77165294", "0.77165294", "0.77041197", "0.7617046", "0.7617046", "0.76075464", "0.7420828", "0.73844504", "0.7370674", "0.731...
0.7598048
17
Gets the RCS service control singleton
public static RcsServiceControl getRcsServiceControl() { return mRcsServiceControl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static RCProxy instance(){\n\t\treturn SingletonHolder.INSTANCE;\n\t}", "public static final RadiusServiceStarter getInstance() {\n return starter;\n }", "public synchronized static RMIClient getInstance() {\n if (instance == null) {\n instance = new RMIClient();\n }\n...
[ "0.6793711", "0.6516552", "0.6410248", "0.6372726", "0.6365056", "0.63190407", "0.6278899", "0.6269949", "0.62232363", "0.62115914", "0.62014616", "0.6193816", "0.6186206", "0.61792386", "0.6172333", "0.6170132", "0.61246914", "0.61245525", "0.61216277", "0.6108766", "0.60995...
0.7887058
0
TODO Autogenerated method stub
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Thread timer = new Thread() { public void run() { try { sleep(2500); if (android.os.Build.VERSION.SDK_INT >= 11) { startActivity(new Intent( "com...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
for stack add operation
@Test void whenElementAddedToStackLastElementShouldTop() { MyNode<Integer> myFirstNode = new MyNode<>(70); MyNode<Integer> mySecondNode = new MyNode<>(30); MyNode<Integer> myThirdNode = new MyNode<>(56); MyStack myStack = new MyStack(); myStack.push(myFirstNode); myS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addition() throws Exception {\n\t\tif(!(stackBiggerThanTwo())) throw new Exception(\"Stack hat zu wenig einträge mindestens 2 werden gebraucht!!\");\n\t\telse{\n\t\t\tvalue1=stack.pop();\n\t\t\tvalue2=stack.peek();\n\t\t\tstack.push(value2+value1);\n\t\t}\n\t\t\n\t}", "static void stackPush(Stack<In...
[ "0.74863386", "0.68451667", "0.6829941", "0.6778301", "0.6765702", "0.6753212", "0.6741733", "0.6731417", "0.6691714", "0.668319", "0.66613287", "0.6603042", "0.65937847", "0.6586517", "0.65840566", "0.65681154", "0.65447825", "0.653741", "0.65287334", "0.6527419", "0.6524488...
0.0
-1
pop till stack is empty
@Test void whenPopTillStackEmptyReturnNodeShouldBeFirstNode() { MyNode<Integer> myFirstNode = new MyNode<>(70); MyNode<Integer> mySecondNode = new MyNode<>(30); MyNode<Integer> myThirdNode = new MyNode<>(56); MyStack myStack = new MyStack(); myStack.push(myFirstNode); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void pop() {\r\n pop( false );\r\n }", "public void pop() {\n if(!empty()){\n \tstack.pop();\n }\n }", "public void pop(){\n // check if there is any stack present or not\n if(this.arr==null){\n System.out.println(\"No stack present, first crea...
[ "0.8154127", "0.81470853", "0.7965033", "0.78948027", "0.788639", "0.7863681", "0.7829781", "0.7797419", "0.7686695", "0.7685303", "0.76369363", "0.7631224", "0.7591265", "0.7582787", "0.75691473", "0.7499096", "0.7476132", "0.74552226", "0.7437358", "0.73784864", "0.7333983"...
0.0
-1
private final Class clientClass;
public static FileStorageEnum getByStorage(Integer storage) { return Arrays.stream(values()).filter(o -> o.getStorage().equals(storage)).findFirst().orElse(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Client {\n\n}", "public Class getServiceClass()\n {\n return serviceClass;\n }", "@Override\r\n\tpublic Class getClase() {\n\t\treturn Cliente.class;\r\n\t}", "protected int getClientType() {\n\n return clientType;\n\n }", "public abstract Class<Response> getRespo...
[ "0.66685236", "0.65840626", "0.65745443", "0.65469474", "0.64959115", "0.64473516", "0.6408281", "0.6346719", "0.63230515", "0.6314324", "0.62579733", "0.62577814", "0.62577814", "0.62266564", "0.6188739", "0.61884665", "0.61778575", "0.6176174", "0.6125582", "0.61047405", "0...
0.0
-1
Created by pevargas90 on 4/19/14.
public interface Strategy { public Integer pick_card( List<Card> hand, Suit trump, Suit round ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Ov...
[ "0.59311426", "0.5836988", "0.5818324", "0.57795143", "0.5750628", "0.5733719", "0.5703618", "0.56864035", "0.56864035", "0.567481", "0.5672331", "0.56691515", "0.56072354", "0.5562382", "0.5561589", "0.5556408", "0.55211", "0.5519586", "0.5519586", "0.5519586", "0.5519586", ...
0.0
-1
get and set the infos
public NewMember(String username, String password, String email) { this.username = username; this.password = password; this.email = email; this.has_role = "User"; this.signingDate = new Date(System.currentTimeMillis()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void updateInfos();", "@Override\r\n\tpublic void setInfo(Object datos) {\n\t\t\r\n\t}", "Information getInfo();", "boolean setInfo();", "public void setInfos(List value) {\n infos = value;\n }", "private void setUsefulURLsInfo () {\n infoList = new ArrayList<> ();\n\n...
[ "0.6754182", "0.6748682", "0.6666756", "0.6530928", "0.6453979", "0.6453113", "0.64430964", "0.64396656", "0.64209056", "0.64062357", "0.63958997", "0.6365159", "0.6364703", "0.6355632", "0.6345688", "0.6340926", "0.63175714", "0.63161635", "0.63138336", "0.6296262", "0.62785...
0.0
-1
este metodo permite leer los datos de cada uno de los empleados que sean creados los parametros son los mismos que contiene el constructor
public static Empleado leerDatos() { Scanner entrada= new Scanner(System.in); Empleado obj; String nombre; String apellido; int edad; String fechaNa; double sueldo; String telefono; String direccion; String email; String cargo; nombre = validarString("Ingrese sus nombres"); apellido = validarString("...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n Alumno aaDatos []; // El identificador es nulo\n \n aaDatos = new Alumno[tam];//Creamos un arreglo de 10 \n //alumnos - AQUI HABRA PREGUNTA\n for (int i = 0; i < aaDatos.length; i++) {\n aaDatos[i]= ne...
[ "0.6832013", "0.6338525", "0.6304588", "0.63040334", "0.61591107", "0.6141676", "0.6101144", "0.6060115", "0.6051219", "0.5986343", "0.596246", "0.5949279", "0.5935093", "0.5916287", "0.5890682", "0.58691007", "0.5864812", "0.58637214", "0.58443207", "0.58320856", "0.58300793...
0.59804934
10
] este metodo sirve para mostrar todos los datos de los empleados creados en estecaso los datos estan guardados en un arrayList
public static void verDatos (ArrayList<Empleado> arreglo) { Empleado obj; for (int i = 0; i < arreglo.size(); i++) { obj= arreglo.get(i); JOptionPane.showMessageDialog(null,"Nombre: " + obj.getNombre() +" "+ obj.getApellido()+"\nEdad: " + obj.getEdad() + "\nFecha de nacimiento: "+ obj...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Empresa> getData() {\n lista = new ArrayList<Empresa>();\n aux = new ArrayList<Empresa>();\n Empresa emp = new Empresa(1, \"restaurantes\", \"KFC\", \"Av. Canada 312\", \"tel:5050505\", \"kfc@kfc.com\", \"www.kfc.com\", \"https://upload.wikimedia.org/wikipedia/en/thumb/b/bf/KFC_log...
[ "0.7349399", "0.70293814", "0.69976133", "0.6937298", "0.6933886", "0.6896748", "0.6873873", "0.6801087", "0.67985886", "0.67922026", "0.6790178", "0.6785648", "0.67611134", "0.6757037", "0.67560637", "0.6754471", "0.67214745", "0.66984135", "0.6696227", "0.6667858", "0.66533...
0.6690417
19
Used by the blueprint container
public NetboxHttpClient(NetboxProperties properties) { this(properties.getHost(), properties.getApiKey()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void consulterCatalog() {\n\t\t\n\t}", "private RESTBackend()\n\t\t{\n\t\t\t\n\t\t}", "@Override\n\t\t\tprotected void configure() {\n\t\t\t}", "@Override\n protected void configure() {\n }", "@Override\n public void feedingHerb() {\n\n }", "@Override\r\n\tprotected void configure() {\...
[ "0.630483", "0.61779886", "0.61464524", "0.58950263", "0.5842769", "0.58413726", "0.5833862", "0.58328205", "0.58197075", "0.5793469", "0.5793469", "0.5793469", "0.5793469", "0.5793469", "0.5793469", "0.57694525", "0.57656056", "0.5700857", "0.5629193", "0.56283474", "0.55845...
0.0
-1
/ File format: ... Slot format: (0 if empty) (0 if empty)
public static void SaveGame(ChessGame Game, String FileName) throws FileNotFoundException { if (!Game.GetRunning()) { throw new FileNotFoundException("Game is not running!"); } File file = new File("./Saves/" + FileName + ".myrsav"); PrintWriter Writer; try { Writer = new PrintWriter(file); } c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getWriteFormatCount();", "public int getReadFormatCount();", "public abstract String getFileFormatName();", "public String fileFormat() {\n DateTimeFormatter df = DateTimeFormatter.ofPattern(\"dd MMM yyyy HHmm\");\n return \"D | \" + (super.isDone ? \"1 | \" : \"0 | \") + this.descri...
[ "0.60617906", "0.58315265", "0.567876", "0.55803186", "0.55801", "0.555739", "0.5545259", "0.5527254", "0.5514505", "0.55124456", "0.5436318", "0.54305553", "0.54274005", "0.5323175", "0.53107214", "0.5307115", "0.52861553", "0.528056", "0.5236451", "0.522849", "0.52115977", ...
0.0
-1
Creates new form revisionTecMer
public ZafRecHum38(Librerias.ZafParSis.ZafParSis obj) { try{ this.objZafParSis = (Librerias.ZafParSis.ZafParSis) obj.clone(); initComponents(); objUti = new ZafUtil(); objTooBar = new mitoolbar(this); this.getContentPane().add(objTooBar,"South"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void newRevision(Object revisionEntity) {\n }", "@Override\r\n protected void createDbContentCreateEdit() {\n DbContentCreateEdit dbContentCreateEdit = new DbContentCreateEdit();\r\n dbContentCreateEdit.init(null);\r\n form.getModel...
[ "0.6351119", "0.6130921", "0.5753261", "0.5655765", "0.55065143", "0.5479765", "0.5447062", "0.5445829", "0.5402487", "0.53907126", "0.5363941", "0.53611064", "0.5331717", "0.5323292", "0.52396", "0.5234202", "0.5224987", "0.519005", "0.51568", "0.5152163", "0.51396215", "0...
0.0
-1
estado de conciliacion bancaria de la cuenta
public void beforeEdit(Librerias.ZafTblUti.ZafTblEvt.ZafTableEvent evt) { // strEstCncDia=tblDat.getValueAt(tblDat.getSelectedRow(), INT_TBL_DAT_EST_CON)==null?"":tblDat.getValueAt(tblDat.getSelectedRow(), INT_TBL_DAT_EST_CON).toString(); // if(strEstCncDia.equals("S")){ // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean statusCerradura(){\n return cerradura.estado();\r\n }", "public boolean getEstadoConexion() { return this.dat.getEstadoConexion(); }", "public boolean getEstadoConexion() { return this.dat.getEstadoConexion(); }", "public void comecar() { setEstado(estado.comecar()); }", "public St...
[ "0.6819329", "0.65052485", "0.65052485", "0.644899", "0.63988113", "0.62802875", "0.6266228", "0.62385166", "0.623389", "0.61996233", "0.6187417", "0.61769354", "0.6119791", "0.6101959", "0.61013055", "0.6090047", "0.6082399", "0.60787684", "0.60760343", "0.6057959", "0.60509...
0.0
-1
End of variables declaration//GENEND:variables
private void MensajeInf(String strMensaje){ javax.swing.JOptionPane obj =new javax.swing.JOptionPane(); String strTit; strTit="Mensaje del sistema Zafiro"; obj.showMessageDialog(this,strMensaje,strTit,javax.swing.JOptionPane.INFORMATION_MESSAGE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "public void mo217...
[ "0.63602626", "0.62828803", "0.6186947", "0.6094495", "0.60943186", "0.6073909", "0.60544854", "0.6054047", "0.6004724", "0.59895945", "0.5972915", "0.597031", "0.59686697", "0.59677297", "0.59639865", "0.59434086", "0.59111506", "0.58980423", "0.58935064", "0.5884933", "0.58...
0.0
-1
/ Esto Hace en caso de que el modo de operacion sea Consulta return _consultar(FilSql());
public boolean consultar() { consultarReg(); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CalMetasDTO cargarRegistro(int codigoCiclo, int codigoPlan, int codigoMeta) {\n/* */ try {\n/* 416 */ String s = \"select m.*,\";\n/* 417 */ s = s + \"tm.descripcion as nombreTipoMedicion,\";\n/* 418 */ s = s + \"est.descripcion as nombreEstado,\";\n/* 419 */ s = s + \"Um.Des...
[ "0.65232825", "0.6481565", "0.64497924", "0.6423019", "0.635524", "0.6350972", "0.6239666", "0.6239274", "0.61728376", "0.61541325", "0.61374164", "0.6136583", "0.6125874", "0.61082673", "0.60444266", "0.6036414", "0.6019127", "0.60111636", "0.59987915", "0.5987805", "0.59866...
0.0
-1
Called when a view has been clicked.
@Override public void onClick(View v) { switch (v.getId()){ case R.id.tv_clear: tv_sum.setText(""); break; case R.id.tv_subtract: break; case R.id.tv_proceeds: Bundle bundle=new Bundle(); bu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onClick(View pView)\n\t{\n\t}", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }",...
[ "0.7561606", "0.74694735", "0.74694735", "0.74694735", "0.74694735", "0.74694735", "0.74694735", "0.74694735", "0.74244165", "0.739669", "0.7391502", "0.7374028", "0.7374028", "0.7374028", "0.7374028", "0.735448", "0.73523974", "0.73280215", "0.7281267", "0.7275264", "0.72677...
0.0
-1
TODO omitDefaultActionUrl is a parameter very useful when we are in a Portlet environnment it's used in buildEventOptions function but the current Ajax4jsf library we used doesn't have the same function declaration. See RichFaces branch AjaxRendererUtils class to see what I mean
public static StringBuffer buildDefaultOptions(UIComponent uiComponent, FacesContext facesContext) { boolean omitDefaultActionUrl = false; List<Object> parameters = new ArrayList<Object>(); parameters.add(org.ajax4jsf.framework.renderer.AjaxRendererUtils.buildEventOpt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic Map<String, Action> getAjaxActons() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic ActionResult defaultMethod(PortalForm form, HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic String getActionURL(String oid, String view, String...
[ "0.6022535", "0.5676094", "0.536332", "0.53562057", "0.5343334", "0.531749", "0.52655494", "0.5222715", "0.5204901", "0.5195421", "0.51894915", "0.51859665", "0.5183291", "0.51805794", "0.5166474", "0.5115205", "0.5014547", "0.50059325", "0.4998377", "0.49800995", "0.4965801"...
0.6537369
0
Created by root on 14.11.15.
public interface Cheese { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private static void cajas() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", ...
[ "0.5813549", "0.5771357", "0.56741685", "0.56193954", "0.5592839", "0.5569172", "0.55214274", "0.5487586", "0.5487586", "0.5487586", "0.5487586", "0.5487586", "0.54694164", "0.546394", "0.5430175", "0.5426063", "0.54243046", "0.5407549", "0.53954136", "0.5392152", "0.5392152"...
0.0
-1
store a mock file to the content store, before fetching it
@Test public void verifyFetchCustom() throws Exception { fileResourceContentStore.saveFileResourceContent( FileResourceUtils.build( StaticContentController.LOGO_BANNER, mockMultipartFile, FileResourceDomain.DOCUMENT ), "image".getBytes() ); systemSettingManager.saveSystemSet...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testFetch_GiveCacheFileContent() throws FileNotFoundException {\n\n\t\tFIFOFileCache fifoFileCache = FIFOFileCache.getInstance();\n\t\tfifoFileCache.fetch(\"a.txt\");\n\t\tfifoFileCache.fetch(\"b.txt\");\n\t\tfifoFileCache.fetch(\"c.txt\");\n\t\tfifoFileCache.fetch(\"d.txt\");\n\t\tString expe...
[ "0.6052862", "0.60037565", "0.5970092", "0.58954465", "0.58712995", "0.5844121", "0.5801706", "0.57911175", "0.5781969", "0.5781134", "0.56489027", "0.56257594", "0.55884624", "0.558731", "0.5534504", "0.5519328", "0.551198", "0.55027133", "0.5472682", "0.54469657", "0.544207...
0.5339275
28
Subtrai a data no formato AAAAMM Exemplo 200508 retorna 200507
public static int subtrairData(int data) { String dataFormatacao = "" + data; int ano = new Integer(dataFormatacao.substring(0, 4)).intValue(); int mes = new Integer(dataFormatacao.substring(4, 6)).intValue(); int mesTemp = (mes - 1); if (mesTemp == 0) { mesTemp = 12; ano = ano - 1; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getCADENA_TRAMA();", "public static String formatarDataComTracoAAAAMMDD(Date data) {\r\n\t\tString retorno = \"\";\r\n\t\tif (data != null) { // 1\r\n\t\t\tCalendar dataCalendar = new GregorianCalendar();\r\n\t\t\tStringBuffer dataBD = new StringBuffer();\r\n\r\n\t\t\tdataCalendar.setTime(data);\r\n\r\n\t...
[ "0.56642383", "0.5617368", "0.5603649", "0.5471282", "0.5450101", "0.54375255", "0.5433016", "0.54063123", "0.539082", "0.52511686", "0.52409524", "0.5185076", "0.5172982", "0.5163956", "0.51380694", "0.5126034", "0.50951195", "0.5076705", "0.50754184", "0.506061", "0.5054121...
0.5157949
14
Subtrai a data no formato AAAAMM Exemplo 200508 retorna 200507
public static int subtrairMesDoAnoMes(int anoMes, int qtdMeses) { String dataFormatacao = "" + anoMes; int ano = new Integer(dataFormatacao.substring(0, 4)).intValue(); int mes = new Integer(dataFormatacao.substring(4, 6)).intValue(); int qtdAnosDiminuir = qtdMeses / 12; int qtdMesesDiminuir = qtdM...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getCADENA_TRAMA();", "public static String formatarDataComTracoAAAAMMDD(Date data) {\r\n\t\tString retorno = \"\";\r\n\t\tif (data != null) { // 1\r\n\t\t\tCalendar dataCalendar = new GregorianCalendar();\r\n\t\t\tStringBuffer dataBD = new StringBuffer();\r\n\r\n\t\t\tdataCalendar.setTime(data);\r\n\r\n\t...
[ "0.5666372", "0.56192666", "0.56048393", "0.54736835", "0.54503155", "0.5438781", "0.543428", "0.54065883", "0.5392703", "0.52529967", "0.52419394", "0.5187331", "0.51752347", "0.51650524", "0.5157697", "0.51397604", "0.5125854", "0.5094601", "0.507778", "0.5077256", "0.50622...
0.0
-1
Converte a data passada em string
public static String formatarData(Date data) { String retorno = ""; if (data != null) { // 1 Calendar dataCalendar = new GregorianCalendar(); StringBuffer dataBD = new StringBuffer(); dataCalendar.setTime(data); if (dataCalendar.get(Calendar.DAY_OF_MONTH) > 9) { dataBD.append(dataCalendar...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDataString() {\r\n return formatoData.format(data);\r\n }", "public String getString_data() { \n char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,60)];\n int i;\n for (i = 0; i < carr.length; i++) {\n if ((char)g...
[ "0.6492394", "0.6207565", "0.61456317", "0.60917753", "0.6010815", "0.6004635", "0.5964517", "0.5907147", "0.5906527", "0.5818563", "0.5801986", "0.578474", "0.57821864", "0.57743293", "0.57276624", "0.5722522", "0.57211643", "0.5713333", "0.5675354", "0.56672674", "0.5635519...
0.0
-1
Converte a data passada em string retorna AAAAMMDD
public static String formatarDataSemBarra(Date data) { String retorno = ""; if (data != null) { // 1 Calendar dataCalendar = new GregorianCalendar(); StringBuffer dataBD = new StringBuffer(); dataCalendar.setTime(data); dataBD.append(dataCalendar.get(Calendar.YEAR)); if ((dataCalendar.ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo5872a(String str, Data data);", "public static String formatarData(String data) {\r\n\t\tString retorno = \"\";\r\n\r\n\t\tif (data != null && !data.equals(\"\") && data.trim().length() == 8) {\r\n\r\n\t\t\tretorno = data.substring(6, 8) + \"/\" + data.substring(4, 6) + \"/\" + data.substring(0, 4);\r\n\r...
[ "0.6593871", "0.64254594", "0.6283302", "0.6283302", "0.6243354", "0.61936253", "0.61371887", "0.61371887", "0.60226554", "0.59228575", "0.59056634", "0.5870554", "0.5844119", "0.58333534", "0.5791031", "0.5781586", "0.5746472", "0.57409036", "0.5706424", "0.56900513", "0.567...
0.0
-1
Converte a data passada em string retorna DDMMAAAA
public static String formatarDataSemBarraDDMMAAAA(Date data) { String retorno = ""; if (data != null) { // 1 Calendar dataCalendar = new GregorianCalendar(); StringBuffer dataBD = new StringBuffer(); dataCalendar.setTime(data); if (dataCalendar.get(Calendar.DAY_OF_MONTH) > 9) { dataBD.app...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo5872a(String str, Data data);", "public static String converterddmmaaaaParaaaammdd(String data) {\n String[] aux = data.trim().split(\"/\");\n String dia = aux[0].length() < 2 ? \"0\" + aux[0] : aux[0];\n String mes = aux[1].length() < 2 ? \"0\" + aux[1] : aux[1];\n return aux[...
[ "0.63771784", "0.628793", "0.628793", "0.60605097", "0.59458303", "0.59169525", "0.59169525", "0.5886305", "0.5849456", "0.5822536", "0.5738751", "0.5723075", "0.5719627", "0.56980705", "0.5679531", "0.5676715", "0.5650842", "0.5597263", "0.5583314", "0.55770916", "0.5557027"...
0.49985853
92
Converte a data passada em string retorna DDMMAAAA
public static String formatarDataComTracoAAAAMMDD(Date data) { String retorno = ""; if (data != null) { // 1 Calendar dataCalendar = new GregorianCalendar(); StringBuffer dataBD = new StringBuffer(); dataCalendar.setTime(data); dataBD.append(dataCalendar.get(Calendar.YEAR)); dataBD.append(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo5872a(String str, Data data);", "public static String converterddmmaaaaParaaaammdd(String data) {\n String[] aux = data.trim().split(\"/\");\n String dia = aux[0].length() < 2 ? \"0\" + aux[0] : aux[0];\n String mes = aux[1].length() < 2 ? \"0\" + aux[1] : aux[1];\n return aux[...
[ "0.63773084", "0.6288131", "0.6288131", "0.60600466", "0.59437644", "0.59158474", "0.59158474", "0.58850867", "0.58495486", "0.58214194", "0.5738917", "0.57216847", "0.56963676", "0.5679467", "0.5676883", "0.56505287", "0.55958754", "0.55832213", "0.55748063", "0.55553234", "...
0.5719515
12
Converte a data passada em string retorna DDMMAAAA
public static String formatarDataAAAAMMDD(Date data) { String retorno = ""; if (data != null) { // 1 Calendar dataCalendar = new GregorianCalendar(); StringBuffer dataBD = new StringBuffer(); dataCalendar.setTime(data); dataBD.append(dataCalendar.get(Calendar.YEAR)); if ((dataCalendar.ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo5872a(String str, Data data);", "public static String converterddmmaaaaParaaaammdd(String data) {\n String[] aux = data.trim().split(\"/\");\n String dia = aux[0].length() < 2 ? \"0\" + aux[0] : aux[0];\n String mes = aux[1].length() < 2 ? \"0\" + aux[1] : aux[1];\n return aux[...
[ "0.63764364", "0.6286057", "0.6286057", "0.60583985", "0.59471905", "0.59181404", "0.59181404", "0.588632", "0.5850812", "0.582324", "0.5726316", "0.5719068", "0.56979626", "0.5679373", "0.5677556", "0.56521714", "0.559831", "0.5584367", "0.55779374", "0.55570936", "0.5520273...
0.57376635
10
Monta um data inicial com hora,minuto e segundo zerados para pesquisa no banco
public static Date formatarDataInicial(Date dataInicial) { Calendar calendario = GregorianCalendar.getInstance(); calendario.setTime(dataInicial); calendario.set(Calendar.HOUR_OF_DAY, 0); calendario.set(Calendar.MINUTE, 0); calendario.set(Calendar.SECOND, 0); return calendario.getTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void introducirPagosALojamientoHotelFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo){\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.s...
[ "0.6578695", "0.65665203", "0.65300965", "0.6436202", "0.6395944", "0.63568896", "0.6345826", "0.6169534", "0.6102602", "0.59676874", "0.59547657", "0.59402376", "0.59288204", "0.58984107", "0.58845395", "0.5853075", "0.5845239", "0.58145493", "0.5807629", "0.5807071", "0.577...
0.0
-1
Monta um data inicial com hora,minuto e segundo zerados para pesquisa no banco
public static Date formatarDataFinal(Date dataFinal) { Calendar calendario = Calendar.getInstance(); calendario.setTime(dataFinal); calendario.set(Calendar.HOUR_OF_DAY, 23); calendario.set(Calendar.MINUTE, 59); calendario.set(Calendar.SECOND, 59); return calendario.getTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void introducirPagosALojamientoHotelFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo){\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.s...
[ "0.65796304", "0.6567512", "0.6531469", "0.6436833", "0.6397229", "0.6357454", "0.63457197", "0.6169481", "0.6102167", "0.59678566", "0.59553254", "0.59394836", "0.5929345", "0.58996314", "0.58848053", "0.5852679", "0.5846294", "0.5814713", "0.58074594", "0.5807429", "0.57713...
0.0
-1
Converte a data passada para o formato "DD/MM/YYYY"
public static String formatarData(String data) { String retorno = ""; if (data != null && !data.equals("") && data.trim().length() == 8) { retorno = data.substring(6, 8) + "/" + data.substring(4, 6) + "/" + data.substring(0, 4); } return retorno; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String formatarData(Date data) {\r\n\t\tString retorno = \"\";\r\n\t\tif (data != null) { // 1\r\n\t\t\tCalendar dataCalendar = new GregorianCalendar();\r\n\t\t\tStringBuffer dataBD = new StringBuffer();\r\n\r\n\t\t\tdataCalendar.setTime(data);\r\n\r\n\t\t\tif (dataCalendar.get(Calendar.DAY_OF_MONTH)...
[ "0.6854495", "0.6817281", "0.6793001", "0.67376435", "0.6691948", "0.664835", "0.6646422", "0.66376793", "0.654449", "0.65268135", "0.64892197", "0.6445659", "0.6392493", "0.63671386", "0.63590276", "0.6349663", "0.6332717", "0.6277924", "0.6229729", "0.6200526", "0.6182912",...
0.5657085
45
Converte a data passada para o formato "DD/MM/YYYY"
public static String converterDataSemBarraParaDataComBarra(String data) { String retorno = ""; if (data != null && !data.equals("") && data.trim().length() == 8) { retorno = data.substring(0, 2) + "/" + data.substring(2, 4) + "/" + data.substring(4, 8); } return retorno; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String formatarData(Date data) {\r\n\t\tString retorno = \"\";\r\n\t\tif (data != null) { // 1\r\n\t\t\tCalendar dataCalendar = new GregorianCalendar();\r\n\t\t\tStringBuffer dataBD = new StringBuffer();\r\n\r\n\t\t\tdataCalendar.setTime(data);\r\n\r\n\t\t\tif (dataCalendar.get(Calendar.DAY_OF_MONTH)...
[ "0.68533653", "0.68177164", "0.67937165", "0.6736387", "0.6692191", "0.6647075", "0.66450644", "0.6639052", "0.6545675", "0.6527255", "0.64911854", "0.6447495", "0.6392455", "0.6367739", "0.63600105", "0.63495415", "0.6331369", "0.62786263", "0.6230152", "0.6200547", "0.61813...
0.0
-1
Compara dois objetos no formato anoMesReferencia de acordo com o sinal logico passado.
public static boolean compararAnoMesReferencia(Integer anoMesReferencia1, Integer anoMesReferencia2, String sinal) { boolean retorno = true; // Separando os valores de mês e ano para realizar a comparação String mesReferencia1 = String.valueOf(anoMesReferencia1.intValue()).substring(4, 6); String anoRefer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean compararAnoMesReferencia(String anoMesReferencia1, String anoMesReferencia2, String sinal) {\r\n\t\tboolean retorno = true;\r\n\r\n\t\t// Separando os valores de mês e ano para realizar a comparação\r\n\t\tString mesReferencia1 = String.valueOf(anoMesReferencia1).substring(4, 6);\r\n\t\tStrin...
[ "0.7091149", "0.61047477", "0.54451805", "0.542602", "0.54226327", "0.5352793", "0.5343877", "0.5341359", "0.52775145", "0.52313715", "0.519092", "0.51696426", "0.5160727", "0.5159831", "0.5133825", "0.51238334", "0.511348", "0.51054424", "0.5091849", "0.50883883", "0.5086397...
0.7080521
1
Compara dois objetos no formato anoMesReferencia de acordo com o sinal logico passado.
public static boolean compararAnoMesReferencia(String anoMesReferencia1, String anoMesReferencia2, String sinal) { boolean retorno = true; // Separando os valores de mês e ano para realizar a comparação String mesReferencia1 = String.valueOf(anoMesReferencia1).substring(4, 6); String anoReferencia1 = Stri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean compararAnoMesReferencia(Integer anoMesReferencia1, Integer anoMesReferencia2, String sinal) {\r\n\t\tboolean retorno = true;\r\n\r\n\t\t// Separando os valores de mês e ano para realizar a comparação\r\n\t\tString mesReferencia1 = String.valueOf(anoMesReferencia1.intValue()).substring(4, 6);...
[ "0.7081158", "0.6104309", "0.54426515", "0.54280454", "0.5423207", "0.5351462", "0.53454304", "0.5341388", "0.52785987", "0.5232746", "0.5191997", "0.5166984", "0.51600885", "0.5158919", "0.5135662", "0.5125524", "0.51134926", "0.5105654", "0.50934684", "0.5090635", "0.508805...
0.7091652
0
Compara dois objetos no formato HH:MM de acordo com o sinal logico passado.
public static boolean compararHoraMinuto(String horaMinuto1, String horaMinuto2, String sinal) { boolean retorno = true; // Separando os valores de hora e minuto para realizar a comparação String hora1 = horaMinuto1.substring(0, 2); String minuto1 = horaMinuto1.substring(3, 5); String hora2 = horaM...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void CompararTiempo(String HoraInicio, String HoraFin){\n String[] TiempoInicial = HoraInicio.split(\":\");\n int horaI = Integer.valueOf(TiempoInicial[0]);\n int minuteI = Integer.valueOf(TiempoInicial[1]);\n\n String[] TiempoFinal = HoraFin.split(\":\");\n int horaF = I...
[ "0.6954963", "0.6325497", "0.6200974", "0.6118351", "0.5689943", "0.55654293", "0.55533576", "0.5495154", "0.5464385", "0.5438692", "0.5382784", "0.53681475", "0.53586704", "0.53586704", "0.53303134", "0.5320557", "0.5319286", "0.52443296", "0.52192885", "0.52093595", "0.5154...
0.56190014
5
Verifica se eh dia util (Verifica por feriado nacional,municipal e se final de semana) Auhtor: Rafael Pinto Data: 23/08/2007
@SuppressWarnings("rawtypes") public static boolean ehDiaUtil(Date dataAnalisada, Collection<NacionalFeriado> colecaoNacionalFeriado, Collection<MunicipioFeriado> colecaoMunicipioFeriado) { boolean ehDiaUtil = true; Calendar calendar = new GregorianCalendar(); calendar.setTime(dataAnalisada); int di...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean fechaVigente(String fechafinal, String horafinal)\r\n\t{\r\n\t\tboolean vigente = true;\r\n\t\tGregorianCalendar calendario = new GregorianCalendar();\r\n\t\tint añoactual = calendario.get(Calendar.YEAR);\r\n\t\tint mesactual = (calendario.get(Calendar.MONTH)+1);\r\n\t\tint diaactual = calendario.ge...
[ "0.65655845", "0.6368316", "0.63430446", "0.6258147", "0.62424237", "0.6200302", "0.61664414", "0.6073511", "0.60496724", "0.6031771", "0.5999928", "0.5933556", "0.588587", "0.58780617", "0.58690417", "0.58216524", "0.5817455", "0.5793195", "0.576816", "0.57668436", "0.570976...
0.6895158
0
Complementa a string passada com asteriscos a esquerda
public static String completaStringComAsteriscos(String str, int tamanhoMaximo) { // Tamanho da string informada int tamanhoString = 0; if (str != null) { tamanhoString = str.length(); } else { tamanhoString = 0; } // Calcula a quantidade de asteriscos necessários int quantidadeAsterisc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String negation(String s) {\r\n \tif(s.charAt(0) == '~') s = s.substring(1);\r\n\t\telse s = \"~\"+ s;\r\n \treturn s;\r\n }", "public static ArthurString minus(ArthurString one, ArthurString two) {\n return new ArthurString(one.str.replace(two.str, \"\"));\n }", "private static Stri...
[ "0.65322983", "0.6044682", "0.5887391", "0.5821475", "0.56062454", "0.5586544", "0.55759966", "0.5560572", "0.55436766", "0.5543137", "0.5517561", "0.5507526", "0.5500589", "0.549783", "0.548954", "0.5455932", "0.5402828", "0.5399722", "0.53994274", "0.5392797", "0.53840595",...
0.0
-1
Subtrair ano ao anoMesReferencia subitrairAnoAnoMesReferencia
public static Integer subtrairAnoAnoMesReferencia(Integer anoMesReferencia, int qtdAnos) { int mes = obterMes(anoMesReferencia.intValue()); int ano = obterAno(anoMesReferencia.intValue()); String anoMes = ""; ano = ano - qtdAnos; if (mes < 10) { anoMes = "" + ano + "0" + mes; } else { anoMes...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removerPorReferencia(int referencia){\n if (buscar(referencia)) {\n // Consulta si el nodo a eliminar es el pirmero\n if (inicio.getEmpleado().getId() == referencia) {\n // El primer nodo apunta al siguiente.\n inicio = inicio.getSiguiente();\n...
[ "0.6525081", "0.64515716", "0.6359064", "0.612474", "0.6121437", "0.60571456", "0.59436804", "0.59357107", "0.5906672", "0.59052163", "0.59021294", "0.589299", "0.585985", "0.57325613", "0.5704639", "0.56990695", "0.5661133", "0.5606265", "0.5558632", "0.54838187", "0.5479134...
0.6213213
3
Calcular Percentual a funcao recebe dois valores, pega o primeiro valor(valor1) multiplica por 100 e divide pelo segundo valor(valor2)
public static String calcularPercentual(String valor1, String valor2) { BigDecimal bigValor1 = new BigDecimal(valor1); BigDecimal bigValor2 = new BigDecimal(valor2 != null ? valor2 : "1"); BigDecimal numeroCem = new BigDecimal("100"); BigDecimal primeiroNumero = bigValor1.multiply(numeroCem); Big...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double percent(double firstNumber, double secondNumber) {\n\t\tdouble result = firstNumber*(secondNumber/100);\n\t\treturn result;\n\t}", "public static BigDecimal calcularPercentualBigDecimal(BigDecimal bigValor1, BigDecimal bigValor2) {\r\n\r\n\t\tBigDecimal resultado = new BigDecimal(\"0.0\");\r\n\r\n\...
[ "0.6993547", "0.6943287", "0.6927301", "0.6692882", "0.6599301", "0.6545149", "0.64814365", "0.6437924", "0.6413798", "0.63392055", "0.63320297", "0.6309827", "0.62593025", "0.6223118", "0.6218661", "0.6200694", "0.6174941", "0.61699104", "0.61499286", "0.61327666", "0.611718...
0.82584965
0
Calcular Percentual a funcao recebe dois valores, pega o primeiro valor(valor1) multiplica por 100 e divide pelo segundo valor(valor2)
public static BigDecimal calcularPercentualBigDecimal(String valor1, String valor2) { BigDecimal bigValor1 = new BigDecimal(valor1); BigDecimal bigValor2 = new BigDecimal(valor2 != null ? valor2 : "1"); return calcularPercentualBigDecimal(bigValor1, bigValor2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String calcularPercentual(String valor1, String valor2) {\r\n\r\n\t\tBigDecimal bigValor1 = new BigDecimal(valor1);\r\n\t\tBigDecimal bigValor2 = new BigDecimal(valor2 != null ? valor2 : \"1\");\r\n\r\n\t\tBigDecimal numeroCem = new BigDecimal(\"100\");\r\n\r\n\t\tBigDecimal primeiroNumero = bigValor...
[ "0.82583576", "0.69925416", "0.69428533", "0.66922355", "0.65974844", "0.65454286", "0.647957", "0.6436367", "0.6413267", "0.63376886", "0.6331572", "0.63085383", "0.625772", "0.62211955", "0.6216767", "0.6200117", "0.617429", "0.6170283", "0.6149457", "0.6133728", "0.6115808...
0.69276184
3
Calcular Percentual a funcao recebe dois valores, pega o primeiro valor(valor1) multiplica por 100 e divide pelo segundo valor(valor2)
public static BigDecimal calcularPercentualBigDecimal(BigDecimal bigValor1, BigDecimal bigValor2) { BigDecimal resultado = new BigDecimal("0.0"); if (bigValor2.compareTo(new BigDecimal("0.0")) != 0) { BigDecimal numeroCem = new BigDecimal("100"); BigDecimal primeiroNumero = bigValor1.multiply(nume...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String calcularPercentual(String valor1, String valor2) {\r\n\r\n\t\tBigDecimal bigValor1 = new BigDecimal(valor1);\r\n\t\tBigDecimal bigValor2 = new BigDecimal(valor2 != null ? valor2 : \"1\");\r\n\r\n\t\tBigDecimal numeroCem = new BigDecimal(\"100\");\r\n\r\n\t\tBigDecimal primeiroNumero = bigValor...
[ "0.82575774", "0.6991314", "0.6926363", "0.6691163", "0.65979844", "0.6544814", "0.64800525", "0.64359903", "0.6411789", "0.6336947", "0.63312274", "0.6308069", "0.62571126", "0.622041", "0.6216145", "0.620044", "0.61746186", "0.617035", "0.6148911", "0.6133718", "0.6116195",...
0.69421554
2
Retorna uma hora no formato HH:MM a partir de um objeto Date
public static String formatarHoraSemSegundos(Date data) { StringBuffer dataBD = new StringBuffer(); if (data != null) { Calendar dataCalendar = new GregorianCalendar(); dataCalendar.setTime(data); if (dataCalendar.get(Calendar.HOUR_OF_DAY) > 9) { dataBD.append(dataCalendar.get(Calendar.HOUR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String retornaHora(){\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tSimpleDateFormat hora = new SimpleDateFormat(\"HH\");\n\t\tSimpleDateFormat minuto = new SimpleDateFormat(\"mm\");\n\t\tDate date = new Date();\n\t\tcalendar.setTime(date);\n\t\treturn hora.format(calendar.getTime()) + \"h\" + minu...
[ "0.7385877", "0.6807696", "0.6764697", "0.67634064", "0.65403324", "0.6336451", "0.61807084", "0.61328477", "0.60658747", "0.6058926", "0.5997155", "0.59806955", "0.5927361", "0.5870158", "0.5842725", "0.58357334", "0.5814527", "0.5797581", "0.57852405", "0.5776829", "0.57306...
0.47456884
97
Recupera quantidade de horas entre duas datas
public static int obterQtdeHorasEntreDatas(Date dataInicial, Date dataFinal) { Calendar start = Calendar.getInstance(); start.setTime(dataInicial); // Date startTime = start.getTime(); if (!dataInicial.before(dataFinal)) return 0; for (int i = 1;; ++i) { start.add(Calendar.HOUR, 1); if (start...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void hora()\n {\n horaTotal = HoraSalida - HoraLlegada;\n\n }", "@Override\n\tpublic int horas_trabajo() {\n\t\treturn 1000;\n\t}", "public String getNbHeures() {\n long duree=0;\n if (listePlages!=null) {\n for(Iterator<PlageHoraire> iter=listePlages.iterator(); it...
[ "0.660011", "0.6338249", "0.62449646", "0.61460924", "0.609613", "0.6051594", "0.6049681", "0.5988358", "0.5872953", "0.5850954", "0.5833811", "0.575546", "0.5741975", "0.5740746", "0.5622597", "0.560102", "0.55952287", "0.55712897", "0.55610764", "0.5551493", "0.5549926", ...
0.63075227
2
Compara duas datas sem verificar a hora.
public static int compararData(Date data1, Date data2) { Calendar calendar1; Calendar calendar2; int ano1; int ano2; int mes1; int mes2; int dia1; int dia2; int resultado; calendar1 = Calendar.getInstance(); calendar1.setTime(data1); ano1 = calendar1.get(Calendar.YEAR); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void CompararTiempo(String HoraInicio, String HoraFin){\n String[] TiempoInicial = HoraInicio.split(\":\");\n int horaI = Integer.valueOf(TiempoInicial[0]);\n int minuteI = Integer.valueOf(TiempoInicial[1]);\n\n String[] TiempoFinal = HoraFin.split(\":\");\n int horaF = I...
[ "0.6999113", "0.66064864", "0.61957186", "0.5903292", "0.58856755", "0.58506423", "0.5775062", "0.5775062", "0.56677157", "0.56403536", "0.5577452", "0.55752325", "0.55477035", "0.55089134", "0.54788834", "0.5475428", "0.5460492", "0.5426568", "0.5419656", "0.5412248", "0.540...
0.6433235
2
Compara duas datas verificando hora, minuto, segundo e milisegundo.
public static int compararDataTime(Date data1, Date data2) { long dataTime1 = data1.getTime(); long dataTime2 = data2.getTime(); int result; if (dataTime1 == dataTime2) { result = 0; } else if (dataTime1 < dataTime2) { result = -1; } else { result = 1; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void CompararTiempo(String HoraInicio, String HoraFin){\n String[] TiempoInicial = HoraInicio.split(\":\");\n int horaI = Integer.valueOf(TiempoInicial[0]);\n int minuteI = Integer.valueOf(TiempoInicial[1]);\n\n String[] TiempoFinal = HoraFin.split(\":\");\n int horaF = I...
[ "0.7435886", "0.66937816", "0.63894224", "0.63369966", "0.6142942", "0.5897681", "0.5829946", "0.58025634", "0.58018357", "0.57351494", "0.5732441", "0.56492114", "0.56492114", "0.5609778", "0.55768657", "0.5560694", "0.5560273", "0.5556347", "0.5486986", "0.5459365", "0.5426...
0.6668477
2
retorna sequencial formatado(Ex.: 000.001)
public static String retornaSequencialFormatado(int sequencial) { // sequencial impressão String retorno = Util.adicionarZerosEsquedaNumero(6, "" + sequencial); retorno = retorno.substring(0, 3) + "." + retorno.substring(3, 6); return retorno; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String formatPRECIO(String var1)\r\n\t{\r\n\t\tString temp = var1.replace(\".\", \"\");\r\n\t\t\r\n\t\treturn( String.format(\"%09d\", Integer.parseInt(temp)) );\r\n\t}", "private String format(String s){\n\t\tint len = s.length();\n\t\tfor (int i = 0; i < 6 - len; i++){\n\t\t\ts = \"0\" + s;\n\t\...
[ "0.69391286", "0.63256115", "0.62729675", "0.6257294", "0.61798996", "0.60531306", "0.6044792", "0.59894145", "0.5984553", "0.5956141", "0.59400946", "0.59378564", "0.59282213", "0.59193254", "0.5914158", "0.590937", "0.58863413", "0.58723855", "0.58703345", "0.58662486", "0....
0.66916776
1
Retorna a data por extenso
public static String retornaDataPorExtenso(Date data) { int dia = getDiaMes(data); int mes = getMes(data); int ano = getAno(data); String dataExtenso = dia + " de " + retornaDescricaoMes(mes) + " de " + ano; return dataExtenso; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getDataNascimento();", "Object getData();", "Object getData();", "public Object getData();", "public Data getData(HelperDataType type);", "public abstract Object getCustomData();", "java.lang.String getData();", "Collection getData();", "String getData();", "Object getRawData();", "int g...
[ "0.67480135", "0.66730356", "0.66730356", "0.66175485", "0.6540137", "0.6521371", "0.6396794", "0.6353369", "0.63092667", "0.62723356", "0.62605613", "0.6252608", "0.6210459", "0.61923957", "0.6183172", "0.61493576", "0.6060705", "0.6060411", "0.60432273", "0.6015298", "0.597...
0.6324711
8
Retorna uma hora no formato HH:MM a partir de um objeto Date
public static String formatarHoraSemSegundos(String horaMinuto) { String retorno = null; if (horaMinuto != null && !horaMinuto.equalsIgnoreCase("")) { String[] vetorHora = horaMinuto.split(":"); if (vetorHora[0].trim().length() < 2) { retorno = "0" + vetorHora[0] + ":"; } else { reto...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String retornaHora(){\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tSimpleDateFormat hora = new SimpleDateFormat(\"HH\");\n\t\tSimpleDateFormat minuto = new SimpleDateFormat(\"mm\");\n\t\tDate date = new Date();\n\t\tcalendar.setTime(date);\n\t\treturn hora.format(calendar.getTime()) + \"h\" + minu...
[ "0.73846066", "0.68080896", "0.67642355", "0.67605543", "0.65401185", "0.6336215", "0.61787707", "0.6131066", "0.6063993", "0.6057036", "0.5997338", "0.5978703", "0.5926404", "0.58675086", "0.5840426", "0.58353114", "0.5812884", "0.57957375", "0.57845664", "0.57761604", "0.57...
0.0
-1
Author: Raphael Rossiter Data: 12/04/2007
@SuppressWarnings({ "unchecked", "rawtypes" }) public static Collection<Categoria> montarColecaoCategoria(Collection colecaoSubcategorias) { Collection<Categoria> colecaoRetorno = null; if (colecaoSubcategorias != null && !colecaoSubcategorias.isEmpty()) { colecaoRetorno = new ArrayList(); Itera...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void interface1(){\n noStroke();\n fill(10,100);//light gray\n rect(0,60,600,590);\n fill(220);//gray\n noStroke();\n beginShape();\n vertex(365,40);\n vertex(600,40);\n vertex(600,80);\n vertex(365,80);\n vertex(345,60);\n endShape(CLOSE);\n fill(19,70,100,100);//dark...
[ "0.58199126", "0.5615652", "0.5538152", "0.5521548", "0.55165124", "0.54865783", "0.5476106", "0.54320157", "0.54206645", "0.5406997", "0.54038376", "0.54038376", "0.5399239", "0.53923756", "0.53664", "0.53664", "0.5351292", "0.53488374", "0.53443575", "0.5337365", "0.5337365...
0.0
-1
Author: Rafael Pinto Formata o numero com (.) ponto Ex: Numero = 1000 Resultado = 1.000 Data: 22/11/2007
public static String agruparNumeroEmMilhares(Integer numero) { String retorno = "0"; if (numero != null) { NumberFormat formato = NumberFormat.getInstance(new Locale("pt", "BR")); retorno = formato.format(numero); } return retorno; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String detectaDoble(double numero){\n\t\treturn numero % 1.0 != 0 ? String.format(\"%s\", numero) : String.format(\"%.0f\", numero);\n\t}", "public Imprimir_ConvertirNumerosaLetras(String numero) throws NumberFormatException {\r\n\t\t// Validamos que sea un numero legal\r\n\t\tif (Integer.parseInt(numero)...
[ "0.67063934", "0.64236534", "0.64201623", "0.62947917", "0.6289486", "0.6269896", "0.6232504", "0.6190768", "0.6190768", "0.6190768", "0.6141716", "0.61121154", "0.6110564", "0.6060639", "0.6039579", "0.60211116", "0.5999642", "0.5964705", "0.59617364", "0.5951484", "0.591617...
0.5813976
28
Author: Raphael Rossiter Data: 23/08/2007
public static java.sql.Date getSQLDate(Date data) { java.sql.Date dt = new java.sql.Date(data.getTime()); return dt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void interface1(){\n noStroke();\n fill(10,100);//light gray\n rect(0,60,600,590);\n fill(220);//gray\n noStroke();\n beginShape();\n vertex(365,40);\n vertex(600,40);\n vertex(600,80);\n vertex(365,80);\n vertex(345,60);\n endShape(CLOSE);\n fill(19,70,100,100);//dark...
[ "0.5932944", "0.57046723", "0.56490856", "0.559769", "0.55841833", "0.5579794", "0.5559276", "0.55490065", "0.5532054", "0.54942894", "0.5490811", "0.5490811", "0.5487369", "0.54820305", "0.54793876", "0.5466656", "0.5466534", "0.5446126", "0.5446126", "0.5433069", "0.5410284...
0.0
-1
Author: Raphael Rossiter Data: 23/08/2007
public static Timestamp getSQLTimesTemp(Date data) { Timestamp dt = new Timestamp(data.getTime()); return dt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void interface1(){\n noStroke();\n fill(10,100);//light gray\n rect(0,60,600,590);\n fill(220);//gray\n noStroke();\n beginShape();\n vertex(365,40);\n vertex(600,40);\n vertex(600,80);\n vertex(365,80);\n vertex(345,60);\n endShape(CLOSE);\n fill(19,70,100,100);//dark...
[ "0.5931484", "0.5704739", "0.5649611", "0.5597709", "0.5584315", "0.55799073", "0.5558218", "0.55486023", "0.5532437", "0.5494265", "0.5491563", "0.5491563", "0.54860073", "0.54815155", "0.54800636", "0.546706", "0.5466561", "0.5446634", "0.5446634", "0.5431584", "0.5410953",...
0.0
-1
Retorna o valor de cnpjFormatado
public static String formatarCnpj(String cnpj) { String cnpjFormatado = cnpj; String zeros = ""; if (cnpjFormatado != null) { for (int a = 0; a < (14 - cnpjFormatado.length()); a++) { zeros = zeros.concat("0"); } // concatena os zeros ao numero // caso o numero seja diferente de nulo ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCnpj() {\n return cnpj;\n }", "String getValueFormat();", "public String getCnpjPossuidor() {\n return cnpjPossuidor;\n }", "public String getFormat() {\n/* 206 */ return getValue(\"format\");\n/* */ }", "Object getFormat();", "NumberFormat getFormat() {\n\t...
[ "0.67895305", "0.6564352", "0.63506836", "0.6326097", "0.6163049", "0.6158434", "0.60903263", "0.6044964", "0.6044964", "0.6044964", "0.60154754", "0.60019726", "0.59242773", "0.5921803", "0.58251715", "0.58251715", "0.58251715", "0.5808602", "0.57919884", "0.5785644", "0.577...
0.66375166
1
Retorna o valor de cnpjFormatado
public static String formatarCpf(String cpf) { String cpfFormatado = cpf; String zeros = ""; if (cpfFormatado != null) { for (int a = 0; a < (11 - cpfFormatado.length()); a++) { zeros = zeros.concat("0"); } // concatena os zeros ao numero // caso o numero seja diferente de nulo c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCnpj() {\n return cnpj;\n }", "public static String formatarCnpj(String cnpj) {\r\n\t\tString cnpjFormatado = cnpj;\r\n\t\tString zeros = \"\";\r\n\r\n\t\tif (cnpjFormatado != null) {\r\n\r\n\t\t\tfor (int a = 0; a < (14 - cnpjFormatado.length()); a++) {\r\n\t\t\t\tzeros = zeros.concat...
[ "0.67895305", "0.66375166", "0.6564352", "0.63506836", "0.6326097", "0.6163049", "0.6158434", "0.60903263", "0.6044964", "0.6044964", "0.6044964", "0.60154754", "0.60019726", "0.59242773", "0.5921803", "0.58251715", "0.58251715", "0.58251715", "0.5808602", "0.57919884", "0.57...
0.5392922
41
Author: Vinicius Medeiros Data: 11/02/2009 Formatar CEP
public static String formatarCEP(String codigo) { String retornoCEP = null; String parte1 = codigo.substring(0, 2); String parte2 = codigo.substring(2, 5); String parte3 = codigo.substring(5, 8); retornoCEP = parte1 + "." + parte2 + "-" + parte3; return retornoCEP; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void readCpteEpargne(CompteEpargne cpt) {\n\t\t\n\t}", "private void remplirFabricantData() {\n\t}", "@Override\n\tprotected void getDataFromUCF() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer(...
[ "0.58049834", "0.5624287", "0.5530189", "0.5410799", "0.538255", "0.5375088", "0.53010345", "0.5176754", "0.51664436", "0.515219", "0.5150413", "0.5140015", "0.5133501", "0.5127985", "0.5115655", "0.5106414", "0.5080535", "0.5070611", "0.5058529", "0.5058529", "0.50491774", ...
0.0
-1
Author: Vinicius Medeiros Data: 11/02/2009 Retirar formatacao CEP
public static String retirarFormatacaoCEP(String codigo) { String retornoCEP = null; String parte1 = codigo.substring(0, 2); String parte2 = codigo.substring(3, 6); String parte3 = codigo.substring(7, 10); retornoCEP = parte1 + parte2 + parte3; return retornoCEP; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void createCpteEpargne(CompteEpargne cpt) {\n\t\t\n\t}", "@Override\n public void onCEPSuccess(ViaCEP cep) {\n System.out.println();\n System.out.println(\"CEP \" + cep.getCep() + \" encontrado!\");\n System.out.println(\"Logradouro: \" + cep.getLogradouro());\n ...
[ "0.6122773", "0.61174256", "0.60716397", "0.5879925", "0.5766323", "0.56733024", "0.5659147", "0.5548551", "0.5546136", "0.5518164", "0.55047035", "0.54947615", "0.5486979", "0.5423705", "0.5417933", "0.53610843", "0.5345785", "0.5343825", "0.5335893", "0.5318086", "0.5312094...
0.55503595
7
Retorna uma string delimitando as casas decimais com ponto
public static String formatarBigDecimalComPonto(BigDecimal numero) { if (numero == null) { numero = new BigDecimal("0.00"); } NumberFormat formato = NumberFormat.getInstance(new Locale("pt", "BR")); formato.setMaximumFractionDigits(2); formato.setMinimumFractionDigits(2); formato.setGroupingUs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String retirarFormatacaoCEP(String codigo) {\r\n\r\n\t\tString retornoCEP = null;\r\n\r\n\t\tString parte1 = codigo.substring(0, 2);\r\n\t\tString parte2 = codigo.substring(3, 6);\r\n\t\tString parte3 = codigo.substring(7, 10);\r\n\r\n\t\tretornoCEP = parte1 + parte2 + parte3;\r\n\r\n\t\treturn retor...
[ "0.6075489", "0.6040396", "0.58692026", "0.57746667", "0.56803066", "0.56335896", "0.56327033", "0.5573141", "0.55605143", "0.5523838", "0.5522253", "0.54918104", "0.54879284", "0.54777676", "0.54763514", "0.5475947", "0.54635483", "0.545722", "0.5421005", "0.5420679", "0.538...
0.49127108
91
Calcula a quantidade de anos completos, existentes entre duas datas
public static int anosEntreDatas(Date dataInicial, Date dataFinal) { int idade = 0; while (compararData(dataInicial, dataFinal) == -1) { int sDiaInicial = getDiaMes(dataInicial); int sMesInicial = getMes(dataInicial); int sAnoInicial = getAno(dataInicial); int sDiaFinal = getDiaMes(dataFin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void somarQuantidade(Integer id_produto){\n\t for (ItensCompra it : itensCompra){\n\t\t //verifico se o item do meu arraylist é igual ao ID passado no Mapping\n\t\t if(it.getTable_Produtos().getId_produto().equals(id_produto)){\n\t //defino a quantidade atual(pego a quantidade atual e somo um)\n\t it....
[ "0.66335905", "0.6606041", "0.62838835", "0.62628525", "0.6240402", "0.6234524", "0.61707383", "0.61628765", "0.61627245", "0.61326534", "0.60813636", "0.607567", "0.60736674", "0.6067544", "0.6061368", "0.6061368", "0.6030123", "0.5973681", "0.5941082", "0.59036416", "0.5889...
0.0
-1
Retorna true se o combo multiplo(parametro campo) tem pelo menos tamanho 1 e que esse elemento seja diferente de branco,nulo e ConstantesSistema.NUMERO_NAO_INFORMADO.
public static boolean isCampoComboboxMultiploInformado(String[] campo) { if (isVazioOrNulo(campo)) { return false; } if (campo.length == 1 && !isCampoComboboxInformado(campo[0])) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean campiVuoti(){\n return nomeVarTextField.getText().equals(\"\") || tipoVarComboBox.getSelectedIndex() == -1;\n }", "private boolean verifica(){\n if(et_nomeAddFamiliar.getText().length()>3 && spinnerParentesco.getSelectedItemPosition()>0){\n return true;\n }\n ...
[ "0.6479267", "0.6207584", "0.6086954", "0.605187", "0.6017645", "0.59010404", "0.5826492", "0.57971406", "0.57473874", "0.5724452", "0.5717537", "0.56961083", "0.5678598", "0.56635636", "0.5599929", "0.5572977", "0.55635345", "0.55600315", "0.55583155", "0.5556062", "0.553002...
0.73375726
0
Passa um Timestamp e retorna a HH:mm:ss como String
public static String getHoraMinutoSegundoTimestamp(Timestamp timestamp) { Long time = timestamp.getTime(); String retorno = new SimpleDateFormat("HH:mm:ss", new Locale("pt", "BR")).format(new Date(time)); return retorno; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getTimestamp();", "java.lang.String getTimestamp();", "String getTimestamp();", "String getTimestamp();", "public static String timestamp()\n\t{\n\t\t/**\n\t\t * Get the current time formatted as HH:mm:ss.\n\t\t */\t\t\n\t\treturn new SimpleDateFormat(\"HH:mm:ss\").format(new Date());\n\t}...
[ "0.79843545", "0.79843545", "0.7696338", "0.7696338", "0.7603203", "0.7474105", "0.7451186", "0.74363315", "0.7387218", "0.7298683", "0.7169296", "0.7132048", "0.7119116", "0.70955753", "0.7077651", "0.7057535", "0.70389843", "0.6995065", "0.6981731", "0.6967791", "0.696339",...
0.72803736
10
Formata um bigDecimal para String tirando os pontos.
public static String formatarBigDecimalParaStringComVirgula(BigDecimal valor) { String valorItemAnterior = "" + valor; valorItemAnterior = valorItemAnterior.replace(".", ","); return valorItemAnterior; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String bigDecimalToString(BigDecimal bd) {\n BigDecimal cur = bd.stripTrailingZeros();\n StringBuilder sb = new StringBuilder();\n\n for (int numConverted = 0; numConverted < MAX_CHARS; numConverted++) {\n cur = cur.multiply(ONE_PLACE);\n int curCodePoint = cur.intValue();\n if (0 == curCod...
[ "0.72066593", "0.6676065", "0.66143006", "0.6586891", "0.65693295", "0.6473845", "0.63855565", "0.6367788", "0.632921", "0.6283473", "0.6255881", "0.59450513", "0.5933156", "0.58794135", "0.5839738", "0.5825037", "0.5766861", "0.5764864", "0.5758748", "0.5755245", "0.5751029"...
0.6201338
11
Converte uma string no formato AAMMDD para um objeto do tipo Date
public static Date converteStringInvertidaSemBarraAAMMDDParaDate(String data) { Date retorno = null; String dataInvertida = data.substring(4, 6) + "/" + data.substring(2, 4) + "/20" + data.substring(0, 2); SimpleDateFormat dataTxt = new SimpleDateFormat("dd/MM/yyyy"); try { retorno = dataTxt.parse...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Date convertirStringADateUtil(String s){\n\t\tFORMATO_FECHA.setLenient(false);\n\t\tDate fecha = null;\n\t\ttry {\n\t\t\tfecha = FORMATO_FECHA.parse(s);\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn fecha;\n\t}", "public static Date toDate(String dateStr, SimpleDa...
[ "0.7128753", "0.66758424", "0.6668269", "0.6564416", "0.6516368", "0.64886224", "0.64732814", "0.64382535", "0.6397164", "0.63935024", "0.6373945", "0.6354668", "0.63499004", "0.6316702", "0.6300565", "0.6291686", "0.6276653", "0.624754", "0.6245499", "0.6241071", "0.6209454"...
0.6908813
1
Retorna matricula sem o digito verificador.
public static String obterMatriculaSemDigitoVerificador(String matriculaComDigito) { String matriculaSemDigito = ""; if (matriculaComDigito.length() > 0) { int tamanhoMatricula = matriculaComDigito.length(); matriculaSemDigito = matriculaComDigito.substring(0, tamanhoMatricula - 1); } re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getTxt_matricula() {\r\n\t\treturn txt_matricula.getText();\r\n\t}", "public long getMatricula() {\r\n return matricula;\r\n }", "public String verMarcacion(){\n\t\t limpiar();\n\t\t\tString vista=\"pretty:misMarcacionesPretty\";\n\t //CODIGO\n\t return vista;\n\t\t}", ...
[ "0.6012", "0.5815156", "0.57537496", "0.5646555", "0.55797696", "0.5555258", "0.54910856", "0.54699206", "0.5408694", "0.53969806", "0.5323507", "0.52747416", "0.5248673", "0.52352005", "0.5212864", "0.5127658", "0.5127475", "0.50754267", "0.5055701", "0.5030277", "0.50193286...
0.5642213
4
Metodo responsavel por retornar o percentual da memoria que esta sendo usada na JVM. Verifica a memoria heap responsavel por alo
public static String retornaPercentualUsadoDeMemoriaJVM() { Runtime runtime = Runtime.getRuntime(); long max = runtime.maxMemory(); long free = runtime.freeMemory(); long used = max - free; NumberFormat format = NumberFormat.getInstance(); // Retorna o percentual da memoria usada String pe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private long getMemoryFootprint() {\n Runtime runtime = Runtime.getRuntime();\n long memAfter = runtime.totalMemory() - runtime.freeMemory();\n long memBefore = memAfter + 1;\n while (memBefore != memAfter) {\n memBefore = memAfter;\n System.gc();\n memA...
[ "0.7285024", "0.71349907", "0.69524306", "0.692726", "0.6895024", "0.687676", "0.686845", "0.6860169", "0.6857955", "0.68520254", "0.6832765", "0.6832765", "0.68027574", "0.67752564", "0.6742055", "0.67068154", "0.668288", "0.66735494", "0.66551346", "0.66170204", "0.64848566...
0.7004721
2
Converte uma string no formato AAMMDD para um objeto do tipo Date
public static Date converteStringInvertidaSemBarraAAAAMMDDParaDate(String data) { Date retorno = null; String dataInvertida = data.substring(6, 8) + "/" + data.substring(4, 6) + "/" + data.substring(0, 4); SimpleDateFormat dataTxt = new SimpleDateFormat("dd/MM/yyyy"); try { retorno = dataTxt.parse...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Date convertirStringADateUtil(String s){\n\t\tFORMATO_FECHA.setLenient(false);\n\t\tDate fecha = null;\n\t\ttry {\n\t\t\tfecha = FORMATO_FECHA.parse(s);\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn fecha;\n\t}", "public static Date converteStringInvertidaSemBarra...
[ "0.71270263", "0.69078624", "0.66745096", "0.6561734", "0.6513729", "0.6486581", "0.6471145", "0.6435562", "0.639534", "0.6390626", "0.63715726", "0.63529813", "0.6348331", "0.6314276", "0.62984425", "0.628912", "0.627512", "0.6246001", "0.6244051", "0.6239527", "0.62075084",...
0.6667295
3
Formata um campo e o retorna ja com |
public static String formatarCampoParaConcatenacao(Object parametro) { if (parametro == null) { return "|"; } else { return parametro + "|"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String dameValor(String campo) {\n\t\t// TODO Auto-generated method stub\n\t\tString c=\"\";\n\t\n\t\tif (campo.equals(Constantes.ID_ISFICHA))\n\t\t{\n\t\t\tc=IDISFICHA;\n\t\t}\n\t\telse if (campo.equals(Constantes.FICHA_NOTAS))\n\t\t{\n\t\t\tc=NOTAS;\n\t\t}\n\t\telse if (campo.equals(Constantes.FICHA_ANOTA...
[ "0.6479847", "0.64016414", "0.61841995", "0.60430896", "0.5989958", "0.5977483", "0.5965036", "0.5960608", "0.5913682", "0.5907636", "0.59070563", "0.588984", "0.58473736", "0.5844137", "0.58399355", "0.5838364", "0.58323467", "0.58272475", "0.5823969", "0.58165675", "0.58144...
0.0
-1
Formate um MesANo para um tipo Date
public static Date formatarMesAnoParaData(String mesAno, String dia, String hora) { Date retorno = null; String[] mesAnoArray = mesAno.split("/"); SimpleDateFormat formatoData = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss"); String dataCompleta = dia + "/" + mesAnoArray[0] + "/" + mesAnoArray[1] + " " + h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getDateObject(){\n \n Date date = new Date(this.getAnio(), this.getMes(), this.getDia());\n return date;\n }", "public final String obtenerFechaFormateada() {\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"dd/MMM/yyyy\");\n return fechaDeLaVisita.g...
[ "0.6580451", "0.6514836", "0.6418595", "0.6391166", "0.63517284", "0.63454217", "0.6278559", "0.624532", "0.6197472", "0.61383736", "0.61211896", "0.6094752", "0.60842913", "0.6076307", "0.6068773", "0.6067542", "0.6052943", "0.6023209", "0.6012588", "0.5981672", "0.5976068",...
0.0
-1
Retorna data com a hora 00:00:00
public static Date getData(Date data) { Calendar calendar = Calendar.getInstance(); calendar.setTime(data); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar.getTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getHoraInicial(){\r\n return fechaInicial.get(Calendar.HOUR_OF_DAY)+\":\"+fechaInicial.get(Calendar.MINUTE);\r\n }", "public String dar_hora(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n return dateFormat.format(date).toS...
[ "0.6838655", "0.68248105", "0.6480662", "0.63111573", "0.62579274", "0.6256307", "0.6006114", "0.5937573", "0.592316", "0.58845323", "0.586755", "0.58619654", "0.58494234", "0.58049953", "0.57953554", "0.574941", "0.5721496", "0.571663", "0.5702003", "0.56641865", "0.56595474...
0.5673022
19
considerase erro CNPJ's formados por uma sequencia de numeros iguais
public static boolean isCNPJ(String CNPJ) { if (CNPJ.equals("00000000000000") || CNPJ.equals("11111111111111") || CNPJ.equals("22222222222222") || CNPJ.equals("33333333333333") || CNPJ.equals("44444444444444") || CNPJ.equals("55555555555555") || CNPJ.equals("66666666666666") || CNPJ.equals("77777777777777") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean validaCnpj(String cnpj){\n if (cnpj.equals(\"00000000000000\") || cnpj.equals(\"11111111111111\") || cnpj.equals(\"22222222222222\")\n || cnpj.equals(\"33333333333333\") || cnpj.equals(\"44444444444444\") || cnpj.equals(\"55555555555555\")\n || cnpj.equals(\"6666...
[ "0.6382475", "0.6203041", "0.61842483", "0.61056256", "0.60592633", "0.5966478", "0.5935764", "0.5863586", "0.57848996", "0.5721471", "0.57104725", "0.5691752", "0.56890285", "0.56222826", "0.56182325", "0.56038535", "0.5603781", "0.5583417", "0.5550144", "0.55455226", "0.553...
0.0
-1
fill up the data for the table if validation errors occured
@Override public Resolution handleValidationErrors(ValidationErrors errors) throws Exception { trips = facade.getAllTrips(); excursions = facade.getAllExcursions(); //return null to let the event handling continue return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void validate() {\n for (DBRow row : rows) {\n for (DBColumn column : columns) {\n Cell cell = Cell.at(row, column);\n DBValue value = values.get(cell);\n notNull(value,\"Cell \" + cell);\n }\n }\n }", "private void valid...
[ "0.7023302", "0.66613173", "0.66378176", "0.6496365", "0.6452378", "0.6441538", "0.63182205", "0.6305283", "0.62390506", "0.6198751", "0.61342543", "0.6049777", "0.5995553", "0.5973848", "0.5966794", "0.59132063", "0.58762395", "0.58048797", "0.5793437", "0.5793437", "0.57865...
0.0
-1
part for deleting a book
public Resolution delete() { log.debug("delete() excursion={}", excursion); //only id is filled by the form excursion = facade.getExcursion(excursion.getId()); facade.deleteExcursion(excursion); getContext().getMessages().add(new LocalizableMessage("excursion.delete.mes...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void deleteBook() {\n\t\t\n\t}", "private void deleteBook() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Over...
[ "0.856062", "0.8464637", "0.84493256", "0.82545793", "0.8214601", "0.8139353", "0.8040011", "0.77721065", "0.76898485", "0.7610753", "0.7534171", "0.75120777", "0.74618506", "0.7446132", "0.7405446", "0.738196", "0.7331489", "0.7245909", "0.7214298", "0.719016", "0.71284205",...
0.0
-1
part for editing a book
@Before(stages = LifecycleStage.BindingAndValidation, on = {"edit", "save"}) public void loadExcursionFromDatabase() { String ids = getContext().getRequest().getParameter("excursion.id"); if (ids == null) return; excursion = facade.getExcursion(Long.parseLong(ids)); date = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic int editBook(bookInfo bookinfo) {\n\t\treturn 0;\n\t}", "public book edit(book editedbook) {\n\t\t\n\t\treturn repository.save(editedbook);\n\t}", "private void edit() {\n\n\t}", "@Override\r\n\tpublic void edit() {\n\t\t\r\n\t}", "void update(Book book);", "public void edit(int id, S...
[ "0.78359616", "0.7634996", "0.7395644", "0.6954646", "0.6929578", "0.6772403", "0.6756271", "0.6755238", "0.66973555", "0.6644628", "0.64925736", "0.64816564", "0.647672", "0.64587045", "0.6438472", "0.64214116", "0.6419906", "0.6402373", "0.63889927", "0.63835007", "0.634317...
0.0
-1
i18n code for display name Constructor
private ProcessStateObject(@NotNull Long id, @NotNull String name) { this.id = id; this.name = name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String nameLabel();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "java.lang.String getDisplayName();", "String getDisplay_name();", "String getDisplayNa...
[ "0.6770327", "0.67252433", "0.67252433", "0.67252433", "0.67252433", "0.67252433", "0.67252433", "0.67082316", "0.6647534", "0.6647534", "0.6647534", "0.6647534", "0.6647534", "0.6647534", "0.6573484", "0.6572522", "0.6540228", "0.6540228", "0.6540228", "0.6540228", "0.638647...
0.0
-1
oppdaterer modulen. blir kalt uregelmessig
protected abstract void update();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void habilitarCamposModif() {\n\n listarPromotoresModif();\n //limpiarListaCrear();\n }", "protected abstract void iniciarModo();", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza()...
[ "0.65634835", "0.63888013", "0.6374206", "0.63455987", "0.6229793", "0.62238884", "0.6211352", "0.6147732", "0.61260605", "0.6111951", "0.61008024", "0.60835314", "0.6049262", "0.60430133", "0.5990611", "0.5943561", "0.59295374", "0.59292233", "0.5917268", "0.5908544", "0.588...
0.0
-1
/ START OF FACEBOOK SIGN IN PROCESS Function to login into facebook
public void loginToFacebook(View View) { Log.e("login to facbook",""+"log"); LoginManager.getInstance().logInWithReadPermissions(this, Arrays.asList("email", "user_photos", "public_profile","basic_info","user_birthday")); LoginManager.getInstance().registerCallback(callbackManager, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void login() {\n String appId = \"404127593399770\";\n String redirectUrl = \"https://www.facebook.com/connect/login_success.html\";\n String loginDialogUrl = facebookClient.getLoginDialogUrl(appId, redirectUrl, scopeBuilder);\n Gdx.net.openURI(loginDialogUrl);\n }", "privat...
[ "0.76683325", "0.7620511", "0.7459444", "0.74081707", "0.7224935", "0.7007838", "0.700546", "0.69661117", "0.6944521", "0.67389417", "0.67175514", "0.668798", "0.6648798", "0.661483", "0.65620303", "0.6550535", "0.65359426", "0.6474437", "0.6469395", "0.6448327", "0.6446801",...
0.6171208
33
onPostExecute displays the results of the AsyncTask.
@Override protected void onPostExecute(String result) { //Toast.makeText(OTPActivity.this, result.toString(), Toast.LENGTH_LONG).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void onPostExecute() {\n }", "protected void onPostExecute() {\r\n\t}", "protected void onPostExecute() {\n }", "protected void onPostExecute() {\n }", "@Override\n protected void onPostExecute(String result) {\n // tvResult.setText(result);\n }", "prote...
[ "0.7651127", "0.763166", "0.7599322", "0.7599322", "0.75031227", "0.74831414", "0.74831414", "0.74690646", "0.74653816", "0.74447536", "0.74430203", "0.7422712", "0.7398446", "0.7394379", "0.7394379", "0.7392048", "0.7392048", "0.7392048", "0.73781794", "0.7376524", "0.736754...
0.70349705
58
onPostExecute displays the results of the AsyncTask.
@Override protected void onPostExecute(String result) { // Toast.makeText(OTPActivity.this, result.toString(), Toast.LENGTH_LONG).show(); if(result.length() > 0) { try { progressDialog.dismiss(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void onPostExecute() {\n }", "protected void onPostExecute() {\r\n\t}", "protected void onPostExecute() {\n }", "protected void onPostExecute() {\n }", "@Override\n protected void onPostExecute(String result) {\n // tvResult.setText(result);\n }", "prote...
[ "0.7648474", "0.7629248", "0.75970715", "0.75970715", "0.7503771", "0.7479748", "0.7479748", "0.74670684", "0.7463521", "0.7443436", "0.7440934", "0.74209803", "0.7395019", "0.73926663", "0.73926663", "0.7390195", "0.7390195", "0.7390195", "0.73754895", "0.73746675", "0.73669...
0.0
-1
/ END OF OTP SIGN IN PROCESS
public void gotoProfileActivity() { Log.e("next",""+"log"); startActivity(new Intent(OTPActivity.this, UserProfileActivity.class)); finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void signInComplete();", "@Override\n\n public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {\n\n\n Toast.makeText(otpsignin.this,\"Code send to your phone\",Toast.LENGTH_SHORT).show();\n\n signInWithPhoneAuthCredential(phoneAuthCreden...
[ "0.6554807", "0.60525125", "0.6029323", "0.6016405", "0.5978794", "0.5955205", "0.5834267", "0.5803168", "0.57644975", "0.57525945", "0.5752", "0.5741234", "0.5730717", "0.572982", "0.5716134", "0.56909734", "0.5688801", "0.5671939", "0.56566244", "0.5637943", "0.5631793", ...
0.0
-1
Add your Consumer Key and Consumer Secret Key generated while creating app on Twitter. See "Keys and access Tokens" in your app on twitter to find these keys.
public void onmethod() { Log.e("onmethod","log"); TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET); /* Fabric.with(getApplicationContext(), new com.twitter.sdk.android.Twitter(authConfig));*/ mTwitterAuthClient= new TwitterAuthClie...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setOAuthConsumer(String consumerKey, String consumerSecret);", "private void initTwitterConfigs() {\n consumerKey = getString(com.socialscoutt.R.string.twitter_consumer_key);\n consumerSecret = getString(com.socialscoutt.R.string.twitter_consumer_secret);\n }", "public void twitterConfigu...
[ "0.7015528", "0.6743283", "0.6386427", "0.63116795", "0.6195512", "0.6194599", "0.61046815", "0.5978506", "0.5977714", "0.5751134", "0.5724745", "0.5674375", "0.55881643", "0.55824447", "0.55701506", "0.55348927", "0.5528881", "0.54643047", "0.5448792", "0.54287916", "0.53927...
0.4826297
81
have a picture have yelp link
public Restaurant() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPictureUrl()\n\t{\n\t\treturn \"http://cdn-0.nflximg.com/us/headshots/\" + id + \".jpg\";\n\t}", "@Override\n public String getImageLink() {\n return imageLink;\n }", "public String getImageUrl();", "abstract public String imageUrl ();", "private RoundImage img(String imgAddre...
[ "0.5864642", "0.5858108", "0.585599", "0.5839064", "0.58006006", "0.5782133", "0.5779394", "0.57160264", "0.56467026", "0.563562", "0.561796", "0.55481756", "0.5469208", "0.5462891", "0.5454957", "0.5440076", "0.5404158", "0.5390484", "0.53612465", "0.5347563", "0.53228605", ...
0.0
-1
Tries to add item stack to player, drops if not possible.
public static boolean addOrDropStack(PlayerEntity player, ItemStack stack) { if (!player.inventory.addItemStackToInventory(stack)) { player.dropItem(stack, false); return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addItemStack(Item itemStack) {\n\t\tint findStackable = findStackableItem(itemStack);\r\n\t\tif(findStackable!=-1){\r\n\t\t\tItem heldStack=tileItems.getItem(findStackable);\r\n\t\t\twhile(!heldStack.stackFull()&&\t//as long as the current stack isn't full and the stack we're picking up isn't empty\r\...
[ "0.75292677", "0.6726914", "0.66069955", "0.64856684", "0.6425495", "0.63258106", "0.6307233", "0.6246183", "0.61489445", "0.611758", "0.60733914", "0.6071248", "0.6065029", "0.60403955", "0.60264146", "0.6026194", "0.6016203", "0.6006254", "0.5989008", "0.59646386", "0.59602...
0.7136727
1
return player.isSneaking(); // [1.14]
public static boolean isCrouching(PlayerEntity player) { return player.isCrouching(); // [1.15] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isSneaking();", "boolean isGameSpedUp();", "boolean isPlayable();", "boolean isPlayableInGame();", "public boolean isSwimming() {\n/* 1967 */ return (!this.abilities.flying && !isSpectator() && super.isSwimming());\n/* */ }", "public boolean isShivering();", "public boolean gameWon()...
[ "0.7875522", "0.7252773", "0.7052436", "0.7048986", "0.70066035", "0.70030314", "0.6958285", "0.6955466", "0.68437576", "0.6838046", "0.6806433", "0.6779819", "0.6772913", "0.6730471", "0.6708337", "0.6652542", "0.66504395", "0.66478455", "0.6645347", "0.660643", "0.6538155",...
0.0
-1
Basic way to teleport a player to coordinate in a dimension. If the player is not in the specified dimension they will be transferred first.
public static void teleport(PlayerEntity player, BlockPos pos, int dim) { teleport(player, pos, dim, p -> { }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean teleport(Player p1, Player p2, boolean change);", "public void teleportPlayer(int x, int y){\n hero.setX(x);\n hero.setY(y);\n }", "public void sendTeleport(final Player player) {\r\n player.lock();\r\n World.submit(new Pulse(1) {\r\n\r\n int delay = 0;\r\n\r\n...
[ "0.68542653", "0.6635323", "0.6562699", "0.6441572", "0.6137724", "0.60947603", "0.60009974", "0.5968357", "0.5964858", "0.59626687", "0.5929335", "0.59008366", "0.58638245", "0.58185357", "0.5805449", "0.5774003", "0.5761199", "0.5741135", "0.5718083", "0.56824297", "0.56498...
0.71572465
0
TODO Autogenerated method stub
public static void main(String[] args) { Scanner scan = new Scanner(System.in); /* * Exercicio 1 */ int c = 0; int s = 1; int f = 0; int b = 0; while( c < 8 ) { b = f + s; f = s; s = b; c++; System.out.println(b); } /* * Exercicio 2 */ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Constructs a remote receiver stage
public RemoteReceiverStage(final EventHandler<RemoteEvent<byte[]>> handler, final EventHandler<Throwable> errorHandler, final int numThreads) { this.handler = new RemoteReceiverEventHandler(handler); this.executor = Executors.newFixedThreadPool( numThreads, new DefaultThreadFactory(RemoteReceive...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void launchRemote(Stage stage) throws Exception { \n\t\tmenuMessage.setText(\"Game will start as soon as the client is connected...\"); \n\t\t\n\t\t// thread of the server connecting to the game and of the game \n\t\tThread serverThread = new Thread(() -> { \n\t\t\tRemotePlayerServer server = new Remote...
[ "0.60208833", "0.59852415", "0.566672", "0.5664454", "0.5524493", "0.5472796", "0.5450202", "0.54432124", "0.5439978", "0.54005307", "0.53929204", "0.5355283", "0.5336202", "0.52602303", "0.523448", "0.51424223", "0.5094544", "0.50779045", "0.5068971", "0.50375336", "0.503634...
0.50069577
22
Handles the received event
@Override public void onNext(TransportEvent value) { LOG.log(Level.FINEST, "{0}", value); stage.onNext(value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic voi...
[ "0.7360718", "0.7360718", "0.7360718", "0.7360718", "0.7360718", "0.73312604", "0.73312604", "0.73312604", "0.7321491", "0.7321491", "0.73095137", "0.70050323", "0.69321656", "0.6871755", "0.68341506", "0.6789753", "0.6777191", "0.6737486", "0.671882", "0.6715435", "0.663354"...
0.0
-1
Test of consumePendingTasks method, of class QueueDAOImpl.
@Test public void testConsumePendingTasks() throws Exception { System.out.println("consumePendingTasks"); QueueDAOImpl instance = new QueueDAOImpl(); List<QueueTaskDTO> expResult = null; List<QueueTaskDTO> result = instance.consumePendingTasks().getTasks(); assertEquals...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n\tprivate void processQueue() throws DatabaseException {\n\t\tString qs = \"from PendingTask pt order by pt.created\";\n\t\tGson gson = new Gson();\n\t\tSession session = null;\n\t\t\n\t\ttry {\n\t\t\tsession = HibernateUtil.getSessionFactory().openSession();\n\t\t\tQuery q = sess...
[ "0.62113667", "0.60293746", "0.6011993", "0.59815687", "0.5926061", "0.5880382", "0.58691454", "0.58579445", "0.5825945", "0.5749785", "0.57470995", "0.5744765", "0.5744286", "0.5730648", "0.57150203", "0.5675667", "0.5565893", "0.5545473", "0.5535589", "0.55086964", "0.54730...
0.82600886
0
Test of completeTask method, of class QueueDAOImpl.
@Test public void testCompleteTask() throws Exception { System.out.println("completeTask"); QueueTaskDTO task = null; QueueDAOImpl instance = new QueueDAOImpl(); QueueTaskDTO expResult = null; QueueTaskDTO result = instance.completeTask(task); assertEquals(expR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testConsumePendingTasks() throws Exception {\r\n System.out.println(\"consumePendingTasks\");\r\n QueueDAOImpl instance = new QueueDAOImpl();\r\n List<QueueTaskDTO> expResult = null;\r\n List<QueueTaskDTO> result = instance.consumePendingTasks().getTasks();\r\n ...
[ "0.6650259", "0.64557314", "0.6442792", "0.64056516", "0.6330867", "0.6324111", "0.6252898", "0.62131715", "0.6175495", "0.6159323", "0.6152753", "0.61226135", "0.61114424", "0.6111432", "0.607888", "0.6036854", "0.60236967", "0.6008642", "0.6007603", "0.6001673", "0.5959569"...
0.8175368
0
constructor de un trabajador
public Trabajador(String nombre, String puesto) { this.nombre = nombre; this.puesto = puesto; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Trabajador() {\n\t\tsuper();\n\t}", "public JogadorTradutor() {\n this.nome= \"Sem Registro\";\n this.pontuacao = pontuacao;\n id = id;\n \n geradorDesafioItaliano = new GerarPalavra(); // primeira palavra ja é gerada para o cliente\n }", "public Trabajador(String n...
[ "0.8429635", "0.7345832", "0.7229806", "0.7183992", "0.7089845", "0.69434005", "0.6935616", "0.6926098", "0.68614346", "0.6860156", "0.6834465", "0.6829859", "0.6820203", "0.6820118", "0.6818074", "0.68179053", "0.6775539", "0.6774392", "0.6766166", "0.6752181", "0.6670657", ...
0.67124367
20
Strart each test to start with a clean slate, run deleteAllRecords
@Override protected void setUp() throws Exception { super.setUp(); mDBService = new DBService(getContext()); deleteAllRecords(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUp() {\n deleteAllRecords();\n }", "@BeforeEach\n\tpublic void cleanDataBase()\n\t{\n\t\taddRepo.deleteAll()\n\t\t.as(StepVerifier::create) \n\t\t.verifyComplete();\n\t\t\n\t\tdomRepo.deleteAll()\n\t\t.as(StepVerifier::create) \n\t\t.verifyComplete();\n\t}", "@BeforeClass\n public s...
[ "0.83474094", "0.7599303", "0.7484611", "0.7341638", "0.7302981", "0.72967833", "0.7167896", "0.71386164", "0.71025443", "0.70136184", "0.6978271", "0.69612247", "0.69612247", "0.6907549", "0.6878417", "0.6877107", "0.68638766", "0.68560594", "0.6844387", "0.6811726", "0.6791...
0.7040452
9
TODO Autogenerated method stub
public static void main(String[] args) { System.out.println("Hello World"); SaveLoadHandler slhandler = new SaveLoadHandler(); slhandler.ConnectAndCheckTablesExists(); try { SessionData testData = new SessionData(new LinkedList<Location>(), 20, 30,"test", new HashSet<Names>(), "Test", "Test2", "Test3"); t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
O(n) time, O(n) space; where n is the length of the strings
boolean checkPermutation(String a, String b) { if (a == null || b == null) { throw new NullPointerException(); } if (a.length() != b.length()) { return false; } Map<Character, Integer> frequencies = getFrequency(a); for (int i = 0; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static long substrCount(int n, String input) {\n List<String> result = new ArrayList<>();\n if (!isEmpty(input)) {\n for (int index = 0; index <= input.length(); index++) {\n for (int i = index; i <= input.length(); i++) {\n String temp = input.substring(index, i);\n if (valid(t...
[ "0.6436582", "0.63661385", "0.6352143", "0.63009393", "0.6284061", "0.6240804", "0.6201599", "0.6068844", "0.60655576", "0.6056479", "0.597237", "0.5967314", "0.5954242", "0.5951952", "0.59293586", "0.5922497", "0.5895384", "0.5870931", "0.58510256", "0.5849876", "0.5849077",...
0.0
-1
Loads every item from the set, with masterwork, items are unsealed
private List<Reward> loadFromSet(L2ArmorSet armorSet) { List<Reward> setReward = new ArrayList<>(); setReward.add(new Reward(armorSet.getChestId())); setReward.addAll(idsToSingularReward(armorSet.getHead())); setReward.addAll(idsToSingularReward(armorSet.getGloves())); setReward....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void loadItemsInternal();", "@Override\n public List<Item> retrieveAllItems() throws VendingMachinePersistenceException {\n loadItemFile();\n List<Item> itemList = new ArrayList<>();\n for (Item currentItem: itemMap.values()) {\n itemList.add(currentItem);\n ...
[ "0.67307836", "0.6126638", "0.6125383", "0.5920818", "0.58209366", "0.5782884", "0.57758635", "0.57325554", "0.5683893", "0.56796503", "0.5633764", "0.56219345", "0.5611387", "0.5584559", "0.55762285", "0.55724025", "0.55463624", "0.5544273", "0.5535166", "0.55207485", "0.551...
0.5357629
35
This is the default constructor
public Sapphiron() { this.output = new ByteArrayOutputStream(); System.setOut(new PrintStream(this.output)); this.currentTest = new Hashtable<String, AnimalStatistics>(); this.enquirers = new Vector<IEnquirerComponent>(); this.enquirerNames = new Vector<String>(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "defaultConstructor(){}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public Orbiter() {\n }", "public Pitonyak_09_02() {\r\n }", "public PSRelation()\n {\n }", "p...
[ "0.85315686", "0.8274922", "0.75848484", "0.74773645", "0.7456932", "0.7447545", "0.7443651", "0.7441528", "0.7410326", "0.74039483", "0.7391621", "0.7377517", "0.73672515", "0.7351425", "0.73242426", "0.7324195", "0.73132765", "0.73016304", "0.7279156", "0.7262864", "0.72578...
0.0
-1
/ Remove listeners so they won't be triggered during the set up of the new values.
private void clearPreviousTest() { for (ActionListener al : this.jComboBoxListeners) { this.jComboBox.removeActionListener(al); } this.jComboBox.removeAllItems(); this.jTabbedPane.removeAll(); this.currentTest.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removeListeners() {\n \t\tlistenToTextChanges(false);\n \t\tfHistory.removeOperationHistoryListener(fHistoryListener);\n \t\tfHistoryListener= null;\n \t}", "protected void removeListeners() {\n }", "public void removeListeners() {\n listeners = new ArrayList<MinMaxListener>();\n ...
[ "0.77870065", "0.7552324", "0.75449026", "0.75077194", "0.73722124", "0.7339807", "0.7336185", "0.7306003", "0.7306003", "0.7274852", "0.71898293", "0.71420836", "0.7119897", "0.71036375", "0.7092777", "0.70697325", "0.7015001", "0.7003963", "0.6993116", "0.69747466", "0.6971...
0.0
-1
This method initializes jbChangeEnquirer
private JButton getJbChangeEnquirer() { if (this.jbChangeEnquirer == null) { this.jbChangeEnquirer = new JButton(); this.jbChangeEnquirer.setText("Change"); this.jbChangeEnquirer.setSize(new Dimension(140, 15)); this.jbChangeEnquirer.addActionListener(new jav...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void jbInit() throws Exception {\n }", "public void init() {\n cupDataChangeListener = new CupDataChangeListener(dataBroker);\n }", "void jbInit() throws Exception\r\n\t{\r\n\t}", "private void init() {\n\n\t}", "private void myInit() {\n init_key();\n init_tbl_inventory();...
[ "0.5993621", "0.55467904", "0.55278236", "0.5438758", "0.53648907", "0.5290892", "0.52698237", "0.5250366", "0.5242327", "0.5241927", "0.5241927", "0.5241927", "0.52375585", "0.5233761", "0.5231032", "0.5230739", "0.5208325", "0.5208325", "0.5208325", "0.5208325", "0.5205469"...
0.56986874
1
This method initializes jContentPane
private JPanel getJContentPane() { if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.add(getJPanelLeft(), BorderLayout.WEST); jContentPane.add(getJPanelRight(), BorderLayout.CENTER); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialize() {\n this.setSize(300, 200);\n this.setContentPane(getJContentPane());\n this.pack();\n }", "private void initialize() {\n\t\tthis.setSize(329, 270);\n\t\tthis.setContentPane(getJContentPane());\n\t}", "public void init()\n {\n buildUI(getContentPane());\n }", ...
[ "0.80564976", "0.79863834", "0.781657", "0.780102", "0.77667063", "0.75706494", "0.7561094", "0.75221556", "0.75199485", "0.7516095", "0.74889266", "0.74818385", "0.7474047", "0.745395", "0.7450439", "0.74450225", "0.74051523", "0.73895437", "0.7384667", "0.73795295", "0.7379...
0.6845383
73
This method initializes jMenuSapphiron
private JMenu getJMenuSapphiron() { if (jMenuSapphiron == null) { jMenuSapphiron = new JMenu(); jMenuSapphiron.setPreferredSize(new Dimension(65, 20)); jMenuSapphiron.setMnemonic(KeyEvent.VK_S); jMenuSapphiron.setLocation(new Point(0, 0)); jMenuS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initMenu(){\n\t}", "private void initMenu()\n {\n bar = new JMenuBar();\n fileMenu = new JMenu(\"File\");\n crawlerMenu = new JMenu(\"Crawler\"); \n aboutMenu = new JMenu(\"About\");\n \n bar.add(fileMenu);\n bar.add(crawlerMe...
[ "0.79537636", "0.77936375", "0.7784865", "0.776678", "0.74574816", "0.7427663", "0.742642", "0.73393935", "0.7323029", "0.7315243", "0.7315243", "0.7305216", "0.73039883", "0.72454876", "0.72391605", "0.72391605", "0.72391605", "0.720436", "0.7191428", "0.7160889", "0.7140703...
0.6951659
38